Skip to content

Commit

Permalink
Merge branch '6.x' into 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Oct 27, 2020
2 parents a524034 + 897a471 commit e5603f2
Show file tree
Hide file tree
Showing 32 changed files with 58 additions and 49 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
php: [7.2, 7.3, 7.4, 8.0]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
Expand All @@ -47,8 +47,15 @@ jobs:
- name: Setup Memcached
uses: niden/actions-memcached@v7

- name: Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
Expand All @@ -62,14 +69,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
include:
- php: 7.2
stability: prefer-lowest
- php: 7.3
stability: prefer-stable
- php: 7.4
stability: prefer-stable
php: [7.2, 7.3, 7.4, 8.0]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - Windows

Expand All @@ -89,10 +90,16 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp
tools: composer:v2
coverage: none
ini-values: memory_limit=512M

- name: Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
Expand Down Expand Up @@ -84,7 +84,7 @@
"league/flysystem-cached-adapter": "^1.0",
"mockery/mockery": "~1.3.3|^1.4.2",
"moontoast/math": "^1.1",
"orchestra/testbench-core": "^5.0",
"orchestra/testbench-core": "^5.8",
"pda/pheanstalk": "^4.0",
"phpunit/phpunit": "^8.4|^9.3.3",
"predis/predis": "^1.1.1",
Expand Down Expand Up @@ -128,7 +128,7 @@
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
"filp/whoops": "Required for friendly error pages in development (^2.8).",
"fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
"guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).",
"laravel/tinker": "Required to use the tinker console command (^2.0).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Auth/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/http": "^7.0",
"illuminate/queue": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Broadcasting/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"psr/log": "^1.0",
"illuminate/bus": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Bus/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/pipeline": "^7.0",
"illuminate/support": "^7.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Config/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Console/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0",
"symfony/console": "^5.0",
Expand Down
5 changes: 0 additions & 5 deletions src/Illuminate/Container/BoundMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Illuminate\Container;

use Closure;
use Illuminate\Contracts\Container\BindingResolutionException;
use InvalidArgumentException;
use ReflectionFunction;
use ReflectionMethod;
Expand Down Expand Up @@ -174,10 +173,6 @@ protected static function addDependencyForCallParameter($container, $parameter,
}
} elseif ($parameter->isDefaultValueAvailable()) {
$dependencies[] = $parameter->getDefaultValue();
} elseif (! $parameter->isOptional() && ! array_key_exists($paramName, $parameters)) {
$message = "Unable to resolve dependency [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}";

throw new BindingResolutionException($message);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Container/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"psr/container": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Contracts/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"psr/container": "^1.0",
"psr/simple-cache": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cookie/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0",
"symfony/http-foundation": "^5.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Database/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/container": "^7.0",
"illuminate/contracts": "^7.0",
Expand All @@ -34,7 +34,7 @@
},
"suggest": {
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
"fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
"illuminate/console": "Required to use the database commands (^7.0).",
"illuminate/events": "Required to use the observers with Eloquent (^7.0).",
"illuminate/filesystem": "Required to use the migrations (^7.0).",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Encryption/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Events/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/container": "^7.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Filesystem/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0",
"symfony/finder": "^5.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Hashing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Http/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/session": "^7.0",
"illuminate/support": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Log/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0",
"monolog/monolog": "^2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Mail/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/container": "^7.0",
"illuminate/contracts": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Notifications/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/broadcasting": "^7.0",
"illuminate/bus": "^7.0",
"illuminate/container": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Pagination/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Pipeline/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Queue/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/console": "^7.0",
"illuminate/container": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Redis/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/contracts": "^7.0",
"illuminate/support": "^7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/container": "^7.0",
"illuminate/contracts": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Session/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/contracts": "^7.0",
"illuminate/filesystem": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"doctrine/inflector": "^1.4|^2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Translation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/contracts": "^7.0",
"illuminate/filesystem": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"egulias/email-validator": "^2.1.10",
"illuminate/container": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/View/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"ext-json": "*",
"illuminate/container": "^7.0",
"illuminate/contracts": "^7.0",
Expand Down
7 changes: 7 additions & 0 deletions tests/Container/ContainerCallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ public function testCallWithBoundMethod()
$this->assertSame('taylor', $result[1]);
}

public function testCallWithUnnamedParameters()
{
$container = new Container;
$result = $container->call([new ContainerTestCallStub, 'unresolvable'], ['foo', 'bar']);
$this->assertEquals(['foo', 'bar'], $result);
}

public function testBindMethodAcceptsAnArray()
{
$container = new Container;
Expand Down

0 comments on commit e5603f2

Please sign in to comment.