NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #4997 most downloaded on Packagist
Get a simple data structure from your php code.
Last release 3 days ago
05 Oct 2026
Ships unpredictably
gaps range from 1 weeks to 2.7 years
Nearly every release is documented
notes for 55 of 55 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
55 releases · first in 2020
One column per quarter.
chore(release): prepare 0.22.12
chore(release): prepare 0.22.12
AstNodeInspector::ownedRange() so consumers that walk the raw php-parser AST get the owned declaration range (the node plus the PHPDoc comment in front of it, including one in front of attributes) without reconstructing it; it returns null for nodes without source positionssourceStartLine, sourceEndLine, sourceStartFilePos and sourceEndFilePos added in 0.22.11; model behavior is unchangedchore(release): prepare 0.22.11
chore(release): prepare 0.22.11
sourceStartLine, sourceEndLine, sourceStartFilePos and sourceEndFilePos: the declaration plus the PHPDoc comment in front of it (php-parser keeps the PHPDoc outside the node range; PHP attributes are already inside it); line, endLine, startFilePos, endFilePos and pos keep their node-range meaningnull where a model does not exclusively own a declaration: reflection-backed models, items of a multi-item const or property statement, and define() calls; a single-item class constant, file-level const or property statement owns its whole statementOwnedSourceRangeTest, so consumers that edit or delete declarations no longer have to reconstruct the range from the ASTchore(release): prepare 0.22.10
chore(release): prepare 0.22.10 (#167)
PhpCodeParser::getFromString() so it always treats its argument as raw PHP source, even when that string happens to equal an existing file or directory path; keep getPhpFiles() unchanged as the backwards-compatible mixed path-or-source entry pointParserOptions, inheritance/interface finalisation and path-scoped filtering without duplicating parser behaviorvoku/agent-mapGuard the fail-closed release workflow invariants with a regression contract and document the release-authority hardening in the 0.22.9 changelog.
Guard the fail-closed release workflow invariants with a regression contract and document the release-authority hardening in the 0.22.9 changelog.
ParserOptions::astOnlyParallel() for sufficiently large CLI directory parses; it uses bounded pcntl workers only for AST-only parsing and falls back to the existing sequential path when parallel execution is unavailable or not worthwhile{@inheritdoc} semantics by parallelizing parse + name resolution + file-local model extraction only, then performing cross-file finalisation once in the parent processPhpCodeParser::getFromFile() and getFromDirectory() entry points so new callers can make file/directory intent explicit; keep getPhpFiles() unchanged as the backwards-compatible mixed path-or-source entry pointfalse remains non-fatal, while real serializer/adapter warnings and exceptions stay visible instead of being hidden by @nikic/php-parser 4.18.0 dependency floor and keep that fixture outside Renovate updatesmaster SHA, require a successful push CI run, re-check master immediately before tagging, pin the write-authorized checkout action, and guard those fail-closed release invariants with a regression testfix: stop parsing from recursing without bound when a class or interface extends itself, directly or through a partner (class Foo extends Foo, interfa
class Foo extends Foo, interface I1 extends I2 / interface I2 extends I1); combineImplementedInterfaces() and combineParentInterfaces() now track the types they already expanded and finish with what the source declaresUtils::findParentClassDeclaringConstant() never advanced up the extends chain, so resolving self::CONSTANT for a class that does not declare the constant itself looped forever; it now walks to the declaring parent, stops at an unknown parent or a cycle, and falls back to the requested class as beforeCyclicInheritanceTestci: bootstrap 0.22.7 release
ci: bootstrap 0.22.7 release
ParserOptions::astOnly() source-bound by preserving process-global constants as PHPAttributeExpression instead of resolving them from the running PHP processPHP_INT_MAXci: bootstrap 0.22.6 release
ci: bootstrap 0.22.6 release
PHPAttributeExpressiondocs: add 0.22.5 changelog
docs: add 0.22.5 changelog
PHPAttributeExpression so consumers can distinguish expressions from real string literals::class referencesParserOptions::astOnly() free of application-class autoloading while retaining reflection-enriched backwards compatibilityadd ParserOptions and an optional $options argument on PhpCodeParser::getPhpFiles() / getFromString(). ParserOptions::astOnly() parses strictly what t
ParserOptions and an optional $options argument on PhpCodeParser::getPhpFiles() / getFromString(). ParserOptions::astOnly() parses strictly what the source declares: the analysed code is never autoloaded, no class-like is reflected, no parent hierarchy is pulled into the container, and an unresolvable class-constant default stays unresolved instead of compiling its declaring class into the parsing processParserOptions::default(), i.e. today's reflection-enriched behaviour, so existing callers are unaffectedastOnly() yields only that class instead of the class plus PHPUnit\Framework\TestCase and PHPUnit\Framework\Assert, which in one measured repository cut structural extraction of 339 files from 275s to 15s and the cached payload from 47.5 MB to 1.1 MBadd AstNodeInspector helpers for exact node source slices, one-based start columns, and shallow value-independent AST shape fingerprints so downstream
AstNodeInspector helpers for exact node source slices, one-based start columns, and shallow value-independent AST shape fingerprints so downstream analyzers can reuse parser mechanics without reimplementing traversal plumbingself / parent / static type preservation so lexical AST types win only when AST evidence exists, while pure Reflection stays honestDocument the behaviour changes since 0.22.1 in the changelog and add the tests that prove nothing else changed.
Document the behaviour changes since 0.22.1 in the changelog and add the
tests that prove nothing else changed.
The behaviour delta was measured by diffing the full parsed model of a
433-file corpus (synthetic syntax fixtures, nikic/php-parser and
phpdocumentor) between 0.22.1 and HEAD. Exactly three changes showed up,
all of them intended:
\Psr\Container\ContainerInterface instead ofPsr\Container\ContainerInterface)PHPEnum::$constantsPHPEnum::$is_final / $is_abstract / $is_anonymous are no longernull for enums that cannot be autoloadedNew tests:
All new tests fail against 0.22.1 and pass on both nikic/php-parser v4
and v5.
Also widen the extractHooksFromReflection() array key type, which
phpstan rejected on PHP 8.4 because getHooks() is keyed by name.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
PHPProperty::$type / PHPParameter::$type read via reflection are now consistently fully qualified, e.g. Psr\Container\ContainerInterface is now reported as \Psr\Container\ContainerInterface. Previously the leading \ was only added when class_exists() happened to be true, so interfaces, enums-in-unloadable-files and any not-yet-autoloadable class silently lost it, while the AST path always emitted it. Both paths now agree. Consumers that compare these strings verbatim have to expect the leading \ (built-in types, self, parent, static and intersection types are unchanged)PHPEnum::$constants; they were already available (with more detail) via $cases / $caseDetailsPHPEnum read from a plain ReflectionClass (which is what Utils::createClassReflectionInstance() returns) now reports $scalarType and $cases / $caseDetails; before, that data was only filled in when a ReflectionEnum was passed explicitlyPHPEnum::$is_final / $is_abstract / $is_anonymous now always reflect the language guarantees (true / false / false) instead of staying null when the enum could not be autoloadedPhpCodeParser entry pointCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
constant() / ReflectionParameter::getDefaultValue()) threw an uncaught \Error and aborted the whole parse; now recovered gracefullyPHPConst reflection path assigned an unnormalized gettype() string (e.g. 'NULL' instead of 'null') when a constant's value couldn't be resolved\Error catch around ReflectionParameter::getDefaultValue() (its stub only declares \ReflectionException, but it also throws \Error at runtime for this case)[+]: Add support for source-range information and enhance PHP model e…
[+]: Add support for source-range information and enhance PHP model e…
endLine, startFilePos, endFilePos (byte offsets), enabling precise sed/byte-range reads of a single declaration without loading the whole filePHPFileInfo + PhpCodeParser::getFileInfoFromFile() for a lightweight per-file summary (namespaces, imports, declares)PhpCodeParser::getAstFromFile() / getAstFromString() to expose the names-resolved php-parser AST directly for syntax outside the compact Model APIPhpDocContextConnector: typeFromPhpDocResolved / returnTypeFromPhpDocResolved resolve aliased class names (e.g. use Vendor\Payload as Message;) without touching legacy rendered fields$traitUses / $traitAdaptations (aliasing, insteadof) to class-like models; interfaces now retain all declared parent interfaces$throws (from @throws), is_returned_by_ref, and (for methods) is_abstract to function/method models; add is_promoted to parametersPHPEnumCase + $caseDetails on PHPEnum for source-aware, attribute-aware enum cases, alongside the existing legacy $cases value mappublic $a, $b;) was parsed; all properties in the group are now read[*]: update the changelog
[*]: update the changelog
#[\Override], and property hooks with asymmetric visibility@param / @return preservationnikic/php-parser v4.18 and v5, update phpDocumentor / phpdoc-parser / phpunit / phpstan dependencies, and replace React-based file reads[+]: use "phpstan/phpdoc-parser" for more phpdocs + more tests
[+]: use "phpstan/phpdoc-parser" for more phpdocs + more tests
[*]: update the changelog
[*]: update the changelog
callable() types[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
update "phpdocumentor/type-resolver" (with support for int-ranges)
quick-fix for missing namespaces in types
optimize NULL detecting from reflection for types
use native php reflection, instead of (slower) better reflection
temporary fix for phpdoc like int<0,1>
int<0,1>- update dependencies
- update dependencies
"PhpCodeParser" -> optimize exception handling of "amphp/parallel" for async code analysis per file
"PhpCodeParser" -> ignore exceptions from auto loaded external classes
"PhpCodeParser" -> allow different file extensions
- fix php variable detection
save the raw phpdoc for "@return" and "@param" v2
save the raw phpdoc for "@return" and "@param"
support for modern phpdocs for "@param" and "@return"
remove custom PseudoTypes for phpDocumentor (PseudoTypes are now build in into phpDocumentor itself)
save special phpdoc @tags and the content of these tags
optimize performance via static cache
move "PhpCodeChecker" in a separate repository
"PhpCodeCheckerCommand" -> allow to exclude some files
"PhpCodeParser" -> add "getFromClassName()"
"PHPTrait" -> add support for "Trait"-files
"PhpCodeParser" -> fix cache key
"PHPInterface" -> fix recursion
"PhpCodeParser" -> ignore errors outside the current file-path-scope
"PhpCodeChecker" -> check wrong phpdocs from class properties
replace PhpReflection with BetterReflection v2
replace PhpReflection with BetterReflection
"PhpCodeParser" -> fetch phpdoc-data for @inheritdoc
"ParserErrorHandler" -> show more parsing errors in the results
"PhpCodeCheckerCommand" -> fix "$skipMixedTypesAsError" usage
"PHPFunction" -> fix phpdoc parsing error
add default values for parameter and properties
- "PHPClass" fix phpdoc - add "PhpCodeChecker"-class
fix code issues reported by psalm + phpstan
use "amphp/parallel" for async code analyse per file
init (forked from "JetBrains/phpstorm-stubs")
Your coding agent can read these notes before it upgrades. Set up the MCP server →