-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor #681 Argument parser refactoring (loic425)
This PR was merged into the poc-new-resource-metadata branch. Discussion ---------- | Q | A | --------------- | ----- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | n | Related tickets | | License | MIT Commits ------- 08696b9 Configure repository arguments 5ff2ff9 expression language refactoring 618b8f3 Variables collection fix and adding missing specs b1d141b Fix argument parser spec 3d5d01c Add specs on request & token variables d1ba068 Fix missing variables 10002b7 Test argument parser with PHPUnit (to check variables) ddef382 Add variables collection on routing argument parser d4bf7ff Fix coding standard eb8694e Fix Psalm errors 3436da4 New argument parser for routing da9ebdc Fix Phpspec tests
- Loading branch information
Showing
41 changed files
with
615 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
src/Bundle/Resources/config/services/expression_language.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
This file is part of the Sylius package. | ||
(c) Paweł Jędrzejewski | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
--> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="sylius.resource_factory.expression_language" class="Symfony\Component\ExpressionLanguage\ExpressionLanguage" /> | ||
<service id="sylius.repository.expression_language" class="Symfony\Component\ExpressionLanguage\ExpressionLanguage" /> | ||
<service id="sylius.routing.expression_language" class="Symfony\Component\ExpressionLanguage\ExpressionLanguage" /> | ||
|
||
<service id="sylius.expression_language.variables.token" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\TokenVariables"> | ||
<argument type="service" id="security.token_storage" /> | ||
<tag name="sylius.resource_factory_variables" /> | ||
<tag name="sylius.repository_variables" /> | ||
</service> | ||
|
||
<service id="sylius.expression_language.variables.request" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\RequestVariables"> | ||
<argument type="service" id="request_stack" /> | ||
<tag name="sylius.resource_factory_variables" /> | ||
<tag name="sylius.repository_variables" /> | ||
</service> | ||
|
||
<service id="sylius.expression_language.variables_collection.factory" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\VariablesCollection"> | ||
<argument type="tagged_iterator" tag="sylius.resource_factory_variables" /> | ||
</service> | ||
|
||
<service id="sylius.expression_language.variables_collection.repository" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\VariablesCollection"> | ||
<argument type="tagged_iterator" tag="sylius.repository_variables" /> | ||
</service> | ||
|
||
<service id="sylius.expression_language.variables_collection.routing" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\VariablesCollection"> | ||
<argument type="tagged_iterator" tag="sylius.routing_variables" /> | ||
</service> | ||
|
||
<service id="sylius.expression_language.argument_parser.factory" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\ArgumentParser"> | ||
<argument type="service" id="sylius.resource_factory.expression_language" /> | ||
<argument type="service" id="sylius.expression_language.variables_collection.factory" /> | ||
</service> | ||
|
||
<service id="sylius.expression_language.argument_parser.repository" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\ArgumentParser"> | ||
<argument type="service" id="sylius.repository.expression_language" /> | ||
<argument type="service" id="sylius.expression_language.variables_collection.repository" /> | ||
</service> | ||
|
||
<service id="sylius.expression_language.argument_parser.routing" class="Sylius\Component\Resource\Symfony\ExpressionLanguage\ArgumentParser"> | ||
<argument type="service" id="sylius.routing.expression_language" /> | ||
<argument type="service" id="sylius.expression_language.variables_collection.routing" /> | ||
</service> | ||
</services> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.