8000 Symfony\Component\Console\Application uses Deprecated Helpers · Issue #12791 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Symfony\Component\Console\Application uses Deprecated Helpers #12791

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

Closed
ghost opened this issue Dec 1, 2014 · 4 comments
Closed

Symfony\Component\Console\Application uses Deprecated Helpers #12791

ghost opened this issue Dec 1, 2014 · 4 comments

Comments

@ghost
Copy link
ghost commented Dec 1, 2014

Hi all,

I am not sure if this is a bug or if I am doing something wrong, but after 'composer update' I have sf 2.6. components and my cilex cli application is broken.

It seems like Symfony\Component\Console\Application is using deprecated helpers:

use Symfony\Component\Console\Helper\DialogHelper;
use Symfony\Component\Console\Helper\ProgressHelper;
use Symfony\Component\Console\Helper\TableHelper;

...

/**
     * Gets the default helper set with the helpers that should always be available.
     *
     * @return HelperSet A HelperSet instance
     */
    protected function getDefaultHelperSet()
    {
        return new HelperSet(array(
            new FormatterHelper(),
            new DialogHelper(),
            new ProgressHelper(),
            new TableHelper(),
            new DebugFormatterHelper(),
            new ProcessHelper(),
            new QuestionHelper(),
        ));
    }

Is it correct to use deprecated code in the component? If so....how to get rid of the errors?

TIA!

@xabbuh
Copy link
Member
xabbuh commented Dec 1, 2014

@sigurros The helpers can't be removed from the application because that would break backward compatibility.

However, this was also reported in #12771.

@ghost
Copy link
Author
ghost commented Dec 1, 2014

Oh. Sorry, I haven`t found this issue. But for me the question is still, how to avoid the deprecated notices, cause they break my app.

@xabbuh
Copy link
Member
xabbuh commented Dec 1, 2014

@sigurros For the moment, you can let your dependencies point to 2.6 or silence errors of type E_USER_DEPRECATED until there is a fix (I proposed one in #12796).

@ghost
Copy link
Author
ghost commented Dec 2, 2014

Thanks a lot!! E_USER_DEPRECATED is the way for me, cause the console is a transistent dependecy. I close this issue, since it is a duplicate

@ghost ghost closed this as completed Dec 2, 2014
fabpot added a commit that referenced this issue Dec 4, 2014
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] improve deprecation warning triggers

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12771, #12791
| License       | MIT
| Doc PR        |

Since the default helper set of the Console `Application` relies on
the `DialogHelper`, the `ProgressHelper` and the `TableHelper`, there
must be a way to not always trigger `E_USER_DEPRECATION` errors when
one of these helper is used.

Commits
-------

88e3314 [Console] improve deprecation warning triggers
This issue was closed.
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

1 participant
0