- Restrict php-cs-fixer version 3.65.0 (included in ECS version 12.4+) from being installed because of bug in
NullableTypeDeclarationFixer
.
- Disable incorrectly behaving PhpdocAlignFixer.
- Add most of the available checks for PER-2 coding style.
- Add many new checks from
php-cs-fixer
up to version 3.56. - Add available php-cs-fixer rules for PHP 8.1 and 8.2 (which are automatically run only on compatible PHP versions).
- BC: Update to symplify/easy-coding-standard ^12.1 and change configuration format in
ecs.php
. See UPGRADE-4.0.md for step-by-step upgrade howto. - BC: Move coding standard declarations from
ecs-7.4.php
,ecs-8.0.php
andecs-8.1.php
toecs.php
and remove the former files. - BC: Change base coding standard from PSR-2 to PSR-12.
- BC: Change deprecated
php-cs-fixer
sniffs to new ones. - Rebrand to Alma Career in documentation and meta information.
- Require PHP ^8.0.
- Update to slevomat/coding-standard ^8.0.
- Update to squizlabs/php_codesniffer ^3.9.
- Refactor: Remove nette/utils dependency.
- Add tests to ensure the code style defined by this library is being properly checked and fixed.
- Lock
symplify/easy-coding-standard
to <10.2.4 because of backward incompatibilities introduced in its bugfix releases.
- Update to symplify/easy-coding-standard ^10.0
- Allow
slevomat/coding-standard
^7 - Add new
ecs-8.0.php
coding standard declaration file for PHP 8.0+. - Add new
ecs-8.1.php
coding standard declaration file for PHP 8.1+.
- Fix SpecifyArgSeparatorFixer type error when adding empty
$numeric_prefix
parameter in PHP 7.4+.
- Fix SpecifyArgSeparatorFixer not compatible with php-cs-fixer 3.0.
- Add new
ecs-7.4.php
coding standard declaration file for PHP 7.4+.
- Use php-cs-fixer 3.0.
- Use new prefixed version of symplify/easy-coding-standard.
PhpUnitExpectationFixer
is now used only on PHP 8.0+. See symplify#3130.
- [BC break] Change YAML config to PHP. See UPGRADE-3.0.md for step-by-step upgrade howto.
- Replace
Symplify\CodingStandard\Sniffs\Naming\[AbstractClassNameSniff, ClassNameSuffixByParentSniff, InterfaceNameSniff and TraitNameSniff]
with equivalent versions backported to this repository. - Drop PHP 7.2 support.
- Upgrade to easy-coding-standard 9.
- Add new fixers from PHP-CS-Fixer 2.17:
ArrayPushFixer
- Converts simple usages ofarray_push($x, $y);
to$x[] = $y;
.SwitchContinueToBreakFixer
- Switch case must not be ended withcontinue
but withbreak
.LambdaNotUsedImportFixer
- Lambda must not import variables it doesn't use.NoUselessSprintfFixer
- There must be nosprintf
calls with only the first argument.SingleSpaceAfterConstructFixer
- Ensures a single space after language constructs.CleanNamespaceFixer
- Namespace must not contain spacing, comments or PHPDoc.TernaryToElvisOperatorFixer
- Use the Elvis operator?:
where possible.PhpdocOrderByValueFixer
Order phpdoc tags by value (order by default contents of 'covers', 'group' and 'throws').HeredocIndentationFixer
- Heredoc/nowdoc content must be properly indented.
- Add new PHP_CodeSniffer sniffs:
GitMergeConflictSniff
- Detects merge conflict artifacts left in files.
- Add various dangerous function calls to list of forbidden functions.
- Fix an improper fix of PSR-2 checks made in 2.0.3 to really make them being used again.
- Fix PSR-2 checks to be used again (they were unintentionally not loaded since coding-standard version 2.0.0).
- Lock dependency of
symplify/coding-standard
to <7.2.20 to avoid deprecation errors.
- Increase required version of symplify/easy-coding-standard to ^7.2.3.
- Temporarily disable
ArrayDeclarationSniff.ValueNoNewline
because of bug in PHP_CodeSniffer 3.5.5.
- BC: change the way the standard is imported to your
easy-coding-standard.yaml
(change%vendor_dir%
placeholder directly to name of the vendor directory likevendor
). See example in README. - Drop PHP 7.1 support.
- Require EasyCodingStandard 7+.
VisibilityRequiredFixer
now check visibility is declared also on class constants.- Add
Symplify\ParamReturnAndVarTagMalformsFixer
- the@param
,@return
and@var
annotations should keep standard format. - Add new fixers from PHP-CS-Fixer 2.15 and 2.16:
NativeFunctionTypeDeclarationCasingFixer
- native type hints for functions should use the correct case.SingleTraitInsertPerStatementFixer
- each traituse
must be done as single statement.PhpUnitDedicateAssertInternalTypeFixer
- PHPUnit assertions likeassertIsArray()
should be used overassertInternalType()
(PHPUnit 7.5+ required).PhpUnitMockShortWillReturnFixer
- Use of eg.->will($this->returnValue(..))
must be replaced by its shorter equivalent such as->willReturn(...)
.
NoSuperfluousPhpdocTagsFixer
now also removes superfluous@inheritdoc
tags.
- Require EasyCodingStandard 5+.
- Add new fixers from PHP-CS-Fixer 2.14 and 2.13:
CombineNestedDirnameFixer
- replace multiple nested calls ofdirname
by only one call with second$level
parameter.FopenFlagOrderFixer
- order the flags infopen
calls,b
andt
must be last.FopenFlagsFixer
- the flags infopen
calls must containb
and must omitt
.ImplodeCallFixer
- functionimplode
must be called with 2 arguments in the documented order.PhpdocVarAnnotationCorrectOrderFixer
-@var
and@type
annotations must have type and name in the correct order
- Keep
@mixed
annotations preserved when explicitly declared.
- Replace deprecated
Symplify\CodingStandard\Fixer\Naming\MagicMethodsNamingFixer
withPhpCsFixer\Fixer\Casing\MagicMethodCasingFixer
. - Add new fixers:
NoSuperfluousPhpdocTagsFixer
to remove unnecessary@return
and@param
PHPDocs.PhpUnitTestCaseStaticMethodCallsFixer
to unify how assertion methods in PHPUnit tests are called.SetTypeToCastFixer
to ensure casting is used instead ofsettype()
.
- Change deprecated implementation of
Symplify\CodingStandard\Fixer\Naming\ClassNameSuffixByParentFixer
toSymplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff
- Fix
Generic.Commenting.DocComment.SpacingBeforeTags
being reported on one-line phpDoc annotations (when PHP_Codesniffer 3.3.0+ is used).
- Add
SpecifyArgSeparatorFixer
to make sure arg_separator is always defined when usinghttp_build_query()
function. - Add PHPUnit fixers:
PhpUnitMockFixer
: Ensure dedicated helper methodscreateMock()
andcreatePartialMock()
are used where possible instead of->getMock()
.PhpUnitNoExpectationAnnotationFixer
: UsesetExpectedException()
instead of@expectedException
annotation.PhpUnitSetUpTearDownVisibilityFixer
: Visibility ofsetUp()
andtearDown()
method should be kept protected as defined in PHPUnit TestCase.
- Do not check for
EventSubscriber
class suffixes viaClassNameSuffixByParentFixer
.
- Replace deprecated
ExceptionNameFixer
with more genericClassNameSuffixByParentFixer
.
- Initial version