NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1004 most downloaded on Packagist
A validating SQL lexer and parser with a focus on MySQL dialect.
Latest stable
6.0.1
Last release 1 months ago
07 Oct 2026
Release timing varies
gaps range from 2 weeks to 11 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
95 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
### Added - #659: Add support for PHP 8.6 - #669: Add support for PHPUnit 13 ### Fixed - #631: Build insert statement with context's quote style - #63
Drop support for PHP 7.2, 7.3, 7.4, 8.0 and 8.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
StatementInfo classleftOperand, operator and rightOperand properties to the Condition componentComponent abstract class to an interfaceContext::load() error handling from throwing an exception to returning a boolean valueMisc::getAliases() into SelectStatement::getAliases()OptionsArray::mergeTokensList class to add the buildFromArray methodToken::TYPE_* constants with the TokenType enumparse method from components into ParsersBuild insert statement with context's quote style
Add context files for MySQL 9.2, MySQL 9.3 and MariaDB 12.1
Add Translator::setLocale() method
Add "RECURSIVE" on build() for "WITH RECURSIVE" on the WithStatement class
Add MariaDb 11.6 and 11.7 contexts
Fix parsing of ALTER TABLE … RENAME KEY
Fix context files for MySQL and MariaDB
::class keyword to load a context (#571)Allow parsing ALTER TABLE statement with column check constraint
Fix keywords not being recognized as table alias
bin/sql-parser executable file (#517)Fixed ALTER .. MODIFY ... ENUM failed! #511
Fixed ALTER .. MODIFY ... ENUM failed! #511
Fix := was not recognized as an operator just like =
:= was not recognized as an operator just like = (#306)ALTER TABLE … MODIFY … ENUM('<reserved_keyword>') is being wrongly parsed (#234)ALTER TABLE … MODIFY … ENUM('<reserved_keyword>') is being wrongly parsed (#478)COLLATE in WHERE clauses (#491)Fix ALTER EVENT RENAME TO to use expression instead of var (#419) by @niconoe-
ALTER EVENT RENAME TO to use expression instead of var (#419) by @niconoe-GROUP BY modifier WITH ROLLUP is treated as a syntax error and prevents export of SQL query results by @niconoe-TokensList::getPrevious was not able to reach very first token (#428) by @TithuguesTransactionStatement::build() "Call to a member function build() on null" when the transaction has no end by @williamdesALTER TABLE … RENAME COLUMN … TO … is not understood by the parser/linter (#430) by @niconoe-PARTITION syntax errors (#377) by @niconoe-ALTER USER when used with IDENTIFIED WITH/VIA/BY option (#431) by @TithuguesCOALESCE PARTITION in ALTER TABLE, rather than COALESCE (#323) by @TithuguesALGORITHM and LOCK options in ALTER TABLE statements (#319) by @Tithuguesenclosed by is not recognized by the parser when fields is in lower case (#236) by @williamdesKEY on CreateDefinition (#330) by @williamdesCALL statements parsing (#372) by @williamdesLEFT JOIN, JOIN, INNER JOIN on UpdateStatement (#260) by @williamdesTABLE and REPLACE statements on DESCRIBE statements by @williamdesDESCRIBE to allow a schema.table syntax (#445) by @williamdesALTER EVENT RENAME TO to use expression instead of var (#419)TokensList::getPrevious was not able to reach very first token (#428)TransactionStatement::build() "Call to a member function build() on null" when the transaction has no endALTER TABLE … RENAME COLUMN … TO … is not understood by the parser/linter (#430)PARTITION syntax errors (#377)ALTER USER when used with IDENTIFIED WITH/VIA/BY option (#431)COALESCE PARTITION in ALTER TABLE, rather than COALESCE (#323)ALGORITHM and LOCK options in ALTER TABLE statements (#319)enclosed by is not recognized by the parser when fields is in lower case (#236)KEY on CreateDefinition (#330)CALL statements parsing (#372)LEFT JOIN, JOIN, INNER JOIN on UpdateStatement (#260)TABLE and REPLACE statements on DESCRIBE statementsDESCRIBE to allow a schema.table syntax (#445)Performance improvement to use less the nextToken() function (#397) by @iifawzi
nextToken() function (#397) by @iifawziALTER EVENT (#404) by @iifawziALTER EVENT keywords (#404) by @iifawziRENAME INDEX x TO y (#405) by @iifawziCreateStatement function's options (#406) by @iifawziANALYZE (#413) by @iifawzinextToken() function (#397)ALTER EVENT (#404)ALTER EVENT keywords (#404)RENAME INDEX x TO y (#405)CreateStatement function's options (#406)ANALYZE (#413)Add missing return types annotations (746f48fae61c7a21951d51c5823869ebb43d7da1) by @MauricioFauth
Context::SQL_MODE* constants to Context::setMode method by @MauricioFauthCREATE VIEW statements (#371) by @iifawziCOMPRESSED columns (#351) by @iifawzi#[\AllowDynamicProperties] on Statement and Expression classes for PHP 8.2 support (4ee76d94525a092df6b6ea1109171bfc9bc73f52) by @williamdesALTER queries of PARTITIONS (#329) by @iifawziANALYZE and EXPLAIN statements (#386) by @iifawziEXPLAIN Parser (#389) by @iifawzimultipoint and multipolygon data types (#393) by @iifawziExpression component (#399) by @iifawzicomposer.json by @williamdescomposer.json (#401) by @imanghafoori1Context::SQL_MODE* constants to Context::setMode methodCREATE VIEW statements (#371)COMPRESSED columns (#351)#[\AllowDynamicProperties] on Statement and Expression classes for PHP 8.2 supportALTER queries of PARTITIONS (#329)Context::load() error handling to returning a boolean value instead of throwing a LoaderException (#384)ANALYZE and EXPLAIN statements (#386)EXPLAIN Parser (#389)multipoint and multipolygon data types (#393)Expression component (#399)Fixed BufferedQuery when it has an odd number of backslashes in the end
Added check for quoted symbol to avoid parser error in case of keyword
Fix array_key_exists warning when parsing a "DEFAULT FALSE" token
Fix lexer to not allow numbers with letters
Revert some changes with the understanding of ANSI_QUOTES mode and identifiers
Stop instanciating an object to check its class name.
Fix ALTER TABLE ... PRIMARY/UNIQUE KEY results in error
Fix for PHP deprecations messages about implode for php 7.4+
Drop support for PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, PHP 7.0 and HHVM
Fixed BufferedQuery when it has an odd number of backslashes in the end
Added check for quoted symbol to avoid parser error in case of keyword
Fix array_key_exists warning when parsing a "DEFAULT FALSE" token
Fix lexer to not allow numbers with letters
Revert some changes with the understanding of ANSI_QUOTES mode and identifiers
Stop instanciating an object to check its class name.
Fix ALTER TABLE ... PRIMARY/UNIQUE KEY results in error
Fix for PHP deprecations messages about implode for php 7.4+
Backport fixes from 5.0.0 to QA branch:
Backport fixes from 5.0.0 to QA branch:
Fixed incorrect error thrown on DEFAULT keyword in ALTER statement
Add support for aliases on CASE expressions (#162 and #192)
Fix issue with CREATE OR REPLACE VIEW.
Fix parsing of CREATE TABLE with per field COLLATE.
Make mbstring extension optional (though Symfony polyfill).
Added support for binding parameters.
Fixed minor bug in Query::getFlags.
Initial support for MariaDB SQL contexts.
Use custom LoaderException for context loading errors.
Improved error handling of several invalid statements.
Fixed parsing SQL comment at the end of query.
Fixed setting combination SQL Modes.
Fixed building query with GROUP BY clause.
Fixed invalid lexing of queries with : in strings.
Fixed wrong extract of string tokens with escaped characters.
Added support for DELETE ... JOIN clauses.
Improved order validatin for JOIN clauses.
Localization using phpmyadmin/motranslator is now optional.
Use phpmyadmin/motranslator to localize messages.
Fixed CLI wrappers for new API.
Added PhpMyAdmin namespace prefix to follow PSR-4.
Fixed indentation in HTML formatting.
Properly handle operators AND, NOT, OR, XOR, DIV, MOD
Fix return value of Formatter.toString() when type is text
Improved parsing of UNION queries.
Fix broken incorrect clause order detection for Joins.
One column per quarter.