Code Monkey home page Code Monkey logo

Comments (8)

xbot avatar xbot commented on June 12, 2024 1

I finally found the reason. It's related to the option --rules=@PSR12.

My project has included a custom php-cs-fixer rules package by composer, I think this option conflicts with it.

I set the php-cs-fixer.rules to an empty string, it works now.

Thank you for your help.

from coc-php-cs-fixer.

yaegassy avatar yaegassy commented on June 12, 2024

Can you please run this to isolate the problem? Are you getting any error messages?

  1. Run :CocCommand workspace.showOutput
  2. In "Choose by number:" enter the number of php-cs-fixer
  3. Run :CocCommand php-cs-fixer.fix

from coc-php-cs-fixer.

xbot avatar xbot commented on June 12, 2024

No error messages are found. The output is:

########## php-cs-fixer

Run: php vendor/bin/php-cs-fixer fix --using-cache=no --rules=@PSR12 /var/folders/px/rtcpjkg56j36pvt4ymn33r_40000gn/T/vMCguK8/tmp-236845cx81xUpi0ID
Cwd: /Users/don/my-project-root

from coc-php-cs-fixer.

yaegassy avatar yaegassy commented on June 12, 2024

There doesn't seem to be any problem.

coc-php-cs-fixer will use vendor/bin/php-cs-fixer if found. https://github.com/yaegassy/coc-php-cs-fixer#note

Has it been formatted?

from coc-php-cs-fixer.

xbot avatar xbot commented on June 12, 2024

No, as I said, no changes have been made to the file.

I'm not sure why the file path is a temporary one in the output above, shouldn't it be the real path? Or is that the content of the formatted temporary file will be put back to the vim buffer?

from coc-php-cs-fixer.

yaegassy avatar yaegassy commented on June 12, 2024

tmp file to perform the formatting and replace the results.

You have also reported an issue related to "php-cs-fixer" on coc-diagnostic, so it is probably something wrong with your environment...


Is the file you are trying to format a large file?

from coc-php-cs-fixer.

yaegassy avatar yaegassy commented on June 12, 2024

For large files, "coc.nvim" may have a timeout.

If you change this setting to a larger value, will there be any change in behavior?

  "coc.preferences.willSaveHandlerTimeout": 1000,

from coc-php-cs-fixer.

yaegassy avatar yaegassy commented on June 12, 2024

OK, I'm glad to hear that the problem has been resolved. :)

from coc-php-cs-fixer.

Related Issues (9)

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.