Spryker Commerce Framework DI Magic

Denis Turkov
Denis Turkov VP Architecture Sprykee Posts: 43 🏛 - Council (mod)
edited January 20 in Spryker Development

After many requests to add more magic to Spryker framework, our architects found a graceful way to enable magic DI. The new approach enables you to get a business models skipping Factory and Dependency provider functions!

We currently consider 3x DI (dependency injection) containers, popular in PHP community:

  • PHP-DI (php-di/php-di)
  • Symfony DI (symfony/dependency-injection)
  • Laravel Container (illuminate/container)

Below you can find a comparison of these three.

Before we make the decision, by tradition we want to get your opinion on it!

Spryker Commerce Framework DI Magic 23 votes

I'm fine without magic! 🧘
13%
damijanmarcus.jungynnoig 3 votes
Give me magic, I prefer PHP-DI!
39%
Denis TurkovprofuelDenys Sokolovvasily.rodinevgenyfsmeiernicolas.messias773victor.vanherptHidran Arias 9 votes
Give me magic, I prefer Symfony DI!
21%
alfred.bezdaniel.hansmannmichael.schmetterDimitriy Kravchenkomikko.ropanen 5 votes
Give me magic, I prefer Laravel Container!
4%
oezkan.yilmaz 1 vote
Give me any magic! 🤩
21%
s.krollGuido X Jansenranjith.vkishakuta-sprykerb3nl 5 votes

Comments

  • daniel.hansmann
    daniel.hansmann Spryker Customer Posts: 1 🧑🏻‍🚀 - Cadet
    Give me magic, I prefer Symfony DI!

    We introduced the Symfony DI in our Project and can recommend this 😋

  • Denis Turkov
    Denis Turkov VP Architecture Sprykee Posts: 43 🏛 - Council (mod)
    edited January 20
    Give me magic, I prefer PHP-DI!

    @daniel.hansmann Great news! did you completely replace Spryker DI (container) for dependency definition or made them work with the core dependencies (so Spryker core definitions are also available in your DI, so minimal project updates are required)?

  • b3nl
    b3nl Partner @ TOWA Posts: 4 🧑🏻‍🚀 - Cadet
    Give me any magic! 🤩

    any, but please not laravel for our Sprykers!