mglaman / phpstan-civicrm
Extension for [PHPStan](https://phpstan.org) to allow static analysis of CiviCRM.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Type:phpstan-extension
Requires
- php: ^7.1
- phpstan/phpstan: ^0.12.52
Requires (Dev)
- civicrm/civicrm-core: ^5.30
- phpstan/extension-installer: ^1.0
- phpstan/phpstan-deprecation-rules: ^0.12.5
- phpstan/phpstan-strict-rules: ^0.12.5
- phpunit/phpunit: ^9.4
README
Extension for PHPStan to allow static analysis of CiviCRM.
Sponsors
The PHPStan CiviCRM was created through a sponsorship by Megaphone Technology Consulting 🎉
Configuration
To use the PHPStan CiviCRM extension, you must define the root location of CiviCRM.
parameters:
civicrm:
root: sites/all/modules/civicrm
The default value expects CiviCRM to live in the Composer vendor directory, like it does for Drupal 8.
%currentWorkingDirectory%/vendor/civicrm/civicrm-core
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/