Download the PHP package wakebit/cycle-bridge without Composer

On this page you can find all versions of the php package wakebit/cycle-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cycle-bridge

Cycle ORM bridge

This package provides a set of Symfony commands, classes for integration Cycle ORM with any framework. We are supporting integration both versions of the ORM. If you want to integrate this to Laravel we already have a separated package which uses this bridge.

Requirements

Installation

  1. Install the package via composer:

Example of usage with PHP-DI

  1. Declare config config/config.php and fill database credentials:

  2. Declare ORM config config/cycle.php. Dont forget to set up correct paths to entities path, migrations path:

  3. Declare dependencies for PHP-DI container config/container.php:

  4. Now, you need to load a dependencies array created in the step above to PHP-DI. After you are free to use dependencies, write your code.

Let's look at quick example. Define entity:

You can take DBAL, ORM and EntityManager from the container. Quick example of usage:

See more on the official Cycle ORM documentation.

Console commands

Working with ORM schema

Command Description Options Symfony command class FQN
cycle:schema:migrate Generate ORM schema migrations - --run: Automatically run generated migration.
- -v: Verbose output.
\Wakebit\CycleBridge\Console\Command\Schema\MigrateCommand::class
cycle:schema:cache Compile and cache ORM schema \Wakebit\CycleBridge\Console\Command\Schema\CacheCommand::class
cycle:schema:clear Clear cached schema (schema will be generated every request now) \Wakebit\CycleBridge\Console\Command\Schema\ClearCommand::class
cycle:schema:sync Sync ORM schema with database without intermediate migration (risk operation!) \Wakebit\CycleBridge\Console\Command\Schema\SyncCommand::class
cycle:schema:render Render available CycleORM schemas. - --no-color: Display output without colors. \Wakebit\CycleBridge\Console\Command\Schema\RenderCommand::class

Database migrations

Command Description Options Symfony command class FQN
cycle:migrate:init Initialize migrator: create a table for migrations \Wakebit\CycleBridge\Console\Command\Migrate\InitCommand::class
cycle:migrate Run all outstanding migrations - --one: Execute only one (first) migration.
- --force: Force the operation to run when in production.
\Wakebit\CycleBridge\Console\Command\Migrate\MigrateCommand::class
cycle:migrate:rollback Rollback the last migration - --all: Rollback all executed migrations.
- --force: Force the operation to run when in production.
\Wakebit\CycleBridge\Console\Command\Migrate\RollbackCommand::class
cycle:migrate:replay Replay (down, up) one or multiple migrations. - --all: Replay all migrations. \Wakebit\CycleBridge\Console\Command\Migrate\ReplayCommand::class
cycle:migrate:status Get a list of available migrations \Wakebit\CycleBridge\Console\Command\Migrate\StatusCommand::class

Database commands

Command Description Options Symfony command class FQN
cycle:db:list Get list of available databases, their tables and records count - --database: Database name \Wakebit\CycleBridge\Console\Command\Database\ListCommand::class
cycle:db:table <table> Describe table schema of specific database - --database: Database name \Wakebit\CycleBridge\Console\Command\Database\TableCommand::class

Writing functional tests

If you are using memory database (SQLite) you can just run migrations in the setUp method of the your test calling the console command cycle:migrate. For another databases follow this instruction and drop all tables in the tearDown method.

Advanced

Manually defined ORM schema

If you want to use a manually defined ORM schema you can define it in the cycle.php orm.schema.map config key:

Manually defined schema should be presented as array. It will be passed to \Cycle\ORM\Schema constructor. See more here.

Custom schema compilation pipeline

You can redefine the ORM schema compilation generators in the cycle.php orm.schema.generators config key:

Classes will be resolved by DI container. Default pipeline you can see here.

Default collection factory

You can specify predefined or your own collection factory in container definition:

Credits


All versions of cycle-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2
cycle/annotated Version ^3.0
cycle/database Version ^2.0
cycle/migrations Version ^3.0
cycle/orm Version ^2.0
cycle/schema-builder Version ^2.0
cycle/schema-migrations-generator Version ^2.0
cycle/schema-renderer Version ^1.1
psr/container Version ^1.0|^2.0
psr/simple-cache Version ^1.0|^2.0|^3.0
spiral/core Version ^2.9
symfony/console Version ^5.1|^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wakebit/cycle-bridge contains the following files

Loading the files please wait ....