nikic/php-parser breaking changes
nikic/php-parser v5.0.0 (January 7, 2024) is its newest release with breaking changes, 734 of them. The first: PHP 5 parser removed in nikic/php-parser 5.0.0. Every breaking API change we have recorded in nikic/php-parser on Packagist: 735 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version v5.10.0, released November 28, 2026. BSD-3-Clause license. Source repository
Its v5.0.0 release requires PHP 7.4 or later. PHP end of life dates.
nikic/php-parser v5.0.0 breaking changes
- Removed
The PHP 5 parser is gone. The PHP 7 parser handles PHP 5 code on a best-effort basis. github.com - Removed
The library now needs PHP 7.4 or later to run. Upgrade the host PHP version before using this release. github.com - Removed
The package now needs PHP 7.4 or later to run. Code can still parse older PHP syntax by specifying a PhpVersion. github.com - Removed
Error
The Error constructor no longer takes a start line. Pass a startLine attribute instead. github.com - Removed
PhpParser\Builder\Param::setTypeHint
Use setType() instead. packagist.org - Removed
PhpParser\Builder\TraitUseAdaptation::TYPE_ALIAS
PhpParser\Builder\TraitUseAdaptation::TYPE_ALIAS was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Builder\TraitUseAdaptation::TYPE_PRECEDENCE
PhpParser\Builder\TraitUseAdaptation::TYPE_PRECEDENCE was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Builder\TraitUseAdaptation::TYPE_UNDEFINED
PhpParser\Builder\TraitUseAdaptation::TYPE_UNDEFINED was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Comment::getFilePos
Use Comment::getStartFilePos() instead. packagist.org - Removed
PhpParser\Comment::getLine
Use Comment::getStartLine() instead. packagist.org - Removed
PhpParser\Comment::getTokenPos
Use Comment::getStartTokenPos() instead. packagist.org - Removed
PhpParser\Lexer::__construct
PhpParser\Lexer::__construct was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$code
PhpParser\Lexer::$code was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$dropTokens
PhpParser\Lexer::$dropTokens was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$filePos
PhpParser\Lexer::$filePos was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$identifierTokens
PhpParser\Lexer::$identifierTokens was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$line
PhpParser\Lexer::$line was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$pos
PhpParser\Lexer::$pos was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$prevCloseTagHasNewline
PhpParser\Lexer::$prevCloseTagHasNewline was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$tokenMap
PhpParser\Lexer::$tokenMap was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::$tokens
PhpParser\Lexer::$tokens was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::createTokenMap
PhpParser\Lexer::createTokenMap was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer::getNextToken
The lexer now has a single tokenize() method. Call that instead. packagist.org - Removed
PhpParser\Lexer::getTokens
Use the single tokenize() method, which returns the tokens. packagist.org - Removed
PhpParser\Lexer::handleHaltCompiler
Use the single tokenize() method, which returns the tokens. packagist.org - Removed
PhpParser\Lexer::startLexing
Use the single tokenize() method, which returns the tokens. packagist.org - Removed
PhpParser\Lexer\Emulative::PHP_7_3
PhpParser\Lexer\Emulative::PHP_7_3 was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\Emulative::PHP_7_4
PhpParser\Lexer\Emulative::PHP_7_4 was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\Emulative::PHP_8_0
PhpParser\Lexer\Emulative::PHP_8_0 was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\Emulative::PHP_8_1
PhpParser\Lexer\Emulative::PHP_8_1 was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\Emulative::PHP_8_2
PhpParser\Lexer\Emulative::PHP_8_2 was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator
PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator
PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\TokenEmulator\FnTokenEmulator
PhpParser\Lexer\TokenEmulator\FnTokenEmulator was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator
PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Expr\ArrayItem
PhpParser\Node\Expr\ArrayItem was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Expr\ClosureUse
PhpParser\Node\Expr\ClosureUse was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Name::$parts
Use getParts instead. packagist.org - Removed
PhpParser\Node\Scalar\DNumber
PhpParser\Node\Scalar\DNumber was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Scalar\Encapsed
PhpParser\Node\Scalar\Encapsed was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Scalar\EncapsedStringPart
PhpParser\Node\Scalar\EncapsedStringPart was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Scalar\LNumber
PhpParser\Node\Scalar\LNumber was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Stmt\DeclareDeclare
PhpParser\Node\Stmt\DeclareDeclare was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Stmt\PropertyProperty
PhpParser\Node\Stmt\PropertyProperty was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Stmt\StaticVar
PhpParser\Node\Stmt\StaticVar was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Stmt\Throw_
PhpParser\Node\Stmt\Throw_ was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Node\Stmt\UseUse
PhpParser\Node\Stmt\UseUse was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\NodeDumper::dumpIncludeType
PhpParser\NodeDumper::dumpIncludeType was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\NodeDumper::dumpUseType
PhpParser\NodeDumper::dumpUseType was removed in nikic/php-parser v5.0.0 packagist.org - Removed
PhpParser\Parser\Multiple
The Multiple parser class is removed along with PHP 5 support. packagist.org
And 684 more in this version. Sign up to see every change
nikic/php-parser v5.0.0rc1 breaking changes
- Behavior changed
Unicode escape sequences are no longer parsed when targeting PHP versions older than 7.0. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.