First off, thanks for taking the time to contribute!
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 [email protected]: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
.
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;
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.
Environment can be stopped by executing:
$ docker-compose down
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
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.
Every new release of Smaily For Magento extension published needs to pass automatic and manual testing by the Magento review team!
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
- Go to Magento Developer Portal and log in;
- Navigate to Extensions section;
- Find
Smaily Ecommerce Integration
forM2
; - Submit a New Version for review.
Note! You can only submit a single version once, and Magento Marketplace and package version must match.