Skip to content
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

makes doctrine less dependent upon the symfony yaml component #957

Merged
merged 1 commit into from
Mar 23, 2014

Conversation

thealjey
Copy link
Contributor

This is the last place in the framework where the class is just too tightly coupled with the symfony yaml component, that the yaml parser alone cannot be overridden without overriding an entire class.
I simply brought it in accordance with "Doctrine\ORM\Mapping\Driver\YamlDriver" where a separate method called loadMappingFile exists to parse the mapping file.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-2991

We use Jira to track the state of pull requests and the versions they got
included in.

@Ocramius
Copy link
Member

@thealjey what exactly is the use case for a custom YAML dumper here? Wouldn't it be simpler to just dump->import->re-dump with transformations?

@thealjey
Copy link
Contributor Author

@Ocramius it certainly would not, because in that case:

  1. the array would be dumped into a yaml string, just to be converted back to an array (which is what we originally needed), and then maybe after some modifications it would have to be dumped back into a string all over again.
  2. the symfony yaml component needs to be available, you can't just swap it out with something else (maybe a different implementation of the same parser), which is exactly what I meant by "tightly coupled".

@Ocramius
Copy link
Member

@thealjey seems legit

beberlei added a commit that referenced this pull request Mar 23, 2014
makes doctrine less dependent upon the symfony yaml component
@beberlei beberlei merged commit 927d69b into doctrine:master Mar 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants