Coder Social home page Coder Social logo

Comments (7)

ataylorme avatar ataylorme commented on May 5, 2024 3

Any objection for this being a Composer script rather than a gulp task? That will be a simpler solution as PHPCS is installed via Composer. We might be able to make a gulp task that calls the Composer script as well.

from wprig.

mor10 avatar mor10 commented on May 5, 2024 2

Tentatively yes, though I'd like to see someone do a test to figure out if the fixing is clean or it it can cause new issues.

from wprig.

jdelia avatar jdelia commented on May 5, 2024

I am using phpcbf with vscode and it is working.

from wprig.

ataylorme avatar ataylorme commented on May 5, 2024

After thinking on this I think we should use gulp. If we were to use PHPCBF directly of via Composer then it will attempt to fix all PHP files, including vendor.

We could list out which files to include and exclude but that would be duplicating the same declarations in gulp and we should not repeat ourselves in this way.

However, I tried using gulp-phpcbf but could not get it working.

I also tried changing the bin in [gulp-phpcs] (https://www.npmjs.com/package/gulp-phpcs) to be phpcbf but that did not work.

It seems we will either need to fork gulp-phpcs project to work with phpcbf or figure out what is wring with gulp-phpcbf, which hasn't been updated in 4 years.

Either way that is too much work than I can commit to. If someone else wants to take a stab at this please do.

from wprig.

ataylorme avatar ataylorme commented on May 5, 2024

@felixarntz has convinced me that my opinion in November is better than my opinion in December. So, not that it is January I am switching back to being in favor of this being in Composer, not gulp

from wprig.

mor10 avatar mor10 commented on May 5, 2024

What needs to be done to close this issue?

from wprig.

ataylorme avatar ataylorme commented on May 5, 2024

What needs to be done to close this issue?

A task similar to the existing run-phpcs needs to be added to the scripts section of composer.json that will run PHP code beautifier.

from wprig.

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.