shipmonk-rnd / composer-dependency-analyser

🚀 Fast detection of composer dependency issues (unused dependencies, shadow dependencies, misplaced dependencies)
MIT License
400 stars 10 forks source link

Fix PHP warning with no composer classloader #150

Closed janedbal closed 3 months ago

janedbal commented 3 months ago

Found in #149

JanTvrdik commented 3 months ago

Why not just change the assignment in constructor to $this->classLoaders = $classLoaders;?

janedbal commented 3 months ago

Why not just change the assignment in constructor to $this->classLoaders = $classLoaders;?

Better.


Sidenote: I'm surprised this was not detected by PHPStan, we have checkUninitializedProperties: true. Will check that: old issue, but it works only with typed props.