core icon indicating copy to clipboard operation
core copied to clipboard

fix: class_alias with preloading

Open sylfabre opened this issue 1 year ago • 6 comments

Q A
Branch? 2.7
Tickets Closes similar issue to https://github.com/api-platform/core/pull/5523/files
License MIT
Doc PR N/A

https://github.com/api-platform/core/blob/2.7/src/Symfony/Validator/EventListener/ValidationExceptionListener.php suffers from the same issue as https://github.com/api-platform/core/pull/5523/files

=> This PR wraps all calls to class_alias() in an if condition to check first if the alias already exists

This is important to us because we want to upgrade first to 2.7 before moving forward to 3.0: we cannot do it right now because preloading breaks with 2.7

This PR follows up on https://github.com/api-platform/core/pull/6217 which was a disaster. This new version has been tested internally within my company and we plan to release it on week 15 (April 8th, 2024)

sylfabre avatar Apr 05 '24 09:04 sylfabre

Hello @dpawelec @markom-werbeagentur @ywarnier

Here is a new version that passed tests with preloading and classloading.

Would you please give it a try before asking @soyuka or @dunglas? Thanks a lot

sylfabre avatar Apr 05 '24 09:04 sylfabre

FYI, we have been using our fork in production for about a week without any bug report

sylfabre avatar Apr 12 '24 14:04 sylfabre

Seems to work for me, thank you very much for your work.

markom-werbeagentur avatar Apr 15 '24 09:04 markom-werbeagentur

should I merge and tag this then @sylfabre ?

soyuka avatar Apr 15 '24 11:04 soyuka

Hello @soyuka

So far so good here at AssoConnect. So I think you can merge safely.

Waiting a bit more for more feedbacks is also a viable option

Up to you!

sylfabre avatar Apr 15 '24 13:04 sylfabre

Hello @soyuka, @sylfabre

Thanks you all the job, we've got the same issue since the upgrade to 2.7.16. Do you think that it's safe now to merge the changes?

theia-admin avatar May 16 '24 15:05 theia-admin

@theia-admin I think it's now safe to merge it.

I suggest trying our branch to confirm it works for you too, and then revert back to move forward with merging.

@soyuka does that sound good to you?

sylfabre avatar May 20 '24 14:05 sylfabre

let me merge this, but I'll tag only on Friday

soyuka avatar May 21 '24 07:05 soyuka

@soyuka Thank you for merging it 👍 Could you please tag it? Thanks

sylfabre avatar May 27 '24 08:05 sylfabre

We will soon delete our fork. You can use our fix with "api-platform/core": "2.7.x-dev" in your composer.json file

sylfabre avatar Jul 17 '24 09:07 sylfabre

Great, @soyuka do you plan to push a new tag?

theia-admin avatar Aug 19 '24 10:08 theia-admin