Download the PHP package thee-prime/wpflint without Composer
On this page you can find all versions of the php package thee-prime/wpflint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thee-prime/wpflint
More information about thee-prime/wpflint
Files in thee-prime/wpflint
Package wpflint
Short Description Laravel-inspired framework for WordPress plugins
License GPL-2.0-or-later
Informations about the package wpflint
WPFlint
A Laravel-inspired framework for building WordPress plugins. Zero production dependencies. PHP 7.4+.
WPFlint gives you the tools you expect from a modern PHP framework — IoC container, Eloquent-style ORM, migrations, routing, middleware, validation, events, caching, views, mail, admin builders, and Gutenberg support — all built on top of WordPress APIs and fully compliant with WP.org plugin guidelines.
Table of Contents
- Installation
- Quick Start
- Architecture Overview
- Core Framework
- Application
- Service Container
- Service Providers
- Configuration
- Facades
- HTTP Layer
- Routing
- Middleware
- Controllers
- Requests & Validation
- Responses
- REST API Auth Helpers
- Database
- Migrations
- Schema Builder
- Query Builder
- ORM
- Relationships
- WordPress UI
- Admin Menu & Pages
- Settings API
- Admin Notices
- Metabox Builder
- Shortcodes
- Block Registration
- Widgets
- Templates & Mail
- Views
- Plugin Infrastructure
- Plugin Lifecycle
- Asset Manager
- Events
- Cache
- Logging
- Queue & Jobs
- Scheduler
- WP-CLI Commands
- Testing
- WP.org Compliance
- Directory Structure
Installation
Quick Start
Create your main plugin file:
Architecture Overview
Service providers are the central place to configure your plugin. Register everything — routes, event listeners, admin pages, metaboxes, widgets, assets — in boot().
Core Framework
Application
Full documentation →
Service Container
PSR-11 compliant IoC container with auto-resolution, singletons, and contextual bindings.
Full documentation →
Service Providers
Deferred providers are only booted when one of their bindings is requested:
Full documentation →
Configuration
Full documentation →
Facades
Create custom facades:
Full documentation →
HTTP Layer
Routing
Full documentation →
Middleware
Built-in middleware: nonce:{action}, can:{capability}, throttle:{max},{minutes}.
Custom middleware:
Full documentation →
Controllers
Full documentation →
Requests & Validation
Full documentation →
Responses
Full documentation →
REST API Auth Helpers
Factory methods that return permission_callback callables:
Full documentation →
Database
Database: Migrations
Full documentation →
Database: Schema Builder
Full documentation →
Database: Query Builder
Full documentation →
Database: ORM
Full documentation →
Relationships
Full documentation →
WordPress UI
Admin Menu & Pages
Full documentation →
Settings API
Full documentation →
Admin Notices
Full documentation →
Metabox Builder
Full documentation →
Shortcodes
Full documentation →
Block Registration
Full documentation →
Widgets
Full documentation →
Templates & Mail
Views
Template file (resources/views/admin/settings.php):
Full documentation →
Full documentation →
Plugin Infrastructure
Plugin Lifecycle
Full documentation →
Asset Manager
Full documentation →
Events
Full documentation →
Cache
Full documentation →
Logging
Full documentation →
Queue & Jobs
Full documentation →
Scheduler
Full documentation →
WP-CLI Commands
Dev-only commands, excluded from production builds via .distignore.
Database
| Command | Description |
|---|---|
wp wpflint migrate |
Run pending migrations |
wp wpflint migrate --rollback |
Roll back last batch |
wp wpflint migrate --rollback --steps=N |
Roll back N batches |
wp wpflint migrate --fresh |
Drop all + re-run (with confirmation) |
wp wpflint migrate --status |
Show migration status |
wp wpflint cache:clear |
Clear all application cache |
wp wpflint cache:clear --tag=orders |
Clear a specific cache tag |
Code Generators
| Command | Description |
|---|---|
wp wpflint make:migration <Name> |
Generate migration stub |
wp wpflint make:model <Name> |
Generate model stub |
wp wpflint make:model <Name> --migration |
Generate model + migration |
wp wpflint make:controller <Name> |
Generate AJAX controller |
wp wpflint make:controller <Name> --rest |
Generate REST controller |
wp wpflint make:middleware <Name> |
Generate middleware stub |
wp wpflint make:request <Name> |
Generate form request stub |
wp wpflint make:provider <Name> |
Generate service provider stub |
wp wpflint make:event <Name> |
Generate event stub |
wp wpflint make:facade <Name> |
Generate facade stub |
All make:* commands accept --path=<dir> to customise the output directory.
Full documentation →
Testing
WPFlint uses PHPUnit 9 with WP_Mock and Brain\Monkey.
Test structure mirrors src/:
Writing a test:
WP.org Compliance
WPFlint is designed for WordPress.org plugin directory submission:
- All database queries use
$wpdb->prepare() - All user input sanitized with
sanitize_*()functions - All output escaped with
esc_*()functions - AJAX handlers verify nonces (
check_ajax_referer()) and capabilities (current_user_can()) - Metabox save callbacks verify nonces, capability, and skip autosaves
- All translatable strings use
__()or_e()with text domains - No
eval(),exec(), orsystem()calls .distignoreexcludes:tests/,vendor/,.claude/,src/Console/,docs/,composer.json
Directory Structure
License
GPL-2.0-or-later