- 🇳🇿New Zealand quietone
@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. - Status changed to Closed: works as designed
3 months ago 1:15pm 27 September 2024 - 🇳🇿New Zealand quietone
So, this error message came from two situations, one about deleting users and the other about running database updates. There is no discussion on the former in five years. That may indicate that is has been resolved, either by the reported or a commit of another issue. And the latter was fixed by updating to Composer 2. For the later, Drupal 10 has a c omposer requirement of 2.3.6 → .
Time to close this one.
If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue → (starting from "Install Drupal core").
Thanks!