Installation
Chevere Workflow is available through Packagist and requires PHP 8.1 or higher.Requirements
Before installing Workflow, ensure your environment meets these requirements:- PHP 8.1 or higher
- Composer for dependency management
Install via Composer
Install Workflow using Composer:amphp/amp- Asynchronous concurrency frameworkchevere/action- Type-safe action classeschevere/caller- Callable invocation utilitieschevere/container- PSR-11 dependency injection containerchevere/data-structure- Data structure utilitieschevere/parameter- Parameter validation and type definitionschevere/regex- Regular expression utilities
All dependencies are automatically installed by Composer. You don’t need to install them separately.
Verify installation
Create a simple test file to verify the installation:test.php
If you see the greeting message, Workflow is installed correctly!
Optional dependencies
While Workflow works standalone, you may want to install additional Chevere packages for enhanced development experience:Development tools
chevere/var-dump package provides enhanced debugging output for workflow objects.
Testing tools
For testing workflows, install PHPUnit:IDE support
PHPStan integration
Workflow is built with PHPStan level 9 compliance. Install PHPStan for static analysis:phpstan.neon configuration:
phpstan.neon
IDE autocomplete
Workflow uses named arguments extensively. Ensure your IDE supports PHP 8.1+ features:- PhpStorm - Full support out of the box
- VS Code - Install the PHP Intelephense extension
- Sublime Text - Install LSP and LSP-intelephense packages
Configuration
Workflow requires no configuration files. All setup is done through code using the functional API.Autoloading
Workflow automatically registers its functions through Composer’s autoloader. The following functions are available globally after requiring the autoloader:workflow()sync()async()variable()response()run()
These functions are namespaced under
Chevere\Workflow. Import them with use function statements or call them with the full namespace.Directory structure
Here’s a recommended project structure for Workflow projects:Troubleshooting
Memory limit errors
If you encounter memory limit errors with large workflows, increase PHP’s memory limit:php.ini:
Missing function errors
If you see errors about undefined functions, ensure you’re importing them correctly:Amphp conflicts
If you have other packages that depend on Amphp v2, you may encounter conflicts. Workflow requires Amphp v3.1+. Update conflicting packages or use Composer’s--with-all-dependencies flag:
Next steps
Quick start
Build your first workflow and learn the core concepts