diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 71dd9d5b8..f5cbeebaa 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -1,4 +1,4 @@ -name: PHP-CS-Fixer +name: Rector on: push: @@ -9,7 +9,7 @@ on: jobs: php-cs-fixer: - name: Validation + name: Rector runs-on: [ubuntu-latest] steps: diff --git a/.github/workflows/test-magento-open-source.yml b/.github/workflows/test-magento-open-source.yml index f393f8c2b..d56c901bd 100644 --- a/.github/workflows/test-magento-open-source.yml +++ b/.github/workflows/test-magento-open-source.yml @@ -68,7 +68,7 @@ jobs: run: echo "N98_MAGERUN_TEST_MAGENTO_ROOT=${{ github.workspace }}/magento" >> $GITHUB_ENV - name: Run tests - run: php -f vendor/bin/phpunit + run: php vendor/bin/phpunit --configuration .phpunit.dist.xml env: COMPOSER_VENDOR_PATH : "${{ github.workspace }}/magento/vendor" diff --git a/.github/workflows/test-openmage-20.0.yml b/.github/workflows/test-openmage-20.0.yml index 323356871..b6dd5ff60 100644 --- a/.github/workflows/test-openmage-20.0.yml +++ b/.github/workflows/test-openmage-20.0.yml @@ -75,7 +75,7 @@ jobs: run: echo "N98_MAGERUN_TEST_MAGENTO_ROOT=${{ github.workspace }}/magento" >> $GITHUB_ENV - name: Run tests - run: php -f vendor/bin/phpunit + run: php vendor/bin/phpunit --configuration .phpunit.dist.xml env: COMPOSER_VENDOR_PATH : "${{ github.workspace }}/magento/vendor" diff --git a/.github/workflows/test-openmage-20.1.yml b/.github/workflows/test-openmage-20.1.yml index dfef9d51f..86594118b 100644 --- a/.github/workflows/test-openmage-20.1.yml +++ b/.github/workflows/test-openmage-20.1.yml @@ -76,7 +76,7 @@ jobs: run: echo "N98_MAGERUN_TEST_MAGENTO_ROOT=${{ github.workspace }}/magento" >> $GITHUB_ENV - name: Run tests - run: php -f vendor/bin/phpunit + run: php vendor/bin/phpunit --configuration .phpunit.dist.xml env: COMPOSER_VENDOR_PATH : "${{ github.workspace }}/magento/vendor" diff --git a/.github/workflows/test-openmage-20.10.yml b/.github/workflows/test-openmage-20.10.yml index 5fc8e380c..73462ee69 100644 --- a/.github/workflows/test-openmage-20.10.yml +++ b/.github/workflows/test-openmage-20.10.yml @@ -76,7 +76,7 @@ jobs: run: echo "N98_MAGERUN_TEST_MAGENTO_ROOT=${{ github.workspace }}/magento" >> $GITHUB_ENV - name: Run tests - run: php -f vendor/bin/phpunit + run: php vendor/bin/phpunit --configuration .phpunit.dist.xml env: COMPOSER_VENDOR_PATH : "${{ github.workspace }}/magento/vendor" diff --git a/.php_cs b/.php_cs deleted file mode 100644 index f90b5638c..000000000 --- a/.php_cs +++ /dev/null @@ -1,23 +0,0 @@ -in(__DIR__ . '/src') - ->in(__DIR__ . '/tests') -; - -return PhpCsFixer\Config::create() - ->setFinder($finder) - ->setRules([ - '@PSR2' => true, - 'include' => true, - 'no_leading_import_slash' => true, - 'no_extra_consecutive_blank_lines' => true, - 'no_leading_namespace_whitespace' => true, - 'no_multiline_whitespace_around_double_arrow' => true, - 'no_unused_imports' => true, - 'no_whitespace_in_blank_line' => true, - 'ordered_imports' => true, - 'standardize_not_equals' => true, - 'ternary_operator_spaces' => true, - ]) -; diff --git a/src/N98/Magento/Command/System/Setup/RemoveCommand.php b/src/N98/Magento/Command/System/Setup/RemoveCommand.php index 57b4dfab7..fb4727423 100644 --- a/src/N98/Magento/Command/System/Setup/RemoveCommand.php +++ b/src/N98/Magento/Command/System/Setup/RemoveCommand.php @@ -62,13 +62,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int public function removeSetupResource(string $moduleName, string $setupResource, OutputInterface $output): void { - $mageCoreModelAbstract = $this->getMageCoreResource(); - $writeAdapter = $mageCoreModelAbstract->getConnection('core_write'); + $mageCoreModelResource = $this->getMageCoreResource(); + $writeAdapter = $mageCoreModelResource->getConnection('core_write'); if (!$writeAdapter) { throw new RuntimeException('Database not configured'); } - $table = $mageCoreModelAbstract->getTableName('core_resource'); + $table = $mageCoreModelResource->getTableName('core_resource'); if ($writeAdapter->delete($table, ['code = ?' => $setupResource]) > 0) { $output->writeln( diff --git a/tests/N98/Util/AutoloadHandlerTest.php b/tests/N98/Util/AutoloadHandlerTest.php index c046e66eb..2950ac49e 100644 --- a/tests/N98/Util/AutoloadHandlerTest.php +++ b/tests/N98/Util/AutoloadHandlerTest.php @@ -11,7 +11,7 @@ /** * Class AutoloadHandlerTest * - * @covers \N98\Util\AutoloadHandler + * @covers AutoloadHandler * @package N98\Util * * @author Tom Klingenberg @@ -40,7 +40,7 @@ public function testCreation() public function testNoRegistrationOnCreation() { $this->expectException(Error::class); - $this->expectExceptionMessage('Typed property N98\Util\AutoloadHandler::$splRegistered must not be accessed before initialization'); + $this->expectExceptionMessage('Typed property ' . AutoloadHandler::class . '::$splRegistered must not be accessed before initialization'); $handler = $this->create(null, AutoloadHandler::NO_AUTO_REGISTER); $handler->disable(); // assertions require a disabled handler b/c of exceptions