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

Symfony Aware Laravel Package

adtechpotok/symfony-aware

Symfony “aware” interfaces and traits for quickly injecting common services (EntityManager, Doctrine, cache, logger, kernel, request stack, etc.) into your classes. Works with explicit service calls or Symfony 3.3+ autowiring.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Dependency Injection (DI) Simplification: Enables cleaner, more maintainable DI patterns for Symfony/Laravel services by reducing boilerplate for common dependencies (e.g., Doctrine, Cache, DBAL). Aligns with roadmap goals to reduce technical debt in legacy systems or new projects requiring tight integration with Doctrine/Symfony services.
  • Build vs. Buy: Justifies buying (leveraging open-source) over building custom DI wrappers, especially for teams already using Symfony/Laravel. Saves dev time and ensures consistency with Symfony’s ecosystem.
  • Use Cases:
    • Legacy System Modernization: Retrofit older codebases with modern DI patterns without rewriting core logic.
    • Microservices: Standardize dependency injection across services using Doctrine/Symfony.
    • Plugin/Extension Development: Provide consistent access to framework services (e.g., EntityManager) in third-party packages.
    • Testing: Simplify mocking/stubbing of framework services in unit/integration tests.

When to Consider This Package

  • Adopt if:

    • Your project uses Symfony/Laravel + Doctrine and suffers from repetitive DI boilerplate (e.g., manually injecting EntityManager in 50+ services).
    • You’re building a plugin/extension ecosystem where consistent service access is critical.
    • Your team prioritizes cleaner code and reduced coupling in service layers.
    • You need a lightweight solution (MIT license, minimal overhead) and can tolerate the package’s last release in 2018 (check for forks or alternatives if critical updates are needed).
  • Look elsewhere if:

    • You’re not using Symfony/Laravel or Doctrine (package is Symfony-centric).
    • You need active maintenance (consider forks like php-aware or Symfony’s native DI components).
    • Your project requires Laravel-specific features (this package is Symfony-focused; Laravel has its own service container patterns).
    • You’re using modern Symfony 6+/Laravel 9+ and prefer native DI features (e.g., autowiring, attribute-based config).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets our dev team cut 30–50% of boilerplate code when injecting Symfony services like Doctrine or Cache into classes. By adopting it, we’ll:

  • Speed up development of new features (less manual DI setup).
  • Reduce bugs from inconsistent service injection.
  • Lower maintenance costs in legacy systems by standardizing patterns. It’s a low-risk, high-reward open-source tool (MIT license) that aligns with our Symfony/Laravel stack. The trade-off is minimal—we’d need to validate its compatibility with our current setup, but the payoff in developer productivity is clear."*

For Engineering:

*"Problem: We’re wasting time manually injecting @doctrine.orm.entity_manager or @cache.app in every service. This package provides traits/interfaces to auto-wire these dependencies with zero boilerplate. Benefits:

  • Cleaner code: Replace public function setEntityManager(EntityManager $em) with a trait.
  • Consistency: Enforce a standard way to access framework services across the codebase.
  • Testability: Easier to mock/stub services in tests. Risks:
  • Last updated in 2018 (but stable and widely used in Symfony ecosystems).
  • Symfony-focused (Laravel teams may need adjustments). Recommendation: Pilot in a non-critical module first to validate integration with our DI setup. If successful, roll it out to reduce technical debt."*

Note: Pair this with a compatibility audit (e.g., test with Symfony 5.4+/Laravel 8+) and consider forking if active maintenance is required.

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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui