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

Standards Laravel Package

graze/standards

Graze Coding Standards: a cross-language style guide for the Graze tech team. Covers general formatting rules, Git conventions, and standards for PHP, HTML, JavaScript, Python, SQL, CSS/Less, Markdown, and Go, plus open source and environment guidance.

View on GitHub
Deep Wiki
Context7
v3.0.0

Breaking changes

  • Requires squizlabs/php_codesniffer: ^4.0. Drops PHPCS 3 support entirely. Consumers must upgrade both squizlabs/php_codesniffer to ^4.0 and graze/standards to ^3.0 together.

What's changed

  • Ruleset migrated to PHPCS 4: Generic.WhiteSpace.ScopeIndent's ignoreIndentationTokens now uses <element value="..."/> nodes (legacy comma-separated form removed), and Generic.Functions.CallTimePassByReference is dropped (sniff removed in PHPCS 4; modern PHP enforces this at the language level).
  • All sniffs updated to PHPCS 4's tightened Sniff interface (register(): array return type).
  • CI migrated from Travis to GitHub Actions, with a PHP 7.2–8.5 matrix plus markdown lint and gh-pages mkdocs deploy on main.

See #53 for full details.

v2.0.5

Previously the error message for the Graze.Naming.AbstractClassNaming sniff showed a placeholder rather than the class name, like this:

Abstract class name "%s" must be prefixed with "Abstract"

It now correctly shows the class name, like this:

Abstract class name "Foo" must be prefixed with "Abstract"
v2.0.4

This version ensures that when you run phpcs with the -s flag, the custom sniffs included will produce a message that actually matches the sniff name.

Previously you would see this:

------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
 13 | ERROR | Space found after logical NOT operator
    |       | (graze.controlStructures.NegationNoSpaces)
------------------------------------------------------------------------------------------------

That's not the name of the sniff and so if you try to do anything with that (eg. adding it to a ruleset) phpcs will complain that the sniff does not exist.

Now you will correctly see this instead:

------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
 13 | ERROR | Space found after logical NOT operator
    |       | (Graze.ControlStructures.NegationNoSpaces)
------------------------------------------------------------------------------------------------
v2.0.3

Adds a new sniff (Graze\Sniffs\ControlStructures\NegationNoSpacesSniff) to check for the following rule:

'Not' logical operators MUST NOT have whitespace between them and the subject being negated.

This means that the following will now produce an error:

$foo = ! $bar;

This can be fixed by removing the whitespace:

$foo = !$bar;
v2.0.2

The following class definition no longer causes the abstract name checking sniff to crash:

<?php
class Foo
{
}
v2.0.1

Fix for checking for doc comments with child functions:

this should be valid:

function first()
{
    /**
     * [@return](https://github.com/return) string
     */
    function second()
    {
        return '2';
    }

    second();
}
v2.0.0

This updates phpcs to version 3.0.2. And requires a major version bump as a result.

v1.0.0
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity