Skip to content

Latest commit

 

History

History
116 lines (64 loc) · 3.92 KB

CONTRIBUTING.md

File metadata and controls

116 lines (64 loc) · 3.92 KB

First off, thanks for taking the time to contribute!

Table of contents

Getting started

The development environment requires Docker and Docker Compose to run. Please refer to the official documentation for step-by-step installation guide.

Clone the repository:

$ git clone git@github.com:sendsmaily/smaily-magento-extension.git

Next, change your working directory to the local repository:

$ cd smaily-magento-extension

And run the environment:

$ docker-compose up

During container start-up Magento and its sample data will be installed. It can take a while.

To disable sample data installation on first run, change MAGENTO_SAMPLEDATA environment variable value to 0 in docker-compose.yaml.

Internals

Structure of the repository

The repository is split into multiple parts:

  • assets - screenshots for extension's user guide;
  • src - extension files;

In addition there are system directories:

  • .github - GitHub issue and pull request templates, and GitHub Actions workflows;
  • .sandbox - files needed for running the development environment;

Development

Starting the environment

You can run the environment by executing:

$ docker-compose up

Note! Make sure you do not have any other process(es) listening on ports 8080 and 8888.

Stopping the environment

Environment can be stopped by executing:

$ docker-compose down

Resetting the environment

If you need to reset the installation in the development environment, just simply delete environment's Docker volumes. Easiest way to achieve this is by running:

$ docker-compose down -v

Set up PHP CodeSniffer in Visual Studio Code

Magento uses SquizLabs CodeSniffer to ensure every extension is up to par with Magento Coding Standards. If you are rocking Visual Studio Code as your preferred code editor, then you can look into setting up PHPCS extension to ease Magento extension development.

Publishing to Magento Marketplace

Every new release of Smaily For Magento extension published needs to pass automatic and manual testing by the Magento review team!

Testing module before submitting for review

It is a MANDATORY step before applying for the Magento review.

Start the development environment and open shell into running magento2 container:

$ docker exec -it magento2 /bin/bash

In the container test the package code:

$ vendor/bin/phpcs app/code/Smaily/SmailyForMagento --standard=Magento2 --severity=10

This needs to return no value as all severity level 10 errors will fail automatic review.

Ensure production mode compiles without errors:

$ php bin/magento deploy:mode:set production

Once everything checks out, reset your development environment:

$ rm -rf generated/metadata/* generated/code/*
$ php bin/magento deploy:mode:set default

Magento Marketplace review

  1. Go to Magento Developer Portal and log in;
  2. Navigate to Extensions section;
  3. Find Smaily Ecommerce Integration for M2;
  4. Submit a New Version for review.

Note! You can only submit a single version once, and Magento Marketplace and package version must match.