Product Bundle Dependency Provider Bridges?

Robson
Robson Posts: 18 🧑🏻‍🚀 - 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

Answers

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,115 ⚖️ - 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: 18 🧑🏻‍🚀 - 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: 18 🧑🏻‍🚀 - 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.