Hey everyone!!
As part of our restructuring and working towards a better more robust framework in terms of features as well as organization, we have removed the IDE stubs from the Phalcon DevTools repository and moved to its own repository.
Since Phalcon is a module that is loaded in memory and always available, there is no way for an IDE such as PHPStorm to interrogate the sources of the framework and offer autocomplete features for namespaces, classes, methods etc.
To work around this issue, the Phalcon team has been generating IDE stubs that can be used with such IDEs.
You can now find those stubs in Packagist:
https://packagist.org/packages/phalcon/ide-stubs
The installation is extremely simple.
Composer
Install Composer in a common location or in your project:
curl -s https://getcomposer.org/installer | php
Create the composer.json file as follows:
{
"require-dev": {
"phalcon/ide-stubs": "*"
}
}
Run the composer installer:
php composer.phar install
Git
Clone the Phalcon IDE Stubs repository in a location of your choosing.
git clone https://github.com/phalcon/ide-stubs.git
Setup your IDE.
For PHPStorm users, you can:
- Right mouse click on the
External Libraries
in the Project listing pane - Click
Configure PHP Include Paths
- Click the green
+
button and clickSpecify Other...
- Navigate to the folder where the stubs are located
- Click the
Phalcon
folder and clickOK
- Click
Apply
and thenOK
NOTE: The video above shows how to enable the IDE stubs cloning the DevTools. The installation is the same, all you have to do is locate the
Phalcon
project
Chat - Q&A
Support
Social Media
Videos
<3 Phalcon Team