---
title: "nikic/php-parser v5.0.0 Breaking Changes on Packagist"
description: "What each nikic/php-parser release removed, renamed or changed: 735 breaking changes in 2 versions on Packagist, each with its source."
canonical_url: https://since.dev/packages/packagist/nikic/php-parser
last_updated: 2026-12-04
---

# 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

Latest version `v5.10.0`, released November 28, 2026. BSD-3-Clause license. [Source repository](https://github.com/nikic/PHP-Parser)

Its v5.0.0 release requires PHP 7.4 or later. [PHP end of life dates](https://since.dev/calendar/php.md).

- From [v5.0.0rc1](#v-v5-0-0rc1) to [v5.0.0](#v-v5-0-0): 734 breaking changes in 1 version.

## nikic/php-parser v5.0.0 breaking changes

nikic/php-parser v5.0.0, released January 7, 2024: 734 breaking changes.

- **Removed**  

The PHP 5 parser is gone. The PHP 7 parser handles PHP 5 code on a best-effort basis. [github.com](https://github.com/nikic/PHP-Parser/releases/tag/v5.0.0)
- **Removed**  

The library now needs PHP 7.4 or later to run. Upgrade the host PHP version before using this release. [github.com](https://github.com/nikic/PHP-Parser/releases/tag/v5.0.0)
- **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](https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md)
- **Removed** `Error`  

The Error constructor no longer takes a start line. Pass a startLine attribute instead. [github.com](https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md)
- **Removed** `PhpParser\Builder\Param::setTypeHint`  

Use setType() instead. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Builder\TraitUseAdaptation::TYPE_ALIAS`  

PhpParser\\Builder\\TraitUseAdaptation::TYPE_ALIAS was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Builder\TraitUseAdaptation::TYPE_PRECEDENCE`  

PhpParser\\Builder\\TraitUseAdaptation::TYPE_PRECEDENCE was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Builder\TraitUseAdaptation::TYPE_UNDEFINED`  

PhpParser\\Builder\\TraitUseAdaptation::TYPE_UNDEFINED was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Comment::getFilePos`  

Use Comment::getStartFilePos() instead. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Comment::getLine`  

Use Comment::getStartLine() instead. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Comment::getTokenPos`  

Use Comment::getStartTokenPos() instead. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::__construct`  

PhpParser\\Lexer::\_\_construct was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$code`  

PhpParser\\Lexer::$code was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$dropTokens`  

PhpParser\\Lexer::$dropTokens was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$filePos`  

PhpParser\\Lexer::$filePos was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$identifierTokens`  

PhpParser\\Lexer::$identifierTokens was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$line`  

PhpParser\\Lexer::$line was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$pos`  

PhpParser\\Lexer::$pos was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$prevCloseTagHasNewline`  

PhpParser\\Lexer::$prevCloseTagHasNewline was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$tokenMap`  

PhpParser\\Lexer::$tokenMap was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::$tokens`  

PhpParser\\Lexer::$tokens was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::createTokenMap`  

PhpParser\\Lexer::createTokenMap was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::getNextToken`  

The lexer now has a single tokenize() method. Call that instead. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::getTokens`  

Use the single tokenize() method, which returns the tokens. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::handleHaltCompiler`  

Use the single tokenize() method, which returns the tokens. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer::startLexing`  

Use the single tokenize() method, which returns the tokens. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\Emulative::PHP_7_3`  

PhpParser\\Lexer\\Emulative::PHP_7_3 was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\Emulative::PHP_7_4`  

PhpParser\\Lexer\\Emulative::PHP_7_4 was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\Emulative::PHP_8_0`  

PhpParser\\Lexer\\Emulative::PHP_8_0 was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\Emulative::PHP_8_1`  

PhpParser\\Lexer\\Emulative::PHP_8_1 was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\Emulative::PHP_8_2`  

PhpParser\\Lexer\\Emulative::PHP_8_2 was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator`  

PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator`  

PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\TokenEmulator\FnTokenEmulator`  

PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator`  

PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Expr\ArrayItem`  

PhpParser\\Node\\Expr\\ArrayItem was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Expr\ClosureUse`  

PhpParser\\Node\\Expr\\ClosureUse was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Name::$parts`  

Use getParts instead. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Scalar\DNumber`  

PhpParser\\Node\\Scalar\\DNumber was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Scalar\Encapsed`  

PhpParser\\Node\\Scalar\\Encapsed was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Scalar\EncapsedStringPart`  

PhpParser\\Node\\Scalar\\EncapsedStringPart was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Scalar\LNumber`  

PhpParser\\Node\\Scalar\\LNumber was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Stmt\DeclareDeclare`  

PhpParser\\Node\\Stmt\\DeclareDeclare was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Stmt\PropertyProperty`  

PhpParser\\Node\\Stmt\\PropertyProperty was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Stmt\StaticVar`  

PhpParser\\Node\\Stmt\\StaticVar was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Stmt\Throw_`  

PhpParser\\Node\\Stmt\\Throw\_ was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Node\Stmt\UseUse`  

PhpParser\\Node\\Stmt\\UseUse was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\NodeDumper::dumpIncludeType`  

PhpParser\\NodeDumper::dumpIncludeType was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\NodeDumper::dumpUseType`  

PhpParser\\NodeDumper::dumpUseType was removed in nikic/php-parser v5.0.0 [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)
- **Removed** `PhpParser\Parser\Multiple`  

The Multiple parser class is removed along with PHP 5 support. [packagist.org](https://packagist.org/packages/nikic/php-parser#v5.0.0)

And 684 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## nikic/php-parser v5.0.0rc1 breaking changes

nikic/php-parser v5.0.0rc1, released January 7, 2024: 1 breaking change.

- **Behavior changed**  

Unicode escape sequences are no longer parsed when targeting PHP versions older than 7.0. [github.com](https://github.com/nikic/PHP-Parser/releases/tag/v5.0.0rc1)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
