Skip to content

[5.4.19] Breaking change in Container::build #19122

@sisve

Description

@sisve
  • Laravel Version: 5.4.19 (and all later)
  • PHP Version: 7.1.1

Description:

The commit ebe568c causes the provided tests to fail in 5.4.19. The test works in 5.4.18.

Steps To Reproduce:

class ZomgTest extends TestCase {
    use CreatesApplication;

    public function testZomg() {
        $this->app->build(ZomgService::class);
        $this->assertTrue(true); // make phpunit happy
    }

}

class ZomgService {
    public function __construct(ZomgRepository $userRepository) {
    }
}

class ZomgRepository {
}

Result:

ErrorException: array_key_exists() expects parameter 2 to be array, boolean given

~/vendor/laravel/framework/src/Illuminate/Container/Container.php:794
~/vendor/laravel/framework/src/Illuminate/Container/Container.php:769
~/vendor/laravel/framework/src/Illuminate/Container/Container.php:746
~/tests/ZomgTest.php:14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions