- Issue created by @greatmatter
- π·πΈSerbia bojanz
What is your Drupal version?
Did you install Address via Composer or Ludwig? - πΊπΈUnited States greatmatter
We're running Drupal 10.1.5, and we installed Address via Composer.
- π·πΈSerbia bojanz
Hm, we require doctrine/collections in the composer.json for commerceguys/addressing, so it should be impossible for the package to be missing. Furthermore, ArrayCollection is present in every version of doctrine/collections.
If you can check what versions of commerceguys/addressing and doctrine/collections Composer has installed, that might help us with further debugging.
- πΊπΈUnited States greatmatter
Of course:
commerceguys/addressing:1.4.2
doctrine/collections:2.1.4 - π·πΈSerbia bojanz
I apologize for the late response.
You specified that you're using Address 2.0.x-dev which requires commerceguys/addressing v2.0.0 or newer, but your site has v1.4.2 installed. That is odd. Still, both addressing versions do allow doctrine/collections v2.1.4 to be used.
Looking at doctrine/collections v2.1.4, I see an ArrayCollection class included: https://github.com/doctrine/collections/blob/2.1.4/src/ArrayCollection.php
So this can only be some kind of autoloading bug.
- πΊπΈUnited States greatmatter
...oy. There's the problem. I chose the wrong version for the issue. We're using drupal/address 1.12.0.
I'm sorry...
- π·πΈSerbia bojanz
Thanks, updating the affected version.
However, my point from #6 still stands, the doctrine version looks fine and I can't explain the error, other than possibly relating it to autoloading.
I can only advise trying to require doctrine/colections ~1.6 or ~2.0 to see if an older branch maybe doesn't exhibit the same problem.
- Status changed to Closed: outdated
4 months ago 9:40pm 4 July 2024 I ran into the same issue during a D8 -> D10 upgrade when I updated address to ^2. I'm guessing it's a weird autoload issue because the directory structure of doctrine/collections changes between v1 and v2.
I tried running
composer dump-autoload
ancomposer cc
but neither worked. I ended up needing to explicitly require an older version of doctrine/collections in my top-level composer.json (composer require 'doctrine/collections:^1.2'
) to get things working again.- πΊπΈUnited States wheelercreek
I ran into the same issue - unable to view any orders. We can view the orders list page, but when we try to view an order we're getting this error. I had to downgrade to doctrine/collections 1.8.0 and now it's working.