Product Bundle Dependency Provider Bridges?

Robson
Robson Posts: 19 🧑🏻‍🚀 - Cadet

Hi spryker team,

I'm currently using

"spryker-feature/product-bundles": "^202410.0"

Is there an update planed to remove all the "bridges" from the DependencyProvider?

I'm talking about

Spryker\Zed\ProductBundle\ProductBundleDependencyProvider

Thanks

Best Answer

  • Robson
    Robson Posts: 19 🧑🏻‍🚀 - Cadet
    Answer ✓

    Hey Florian,

    we've already found a solution for our problem.

    The overwritten DependencyProvider declares its own names for the necessary facades.

    But thanks for your help and support.

Answers

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,122 ⚖️ - Guardians (admin)

    Heyhey @Robson ,

    this is what I got from the team regards your question:

    We are currently evaluating the deprecation of bridges, but no final decision has been made at this time. As part of this assessment, we are also considering whether such changes would apply solely to newly developed modules or extend to existing ones.
    It is less likely that bridges will be removed from already released versions (eg: 202410.0) unless there is a justification.

    Any specific reason for this question?

    All the best,

    Florian

  • Robson
    Robson Posts: 19 🧑🏻‍🚀 - Cadet

    Hey @fsmeier ,

    thanks for your quick reply.

    In my case, the ProductBundleDependencyProvider, contains Brdiges for Facades which seems to be a copy of the facade itself. Therefore their is no need for the bridge.

    Example:

    ProductBundleDependencyProvider sets ProductBundleToProductFacadeInterface as FACADE_PRODUCT

    The ProductBundleToProductFacadeInterface interface is the same as the ProductFacadeInterface.

    Not necessary the bridge.

  • profuel
    profuel SSA Sprykee Posts: 85 🪐 - Explorer

    @Robson Bridges are used according to the current Spryker architecture for the Vendor code.

    We strongly recommend to avoid using bridges on the project level, using and extending only Facade.

    You may also check here .

    If you have specific issues with usage of bridges, please let us know.

  • Robson
    Robson Posts: 19 🧑🏻‍🚀 - Cadet

    Hello @profuel ,

    I've already mentioned the ProductBundleDependencyProvider which is full of bridges which are not necessary. And I thought that the ProductBundle Module is not "vendor" code.

    Greetings

  • profuel
    profuel SSA Sprykee Posts: 85 🪐 - Explorer

    @Robson Any file in the Spryker namespace is considered a vendor code.

    We at Spryker use Bridges, when accessing Facade (Business Facade, Client, Service) from another module.

    Thus it's a normal to see ProductBundleDependencyProvider filled with bridges.

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,122 ⚖️ - Guardians (admin)

    Heyhey @Robson ,

    I agree with you that bridges can and often do add a lot of overhead. We introduced them in the very past for strict separation of modules.

    As you can see by the statement from our architecture team this decision from the past is in the backlog for validation.

    Despite having to deal with the status quo about bridges in vendor code in your project right now, anything which is unclear or blocking you from solving a business use-case right now so we can find a solution together?

    All the best,

    Florian

  • Robson
    Robson Posts: 19 🧑🏻‍🚀 - Cadet
    Answer ✓

    Hey Florian,

    we've already found a solution for our problem.

    The overwritten DependencyProvider declares its own names for the necessary facades.

    But thanks for your help and support.