Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #20559 [FrameworkBundle] Avoid warming up the validator cache for…
… non-existent class (Seldaek) This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #20559). Discussion ---------- [FrameworkBundle] Avoid warming up the validator cache for non-existent class | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? |no | Tests pass? | yes | License | MIT This relates to FriendsOfSymfony/FOSUserBundle#2224 - where basically the cache warmer triggers autoloading of a class that is broken, and it then blows up. This doesn't fix the problem in itself, loading broken classes will still fail, but it allows us at least to work around it by doing: ``` "exclude-from-classmap": [ "vendor/friendsofsymfony/user-bundle/Propel/" ] ``` And then `composer dump-autoload -a` to get an authoritative classmap. That way the hasMetadataFor will return false because class_exist() won't try to load the class at all. Without the hasMetadataFor fix though, it calls getMetadataFor which throws an exception in the case the class doesn't exist. I am not sure if that's by design.. that the cache warmer would force you to have classes existing for all your validation definitions. Commits ------- cb12f22 [FrameworkBundle] Avoid warming up the validator cache for non-existent classes
- Loading branch information