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 Standards Laravel Package

typo3/coding-standards

TYPO3 Coding Standards provides ready-to-use PHP_CodeSniffer rulesets and tooling to enforce TYPO3 and PSR coding style. Helps keep extensions and projects consistent via Composer, CI integration, and automated linting/fixing recommendations.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package remains a well-aligned PHP_CodeSniffer ruleset for TYPO3 projects, now explicitly synchronized with the latest TYPO3 Core version (v0.8.0). Its integration into Laravel/PHP stacks is still seamless, particularly for projects leveraging TYPO3 extensions or Symfony components (now supporting v7). The package extends PHPCS without infrastructure overhead, making it ideal for enforcing TYPO3-specific coding standards alongside PSR-12 and Laravel conventions.

Integration feasibility: High, with improved compatibility. Installation via Composer (composer require typo3/coding-standards) remains straightforward, and CI/CD integration (e.g., GitHub Actions) is streamlined by updated workflows. The package now explicitly supports PHP 8.1+ and PHP-CS-Fixer versions aligned with the PER standard, reducing version-specific conflicts. The addition of a Code of Conduct and branch synchronization with TYPO3 Core further signals maturity.

Technical risk: Low to Moderate (previously Moderate).

  • Reduced risks:
    • Explicit PHP 8.1+ and PHPUnit 10+ support (via PR #91, #92) aligns with modern Laravel stacks.
    • Bugfixes (e.g., PR #83 for PHP-CS-Fixer compatibility, PR #126 for cache directory handling) address prior concerns.
    • Active maintenance (15 PRs in v0.8.0, 4 new contributors) and TYPO3 Core synchronization reduce drift risk.
  • Ongoing risks:
    • Symfony deprecations: Dropped support for Symfony 4/5 (PR #96, #130) may affect legacy Laravel projects using older Symfony components.
    • Custom rules: Potential conflicts with project-specific PHPCS configurations remain (e.g., PR #117 skips system/settings.php, which may not apply universally).
    • TYPO3 version lock-in: Rules are now tightly coupled with TYPO3 Core (PR #89, #90, #106), requiring validation against target TYPO3 versions (e.g., LTS 11.x/12.x).

Key questions:

  1. TYPO3/PHP version support: Does v0.8.0 explicitly support TYPO3 11.x/12.x? Are there known conflicts with Laravel’s Symfony 6/7 components (e.g., PR #119)?
  2. Customization: How do the new rules (PR #133) interact with Laravel’s existing PHPCS configurations (e.g., laravel-shift/php-pact)?
  3. Performance: Will the updated PHP-CS-Fixer config (PR #118) or PHPStan integration (PR #132) impact CI/CD runtime?
  4. Backward compatibility: Are there breaking changes for projects using v0.7.0? (E.g., Symfony 4/5 drops may affect Laravel <9.0.)
  5. Update cadence: How frequently are rules synced with TYPO3 Core (PR #109), and what’s the process for reporting conflicts?

Integration Approach

Stack fit: Excellent for Laravel projects using:

  • TYPO3 extensions (e.g., via typo3/cms or helhum/typo3-console).
  • Symfony 7+ components (PR #119).
  • PHP 8.1+ (Laravel 9/10).
  • Modern tooling: PHP-CS-Fixer (PER standard), PHPStan, and GitHub Actions.

Migration path:

  1. New projects:
    • Install via Composer: composer require typo3/coding-standards:^0.8.0.
    • Configure phpcs.xml to reference the ruleset:
      <config defaultStandard="TYPO3">
          <arg name="extensions" value="php"/>
      </config>
      
    • Run ./vendor/bin/phpcs --standard=TYPO3 and auto-fix with phpcbf.
  2. Existing projects:
    • Laravel-only: Replace custom PHPCS rules with typo3/coding-standards, then merge fixes incrementally.
    • TYPO3/Laravel hybrid: Validate against TYPO3 11.x/12.x first, then adjust for Laravel-specific needs (e.g., service container syntax).
    • CI/CD: Update workflows to use TYPO3 standard and PHP 8.1+ (see PR #122 for PHP 8.3 support).

Compatibility:

  • Confirmed: PHP 8.1–8.3, PHPUnit 10+, Symfony 7, TYPO3 LTS (likely 11.x/12.x).
  • Potential conflicts:
    • Symfony 6/7: PR #119 adds Symfony v7 support but may require adjustments for Laravel’s Symfony integration.
    • Legacy Laravel: Projects using Symfony 4/5 (e.g., Laravel <9.0) will need to upgrade or exclude Symfony-related rules.
    • Custom PHPCS: Projects extending PHPCS (e.g., for custom Laravel rules) may need to merge configurations.

Sequencing:

  1. Audit: Run phpcs against the codebase to identify violations.
  2. Fix: Use phpcbf for auto-fixes (e.g., PR #126’s cache fixes).
  3. Validate: Test with target TYPO3/PHP versions in CI.
  4. Customize: Override rules in phpcs.xml if needed (e.g., for Laravel’s facades or Blade templates).
  5. Enforce: Add to CI (e.g., GitHub Actions) with strict mode:
    - name: Run TYPO3 Coding Standards
      run: ./vendor/bin/phpcs --standard=TYPO3 --warning-severity=0 src/
    

Operational Impact

Maintenance:

  • Pros:
    • Active development (15 PRs in 3 months, 4 new contributors) reduces stagnation risk.
    • TYPO3 Core synchronization (PR #109) ensures relevance.
    • MIT license and Composer dependency simplify updates.
  • Cons:
    • Symfony deprecations (PR #96, #130) may require Laravel dependency updates.
    • Rule complexity: New rules (PR #133) may need documentation for Laravel teams unfamiliar with TYPO3 conventions.

Support:

  • Community: Limited but growing (66 stars → active PRs). TYPO3’s Slack/Discord or GitHub Discussions are viable channels.
  • Debugging: Issues like PR #126 (cache directory) suggest edge cases may require manual CI tweaks.
  • Laravel-specific: No dedicated Laravel support; may need to bridge gaps (e.g., Blade template rules).

Scaling:

  • Performance: Updated PHP-CS-Fixer config (PR #118) and PHPStan (PR #132) may increase CI runtime; test with large codebases.
  • Parallelization: PHPCS can be parallelized via --parallel flag for monorepos.
  • Resource usage: PHP 8.3+ and PHPStan add overhead; monitor memory usage in CI.

Failure modes:

  1. False positives: New rules (PR #133) may flag Laravel patterns (e.g., facades, service containers) as violations.
    • Mitigation: Whitelist directories or override rules in phpcs.xml.
  2. Version conflicts: Symfony 6/7 or PHP 8.3 dependencies may clash with Laravel’s composer constraints.
    • Mitigation: Use replace in composer.json or pin versions.
  3. TYPO3-specific rules: Rules like PR #117 (skipping system/settings.php) may not apply to Laravel-only projects.
    • Mitigation: Customize phpcs.xml to exclude irrelevant rules.

Ramp-up:

  • For Laravel teams:
    • 1–2 hours: Install and run initial checks.
    • 1 day: Resolve auto-fixable issues (phpcbf).
    • 1–2 weeks: Customize rules for Laravel-specific needs (e.g., Blade templates, DTOs).
  • Training: Document TYPO3-specific conventions (e.g., // @codingStandardsIgnoreStart) for developers.
  • Tooling: Integrate with Laravel IDE Helpers or PHPStorm PHPCS plugins for real-time feedback.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope