Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] fix yaml:lint when yaml is not installed along side framework-bundle#20066
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
50c6de0 to8fe497cCompare| parent::configure(); | ||
| $this->setName('lint:yaml'); | ||
| if (!$this->isEnabled() &&null !==$this->command) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do we need this?configure() should never be called if the command is not enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, this is needed asconfigure() is called by the constructor.
| private$directoryIteratorProvider; | ||
| private$isReadableProvider; | ||
| publicfunction__construct($name =null,$directoryIteratorProvider =null,$isReadableProvider =null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Couldn't$directoryIteratorProvider and$isReadableProvider be type-hinted ascallable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
They could
| } | ||
| returnparent::getDirectoryIterator($directory); | ||
| returnclass_exists('Symfony\Component\Yaml\Command\LintCommand') &&parent::isEnabled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could beclass_exists(BaseLintCommand::class)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
done
… along side framework-bundle (fabpot)This PR was merged into the 3.2-dev branch.Discussion----------[FrameworkBundle] fix yaml:lint when yaml is not installed along side framework-bundle| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aYAML is not an explicit dependency of FrameworkBundle. If it is not installed, the console is broken as the yaml:lint commands tries to extends the one in the YAML component. This bug only exists in master as this refactoring happened in 3.2Commits-------b1c5a68 [FrameworkBundle] fixed yaml:lint when yaml is not installed along side framwork-bundle
YAML is not an explicit dependency of FrameworkBundle. If it is not installed, the console is broken as the yaml:lint commands tries to extends the one in the YAML component. This bug only exists in master as this refactoring happened in 3.2