File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 coverage : none
2424 tools : composer
2525 - run : (cd bench/project && composer install -q --no-interaction)
26- - name : phar as Composer installed it
27- run : php -d opcache.enable_cli=1 -d opcache.validate_timestamps=1 -d opcache.file_update_protection=0 -d opcache.max_file_size=0 probe/mtime.php bench/project/vendor/phpstan/phpstan/phpstan.phar
28- - name : default file_update_protection
29- run : php -d opcache.enable_cli=1 -d opcache.validate_timestamps=1 probe/mtime.php bench/project/vendor/phpstan/phpstan/phpstan.phar
30- - name : phar file dates
31- run : ls -la --time-style=full-iso bench/project/vendor/phpstan/phpstan/ 2>/dev/null || ls -laT bench/project/vendor/phpstan/phpstan/
26+ - name : Inside PHPStan, stock / timestamps off / timestamps on
27+ run : |
28+ PKG=bench/project/vendor/phpstan/phpstan
29+ mkdir -p "$RUNNER_TEMP/fc0" "$RUNNER_TEMP/fcv"
30+ for arm in stock fc0 fcv; do cp -R $PKG "$RUNNER_TEMP/arm-$arm"; done
31+ php -d phar.readonly=0 bench/make-arm.php "$RUNNER_TEMP/arm-fc0/phpstan.phar" sha512 "$RUNNER_TEMP/fc0"
32+ php -d phar.readonly=0 bench/make-arm.php "$RUNNER_TEMP/arm-fcv/phpstan.phar" sha512 "$RUNNER_TEMP/fcv" vts
33+ cd probe/proj
34+ for arm in stock fc0 fcv; do for run in 1 2; do
35+ echo "== $arm run $run"
36+ php "$RUNNER_TEMP/arm-$arm/phpstan.phar" analyse -c phpstan.neon --debug --no-progress 2>&1 | grep PROBE || true
37+ done; done
38+ find "$RUNNER_TEMP/fcv" -name '*.bin' | wc -l
Original file line number Diff line number Diff line change 1+ <?php
2+ $ f = (new ReflectionClass (\PHPStan \Analyser \MutatingScope::class))->getFileName ();
3+ $ st = opcache_get_status (true );
4+ $ phar = 0 ; $ plain = 0 ;
5+ foreach ($ st ['scripts ' ] ?? [] as $ path => $ _ ) { str_starts_with ($ path , 'phar:// ' ) ? $ phar ++ : $ plain ++; }
6+ fwrite (STDERR , 'PROBE ' . json_encode ([
7+ 'os ' => PHP_OS , 'file ' => $ f ,
8+ 'stat_mtime ' => @stat ($ f )['mtime ' ] ?? null ,
9+ 'filemtime ' => @filemtime ($ f ),
10+ 'is_cached ' => opcache_is_script_cached ($ f ),
11+ 'shm_scripts_phar ' => $ phar , 'shm_scripts_plain ' => $ plain ,
12+ 'vts ' => ini_get ('opcache.validate_timestamps ' ), 'fc ' => ini_get ('opcache.file_cache ' ),
13+ 'turbo ' => extension_loaded ('phpstan_turbo ' ),
14+ 'wrappers ' => stream_get_wrappers (),
15+ ], JSON_UNESCAPED_SLASHES ) . "\n" );
Original file line number Diff line number Diff line change 1+ parameters :
2+ level : max
3+ paths : [src ]
4+ bootstrapFiles : [bootstrap.php ]
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+ namespace App ;
3+ final class Foo { public function bar (int $ a ): int { return $ a * 2 ; } }
You can’t perform that action at this time.
0 commit comments