Introducing Symfony Autowiring Integration for Spryker

Dmitriy Krainiy
Dmitriy Krainiy Sprykee Posts: 4 🧑🏻‍🚀 - Cadet
edited May 21 in Spryker Development

We’re excited to announce the first step toward integrating Symfony’s powerful autowiring capabilities into the Spryker framework! This initiative aims to reduce boilerplate code, improve developer productivity, and offer a smoother dependency injection (DI) experience—without changing the core architecture of Spryker.

Why Symfony Autowiring in Spryker?

Spryker is built on a robust modular architecture with factories, dependency providers, facades, and plugins. While this design provides flexibility and extensibility, it often requires writing a considerable amount of “glue” code to manage dependencies.

Symfony’s Dependency Injection component, especially autowiring, simplifies this by automatically resolving and injecting dependencies based on type hints — significantly reducing the amount of manual wiring needed.

Our goal is to bring this convenience to Spryker developers without turning Spryker into a Symfony app. We want to keep the existing Spryker infrastructure fully supported, while enabling a cleaner, more modern DI approach.

What’s Included in This First Integration?

  • Supported Application: Yves storefront application.
  • Cross-application and Yves-specific DI configurations are supported via easy-to-edit PHP service files.
  • Codebucket support to keep things organized and maintainable.
  • Autowiring is currently enabled for controllers — all dependencies and nested dependencies are resolved automatically.
  • All Spryker clients are pre-registered in the container, accessible by class or interface.
  • An example module is included to demonstrate how to get started.

You can explore the code and examples here:

GitHub: Symfony Container Integration for Spryker

What’s Next?

This is just a proof of concept — expect further refinements and broader application support in future releases. We’re keen to hear your thoughts and feedback to shape the direction and prioritize features.

We Want to Hear From You!

  • How do you feel about developing modules using Symfony’s DI compared to the native Spryker approach?
  • Does using Symfony’s DI speed up your development process? Why or why not?
  • Which Symfony DI features would you like to see supported out of the box in Spryker?

Your feedback is essential for us to make this integration truly beneficial for the Spryker developer community.

Tagged: