Skip to content

Commit e946fdc

Browse files
[Ldap] Deprecate the sizeLimit query option
1 parent c3f10c3 commit e946fdc

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

UPGRADE-7.2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Ldap
4646
----
4747

4848
* Add methods for `saslBind()` and `whoami()` to `ConnectionInterface` and `LdapInterface`
49+
* Deprecate the `sizeLimit` option of `AbstractQuery`
4950

5051
Mailer
5152
------

src/Symfony/Component/Ldap/Adapter/AbstractQuery.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public function __construct(
4343

4444
$resolver->setNormalizer('filter', fn (Options $options, $value) => \is_array($value) ? $value : [$value]);
4545

46+
$resolver->setDeprecated('sizeLimit', 'symfony/ldap', '7.2', 'The "%name%" option is deprecated and will be removed in Symfony 8.0.');
47+
4648
$this->options = $resolver->resolve($options);
4749
}
4850
}

src/Symfony/Component/Ldap/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add methods for `saslBind()` and `whoami()` to `ConnectionInterface` and `LdapInterface`
8+
* Deprecate the `sizeLimit` option of `AbstractQuery`
89

910
7.1
1011
---
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Ldap\Tests\Adapter;
13+
14+
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait;
16+
use Symfony\Component\Ldap\Adapter\AbstractQuery;
17+
use Symfony\Component\Ldap\Adapter\CollectionInterface;
18+
use Symfony\Component\Ldap\Adapter\ConnectionInterface;
19+
20+
class AbstractQueryTest extends TestCase
21+
{
22+
use ExpectUserDeprecationMessageTrait;
23+
24+
/**
25+
* @group legacy
26+
*/
27+
public function testSizeLimitIsDeprecated()
28+
{
29+
$this->expectUserDeprecation('Since symfony/ldap 7.2: The "sizeLimit" option is deprecated and will be removed in Symfony 8.0.');
30+
31+
new class($this->createMock(ConnectionInterface::class), '', '', ['filter' => '*', 'sizeLimit' => 1]) extends AbstractQuery {
32+
public function execute(): CollectionInterface
33+
{
34+
}
35+
};
36+
}
37+
}

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