Download the PHP package quellabs/canvas-objectquel without Composer
On this page you can find all versions of the php package quellabs/canvas-objectquel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download quellabs/canvas-objectquel
More information about quellabs/canvas-objectquel
Files in quellabs/canvas-objectquel
Package canvas-objectquel
Short Description ObjectQuel integration for the Canvas PHP framework
License MIT
Informations about the package canvas-objectquel
Canvas ObjectQuel Integration

The Canvas ObjectQuel Integration package provides seamless integration between ObjectQuel ORM and the Canvas PHP framework. This package includes service discovery for dependency injection and Sculpt CLI commands for entity management.
Table of Contents
- Installation
- Features
- Configuration
- Service Discovery
- Sculpt Commands
- Quick Start
- Configuration Reference
- Usage Examples
- Support
- License
Installation
Install the package via Composer:
The package requires:
- PHP 8.2 or higher
- Canvas PHP framework
- ObjectQuel ORM (>=1.0)
Features
🔌 Automatic Service Discovery
- Automatic registration of ObjectQuel EntityManager with Canvas DI container
- Singleton pattern implementation for optimal performance
- Configuration-driven setup with sensible defaults
🛠️ Sculpt CLI Integration
- Entity generation commands integrated with Canvas Sculpt
- Database migration management
- Entity-from-table generation
- Phinx configuration automation
⚙️ Framework Integration
- Seamless Canvas framework integration
Configuration
Database Configuration
During installation, the package automatically copies config/database.php to your Canvas config directory.
Edit this file to configure your database connection.
Service Discovery
The package automatically registers ObjectQuel services with Canvas's dependency injection container through two service providers:
EntityManager Service Provider
Located in Quellabs\Canvas\ObjectQuel\Discovery\ObjectQuelServiceProvider, this provider:
- Registers the ObjectQuel EntityManager as a singleton service
- Automatically configures the EntityManager using your database configuration
- Provides dependency injection support for controllers and services
Sculpt Service Provider
Located in Quellabs\Canvas\ObjectQuel\Sculpt\ServiceProvider, this provider registers ObjectQuel CLI commands with the Sculpt framework.
Sculpt Commands
The package provides several CLI commands for entity and database management:
Generate Entity
Create a new entity class interactively:
This command will prompt you to:
- Enter the entity name
- Define properties and their types
- Set up relationships
- Generate getters and setters
Generate Entity from Database Table
Create an entity from an existing database table:
This command will:
- List available database tables
- Generate an entity class based on the selected table schema
- Include proper annotations and relationships
Generate Migrations
Create database migrations from your entity changes:
This command:
- Analyzes differences between entities and database schema
- Generates Phinx migration files
- Includes index and constraint changes
Run Migrations
Execute pending database migrations:
Additional migration options:
Generate Phinx Configuration
Create a Phinx configuration file for advanced migration management:
Quick Start
1. Install and Configure
2. Create Your First Entity
3. Create and Run Migrations
4. Use in Your Application
Configuration Reference
Default Configuration Values
The service providers include these default configuration values:
| Setting | Default Value | Description |
|---|---|---|
driver |
mysql |
Database driver |
host |
localhost |
Database host |
port |
3306 |
Database port |
encoding |
utf8mb4 |
Character encoding |
collation |
utf8mb4_unicode_ci |
Database collation |
entity_namespace |
App\\Entity |
Namespace for entity classes |
entity_path |
src/Entity |
Directory for entity classes |
proxy_namespace |
Quellabs\\ObjectQuel\\Proxy\\Runtime |
Namespace for proxy classes |
proxy_path |
var/cache/proxies |
Directory for proxy classes |
metadata_cache_path |
var/cache/metadata |
Directory for metadata cache |
migrations_path |
database/migrations |
Directory for migration files |
Usage Examples
Working with Entities
Complex Queries
Repository Pattern
Troubleshooting
Support
For support and documentation:
- Email: [email protected]
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: ObjectQuel Documentation
- Wiki: GitHub Wiki
License
This package is released under the MIT License.
All versions of canvas-objectquel with dependencies
quellabs/objectquel Version 2.*
quellabs/support Version *