diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8f67766b..39b439c9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,13 +37,19 @@ jobs: - name: "Checkout code" uses: actions/checkout@v4 - - name: "Install PHP with extensions" + - name: "Install PHP" uses: shivammathur/setup-php@v2 with: coverage: "none" php-version: ${{ matrix.php }} tools: composer:${{ matrix.composer }} + - if: matrix.php == '7.1' + name: "Lint PHP files" + run: | + find src/ -name '*.php' | xargs -n1 php -l + find tests/ -name '*.php' | xargs -n1 php -l + - name: "Validate composer.json" run: "composer validate --strict --no-check-lock" @@ -71,7 +77,3 @@ jobs: fi - run: vendor/bin/simple-phpunit - - - if: matrix.php == '7.1' - name: "Lint PHP files" - run: find src/ -name '*.php' | xargs -n1 php -l diff --git a/tests/Configurator/AddLinesConfiguratorTest.php b/tests/Configurator/AddLinesConfiguratorTest.php index b9cb5516..43306947 100644 --- a/tests/Configurator/AddLinesConfiguratorTest.php +++ b/tests/Configurator/AddLinesConfiguratorTest.php @@ -142,7 +142,7 @@ public function testLinesAddedAfterTarget() // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) .enableStimulusBridge('./assets/controllers.json') -EOF, +EOF ], ]); @@ -191,7 +191,7 @@ public function testSkippedIfTargetCannotBeFound() 'content' => << [ @@ -391,7 +391,7 @@ public function getUnconfigureTests() import './bootstrap'; console.log(Turbo); -EOF, +EOF ]; yield 'found_bottom' => [ @@ -407,7 +407,7 @@ public function getUnconfigureTests() import * as Turbo from '@hotwired/turbo'; import './bootstrap'; -EOF, +EOF ]; yield 'not_found' => [ @@ -424,7 +424,7 @@ public function getUnconfigureTests() import './bootstrap'; console.log(Turbo); -EOF, +EOF ]; yield 'found_twice_in_file' => [ @@ -442,7 +442,7 @@ public function getUnconfigureTests() import './bootstrap'; console.log(Turbo); -EOF, +EOF ]; } @@ -535,7 +535,7 @@ public function getUpdateTests() console.log('bootstrap.js'); console.log('on the bottom'); -EOF, +EOF ], ]; diff --git a/tests/Update/DiffHelperTest.php b/tests/Update/DiffHelperTest.php index 3e928b59..5ee97602 100644 --- a/tests/Update/DiffHelperTest.php +++ b/tests/Update/DiffHelperTest.php @@ -118,7 +118,7 @@ public function getRemoveFilesFromPatchTests(): iterable -# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db" -# For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8" # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml -EOF, +EOF ], ]; @@ -169,7 +169,7 @@ public function getRemoveFilesFromPatchTests(): iterable + #server_version: '13' orm: auto_generate_proxy_classes: true -EOF, +EOF ], ]; @@ -220,7 +220,7 @@ public function getRemoveFilesFromPatchTests(): iterable + dbal: + # "TEST_TOKEN" is typically set by ParaTest + dbname_suffix: '_test%env(default::TEST_TOKEN)%' -EOF, +EOF ], ]; @@ -273,7 +273,7 @@ public function getRemoveFilesFromPatchTests(): iterable + #server_version: '13' orm: auto_generate_proxy_classes: true -EOF, +EOF ], ]; @@ -328,7 +328,7 @@ public function getRemoveFilesFromPatchTests(): iterable - type: pool - pool: doctrine.system_cache_pool query_cache_driver: -EOF, +EOF ], ]; } diff --git a/tests/Update/RecipePatcherTest.php b/tests/Update/RecipePatcherTest.php index c4f76207..53212d96 100644 --- a/tests/Update/RecipePatcherTest.php +++ b/tests/Update/RecipePatcherTest.php @@ -103,7 +103,7 @@ public function getGeneratePatchTests(): iterable \ No newline at end of file +Updated file2 \ No newline at end of file -EOF, +EOF ]; yield 'file_created_in_update_because_missing' => [ @@ -118,7 +118,7 @@ public function getGeneratePatchTests(): iterable @@ -0,0 +1 @@ +New file \ No newline at end of file -EOF, +EOF ]; yield 'file_created_in_update_because_null' => [ @@ -133,7 +133,7 @@ public function getGeneratePatchTests(): iterable @@ -0,0 +1 @@ +New file \ No newline at end of file -EOF, +EOF ]; yield 'file_deleted_in_update_because_missing' => [ @@ -491,7 +491,7 @@ private function getFilesForPatching(string $projectPath = ''): array # For an SQL-HEAVY database, use: "sqlheavy:///%kernel.project_dir%/var/data.db" DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db ###< doctrine/doctrine-bundle ### -EOF, +EOF ], // package.json @@ -536,7 +536,7 @@ private function getFilesForPatching(string $projectPath = ''): array "@symfony/webpack-encore": "^1.7.0" } } -EOF, +EOF ], // config/packages/webpack_encore.yaml @@ -557,7 +557,7 @@ private function getFilesForPatching(string $projectPath = ''): array output_path: '%kernel.project_dir%/public/build' # If multiple builds are defined (as shown below), you can disable the default build: # output_path: false -EOF, +EOF ], // config/packages/security.yaml