squizlabs/php_codesniffer breaking changes
Updated December 4, 2026
On this page
Latest version 4.0.4, released August 6, 2026. BSD-3-Clause license. Source repository
Its 4.0.0 release requires PHP 7.2 or later. PHP end of life dates.
- From 3.0.0 to 4.0.0: 447 breaking changes in 3 versions.
- From 2.0.0 to 4.0.0: 719 breaking changes in 9 versions.
squizlabs/php_codesniffer 4.0.0 breaking changes
- Removed
A custom standard named Internal must be renamed, along with the namespace used by all its sniffs. github.com - Removed
$GLOBALS['PHP_CODESNIFFER_CONFIG']
The test framework no longer uses global variables such as PHP_CODESNIFFER_CONFIG. Tests relying on them must change. github.com - Removed
$phpcsFile.tokenizerType
Code reading this property must first check that it exists before using it. github.com - Removed
$supportedTokenizers
Sniffs that declare $supportedTokenizers without PHP no longer run and cause PHPCS to exit with an error. github.com - Removed
PHP_CodeSniffer\Files\File::$fixableCount
PHP_CodeSniffer\Files\File::$fixableCount was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Files\File::$tokenizerType
PHP_CodeSniffer\Files\File::$tokenizerType was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Filters\ExactMatch::getBlacklist
Use getDisallowedFiles instead. packagist.org - Removed
PHP_CodeSniffer\Filters\ExactMatch::getWhitelist
Use getAllowedFiles instead. packagist.org - Removed
PHP_CodeSniffer\Filters\GitModified::getBlacklist
PHP_CodeSniffer\Filters\GitModified::getBlacklist was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Filters\GitModified::getWhitelist
PHP_CodeSniffer\Filters\GitModified::getWhitelist was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Filters\GitStaged::getBlacklist
PHP_CodeSniffer\Filters\GitStaged::getBlacklist was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Filters\GitStaged::getWhitelist
PHP_CodeSniffer\Filters\GitStaged::getWhitelist was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Generators\HTML::printCodeComparisonBlock
Use HTML::getFormattedCodeComparisonBlock instead. packagist.org - Removed
PHP_CodeSniffer\Generators\HTML::printFooter
Use HTML::getFormattedFooter instead. packagist.org - Removed
PHP_CodeSniffer\Generators\HTML::printHeader
Use HTML::getFormattedHeader instead. packagist.org - Removed
PHP_CodeSniffer\Generators\HTML::printTextBlock
Use HTML::getFormattedTextBlock instead. packagist.org - Removed
PHP_CodeSniffer\Generators\HTML::printToc
Use HTML::getFormattedToc instead. packagist.org - Removed
PHP_CodeSniffer\Generators\HTML::STYLESHEET
The constant is now private. Define your own constant if you used it. packagist.org - Removed
PHP_CodeSniffer\Generators\Markdown::printCodeComparisonBlock
Use Markdown::getFormattedCodeComparisonBlock instead. packagist.org - Removed
PHP_CodeSniffer\Generators\Markdown::printFooter
Use Markdown::getFormattedFooter instead. packagist.org - Removed
PHP_CodeSniffer\Generators\Markdown::printHeader
Use Markdown::getFormattedHeader instead. packagist.org - Removed
PHP_CodeSniffer\Generators\Markdown::printTextBlock
Use Markdown::getFormattedTextBlock instead. packagist.org - Removed
PHP_CodeSniffer\Generators\Text::printCodeComparisonBlock
Use Text::getFormattedCodeComparisonBlock instead. packagist.org - Removed
PHP_CodeSniffer\Generators\Text::printTextBlock
Use Text::getFormattedTextBlock instead. packagist.org - Removed
PHP_CodeSniffer\Generators\Text::printTitle
The void print methods in the Generator classes were removed in favour of get methods returning strings. packagist.org - Removed
PHP_CodeSniffer\Reporter::$startTime
The unused property was removed. packagist.org - Removed
PHP_CodeSniffer\Reporter::$totalFixable
Add the fixable error and warning totals instead. packagist.org - Removed
PHP_CodeSniffer\Reporter::$totalFixed
Add the fixed error and warning totals instead. packagist.org - Removed
PHP_CodeSniffer\Runner::checkRequirements
PHP_CodeSniffer\Runner::checkRequirements was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\DocCommentSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\DocCommentSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\FixmeSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\FixmeSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures\InlineControlStructureSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures\InlineControlStructureSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\ClosureLinterSniff
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\ClosureLinterSniff was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\CSSLintSniff
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\CSSLintSniff was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\ESLintSniff
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\ESLintSniff was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\JSHintSniff
PHP_CodeSniffer\Standards\Generic\Sniffs\Debug\JSHintSniff was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\EndFileNewlineSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\EndFileNewlineSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\EndFileNoNewlineSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\EndFileNoNewlineSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineEndingsSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineEndingsSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\MultipleStatementAlignmentSniff::$error
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\MultipleStatementAlignmentSniff::$error was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\MultipleStatementAlignmentSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\MultipleStatementAlignmentSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\NoSpaceAfterCastSniff
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\NoSpaceAfterCastSniff was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterNotSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterNotSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\CallTimePassByReferenceSniff
PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\CallTimePassByReferenceSniff was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowAlternativePHPTagsSniff::addChangeset
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowAlternativePHPTagsSniff::addChangeset was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowAlternativePHPTagsSniff::findClosingTag
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowAlternativePHPTagsSniff::findClosingTag was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseConstantSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\LowerCaseConstantSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Strings\UnnecessaryStringConcatSniff::$error
PHP_CodeSniffer\Standards\Generic\Sniffs\Strings\UnnecessaryStringConcatSniff::$error was removed in squizlabs/php_codesniffer 4.0.0 packagist.org - Removed
PHP_CodeSniffer\Standards\Generic\Sniffs\Strings\UnnecessaryStringConcatSniff::$supportedTokenizers
PHP_CodeSniffer\Standards\Generic\Sniffs\Strings\UnnecessaryStringConcatSniff::$supportedTokenizers was removed in squizlabs/php_codesniffer 4.0.0 packagist.org
And 351 more in this version. Sign up to see every change
squizlabs/php_codesniffer 4.0.0-RC1 breaking changes
- Renamed
Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterVisbility
The error code SpacingAfterVisbility is now SpacingAfterVisibility. Update any ruleset exclusions, suppression comments or reports that reference the old code. github.com
squizlabs/php_codesniffer 4.0.0beta1 breaking changes
- Removed
The minimum supported PHP version is now 7.2.0, so PHP 5.4 can no longer run this release. github.com - Removed
Array values must now be set with element tags carrying key and value attributes. github.com - Removed
Sniffs aimed at CSS/JS files no longer run and all other sniffs treat scanned files as PHP. Code relying on CSS/JS checks must change. github.com - Removed
AbstractPatternSniff.__construct
Code passing the ignoreComments argument to the constructor must stop doing so. github.com - Removed
auto_detect_line_endings
Files with only carriage return line endings are no longer supported. github.com - Removed
Generic.Formatting.NoSpaceAfterCast
Use SpaceAfterCast with the spacing property set to 0. github.com - Removed
Generic.Functions.CallTimePassByReference
This sniff is no longer available. github.com - Removed
Internal.ParseError.EnumHasMemberVar
File::getMemberProperties no longer emits this error code. github.com - Removed
Internal.ParseError.InterfaceHasMemberVar
File::getMemberProperties no longer emits this error code. github.com - Removed
MySource
All sniffs in the MySource standard are gone. github.com
And 35 more in this version. Sign up to see every change
squizlabs/php_codesniffer 3.0.0 breaking changes
- Removed
File.getMethodProperties
Code reading the is_closure key from the return value must stop doing so. Closures use the T_CLOSURE token type. github.com - Removed
File.isAnonymousFunction
Custom sniffs calling this method must stop using it. Closures have the T_CLOSURE token type. github.com - Removed
Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff
Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org - Removed
Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff
Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org - Removed
Generic_Sniffs_Classes_DuplicateClassNameSniff
Generic_Sniffs_Classes_DuplicateClassNameSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org - Removed
Generic_Sniffs_Classes_OpeningBraceSameLineSniff
Generic_Sniffs_Classes_OpeningBraceSameLineSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org - Removed
Generic_Sniffs_CodeAnalysis_EmptyStatementSniff
Generic_Sniffs_CodeAnalysis_EmptyStatementSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org - Removed
Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff
Generic_Sniffs_CodeAnalysis_ForLoopShouldBeWhileLoopSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org - Removed
Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff
Generic_Sniffs_CodeAnalysis_ForLoopWithTestFunctionCallSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org - Removed
Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff
Generic_Sniffs_CodeAnalysis_JumbledIncrementerSniff was removed in squizlabs/php_codesniffer 3.0.0 packagist.org
And 248 more in this version. Sign up to see every change
squizlabs/php_codesniffer 3.0.0RC4 breaking changes
- Removed
PEAR.Classes.ClassDeclaration
The sniff no longer calculates the brace indent. Use other sniffs to check class indentation. github.com
squizlabs/php_codesniffer 3.0.0RC3 breaking changes
- Behavior changed
Exit code 1 now means all fixable errors were fixed, and exit code 2 means some could not be fixed. Update scripts that read these codes. github.com - Behavior changed
T_FUNCTION
Custom JS sniffs listening for T_FUNCTION can no longer assume the token is the word function. Check the token content or use getDeclarationName(). github.com
Older versions
4 older versions, each with its first changes. Sign up to see every change
Show 4 older versions
squizlabs/php_codesniffer 3.0.0RC2 breaking changes
- Behavior changed
Usage errors now print only the error message instead of the full usage text. github.com
squizlabs/php_codesniffer 3.0.0RC1 breaking changes
- Default changed
Verbose fixing output is off by default. Use -v to show it. github.com
squizlabs/php_codesniffer 3.0.0a1 breaking changes
- Removed
All rules now live in phpcs.xml.dist. Use that file as the ruleset instead of the built-in standard. github.com - Removed
PHPCS now requires PHP 5.4.0 or later. Users on older PHP versions must upgrade PHP before using this release. github.com
And 7 more in this version.
squizlabs/php_codesniffer 2.0.0 breaking changes
- Removed
Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff::$ignoreMultiLine
Generic_Sniffs_Formatting_MultipleStatementAlignmentSniff::$ignoreMultiLine was removed in squizlabs/php_codesniffer 2.0.0 packagist.org - Removed
Generic_Sniffs_WhiteSpace_ScopeIndentSniff::calculateExpectedIndent
Generic_Sniffs_WhiteSpace_ScopeIndentSniff::calculateExpectedIndent was removed in squizlabs/php_codesniffer 2.0.0 packagist.org
And 77 more in this version.
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.