Skip to content

[RFC] New command lint:deprecations #61238

@nikophil

Description

@nikophil

Hi!

Currently, in order to collect an application's deprecations, we need to run the tests, and only the deprecations triggered by code used by those tests will be displayed after the test run.

However, many deprecations are static (e.g. those triggered by DebugClassLoader), and I believe we can find a way to display all of them without requiring full test coverage.

What do you think about introducing a new command, something like lint:deprecations, which would trigger the autoloading of all classes defined in the application? We could leverage the PSR-0 and PSR-4 autoload definitions from composer.json and autodiscover all classes under those namespaces using a RecursiveDirectoryIterator.

Of course, this wouldn't catch runtime deprecations, but it would still uncover many issues, even in applications without full test coverage. Combined with bin/console debug:container --deprecations, this could greatly help for Symfony upgrades for instance.

I also believe that handling a baseline for this would be useful. Maybe it could borrow some code from the PHPUnit bridge?

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      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