-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Add missing resource tracking for validation mapping #21927
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
[FrameworkBundle] Add missing resource tracking for validation mapping #21927
Conversation
$files['yaml' === $extension ? 'yml' : $extension][] = $path; | ||
} else { | ||
throw new \RuntimeException(sprintf('Unsupported mapping type in "%s", supported types are XML & Yaml.', $path)); | ||
if ($container->fileExists($path)) { |
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.
content needs to be tracked for directories (but only for new XML and YAML files). But it does not need to be tracked for files (changing the content of the validation file does not need to invalidate the container). So this shoould be improved.
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.
updated. Could you please have a look?
if ($container->fileExists($path)) { | ||
if (is_dir($path)) { | ||
$this->getValidatorMappingFilesFromDir($path, $files); | ||
} elseif (is_file($path)) { |
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.
else
is enough here
eccbc76
to
2435069
Compare
2435069
to
0a19cbe
Compare
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.
👍
Thank you @chalasr. |
…tion mapping (chalasr) This PR was merged into the 3.3-dev branch. Discussion ---------- [FrameworkBundle] Add missing resource tracking for validation mapping | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19086 (comment) | License | MIT | Doc PR | n/a https://github.com/symfony/symfony/pull/21927/files?w=1 Commits ------- 0a19cbe Add missing resource tracking for validation mapping
https://github.com/symfony/symfony/pull/21927/files?w=1