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

Commitb973b30

Browse files
committed
[Security][Serializer][DI] Add new arguments typehints in preparation for 4.0
1 parent159f3c5 commitb973b30

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

‎UPGRADE-3.3.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Security
303303
* The`RoleInterface` has been deprecated. Extend the`Symfony\Component\Security\Core\Role\Role`
304304
class in your custom role implementations instead.
305305

306-
* The`LogoutUrlGenerator::registerListener()` method will expect a 6th`$context = null` argument in 4.0.
306+
* The`LogoutUrlGenerator::registerListener()` method will expect a 6th`string$context = null` argument in 4.0.
307307
Define the argument when overriding this method.
308308

309309
* The`AccessDecisionManager::setVoters()` method has been deprecated. Pass

‎UPGRADE-4.0.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Security
426426
* The`RoleInterface` has been removed. Extend the`Symfony\Component\Security\Core\Role\Role`
427427
class instead.
428428

429-
* The`LogoutUrlGenerator::registerListener()` method expects a 6th`$context = null` argument.
429+
* The`LogoutUrlGenerator::registerListener()` method expects a 6th`string$context = null` argument.
430430

431431
* The`AccessDecisionManager::setVoters()` method has been removed. Pass the
432432
voters to the constructor instead.

‎src/Symfony/Component/DependencyInjection/Compiler/Compiler.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ public function getLoggingFormatter()
7777
* @param string $type The type of the pass
7878
* @param int $priority Used to sort the passes
7979
*/
80-
publicfunctionaddPass(CompilerPassInterface$pass,$type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/)
80+
publicfunctionaddPass(CompilerPassInterface$pass,$type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*,int$priority = 0*/)
8181
{
8282
if (func_num_args() >=3) {
8383
$priority =func_get_arg(2);
8484
}else {
8585
if (__CLASS__ !==get_class($this)) {
8686
$r =new \ReflectionMethod($this,__FUNCTION__);
8787
if (__CLASS__ !==$r->getDeclaringClass()->getName()) {
88-
@trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.',__METHOD__),E_USER_DEPRECATED);
88+
@trigger_error(sprintf('Method %s() will have a third `int$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.',__METHOD__),E_USER_DEPRECATED);
8989
}
9090
}
9191

‎src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ public function getPasses()
108108
*
109109
* @throws InvalidArgumentException when a pass type doesn't exist
110110
*/
111-
publicfunctionaddPass(CompilerPassInterface$pass,$type =self::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/)
111+
publicfunctionaddPass(CompilerPassInterface$pass,$type =self::TYPE_BEFORE_OPTIMIZATION/*,int$priority = 0*/)
112112
{
113113
if (func_num_args() >=3) {
114114
$priority =func_get_arg(2);
115115
}else {
116116
if (__CLASS__ !==get_class($this)) {
117117
$r =new \ReflectionMethod($this,__FUNCTION__);
118118
if (__CLASS__ !==$r->getDeclaringClass()->getName()) {
119-
@trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.',__METHOD__),E_USER_DEPRECATED);
119+
@trigger_error(sprintf('Method %s() will have a third `int$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.',__METHOD__),E_USER_DEPRECATED);
120120
}
121121
}
122122

‎src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ public function clear()
8686
* @param string $reference
8787
* @param bool $lazy
8888
*/
89-
publicfunctionconnect($sourceId,$sourceValue,$destId,$destValue =null,$reference =null/*, $lazy = false*/)
89+
publicfunctionconnect($sourceId,$sourceValue,$destId,$destValue =null,$reference =null/*,bool$lazy = false*/)
9090
{
9191
if (func_num_args() >=6) {
9292
$lazy =func_get_arg(5);
9393
}else {
9494
if (__CLASS__ !==get_class($this)) {
9595
$r =new \ReflectionMethod($this,__FUNCTION__);
9696
if (__CLASS__ !==$r->getDeclaringClass()->getName()) {
97-
@trigger_error(sprintf('Method %s() will have a 6th `$lazy = false` argument in version 4.0. Not defining it is deprecated since 3.3.',__METHOD__),E_USER_DEPRECATED);
97+
@trigger_error(sprintf('Method %s() will have a 6th `bool$lazy = false` argument in version 4.0. Not defining it is deprecated since 3.3.',__METHOD__),E_USER_DEPRECATED);
9898
}
9999
}
100100
$lazy =false;

‎src/Symfony/Component/DependencyInjection/ContainerBuilder.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,15 @@ public function loadFromExtension($extension, array $values = array())
448448
*
449449
* @return $this
450450
*/
451-
publicfunctionaddCompilerPass(CompilerPassInterface$pass,$type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/)
451+
publicfunctionaddCompilerPass(CompilerPassInterface$pass,$type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*,int$priority = 0*/)
452452
{
453453
if (func_num_args() >=3) {
454454
$priority =func_get_arg(2);
455455
}else {
456456
if (__CLASS__ !==get_class($this)) {
457457
$r =new \ReflectionMethod($this,__FUNCTION__);
458458
if (__CLASS__ !==$r->getDeclaringClass()->getName()) {
459-
@trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.',__METHOD__),E_USER_DEPRECATED);
459+
@trigger_error(sprintf('Method %s() will have a third `int$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.',__METHOD__),E_USER_DEPRECATED);
460460
}
461461
}
462462

‎src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ public function __construct(RequestStack $requestStack = null, UrlGeneratorInter
4848
* @param CsrfTokenManagerInterface|null $csrfTokenManager A CsrfTokenManagerInterface instance
4949
* @param string|null $context The listener context
5050
*/
51-
publicfunctionregisterListener($key,$logoutPath,$csrfTokenId,$csrfParameter,CsrfTokenManagerInterface$csrfTokenManager =null/*, $context = null*/)
51+
publicfunctionregisterListener($key,$logoutPath,$csrfTokenId,$csrfParameter,CsrfTokenManagerInterface$csrfTokenManager =null/*,string$context = null*/)
5252
{
5353
if (func_num_args() >=6) {
5454
$context =func_get_arg(5);
5555
}else {
5656
if (__CLASS__ !==get_class($this)) {
5757
$r =new \ReflectionMethod($this,__FUNCTION__);
5858
if (__CLASS__ !==$r->getDeclaringClass()->getName()) {
59-
@trigger_error(sprintf('Method %s() will have a sixth `$context = null` argument in version 4.0. Not defining it is deprecated since 3.3.',__METHOD__),E_USER_DEPRECATED);
59+
@trigger_error(sprintf('Method %s() will have a sixth `string$context = null` argument in version 4.0. Not defining it is deprecated since 3.3.',__METHOD__),E_USER_DEPRECATED);
6060
}
6161
}
6262

‎src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,15 @@ protected function getConstructor(array &$data, $class, array &$context, \Reflec
302302
*
303303
* @throws RuntimeException
304304
*/
305-
protectedfunctioninstantiateObject(array &$data,$class,array &$context,\ReflectionClass$reflectionClass,$allowedAttributes/*, $format = null*/)
305+
protectedfunctioninstantiateObject(array &$data,$class,array &$context,\ReflectionClass$reflectionClass,$allowedAttributes/*,string$format = null*/)
306306
{
307307
if (func_num_args() >=6) {
308308
$format =func_get_arg(5);
309309
}else {
310310
if (__CLASS__ !==get_class($this)) {
311311
$r =new \ReflectionMethod($this,__FUNCTION__);
312312
if (__CLASS__ !==$r->getDeclaringClass()->getName()) {
313-
@trigger_error(sprintf('Method %s::%s() will have a 6th `$format = null` argument in version 4.0. Not defining it is deprecated since 3.2.',get_class($this),__FUNCTION__),E_USER_DEPRECATED);
313+
@trigger_error(sprintf('Method %s::%s() will have a 6th `string$format = null` argument in version 4.0. Not defining it is deprecated since 3.2.',get_class($this),__FUNCTION__),E_USER_DEPRECATED);
314314
}
315315
}
316316

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp