It’s important when you’re marking folders as either Tests or Sources that you also tell PhpStorm which namespaces those directories contain, and you can do this by clicking on the Package Prefix icon under the directory listing in the right-hand pane: You can learn more about marking directories in the web help article. Resource Root – Contains resources that can be accessed relatively – like images, CSS files or javascript.Sources – Mark as a source of PHP autoloadable classes.Tests – Mark the directory as a source of PHPUnit tests.You can mark directories as sources or tests from the context menu in the project pane, or you can use the Directories section of the Preferences window. Telling PhpStorm where your namespaced files live will help when creating classes and tests (and navigating between them) and refactoring things. You can configure the PHP version you are targeting using the dropdown you’ll find under Preferences | Languages and Frameworks | PHP: Telling PhpStorm which version of PHP you’re targeting allows the inspections that power the IDE to let you know if you’re using things that are deprecated (or not available in your target version), and enables some features that are only available in later versions of PHP like the scalar parameter and return types. When you’re using PhpStorm to develop efficiently, there is a few configuration setting that should be right to make the IDE is as helpful as possible. Configuring PhpStorm correctly is important to get the most out of your IDE, and PhpStorm 2017.2 has made it easier by allowing you to detect some of the settings from your `composer.json` file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |