mralaminahamed/forminator-stubs

Forminator function and class declaration stubs for static analysis.

Maintainers

Package info

github.com/mralaminahamed/phpstan-forminator-stubs

Language:Shell

pkg:composer/mralaminahamed/forminator-stubs

Statistics

Installs: 610

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.54.0 2026-06-15 07:47 UTC

This package is auto-updated.

Last update: 2026-06-15 07:47:29 UTC


README

Latest Version Downloads License PHP Version Tweet

PHP stub declarations for the Forminator 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 Forminator plugin versions

📋 Requirements

  • PHP >= 7.4
  • Composer for dependency management

📦 Installation

Via Composer (Recommended)

# Install as a development dependency
composer require --dev mralaminahamed/forminator-stubs

# Or specify a version
composer require --dev mralaminahamed/forminator-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
$forms = Forminator_API::get_forms();

// Create a new form entry
$entry = Forminator_API::get_entry($entryId, $formId);

// Constants are properly defined
if (FORMINATOR_VERSION) {
    // Your implementation
}

For advanced usage examples, see the Usage Guide.

📁 Package Structure

phpstan-forminator-stubs/
├── configs/                               # Configuration files for stub generation
├── forminator-constants-stubs.stub        # Constants stub file
├── forminator-stubs.stub                  # Main stubs file with classes and functions
├── forminator_versions.txt                # Tracks supported Forminator versions
├── phpstan.neon                           # PHPStan configuration
├── source/                                # Source for generating stubs
├── tools/                                 # Helper tools for stub generation
└── tests/                                 # Test files
    ├── bootstrap.php                      # Test bootstrap
    ├── ConstantsTest.php                  # Constants tests
    └── ForminatorTest.php                 # Forminator 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:

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

💬 Support

For bug reports and feature requests, please use the GitHub Issues.

For questions and discussions, please use the GitHub Discussions.