You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/e2e-tests.yml
+31-2Lines changed: 31 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,16 @@ jobs:
140
140
OUTPUT=$(../../bin/phpstan -vvv 2>&1)
141
141
echo "$OUTPUT"
142
142
../bashunit -a contains 'Result cache restored. 0 files will be reanalysed.' "$OUTPUT"
143
+
- script: |
144
+
cd e2e/result-cache-11
145
+
echo -n > phpstan-baseline.neon
146
+
../../bin/phpstan -vvv
147
+
patch -b src/Coll.php < patch-1.patch
148
+
cat baseline-1.neon > phpstan-baseline.neon
149
+
../../bin/phpstan -vvv
150
+
mv src/Coll.php.orig src/Coll.php
151
+
echo -n > phpstan-baseline.neon
152
+
../../bin/phpstan -vvv
143
153
- script: |
144
154
cd e2e/bug-14514
145
155
composer install
@@ -842,7 +852,7 @@ jobs:
842
852
composer update test/logger --no-cache
843
853
OUTPUT=$(../bashunit -a exit_code "0" "../../bin/phpstan analyse -vv")
844
854
echo "$OUTPUT"
845
-
../bashunit -a contains 'Composer packages changed (test/logger); re-analysing only the files depending on them.' "$OUTPUT"
855
+
../bashunit -a contains 'Composer packages changed (test/logger); re-analysing the files depending on them and the files with errors.' "$OUTPUT"
846
856
../bashunit -a contains 'Result cache restored. 1 file will be reanalysed.' "$OUTPUT"
847
857
- script: |
848
858
cd e2e/result-cache-path-repository
@@ -853,7 +863,7 @@ jobs:
853
863
composer update psr/log --no-cache
854
864
OUTPUT=$(../bashunit -a exit_code "0" "../../bin/phpstan analyse -vv")
855
865
echo "$OUTPUT"
856
-
../bashunit -a contains 'Composer packages changed (psr/log); re-analysing only the files depending on them.' "$OUTPUT"
866
+
../bashunit -a contains 'Composer packages changed (psr/log); re-analysing the files depending on them and the files with errors.' "$OUTPUT"
857
867
../bashunit -a contains 'Result cache restored. 1 file will be reanalysed.' "$OUTPUT"
858
868
# Editing a file of an installed package is not a valid thing to do - the next Composer
859
869
# command overwrites it - so PHPStan does not track it and keeps the cached results, even
@@ -965,6 +975,25 @@ jobs:
965
975
OUTPUT=$(../bashunit -a exit_code "0" "../../bin/phpstan analyse -vv --error-format raw")
966
976
echo "$OUTPUT"
967
977
../bashunit -a not_contains 'is not a file or it does not exist' "$OUTPUT"
978
+
- script: |
979
+
cd e2e/result-cache-vendor-class-appears
980
+
composer install
981
+
# The class does not exist yet, and an error about a class that does not exist records no
982
+
# dependency on anything - there is no file to point at.
983
+
OUTPUT=$(../bashunit -a exit_code "1" "../../bin/phpstan analyse -vv --error-format raw")
984
+
echo "$OUTPUT"
985
+
../bashunit -a contains 'Foo.php:10:Parameter $logger of method ResultCacheE2EVendorClassAppears\Foo::doFoo() has invalid type Psr\Log\PluginProvidedLogger.' "$OUTPUT"
986
+
# Composer updates the package, and a plugin writes the class into it on the way - which is
987
+
# what phpstan/phpstan#15164 is about. Nothing the cache knows about points at that file,
988
+
# so the files with errors have to be re-analysed on a package change; otherwise the error
989
+
# stands while a run from a cleared cache reports nothing.
0 commit comments