Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

Componenta Cycle App

Application integration for componenta/cycle. This package connects Cycle runtime services to framework discovery, compiled configuration, and console commands.

Use it in a Componenta application that wants framework-managed Cycle discovery. Libraries should depend on componenta/cycle only.

Installation

composer require componenta/cycle-app

Register its provider after the Cycle runtime provider:

return [
newComponenta\Cycle\ConfigProvider(),
newComponenta\Cycle\App\ConfigProvider(),
];

Related Packages

PackageWhy it matters here
componenta/cycleOwns repositories, data fetchers, filters, typecasts, and runtime factories.
componenta/class-finderFinds entities and embeddables in configured directories.
componenta/appRuns cache compilation and chooses development or production loading.
cycle/ormConsumes the final ORM configuration.

What It Adds

The package provides app-level integration for:

  • entity and embeddable discovery
  • locator services backed by the configured class iterator
  • ClassFinderConfigKey::LISTENERS entries for EntityLocator and EmbeddingLocator
  • Cycle-related console commands registered through Componenta\App\Console\ConfigKey::COMMANDS
  • cache/compiler integration used by the application build process

Console Commands

When componenta/app-console is installed, this package contributes the database commands below to the shared console command graph. They are registered through configuration, so they are available in production builds without relying on attribute scanning.

CommandPurpose
db:createCreate the configured database when the driver supports it.
db:generateGenerate migrations from the current ORM schema diff.
db:schemaGenerate and cache the Cycle ORM schema.
db:migrateExecute pending migrations.
db:rollbackRoll back migrations.
db:statusShow migration status.
db:syncGenerate and apply migrations, then regenerate ORM schema.
php bin/console.php db:status
php bin/console.php db:migrate
php bin/console.php db:sync

Development Mode

In development, the application may scan configured source directories and derive Cycle mappings from discovered classes. This keeps module configuration focused on the classes it owns.

Production Mode

In production, the application should use compiled config and generated cache artifacts. It should not scan source directories or rebuild ORM metadata during each request.

Boundaries

This package should not contain persistence behavior that a runtime consumer needs directly. Repositories, data fetchers, filters, typecasts, and runtime factories belong to componenta/cycle.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages