PHP Tooling

Packages which are supported by JetBrains PhpStorm are denoted by (PS).

Package Management

  • Composer – 20.7k Stars – (PS) – The main tool used to manage dependencies in PHP.
    • composer -v – Check that composer is working, see currently installed version.
    • composer list – See a list of the available commands for composer.
    • composer help command – Shows documentation related to the desired command.
    • composer init – Initializes composer for the given project.
    • composer require name/package – Adds to the composer.json and can install the specified package.
      • Use --dev before the name/package to indicate this dependency is only needed for development, not production.
    • composer show – List of currently required packages.
    • composer install – Uses an existing composer.json to install dependencies.
    • composer update – Updates dependencies to latest available.
  • Packagist – An online repository of packages for PHP, used in conjunction with Composer.
  • Phive – Not so much for installing dependencies as for installing tooling. Love this.

Editors/IDEs

Static Code Analysis

Testing

  • PHPUnit – 14.6k Stars – (PS) – The defacto standard for unit testing PHP.
    • setUp Method
    • tearDown Method
    • test*() Methods
    • @depends Annotation
    • Assertions
  • Faker – 21.6k Stars
  • Prophecy – 6.8k Stars – Mocking framework.
  • PHP Code Coverage – 6.5k
  • Mockery – 8.3k Stars – For creating mock objects.
  • PHPSpec – (PS)
  • Behat – (PS)
  • Codeception – (PS) – A popular testing framework.

Debugging

Other Tooling

  • PHP Documentor – 2.4k Stars
  • phpdotenv – 9.6k Stars – Allows environment variables to be loaded from .env to getenv().
  • Deployer – 7k Stars – Deployment Tool.
  • Behat – 3.1k Stars – BDD.
  • psr/log
  • monolog/monolog
  • webmozart/assert
  • Phing – (PS)

Database