diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd99a6a..7ee32d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,10 @@ jobs: test: needs: build runs-on: ubuntu-latest + strategy: + matrix: + symfony-version: ['^7.0', '^8.0'] + name: test (Symfony ${{ matrix.symfony-version }}) steps: - uses: actions/checkout@v4 @@ -91,8 +95,15 @@ jobs: php-version: '8.4' extensions: intl, zip + - name: Require Symfony ${{ matrix.symfony-version }} + run: | + composer require \ + symfony/console:${{ matrix.symfony-version }} \ + symfony/filesystem:${{ matrix.symfony-version }} \ + --no-update --no-interaction + - name: Install dependencies - run: composer install --prefer-dist --no-progress + run: composer update --prefer-dist --no-progress - name: Run tests run: vendor/bin/phpunit --testdox diff --git a/phpstan.neon b/phpstan.neon index 7d4449f..1cf5cab 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,6 +3,8 @@ parameters: paths: - src - tests + bootstrapFiles: + - vendor/autoload.php excludePaths: - tests/bootstrap.php diff --git a/src/Application.php b/src/Application.php index cdec268..5f6348b 100644 --- a/src/Application.php +++ b/src/Application.php @@ -24,10 +24,15 @@ final class Application extends BaseApplication public function __construct() { parent::__construct(self::NAME, self::VERSION); - - $this->addCommand(new InitCommand()); - $this->addCommand(new CiUpdateCommand()); - $this->addCommand(new CiAddCommand()); $this->setDefaultCommand('init'); } + + protected function getDefaultCommands(): array + { + return array_merge(parent::getDefaultCommands(), [ + new InitCommand(), + new CiUpdateCommand(), + new CiAddCommand(), + ]); + } }