[wp-meta] [Making WordPress.org] #3791: Consider bumping pre-commit checker on plugins to PHP 7.X (was: Consider bumping pre-commit checker on plugins to PHP 7.1)
Making WordPress.org
noreply at wordpress.org
Mon Feb 8 17:36:11 UTC 2021
#3791: Consider bumping pre-commit checker on plugins to PHP 7.X
------------------------------+-----------------------
Reporter: Ipstenu | Owner: (none)
Type: defect | Status: reopened
Priority: high | Milestone:
Component: Plugin Directory | Resolution:
Keywords: |
------------------------------+-----------------------
Changes (by uglyrobot):
* status: closed => reopened
* resolution: fixed =>
Comment:
In my case the linter is preventing **forward compatibility** with PHP8 in
my plugin trying to use the latest AWS SDK via Composer.
{{{
PHP error in: infinite-uploads/tags/1.0/vendor/symfony/polyfill-
mbstring/bootstrap80.php:
Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)
in Standard input code on line 15
}}}
The bootstrap80.php file is only included by this lib in PHP8+ and has
PHP8 only syntax, so it's not a backwards compatibility issue (plugin and
composer library works all the way back to 5.5) but a forward
compatibility issue. As you can see this is within a composer dependency
so I don't really have much control over it. I want my plugin to work in
PHP8+. For now i've been forced downgrade that package but that's a
security issue potentially running older code.
We really do need to find a better way to lint code or a way to bypass it.
Right now it's discouraging forward compatibility, not just forcing
backward compatibility!
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3791#comment:30>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list