Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Php-cs-fixer not working in Sublime Text 3. #113

Closed
anhskohbo opened this issue Jun 29, 2014 · 2 comments
Closed

Php-cs-fixer not working in Sublime Text 3. #113

anhskohbo opened this issue Jun 29, 2014 · 2 comments

Comments

@anhskohbo
Copy link

I can't make phpcs-fixer working:

Right click menu, PHP CS -> Fix this file, nothing happens.

screenshot from 2014-06-29 20 01 12

Run from terminal, it's working:

/usr/local/bin/php-cs-fixer fix /home/anhskohbo/htdocs/laravel/app/controllers/AuthController.php --verbose --level=all

php-cs-fixer path:
screenshot from 2014-06-29 20 04 02

My config file:

{
    // Plugin settings
    "show_debug": true,
    "phpcs_show_quick_panel": false,

    // PHP_CodeSniffer settings
    "phpcs_sniffer_run": true,
    "phpcs_executable_path": "/opt/lampp/bin/phpcs",
    "phpcs_additional_args": {
        "--standard": "PSR2",
        "-n": ""
    },

    // PHP-CS-Fixer settings
    "php_cs_fixer_on_save": false,
    "php_cs_fixer_executable_path": "/usr/local/bin/php-cs-fixer",
    "php_cs_fixer_additional_args": {
        "--level": "all"
    },

    // PHP Linter settings
    "phpcs_linter_run": true,
    "phpcs_php_path": "/opt/lampp/bin/php",

    // PHP Mess Detector settings
    "phpmd_run": false,
    "phpmd_executable_path": "/opt/lampp/bin/phpmd"
}
@benmatselby
Copy link
Owner

When you say "nothing happens", nothing will happen unless there is something to fix, that the php-cs-fixer application can fix.

What is the output from the command line? Copy the command from ST console window into a terminal and does the output match?

@benmatselby
Copy link
Owner

This has now been resolved by @Archane07. I'm unable to test on Windows, so if people report that this fix breaks windows I will revert the patch as there are more windows users than Linux/Mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants