Error when updating from 8.5.7 to 8.5.9 using Composer OR 8.5.7 to 8.5.8

Declaration of DoctrineProxies\__CG__\Concrete\Core\Entity\Site\Site::clearAttribute($ak) must be compatible with Concrete\Core\Entity\Site\Site::clearAttribute($ak, $doReindexImmediately = true)

I’m getting the above error when trying to update Concrete5-8.5.7 to 8.5.9 using the command “composer update”. There’s no custom Dashboard functionalities built into the website.


This also happens when using “composer update concrete5/core”

I’d like to add this also happens specifically when going from 8.5.7 to 8.5.8, but with the added word “bool” in between $ak, $doReindexImmediately

Whoops\Exception\ErrorException thrown with message "Declaration of DoctrineProxies\__CG__\Concrete\Core\Entity\Site\Site::clearAttribute($ak) must be compatible with Concrete\Core\Entity\Site\Site::clearAttribute($ak, bool $doReindexImmediately = true)"

Stacktrace:
#2 Whoops\Exception\ErrorException in /home/mahler/domains/gustavmahlerstichting.nl/public_html/public/application/config/doctrine/proxies/__CG__ConcreteCoreEntitySiteSite.php:538
#1 Whoops\Run:handleError in /home/mahler/domains/gustavmahlerstichting.nl/public_html/vendor/filp/whoops/src/Whoops/Run.php:486
#0 Whoops\Run:handleShutdown in [internal]:0

Update: I’ve performed another composer update today, it’s still the same issue

Most of our developers are on holiday, We’ll have someone follow up. Thank you,
Jess

@PATRICKKASIE have you tried regenerating the proxies? Try concrete/bin/concrete5 orm:generate-proxies.

I’ve just tried your command, and I’ve noticed the owner changes in /application/config/doctrine/proxies/ from the original owner to root. Does this have any long term effects? I’m assuming it doesn’t, considering it’s got 664 rights, but it’s not the user brefiad who has been regenerating the proxies.

Upon further inspection, after the update, without executing your command, there are absolutely no in /application/config/doctrine/proxies/ .
Edit: what I meant to say is there’s no proxies in /application/config/doctrine/proxies/ after the update. Upon visiting another page (for example contact or about) will do the same thing: regenerating the proxies. It’s exclusively the home page not doing this task. Is this something you guys should be looking into? Because I’ve tried this with 2 different websites and it’s the same result with either of them.

I’m planning on updating the websites by visiting other pages instead of using your command, unless your recommendation is to regenerate proxies exclusively through your command is the better option to go with. I’ll wait for your reply!

Kind regards,

Patrick

I’ve tried composer update on another website, and it spouted out a completely different error, even after trying concrete/bin/concrete5 orm:generate-proxies

Edit: Yes, composer update has been executed in the public_html folder, not the public folder, so vendor files have been included in the update
Edit 2: I figured clearing the cache would help, it didn’t

I have solved this by assuming “continue” should be “continue 2” as suggested by the error message. I’ve manually changed all the lines where the error occurred and refreshed after every single line edit. Upgrading or downgrading my composer version did nothing. This website has always been on PHP 7.4. But for my initial problem about the proxies, it did work.