- 🇳🇿New Zealand quietone New Zealand
@matsbla, thanks for reporting this. Did you ever find the cause and a resolution?
There have been no other reports of this problem. This is also reported on a now unsupported version of Drupal. Is anyone having this problem on a supported version?
Since we need more information to move forward with this issue, I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
- 🇩🇰Denmark abdirisak
Updating from 9.5.11 to 10.0.11 gives me a very similar error.
drush updatedb
Module Update ID Type Description
-------- ----------- --------------- -----------------------------------------user 10000 hook_update_n 10000 - Remove non-existent permissions created by migrations.
-------- ----------- --------------- -----------------------------------------Do you wish to run the specified pending updates?: yes
FAILED! drush updatedb -y
"non-zero return code", "rc": 1,
In BatchStorage.php line 157: Serialization of 'Closure' is not allowed. - 🇺🇸United States dcam
@abdirisak I just ran into this issue too. After a lot of debugging and research I came across a GitHub issue comment. From that comment:
make sure you update to Composer 2.5.1 and then
composer dump-autoload
or install to ensure the new ClassLoader is present in your vendor dir.Long version:
In my case, I updated Drush from 12.1.2 to 12.4.3. The new version contains a new Drupal finder class, which loads environment variables. That included the Composer ClassLoader, which contains a Closure property. That property was patched to be serializable. But even though I had the latest versions of everything, including the Composer ClassLoader, it seems that the older version was cached. Running thecomposer dump-autoload
command allowed everything to work again.