Coder Social home page Coder Social logo

Comments (4)

My6UoT9 avatar My6UoT9 commented on June 12, 2024

I believe this is related to this piece of code:

    /**
     * Sets the dummy migration file instead the real one to extract the migration structure instead of applying them.
     * It uses Yii's class map autoloaders hack.
     * @throws InvalidArgumentException
     */
    private function setDummyMigrationClass(): void
    {
        Yii::$classMap['yii\db\Migration'] = Yii::getAlias('@bizley/migration/dummy/Migration.php');
    }

As I do not use the yii autoloader. Lets see how todo that with composer.

edit: Tested with original yii autoloader, and that works.
@bizley if you would happen to know, of a way todo this without yii autoloader that would be nice.

from yii2-migration.

bizley avatar bizley commented on June 12, 2024

Hmm, this might be tricky without Yii autoloader. I definitely need to replace the original class with mine. I'll try to find the answer, if you have any please let me know.

from yii2-migration.

bizley avatar bizley commented on June 12, 2024

@My6UoT9 could you check if provided PR fixes it in your case? What I'm doing here is forcing the registration of Yii autoloader inside the extractor. AFAIK double registration of the same function is skipped so it should be safe.

from yii2-migration.

My6UoT9 avatar My6UoT9 commented on June 12, 2024

@My6UoT9 could you check if provided PR fixes it in your case? What I'm doing here is forcing the registration of Yii autoloader inside the extractor. AFAIK double registration of the same function is skipped so it should be safe.

Yes it works, it also works when the autoloader from yii was already registred.
Thanks for fixing!

from yii2-migration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.