Reputation: 1543
I'm trying to install the useful plugin PHP CS Fixer on Netbeans 8.2. I got used to have it on Netbeans 8 and it worked well and I wish I could not go back to that version just for that. Note that the CodeSniffer has been successfully set up.
When I try to install the plugin 0.53
it says that I need additional plugin which I really don't have a clue of what they are.
Following the errors
The plugin org.netbeans.modules.projectuiapi.base is requested in version 1.83.1.9. The following plugin is affected: PHP CS Fixer
Some plugins require plugin org.openide.filesystems.nb to be installed.
The plugin org.openide.filesystems.nb is requested in version 9.6.1. The following plugin is affected: PHP CS Fixer
Some plugins require plugin org.openide.util.ui to be installed.
The plugin org.openide.util.ui is requested in version 9.3.1. The following plugin is affected: PHP CS Fixer Some plugins not installed to avoid potential installation problems.
Any suggestions? Thanks
Upvotes: 0
Views: 1884
Reputation: 1004
To anyone else who found this page and is still having difficuly, please take in to account that on modern versions of php-cs-fixer, you cannot use the level option.
Instead, under custom options, set something like:
--rules=@Symfony
Upvotes: 1
Reputation: 1254
NetBeans 8.2 natively includes the plugin.
All you have to do is to navigate to the Options window and setup the path where the PHP CS Fixer .phar file is located in the appropriate tab. Of course if you don't have the .phar file you have to go and download it first, by clicking "Install now" from the official PHP CS Fixer website.
Since one picture speaks more than 1000 words, here is a screenshot:
Last but not least: in order to use PHP CS Fixer in NetBeans 8.2 you must use the obscure menu: Source > Inspect... Having it nice and quick on the context menu like in the past, was too easy and practical ;) Took me 2 hours to figure this "detail" out.
Upvotes: 3