From 8f794ebacda91b18481e90970ac89a8eeab66bfb Mon Sep 17 00:00:00 2001 From: Stanislau Komar Date: Tue, 23 Sep 2025 18:34:27 +0400 Subject: [PATCH 1/6] v1.7.0 Implements plugin autowiring --- .php-cs-fixer.dist.php | 30 ------- composer.json | 19 ++-- phpcs.xml | 64 -------------- phpstan.neon.dist | 4 - phpunit.xml.dist | 41 --------- psalm.xml | 17 ---- src/AppModeEnum.php | 57 ++++++++++++ src/Kernel.php | 145 +++++++++++++++++++++++++++---- src/KernelBuilder.php | 103 ---------------------- src/KernelInterface.php | 21 ++++- tests/Unit/KernelBuilderTest.php | 79 ----------------- tests/Unit/KernelTest.php | 30 +++---- tests/Unit/PluginClasses.php | 33 +++++++ 13 files changed, 253 insertions(+), 390 deletions(-) delete mode 100644 .php-cs-fixer.dist.php delete mode 100755 phpcs.xml delete mode 100644 phpstan.neon.dist delete mode 100644 phpunit.xml.dist delete mode 100644 psalm.xml create mode 100644 src/AppModeEnum.php delete mode 100755 src/KernelBuilder.php delete mode 100644 tests/Unit/KernelBuilderTest.php create mode 100644 tests/Unit/PluginClasses.php diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php deleted file mode 100644 index ded2263..0000000 --- a/.php-cs-fixer.dist.php +++ /dev/null @@ -1,30 +0,0 @@ -in(__DIR__.'/src') - ->in(__DIR__.'/tests') -; - -return (new PhpCsFixer\Config()) - ->setRules(array( - '@Symfony' => true, - '@Symfony:risky' => true, - 'protected_to_private' => false, - 'semicolon_after_instruction' => false, - 'header_comment' => [ - 'header' => << - - For the full copyright and license information, please view the LICENSE - file that was distributed with this source code. -EOF - ] - )) - ->setRiskyAllowed(true) - ->setFinder($finder); \ No newline at end of file diff --git a/composer.json b/composer.json index d46e504..a0ac5ae 100755 --- a/composer.json +++ b/composer.json @@ -10,16 +10,9 @@ } ], "require": { - "php": "^8.2", - "micro/dependency-injection": "^1.6" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.29", - "friendsofphp/php-cs-fixer": "^3.13", - "phpstan/phpstan": "^1.9", - "phpunit/php-code-coverage": "^9.2", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.2" + "php": "^8.4", + "micro/autowire": "^1.6", + "micro/dependency-injection": "^1.7" }, "autoload": { "psr-4": { @@ -33,7 +26,8 @@ }, "config": { "allow-plugins": { - "ergebnis/composer-normalize": true + "ergebnis/composer-normalize": true, + "micro/testing-tool": true }, "sort-packages": true }, @@ -56,5 +50,8 @@ "composer normalize", "@coverage" ] + }, + "require-dev": { + "micro/testing-tool": "^1.7" } } diff --git a/phpcs.xml b/phpcs.xml deleted file mode 100755 index a92f5e2..0000000 --- a/phpcs.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - src/ - - - - - Micro Framework - сode formatting rules. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/phpstan.neon.dist b/phpstan.neon.dist deleted file mode 100644 index 18d77f7..0000000 --- a/phpstan.neon.dist +++ /dev/null @@ -1,4 +0,0 @@ -parameters: - level: 7 - paths: - - src \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index 88daaff..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - tests/Unit - - - - - src/ - - src/Exception - src/HttpCorePlugin.php - - - - - - src - - - - - - - - - - - \ No newline at end of file diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index 99ad2c8..0000000 --- a/psalm.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/AppModeEnum.php b/src/AppModeEnum.php new file mode 100644 index 0000000..3005724 --- /dev/null +++ b/src/AppModeEnum.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Micro\Framework\Kernel; + +enum AppModeEnum: string +{ + case DEV = 'dev'; + case TEST = 'test'; + case PROD = 'prod'; + + /** + * @psalm-suppress PossiblyUnusedMethod + */ + public function isDev(): bool + { + return self::DEV === $this; + } + + /** + * @psalm-suppress PossiblyUnusedMethod + */ + public function isTest(): bool + { + return self::TEST === $this; + } + + public function isProd(): bool + { + return self::PROD === $this; + } + + /** + * @psalm-suppress PossiblyUnusedMethod + */ + public static function fromString(string $mode): self + { + $normalized = strtolower($mode); + + return match ($normalized) { + 'dev', 'development' => self::DEV, + 'test' => self::TEST, + 'prod', 'production' => self::PROD, + default => throw new \InvalidArgumentException("Unknown app mode: {$mode}"), + }; + } +} diff --git a/src/Kernel.php b/src/Kernel.php index f071524..4cfd236 100755 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -11,9 +11,24 @@ namespace Micro\Framework\Kernel; -use Micro\Component\DependencyInjection\Container; +use Micro\Component\DependencyInjection\Autowire\AutowireHelperFactory; +use Micro\Component\DependencyInjection\Autowire\AutowireHelperFactoryInterface; +use Micro\Component\DependencyInjection\ContainerCompiled; +use Micro\Component\DependencyInjection\ContainerInterface; +use Micro\Component\DependencyInjection\Proxy\ProxyBuilder; +use Micro\Component\DependencyInjection\Proxy\ProxyBuilderInterface; +use Micro\Component\DependencyInjection\Proxy\ProxyBuilderProductionDecorator; +use Micro\Component\DependencyInjection\Proxy\ProxyClassContentFactoryInterface; +use Micro\Component\DependencyInjection\Proxy\ProxyClassNameGenerator; +use Micro\Component\DependencyInjection\Proxy\ProxyClassNameGeneratorInterface; +use Micro\Component\DependencyInjection\Proxy\ProxyFactory; +use Micro\Component\DependencyInjection\Proxy\ProxyFileManager; +use Micro\Component\DependencyInjection\Proxy\ProxyFileManagerInterface; use Micro\Framework\Kernel\Plugin\PluginBootLoaderInterface; +/** + * @psalm-suppress ClassMustBeFinal + */ class Kernel implements KernelInterface { private bool $isStarted; @@ -28,21 +43,35 @@ class Kernel implements KernelInterface */ private array $pluginsLoaded; + private ContainerCompiled $container; + /** * @param class-string[] $applicationPluginCollection * @param PluginBootLoaderInterface[] $pluginBootLoaderCollection + * + * @psalm-suppress PossiblyUnusedMethod */ public function __construct( private readonly array $applicationPluginCollection, private array $pluginBootLoaderCollection, - private readonly Container $container + private readonly AppModeEnum $mode, + private readonly string $proxyNamespace = 'Micro\Proxy', + private readonly string $proxyFileDestination = 'var/proxy/micro_proxy.php', ) { $this->isStarted = false; $this->pluginsLoaded = []; $this->plugins = []; + $this->container = $this->createDefaultContainer(); + } + + #[\Override] + public function getMode(): AppModeEnum + { + return $this->mode; } + #[\Override] public function addBootLoader(PluginBootLoaderInterface $bootLoader): self { if ($this->isStarted) { @@ -54,6 +83,7 @@ public function addBootLoader(PluginBootLoaderInterface $bootLoader): self return $this; } + #[\Override] public function setBootLoaders(iterable $bootLoaders): self { $this->pluginBootLoaderCollection = []; @@ -65,9 +95,7 @@ public function setBootLoaders(iterable $bootLoaders): self return $this; } - /** - * {@inheritDoc} - */ + #[\Override] public function run(): void { if ($this->isStarted) { @@ -75,43 +103,53 @@ public function run(): void } $this->loadPlugins(); + $this->container->compile(); + $this->initializePlugins(); $this->isStarted = true; } - /** - * {@inheritDoc} - */ - public function container(): Container + #[\Override] + public function container(): ContainerInterface { return $this->container; } - /** - * {@inheritDoc} - */ + #[\Override] public function loadPlugin(string $applicationPluginClass): void { if (\in_array($applicationPluginClass, $this->pluginsLoaded, true)) { return; } + $autowireHelper = $this->autowireHelperFactory()->create(); + $this->container->register($applicationPluginClass, $autowireHelper->autowire($applicationPluginClass)); + $this->pluginsLoaded[] = $applicationPluginClass; + } - $plugin = new $applicationPluginClass(); + protected function initializePlugins(): void + { + foreach ($this->pluginsLoaded as $pluginClass) { + $this->initializePlugin($pluginClass); + } + } + /** + * @param class-string $pluginClass + */ + protected function initializePlugin(string $pluginClass): void + { + $plugin = $this->container->get($pluginClass); foreach ($this->pluginBootLoaderCollection as $bootLoader) { $bootLoader->boot($plugin); } $this->plugins[] = $plugin; - $this->pluginsLoaded[] = $applicationPluginClass; } - /** - * {@inheritDoc} - */ - public function plugins(string $interfaceInherited = null): \Traversable + #[\Override] + public function plugins(?string $interfaceInherited = null): \Traversable { foreach ($this->plugins as $plugin) { - if (!$interfaceInherited || ($plugin instanceof $interfaceInherited)) { + if (null === $interfaceInherited || ($plugin instanceof $interfaceInherited)) { yield $plugin; } } @@ -123,4 +161,73 @@ protected function loadPlugins(): void $this->loadPlugin($applicationPlugin); } } + + /** + * @psalm-suppress PossiblyUnusedMethod + */ + public function getContainer(): ContainerInterface + { + return $this->container; + } + + private function createDefaultContainer(): ContainerCompiled + { + $proxyClassNameGenerator = $this->createProxyClassNameGenerator(); + $proxyFileManager = $this->createProxyFileManager(); + $proxyClassContentFactory = $this->createProxyClassContentFactory(); + $classProxyBuilder = $this->createClassProxyBuilder($proxyClassContentFactory, $proxyFileManager); + + return new ContainerCompiled( + $proxyClassNameGenerator, + $classProxyBuilder + ); + } + + private function createClassProxyBuilder( + ProxyClassContentFactoryInterface $classContentFactory, + ProxyFileManagerInterface $proxyFileManager, + ): ProxyBuilderInterface { + $proxyBuilder = new ProxyBuilder( + $classContentFactory, + $proxyFileManager, + $this->proxyNamespace, + ); + + if (!$this->mode->isProd()) { + return $proxyBuilder; + } + + return new ProxyBuilderProductionDecorator( + $proxyBuilder, + $proxyFileManager, + ); + } + + private function autowireHelperFactory(): AutowireHelperFactoryInterface + { + return new AutowireHelperFactory( + $this->container, + ); + } + + private function createProxyClassNameGenerator(): ProxyClassNameGeneratorInterface + { + return new ProxyClassNameGenerator( + $this->proxyNamespace + ); + } + + private function createProxyClassContentFactory(): ProxyClassContentFactoryInterface + { + return new ProxyFactory( + $this->createProxyClassNameGenerator() + ); + } + + private function createProxyFileManager(): ProxyFileManagerInterface + { + return new ProxyFileManager( + $this->proxyFileDestination, + ); + } } diff --git a/src/KernelBuilder.php b/src/KernelBuilder.php deleted file mode 100755 index 64802be..0000000 --- a/src/KernelBuilder.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Micro\Framework\Kernel; - -use Micro\Component\DependencyInjection\Container; -use Micro\Framework\Kernel\Plugin\PluginBootLoaderInterface; -use Psr\Container\ContainerInterface; - -class KernelBuilder -{ - /** - * @var class-string[] - */ - private array $pluginCollection; - - /** - * @var PluginBootLoaderInterface[] - */ - private array $bootLoaderPluginCollection; - - private ?Container $container; - - public function __construct() - { - $this->pluginCollection = []; - $this->bootLoaderPluginCollection = []; - $this->container = null; - } - - /** - * @param class-string[] $applicationPluginCollection - * - * @return $this - */ - public function setApplicationPlugins(array $applicationPluginCollection): self - { - $this->pluginCollection = $applicationPluginCollection; - - return $this; - } - - /** - * @return $this - */ - public function addBootLoader(PluginBootLoaderInterface $bootLoader): self - { - $this->bootLoaderPluginCollection[] = $bootLoader; - - return $this; - } - - /** - * @param PluginBootLoaderInterface[] $bootLoaderCollection - * - * @return $this - */ - public function addBootLoaders(iterable $bootLoaderCollection): self - { - foreach ($bootLoaderCollection as $bootLoader) { - $this->addBootLoader($bootLoader); - } - - return $this; - } - - /** - * @param Container $container - * - * @return $this - */ - public function setContainer(ContainerInterface $container): self - { - $this->container = $container; - - return $this; - } - - protected function container(): Container - { - return $this->container ?? new Container(); - } - - /** - * @return Kernel - */ - public function build(): KernelInterface - { - return new Kernel( - $this->pluginCollection, - $this->bootLoaderPluginCollection, - $this->container(), - ); - } -} diff --git a/src/KernelInterface.php b/src/KernelInterface.php index 75b2d66..ecb9c4c 100755 --- a/src/KernelInterface.php +++ b/src/KernelInterface.php @@ -12,6 +12,7 @@ namespace Micro\Framework\Kernel; use Micro\Component\DependencyInjection\Container; +use Micro\Component\DependencyInjection\ContainerInterface; use Micro\Framework\Kernel\Plugin\PluginBootLoaderInterface; /** @@ -19,15 +20,27 @@ */ interface KernelInterface { + /** + * Application mode (dev, prod, test) + * + * @psalm-suppress PossiblyUnusedMethod + */ + public function getMode(): AppModeEnum; + /** * Get service Dependency Injection Container. * * @api + * + * @psalm-suppress PossiblyUnusedMethod */ - public function container(): Container; + public function container(): ContainerInterface; /** * @throws \RuntimeException + * + * @psalm-suppress PossiblyUnusedMethod + * @psalm-suppress PossiblyUnusedReturnValue */ public function addBootLoader(PluginBootLoaderInterface $bootLoader): self; @@ -35,6 +48,9 @@ public function addBootLoader(PluginBootLoaderInterface $bootLoader): self; * @param iterable $bootLoaders * * @throws \RuntimeException + * + * @psalm-suppress PossiblyUnusedReturnValue + * @psalm-suppress PossiblyUnusedMethod */ public function setBootLoaders(iterable $bootLoaders): self; @@ -56,11 +72,10 @@ public function loadPlugin(string $applicationPluginClass): void; * @template T of object * * @psalm-param class-string|null $interfaceInherited if empty, each connected plugin will be iterated - * * @return \Traversable Application plugins iterator * * @api */ - public function plugins(string $interfaceInherited = null): \Traversable; + public function plugins(?string $interfaceInherited = null): \Traversable; } diff --git a/tests/Unit/KernelBuilderTest.php b/tests/Unit/KernelBuilderTest.php deleted file mode 100644 index ce7fb2d..0000000 --- a/tests/Unit/KernelBuilderTest.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Micro\Framework\Kernel\Test\Unit; - -use Micro\Component\DependencyInjection\Container; -use Micro\Framework\Kernel\KernelBuilder; -use Micro\Framework\Kernel\KernelInterface; -use Micro\Framework\Kernel\Plugin\PluginBootLoaderInterface; -use PHPUnit\Framework\TestCase; - -class KernelBuilderTest extends TestCase -{ - private KernelBuilder $builder; - - protected function setUp(): void - { - $this->builder = new KernelBuilder(); - } - - public function testBuildWithoutContainer() - { - $kernel = $this->builder - ->setApplicationPlugins([]) - ->build(); - - $this->assertInstanceOf(KernelInterface::class, $kernel); - } - - public function testBuildWithContainer() - { - $container = new Container(); - - $kernel = $this->builder - ->setApplicationPlugins([]) - ->setContainer($container) - ->build(); - - $this->assertInstanceOf(KernelInterface::class, $kernel); - $this->assertEquals($container, $kernel->container()); - } - - public function testBootLoaders() - { - $kernel = $this->builder - ->setApplicationPlugins([ - \stdClass::class, - ]) - ->addBootLoaders([ - $this->createBootLoader(), - $this->createBootLoader(), - ]) - ->addBootLoader($this->createBootLoader()) - ->build() - ; - - $kernel->run(); - } - - protected function createBootLoader() - { - $bl = $this->createMock(PluginBootLoaderInterface::class); - $bl - ->expects($this->once()) - ->method('boot'); - - return $bl; - } -} diff --git a/tests/Unit/KernelTest.php b/tests/Unit/KernelTest.php index 8298e8c..a583cf9 100644 --- a/tests/Unit/KernelTest.php +++ b/tests/Unit/KernelTest.php @@ -14,11 +14,14 @@ namespace Micro\Framework\Kernel\Test\Unit; use Micro\Component\DependencyInjection\Container; +use Micro\Framework\Kernel\AppModeEnum; use Micro\Framework\Kernel\Kernel; use Micro\Framework\Kernel\KernelInterface; use Micro\Framework\Kernel\Plugin\PluginBootLoaderInterface; use PHPUnit\Framework\TestCase; +require_once __DIR__.'/PluginClasses.php'; + class KernelTest extends TestCase { private KernelInterface $kernel; @@ -27,10 +30,10 @@ class KernelTest extends TestCase protected function setUp(): void { - $plugins = []; - for ($i = 0; $i < 3; ++$i) { - $plugins[] = \stdClass::class; - } + $plugins = [ + \PluginClassHasDependencies::class, + \PluginClassDefault::class, + ]; $bootLoaders = []; for ($i = 0; $i < 3; ++$i) { @@ -42,12 +45,10 @@ protected function setUp(): void $bootLoaders[] = $bootLoader; } - $this->container = new Container(); - $this->kernel = new Kernel( $plugins, [], - $this->container, + AppModeEnum::TEST, ); $this->kernel->setBootLoaders($bootLoaders); @@ -64,12 +65,8 @@ public function testExceptionWhenTryBootloaderInstallAfterKernelRun() public function testKernelPlugins() { - foreach ($this->kernel->plugins(\stdClass::class) as $plugin) { - $this->assertInstanceOf(\stdClass::class, $plugin); - } - - foreach ($this->kernel->plugins() as $plugin) { - $this->assertInstanceOf(\stdClass::class, $plugin); + foreach ($this->kernel->plugins(\PluginClassDefault::class) as $plugin) { + $this->assertInstanceOf(\PluginClassDefault::class, $plugin); } } @@ -81,7 +78,7 @@ public function testRunAgain() [ [], [], - new Container(), + AppModeEnum::TEST, ] ) ->onlyMethods([ @@ -96,9 +93,4 @@ public function testRunAgain() $kernel->run(); $kernel->run(); } - - public function testContainer() - { - $this->assertEquals($this->container, $this->kernel->container()); - } } diff --git a/tests/Unit/PluginClasses.php b/tests/Unit/PluginClasses.php new file mode 100644 index 0000000..378b81d --- /dev/null +++ b/tests/Unit/PluginClasses.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +readonly class PluginClassDefault +{ + public function run(): string + { + return __CLASS__; + } +} + +readonly class PluginClassHasDependencies +{ + public function __construct( + private PluginClassDefault $default, + ) { + } + + public function run(): string + { + return $this->default->run().' '.__CLASS__; + } +} From 55de0be8ccb9c8f070b1f9d24bf44aa9894bb22b Mon Sep 17 00:00:00 2001 From: Stanislau Komar Date: Tue, 23 Sep 2025 18:39:02 +0400 Subject: [PATCH 2/6] v1.7.0 github CI --- .github/workflows/ci.yaml | 4 ++-- src/KernelInterface.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e54001a..277830f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: # normal, highest, non-dev installs - php-version: [ '8.2' ] + php-version: [ '8.4' ] dependency-versions: [ 'highest' ] include: # testing lowest PHP version with the lowest dependencies @@ -25,7 +25,7 @@ jobs: # dependency-versions: 'lowest' # testing dev versions with the highest PHP - - php-version: '8.2' + - php-version: '8.4' dependency-versions: 'highest' steps: diff --git a/src/KernelInterface.php b/src/KernelInterface.php index ecb9c4c..18b3e96 100755 --- a/src/KernelInterface.php +++ b/src/KernelInterface.php @@ -21,7 +21,7 @@ interface KernelInterface { /** - * Application mode (dev, prod, test) + * Application mode (dev, prod, test). * * @psalm-suppress PossiblyUnusedMethod */ From f36c5cb2da7d91de076c833b7dfb4622f6b333f7 Mon Sep 17 00:00:00 2001 From: Stanislau Komar Date: Tue, 23 Sep 2025 18:46:39 +0400 Subject: [PATCH 3/6] v1.7.0 Fix github ci --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 277830f..98eeb5f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,7 +35,7 @@ jobs: - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: - coverage: "none" + coverage: "xdebug" php-version: "${{ matrix.php-version }}" - name: "Composer install" From 4bbdf189cfc10a03c9673c9a9c77c4e7a4bbbe3d Mon Sep 17 00:00:00 2001 From: Stanislau Komar Date: Tue, 23 Sep 2025 18:50:07 +0400 Subject: [PATCH 4/6] v1.7.0 Fix unit --- tests/Unit/var/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/Unit/var/.gitkeep diff --git a/tests/Unit/var/.gitkeep b/tests/Unit/var/.gitkeep new file mode 100644 index 0000000..e69de29 From 702ff90030de255d685355255a87663e6988a97e Mon Sep 17 00:00:00 2001 From: Stanislau Komar Date: Tue, 23 Sep 2025 18:51:03 +0400 Subject: [PATCH 5/6] v1.7.0 Fix unit --- tests/Unit/var/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/Unit/var/.gitignore diff --git a/tests/Unit/var/.gitignore b/tests/Unit/var/.gitignore new file mode 100644 index 0000000..333797b --- /dev/null +++ b/tests/Unit/var/.gitignore @@ -0,0 +1 @@ +micro_proxy.php \ No newline at end of file From 0a500371dfddc94b853c13cc52ef679657096c45 Mon Sep 17 00:00:00 2001 From: Stanislau Komar Date: Tue, 23 Sep 2025 18:52:58 +0400 Subject: [PATCH 6/6] v1.7.0 Fix unit --- .github/workflows/ci.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 98eeb5f..2635813 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,12 +47,12 @@ jobs: - name: Run tests run: composer run test - - name: Coverage report - run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage.xml - - - name: Upload coverage reports to Codecov - run: | - # Replace `linux` below with the appropriate OS - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov -t ${CODECOV_TOKEN} \ No newline at end of file +# - name: Coverage report +# run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage.xml + +# - name: Upload coverage reports to Codecov +# run: | +# # Replace `linux` below with the appropriate OS +# curl -Os https://uploader.codecov.io/latest/linux/codecov +# chmod +x codecov +# ./codecov -t ${CODECOV_TOKEN} \ No newline at end of file