diff --git a/UPGRADE-7.2.md b/UPGRADE-7.2.md index 397e6406d4cc8..6377687d5822e 100644 --- a/UPGRADE-7.2.md +++ b/UPGRADE-7.2.md @@ -46,6 +46,7 @@ Ldap ---- * Add methods for `saslBind()` and `whoami()` to `ConnectionInterface` and `LdapInterface` + * Deprecate the `sizeLimit` option of `AbstractQuery` Mailer ------ diff --git a/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php b/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php index 2bbbb34764c83..1a14637fc94fe 100644 --- a/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php +++ b/src/Symfony/Component/Ldap/Adapter/AbstractQuery.php @@ -43,6 +43,8 @@ public function __construct( $resolver->setNormalizer('filter', fn (Options $options, $value) => \is_array($value) ? $value : [$value]); + $resolver->setDeprecated('sizeLimit', 'symfony/ldap', '7.2', 'The "%name%" option is deprecated and will be removed in Symfony 8.0.'); + $this->options = $resolver->resolve($options); } } diff --git a/src/Symfony/Component/Ldap/CHANGELOG.md b/src/Symfony/Component/Ldap/CHANGELOG.md index 61a11df2cafd0..4539de05c08a2 100644 --- a/src/Symfony/Component/Ldap/CHANGELOG.md +++ b/src/Symfony/Component/Ldap/CHANGELOG.md @@ -5,6 +5,7 @@ CHANGELOG --- * Add methods for `saslBind()` and `whoami()` to `ConnectionInterface` and `LdapInterface` + * Deprecate the `sizeLimit` option of `AbstractQuery` 7.1 --- diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php new file mode 100644 index 0000000000000..ca5c2e01d832f --- /dev/null +++ b/src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Ldap\Tests\Adapter; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait; +use Symfony\Component\Ldap\Adapter\AbstractQuery; +use Symfony\Component\Ldap\Adapter\CollectionInterface; +use Symfony\Component\Ldap\Adapter\ConnectionInterface; + +class AbstractQueryTest extends TestCase +{ + use ExpectUserDeprecationMessageTrait; + + /** + * @group legacy + */ + public function testSizeLimitIsDeprecated() + { + $this->expectUserDeprecationMessage('Since symfony/ldap 7.2: The "sizeLimit" option is deprecated and will be removed in Symfony 8.0.'); + + new class($this->createMock(ConnectionInterface::class), '', '', ['filter' => '*', 'sizeLimit' => 1]) extends AbstractQuery { + public function execute(): CollectionInterface + { + } + }; + } +}
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: