Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DependencyInjection] Add support forkey-type inXmlFileLoader#58035

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:7.2fromalexandre-daubois:xml-keytype
Aug 27, 2024

Conversation

alexandre-daubois
Copy link
Member

@alexandre-dauboisalexandre-daubois commentedAug 19, 2024
edited
Loading

QA
Branch?7.2
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#45708
LicenseMIT

Quoting the tests to show how this works:

<?xml version="1.0" encoding="utf-8"?><containerxmlns="http://symfony.com/schema/dic/services"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">  <services>    <serviceid="foo"class="Symfony\Component\DependencyInjection\Tests\Fixtures\Bar">      <argumenttype="collection">        <argumentkey-type="constant"key="PHP_INT_MAX">Value 1</argument>        <argumentkey="PHP_INT_MAX">Value 2</argument>        <argumentkey-type="binary"key="AQID">Value 3</argument>      </argument>    </service>  </services></container>

Makes the following pass:

publicfunctiontestArgumentKeyType()    {// ...$definition =$container->getDefinition('foo');$this->assertSame([            \PHP_INT_MAX =>'Value 1','PHP_INT_MAX' =>'Value 2',"\x01\x02\x03" =>'Value 3',        ],$definition->getArgument(0));    }

welcoMattic reacted with heart emoji
@alexandre-dauboisalexandre-dauboisforce-pushed thexml-keytype branch 3 times, most recently fromd3f0395 tofe4500cCompareAugust 19, 2024 14:31
@fabpot
Copy link
Member

Thank you@alexandre-daubois.

@fabpotfabpot merged commit20bda2b intosymfony:7.2Aug 27, 2024
8 of 10 checks passed
@fabpotfabpot mentioned this pull requestOct 27, 2024
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestNov 27, 2024
This PR was merged into the 6.4 branch.Discussion----------[Routing] Add example of Requirement enum[Requirement Enum](https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Routing/Requirement/Requirement.php) values are not cases but constants.So in YAML routing format we must use `!php/const` instead of `!php/enum`.This PR add examples to how to use the "Requirement enum"Can you confirm constants are not supported in XML format for routing ? (if not, maybe we can make PR likesymfony/symfony#58035 cc `@alexandre`-daubois)Commits-------ebfa5e2 [Routing] Add example of Requirement enum
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestJan 13, 2025
…e (phansys)This PR was merged into the 7.2 branch.Discussion----------[Doctrine] Use PDO constants in XML configuration exampleFollows#20557, in this case for XML.Seesymfony/symfony#58035.I guess this PR should be merged after merging the 7.1 branch.Commits-------c880a88 [Doctrine] Use PDO constants in XML configuration example
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
7.2
Development

Successfully merging this pull request may close these issues.

Support for constants in collection keys in XML config
4 participants
@alexandre-daubois@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp