[Data Liberation] Merge both XML processors into a single WP_XML_Processor#1960
Merged
Conversation
…essor Description TBD
… more input" state and "parse error" state
…ting out of sync with text_starts_at
91 tasks
| $this->file_path = $file_path; | ||
| $this->chunk_size = $chunk_size; | ||
| parent::__construct(); | ||
| $this->append_eof(); |
Member
There was a problem hiding this comment.
I don't understand anything about this processor yet and am asking questions.
Why did this need to be added?
Collaborator
Author
There was a problem hiding this comment.
The processors have two states:
- Expecting more data. Some syntax errors are then treated as "oh we're actually pausing and waiting for more data".
- No more data is coming. All errors are treated as "the input is invalid".
EOF marks a transition point between the two states.
Still, I'm questioning the need for these stream classes. They add yet another concept to learn.
91 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.
Merge
WP_XML_Tag_ProcessorandWP_XML_Processorinto a singleWP_XML_Processorclass. This reduces abstractions, enables keeping more properties as private, and simplifies the code.Related to #1894 and WordPress/wordpress-develop#6713
Testing instructions
Confirm the CI tests pass.