-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DomCrawler] Deprecate methods inherited from SplObjectStorage #15907
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
Conversation
All inherited methods are deprecated, except a few ones:
|
*/ | ||
public function detach($object) | ||
{ | ||
@trigger_error('The method '.__METHOD__.' is deprecated as of 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); |
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.
We are using The __METHOD__ method
in triggers. Should be changed everywhere here.
Should we now implement the desired interfaces explicitly so that we are aware of the fact that we need to ship custom implementations once we break the inheritance? Status: Needs work |
@xabbuh the only interfaces we need at Traversable and Countable. And we will notice it when rewriting the implementation, because most tests of the crawler are relying on them anyway. |
c082ddc
to
997c650
Compare
Updated. Status: needs review |
Thank you @stof. |
…tStorage (stof) This PR was merged into the 2.8 branch. Discussion ---------- [DomCrawler] Deprecate methods inherited from SplObjectStorage | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | half of #15849 | License | MIT | Doc PR | n/a There is no documentation change to be done for it: we don't document the fact that DomCrawler extends SplObjectStorage (this is an implementation detail which leaked because of using inheritance rather than composition). Commits ------- 997c650 Deprecate methods inherited from SplObjectStorage
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #5796). Discussion ---------- Fix for #5783 | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.8 | Fixed tickets | #5783 I can confirm, that this is the only place where the `SplStorageObject` and its methods which were marked as deprecated in symfony/symfony#15907 are referenced. Commits ------- 065d28c Fix for #5783
There is no documentation change to be done for it: we don't document the fact that DomCrawler extends SplObjectStorage (this is an implementation detail which leaked because of using inheritance rather than composition).