c9 / core

Cloud9 Core - Part of the Cloud9 SDK for Plugin Development https://c9.github.io/core/ https://c9.io
Other
2.56k stars 924 forks source link

PHP formatter not working #526

Open ghost opened 5 years ago

ghost commented 5 years ago

With the following configuration for php formatter:

    "php": {
        "@completion": true,
        "@formatOnSave": true,
        "@formatter": "/usr/local/bin/php-cs-fixer fix \"$file\" --rules=@Symfony,@PSR2",
        "@path": ".:./vendor"
    },

I confirmed that the php-cs-fixer runs:

docker@e5bbf908f4c3:/home/verbral/drupal-project$ /usr/local/bin/php-cs-fixer fix /home/verbral/drupal-project/src/TaskRunner/Commands/DrupalCommands.php --rules=@Symfony,@PSR2                                                            
Loaded config default.
   1) src/TaskRunner/Commands/DrupalCommands.php

Fixed all files in 0.118 seconds, 12.000 MB memory used

I'm still getting the notification that php is not supported yet: https://github.com/c9/core/blob/master/plugins/c9.ide.format/format.js#L88-L93 Does the !emit mean that the file is not recognized as php maybe?

Error
This code could not be beautified
"php" is not supported yet
MichaelCharles commented 5 years ago

I'm having the same problem. I'm only have the problem with self-hosted Cloud9. If I use Cloud9 through AWS it works fine.

MichaelCharles commented 5 years ago

I've gone ahead and made an issue on the plugin itself in case that's where the attention is needed: https://github.com/c9/c9.ide.format/issues/3