Jumoo / uSyncMigrations

Rough and ready migration code.
Mozilla Public License 2.0
44 stars 57 forks source link

refactor: Remove archetype stuff from core classes #227

Closed michaelchart closed 11 months ago

michaelchart commented 11 months ago

I picked up on your cough hints cough 😄 @KevinJump

BREAKING CHANGE: IArchetypeMigrationConfigurer removed from MigrationOptions and ContentTypeMigrationContext.

Instead IArchetypeMigrationConfigurer must be registered on the DI container.

This should help facilitate moving migrators to separate project as discussed in #218

Previously an IArchetypeMigrationConfigurer would have been specified like this:

public class SomeMigrationPlan : ISyncMigrationPlan
{
    ...some stuff

    public MigrationOptions Options => new()
    {
            ArchetypeMigrationConfigurer = nameof(SomeArchetypeMigrationConfigurer),
    };
}

Instead now it must be specified like this:

[ComposeBefore(typeof(ArchetypeComposer))]
public class ArchetypeMigrationComposer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
    {
        builder.Services.AddSingleton<IArchetypeMigrationConfigurer, SomeArchetypeMigrationConfigurer>();
    }
}
KevinJump commented 11 months ago

I wasn't having a go, 😉

This is great - it does mean moving it to a nicer project structure should be a lot easier, when/if i get time to sit down and do it.

umbrabot commented 9 months ago

Hi there @michaelchart!

First of all: A big #H5YR for making an Umbraco related contribution during Hacktoberfest! We are very thankful for the huge amount of PRs submitted, and all the amazing work you've been doing 🥇

Due to the amazing work you and others in the community have been doing, we've had a bit of a hard time keeping up. 😅 While all of the PRs for Hacktoberfest might not have been merged yet, you still qualify for receiving some Umbraco swag, congratulations! 🎉

In the spirit of Hacktoberfest we've prepared some exclusive Umbraco swag for all our contributors - including you!

As an alternative choice this year, you can opt-out of receiving anything and ask us to help improve the planet instead by planting a tree on your behalf. 🌳

Receive your swag or plant a tree! 👈 Please follow this link to fill out and submit the form, before December 15th, 2022, 23:59:00 UTC.

Following this date we'll be sending out all the swag, but please note that it might not reach your doorstep for a few months, so please bear with us and be patient 🙏

📢 We have just published a summary of all the activity throughout this year's Umbraco Hacktoberfest.

The only thing left to say is thank you so much for participating in Hacktoberfest! We really appreciate the help!

Kind regards, The various Umbraco teams.

nul800sebastiaan commented 9 months ago

Good day @michaelchart! Just writing to let you know you have 1 more week to decide if you want a Hacktoberfest t-shirt! The reward form, featuring the shirt design: https://feedback.umbraco.com/umbraco-hacktoberfest-2023-rewards/

If you don't want anything we'll plant trees instead but I would love for it to be an explicit choice, just choose your username and "No thanks, plant a tree for me please! 🌳" and then you're done! 🙂