Skip to content

Console commands causes fresh CLI installation to break #32

@kanduvisla

Description

@kanduvisla

The console command uses dependencies that bubble back to the store manager. This causes a fresh install on the CLI to break at step 4, showing the error that the table core_website does not exist.

The cause for this is the fact that Magento initializes all constructors of all console commands on any given bin/magento-command. So if any dependency of a dependency of a dependency of a dependency of a dependency of a dependency of a dependency expects certain database values to exist, this will break the installation (since the database is empty at that point).

The fix for this is to add proxies on the dependencies of your CLI command so that these dependencies of dependencies don't get loaded.

I'll send a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions