Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Coding Standard Laravel Package

slevomat/coding-standard

View on GitHub
Deep Wiki
Context7
8.28.1

🐛 Fixes

  • SlevomatCodingStandard.ControlStructures.NewWithoutParentheses: Fix to allow empty parentheses when followed by member access operators for PHP 8.4+ chaining
  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: Use existing alias (thanks to @Khartir)
  • Fixed undefined array key in ReferencedNameHelper when processing fully-qualified names in strings (thanks to @AlexSkrypnyk)
8.28.0

🔧 Improvements

  • SlevomatCodingStandard.Classes.TraitUseOrder: New sniff (thanks to @h4kuna)
  • SlevomatCodingStandard.Commenting.ThrowsAnnotationsOrder: New sniff (thanks to @h4kuna)
  • SlevomatCodingStandard.Exceptions.CatchExceptionsOrder: New sniff (thanks to @h4kuna)
8.27.1

🐛 Fixes

  • Fixed DocCommentHelper::findDocCommentOwnerPointer()
  • Fixed ignoring some errors with #[Override] attribute (thanks to @greg0ire)
8.27.0

🔧 Improvements

  • Disable some errors for properties with #[Override] attribute (thanks to @kkmuffme)
  • Disable some errors for methods with #[Override] attribute (thanks to @greg0ire)

🐛 Fixes

  • Do not remove true/false phpdoc if type hint is bool (thanks to @kkmuffme)
8.26.0

🔧 Improvements

  • SlevomatCodingStandard.Classes.ClassKeywordOrder: New sniff (thanks to @kamil-zacek)

🐛 Fixes

  • SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator: Workaround for missing property hooks support in PHPCS
8.25.1

🐛 Fixes

  • Slevomat.Classes.DisallowMultiPropertyDefinition: Fixed for property hooks
8.25.0

🔧 Improvements

  • SlevomatCodingStandard.Functions.RequireMultiLineCall: New option minParametersCount (thanks to @parth391)
  • SlevomatCodingStandard.Functions.RequireMultiLineCall: New option excludedCallPatterns (thanks to @parth391)
  • SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature: New option withParametersWithAttributes
  • SlevomatCodingStandard.PHP.UselessParentheses: Option enableCheckAroundNew is disabled if target PHP version is lower 8.4
  • Support $this as a valid traversable parameter type (thanks to @alies-dev)
  • Fix typo in comment (thanks to @vrana)
  • Improved documentation (thanks to @jrfnl)

🐛 Fixes

  • SlevomatCodingStandard.Whitespaces.DuplicateSpaces: Fixed false positive
  • SlevomatCodingStandard.Complexity.Cognitive: Fixed internal error for closures
8.24.0

🔧 Improvements

  • SlevomatCodingStandard.Commenting.RequireOneDocCommentSniff: New sniff (thanks to @kamil-zacek)
  • SlevomatCodingStandard.PHP.UselessParentheses: Checks useless parentheses around (new class())->f() via new option enableCheckAroundNew (thanks to @vrana)
  • SlevomatCodingStandard.Classes.ClassStructure: Support for suffix filtering (thanks to @DjLeChuck)

