techdivision/import-cli-magento

Magento CLI extension that provides single-threaded Magento 2 importing functionality based on M2IF

dev-master 2017-06-16 17:05 UTC

This package is auto-updated.

Last update: 2024-11-27 07:51:28 UTC


README

Latest Stable Version Total Downloads License Build Status Scrutinizer Code Quality Code Coverage

Development

To make the development process as easy as possible, we've added some basic Robo commands.

General Configuration

Robo supports a configuration file robo.yml, that has to be located in the root directory of the extension. By default, the file contains the following default configurations, that probably have to be customized to your needs

dirs:
    deploy: /opt/appserver/webapps/magento2-ce-2.1.7

docker:
    target-container: appserver-1.1.4-magento
    dirs:
        deploy: /opt/appserver/webapps/magento2-ce-2.1.7
        src:    /root/Workspace/import-cli-magento/src
        dest:   webapps/magento2-ce-2.1.7

Sync Sources

To synchronize your local sources with the Magento 2 instance inside the Docker container, simply execute

$ vendor/bin/robo docker:sync

Execute Magento Commands

Another command allows you to invoke the magento script inside the Magento root directory of the docker container. Simply pass the Magento command, prefixed with a --, e. g.

$ vendor/bin/robo docker:magento -- setup:upgrade

Execute Composer Commands

Same works for composer. Simply pass the command and the arguments/options, prefixed with a -- e. g.

$ vendor/bin/robo docker:composer -- update --no-dev

Installation

The general development process is optimized to work with Docker. Therefore we'll assume a running Docker container with a working Magento 2 instance inside. If not available or you're not sure how to setup one, have a look at the appserver.io tutorial.

Option 1 - Using the Robo command

$ vendor/bin/robo docker:composer require techdivision/import-cli-magento:dev-master

This is the preferred option.

Option 2 - Direct Installation from inside the container

Open a shell in your Docker container

$ docker exec -ti appserver-1.1.4-magento bash

Then use your favorite editor, e. g. vim, to open the composer.json of your Magento 2 installation and add the extension to the required dependencies like

{
    ...
    "require": {
        ...
        "techdivision/import-cli-magento": "dev-master"
    }
    ...
}

and finish the installation by updating composer on the commandline with

$ composer update

The extension should now be installed ready for development.