Skip to content

[Ldap] Deprecate the sizeLimit query option #58558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADE-7.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Ldap
----

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

Mailer
------
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Ldap/Adapter/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
1 change: 1 addition & 0 deletions src/Symfony/Component/Ldap/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
---

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

7.1
---
Expand Down
37 changes: 37 additions & 0 deletions src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* 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
{
}
};
}
}
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