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

Appearance settings

Commit 8eb76a2

Browse filesBrowse files
[Ldap] Deprecate the sizeLimit query option
1 parent 394be3e commit 8eb76a2
Copy full SHA for 8eb76a2

File tree

3 files changed

+40
-0
lines changed
Filter options

3 files changed

+40
-0
lines changed

‎Adapter/AbstractQuery.php

Copy file name to clipboardExpand all lines: Adapter/AbstractQuery.php
+2Lines 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
}

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines 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
---

‎Tests/Adapter/AbstractQueryTest.php

Copy file name to clipboard
+37Lines 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->expectUserDeprecationMessage('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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.