Weave 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

Php Code Style Laravel Package

longman/php-code-style

longman/php-code-style gives Laravel and PHP projects an opinionated, ready-to-use code style setup, bundling fixer rules and configs so teams can enforce consistent formatting and catch style issues with minimal effort.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. longman/php-code-style is not application code — it is a set of opinionated code-style configuration artifacts (lint/format rules) intended to be consumed by developer tooling and CI. Its architectural footprint is therefore a build-time/DevEx layer, not a runtime dependency. It is framework-agnostic and does not entangle with Laravel's service container, autoloading conventions, or package discovery, which keeps the blast radius small: removing it later is a config-file revert, not a refactor.

Integration feasibility. MIT licensed, publicly readable, and small enough to fork or vendor wholesale, so technical feasibility is high even though the package itself is dormant. The practical constraint is not adoption effort — it is tool drift. The last release was June 2017, which predates PHP 8.0 and the PHP-CS-Fixer 2.x → 3.x rule renames and PHP_CodeSniffer 2.x → 3.x migration. Consumers today are effectively consuming a historical reference config, not a maintained standard.

Technical risk. Rated high for drift, low for security. Because the package ships no executable runtime code, the CVE surface is limited; the real risks are (a) rule names or sniff codes that no longer resolve in current tool versions and hard-fail CI, (b) the ruleset under-covering or actively rejecting modern syntax — enums, readonly properties/classes, constructor property promotion, attributes, first-class callables — producing false positives on valid PHP 8.x, (c) 0 dependents meaning no community validation signal, and (d) PSR-2-era defaults conflicting with PSR-12/modern Laravel conventions. A TPM should treat this as reference material, not a dependency.

Key questions for the maintainer/team.

  • Which underlying engine does it target — PHP_CodeSniffer, PHP-CS-Fixer, or EditorConfig — and is the rule set portable across them?
  • Does it pin tool versions in composer.json, or does it float and break unpredictably?
  • What is our supported PHP matrix in production, and does this config cover it?
  • Is the goal standardization across repos, or a one-time reformat?
  • Who owns the fork when upstream is silent?
  • Do we need IDE auto-format parity (PhpStorm/PHPStan/Pint) to prevent diff churn?

Integration Approach

Stack fit. The config applies cleanly to any PHP codebase, Laravel included, but it should be mapped onto the tool the team already standardizes on rather than adopted as a package. For Laravel shops the pragmatic target is Laravel Pint (a PHP-CS-Fixer wrapper) with a pint.json; for non-Laravel repos, phpcs.xml.dist or .php-cs-fixer.dist.php. Treat longman/php-code-style as a source of rule intent and transcribe it.

Migration path.

  1. Do not add the package to require-dev. Vendor the relevant config into the repo root (or a tools/style/ directory) and commit it, so the standard is versioned with the code it governs.
  2. Pin the formatter itself to an exact version (php-cs-fixer/shim or laravel/pint at a fixed release) to make CI deterministic.
  3. Run the config in report-only mode across the default branch first to quantify violation volume before enforcing.

Compatibility. Validate rule-by-rule against the current tool release: many 2017-era rule names were renamed, merged, or deprecated. Expect PSR-2 → PSR-12 alignment work and the addition of modern-syntax exemptions. Gate adoption on the team's PHP version floor; a config that cannot parse PHP 8.1 syntax is a blocker, not a nuisance.

Sequencing.

  1. Inventory existing lint/format tooling and IDE settings per repo.
  2. Baseline scan; produce a violation report and a decision on reformat-vs-grandfather.
  3. Schedule a short branch-freeze or dedicated reformat PR window; land one mechanical commit and register it in .git-blame-ignore-revs.
  4. Wire the formatter into pre-commit hooks and CI as advisory.
  5. Promote CI to blocking only after the baseline commit is merged.
  6. Document the exception/escalation path (inline ignores, per-ruleset opt-outs).

Operational Impact

Maintenance. Upstream maintenance is effectively zero. Ownership transfers to the adopting team: budget roughly 1–3 engineer-days for the initial transcription and reformat, then ~1–2 days per year tied to PHP and formatter upgrades. Because the config is vendored, there is no dependency to bump and no upstream breakage risk — the tradeoff is that all future tool upgrades are your responsibility.

Support. No vendor, no maintainer, no issue-tracker responsiveness; "support" is internal tribal knowledge. This is acceptable for a style ruleset in a way it would not be for a runtime library, but it must be explicitly owned in the engineering handbook — an unowned lint config silently decays into either red CI or rubber-stamped ignores.

Scaling. Cost is negligible and largely fixed: CI minutes scale linearly with lines of code and parallelize cleanly across shards. No operational runtime burden, no capacity planning, no on-call surface. The scaling concern is organizational, not technical — every new repo needs the config propagated, which argues for a shared template or a generator rather than copy-paste drift.

Failure modes.

  • Tool upgrade breaks rule resolution → CI fails on unrelated PRs; mitigate with pinned versions and a canary repo.
  • Silent under-coverage → new language features pass unreviewed while the team believes style is enforced; mitigate with periodic --dry-run audits on a modern-syntax fixture file.
  • Reformat churn → one giant diff wrecks git blame and blocks backports; mitigate with a coordinated window and blame-ignore.
  • Formatting/lint conflated with quality → reviewers relax on semantics because "the linter passed."
  • Upstream disappearance from Packagist — irrelevant if vendored; fatal if depended upon.

Ramp-up. Low for developers already familiar with Pint/PHP-CS-Fixer — roughly half a day of onboarding covering how to run the formatter, how to suppress a rule, and the CI gate. The heavier lift is change-management around the one-time reformat and agreeing which rules the team will actually enforce rather than aspire to.

Bottom line. Low score (0.075) and 9 stars reflect reality: this is a 2017-era style artifact with no dependents and no forward maintenance. A TPM should leverage the intent, not the package — mine the ruleset, transcribe it onto a pinned modern formatter (Pint for Laravel), vendor it in-repo, and own it internally. Direct adoption as a Composer dependency is not recommended.

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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons