[wp-trac] [WordPress Trac] #59718: Short-term (WP 6.4) hotfix to prevent fatal error in standalone Gutenberg (<16.5)
WordPress Trac
noreply at wordpress.org
Wed Oct 25 23:54:20 UTC 2023
#59718: Short-term (WP 6.4) hotfix to prevent fatal error in standalone Gutenberg
(<16.5)
-----------------------------------------------+---------------------
Reporter: rebasaurus | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: reporter-feedback close has-patch | Focuses:
-----------------------------------------------+---------------------
Comment (by hellofromTonya):
Been thinking more about this ...
[comment:18 I was wrong to say this]:
>The changeset is not a BC break within Core itself.
Changing a method's visibility is (strictly speaking) a BC break. That
break will only impact instances where an extender has a child class with
a copy of that method that has the original visibility, i.e. `private`.
Given this visibility change has not yet been released and is not in the
[https://make.wordpress.org/core/2023/10/23/wordpress-6-4-field-guide/
Field Guide] and does not have a dev note, the risk seems low, except for
older released versions of the Gutenberg plugin.
For extensibility concerns, promoting the visibility of a method works
without error.
* The code since Gutenberg 16.5.0 will continue work (the code that uses
the `protected` visibility).
* Any code extending Gutenberg's class should also be okay.
* Any child classes in the wild that is invoking the parent's method will
get a fatal error. As previously noted, the searches do not show
instances, but it is possible as extenders prepare for the new release.
I'm not currently aware of coming changes in PHP which may impact that,
but will check.
== Should the change be reverted?
So yes, the visibility change in r56575 could be reverted. But there are
risks, including risks in comment:17.
Thinking out loud of the revert impacts:
1. May help some hosts or service providers
who do upgrades without using `update_core()` functionality. But only
helps their customers/users do not have incompatible previous versions,
such as GB 16.0.0.
Thus, reverting does not completely resolve the concerns or efforts.
2. Sets precedence that Core's BC promise also applies to past, non-
maintained released versions of Gutenberg.
Does Core need to keep the BC promise for past, non-maintained released
versions of the Gutenberg plugin? Huh, an interesting question.
Given GB's bleeding edge stance, I don't think it does.
If it does, then:
* Gutenberg must also adopt Core's BC promise for code that is or will
(some day) be in Core.
That would be a difficult to achieve when experimenting with new ideas and
refining features that one day may go into Core. It would cause too much
churn and technical debt.
* Doing so would cause development problems in the Gutenberg cycles. For
example, in a new class or method design, visibility is set to `private`
until a need arises to open it.
3. The minimum version set in [56820] would need to change.
Process: start with GB 16.4, test it, if okay, go back 1 older release
version. Repeat until a fatal error happens. Then that's the minimum GB
versions.
A quick check of file unzip and refresh frontend: GB 16.0.0 is the first
version that causes a fatal error:
{{{
Fatal error: Cannot declare class WP_REST_Navigation_Fallback_Controller
}}}
4. GB 16.8 is the version for WP 6.4
As @ramonopoly noted in comment:15:
>WordPress 6.4 should contain all the non-experimental functionality of
Gutenberg 16.8, so running a previous version such as 16.5, I believe,
aside from the bespoke control workflows mentioned, has little pragmatic
benefit.
As I noted in comment:18:
>My mind also goes to the feature and functionality compatibility between
6.4 (and any new version of WordPress) and older versions of Gutenberg.
== Summary
Reverting does not completely eliminate the concerns raised.
Reverting brings more concerns.
I'm still leaning towards not reverting and closing the ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59718#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list