![]() |
Atom PHP Environment + CodeIgniter 3 & 4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Atom PHP Environment + CodeIgniter 3 & 4 (/showthread.php?tid=67733) |
Atom PHP Environment + CodeIgniter 3 & 4 - natanfelles - 04-02-2017 Gist: Atom PHP Environment + CodeIgniter 3 & 4 Atom PHP Environment + CodeIgniter 3 & 4 For Debian based distros (Ubuntu, Linux Mint...) ![]() Download and install Atom: Code: cd ~/Downloads Install required SO packages: Code: sudo apt install php php-sqlite3 php-mbstring sqlite3 composer npm Code Formatters atom-beautify uses JS Beautify by default. Code: sudo npm -g install js-beautify For PHP, atom-beautify uses php-cs-fixer by default but it do not worked for me, then we can install phpcbf. Code: composer global require friendsofphp/php-cs-fixer After, go to Atom and open the menu Edit > Preferences > Packages, go to atom-beautify and edit the PHP Settings and set Default Beautifier to PHPCBF and PHPCBF Standard put PSR2. Linters Code: sudo npm -g install linter The Awesome PHP Integrator is a powerful project that provides code analysis and utilities for PHP projects. PHP Integrator uses composer to install the core and you need install the correct version corresponding to the php-integrator-base version. Code: composer global require php-integrator/core 2.1.1 PHP Integrator also uses the project-manager to activate resources based by project. Lets install the Atom packages: Code: apm install project-manager CodeIgniter ![]() When you works on a CodeIgniter 3 project you can download this file https://raw.githubusercontent.com/natanfelles/codeigniter-phpstorm/master/phpstorm.php inside your project root. After go to Atom and open the menu Packages > Project Manager > Edit Projects and configure your project like it: Code: { This tip will do PHP Integrator do not read Controller.php and Model.php from the system folder, then it will use all the @property from phpstorm.php file. You can read more about it in Code Completion for CodeIgniter in phpStorm and here Excluding Folders From Indexing. ![]() Extras Some extra packages that I like: Code: apm install atom-ternjs RE: Atom PHP Environment + CodeIgniter 3 & 4 - arisroyo - 04-02-2017 Interesting stuff. RE: Atom PHP Environment + CodeIgniter 3 & 4 - kilishan - 04-03-2017 Thanks for this. I was looking into Atom recently because I like the idea of it and was looking for a potential change from PHPStorm, but hadn't found the tools that might allow me to take care of most of the stuff I was used to having. The PHP Integrator project might be just what I was looking for. Time to play a little. ![]() |