Repository navigation
Commit 603c305
committed
Track the files of the project's Composer autoload entries like scanned files
A class or function can appear in a file of the project's own autoload
entries - PSR-4, PSR-0, classmap and files, of autoload and autoload-dev,
and of packages from path repositories - without any analysed or scanned
file changing, and nothing noticed it. Those files are now scanned files:
a new one or a changed one is noticed and read for what it declares, and
its exported nodes decide which dependents are re-analysed. A changed file
of a package from a path repository is tracked file by file instead of
throwing the whole result cache away; the scanned-vendor e2e test records
its package as downloaded to keep covering a package from Packagist.
An entry containing the vendor directory, like a namespace mapped to the
project root, is walked without it and gives only PHP files, the project's
entries pointing into the vendor directory are left to their package, and
nothing under tmpDir counts as a scanned file - the result cache and the
container would otherwise change on every run.
Amp-Thread-ID: https://ampcode.com/threads/T-01a1c5c8-8d5b-7459-a22c-beb8e7ba8a3b1 parent 8435dd9 commit 603c305
19 files changed
Lines changed: 444 additions & 31 deletions
File tree
- e2e
- result-cache-autoload-entries
- classmap
- legacy
- lib
- path-lib
- src
- src
- tests
- tmp
- result-cache-scanned-vendor
- src
- Analyser/ResultCache
- Dependency
- Reflection/BetterReflection/SourceLocator
- tests/PHPStan/Analyser/ResultCache
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Whitespace-only changes.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments