-
-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the new entityClass option with a custom provider #5510
Comments
thanks! I'll try to check your reproducer and see if I can fix it :). |
This solution fixing issue #5502 |
If the related entity also has an [ApiResource], then I also get |
mrossard
added a commit
to mrossard/core
that referenced
this issue
Apr 18, 2023
mrossard
added a commit
to mrossard/core
that referenced
this issue
Apr 18, 2023
mrossard
added a commit
to mrossard/core
that referenced
this issue
Apr 18, 2023
mrossard
added a commit
to mrossard/core
that referenced
this issue
Apr 18, 2023
mrossard
added a commit
to mrossard/core
that referenced
this issue
Apr 20, 2023
…building Links Fixes api-platform#5510
soyuka
pushed a commit
to soyuka/core
that referenced
this issue
Apr 21, 2023
…building Links Fixes api-platform#5510
soyuka
added a commit
to api-platform/metadata
that referenced
this issue
Apr 21, 2023
…building Links (#5550) * fix: the stateOptions::entityClass should be used when present while building Links Fixes api-platform/core#5510 * proper fix --------- Co-authored-by: Manuel Rossard <manuel.rossard@u-bordeaux.fr> Co-authored-by: soyuka <soyuka@users.noreply.github.com>
soyuka
added a commit
to api-platform/doctrine-orm
that referenced
this issue
Jan 25, 2024
…building Links (#5550) * fix: the stateOptions::entityClass should be used when present while building Links Fixes api-platform/core#5510 * proper fix --------- Co-authored-by: Manuel Rossard <manuel.rossard@u-bordeaux.fr> Co-authored-by: soyuka <soyuka@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
API Platform version(s) affected: 3.1.6
Description
I can't get this new option to work as intended while using a custom provider. Either the Get() operation or the GetCollection() is broken.
How to reproduce
https://github.com/mrossard/apip-entityclass
This version gets "The class 'App\ApiResource\DetachedResource' was not found in the chain configured namespaces App\Entity" when you call the Get() operation. Comment the
uriVariables: ['id']
and you get `Unable to generate an IRI for the item of type "App\ApiResource\DetachedResource`` on the GetCollection() operation.Possible Solution
In ApiPlatform\Api\IdentifiersExtractor, if you replace line 136
with
you seem to get the expected result (on the version without the explicit uriVariables).
The text was updated successfully, but these errors were encountered: