-
-
Notifications
You must be signed in to change notification settings - Fork 392
implementing newSubset and unavailableSubset for migration lists #1174
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.
8000By 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
Conversation
I retargeted to 3.2.x since this is a new feature. I'm also working on fixing the build at #1175 |
I'm not 100% sure this is a good idea. When developing the initial version of the 3.0 release I did something similar (adding some "convenience" methods in the collection classes that were allowing to filter/manipulate data related to that collection). I've realized that such approach was not working well since such logic sometimes might require external services or uses the collection classes as placeholder for utility methods... and the number of methods in there was growing and growing every commit i was doing. Said methods have been removed with 60a1d47 and their functionality have been moved to the migrations calculator (that now become a much more important class in the migrations project). Would it make sense to have a (this is only one possible solution... do you see any other?) |
IMO, since no "use" statements were added, it means the methods that were added are not out of place. At least they are not requiring external services (but do require external classes in the same namespace).
IMO that's for the best, it's far better to have this than to have "utility methods" in some I think we should double down and use the newly introduced methods in Regarding the cache solution, it would involve having an available cache pool, or should we force the usage of a per-http-request cache? |
I do not have a strong opinion here, it was just my past experience... I'm ready to try it again...
My idea here was just to have some sort of instance/array cache that stores the computation for the same class instance, that was it it. |
The fact that we need code similar to what's in
If you have one method that proxies to another, then by definition this last one is the source of truth. It's still good to have @chr-hertel , do you have any thoughts to share on this? It would be great to have your point of view as well. |
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.
@greg0ire your explanation makes sense, I agree with the changes in this pull request.
Thanks @chr-hertel ! |
Summary
As as result of @greg0ire review in doctrine/DoctrineMigrationsBundle#421 I added
Includes tests and refactoring of CurrentMigrationStatusCalculator