Download the PHP package sirix/cycle-orm-factory without Composer
On this page you can find all versions of the php package sirix/cycle-orm-factory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cycle-orm-factory
Mezzio Cycle ORM Factory
This package provides factories for integrating Cycle ORM into the Mezzio framework, providing seamless setup and configuration.
Installation
Configuration
Create a configuration file, for example, config/autoload/cycle-orm.global.php
:
Migrator Configuration
directory
: Specifies the directory where the migration files will be stored.table
: Specifies the name of the table used to store migration information.
Entities Configuration
- Specifies the directory in which your entity classes are located.
Schema Configuration
property
: Configures the schema property, options includenull
,SchemaProperty::SyncTables
, orSchemaProperty::GenerateMigrations
.cache
: Enables or disables caching of the generated schema.directory
: Specifies the directory in which to store the cached schema.
Schema Property Options
SchemaProperty::SyncTables
The SyncTables option synchronizes the database tables based on the provided entity classes. It ensures that the tables match the structure defined in the entity classes. This can be useful during development when the database schema evolves along with your application.
SchemaProperty::GenerateMigrations
The GenerateMigrations option is used to automatically generate migration files based on changes detected in your entity classes. When enabled, the ORM analyzes the differences between the current database schema and the defined entities. It then generates migration files to apply these changes, making it easier to version and manage your database schema changes.
Select the appropriate SchemaProperty option based on the requirements of your project. Customize the configuration to your needs and enjoy the seamless integration of Cycle ORM with Mezzio.
Use in your project
These factories provide the necessary components to work seamlessly with Cycle ORM within the Mezzio Framework. Customize the configuration to meet the needs of your project.
For more information about Cycle ORM, see the Cycle ORM documentation.
Migrator Commands
The Sirix\Cycle\Command\Migrator
namespace provides two commands for managing database migrations using Cycle ORM. These commands are intended for use with the laminas-cli
tool.
1. migrator:migrate
Command
Description
The migrator:migrate
command performs the necessary database migration steps, applying changes specified in migration files to synchronize your database schema.
Usage
Options
This command has no additional options.
2. migrator:rollback
Command
Description
The migrator:rollback
command undoes the changes made by the last migration, reverting your database schema to its previous state.
Usage
Options
This command does not have any additional options.
Note: Make sure that you have correctly configured the database connection and migrations settings in your project's configuration file.
For more information about using migrations with Cycle ORM, see the Cycle ORM Documentation.
All versions of cycle-orm-factory with dependencies
composer/package-versions-deprecated Version ^1.10.99
cycle/annotated Version ^3.3
cycle/database Version ^2.5
cycle/entity-behavior Version ^1.2
cycle/entity-behavior-uuid Version ^1.1
cycle/migrations Version ^4.1
cycle/orm Version ^2.3
cycle/schema-migrations-generator Version ^2.1
symfony/cache Version ^5.4 || ^6.3 || ^7.0
symfony/console Version ^6.3 || ^7.0