ondrejmirtes/composer-attribute-collector
A convenient and near zero-cost way to retrieve targets of PHP 8 attributes
1.2.0
4.1M downloads/mo
#2074 most downloaded on Packagist
ondrejmirtes/composer-attribute-collector
What this package is like to depend on
Last release 1 months ago
23 Jul 2026
Release timing varies
gaps range from 9 days to 1.1 years
Some releases are documented
notes for 1 of 4 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
4 releases · first in 2025
1 release in the last 12 months
see the full history below
Release timeline
4 releases · May 2025 to Jul 2026Releases
latest 4-
1.2.023 Jul 2026Release notes
Open source →Constructing ReflectionClass autoloads the inspected class, which breaks
when the source (or a class it depends on) uses PHP 8 syntax: parse
errors abort collection of that class, and delayed variance checks
against unloadable classes are unrecoverable fatal errors that kill
composer entirely.Under PHP < 8 everything is now collected from the AST, located through
the class map: class/method/property/parameter attributes, methods and
properties inherited along the extends chain (mirroring reflection,
including private-member exclusion and promoted-property visibility),
and attributes on promoted constructor properties doubling as property
targets. Attribute arguments resolve self::/Foo:: constants from the
class-map ASTs (falling back to constant() only for classes outside the
scanned paths) and support DIR, FILE and CLASS.On phpstan-src, the generated attributes.php is byte-identical between
PHP 7.4 and PHP 8.5.Co-Authored-By: Claude Fable 5 [email protected]
Claude-Session: https://claude.ai/code/session_01EUJZL34ngijx9XTFtLGnEC -
1.1.105 Jun 2025Nothing published for this version
-
1.1.003 Jun 2025Nothing published for this version
-
1.0.024 May 2025Nothing published for this version