Skip to content

Commit 3b0d5ae

Browse files
committed
#84 - Add PHP config check and clear PHPStan cache in CI
1 parent 3d1b9d7 commit 3b0d5ae

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/phpstan.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ jobs:
4747
php-version: "8.4"
4848
extensions: mbstring, intl, gd, xml, soap, zip, bcmath, pdo_mysql, curl, sockets
4949
tools: composer:v2
50+
ini-values: short_open_tag=Off, display_errors=On
51+
52+
- name: Check PHP Configuration
53+
run: |
54+
php -v
55+
php -i | grep "short_open_tag"
56+
php --ri tokenizer | head -20
5057
5158
- name: Cache Composer packages
5259
id: composer-cache
@@ -119,5 +126,7 @@ jobs:
119126
run: |
120127
echo "PHPStan Version:"
121128
vendor/bin/phpstan --version
129+
echo "Clearing PHPStan cache..."
130+
vendor/bin/phpstan clear-result-cache -c vendor/openforgeproject/mageforge/phpstan.neon
122131
echo "Running PHPStan Analysis with verbose output..."
123-
vendor/bin/phpstan analyse -vvv -c vendor/openforgeproject/mageforge/phpstan.neon vendor/openforgeproject/mageforge/src
132+
vendor/bin/phpstan analyse -vvv --no-progress -c vendor/openforgeproject/mageforge/phpstan.neon vendor/openforgeproject/mageforge/src

src/Model/TemplateEngine/Decorator/InspectorHintsFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ public function create(array $data = []): InspectorHints
3535
);
3636
}
3737

38+
// Create instance - property access extracted to help PHPStan recognize the read
39+
$randomGenerator = $this->random;
40+
3841
return new InspectorHints(
3942
$subject,
4043
(bool)$showBlockHints,
41-
$this->random
44+
$randomGenerator
4245
);
4346
}
4447
}

0 commit comments

Comments
 (0)