- Issue created by @jofitz
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 11:11am 14 September 2023 - šµšŖPeru krystalcode
Thanks for the patch.
I will not merge this until it is actually tested and found to work with Drupal 10, I do not want to mark it as Drupal 10-compatible if it actually still has incompatibilities. To install on Drupal 10 and test it, create a fork and install the forked version via composer.
I do not right now have an application that has already upgraded to Drupal 10 that uses this module so it may take me a while until I test it myself. Let us know how it works for you.
- Status changed to Needs work
about 1 year ago 9:04pm 14 September 2023 - šŗšøUnited States michelle Wisconsin, USA
I attempted to port this for a client but ran into issues and haven't gotten it working, yet. This is what Upgrade Status reports is needed:
Commerce Cart Advanced Scanned on Sun, 09/03/2023 - 18:36. 1 error found. 3 warnings found. Avoid some manual work by using drupal-rector for fixing issues automatically or Upgrade Rector to generate patches. web/modules/contrib/commerce_cart_advanced/src/Event/CartsSplitEvent.php: āāāāāāāāāāāā¬āāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā STATUS ā LINE ā MESSAGE ā āāāāāāāāāāāā¼āāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤ ā Check ā 12 ā Class Drupal\commerce_cart_advanced\Event\CartsSplitEvent ā ā manually ā ā extends deprecated class ā ā ā ā Symfony\Component\EventDispatcher\Event: since Symfony 4.3, ā ā ā ā use "Symfony\Contracts\EventDispatcher\Event" instead ā ā ā ā ā āāāāāāāāāāāā“āāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā web/modules/contrib/commerce_cart_advanced/src/Hook/CartItemFormAlter.php: āāāāāāāāāāāā¬āāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā STATUS ā LINE ā MESSAGE ā āāāāāāāāāāāā¼āāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤ ā Check ā 77 ā Parameter $number_formatter_factory of method ā ā manually ā ā Drupal\commerce_cart_advanced\Hook\CartItemFormAlter::__cons ā ā ā ā truct() has typehint with deprecated interface ā ā ā ā Drupal\commerce_price\NumberFormatterFactoryInterface: ā ā ā ā Replaced by CurrencyFormatterInterface. ā ā ā ā ā āāāāāāāāāāāā“āāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā web/modules/contrib/commerce_cart_advanced/src/Plugin/Block/CurrentCartBlock.php: āāāāāāāāāāāā¬āāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā STATUS ā LINE ā MESSAGE ā āāāāāāāāāāāā¼āāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤ ā Fix with ā 67 ā Call to deprecated function drupal_get_path(). Deprecated in ā ā rector ā ā drupal:9.3.0 and is removed from drupal:10.0.0. Use ā ā ā ā Drupal\Core\Extension\ExtensionPathResolver::getPath() ā ā ā ā instead. ā ā ā ā ā āāāāāāāāāāāā“āāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā web/modules/contrib/commerce_cart_advanced/commerce_cart_advanced.info.yml: āāāāāāāāāāāā¬āāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā STATUS ā LINE ā MESSAGE ā āāāāāāāāāāāā¼āāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤ ā Check ā 0 ā Value of core_version_requirement: ^8.7.7 || ^9 is not ā ā manually ā ā compatible with the next major version of Drupal core. See ā ā ā ā https://drupal.org/node/3070687. ā ā ā ā ā āāāāāāāāāāāā“āāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
- Status changed to Needs review
about 1 year ago 3:01pm 28 September 2023 - Status changed to Needs work
about 1 year ago 1:23am 20 October 2023 - šµšŖPeru krystalcode
@alexis_mc Before I test this further myself, can you confirm whether you actually tested your patch on a working website? Or is it automatically generated patch?
- $this->eventDispatcher->dispatch(CartEvents::CARTS_SPLIT, $event); + $this->eventDispatcher->dispatch($event, CartEvents::CARTS_SPLIT); -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event;
This means dropping Drupal 8 support, which is fine at this point. The composer/info files need to be updated accordingly. I will create a new branch
1.x
for Drupal 9/10 which will be the main branch moving forward, and keep the current8.x-1.x
in a deprecated case for the rare sites that still use Drupal 8.+ '#uri' => \Drupal::service('extension.list.module')->getPath('commerce') . '/icons/ffffff/cart.png',
We'll need to inject this as a service in the constructor.
- Status changed to Needs review
12 months ago 3:07pm 23 November 2023 - š®š³India keshavv India
Thank you alexis_mc
Your #5 patch fixed almost all issues. But I found a few more.
Rerolled patch with more changes. It works for me. - Status changed to RTBC
11 months ago 1:49pm 14 December 2023 - š®š³India keshavv India
Confirmed that the patch added in #9 works perfectly.
Thank you. -
krystalcode ā
committed 0137bde7 on 2.x
Issue #3387284 Made current cart block Drupal 10-compatible Upgraded to...
-
krystalcode ā
committed 0137bde7 on 2.x
-
krystalcode ā
committed d70fddd2 on 2.x
Issue #3387284 Dispatch events as per symfony/event-dispatcher v4+
-
krystalcode ā
committed d70fddd2 on 2.x
-
krystalcode ā
committed 7b41a55c on 2.x
Issue #3387284 Allow installation on Drupal 10
-
krystalcode ā
committed 7b41a55c on 2.x
- Status changed to Fixed
11 months ago 8:31pm 26 December 2023 - šµšŖPeru krystalcode
- New branch 2.x that is compatible Drupal 9.3+/10.0+ and Commerce 2.33+. Commerce 2.33 is the first release that is really compatible with Drupal 10, so we have to set that as minimum version requirement.
- The Save for Later functionality does not seem to work, and it might be a Drupal 10 incompatibility. We have a separate issue for this ( š Error when "Save for later" is clicked Active ) and will resolve this there, but I will not make a release before that is resolved. Until then, applications that do not make use of the Save for Later functionality can use the 2.x development branch.
- Compared to the last patch, I removed the return type declarations; When we move to PHP 8 i.e. Drupal 10 as minimum version requirement, we'll update all code to use PHP 8 features and use strict types wherever possible.
- Compared to the last patch, I removed the change to use the currency formatter. This is still a deprecation until Commerce 3.0, and I want to review this a bit more. I'll create a new issue for it.
Automatically closed - issue fixed for 2 weeks with no activity.