[wp-trac] [WordPress Trac] #59580: Test_Diff: sync with upstream
WordPress Trac
noreply at wordpress.org
Tue Oct 10 11:11:54 UTC 2023
#59580: Test_Diff: sync with upstream
--------------------------------+-----------------------------
Reporter: jrf | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: External Libraries | Version: trunk
Severity: normal | Keywords: needs-patch
Focuses: |
--------------------------------+-----------------------------
Follow up on ticket #58298.
The `Text_Diff` library, as included in WP, is an external dependency,
which hasn't been kept up to date with the original source - i.e. with
"upstream".
The WP local version has also received some WP-only patches, typically for
issues related to compatibility with new PHP versions.
It should be investigated if there are changes upstream which need to be
included in the WP version of the library and if the WP version of the
library contains any fixes which aren't included yet upstream and should
be (and don't have an open pull request upstream).
Relevant parts from the conversation in #58298:
@SergeyBiryukov in https://core.trac.wordpress.org/ticket/58298#comment:3:
> > The `Text_Diff` library is an external dependency, however, AFAIK it
is no longer externally maintained.
>
> The [https://github.com/pear/Text_Diff pear/Text_Diff] project on GitHub
had a release in 2019 and appears to have
[https://github.com/pear/Text_Diff/commit/14a70077f643739639845cebaea36a58d647b8c7
recent commits], though is indeed no longer actively maintained, as it has
been deprecated and superseded by [https://github.com/horde/Text_Diff
Horde_Text_Diff].
>
> We could probably consider switching to the newer package. On at least
one occasion though, we encountered a bug in the upstream version, see
comment:5:ticket:41526, that was patched using a different approach in
[42028] / #41526. As far as I can tell, there were
[https://github.com/horde/Text_Diff/commits/master/lib/Horde/Text/Diff/Engine/Native.php
no further changes] upstream after the [comment:12:ticket:41526 commits in
question], so the issue still exists there.
>
> I have not yet checked whether a
[https://github.com/pear/Text_Diff/pull/7 similar fix for pear/Text_Diff]
has the same issue.
>
> > I wonder if it may be prudent to create a repo to maintain this code
as a package within the WP organisation ?
>
> Would it be worth comparing the current code in core with the
[https://github.com/pear/Text_Diff pear/Text_Diff] version and checking if
a switch would be possible? Otherwise, it looks like we may indeed have to
continue maintaining this package for the time being, either in core or
separately, to ensure compatibility with newer PHP versions.
@jrf in https://core.trac.wordpress.org/ticket/58298#comment:6:
> Yes, I think it would be very good if we could take the following
actions (probably in a separate ticket though):
> * Compare the current version of the package in WP Core with the
upstream version of `pear/Text_Diff`.
> * Compare the current version of the package in WP Core with the
upstream `horde/Text_Diff` package.
>
> Based on the findings, discuss follow-up steps.
>
> If we'd decide to upgrade to either the newer version of
`pear/Text_Diff` or to `horde/Text_Diff`, I do still think adding at least
_some_ tests to safeguard the integration would be a good thing. That way
we can also safeguard that the upgrade does not cause any avoidable
problems (at least for those situations which we are testing for).
@oglekler in https://core.trac.wordpress.org/ticket/58298#comment:10:
> This open PR is addressing the issue we had fixed from our side:
https://github.com/pear/Text_Diff/pull/8/files
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59580>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list