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

Lts Laravel Package

symfony/lts

Symfony LTS provides long-term support releases of the Symfony framework, delivering extended security and bug fixes for stable production apps. Ideal for teams needing predictable upgrade cycles, maintained components, and a supported baseline over multiple years.

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation: Add the package to your project via Composer:

    composer require symfony/lts --dev
    

    This is typically used in a development environment to enforce LTS (Long-Term Support) versions of Symfony components.

  2. First Use Case:

    • Add the package as a Composer plugin in composer.json:
      {
        "require-dev": {
          "symfony/lts": "^1.0"
        },
        "config": {
          "allow-plugins": {
            "symfony/lts": true
          }
        }
      }
      
    • Run composer update to trigger version checks.
  3. Where to Look First:

    • Check composer.json for enforced Symfony component versions.
    • Review composer.lock for violations after updates.
    • Read the Symfony LTS documentation for version compatibility.

Implementation Patterns

Workflow Integration

  1. Enforcing LTS Versions:

    • Use the package to block non-LTS Symfony component updates during development.
    • Configure allowed versions in composer.json:
      "extra": {
        "symfony-lts": {
          "components": ["framework-bundle", "http-kernel"],
          "versions": ["^6.4"]
        }
      }
      
    • Run composer update to auto-correct or block incompatible versions.
  2. CI/CD Pipeline:

    • Add a pre-update hook in CI to fail builds if non-LTS versions are detected:
      # Example GitHub Actions step
      - name: Enforce LTS versions
        run: composer validate --strict --no-check-publish
      
  3. Team Collaboration:

    • Use the package to standardize Symfony versions across a team.
    • Document allowed versions in CONTRIBUTING.md or README.md.
  4. Legacy Projects:

    • Gradually migrate to LTS by updating one component at a time while the package enforces constraints.

Gotchas and Tips

Pitfalls

  1. False Positives:

    • The package may flag dev dependencies (e.g., symfony/debug-bundle) as violations if not explicitly whitelisted.
    • Fix: Exclude dev-only components in extra.symfony-lts.ignore.
  2. Lockfile Conflicts:

    • Running composer update with the package may fail silently if composer.lock has outdated entries.
    • Fix: Delete composer.lock and run composer install to regenerate it.
  3. Plugin Conflicts:

    • Other Composer plugins (e.g., dealerdirect/phpcodesniffer-composer-installer) may interfere.
    • Fix: Order plugins in composer.json or use --no-plugins for debugging.
  4. Symfony Flex Compatibility:

    • The package may not work seamlessly with Symfony Flex recipes.
    • Fix: Manually override recipes in config/bundles.php if needed.

Debugging Tips

  1. Dry Runs: Use --dry-run to preview changes:

    composer update --dry-run
    
  2. Verbose Output: Enable debug mode for detailed logs:

    composer update -v
    
  3. Custom Validation: Extend the package’s logic by creating a custom Composer script:

    "scripts": {
      "post-update-cmd": "php vendor/bin/symfony-lts-check"
    }
    

Extension Points

  1. Custom Rules: Override default LTS checks by extending the package’s SymfonyLtsPlugin class in a custom plugin.

  2. Integration with PHPStan: Use phpstan/extension-installer to auto-load the package’s rules:

    composer require --dev phpstan/extension-installer
    
  3. Git Hooks: Add a pre-commit hook to block non-LTS commits:

    composer require --dev dealerdirect/phpcodesniffer-composer-installer
    
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
codifyo/ts-generator-bundle
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
christhompsontldr/laravel-inky
spatie/mailcoach-vapor