Community: PHP CS Fixer Plugin

This blog post has been contributed by our NetBeans PHP user Junichi Yamamoto who has created several plugins for NetBeans PHP support. He would like to tell you a few words about one of his NetBeans plugin. Thanks, a lot Junichi!


Hi all, I have created a plugin for PHP CS Fixer. Today, I introduce features of this plugin briefly. Now, this plugin is available on Plugin Portal and it works with NetBeans 7.3. Please download if you are interested in this.

At first, we have to set the path of PHP CS Fixer to Options(Tools > Options > PHP > PHP CS Fixer).

options

Then, if we would like to change settings in each projects, we can use project settings.(open the project properties, and we can find PHP CS Fixer category)

project properties

Available commands are the followings: fix, fix --dry-run, self-update
We can run these with context menu. (Right-click file, directory)

commands

output window

If you have some issues, please let me know via issue tracker. (Don't submit to bugzilla in NetBeans)

Thanks,
Junichi

Comments:

Thanks for putting in the config per project, that is quite a useful feature.

Posted by kangcool on June 06, 2013 at 04:08 PM CEST #

This one drives me crazy. It worked for mere weeks. The name of one of the dependencies changed, and radically. It is in good company with a number of items like the WordPress plugin that broke at the same time. It probably just needs rebuilding with a current version of the NB source.

I hate WordPress passionately and spend half my time programming on it lately fixing poorly written broken code, and as codesniffer and php-doc will tell you, everything that can be ugly code in and around the WP ecosystem is. I appreciate it for what it is and does, but when you work with it it is obvious that code reviews are not required before check-in.

So, I was thrilled when Fixer made it to NB, as well as some code completion. But they didn't last long. I found the problem by tearing apart Jar files with pkzip, and I'm afraid I am not a Java guy (C flavored languages mostly) so I can't try and track down the source and do it myself.

Anyway, just hoping! And providing a word of warning to anybody who comes across this post. It just doesn't work. Grab yourself a copy of Sublime Text for your automated formatting needs, and never forget that fixing your code smells with fixer can lead to checking in code that still has now invisible fundamental problems.

Posted by headless_monkeyman on September 22, 2013 at 09:10 AM CEST #

Hi headless_monkeyman,

Sorry, I'm not sure what you would like to say exactly ...
Could you say more simply?

Thanks,
Junichi

Posted by guest on September 23, 2013 at 12:17 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today