1 Answer
1

You can't do this without modifying the original files. Even if you created namespaced wrapper classes that extended Symfony's YAML classes, the original ones would still reside in the global namespace (defeating the purpose of namespacing).

Is there a reason you don't want to modify the original files? Namespacing is very easy to merge, if you're worried about having to update the Symfony packages (you are using version control, yes?).