Breaking changes in ependencies injection

Created on 2 February 2024, 8 months ago
Updated 6 February 2024, 8 months ago

In this commit, a breaking change was introduced for modules extending the the cart controller or the add to cart form because of the new way to inject dependencies. Modules extending these classes need to update the parent instanciation. commerce_pado already has an issue 🐛 Latest dev release of commerce core breaks commerce_pado on addToCart submit RTBC about this.
I think this would at least need a release note.

🐛 Bug report
Status

Closed: won't fix

Version

2.37

Component

Cart

Created by

🇫🇷France nicolasgraph Strasbourg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nicolasgraph
  • Status changed to Closed: won't fix 8 months ago
  • 🇮🇱Israel jsacksick

    This isn't technically a bug IMO...
    Also, according to https://www.drupal.org/about/core/policies/core-change-policies/bc-polic...

    The constructor for a service object (one in the container), plugin, or controller is considered internal unless otherwise marked, and may change in a minor release. These are objects where developers are not expected to call the constructor directly in the first place. Constructors for value objects where a developer will be calling the constructor directly are excluded from this statement.

    I'll try mentioning these changes in release notes next time but usually, by the time the release is tagged... I already "forgot" about such changes... This happened while I was debugging pipelines failures I was having a hard time to fix.

    There was a long time between 2.36 and 2.37, and my time is technically not 100% devoted to Commerce, so I'm doing what I can... Sorry about the change, but I figure this is a simple change to adapt from contrib/custom code as this is easily noticable... In any event, I'm not technically planning to revert these changes so marking this as "won't fix".

  • 🇫🇷France nicolasgraph Strasbourg

    Thanks for your reply and your work @jsacksick.

Production build 0.71.5 2024