Editors & Tools
You might be a skilled programmer, but good tools are what make you a master. This chapter provides tips on essential tools, editors, and plugins.
IDE Editor
We strongly recommend using a full-featured IDE for development, like PhpStorm, NetBeans, or VS Code, rather than just a text editor with PHP support. The difference is truly significant. There's no reason to settle for a basic editor that only offers syntax highlighting when you can have a top-tier IDE providing accurate code suggestions, error checking, refactoring capabilities, and much more. Some IDEs are paid, while others are free.
NetBeans IDE has built-in support for Nette, Latte, and NEON.
PhpStorm: Install these plugins via Settings > Plugins > Marketplace
:
- Nette framework helpers
- Latte
- NEON support
- Nette Tester
VS Code: Find the “Nette Latte + Neon” plugin in the marketplace.
Also, integrate Tracy with your editor. When an error page is displayed, clicking on file names will open them directly in your editor at the corresponding line. Learn how to configure this feature.
PHPStan
PHPStan is a static analysis tool that detects logical errors in your code before you even run it.
Install it using Composer:
composer require --dev phpstan/phpstan-nette
Create a configuration file phpstan.neon
in your project:
includes:
- vendor/phpstan/phpstan-nette/extension.neon
parameters:
scanDirectories:
- app
level: 5
Then, let it analyze the classes within the app/
directory:
vendor/bin/phpstan analyse app
You can find comprehensive documentation directly on the PHPStan website.
Code Checker
Code Checker checks and potentially fixes some formal errors in your source code:
- removes BOM
- checks the validity of Latte templates
- checks the validity of
.neon
,.php
, and.json
files - checks for control characters
- checks if the file is encoded in UTF-8
- checks for incorrectly written
/* @annotations */
(missing second asterisk) - removes trailing
?>
PHP tags from files containing only PHP code - removes trailing whitespace and unnecessary blank lines at the end of files
- normalizes line endings to the system default (using the
-l
option)
Composer
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and manages their installation and updates.
Requirements Checker
This was a tool that tested the server's runtime environment and indicated whether (and to what extent) the framework could be used. Currently, Nette can be used on any server that meets the minimum required PHP version.