mralaminahamed / ninja-forms-stubs
Ninja Forms function and class declaration stubs for static analysis.
Package info
github.com/mralaminahamed/phpstan-ninja-forms-stubs
Language:Shell
pkg:composer/mralaminahamed/ninja-forms-stubs
Requires
- php: >=7.4
- php-stubs/wordpress-stubs: ^5.3 || ^6.0
Requires (Dev)
- php-stubs/generator: ^0.8.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^7.5 || ^8.5 || ^9.5
- squizlabs/php_codesniffer: ^3.7
Suggests
- symfony/polyfill-php73: Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
- szepeviktor/phpstan-wordpress: WordPress extensions for PHPStan
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v3.15.3
- v3.15.2
- v3.15.1
- v3.15.0
- v3.14.12
- v3.14.11
- v3.14.10
- v3.14.9
- v3.14.8
- v3.14.7
- v3.14.6
- v3.14.5
- v3.14.4
- v3.14.3
- v3.14.2
- v3.14.1
- v3.14.0
- v3.13.4
- v3.13.3
- v3.13.2
- v3.13.1
- v3.13.0
- v3.12.2.1
- v3.12.2
- v3.11.1.1
- v3.11.1
- v3.10.4.1
- v3.10.4
- v3.10.0
- v3.9.2.1
- v3.9.2
- v3.9.1
- v3.9.0
- v3.8.25.1
- v3.8.25
- v3.8.24
- v3.8.23
- v3.8.22
- v3.8.21
- v3.8.20
- v3.8.19
- v3.8.18
- v3.8.17
- v3.8.16
- v3.8.15
- v3.8.14
- v3.8.13
- v3.8.12
- v3.8.11
- v3.8.10
- v3.8.9
- v3.8.8
- v3.8.7
- v3.8.6
- v3.8.5
- v3.8.4
- v3.8.3
- v3.8.2
- v3.8.1
- v3.8.0
- v3.7.3.1
- v3.7.3
- v3.6.34.1
- v3.6.34
- v3.5.8.5
- v3.5.8.4
- v3.4.34.3
- v3.4.34.2
- v3.3.21.4
- v3.2.28
- v3.1.10
- v3.0.34.2
- v3.0
- v2.9.58
- dev-create-pull-request/patch
This package is auto-updated.
Last update: 2026-09-08 08:03:34 UTC
README
PHP stub declarations for the Ninja Forms plugin to enhance IDE completion and static analysis capabilities. Generated using php-stubs/generator directly from the source code.
🚀 Features
- Complete function, class, and interface declarations
- Constant definitions for proper static analysis
- IDE autocompletion support
- PHPStan integration
- Regular updates with latest Ninja Forms plugin versions
📋 Requirements
- PHP >= 7.4
- Composer for dependency management
📦 Installation
Via Composer (Recommended)
# Install as a development dependency composer require --dev mralaminahamed/ninja-forms-stubs # Or specify a version composer require --dev mralaminahamed/ninja-forms-stubs:^2.0
Manual Installation
Download the stub files directly:
🔧 Basic Configuration
To use these stubs with PHPStan or your IDE, see our Usage Guide for detailed instructions.
🔍 Quick Usage Example
<?php // Your code will now have full IDE support $ninja_forms = Ninja_Forms(); // Access forms via the main class $form = Ninja_Forms()->form($formId)->get(); // Constants are properly defined if (NF_PLUGIN_VERSION) { // Your implementation }
For advanced usage examples, see the Usage Guide.
📁 Package Structure
phpstan-ninja-forms-stubs/
├── configs/ # Configuration files for stub generation
├── ninja-forms-constants-stubs.stub # Constants stub file
├── ninja-forms-stubs.stub # Main stubs file with classes and functions
├── ninja_forms_versions.txt # Tracks supported Ninja Forms versions
├── phpstan.neon # PHPStan configuration
├── source/ # Source for generating stubs
└── tests/ # Test files
├── bootstrap.php # Test bootstrap
├── ConstantsTest.php # Constants tests
└── NinjaFormsTest.php # Ninja Forms tests
🛠 Development
For information on building stubs, running tests, and contributing to the project, please see our Contributing Guide.
📚 Documentation
For more detailed information, check out our documentation:
- Usage Guide
- Contributing Guide
- Ninja Forms Documentation
- PHPStan Documentation
- PHP Stubs Generator Documentation
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Saturday Drive for the Ninja Forms plugin
- php-stubs/generator for the stub generation tools
- All contributors to this project
💬 Support
For bug reports and feature requests, please use the GitHub Issues.
For questions and discussions, please use the GitHub Discussions.