Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6b73e1

Browse files
Merge branch '4.3' into 4.4
* 4.3: Fix symfony/phpunit-bridge not up to date in phpunit 4.8 test suite Sync "not implementing the method" deprecations messages
2 parents a837aa1 + c3c233c commit f6b73e1

File tree

11 files changed

+18
-13
lines changed

11 files changed

+18
-13
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@
119119
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
120120
passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
121121
}
122+
123+
passthru("$COMPOSER config --unset platform");
122124
if (file_exists($path = $root.'/vendor/symfony/phpunit-bridge')) {
123125
passthru("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
124126
passthru("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg(str_replace('/', DIRECTORY_SEPARATOR, $path)));

src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ public function setPathSeparator(string $separator)
364364
$child->setPathSeparator($separator);
365365
}
366366
} else {
367-
@trigger_error('Passing a ParentNodeDefinitionInterface without getChildNodeDefinitions() is deprecated since Symfony 4.1.', E_USER_DEPRECATED);
367+
@trigger_error(sprintf('Not implementing the "%s::getChildNodeDefinitions()" method in "%s" is deprecated since Symfony 4.1.', ParentNodeDefinitionInterface::class, \get_class($this)), E_USER_DEPRECATED);
368368
}
369369
}
370370

src/Symfony/Component/Form/AbstractExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private function initTypeExtensions()
182182
$extendedTypes[] = $extendedType;
183183
}
184184
} else {
185-
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', \get_class($extension), FormTypeExtensionInterface::class), E_USER_DEPRECATED);
185+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, \get_class($extension)), E_USER_DEPRECATED);
186186

187187
$extendedTypes = [$extension->getExtendedType()];
188188
}

src/Symfony/Component/Form/DependencyInjection/FormPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function processFormTypeExtensions(ContainerBuilder $container)
9696

9797
if (isset($tag[0]['extended_type'])) {
9898
if (!method_exists($typeExtensionClass, 'getExtendedTypes')) {
99-
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', $typeExtensionClass, FormTypeExtensionInterface::class), E_USER_DEPRECATED);
99+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, $typeExtensionClass), E_USER_DEPRECATED);
100100
}
101101

102102
$typeExtensions[$tag[0]['extended_type']][] = new Reference($serviceId);

src/Symfony/Component/Form/PreloadedExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(array $types, array $typeExtensions, FormTypeGuesser
3636
foreach ($typeExtensions as $extensions) {
3737
foreach ($extensions as $typeExtension) {
3838
if (!method_exists($typeExtension, 'getExtendedTypes')) {
39-
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', \get_class($typeExtension), FormTypeExtensionInterface::class), E_USER_DEPRECATED);
39+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, \get_class($typeExtension)), E_USER_DEPRECATED);
4040
}
4141
}
4242
}

src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
namespace Symfony\Component\Intl\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1516
use Symfony\Component\Intl\Locale;
1617

1718
abstract class ResourceBundleTestCase extends TestCase
1819
{
20+
use ForwardCompatTestTrait;
21+
1922
// Include the locales statically so that the data providers are decoupled
2023
// from the Intl class. Otherwise tests will fail if the intl extension is
2124
// not loaded, because it is NOT possible to skip the execution of data
@@ -696,7 +699,7 @@ abstract class ResourceBundleTestCase extends TestCase
696699

697700
private static $rootLocales;
698701

699-
protected function setUp(): void
702+
private function doSetUp()
700703
{
701704
Locale::setDefault('en');
702705
Locale::setDefaultFallback('en');

src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getToken()
4040
public function setToken(TokenInterface $token = null)
4141
{
4242
if (null !== $token && !method_exists($token, 'getRoleNames')) {
43-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
43+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
4444
}
4545

4646
$this->token = $token;

src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(ExpressionLanguage $expressionLanguage, Authenticati
4444
$authChecker = null;
4545

4646
if (!method_exists($roleHierarchy, 'getReachableRoleNames')) {
47-
@trigger_error(sprintf('Not implementing the getReachableRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($this->roleHierarchy), RoleHierarchyInterface::class), E_USER_DEPRECATED);
47+
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($this->roleHierarchy)), E_USER_DEPRECATED);
4848
}
4949
} elseif (null === $authChecker) {
5050
@trigger_error(sprintf('Argument 3 passed to "%s()" should be an instance of AuthorizationCheckerInterface, not passing it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
@@ -99,7 +99,7 @@ private function getVariables(TokenInterface $token, $subject)
9999
$roleNames = $token->getRoleNames();
100100
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
101101
} else {
102-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
102+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
103103

104104
$roles = $token->getRoles(false);
105105
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);

src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class RoleHierarchyVoter extends RoleVoter
2929
public function __construct(RoleHierarchyInterface $roleHierarchy, string $prefix = 'ROLE_')
3030
{
3131
if (!method_exists($roleHierarchy, 'getReachableRoleNames')) {
32-
@trigger_error(sprintf('Not implementing the getReachableRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($roleHierarchy), RoleHierarchyInterface::class), E_USER_DEPRECATED);
32+
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($roleHierarchy)), E_USER_DEPRECATED);
3333
}
3434

3535
$this->roleHierarchy = $roleHierarchy;
@@ -46,7 +46,7 @@ protected function extractRoles(TokenInterface $token)
4646
if (method_exists($token, 'getRoleNames')) {
4747
$roles = $token->getRoleNames();
4848
} else {
49-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
49+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
5050

5151
$roles = array_map(function (Role $role) { return $role->getRole(); }, $token->getRoles(false));
5252
}

src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function extractRoles(TokenInterface $token)
6262
return $token->getRoleNames();
6363
}
6464

65-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
65+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
6666

6767
return array_map(function (Role $role) { return $role->getRole(); }, $token->getRoles(false));
6868
}

src/Symfony/Component/Workflow/EventListener/GuardListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GuardListener
3838
public function __construct(array $configuration, ExpressionLanguage $expressionLanguage, TokenStorageInterface $tokenStorage, AuthorizationCheckerInterface $authorizationChecker, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null, ValidatorInterface $validator = null)
3939
{
4040
if (null !== $roleHierarchy && !method_exists($roleHierarchy, 'getReachableRoleNames')) {
41-
@trigger_error(sprintf('Not implementing the getReachableRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($roleHierarchy), RoleHierarchyInterface::class), E_USER_DEPRECATED);
41+
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($roleHierarchy)), E_USER_DEPRECATED);
4242
}
4343

4444
$this->configuration = $configuration;
@@ -90,7 +90,7 @@ private function getVariables(GuardEvent $event): array
9090
$roleNames = $token->getRoleNames();
9191
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
9292
} else {
93-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
93+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
9494

9595
$roles = $token->getRoles(false);
9696
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);

0 commit comments

Comments
 (0)