Skip to content

bin/console always outputs 'Deprecated:' notices to console; ignores env/flags/config to turn it off. #59139

@pgnd

Description

@pgnd

Symfony version(s) affected

7.2.0

Description

if any 'Deprecation' in a project is active, bin/console outputs a notice for each one -- regardless of env/flags/config to disable

it should be possible to turn off error reporting

How to reproduce

e.g.,

grep ^error_reporting /usr/local/etc/php8/php.ini
	error_reporting = E_ALL & ~E_DEPRECATED

php -i | grep ^error_reporting
	error_reporting => 22527 => 22527

APP_DEV=0 bin/console --no-debug about

!!!	Deprecated: Massive\Bundle\SearchBundle\Command\ReindexCommand::__construct(): Implicitly marking parameter $questionHelper as nullable is deprecated, the explicit nullable type must be used instead in /srv/sulu.app/vendor/massive/search-bundle/Command/ReindexCommand.php on line 63

!!!	Deprecated: Massive\Bundle\SearchBundle\Command\PurgeCommand::__construct(): Implicitly marking parameter $questionHelper as nullable is deprecated, the explicit nullable type must be used instead in /srv/sulu.app/vendor/massive/search-bundle/Command/PurgeCommand.php on line 41
	 -------------------- ----------------------------------------------
	  Symfony
	 -------------------- ----------------------------------------------
	  Version              7.2.0
	  Long-Term Support    No
	  End of maintenance   07/2025 (in +235 days)
	  End of life          07/2025 (in +235 days)
	 -------------------- ----------------------------------------------
	  Kernel
	 -------------------- ----------------------------------------------
	  Type                 App\Kernel
	  Environment          dev
	  Debug                false
	  Charset              UTF-8
	  Cache directory      ./var/cache/admin/dev (18.0 MiB)
	  Build directory      ./var/cache/admin/dev (18.0 MiB)
	  Log directory        ./var/log/admin (218 KiB)
	 -------------------- ----------------------------------------------
	  PHP
	 -------------------- ----------------------------------------------
	  Version              8.4.1
	  Architecture         64 bits
	  Intl locale          en_US
	  Timezone             America/New_York (2024-12-08T15:05:48-05:00)
	  OPcache              Enabled
	  APCu                 Enabled
	  Xdebug               Enabled (trace)
	 -------------------- ----------------------------------------------

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions