Skip to content

Commit d4d7e11

Browse files
committed
Fix referencing %env% in includes
1 parent 948f79d commit d4d7e11

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

.github/workflows/e2e-tests.yml

+4
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ jobs:
243243
echo "$OUTPUT"
244244
../bashunit -a matches "Note: Using configuration file .+phpstan.neon." "$OUTPUT"
245245
../bashunit -a contains 'Result cache not used because the metadata do not match: metaExtensions' "$OUTPUT"
246+
- script: |
247+
cd e2e/bug-12606
248+
export CONFIGTEST=test
249+
../../bin/phpstan
246250
247251
steps:
248252
- name: "Checkout"

e2e/bug-12606/phpstan.neon

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
includes:
2+
- %env.CONFIGTEST%.neon

e2e/bug-12606/src/empty.php

Whitespace-only changes.

e2e/bug-12606/test.neon

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 8
3+
paths:
4+
- src

e2e/bug-12606/test.php

Whitespace-only changes.

src/DependencyInjection/ContainerFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ public function create(
136136
'generateBaselineFile' => $generateBaselineFile,
137137
'usedLevel' => $usedLevel,
138138
'cliAutoloadFile' => $cliAutoloadFile,
139+
'env' => getenv(),
139140
]);
140141
$configurator->addDynamicParameters([
141142
'analysedPaths' => $analysedPaths,
142143
'analysedPathsFromConfig' => $analysedPathsFromConfig,
143-
'env' => getenv(),
144144
]);
145145
$configurator->addConfig($this->configDirectory . '/config.neon');
146146
foreach ($additionalConfigFiles as $additionalConfigFile) {

0 commit comments

Comments
 (0)