Skip to content

fix(metadata): allow to use constants in XML configuration (resource attribute) #4321

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

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

alanpoulain
Copy link
Member

Q A
Branch? 2.6
Tickets N/A
License MIT
Doc PR N/A

Allow to use constants in XML configuration, like this:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- api/config/api_platform/resources.xml -->

<resources
        xmlns="https://api-platform.com/schema/metadata"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="https://api-platform.com/schema/metadata
        https://api-platform.com/schema/metadata/metadata-2.0.xsd">
    <resource class="App\Entity\Book">
        <attribute name="url_generation_strategy" type="constant">ApiPlatform\Core\Api\UrlGeneratorInterface::ABS_URL</attribute>
    </resource>
</resources>

Enable again the tests for the XML / YAML configuration, disabled since a long time.

…attribute)

fix: enable the tests for the XML / YAML configuration
@alanpoulain alanpoulain merged commit ed0dea9 into api-platform:2.6 Jun 14, 2021
LoicBoursin pushed a commit to LoicBoursin/core that referenced this pull request Aug 18, 2021
…attribute) (api-platform#4321)

fix: enable the tests for the XML / YAML configuration
vincentchalamon pushed a commit to vincentchalamon/core that referenced this pull request Oct 15, 2021
…attribute) (api-platform#4321)

fix: enable the tests for the XML / YAML configuration
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.

1 participant