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

ramsey/coding-standard

ramsey/coding-standard provides Ramsey’s PHP_CodeSniffer ruleset to enforce consistent, modern PHP style across projects. Easy to install, integrates with CI, and helps catch formatting and code quality issues early with sensible defaults.

View on GitHub
Deep Wiki
Context7
2.4.0
  • Allow PHP_CodeSniffer version 4.
2.3.1
  • Use Generic.WhiteSpace.LanguageConstructSpacing instead of the deprecated Squiz.WhiteSpace.LanguageConstructSpacing.
2.3.0
  • Switch from SlevomatCodingStandard.TypeHints.UnionTypeHintFormat to SlevomatCodingStandard.TypeHints.DNFTypeHintFormat.
  • Bump minimum required version of slevomat/coding-standard to ^8.16.0.
2.2.0
  • Set minimum PHP version to 8.1.
2.1.0

Changed

  • Bump phpcsstandards/phpcsextra and dealerdirect/phpcodesniffer-composer-installer to their stable 1.0 releases.
2.0.3

Fixed

  • Allow comments to run longer than 120 characters.
2.0.2

Fixed

  • Allow doc comments without variable names above return statements.
2.0.1

Fixed

  • Ignore the IncorrectWhitespaceBeforeDeclare error emitted by the SlevomatCodingStandard.TypeHints.DeclareStrictTypes sniff.

    In my personal projects, I usually have 2 newlines before the declare statement. One before the file header comment and one after. However, in tests, I have no file header comment, so there is only 1 newline before the declare statement. Since I like my tests to follow the same coding standard as the rest of my source, it is easiest to ignore this error.

2.0.0

Added

  • Check format of union type hints on PHP 8, using SlevomatCodingStandard.TypeHints.UnionTypeHintFormat.

Changed

  • Upgrade to slevomat/coding-standard version 7.

    This may require downstream changes, since some Slevomat sniffs have BC breaks. This is why ramsey/coding-standard is bumping to version 2.0.0 for this change.

    See the Slevomat changelog for 7.0.0 for details.

1.3.0

Added

  • Enforce the use of strict comparisons.
  • Check for and disallow duplicate spaces everywhere.
1.2.0

Added

  • Revised rules for absolute class name references
1.1.2

Fixed

  • Use correct command prefixes
1.1.1

Fixed

  • Explicitly require PHPCSUtils to avoid setting minimum-stability
1.1.0

Changed

  • Package name is now "ramsey/coding-standard"

This is technically a BC break, so I am sorry, but since this package is brand new and so few have downloaded to date, I decided to go ahead and make this change in the 1.x series.

1.0.3

Fixed

  • Allow bin dir in dist packages, avoiding Composer warnings
1.0.2

Fixed

  • Move ext-dom to require-dev
1.0.1

Fixed

  • Remove unnecessary (and unused) tools, commands, and code
1.0.0

Added

  • Initial release of Ramsey coding standard
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