Git Product home page Git Product logo

Comments (1)

jrfnl avatar jrfnl commented on June 17, 2024 1

Thanks for the suggestion.

While this repo maintains the handbook containing the WordPress Coding standards, it is not the place where decisions are taken about the contents of the handbook.

New coding standards have to be proposed via a post on Make.wordpress.org and have to be met with significant approval from committers before they will be accepted. After acceptance, the handbook is updated (and then the automated tooling too).

Having said that, the chances of a proposal to add a declare(strict_types=1); requirement to the standards being accepted, is, in my opinion, very very slim.

declare(strict_types=1); is most effective when all code in an ecosystem uses it. That includes plugins and themes, block patterns etc.
If even one file doesn't use it, its effect is contrary as it will lead to really hard to debug bugs due to the one-way type juggling.

Also, as the WP codebase is largely legacy code which relies heavily on the PHP type juggling semantics, it is likely that adding strict_types would require a lot of changes in WP itself, including a lot of changes to function signatures, which would be considered breaking changes and breaking changes are not accepted in WP (at least not for the WP Core code).

Closing as opened in the wrong place.

from wpcs-docs.

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.