diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2620463..75c5ab7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ jobs: strategy: matrix: include: + - php: '7.1' + - php: '7.2' + - php: '7.3' - php: '7.4' - php: '8.0' - php: '8.1' diff --git a/composer.json b/composer.json index be5fb18..57ad67c 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "source": "https://github.com/miladrahimi/phpcontainer/issues" }, "require": { - "php": ">=7.4", + "php": ">=7.1", "psr/container": "^2.0" }, "autoload": { diff --git a/src/Container.php b/src/Container.php index ba40e6a..aeb08be 100644 --- a/src/Container.php +++ b/src/Container.php @@ -20,7 +20,7 @@ class Container implements ContainerInterface * * @var Transient[]|Singleton[] */ - private array $repository = []; + private $repository = []; /** * Empty the container diff --git a/tests/ContainerTest.php b/tests/ContainerTest.php index 37dd1fb..0ad862c 100644 --- a/tests/ContainerTest.php +++ b/tests/ContainerTest.php @@ -139,6 +139,8 @@ public function test_prototype_callable_binding_with_no_parameter() $t1 = $this->container->get('time'); + for ($i = 0; $i < 1000; $i++) sleep(0); + $t2 = $this->container->get('time'); $this->assertNotEquals($t1, $t2);