arts / wpml-stubs
PHPStan stubs for WPML Multilingual CMS - auto-generated for local development
v4.9.2
2026-08-14 05:48 UTC
Requires
- php: >=8.0
- php-stubs/woocommerce-stubs: ^10.4
- php-stubs/wordpress-stubs: ^6.9
- php-stubs/wp-cli-stubs: ^2.12
Requires (Dev)
- captainhook/captainhook: ^5.27
- php-stubs/generator: ^0.8
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.0
- vlucas/phpdotenv: ^5.6
- wp-coding-standards/wpcs: ^3.0
README
PHPStan stubs for WPML Multilingual CMS for local development.
Requirements
- PHP 8.0 or higher
- PHPStan for static analysis
Dependencies
This package depends on php-stubs/woocommerce-stubs to provide WP_Background_Process classes that WPML extends. This prevents duplicate class definitions when using both WPML and WooCommerce.
Installation
composer require --dev arts/wpml-stubs
Usage with PHPStan
Add to your phpstan.neon:
parameters: bootstrapFiles: - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php - vendor/arts/wpml-stubs/wpml-stubs.php
Generating Stubs
- Copy
.env.exampleto.env - Set
WPML_PATHto your WPML installation - Run:
composer generate
cp .env.example .env
# Edit .env with your path
composer generate
Testing
Run tests to validate generated stubs:
composer test
License
GPL-3.0-or-later