GithubHelp home page GithubHelp logo

Comments (9)

jrfnl avatar jrfnl commented on July 24, 2024 1

No need to extend the sniff, this can simply be changed from the ruleset <type>warning</type>.

from wpthemereview.

joyously avatar joyously commented on July 24, 2024

?? usage would influence the minimum PHP version for the theme, wouldn't it?

from wpthemereview.

dingo-d avatar dingo-d commented on July 24, 2024

Once core moves to PHP 7.0 (beginning of the next year) this shouldn't have to be an issue imo.

from wpthemereview.

joyously avatar joyously commented on July 24, 2024

Once core moves to PHP 7.0

But this is for themes, not core. And themes can run on different versions of core, with different versions of PHP.

from wpthemereview.

jrfnl avatar jrfnl commented on July 24, 2024

Both ?: (PHP 5.3+) usage, as well as ?? (PHP 7.0+) usage influence the minimum PHP version for a theme.

If I remember correctly, the "default" presumption is that themes support the current WP version + up to three versions back. That would currently mean WP 5.0 - 5.3, meaning the "normal" minimum PHP version for a theme would still need to be PHP 5.2, though this can be changed of course with the Requires PHP: header.

from wpthemereview.

joyously avatar joyously commented on July 24, 2024

Yes, but considering that WP doesn't check the Requires PHP header for themes yet, the theme still needs to make sure that it doesn't fatal. And a warning to the reviewer would be good to have.

from wpthemereview.

jrfnl avatar jrfnl commented on July 24, 2024

Well, the PHPCompatibilityWP ruleset which is included in TRTCS already does so as the minimum PHP version for that is set to 5.2.

from wpthemereview.

dingo-d avatar dingo-d commented on July 24, 2024

The decision from the triage: include this sniff but change it so that it throws a warning instead of an error.

This shouldn't be too hard, just extend the sniff and override the process_token method

from wpthemereview.

dingo-d avatar dingo-d commented on July 24, 2024

Even better 🙂

from wpthemereview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.