diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php
index 540d23c8a6e73..6f856d1f413f8 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php
@@ -13,7 +13,6 @@
use Symfony\Component\Form\Extension\Core\Type\PercentType;
use Symfony\Component\Form\FormError;
-use Symfony\Component\Form\FormTypeExtensionInterface;
use Symfony\Component\Form\Tests\AbstractLayoutTest;
abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
@@ -1689,32 +1688,9 @@ public function testDateTimeWithWidgetSingleText()
);
}
- /**
- * @group legacy
- */
public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets()
{
- if (method_exists(FormTypeExtensionInterface::class, 'getExtendedTypes')) {
- $this->markTestSkipped('The test requires symfony/form 4.x.');
- }
-
- $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateTimeType', '2011-02-03 04:05:06', [
- 'input' => 'string',
- 'date_widget' => 'choice',
- 'time_widget' => 'choice',
- 'widget' => 'single_text',
- 'model_timezone' => 'UTC',
- 'view_timezone' => 'UTC',
- ]);
-
- $this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
-'/input
- [@type="datetime-local"]
- [@name="name"]
- [@class="my&class form-control"]
- [@value="2011-02-03T04:05:06"]
-'
- );
+ $this->markTestSkipped('Make tests pass with symfony/form 4.4');
}
public function testDateChoice()
diff --git a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
index 144b6d6161c81..f1600df686515 100644
--- a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
+++ b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
@@ -12,6 +12,8 @@ CHANGELOG
* Removed `LogoutUrlHelper` and `SecurityHelper` templating helpers, use Twig instead
* Removed the `logout_on_user_change` firewall option
* Removed the `threads` encoder option
+ * Removed the `security.authentication.trust_resolver.anonymous_class` parameter
+ * Removed the `security.authentication.trust_resolver.rememberme_class` parameter
4.3.0
-----
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
index 1d2f0c4e503b3..c02f413e65578 100644
--- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
@@ -5,8 +5,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
- null
- null
@@ -49,10 +47,7 @@
-
- %security.authentication.trust_resolver.anonymous_class%
- %security.authentication.trust_resolver.rememberme_class%
-
+
%security.authentication.session_strategy.strategy%
diff --git a/src/Symfony/Component/Form/CHANGELOG.md b/src/Symfony/Component/Form/CHANGELOG.md
index 644bb76cba402..d6f2834966f06 100644
--- a/src/Symfony/Component/Form/CHANGELOG.md
+++ b/src/Symfony/Component/Form/CHANGELOG.md
@@ -16,6 +16,7 @@ CHANGELOG
* removed the `regions` option of the `TimezoneType`
* removed the `$scale` argument of the `IntegerToLocalizedStringTransformer`
* removed `TemplatingExtension` and `TemplatingRendererEngine` classes, use Twig instead
+ * passing a null message when instantiating a `Symfony\Component\Form\FormError` is not allowed
4.3.0
-----
diff --git a/src/Symfony/Component/Form/FormError.php b/src/Symfony/Component/Form/FormError.php
index 899631257b1ea..f390854aeee1c 100644
--- a/src/Symfony/Component/Form/FormError.php
+++ b/src/Symfony/Component/Form/FormError.php
@@ -47,13 +47,8 @@ class FormError
*
* @see \Symfony\Component\Translation\Translator
*/
- public function __construct(?string $message, string $messageTemplate = null, array $messageParameters = [], int $messagePluralization = null, $cause = null)
+ public function __construct(string $message, string $messageTemplate = null, array $messageParameters = [], int $messagePluralization = null, $cause = null)
{
- if (null === $message) {
- @trigger_error(sprintf('Passing a null message when instantiating a "%s" is deprecated since Symfony 4.4.', __CLASS__), E_USER_DEPRECATED);
- $message = '';
- }
-
$this->message = $message;
$this->messageTemplate = $messageTemplate ?: $message;
$this->messageParameters = $messageParameters;
diff --git a/src/Symfony/Component/HttpFoundation/CHANGELOG.md b/src/Symfony/Component/HttpFoundation/CHANGELOG.md
index 2f8f7d99b4974..efe503579237a 100644
--- a/src/Symfony/Component/HttpFoundation/CHANGELOG.md
+++ b/src/Symfony/Component/HttpFoundation/CHANGELOG.md
@@ -9,6 +9,7 @@ CHANGELOG
* removed method `UploadedFile::getClientSize()` and the related constructor argument
* made `Request::getSession()` throw if the session has not been set before
* removed `Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL`
+ * passing a null url when instantiating a `RedirectResponse` is not allowed
4.4.0
-----
diff --git a/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php
index 1d4f37cae3324..9fe1b26d4b2de 100644
--- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php
+++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php
@@ -32,13 +32,8 @@ class RedirectResponse extends Response
*
* @see http://tools.ietf.org/html/rfc2616#section-10.3
*/
- public function __construct(?string $url, int $status = 302, array $headers = [])
+ public function __construct(string $url, int $status = 302, array $headers = [])
{
- if (null === $url) {
- @trigger_error(sprintf('Passing a null url when instantiating a "%s" is deprecated since Symfony 4.4.', __CLASS__), E_USER_DEPRECATED);
- $url = '';
- }
-
parent::__construct('', $status, $headers);
$this->setTargetUrl($url);
diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php
index f4f5a00dd1ee9..8935ef6fdb5db 100644
--- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php
+++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php
@@ -846,8 +846,6 @@ public function offsetGet($option, bool $triggerDeprecation = true)
throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
}
- $triggerDeprecation = 1 === \func_num_args() || func_get_arg(1);
-
// Shortcut for resolved options
if (isset($this->resolved[$option]) || \array_key_exists($option, $this->resolved)) {
if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || $this->calling) && \is_string($this->deprecated[$option])) {
diff --git a/src/Symfony/Component/Security/CHANGELOG.md b/src/Symfony/Component/Security/CHANGELOG.md
index f5ef6ad51dac9..13af4efc2750f 100644
--- a/src/Symfony/Component/Security/CHANGELOG.md
+++ b/src/Symfony/Component/Security/CHANGELOG.md
@@ -27,6 +27,7 @@ CHANGELOG
* Removed `ExpressionVoter::addExpressionLanguageProvider()`
* Made `Security::getUser()` return null when the user is not an instanceof `UserInterface`,
use `getToken()->getUser()` instead
+ * Removed the `AuthenticationTrustResolver` constructor arguments
4.4.0
-----
diff --git a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php
index cba6a8708243e..cbc411fad730b 100644
--- a/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php
+++ b/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php
@@ -22,23 +22,6 @@
*/
class AuthenticationTrustResolver implements AuthenticationTrustResolverInterface
{
- private $anonymousClass;
- private $rememberMeClass;
-
- public function __construct(?string $anonymousClass = null, ?string $rememberMeClass = null)
- {
- $this->anonymousClass = $anonymousClass;
- $this->rememberMeClass = $rememberMeClass;
-
- if (null !== $anonymousClass && !is_a($anonymousClass, AnonymousToken::class, true)) {
- @trigger_error(sprintf('Configuring a custom anonymous token class is deprecated since Symfony 4.2; have the "%s" class extend the "%s" class instead, and remove the "%s" constructor argument.', $anonymousClass, AnonymousToken::class, self::class), E_USER_DEPRECATED);
- }
-
- if (null !== $rememberMeClass && !is_a($rememberMeClass, RememberMeToken::class, true)) {
- @trigger_error(sprintf('Configuring a custom remember me token class is deprecated since Symfony 4.2; have the "%s" class extend the "%s" class instead, and remove the "%s" constructor argument.', $rememberMeClass, RememberMeToken::class, self::class), E_USER_DEPRECATED);
- }
- }
-
/**
* {@inheritdoc}
*/
@@ -48,10 +31,6 @@ public function isAnonymous(TokenInterface $token = null)
return false;
}
- if (null !== $this->anonymousClass) {
- return $token instanceof $this->anonymousClass;
- }
-
return $token instanceof AnonymousToken;
}
@@ -64,10 +43,6 @@ public function isRememberMe(TokenInterface $token = null)
return false;
}
- if (null !== $this->rememberMeClass) {
- return $token instanceof $this->rememberMeClass;
- }
-
return $token instanceof RememberMeToken;
}
diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php
index e6e199e94771e..bb8df147c1414 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php
@@ -55,39 +55,6 @@ public function testisFullFledged()
$this->assertTrue($resolver->isFullFledged(new FakeCustomToken()));
}
- /**
- * @group legacy
- * @expectedDeprecation Configuring a custom anonymous token class is deprecated since Symfony 4.2; have the "Symfony\Component\Security\Core\Tests\Authentication\FakeCustomToken" class extend the "Symfony\Component\Security\Core\Authentication\Token\AnonymousToken" class instead, and remove the "Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver" constructor argument.
- */
- public function testsAnonymousDeprecationWithCustomClasses()
- {
- $resolver = new AuthenticationTrustResolver(FakeCustomToken::class);
-
- $this->assertTrue($resolver->isAnonymous(new FakeCustomToken()));
- }
-
- /**
- * @group legacy
- * @expectedDeprecation Configuring a custom remember me token class is deprecated since Symfony 4.2; have the "Symfony\Component\Security\Core\Tests\Authentication\FakeCustomToken" class extend the "Symfony\Component\Security\Core\Authentication\Token\RememberMeToken" class instead, and remove the "Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver" constructor argument.
- */
- public function testIsRememberMeDeprecationWithCustomClasses()
- {
- $resolver = new AuthenticationTrustResolver(null, FakeCustomToken::class);
-
- $this->assertTrue($resolver->isRememberMe(new FakeCustomToken()));
- }
-
- /**
- * @group legacy
- * @expectedDeprecation Configuring a custom remember me token class is deprecated since Symfony 4.2; have the "Symfony\Component\Security\Core\Tests\Authentication\FakeCustomToken" class extend the "Symfony\Component\Security\Core\Authentication\Token\RememberMeToken" class instead, and remove the "Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver" constructor argument.
- */
- public function testIsFullFledgedDeprecationWithCustomClasses()
- {
- $resolver = new AuthenticationTrustResolver(FakeCustomToken::class, FakeCustomToken::class);
-
- $this->assertFalse($resolver->isFullFledged(new FakeCustomToken()));
- }
-
public function testIsAnonymousWithClassAsConstructorButStillExtending()
{
$resolver = $this->getResolver();
diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md
index 18b9330f9b23e..423de6404a0a7 100644
--- a/src/Symfony/Component/Validator/CHANGELOG.md
+++ b/src/Symfony/Component/Validator/CHANGELOG.md
@@ -13,6 +13,7 @@ CHANGELOG
* removed support for using the `Expression` constraint without `symfony/expression-language`
* changed default value of `canonicalize` option of `Locale` constraint to `true`
* removed `ValidatorBuilderInterface`
+ * passing a null message when instantiating a `ConstraintViolation` is not allowed
4.4.0
-----
diff --git a/src/Symfony/Component/Validator/ConstraintViolation.php b/src/Symfony/Component/Validator/ConstraintViolation.php
index 2ec15e4309c54..a0ce00e33426c 100644
--- a/src/Symfony/Component/Validator/ConstraintViolation.php
+++ b/src/Symfony/Component/Validator/ConstraintViolation.php
@@ -49,13 +49,8 @@ class ConstraintViolation implements ConstraintViolationInterface
* caused the violation
* @param mixed $cause The cause of the violation
*/
- public function __construct(?string $message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, int $plural = null, $code = null, Constraint $constraint = null, $cause = null)
+ public function __construct(string $message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, int $plural = null, $code = null, Constraint $constraint = null, $cause = null)
{
- if (null === $message) {
- @trigger_error(sprintf('Passing a null message when instantiating a "%s" is deprecated since Symfony 4.4.', __CLASS__), E_USER_DEPRECATED);
- $message = '';
- }
-
$this->message = $message;
$this->messageTemplate = $messageTemplate;
$this->parameters = $parameters;