diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e96052e..68fac01 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -31,4 +31,4 @@ jobs:
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
- ['8.0', '8.1', '8.2', '8.3']
+ ['8.0', '8.1', '8.2', '8.3', '8.4']
diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml
index 5473ec9..632bfd4 100644
--- a/.github/workflows/composer-require-checker.yml
+++ b/.github/workflows/composer-require-checker.yml
@@ -31,4 +31,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
- ['8.0', '8.1', '8.2', '8.3']
+ ['8.0', '8.1', '8.2', '8.3', '8.4']
diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml
index 457772a..5d6931d 100644
--- a/.github/workflows/rector.yml
+++ b/.github/workflows/rector.yml
@@ -21,4 +21,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
- ['8.3']
+ ['8.4']
diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml
index 8694d2d..0a323eb 100644
--- a/.github/workflows/static.yml
+++ b/.github/workflows/static.yml
@@ -29,4 +29,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
- ['8.0', '8.1', '8.2', '8.3']
+ ['8.0', '8.1', '8.2', '8.3', '8.4']
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 68589e9..d5a8e02 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
## 1.3.1 under development
-- no changes in this release.
+- Chg #217: Change PHP constraint in `composer.json` to `8.0 - 8.4` (@vjik)
## 1.3.0 December 09, 2024
diff --git a/composer.json b/composer.json
index 5e12e6d..00dfd1a 100644
--- a/composer.json
+++ b/composer.json
@@ -26,18 +26,18 @@
}
],
"require": {
- "php": "^8.0",
- "psr/container": "^1.0|^2.0",
- "yiisoft/definitions": "^1.0|^2.0|^3.0.1"
+ "php": "8.0 - 8.4",
+ "psr/container": "^1.0 || ^2.0",
+ "yiisoft/definitions": "^1.0 || ^2.0 || ^3.0.1"
},
"require-dev": {
- "maglnet/composer-require-checker": "^4.2",
- "phpunit/phpunit": "^9.5",
- "rector/rector": "^2.0.3",
- "roave/infection-static-analysis-plugin": "^1.16",
- "spatie/phpunit-watcher": "^1.23",
- "vimeo/psalm": "^4.30|^5.4",
- "yiisoft/test-support": "^3.0"
+ "maglnet/composer-require-checker": "^4.4",
+ "phpunit/phpunit": "^9.6.22",
+ "rector/rector": "^2.0.10",
+ "roave/infection-static-analysis-plugin": "^1.25",
+ "spatie/phpunit-watcher": "^1.23.6",
+ "vimeo/psalm": "^4.30 || ^5.26.1 || ^6.9.4",
+ "yiisoft/test-support": "^3.0.2"
},
"autoload": {
"psr-4": {
diff --git a/psalm.xml b/psalm.xml
index 2d46e83..f6c4189 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -3,22 +3,18 @@
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
+ ensureOverrideAttribute="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
-
+
-
+
-
-
-
-
-
-
+
diff --git a/tests/FactoryTest.php b/tests/FactoryTest.php
index 016c0e1..68f650f 100644
--- a/tests/FactoryTest.php
+++ b/tests/FactoryTest.php
@@ -37,8 +37,6 @@
use Yiisoft\Factory\Tests\Support\NullableOptionalInterfaceDependency;
use Yiisoft\Factory\Tests\Support\NullableOptionalConcreteDependency;
use Yiisoft\Factory\Tests\Support\NullableScalarConstructorArgument;
-use Yiisoft\Factory\Tests\Support\OptionalInterfaceDependency;
-use Yiisoft\Factory\Tests\Support\OptionalConcreteDependency;
use Yiisoft\Factory\Tests\Support\Phone;
use Yiisoft\Factory\Tests\Support\PinkCircle;
use Yiisoft\Factory\Tests\Support\PropertyTest;
@@ -762,22 +760,6 @@ public function testDefinitionEqualId(): void
$this->assertSame(42, $engine->getNumber());
}
- public function testOptionalInterfaceDependency(): void
- {
- $factory = new Factory(new SimpleContainer());
-
- $object = $factory->create(OptionalInterfaceDependency::class);
- $this->assertInstanceOf(OptionalInterfaceDependency::class, $object);
- }
-
- public function testOptionalConcreteDependency(): void
- {
- $factory = new Factory(new SimpleContainer());
-
- $object = $factory->create(OptionalConcreteDependency::class);
- $this->assertInstanceOf(OptionalConcreteDependency::class, $object);
- }
-
public function testNullableOptionalInterfaceDependency(): void
{
$factory = new Factory(new SimpleContainer());
diff --git a/tests/Support/OptionalConcreteDependency.php b/tests/Support/OptionalConcreteDependency.php
deleted file mode 100644
index 9f58abe..0000000
--- a/tests/Support/OptionalConcreteDependency.php
+++ /dev/null
@@ -1,12 +0,0 @@
-