diff --git a/.travis.yml b/.travis.yml index f71e05f..42d6fb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: php php: - - 7.2 - - 7.3 + - 7.4 - nightly matrix: diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..935b7fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +## 2.0.0 - 19-04-2020 + +Changes: + - Updated to PHP 7.4 diff --git a/composer.json b/composer.json index f5c7d6d..0953b13 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,13 @@ } ], "require": { - "php": ">=7.2", - "qlimix/dependency-container": "^1.0", + "php": ">=7.4", + "qlimix/dependency-container": "^2.0", "pimple/pimple": "^3.2" }, + "require-dev": { + "qlimix/code-standard": "^2.0" + }, "autoload": { "psr-4": { "Qlimix\\DependencyContainer\\": "src/" @@ -32,8 +35,5 @@ }, "config": { "sort-packages": true - }, - "require-dev": { - "qlimix/code-standard": "^1.0" } } diff --git a/src/PimpleDependencyRegistry.php b/src/PimpleDependencyRegistry.php index 254b825..d044237 100644 --- a/src/PimpleDependencyRegistry.php +++ b/src/PimpleDependencyRegistry.php @@ -7,8 +7,7 @@ final class PimpleDependencyRegistry implements RegistryInterface { - /** @var Container */ - private $pimple; + private Container $pimple; public function __construct(Container $pimple) { diff --git a/tests/PimpleDependencyRegistryTest.php b/tests/PimpleDependencyRegistryTest.php index cc19ab3..5eb4b9e 100644 --- a/tests/PimpleDependencyRegistryTest.php +++ b/tests/PimpleDependencyRegistryTest.php @@ -9,11 +9,9 @@ final class PimpleDependencyRegistryTest extends TestCase { - /** @var Container */ - private $container; + private Container $container; - /** @var PimpleDependencyRegistry */ - private $registry; + private PimpleDependencyRegistry $registry; protected function setUp(): void { @@ -21,10 +19,7 @@ protected function setUp(): void $this->registry = new PimpleDependencyRegistry($this->container); } - /** - * @test - */ - public function shouldSetService(): void + public function testShouldSetService(): void { $id = 'id'; $return = new stdClass(); @@ -36,10 +31,7 @@ public function shouldSetService(): void $this->assertSame($return, $this->registry->get($id)); } - /** - * @test - */ - public function shouldSetValue(): void + public function testShouldSetValue(): void { $id = 'id'; $return = 'value'; @@ -51,10 +43,7 @@ public function shouldSetValue(): void $this->assertSame($return, $this->registry->get($id)); } - /** - * @test - */ - public function shouldSetMaker(): void + public function testShouldSetMaker(): void { $id = 'id'; $value = 0; @@ -66,10 +55,7 @@ public function shouldSetMaker(): void $this->assertSame($value+1, $this->registry->make($id)); } - /** - * @test - */ - public function shouldMakeMultipleDifferent(): void + public function testShouldMakeMultipleDifferent(): void { $id = 'id'; $value = 0; @@ -85,10 +71,7 @@ public function shouldMakeMultipleDifferent(): void $this->assertSame($value+1, $this->registry->make($id)); } - /** - * @test - */ - public function shouldSetOnSetId(): void + public function testShouldSetOnSetId(): void { $id = 'id'; $setId = 'foo'; @@ -104,10 +87,7 @@ public function shouldSetOnSetId(): void $this->assertSame($make, $makeAnother); } - /** - * @test - */ - public function shouldMerge(): void + public function testShouldMerge(): void { $id = 'id'; @@ -133,10 +113,7 @@ public function shouldMerge(): void $this->assertSame('barfoo' ,$values['foobar']); } - /** - * @test - */ - public function shouldMergeNoneSetId(): void + public function testShouldMergeNoneSetId(): void { $id = 'id'; @@ -155,10 +132,7 @@ public function shouldMergeNoneSetId(): void $this->assertSame('barfoo' ,$values['foobar']); } - /** - * @test - */ - public function shouldHaveValueId(): void + public function testShouldHaveValueId(): void { $id = 'id'; $value = 1; @@ -168,10 +142,7 @@ public function shouldHaveValueId(): void $this->assertTrue($this->registry->has($id)); } - /** - * @test - */ - public function shouldHaveServiceId(): void + public function testShouldHaveServiceId(): void { $id = 'id'; $value = 1; @@ -183,20 +154,14 @@ public function shouldHaveServiceId(): void $this->assertTrue($this->registry->has($id)); } - /** - * @test - */ - public function shouldNotHaveValueId(): void + public function testShouldNotHaveValueId(): void { $id = 'id'; $this->assertFalse($this->registry->has($id)); } - /** - * @test - */ - public function shouldNotHaveServiceId(): void + public function testShouldNotHaveServiceId(): void { $id = 'id';