Skip to content

Commit cee5106

Browse files
HeahDudeIltar van der Berg
authored andcommitted
cs fixes
1 parent cfcf764 commit cee5106

14 files changed

+29
-30
lines changed

UPGRADE-3.1.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ HttpKernel
6666
deprecated and will be removed in Symfony 4.0. The inline fragment
6767
renderer should be used with object attributes.
6868

69-
* The `ControllerResolver::getArguments()` method is deprecated and will be
70-
removed in 4.0. If you have your own `ControllerResolverInterface`
71-
implementation, you should replace this method by implementing the
72-
`ArgumentResolverInterface` and injecting it in the `HttpKernel`, or using
73-
the `ArgumentResolver` and injecting this in the `HttpKernel`.
69+
* The `ControllerResolver::getArguments()` method has been deprecated and will
70+
be removed in 4.0. If you have your own `ControllerResolverInterface`
71+
implementation, you should inject either an `ArgumentResolverInterface`
72+
instance or the new `ArgumentResolver` in the `HttpKernel`.
7473

7574
Serializer
7675
----------

src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
<argument type="service" id="logger" on-invalid="ignore" />
1818
</service>
1919

20+
<service id="argument_metadata_factory" class="Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory" public="false" />
21+
2022
<service id="argument_resolver" class="Symfony\Component\HttpKernel\Controller\ArgumentResolver" public="false">
2123
<argument type="service" id="argument_metadata_factory" />
2224
<argument type="collection" />
2325
</service>
2426

25-
<service id="argument_metadata_factory" class="Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory" public="false" />
26-
2727
<service id="argument_value_resolver.argument_from_attribute" class="Symfony\Component\HttpKernel\Controller\ArgumentValueResolver\ArgumentFromAttributeResolver" public="false">
2828
<tag name="controller_argument.value_resolver" priority="100" />
2929
</service>

src/Symfony/Component/HttpKernel/CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ CHANGELOG
44
3.1.0
55
-----
66
* deprecated passing objects as URI attributes to the ESI and SSI renderers
7-
* Added a `LegacyArgumentResolver` with `getArguments()` and the corresponding interface `ArgumentResolverInterface`
8-
* Deprecated `ControllerResolver::getArguments()`, which uses the `LegacyArgumentResolver` as BC layer by extending it
9-
* The `HttpKernel` now accepts an additional argument for an `ArgumentResolverInterface`
10-
* Added the `ArgumentResolver` which features an extension point to resolve arguments in a more dynamic way
7+
* added `Symfony\Component\HttpKernel\Controller\LegacyArgumentResolver`
8+
* deprecated `ControllerResolver::getArguments()`
9+
* made `ControllerResolver` extend the `LegacyArgumentResolver` for BC
10+
* added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface`
11+
* added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` as argument to `HttpKernel`
12+
* added `Symfony\Component\HttpKernel\Controller\ArgumentResolver`
1113

1214
3.0.0
1315
-----

src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface;
1616

1717
/**
18-
* Responsible for the resolving of arguments passed to an action.
18+
* Responsible for resolving the arguments passed to an action.
1919
*
2020
* @author Iltar van der Berg <kjarli@gmail.com>
2121
*/

src/Symfony/Component/HttpKernel/Controller/ArgumentResolverInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\HttpFoundation\Request;
1515

1616
/**
17-
* An ArgumentResolverInterface implementation knows how to determine the
17+
* An ArgumentResolverInterface instance knows how to determine the
1818
* arguments for a specific action.
1919
*
2020
* @author Fabien Potencier <fabien@symfony.com>
@@ -29,7 +29,7 @@ interface ArgumentResolverInterface
2929
*
3030
* @return array An array of arguments to pass to the controller
3131
*
32-
* @throws \RuntimeException When value for argument given is not provided
32+
* @throws \RuntimeException When no value could be provided for a required argument
3333
*/
3434
public function getArguments(Request $request, $controller);
3535
}

src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolver/ArgumentFromAttributeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
1717

1818
/**
19-
* Grabs a non-variadic value from the request and returns it.
19+
* Yields a non-variadic argument's value from the request attributes.
2020
*
2121
* @author Iltar van der Berg <kjarli@gmail.com>
2222
*/

src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolver/DefaultArgumentValueResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
1717

1818
/**
19-
* Returns the default value defined in the action signature if present and no value has been given.
19+
* Yields the default value defined in the action signature when no value has been given.
2020
*
2121
* @author Iltar van der Berg <kjarli@gmail.com>
2222
*/

src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolver/RequestResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
1717

1818
/**
19-
* Supports the same instance as the request object passed along.
19+
* Yields the same instance as the request object passed along.
2020
*
2121
* @author Iltar van der Berg <kjarli@gmail.com>
2222
*/
@@ -27,7 +27,7 @@ final class RequestResolver implements ArgumentValueResolverInterface
2727
*/
2828
public function supports(Request $request, ArgumentMetadata $argument)
2929
{
30-
return $argument->getType() === Request::class || is_subclass_of($request, $argument->getType());
30+
return $argument->getType() === Request::class || is_subclass_of(Request::class, $argument->getType());
3131
}
3232

3333
/**

src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolver/VariadicArgumentValueResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
1717

1818
/**
19-
* Grabs the variadic value from the request and returns it.
19+
* Yields a variadic argument's values from the request attributes.
2020
*
2121
* @author Iltar van der Berg <kjarli@gmail.com>
2222
*/

src/Symfony/Component/HttpKernel/Controller/ArgumentValueResolverInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
interface ArgumentValueResolverInterface
2323
{
2424
/**
25-
* Whether this resolver can resolve can resolve the value for the given ArgumentMetadata.
25+
* Whether this resolver can resolve the value for the given ArgumentMetadata.
2626
*
2727
* @param Request $request
2828
* @param ArgumentMetadata $argument
@@ -34,8 +34,6 @@ public function supports(Request $request, ArgumentMetadata $argument);
3434
/**
3535
* Yield the possible value(s).
3636
*
37-
* An implementation must yield at least one value.
38-
*
3937
* @param Request $request
4038
* @param ArgumentMetadata $argument
4139
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy