From 4671560aec7a0f1e412bfb130c602f3267322c38 Mon Sep 17 00:00:00 2001 From: Agustin Gomes Date: Tue, 22 Feb 2022 20:32:05 +0100 Subject: [PATCH 1/2] Run PHPUnit with Zend assert enabled --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 341211af..74d63193 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ vendor/composer/installed.json: composer.json composer.lock .PHONY: phpunit phpunit: - @vendor/bin/phpunit + @php -dzend.assertions=1 vendor/bin/phpunit .PHONY: infection infection: From 580303075b5ba9947679dd405066763d7d67ac83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Tue, 22 Feb 2022 21:34:50 +0100 Subject: [PATCH 2/2] Fix incorrect assertion --- src/Generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator.php b/src/Generator.php index 36b6f76c..be728d4c 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -44,7 +44,7 @@ private function loadContainer(ContainerConfiguration $config, ConfigCache $dump { require_once $dump->getPath(); $className = $config->getClassName(); - assert(is_a($className, ContainerInterface::class)); + assert(is_a($className, ContainerInterface::class, true)); return new $className(); }