Skip to content
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

Remaining indirect deprecation notices #44313

Closed
karaka200 opened this issue Nov 27, 2021 · 6 comments
Closed

Remaining indirect deprecation notices #44313

karaka200 opened this issue Nov 27, 2021 · 6 comments

Comments

@karaka200
Copy link

When I run php ./vendor/bin/phpunit command, test is ok but display Remaining indirect deprecation notices

Testing started at 12:18 PM ...
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Testing C:\projects\karaka\tests\Controller


Time: 00:00.619, Memory: 28.00 MB

OK (1 test, 1 assertion)

Remaining indirect deprecation notices (1)

  1x: The "Symfony\Bridge\Doctrine\Logger\DbalLogger" class implements "Doctrine\DBAL\Logging\SQLLogger" that is deprecated Use {@link \Doctrine\DBAL\Logging\Middleware} or implement {@link \Doctrine\DBAL\Driver\Middleware} instead.
    1x in ProductControllerTest::testProduct from App\Tests\Controller

Process finished with exit code 0

ProductControllerTest.php

<?php

namespace App\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class ProductControllerTest extends WebTestCase
{
    public function testProduct(): void
    {
        $client = static::createClient();
        $crawler = $client->request('POST', '/product');

        $this->assertResponseIsSuccessful();
    }
}

@nicolas-grekas How can I fix this warning?

@derrabus
Copy link
Member

You cannot. This has to be fixed by DoctrineBundle, see doctrine/DoctrineBundle#1429

@OskarStark
Copy link
Contributor

You only need to take care of "direct deprecation notices"

@nicolas-grekas
Copy link
Member

The deprecation we had in the Symfony codebase has been fixed in #44319
For inspiration maybe.

@arcanisgk

This comment has been minimized.

@arcanisgk
Copy link

I wonder why it says fixed; but when updating the package it is not updated and in the current version the notice continues to appear ...

image

image

image

@evertharmeling
Copy link
Contributor

evertharmeling commented Dec 13, 2021

I wonder why it says fixed; but when updating the package it is not updated and in the current version the notice continues to appear ...

As stated in this comment #44313 (comment) the deprecation message comes from a 'third-party-bundle' (not symfony), for the status check the referenced issue ;)

fabpot added a commit that referenced this issue Mar 25, 2022
…Logger (l-vo)

This PR was merged into the 5.4 branch.

Discussion
----------

[DoctrineBridge] Allow to use a middleware instead of DbalLogger

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |  Step toward the fix of doctrine/DoctrineBundle#1431  (mentioned too in #44313 and #44495)
| License       | MIT
| Doc PR        |

The SqlLogger that is used in doctrine bridge and doctrine bundle has been deprecated and replaced by a system of Middleware.

A work has started on Doctrine bundle with doctrine/DoctrineBundle#1456 and doctrine/DoctrineBundle#1472

This PR suggest to add a middleware thats covers what was previously done by `DbalLogger` and `DebugStack`.

Another PR will follow in DoctrineBundle for the integration.

Commits
-------

20d0806 Allow to use a middleware instead of DbalLogger
This issue is being transferred. Timeline may not be complete until it finishes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants