Skip to content

Commit 6d08c04

Browse files
authored
Fix build integration tests (mglaman#836)
* Fix build integration tests * phpstan 1.12 * make sure phpstan is also updated * try a fix for core_baseline * try a fix * try a fix * try again for baseline * try again * typo * try ^1? * remove baseline * 11.1
1 parent ffeb015 commit 6d08c04

File tree

2 files changed

+4
-59
lines changed

2 files changed

+4
-59
lines changed

.github/workflows/php.yml

Lines changed: 3 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
drupal: "^9.0"
9494
experimental: false
9595
- php-version: "8.3"
96-
drupal: "11.x-dev"
97-
experimental: true
96+
drupal: "~11.1"
97+
experimental: false
9898
steps:
9999
- name: "Checkout"
100100
uses: "actions/checkout@v4"
@@ -121,7 +121,7 @@ jobs:
121121
- name: "require phpstan-drupal"
122122
run: |
123123
cd ~/drupal
124-
COMPOSER_MEMORY_LIMIT=-1 composer require mglaman/phpstan-drupal "${{ steps.branch_alias.outputs.VERSION_ALIAS }} as 1.2.99" phpstan/extension-installer --with-all-dependencies
124+
COMPOSER_MEMORY_LIMIT=-1 composer require phpstan/phpstan:"^1" mglaman/phpstan-drupal "${{ steps.branch_alias.outputs.VERSION_ALIAS }} as 1.99.99" phpstan/extension-installer --with-all-dependencies
125125
cp $GITHUB_WORKSPACE/tests/fixtures/config/drupal-phpstan.neon phpstan.neon
126126
- name: "Test core/install.php"
127127
run: |
@@ -203,58 +203,3 @@ jobs:
203203
run: |
204204
cd ~/drupal
205205
./vendor/bin/phpstan analyze web/core/modules/dynamic_page_cache --debug
206-
207-
core_baseline:
208-
needs:
209-
- lint
210-
- tests
211-
continue-on-error: true
212-
runs-on: "ubuntu-latest"
213-
name: "Drupal core HEAD baseline check"
214-
steps:
215-
- name: "Checkout"
216-
uses: "actions/checkout@v4"
217-
- name: "set the version alias for self"
218-
run: |
219-
if [ "${{ github.event_name }}" == 'pull_request' ]; then
220-
echo "VERSION_ALIAS=dev-"${{ github.sha }}"" >> $GITHUB_OUTPUT
221-
else
222-
echo "VERSION_ALIAS=dev-main" >> $GITHUB_OUTPUT
223-
fi
224-
id: branch_alias
225-
- name: determine phpstan cache directory
226-
run: echo PHPSTAN_TMP_DIR=$(php -r "print sys_get_temp_dir() . '/phpstan';") >> $GITHUB_OUTPUT
227-
id: phpstan_tmp_dir
228-
- name: cache phpstan
229-
uses: actions/cache@v4
230-
with:
231-
path: ${{ steps.phpstan_tmp_dir.outputs.PHPSTAN_TMP_DIR }}
232-
key: ${{ runner.os }}-phpstan-core-baseline
233-
restore-keys: ${{ runner.os }}-phpstan-core-baseline
234-
- name: "Install PHP"
235-
uses: "shivammathur/setup-php@v2"
236-
with:
237-
coverage: "none"
238-
php-version: "8.3"
239-
tools: composer:v2
240-
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, gd, apcu
241-
- name: "Checkout Drupal core"
242-
run: |
243-
cd ${{ runner.temp }}
244-
git clone https://git.drupalcode.org/project/drupal.git
245-
cd drupal
246-
composer config repositories.0 composer https://packages.drupal.org/8
247-
composer config repositories.1 path $GITHUB_WORKSPACE
248-
249-
- name: "Install Drupal core dependencies"
250-
uses: "ramsey/composer-install@v3"
251-
with:
252-
working-directory: "${{ runner.temp }}/drupal"
253-
- name: "require phpstan-drupal"
254-
run: |
255-
cd ${{ runner.temp }}/drupal
256-
composer require --dev mglaman/phpstan-drupal "${{ steps.branch_alias.outputs.VERSION_ALIAS }} as 1.1.99" --with-all-dependencies
257-
- name: "Check baseline"
258-
run: |
259-
cd ${{ runner.temp }}/drupal
260-
./vendor/bin/phpstan analyze --configuration=core/phpstan.neon.dist

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^8.1",
14-
"phpstan/phpstan": "^1.10.56",
14+
"phpstan/phpstan": "^1.12",
1515
"phpstan/phpstan-deprecation-rules": "^1.1.4",
1616
"symfony/finder": "^4.2 || ^5.0 || ^6.0 || ^7.0",
1717
"symfony/yaml": "^4.2|| ^5.0 || ^6.0 || ^7.0",

0 commit comments

Comments
 (0)