Skip to content
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
5 changes: 5 additions & 0 deletions UPGRADE-7.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ Mime

* Deprecate implementing `__sleep/wakeup()` on `AbstractPart` implementations; use `__(un)serialize()` instead

MonologBridge
-------------

* Deprecate class `NotFoundActivationStrategy`, use `HttpCodeActivationStrategy` instead

Routing
-------

Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Bridge/Monolog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

7.4
---

* Deprecate class `NotFoundActivationStrategy`, use `HttpCodeActivationStrategy` instead

7.0
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Fabien Potencier <fabien@symfony.com>
* @author Pierrick Vignand <pierrick.vignand@gmail.com>
*
* @deprecated since Symfony 7.4, use {@see HttpCodeActivationStrategy} instead
*/
final class NotFoundActivationStrategy implements ActivationStrategyInterface
{
Expand All @@ -32,6 +34,8 @@ public function __construct(
array $excludedUrls,
private ActivationStrategyInterface $inner,
) {
trigger_deprecation('symfony/monolog-bridge', '7.4', 'The "%s" class is deprecated, use "%s" instead.', __CLASS__, HttpCodeActivationStrategy::class);

$this->exclude = '{('.implode('|', $excludedUrls).')}i';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use Monolog\Level;
use Monolog\LogRecord;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy;
use Symfony\Bridge\Monolog\Tests\RecordFactory;
Expand All @@ -24,6 +26,8 @@

class NotFoundActivationStrategyTest extends TestCase
{
#[IgnoreDeprecations]
#[Group('legacy')]
#[DataProvider('isActivatedProvider')]
public function testIsActivated(string $url, array|LogRecord $record, bool $expected)
{
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Monolog/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"require": {
"php": ">=8.2",
"monolog/monolog": "^3",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/service-contracts": "^2.5|^3",
"symfony/http-kernel": "^6.4|^7.0|^8.0"
},
Expand Down
Loading