-
Notifications
You must be signed in to change notification settings - Fork 301
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
add several missing subscribers #138
Conversation
how responsive :) No problem, people will continue to use annotations for them, and basta. |
d8a79f5
to
6842c39
Compare
Responsive but also too hasty sometimes. Here is the mapping for sortable. |
Tests exist already for those cases, but they don't register those new subscribers. A good test to see if they work would be to remove all annotations, and simply register correponding subscribers. |
The real problem is I forgot to remove the annotations, like I did previously. Fixing that. |
Also, I did not use the good trait, it should be node, not tree. |
And I forgot |
no problem :) we have time. |
adcb0ac
to
ebdd841
Compare
I'll stick with |
ebdd841
to
11135d2
Compare
Houston ? We have a problem… it is not possible to map the id completely, especially to reproduce the effect of Here are 2 solutions I could think of, tell me which you prefer :
I went ahead with 2. If you choose 1, I shall remove cfc9678 and amend e26de5e to add some doc. |
cfc9678
to
2dac567
Compare
ping @docteurklein |
1 similar comment
ping @docteurklein |
Ok, so what are the consequences of option 2 ? They'll have to create ids properties and getters by hand/doctrine:generate:entity ? (PS: just noticed the PR is misnamed; it's not anymore just about Tree). thanks :) |
BTW @greg0ire, are you talking about https://github.com/doctrine/doctrine2/blob/0bff6aadbc9f3fd8167a320d9f4f6cf269382da0/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php#L508 ? In that case, I guess it's still possible to copy what this method internally does (at least we can try), which would give us option 3: |
I fixed the PR name.
Yes, they'll have to create ids properties and getters by hand / Regarding 3, it is the piece of code I was talking about, and I have been thinking about this solution, but dismissed it : it would copy / pasting code that can evolve, which means that if it suddenly does something new, we should make a new version of the library AND maintain the older one. Duplicate code is never good, especially when it is that big. Once again, it is your library so it is your decision, I won't argue further. Pick a solution and I will try to do it. |
thanks for feedback! I agree that removing the warning in the readme is a good thing. I would still try to see what option 3 would lead to: Moreover, we wouldn't have to copy all the code, only the part that we need (i.e: "sequence/column generated strategy"). |
I think it's a bug from doctrine to not allow id metadata config in the event. On future versions it may be possible, and thus removing the need for us to copy/paste impl. |
Ok, so if we're going with 3, I think we should make sure that bug is reported, maybe suggest that they change the access level from private to something higher, and I also think that maybe an |
Ok, I'm done with the soul-crushing process of copy / pasting doctrine code right in the library. Don't look at it, if you don't want to get nightmares. I did not add the EDIT: I don't understand why travis breaks. It works for me. |
31d5db6
to
c470155
Compare
@docteurklein : Now, it should be better. But see how using slightly outdated code breaks everything ? I think we should at least trigger the |
@docteurklein : I just updated the upgrade file, but I don't know what you want me to change in the |
0d3b006
to
f572c31
Compare
It can't be mapped in the subscriber, which makes the usage of the library different for the annotation driver users.
f572c31
to
d150864
Compare
I rebased on the latest master, and strangely, it does not break for 2.2 or 2.3 . Good to merge then ? |
ping @docteurklein |
@greg0ire should it fail ? maybe the examples (fixtures) we use in tests have a mapped id ? |
@docteurklein : no they do not have a mapped id, I thought it should fail because I remember having slightly outdated doctrine code (see this comment), copying it into doctrine behaviors, and having the tests pass locally (as expected), then pushing the changes here, and seeing travis fail because he got more recent doctrine code that was no longer compatible with the code I copy / pasted. I was not expecting the new doctrine code I copy/pasted over the old one to solve this particular problem to be retro-compatible with 2.2 or 2.3 . But it looks like it is, so, cool! |
@docteurklein : If you want to be reassured about that, run
Open your browser at the right address, and the gorgeous UI should show you that the |
good! so everything's ok, let's merge this! |
Yay! Go! Go! Go! |
add several missing subscribers
The property $this->em is undefined at line 163 and remove id mapping create BC break. |
@adrienrusso : see #147 |
You know ? So you're here to complain and that's all ? If you want stability, don't use the
This is free software and we are doing a lot to improve stability (see #148 and #141). If you don't want this functionality to break again, you're welcome to add some tests. Anyway, mapping the id is hard and I don't think it should be the concern of this library (unless and |
@adrienrusso Oh, after a closer look I see you're pointing to a line just below another line where there is still |
Remove the mapping make sense but may be branch alias must be incremented because ~1.0 => de-master |
@adrienrusso : it is supposed to be BC-compatible so no, it should not be incremented. If you don't want to get the |
Thank you! |
Completely untested, I lack time, sorry.