https://github.com/php-stubs/genesis-stubs
Genesis Framework function stubs for static analysis.
https://github.com/php-stubs/genesis-stubs
Last synced: 11 months ago
JSON representation
Genesis Framework function stubs for static analysis.
- Host: GitHub
- URL: https://github.com/php-stubs/genesis-stubs
- Owner: php-stubs
- License: mit
- Created: 2021-07-14T10:39:50.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-18T09:25:57.000Z (over 1 year ago)
- Last Synced: 2025-06-04T16:33:39.192Z (about 1 year ago)
- Language: PHP
- Homepage: https://studiopress.github.io/genesis/changelog/
- Size: 96.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Genesis Stubs
[](https://travis-ci.com/php-stubs/genesis-stubs)
This package provides stub declarations for [Genesis framework](https://www.studiopress.com/get-genesis/)
functions, classes and interfaces.
These stubs can help plugin and theme developers leverage static analysis tools
like [PHPStan](https://github.com/phpstan/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](https://github.com/GiacoCorsiglia/php-stubs-generator).
### Requirements
- PHP >=7.1
### Installation
Require this package as a development dependency with [Composer](https://getcomposer.org).
```bash
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.
```yaml
parameters:
bootstrapFiles:
- %rootDir%/../../php-stubs/wordpress-stubs/wordpress-stubs.php
- %rootDir%/../../php-stubs/genesis-stubs/genesis-stubs.php
```