The Lightning-Smart PHP IDE
For Magento 2 + PhpStorm Sick of typing in Magento? Waste your time somewhere else. Create entire files, classes & blocks with just a few keystrokes. Watch the intro to Beeline on YouTube Time is money Save time & get stuff done Why spend a few minutes creating a. This is a PhpStorm IDE plugin for a better Magento 2 development workflow. I got really sick of typing in Magento, so I created a tool called Beeline. It greatly reduces the generation of boilerplate code for Magento 2 + PhpStorm.Si.
PhpStorm deeply
understands your code.
Major frameworks support
PhpStorm is perfect for working with Symfony, Laravel, Drupal, WordPress, Zend Framework, Magento, Joomla!, CakePHP, Yii, and other frameworks.
All the PHP tools
The editor actually 'gets' your code and deeply understands its structure, supporting all the PHP language features for modern and legacy projects. It provides the best code completion, refactorings, on-the-fly error prevention, and more.
Front-end technologies included
Make the most of the cutting edge front-end technologies, such as HTML 5, CSS, Sass, Less, Stylus, CoffeeScript, TypeScript, Emmet, and JavaScript, with refactorings, debugging, and unit testing available. See the changes instantly in the browser thanks to Live Edit.
Built-in developer tools
Perform many routine tasks right from the IDE, thanks to the Version Control Systems integration, support for remote deployment, databases/SQL, command-line tools, Docker, Composer, REST Client, and many other tools.
PhpStorm = WebStorm + PHP + DB/SQL
All the features in WebStorm are included into PhpStorm, with full-fledged support for PHP and Databases/SQL support added on top.
Intelligent Coding Assistance
Hundreds of inspections take care of verifying your code as you type, analyzing the whole project. PHPDoc support, code (re)arranger and formatter, quick-fixes, and other features help you write neat code that is easy to maintain.
Smart Code Navigation
Be the master of your codebase thanks to the efficient, lightning-fast navigation features. The IDE understands where you want to go and gets you there instantly.
Fast and Safe Refactoring
Refactor your code reliably with the safe Rename, Move, Delete, Extract Method, Inline Variable, Push members Up / Pull members Down, Change Signature, and many other refactorings. Language-specific refactorings help you perform project-wide changes in a matter of clicks, which can all be safely undone.
Easy Debugging and Testing
PhpStorm is renowned for its zero-configuration Visual Debugger, providing extraordinary insight into what goes on in your application at every step. It works with Xdebug and Zend Debugger, and can be used both locally and remotely. Unit Testing with PHPUnit, BDD with Behat and profiler integration are all also available.
What’s new in PhpStorm 2021.1
Code With Me for pair programming
Code With Me, a new JetBrains service for collaborative development and pair programming, is now bundled with PhpStorm. It allows you to share the project you currently have open in your IDE with others and work on it together in real time.
Built-in preview for HTML and PHP files
With PhpStorm 2021.1, you can get a live-edit experience out of the box, there is no need to set anything up. It works for HTML and linked CSS, JS files, as well as for simple PHP files which will be rendered with a local PHP interpreter.
New inspections to help detect bugs
PhpStorm adds 20+ new inspections to help prevent possible bugs at early stages. It also comes with quick-fixes to make adjustments to code and small refactorings with one use of Alt+Enter.
Meet the PhpStorm community
Phpstorm Magento 2
@geeh @phpstorm I'm hooked mate. I've been so productive lately it's silly. Keep up the great work.
@phpstorm's code completion is incredibly useful.
@phpstorm is magical... in a good way. I find myself saying 'oh that's convenient' over and over.
If you are developing in PHP and are not using PhpStorm, you are working too hard.
'I'm so spoiled by PhpStorm!'
Join over 600,000
happy PhpStorm users
worldwide!
Running tests in PhpStorm requires following steps to setup the system.
- Configuring the PHP interpreter
- Configuring PHPUnit
- Creating a run configuration
Configuring the PHP interpreter
In the PhpStorm preferences, select the PHP interpreter PhpStorm should use to run tests with.
If you can not select a PHP interpreter because the dropdown is empty, you can add a one by clicking on the button with the three dots beside the dropdown.
Then, click the + (add) button in the top right to select the desired PHP binary on your file system.
Please refer to the PhpStorm documentation for further information on how to configure a local PHP interpreter.
It is also possible to configure a remote PHP interpreter, which is a common setup when working with Vagrant or Docker based development environments.
Please be aware that the details on configuring the PHP interpreter might vary between PhpStorm versions.
Configuring PHPUnit
After configuring the interpreter, the next step is to set up the PHPStorm preferences for how to execute PHPUnit.
- Click the Use Composer autoloader option.
- Select the
vendor/autoload.php
file in your Magento 2 installation. - Optionally select the
dev/tests/unit/phpunit.xml.dist
file as the Default configuration file. Doing this step makes creating temporary run configurations more convenient.
Please refer to the PhpStorm documentation for further information on Configure a test framework in a project.
Creating a run configuration
The final step is to create a run configuration to execute the desired tests.
There are many ways to create run configurations in PhpStorm. Here we just show one of the option.
All start by creating a new run configuration. To do so, follow these steps:
- Select the Run > Edit Configurations action from the top menu.
- Click the + symbol on the top right and select PHPUnit.
Depending on what tests should be included in the run configuration, the next steps differ.
Running all tests
- Give the run configuration a descriptive name; for example All Unit Tests
- Test Scope: select the Defined in the configuration file radio button
- Check the Use alternative configuration file checkbox
- Select the file
dev/tests/unit/phpunit.xml.dist
- Click OK.
Running the tests of one module
Magento 2 Phpstorm Xsd
- Give the run configuration a descriptive name; for example, Example_Module Unit Tests
- Test Scope: select the Directory option
- Select the directory containing the modules unit tests. PHPUnit will run every file ending with
Test.php
in the selected directory branch. - Click OK.
Running the tests in a class
- Give the run configuration a descriptive name like the name of the test class; for example, FrontControllerPluginTest.
- Test Scope: select the Class option.
- Class: enter the fully qualified class name (including the PHP namespace).
- File: select the file containing the test class.
- Click OK.
A more convenient way to create a run configuration for a test class is to open the class in PhpStorm, and then right-clicking into the class and selecting Create ‘TestClassName’ or Run ‘TestClassName’.
Note that the test class has to inherit from PHPUnit_Framework_TestCase
for PhpStorm to display that option.
Executing the run configuration
First select the run configuration to execute in the run configuration drop-down menu above the main editor window, then click the Play icon beside it.
Magento Phpstorm Xdebug
By clicking the Debug icon (of a bug) next to the Play icon, it is possible to step-debug code during test execution, if the xdebug PHP extension is installed.