This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Extension for [PHPStan]( to allow static analysis of CiviCRM.

Fund package maintenance!
Ko Fi

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0


0.12.0 2020-11-01 20:42 UTC

This package is auto-updated.

Last update: 2021-09-30 03:14:29 UTC


Extension for PHPStan to allow static analysis of CiviCRM.


The PHPStan CiviCRM was created through a sponsorship by Megaphone Technology Consulting 🎉


To use the PHPStan CiviCRM extension, you must define the root location of CiviCRM.

        root: sites/all/modules/civicrm

The default value expects CiviCRM to live in the Composer vendor directory, like it does for Drupal 8.


The civicrm.root parameter this is equal to $civicrm_root as defined in the CMS integration settings. Here are some examples assuming your CMS is installed at /var/www/htdocs.

  • Drupal 7: /var/www/htdocs/drupal/sites/all/modules/civicrm/
  • Drupal 8: /vendor/civicrm/civicrm-core
  • Backdrop: /var/www/htdocs/backdrop/modules/civicrm/
  • Joomla: /var/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/
  • WordPress: /var/www/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/