Closed
Conversation
While we generally prefer objects over resources for quite a while, the procedural XMLWriter API still uses resources, although there is already an object-oriented API which uses objects. This dichotomy makes no sense, slightly complicates the implementation, and doesn't allow a stepwise migration to the object-oriented API, which might be desired. Thus we completely drop the XMLWriter resources in favor of XMLWriter objects. We consider the minor BC break acceptable for a major version, since only explicit type checks (`is_resource()`, `gettype()` etc.) need to be adapted.
Member
|
Is there any side effects of mixing usage of procedural and OO usage now or now redundant methods? (Been a while since I worked with XMLWriter myself so I can't remember) |
Member
Author
|
@KalleZ, formerly procedural and OO couldn't be mixed at all; with this patch it is possible, and basically either API is now redundant. Maybe we want to deprecate the procedural API some time. |
Member
|
Ack |
nikic
approved these changes
Sep 17, 2019
Member
nikic
left a comment
There was a problem hiding this comment.
LG. You might want to consider migrating most of these methods to zend_parse_method_parameters() as a followup, which exists specifically for these types of mixed procedural+OO APIs.
KalleZ
approved these changes
Sep 17, 2019
Member
Author
|
Applied as d61bc63. Thanks for hinting at zend_parse_method_parameters(). I'll have a look. |
41 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While we generally prefer objects over resources for quite a while, the
procedural XMLWriter API still uses resources, although there is
already an object-oriented API which uses objects. This dichotomy
makes no sense, slightly complicates the implementation, and doesn't
allow a stepwise migration to the object-oriented API, which might be
desired. Thus we completely drop the XMLWriter resources in favor of
XMLWriter objects.
We consider the minor BC break acceptable for a major version, since
only explicit type checks (
is_resource(),gettype()etc.) need tobe adapted.