All Projects → pfefferle → atom-php-cs-fixer

pfefferle / atom-php-cs-fixer

Licence: MIT license
Run the 'PHP Coding Standards Fixer' within Atom

Programming Languages

coffeescript
4710 projects

Projects that are alternatives of or similar to atom-php-cs-fixer

annotate-pull-request-from-checkstyle
cs2pr - Annotate a GitHub Pull Request based on a Checkstyle XML-report within your GitHub Action
Stars: ✭ 146 (+386.67%)
Mutual labels:  php-cs-fixer, phpcs
Atom Modular Snippets
:atom: A modular solution to snippets in @Atom.
Stars: ✭ 8 (-73.33%)
Mutual labels:  atom, apm
tester-phpunit
tester runner for phpunit on atom editor
Stars: ✭ 34 (+13.33%)
Mutual labels:  atom, apm
Atom Project Viewer
Project Viewer - An Atom's package
Stars: ✭ 76 (+153.33%)
Mutual labels:  atom, apm
atom-yii2
Atom package for working with Yii Framework 2
Stars: ✭ 22 (-26.67%)
Mutual labels:  atom, apm
atom-gitkraken
Open the current @atom project in GitKraken.
Stars: ✭ 12 (-60%)
Mutual labels:  atom, apm
ilogtail
Fast and Lightweight Observability Data Collector
Stars: ✭ 1,035 (+3350%)
Mutual labels:  apm
pm2-io-apm
PM2.io APM for Node.JS
Stars: ✭ 131 (+336.67%)
Mutual labels:  apm
atom-carbon-now-sh
Atom package to open the current editor content in https://carbon.now.sh/
Stars: ✭ 15 (-50%)
Mutual labels:  atom
atom-lazy-motion
Rapid cursor positioning with fuzzy search.
Stars: ✭ 21 (-30%)
Mutual labels:  atom
mei-tools-atom
Package for the Atom text editor that provides on-the-fly music notation rendering for MEI with Verovio
Stars: ✭ 17 (-43.33%)
Mutual labels:  atom
laravel-php-cs-fixer
A PHP-CS-Fixer bridge for Laravel 5.5+
Stars: ✭ 14 (-53.33%)
Mutual labels:  php-cs-fixer
php-toolbox
🐳 A Docker image designed for PHP developers that care about code quality.
Stars: ✭ 18 (-40%)
Mutual labels:  php-cs-fixer
feed2email
RSS/Atom feed updates in your email
Stars: ✭ 37 (+23.33%)
Mutual labels:  atom
Cake
Yummy syntax theme for Atom, Brackets, Sublime Text and Visual Studio Code
Stars: ✭ 47 (+56.67%)
Mutual labels:  atom
feedspora
FeedSpora posts RSS/Atom feeds to your social network accounts.
Stars: ✭ 31 (+3.33%)
Mutual labels:  atom
slack-ui
A light UI theme for Atom that is inspired by Slack's Aubergine sidebar theme
Stars: ✭ 17 (-43.33%)
Mutual labels:  atom
quick-query
Do queries against your local databases
Stars: ✭ 65 (+116.67%)
Mutual labels:  atom
linter-mypy
Atom Linter plugin to lint Python optional static type as defined in PEP 484
Stars: ✭ 29 (-3.33%)
Mutual labels:  atom
ClrProfiler.Trace
CoreCLR Profiler ILReWrite , Use To OpenTracing
Stars: ✭ 49 (+63.33%)
Mutual labels:  apm

apm apm apm

php-cs-fixer Atom-Package

Run the "PHP Coding Standards Fixer" within your Atom Editor

This version requires the PHP-CS-Fixer >= v2.0.0!

A screenshot of your package

Installation

$ apm install php-cs-fixer

or find it in the Packages tab under settings

Requirements

The package requires the "PHP Coding Standards Fixer" Cli build by SensioLabs. Minimum version required is 2.0.

Installation via Composer

$ ./composer.phar global require friendsofphp/php-cs-fixer

For other installation methods, see http://cs.sensiolabs.org/#installation

Usage

ctrl-cmd-s or Php Cs Fixer: Fix in the Command Palette.

(The commands can also be found in the settings-menu of the Package)

Settings

You can configure php-cs-fixer from the Atom package manager or by editing ~/.atom/config.cson (choose Open Your Config in Atom menu).

Here's an example configuration:

"php-cs-fixer":
  allowRisky: false # whether to run risky rules, false by default
  executablePath: "~/.composer/vendor/bin/php-cs-fixer" # the path to the `php-cs-fixer` executable
  executeOnSave: false # execute PHP CS fixer on save
  phpExecutablePath: "/usr/bin/php" # the path to the `php` executable
  rules: "-psr0,@PSR2,binary_operator_spaces,blank_line_before_return,..." # or null
  showInfoNotifications: true #show some status informations from the last "fix"

How-To

Mac OS X + brew

By @gammamatrix

To get it to work with brew, you need to cat the contents of the script installed with brew install php-cs-fixer:

Check to see where it installed

$ which php-cs-fixer
/usr/local/bin/php-cs-fixer

Cat the script

cat /usr/local/bin/php-cs-fixer
#!/bin/sh

/usr/bin/env php -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/php-cs-fixer/2.13.0/libexec/php-cs-fixer.phar $*

Paste the path for php-cs-fixer.phar in Executable Path

Go back to settings in Atom for php-cs-fixer.

/usr/local/Cellar/php-cs-fixer/2.13.0/libexec/php-cs-fixer.phar

FYI: "PHP executable Path" is empty for my set up. I also installed PHP with brew.

Use the keystroke: ctrl-cmd-s

I hope this helps 8)

This works for me without errors.

FAQ

Support for PHP-CS-Fixer v1.x.x

The latest version of this plugin requires PHP-CS-Fixer >= v2.0.0, to use it with PHP-CS-Fixer v1.x.x, install version 3.0.0 or lower.

$ apm install [email protected]

I have updated the plugin to 2.3.0 and it does not work any more

I had to add a new settings-parameter "PHP executable Path" to get the plugin running on Windows, so be sure to check if the new setting is configured properly.

On Windows this add-on does not work while running manually from the command line works

You probably have to add the directory of the php.exe to the PATH environment variable. You can do this in the system properties. You should configure the php-cs-fixer executable path to point to the vendor directory (e.g. C:/Users/{username}/AppData/Roaming/Composer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer). For detailed information use the Java guide or this stackexchange answer.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].