Skip to content
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

Support subresource resourceClass resolving #3556

Merged

Conversation

esserj
Copy link
Contributor

@esserj esserj commented May 12, 2020

Q A
Bug fix? no, more like an improvement
New feature? yes, in a way
BC breaks? no
Deprecations? no
Tickets #3559
License MIT
Doc PR n/a

This PR will allow you to define subresource.resourceClass as a parameter of the container.

The extractors have support for resolving class names through container defined parameters, but the subResource class did not have support for this, which kind of makes the use of parameters as a flexibility measure a little less useful when you want to use subResources.

@esserj esserj changed the title Fix resource class not resolving Support subresource resourceClass resolving May 12, 2020
@esserj
Copy link
Contributor Author

esserj commented May 14, 2020

Failed tests seem unrelated?

@alanpoulain
Copy link
Member

alanpoulain commented May 15, 2020

Hello @esserj, thanks for this PR. It seems weird the Behat tests are failing and may be related to your PR.

@esserj
Copy link
Contributor Author

esserj commented May 15, 2020

@alanpoulain I checked out origin/master and its the same problem,

Seems the taxons route has somehow been renamed to taxa causing related tests to fail

@esserj
Copy link
Contributor Author

esserj commented May 15, 2020

and BTW taxa is the plural form of taxon

@lchrusciel
Copy link
Contributor

This issue is done due to the Doctrine/Inflector update v1.4. As mentioned by @esserj it is a fix for this pluralization, so either test should be adjusted or custom rule should be added

ref. doctrine/inflector#147

@alanpoulain
Copy link
Member

It has been fixed on master. Please make a rebase. Also it's a good thing to allow edit from maintainers 🙂

@esserj esserj force-pushed the fix-resourceClass-not-resolving branch from 9e4cdfc to 78c8b0e Compare May 29, 2020 15:05
@esserj
Copy link
Contributor Author

esserj commented May 29, 2020

Done

@alanpoulain alanpoulain merged commit 9ccf578 into api-platform:master May 30, 2020
@alanpoulain
Copy link
Member

Thank you @esserj!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants