Kdyby / Console

Symfony Console integration for Kdyby components
https://packagist.org/packages/kdyby/console
Other
52 stars 54 forks source link

Fix detection of nette/application #56

Closed enumag closed 8 years ago

enumag commented 8 years ago

Currently some of my tests are failing with

[Nette\DI\MissingServiceException] Service 'application' not found.

because I have nette/application in dev dependencies but don't use it in all the tests. The problem occurs if a test uses ConsoleExtension without ApplicationExtension.

@fprochazka Should I refactor it to a property like I did here? Personally I like it better than a method.

fprochazka commented 8 years ago

@enumag yeah, this way it's more logical. The property is faster, but the method is imho cleaner. And you can always add the property inside the check method, to make it faster, if that's needed.

enumag commented 8 years ago

@fprochazka Speed is not relevant here so let's leave it as is.

fprochazka commented 8 years ago

Thank you!