php-stubs / genesis-stubs
Genesis functions stubs for static analysis.
Installs: 6 925
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Requires
Requires (Dev)
- php: ^7.4 || ^8.0
- php-stubs/generator: ^0.8.0
Suggests
- symfony/polyfill-php73: Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
- szepeviktor/phpstan-wordpress: WordPress extensions for PHPStan
This package is auto-updated.
Last update: 2024-12-18 09:50:08 UTC
README
This package provides stub declarations for Genesis framework functions, classes and interfaces. These stubs can help plugin and theme developers leverage static analysis tools like PHPStan, which is not able to parse genesis as it is not clean OOP code.
Stubs are generated directly from the latest Genesis version that is required to be downloaded manually as it is blocked by a form. using giacocorsiglia/stubs-generator.
Requirements
- PHP >=7.1
Installation
Require this package as a development dependency with Composer.
composer require --dev php-stubs/genesis-stubs
Alternatively you may download genesis-stubs.php
directly.
Usage in PHPStan
Include all stubs in PHPStan configuration file.
parameters: bootstrapFiles: - %rootDir%/../../php-stubs/wordpress-stubs/wordpress-stubs.php - %rootDir%/../../php-stubs/genesis-stubs/genesis-stubs.php