Giter VIP home page Giter VIP logo

Comments (5)

ADmad avatar ADmad commented on May 24, 2024 1

We should update the phpstan config.

Even going forth I would prefer the global functions be opt-out (as they are now) instead of opt-in. The primary reason I namespaced all the functions was to avoid potential conflicts with other frameworks/libs (when using split packages for e.g), not to remove the convenience for CakePHP users.

from app.

liqueurdetoile avatar liqueurdetoile commented on May 24, 2024 1

@ADmad Sure. Should I also propose a PR for docs ?

from app.

markstory avatar markstory commented on May 24, 2024

We're in the middle of the river with current setup 😬 Either, the default bootstrap should be updated (and my unit tests would have quick failed), either, default phpstan config should be updated :

Updating the phpstan configuration seems like the lowest friction change here. Removing functions.php from application startup is another viable option. I don't prefer that approach because we still have a lot of documentation and examples that are using global functions and I'd prefer to not create confusion for new folks.

For migration ease, they can be split in an optional compatibility plugin so it won't lure IDE with unrequired globals if typing __( too quickly if plugin is not installed.

This is a good option as well. Moving global functions out into a package seems like a good change to make for cake 6. We can't really move it for 5.x as that would break compatibility outside of a major release which is something we try to avoid doing.

from app.

liqueurdetoile avatar liqueurdetoile commented on May 24, 2024

@ADmad You're definitely right if keeping globals in core in order to be consistent with autocompletion and I also agree with @markstory that moving them to a package should require a major release.

from app.

ADmad avatar ADmad commented on May 24, 2024

@liqueurdetoile Can you please make a PR updating the phpstan config?

from app.

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.