🐛 Fixes

  • SlevomatCodingStandard.PHP.ForbiddenClasses: Fixed internal errors
  • SlevomatCodingStandard.TypeHints.ClassConstantTypeHint: [@var](https://github.com/var) class-string is not useless
8.23.0

🔧 Improvements

8.22.1

🐛 Fixes

  • SlevomatCodingStandard.Functions.StaticClosure: Fixed false positive when $this is the last token
8.22.0

🔧 Improvements

  • SlevomatCodingStandard.Functions.UnusedParameter: New option allowedParameterPatterns to suppress check for specific parameter names (thanks to @claytonrcarter)

🐛 Fixes

  • SlevomatCodingStandard.Attributes.AttributesOrder: Fixed alphabetical sorting
  • SlevomatCodingStandard.Functions.DisallowEmptyFunction: Private or protected constructor should not be reported
  • SlevomatCodingStandard.TypeHints.ReturnTypeHint: Report missing type hint in abstract methods (thanks to @vrana)
  • Fixed deprecated errors in PHP 8.5
  • Fixed attributes parsing
8.21.1

🐛 Fixes

  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: Fixed false positive
8.21.0

🔧 Improvements

  • SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature: New option withPromotedProperties (thanks to @vrana)
  • Improved support for non-official type hints (thanks to @kkmuffme)

🐛 Fixes

  • SlevomatCodingStandard.Classes.ConstantSpacing: Some fixes
  • Fix void cannot be changed to null and never/void cannot be used in a union (thanks to @kkmuffme)
8.20.0

🔧 Improvements

  • SlevomatCodingStandard.TypeHints.ParameterTypeHint: Don't report missing native type hint when method has #[Override] attribute
  • SlevomatCodingStandard.Classes.TraitUseSpacing: Allow null in linesCountAfterLastUse option (thanks to @vrana)
  • SlevomatCodingStandard.Classes.PropertySpacing: New options minLinesCountBeforeMultiline and maxLinesCountBeforeMultiline (thanks to @vojtech-dobes)
  • SlevomatCodingStandard.Classes.ConstantSpacing: New options minLinesCountBeforeMultiline and maxLinesCountBeforeMultiline (thanks to @vojtech-dobes)

🐛 Fixes

  • Attributes should be processed by FQN
8.19.1

🐛 Fixes

  • Fix properties detection in some sniffs
  • Improved indentation processing
8.19.0

🔧 Improvements

  • Support of PHP 8.4 properties
    • Asymetric visibility supported
    • final/abstract properties supported
    • Property hooks should not break any sniff

🐛 Fixes

  • SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed: Fixed false positive
  • SlevomatCodingStandard.Classes.ClassMemberSpacing: Prevent deleting unexpected code/comments (thanks to @maryo)
  • SlevomatCodingStandard.Complexity.Cognitive: do...while loop should only increment once (not for both the T_DO and T_WHILE) (thanks to @bkdotcom)
  • SlevomatCodingStandard.TypeHints.ClassConstantTypeHint: New option fixableNativeTypeHint - it's possible to fix only private constants (thanks to @maryo)
  • SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion: Properly autofixing when argument name has an attribute (thanks to @maryo)
8.18.1

🐛 Fixes

  • SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration: Fix error when no code is found after [@var](https://github.com/var) (thanks to @AegirLeet)
  • SlevomatCodingStandard.PHP.UselessParentheses: Fixed false positive for bitwise not operator
8.18.0

🔧 Improvements

  • SlevomatCodingStandard.Classes.ClassStructure: Support for custom method groups based on method name prefix (thanks to @maryo)

🐛 Fixes

  • SlevomatCodingStandard.Functions.RequireMultiLineCall: Fix reporting multiline call which exactly fits into line length limit (thanks to @maryo)
8.17.1

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fix
8.17.0

🔧 Improvements

  • SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator: New option checkIfConditions

🐛 Fixes

  • SlevomatCodingStandard.Classes.MethodSpacing: Fixed check for methods with more attributes
8.16.2

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.ReturnTypeHint: Fixed false positive
  • SlevomatCodingStandard.Variables.UnusedVariable: Fixed false positive
  • SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint: Fix logic error (thanks to @jrfnl)
8.16.1

🐛 Fixes

  • Fixed BC break
8.16.0

⚠️

  • Drop PHP 7.2 and 7.3 support
  • Tested on PHP 8.4 but no support for PHP 8.4 features
  • Update to phpstan/phpdoc-parser 2.0 (thanks to @ondrejmirtes)

🆕 New sniffs

  • SlevomatCodingStandard.TypeHints.ClassConstantTypeHint: Checks type hint of class constants (thanks to @DaDeather)
  • SlevomatCodingStandard.TypeHints.DNFTypeHintFormat: Checks format of DNF type hints

🔧 Improvements

  • SlevomatCodingStandard.Classes.ClassStructure: Support for invoke method group
  • SlevomatCodingStandard.Classes.ClassStructure: Support for definition of custom groups (thanks to @maryo)
  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: New option allowWhenNoNamespace
  • SlevomatCodingStandard.Classes.ForbiddenPublicProperty: New option allowReadonly - Add support for allowing public readonly properties (thanks to @tfrommen)
  • SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint: Does not report error when attribute #[Override] is presented (thanks to @kamil-zacek)
  • SlevomatCodingStandard.PHP.UselessParentheses: Checks useless parentheses in (new Foo());
  • Remove use of deprecated T_ARRAY_HINT (thanks to @jrfnl)

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: Some references were not detected
  • SlevomatCodingStandard.TypeHints.DeclareStrictTypes: Fixing number of empty lines when previous effective token before declare is line comment (thanks to @maryo)
  • SlevomatCodingStandard.Classes.MethodSpacing: Fix check for method with attributes
  • SlevomatCodingStandard.Classes.PropertyDeclaration: Fixed false positives where there's function with static return type hint before property
  • SlevomatCodingStandard.ClassesEnumCaseSpacing: Fixed internal error (thanks to @v.fateev)
  • SlevomatCodingStandard.ClassesConstantSpacing: Fixed internal error (thanks to @v.fateev)
  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fixed false positive for object shape as item in travesable type
  • SlevomatCodingStandard.ControlStructures.NewWithParentheses: Fixed false positive for readonly anonymous class
  • SlevomatCodingStandard.ControlStructures.DisallowYodaComparison: Fixed fixer
  • SlevomatCodingStandard.PHPUselessParentheses: Fixed false positive
  • SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking: sprintf() is optimized too
  • Documentation fixes (thanks to @edpittol and @tfrommen)

🗑️ Deprecated

  • SlevomatCodingStandard.TypeHints.UnionTypeHintFormat: Use SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead
8.15.0

🔧 Improvements

  • Speedup of sniffs working with use
  • Removed for a long time deprecated FunctionLength sniff in Files namespace

🐛 Fixes

  • SlevomatCodingStandard.Classes.ClassConstantVisibility: Fixed error message for typed constants
  • SlevomatCodingStandard.Namespaces.UnusedUses: Fixed false positive thanks to PHPCS upgrade
  • SlevomatCodingStandard.Namespaces.UnusedUses: Fix class detection in double-quoted strings and heredoc (thanks to @c01l)
  • SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch: Fixed false positives
  • SlevomatCodingStandard.Functions.RequireTrailingCommaInCall: Fixed missing report for missing trailing comma after arrow function
  • SlevomatCodingStandard.Commenting.UselessFunctionDocComment: It should report simple array as useless
  • Fixed internal error in CommentHelper
8.14.1

🐛 Fixes

8.14.0

🆕 New sniffs

  • SlevomatCodingStandard.Functions.NamedArgumentSpacing: Checks spacing in named argument (thanks to @mzk)

🔧 Improvements

  • SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses: If the file contains a group use then ignore the file completely (thanks to @jonathan1055)
  • SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: New option ignoredAnnotationNames (thanks to @gemal)

🐛 Fixes

  • SlevomatCodingStandard.ControlStructures.AssignmentInCondition: Prevent error during live coding (thanks to @jrfnl)
  • SlevomatCodingStandard.ControlStructures.RequireSingleLineCondition: Prevent error during live coding (thanks to @jrfnl)
  • SlevomatCodingStandard.PHP.UselessParentheses: Prevent error during live coding (thanks to @jrfnl)
  • SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation: Recognize global statements (thanks to @jrfnl)
  • SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants: Don't treat a group use as a constant (thanks to @asispts)
  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: Fixed false positives
  • SlevomatCodingStandard.Classes.ConstantSpacing: Fixed internal error
  • SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration: Fixed false positive for final constant
  • SlevomatCodingStandard.Namespaces.UnusedUses: Ignores uses in annotations with multi lines string arguments (thanks to @mathroc)
  • NamespaceHelper::getAllNamespacesPointers(): Allow for namespace tokens used as operator (thanks to @jrfnl)
8.13.4

🐛 Fixes

  • Fixed detection of {[@inheritdoc](https://github.com/inheritdoc)}
8.13.3

🐛 Fixes

  • SlevomatCodingStandard.Commenting.DocCommentSpacing: Fixed internal error for invalid doccomment
8.13.2

🐛 Fixes

  • SlevomatCodingStandard.Commenting.UselessFunctionDocComment: Fixed false positives
  • SlevomatCodingStandard.Commenting.DocCommentSpacing: Fixed false positives
  • SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing: Fix TypeError when return is on the first line of the file (thanks to @herndlm)
8.13.1

🐛 Fixes

  • SlevomatCodingStandard.Commenting.DocCommentSpacing: Fixed fixer
  • SlevomatCodingStandard.Commenting.UselessFunctionDocComment: Fixed false positive
  • Don't parse invalid doccomments
8.13.0

🔧 Improvements

  • Refactored documentation comments parsing

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.ParameterTypeHint: callable is not valid type for property promotion
8.12.1

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: Fixed false positive
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport