netz98 / n98-magerun

The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API.
http://magerun.net/
Other
1.44k stars 400 forks source link

Unknown error (0): "Symfony\Component\Console\Helper\DialogHelper" is deprecated #783

Closed convenient closed 8 years ago

convenient commented 8 years ago
magerun --version
n98-magerun version 1.97.11 by netz98 new media GmbH

The issue

magerun admin:user:change-password

Unknown error (0): "Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.  in phar:///opt/boxen/phpenv/bin/magerun/vendor/symfony/console/Helper/HelperSet.php on line 82

Project composer.lock

Sadly the project is closed source.

The only thing that pops up the the projects composer.lock when I search for symfony is:

            "name": "symfony/yaml",
            "version": "v2.6.13",
tkn98 commented 8 years ago

Please search through existing issues AFAIK this has been reported earlier. Thanks :)

convenient commented 8 years ago

I saw similar errors like https://github.com/netz98/n98-magerun/issues/642, but will investigate more thoroughly later

thisisandrew commented 8 years ago

Having same issue as @convenient and found that magento apps with custom error handlers cause the script to die() can cause this issue. The dependency Symfony\Console\Helper\HelperSet.php includes a mechanism for deprecation which uses @trigger_error and whilst this deprecation will be ignored if the error handler also suppresses it, if not then magerun will die.

The deprecation mechanism was introduced in the Symfony\Console at the 2.7 branch which a dependency of magerun from 1.97.6

This is not a magerun issue but magerun is not compatible with Symfony\Console >= 3.x when the deprecation is removed.

convenient commented 8 years ago

Boy is my face red.

The custom error handler for the magento project was overly aggressive, making @ errors noisy again. Pretty much like xdebug.scream. This was with the intention of making the developers write better code with proper error handling.

When the suppressed error was triggered the custom error handler then did exactly what we wanted, and blew up over the suppressed error.

Closing as it was totally an internal issue.