Best PHP packages for Atom

Hi guys :), today I’ve prepared a list of the best PHP packages which I’ve found so far. You can download this list by using my package Package List Downloader. Install the package and run the command Predefined List.

Linter php, phpmd and phpcs

These three packages will help you make cleaner code with fewer bugs. Each of them analyze a code from a different perspective. First of all you need to install Linter Package which all three packages use.

Linter PHP checks for syntax errors. You don’t need any external tool, because it uses php interpreter. Just make sure that you have PHP in PATH variable otherwise you need to set it in the package settings.

php-linter
Missing function keywoard

 

Linter phpmd checks your code by PHPMD which looks for problematic parts of your code. For example it might check for unused variables and functions, complicated expressions, problems with function names and many others problems withing the code. You can install PHPMD using composer by running the command:

composer global require "phpmd/phpmd:2.2.0"

Check if a new version of PHPMD was released since publishing of this article and update the version above accordingly. After the installation you can change the set of rules which will be applied.

php-md
Example of unused private method and parameter

 

Linter PHPCS checks if your code comply with PSR standards. This helps especially with having a consistent code throughout the code base. If you want to use it, start by installing Code Sniffer. Once again you can use Composer.

composer global require "squizlabs/php_codesniffer=*"

 

php-cs
PHP Code Sniffer in action

 

PHP Getters and Setters

PHP Getters and setters package provides simple UI for generating setters and getters for your classes. You can change the template inside the package settings.

php-getters-setters

 

PHP Server and PHPUnit

These two packages are pretty straight forward. PHP Server runs built in PHP server from Atom editor. PHP Unit shows test results of PHP Unit inside of Atom. Both packages are really simple so don’t expect any advanced functionality just yet.

 

Share article byShare on LinkedInGoogle+Share on RedditTweet about this on TwitterShare on Facebook

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>