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
{{ message }}
Repository navigation
Commit df96878
Browse filesBrowse the repository at this point in the historyBrowse files
Discover DI attributes in attributeServicesDirectories
AttributeServicesDiscoverer finds candidate classes through the psr-4 path
contract and vendor/composer/autoload_classmap.php and reads the @api
attributes with native reflection: AutowiredService, NonAutowiredService,
RegisteredRule, RegisteredCollector, GenerateFactory, Conditional, and
AutowiredParameter on constructor parameters. No file is parsed. A content
prefilter keeps classes without PHPStan attributes from being autoloaded.
PHPStan-internal attributes, and files that mention a DI attribute but
yield no autoloadable class, are errors.
PHP 8.0 has no new in attribute arguments, so Conditional there takes
[NewExpression marker => [Class::class, [arguments]]], the same array
simple-downgrader writes and composer-attribute-collector understands.
Discovery runs lazily while the container compiles, so a container cache
hit loads no third-party class. The container cache key of the project's
own directories hashes only the files the same prefilter accepts, so
editing a class without PHPStan's attributes does not recompile the
container.
Amp-Thread-ID: https://ampcode.com/threads/T-01a19cd4-be31-75b4-bd15-67786eff5983
0 commit comments