The workspace refers to the working directory where Chevere is developed.
Chevere provides snippets and recommendation on extensions that goes better for development, this includes the provisioning IDE resources.
🧔🏾 The default IDE of choice is Visual Studio Code
All Visual Studio Code assets and settings are at the .vscode/ folder.
This is a list of the essential extensions that I can recommend for using Visual Studio Code for developing Chevere.
- Psalm (PHP Static Analysis Linting Machine)
- Coverage Gutters
- PHP Intelephense
- PHP Namespace Resolver
- PHPUnit Test Explorer
- Run on Save
# Template Snippets
Snippets in Visual Studio Code provide an easy way to define templates for code. It is a productivity tool that allows to rapidly cast source code just typing a keyword in the IDE.
Snippets provide this functionality for the IDE:
Note that for the example above, the header comment and
strict_types declaration are automatically provided by the coding standard formatting.
# Coding Standards Formatting
The coding standard is automatically implemented on save.
PHPUnit Test Explorer provides inline tools for code execution and reviewing. It allows to easily handle all tests.
# Running tests
To run tests:
vendor/bin/phpunit -c phpunit.xml
To run tests with code coverage report at
vendor/bin/phpunit -c phpunit-report.xml
To run filtered tests use the
vendor/bin/phpunit -c phpunit-report.xml --filter ActionTest
Kindly check PHPUnit Documentation for all available options.
# Code Coverage
Coverage Gutters provides visual feedback regarding covered lines right into the editor.