8000 [TwigBundle] Commands as a service by ro0NL · Pull Request #23519 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[TwigBundle] Commands as a service #23519

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
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file 8000
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update LintCommand.php
  • Loading branch information
ro0NL authored Jul 20, 2017
commit a2a58f56d718d7857b015263efbea744bd19661b
8 changes: 4 additions & 4 deletions src/Symfony/Bridge/Twig/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ class LintCommand extends Command
/**
* @param Environment $twig
*/
public function __construct($name = 'lint:twig')
public function __construct($twig = null)
{
parent::__construct();

if (!$name instanceof Environment) {
if (!$twig instanceof Environment) {
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);

$this->setName($name);
$this->setName(null === $twig ? 'lint:twig' : $twig);

return;
}

$this->twig = $name;
$this->twig = $twig;
}

public function setTwigEnvironment(Environment $twig)
Expand Down
0