Skip to content

setService on DependencyFactory #41

@haltuf

Description

@haltuf

For a rather unusual use case, I wanted to create my own comparator. So basically in index / bootstrap something like:

$service = $container->getByType(\Doctrine\Migrations\DependencyFactory::class);
$service->setService(\Doctrine\Migrations\Version\Comparator::class, new TimestampVersionComparator());

(the use case was: multiple namespaces of migrations; wanted the migration to run in the order derived from name of class, not from fully-qualified name including namespace...)
e.g.

App\Migrations\Version20250414163315.php
App\CoreMigrations\Version20250414163728.php

instead of default behaviour of this package:

App\CoreMigrations\Version20250414163728.php
App\Migrations\Version20250414163315.php

Is there a way to set this via .neon config?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions