adael / SublimePhpCsFixer

Run php-cs-fixer code formatter to format php code from your favorite text editor
MIT License
71 stars 14 forks source link

Usage with .phar #27

Closed higoka closed 3 years ago

higoka commented 6 years ago

Allow usage without composer instead use the php-cs-fixer.phar executable.

adael commented 6 years ago

Didn't tested it directly, but my guess is that if you make it executable and configure the path settings in sublime as follows, it should work:

// SublimePhpCsFixer Settings
{
  path": "/path/to/php-cs-fixer.phar"
}

Another alternative is create a symlink to the phar file:

ln -s /path/to/php-cs-fixer.phar $HOME/bin/php-cs-fixer

higoka commented 6 years ago

Ok got it working. I only have one more problem. The exclude in my .phpcs file doesnt work. I think its because the --path-mode should be intersection. But there is no option to set it.