-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
The future of Common 3.0 #826
Comments
Only if proven to be faster at runtime.
Deprecate and use Hoa components
Move to ORM, rework as isolated layer if possible
Drop it - relying on package versions should only be done via |
Would ODM need these as well? |
We'd need to port these as well |
We were thinking of using it to compare value objects instead of comparing them by reference in ODM 2.0. Extracting it to a separate package would make sense. |
Yes, please.
What do we need it for? IIRC there are far better reflection libraries out there, so we might want to use those
Ack on PHP versions, Ack on CS, not entirely sure about typed code. Many instances probably are fine, but there are some cases where we might not want to add type hints just yet. Take the following interface for example:
Makes sense, right? Except that without full co- and contravariance in PHP, I can't do this:
This is perfectly fine when |
Same idea is there for ORM 3.0 to compare DBAL values and Embeddables by value.
Also class aliases will be needed since we change namespace.
For consistency with other packages that were already split earlier, we should start versioning at 1.0.
I have found no reference for it. It was added as part of #154/#152 probably as a more memory effective variant based on PSR-0.
Collection as it is designed now is all about mixed members, not object, so no object typehints there unless we decide it will be object-only. |
We haven't done so for inflector, lexer, collections, or other packages, which is why I didn't think of it.
You're right - this one is probably best solved using documentation (or generics in PHP) |
Hmm true, they are still in Doctrine\Common namespace... That should probably also change in major release of those packages + providing forward compat by adding class aliases in 1.x (something like PHPUnit did). |
FWIW, this is something that has been discussed for annotations 2.0, where it has triggered quite the discussion: doctrine/annotations#75 (comment). I'm split on this issue: on one hand, cleaning up namespaces would be nice, on the other hand it would make things way more complicated. I will however concede that we could ease the migration by providing a forward compat layer. That would allow people to better prepare for the new package versions. |
When it comes to changing package's namespace, I think most people are concerned about compatibility between both major versions - x.y & x+1.0. This shouldn't be hard to achieve with mentioned forward compatibility layer where we introduce new namespace and class aliases in x.y version and migrate classes in x+1.0. Something like PHPUnit did around version 4. |
I suggest dropping it. this Debug utility is shitty anyway, as dumping an uninitialized PersistentCollection will have the side effect of initializing it (and so dumping some variable to debug something will change the behavior of the code, which could then not have the bug you were debugging). |
Update:
Currently with undecided fate (so still left without deprecation):
Deprecations for the rest of remaining things via #845, targeting 2.9.0 which should be released in upcoming days. |
This PR was merged into the 4.2-dev branch. Discussion ---------- Remove direct dependencies on doctrine/common | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | ? Doctrine has recently separated multiple components from doctrine/common: * [doctrine/event-manager](https://github.com/doctrine/event-manager) [[release notes](https://github.com/doctrine/event-manager/releases/tag/v1.0.0) | [split PR](doctrine/common#842)] * [doctrine/persistence](https://github.com/doctrine/persistence) [[release notes](https://github.com/doctrine/persistence/releases/tag/v1.0.0) | [split PR](doctrine/common#845)] * [doctrine/reflection](https://github.com/doctrine/reflection) [[release notes](https://github.com/doctrine/reflection/releases/tag/v1.0.0) | [split PR](doctrine/common#845)] All of the packages are 100% backward compatible with their counterparts in Common 2.8. This is a major step to slowly start with [phasing out doctrine/common package](doctrine/common#826) before ORM 3.0 / DBAL 3.0 / ODM 3.0. Common 2.9.0 will also be composed from these new packages. Most of the remaining parts in doctrine/common are likely to be deprecated (or already are), please see & discuss in [the PR over in doctrine/common repository](doctrine/common#845). This PR therefore aims to remove the direct doctrine/common dependency from Symfony, replacing it by specific Doctrine components. Commits ------- b0fa398187 Remove direct dependencies on doctrine/common
This PR was merged into the 4.2-dev branch. Discussion ---------- Remove direct dependencies on doctrine/common | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | ? Doctrine has recently separated multiple components from doctrine/common: * [doctrine/event-manager](https://github.com/doctrine/event-manager) [[release notes](https://github.com/doctrine/event-manager/releases/tag/v1.0.0) | [split PR](doctrine/common#842)] * [doctrine/persistence](https://github.com/doctrine/persistence) [[release notes](https://github.com/doctrine/persistence/releases/tag/v1.0.0) | [split PR](doctrine/common#845)] * [doctrine/reflection](https://github.com/doctrine/reflection) [[release notes](https://github.com/doctrine/reflection/releases/tag/v1.0.0) | [split PR](doctrine/common#845)] All of the packages are 100% backward compatible with their counterparts in Common 2.8. This is a major step to slowly start with [phasing out doctrine/common package](doctrine/common#826) before ORM 3.0 / DBAL 3.0 / ODM 3.0. Common 2.9.0 will also be composed from these new packages. Most of the remaining parts in doctrine/common are likely to be deprecated (or already are), please see & discuss in [the PR over in doctrine/common repository](doctrine/common#845). This PR therefore aims to remove the direct doctrine/common dependency from Symfony, replacing it by specific Doctrine components. Commits ------- b0fa398 Remove direct dependencies on doctrine/common
Great job, happy to see so much progress towards 3.0! 🎉 |
Is there a checklist available to describe the steps to be taken? Obviously remove doctrine/common.... Which Doctrine packages should be installed to cover the removal of doctrine/common? Am I correct in presuming:
? |
@sterichards |
@Ocramius In that case, it would be:
|
Except the last three, the other were moved out years ago. Please see the release notes for 2.9.0 where the recent changes are described. |
Removing doctrine/common is looking more and more difficult as nearly every latest stable doctrine package requires doctrine/common As an example - https://packagist.org/packages/doctrine/data-fixtures#v1.3.1: Requires:
|
@sterichards we'd just migrate each of our own downstream package: we're not breaking BC anyway, so relying on |
The ultimate aim is not to drop doctrine/common in all consumers now, but to phase it out gradually. First major step was separating components that will outlive Common. Right now DBAL already benefits from this change (see doctrine/dbal#3181). It's more tricky in other pacakges - i.e. ORM uses ProxyGenerator and NotifyPropertyChanged so it can't drop doctrine/common in 2.x, only ORM 3.0. TL;DR: In long-term it's preferable if can make your application depend on specific packages instead of doctrine/common (your dependencies may still draw doctrine/common in, but that wouldn't be your problem anymore - new packages are co-installable with doctrine/common 2.9+). Otherwise doctrine/common is still here and not abandoned, and it won't (can't) be at least until ORM 3.0. |
Makes sense I was looking for an approach that would eliminate deprecated warnings, which is what lead me to this issue ticket initially |
Agree, please remove the deprecation warning since it's quite annoying and it's a false positive, it's not something the developer of a Symfony app is supposed to fix |
Which warning(s) exactly? Most people notice the issue coming from ORM (doctrine/orm#7306 that will be fixed in ORM 2.6.3 once released. |
I see the deprecated warning when running PHPUnit It's no hassle to me if it's going to be resolved in a future version and isn't causing any lack of functionality at the moment |
If anybody else comes across this thread, there is a method for suppressing deprecation notices in PHPUnit - https://stackoverflow.com/questions/35897550/remove-remaining-deprecation-notices-232-in-symfony-2-8 |
Why it hasn't been released yet? How long will it take to have a release? It's been many months now... |
lol, it was released yesterday :) good job, the deprecation warning is finally gone |
What about |
@Ocramius you should put that in the deprecation warning then. It is not an obvious place (at least for me) to look for a replacement. Why do you call it an inflector anyway? I only assicated inflection with grammar and verbs/substantives being inflected. |
@TerjeBr feel free to send suggestions to the upstream repository - I'm in no way good at naming, specifically not in a language that isn't my native one. |
@Ocramius The naming of the class is one thing. But my main point was that the new class should be mentioned in the deprecation warning. It is not nice to get deprecations, and then have no idea where to find the new implementation. |
@TerjeBr There are two issues here:
|
The reason you have deprecation warnings, is so that applications can change to not depend on the deprecated code that is scheduled to be removed later. But what is the purpose of having deprecation warnings if there is nothing to change to? If I understand you right there is no alternative to This means that as long as my application remain on the latest 2.x version, we are stuck with those deprecation warnings? That is just insane. It will also do a huge disservice to the cummunity, as it just motivates people to ignore deprecation warnings all together. |
Well, yeah, this is an endpoint where we don't have a clear migration path at the moment. If you want, you can make Can you please fork off the discussion to a new issue though? |
Ok, moving this discussion to #867 |
The proposal is pretty simple: have no Common 3.0, instead split Common into smaller packages. We've already had discussion about this and Common 3.0 seems pretty much like relic and multiple components have already been split to their own packages.
Current proposal:
We've already discussed replacing it by i.e. Symfony's EventDispatcher - drop it if suitable replacement is selected,doctrine/event-manager.move it to doctrine/property-change-notifier (what a name!)doctrine/persistence.Each new package would use PHP 7.2 (or even 7.1 where 7.2 has no benefit), follow CS and would be ported to typed code.
WDYT?
The text was updated successfully, but these errors were encountered: