-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
Labels
Description
API Platform version(s) affected: 4.1.2 and more
Description
I upgraded this morning from api-platform/core 4.0.16 to api-platform/core 4.1.6, and i got 2 routes "disappeared"
Routes where from 2 differents entities, Test.php
and OneOffTest.php
I found the commit causing this was this one ba57714#diff-0d56a84d21cd4b276d12f866fb873f975a4ceb373ad27b902802f23c8f32fb76 introduced in api-platform/core v4.1.2
So yeah, i know my naming is not the best, but after all, it is for an API managing tests from students.
Is there some strict naming convention in PHP, Symfony or Api platform preventing me for having an entity named FooTest.php
?
Should i rename my entities, or does this regex needs to be a bit more permissive?
Thanks
soyuka
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
fix(symfony): do not ignore Test files on symfony
soyuka commentedon Apr 10, 2025
does my patch resolves your issue? ddc2734
fix(symfony): do not ignore Test files on symfony
wtfred commentedon Apr 10, 2025
Yes, thanks!
(That being said, problem could still happens on Laravel with entities named like mine, no?)
soyuka commentedon Apr 11, 2025
Actually if I don't do this there are some issues as we will load
pest
tests and break cache warmup. Autoconfiguring in laravel is quite experimental to me. I also hope that I can find some energy to resolve #6943, when ApiResource attributes will be handled by symfony's DI component we can remove this code for the symfony integration it'll be much cleaner :)fix(symfony): do not ignore Test files on symfony (#7077)