New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

pushinbr/arcano

Arcano: a fast data mapper ORM for PHP and the PAM runtime, with attribute entities, schema builder and migrations. Derived from Cycle ORM.
1,198 1

Larablocks Analysis

pushinbr/arcano works with any PHP project: the latest release (v0.2.10, Nov 24, 2026) doesn't depend on Laravel.

Recommendation checks

Use with care

Use with care: meets 1 of 4 checks.

  • Released in the last 12 months (Nov 24, 2026)
  • First released under 90 days ago
  • 1,198 downloads a month (needs 10,000)
  • 1 GitHub star (needs 100)

State

Too new to judge
  • Last stable release: Nov 24, 2026.
  • 12 releases in the last 12 months.
  • First released: Nov 12, 2026.
  • Monthly downloads: 1,198.
  • 7 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require pushinbr/arcano
Latest Version:v0.2.10
PHP:>=8.4
License:MIT
Last Updated:Dec 2, 2026
Links: GitHub  ·  Packagist
Maintainer: DavidWilliamBalbino

Arcano

Data mapper ORM for PHP 8.4+, derived from Cycle ORM 2.18.1 and Cycle Database 2.23.3. The API stays Cycle-compatible under the Arcano\ORM and Arcano\Database namespaces; the hot paths (hydration, heap, eager loading, unit of work) were rewritten.

composer require pushinbr/arcano

Drivers: SQLite, MySQL, PostgreSQL and SQL Server. Includes the schema builder, attribute entities and migrations (forks of the matching Cycle packages).

Overhead

ORM time minus raw PDO time, SQLite in memory, PHP 8.5 with JIT (benchmarks/compare.sh). Ratio = other ORM overhead / Arcano overhead.

  • vs Cycle ORM: insert 6.8x, select_all 9.5x, find_pk 7.2x, eager 5.7x, update 6.3x, small_queries 6.1x.
  • vs Eloquent 12: insert 6.4x, select_all 2.4x, find_pk 15x, eager 4.5x, update 8.9x, small_queries 7.7x.

Arcano keeps an identity map and a change snapshot per entity; Eloquent keeps neither, which bounds the select_all gap. Details in docs/performance-plan.md.

Usage

use Arcano\Annotated\Annotation\{Column, Entity};
use Arcano\Annotated\Annotation\Relation\HasMany;

#[Entity(role: 'author')]
class Author
{
    #[Column(type: 'primary')]
    public ?int $id = null;

    #[Column(type: 'string(120)')]
    public string $name = '';

    /** @var list<Post> */
    #[HasMany(target: Post::class, collection: 'array')]
    public array $posts = [];
}

Compile the schema once (cache the array in production) and build the ORM:

use Arcano\Annotated\{Entities, MergeColumns, MergeIndexes, TableInheritance, Embeddings};
use Arcano\Annotated\Locator\{TokenizerEmbeddingLocator, TokenizerEntityLocator};
use Arcano\Database\Config\DatabaseConfig;
use Arcano\Database\DatabaseManager;
use Arcano\ORM\{EntityManager, Factory, ORM, Schema};
use Arcano\Schema\{Compiler, Registry};
use Arcano\Schema\Generator as G;
use Spiral\Tokenizer\{Config\TokenizerConfig, Tokenizer};

$dbal = new DatabaseManager(new DatabaseConfig([...]));
$classes = (new Tokenizer(new TokenizerConfig(['directories' => ['src/Entities']])))->classLocator();

$schema = (new Compiler())->compile(new Registry($dbal), [
    new G\ResetTables(),
    new Embeddings(new TokenizerEmbeddingLocator($classes)),
    new Entities(new TokenizerEntityLocator($classes)),
    new TableInheritance(),
    new MergeColumns(),
    new G\GenerateRelations(),
    new G\GenerateModifiers(),
    new G\ValidateEntities(),
    new G\RenderTables(),
    new G\RenderRelations(),
    new G\RenderModifiers(),
    new G\ForeignKeys(),
    new MergeIndexes(),
    new G\GenerateTypecast(),
]);

$orm = new ORM(new Factory($dbal), new Schema($schema));

$author = $orm->getRepository(Author::class)->select()->load('posts')->wherePK(1)->fetchOne();
(new EntityManager($orm))->persist($author)->run();

Migrations: Arcano\Migrations\Migrator runs the files of a directory, and Arcano\Schema\Generator\Migrations\GenerateMigrations (added to the generators above) writes a migration with the difference between the entities and the database. In PAM HTTP, ArcanoServiceProvider, ArcanoSchemaCompiler and ArcanoMigrationManager wire all of this.

Schemas, relations, mappers, typecasting, attributes and migrations follow the Cycle documentation (ORM, attributes, migrations) with the Arcano\ namespaces.

Untrusted input

  • Values always go to the database as bound parameters (where, limit, offset, IN lists).
  • where operators must be one of the known SQL operators; anything else needs an Expression.
  • orderBy() and groupBy() accept a plain string only when it is a column name, table.column, @.column or a JSON path (data->key). A function call or any other SQL must be passed as a Fragment, so a sort key read from the query string cannot inject SQL. Still map user input to an allowlist of columns: an unknown column is a database error.
  • Column names given to where(), columns() and joins are trusted input and may contain expressions. Never pass user input there.
  • limit() and offset() refuse negative numbers. An empty IN list compiles to 1=0 (NOT IN: 1=1).
  • In a long-lived worker (PAM, RoadRunner, Swoole), call $dbal->rollbackOpenTransactions() and $orm->getHeap()->clean() at the end of every request.

Tests

vendor/bin/phpunit --testsuite <unit|sqlite|mysql|postgres|sqlserver>. The server suites expect MySQL on 13306, PostgreSQL on 15432 and SQL Server on 11433 (see tests/bootstrap-*.php and .github/workflows/tests.yml).

License

MIT. See LICENSE and NOTICE.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP License
v0.2.10 >=8.4 MIT
v0.2.9 >=8.4 MIT
v0.2.8 >=8.4 MIT
v0.2.7 >=8.4 MIT
v0.2.6 >=8.4 MIT