Skip to content

Developer Tools

PHM has a built-in tool manager. You install developer tools the same way you install PHP packages — with phm install.

ToolDescriptionInstall command
composerDependency Manager for PHPphm install composer
symfonySymfony CLI — build, run, and manage PHP applications from terminalphm install symfony
phpstanPHP Static Analysis Toolphm install phpstan
php-cs-fixerPHP Coding Standards Fixerphm install php-cs-fixer
psalmStatic Analysis Tool by Vimeophm install psalm
laravelLaravel Installerphm install laravel
deployerDeployment tool for PHPphm install deployer
castorDX-oriented task runnerphm install castor

Tools are installed to /opt/phm/bin and managed separately from PHP packages:

Terminal window
# Install Composer and Symfony CLI
phm install composer symfony
# Install PHP and tools together
phm install php8.5-cli composer phpstan
# Force reinstall (upgrade)
phm install composer --force
# List installed packages and tools
phm list

Tools are installed globally and available immediately in your terminal (if /opt/phm/bin is in your PATH).

Terminal window
phm install composer

PHM downloads composer.phar from getcomposer.org and creates a wrapper script that uses PHM’s PHP automatically. No manual curl or mv needed.

Terminal window
composer --version
composer install
composer require some/package
Terminal window
phm install symfony

The Symfony CLI is a developer tool to help you build, run, and manage your PHP applications directly from your terminal. PHM downloads the binary for your platform from GitHub releases.

While designed for Symfony, it works great with any PHP project — Laravel, WordPress, or plain PHP. Key features:

  • Local web server with automatic HTTPS and HTTP/2
  • Per-project PHP version via .php-version file — symfony php automatically uses the right version
  • Proxy for accessing projects via local .wip domains
  • Integration with Docker, SymfonyCloud, and platform.sh
Terminal window
# Start local server
symfony server:start -d
# Use project-specific PHP version (reads .php-version)
symfony php -v
symfony composer install
# Works with any PHP project, not just Symfony
cd my-laravel-app
echo "8.4" > .php-version
symfony php artisan serve

See Version Switching for details on per-project PHP version management.

These tools are installed as Phars via Composer, managed by PHM:

Terminal window
phm install phpstan
phm install psalm
phm install php-cs-fixer

PHM handles the entire process — downloads the tool via Composer in an isolated directory, extracts the phar, and creates a wrapper script pointing to PHM’s PHP. No need to configure ~/.composer/vendor/bin.

Terminal window
phpstan analyse src/
php-cs-fixer fix src/
psalm
Terminal window
phm install laravel
phm install deployer
phm install castor
Terminal window
laravel new my-app
dep deploy
castor task:run
Terminal window
# List all installed tools
phm list
# Show available tools
phm list -a
# Remove a tool
phm remove phpstan
# Show tool info
phm info composer

PEAR/PECL is available as a PHP package:

Terminal window
phm install php8.5-pear