Close [x]

Contribute to Magento 2

Edit this page on GitHub

The following topics are included in the Guide:

Contribute to Magento 2 code

Use the fork & pull model to contribute to the Magento 2 codebase. This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to pull a set of changes (hence the phrase pull request).

Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions.

The Magento 2 development team reviews all issues and contributions submitted by the community of developers in a first-in, first-out basis. During the review we might require clarifications from the contributor. If there is no response from the contributor for two weeks, the issue is closed.

Often when the Magento 2 team works on reviewing the suggested changes, we will add a label to the issue to indicate to our internal team certain information, like status or who is working the issue. If you’re ever curious what the different labels mean, see the table below for an explanation of each one.

Please refer to Magento Contributor Agreement for detailed information about the License Agreement. All contributors are required to submit a click-through form to agree to the terms.

Contribution requirements

  1. Contributions must adhere to Magento coding standards.
  2. Refer to the Magento development team’s Definition of Done. We use these guidelines internally to ensure that we deliver well-tested, well-documented, solid code, and we encourage you to as well!
  3. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances that a pull request is merged quickly and without additional clarification requests.
  4. Commits must be accompanied by meaningful commit messages.
  5. PRs that include bug fixing must be accompanied by a step-by-step description of how to reproduce the bug.
  6. PRs that include new logic or new features must be submitted along with:
    • Unit/integration test coverage (we will be releasing more information on writing test coverage in the near future).
    • Proposed documentation update. Documentation contributions can be submitted here.
  7. For large features or changes, please open an issue and discuss first. This may prevent duplicate or unnecessary effort, and it may gain you some additional contributors.
  8. To report a bug, please open an issue, and follow these guidelines about bugfix issues.

  9. All automated tests must pass successfully (all builds on Travis CI must be green).

Fork a repository

To fork a repository on Github, do the following:

  1. Create or log in to your free account on GitHub.
  2. Navigate to the Magento 2 repository.
  3. Click Fork at the top right:
    fork a repository

  4. Clone the repo into your development environment, get the app installed, and start playing.

Create a pull request

First, check the existing PRs and make sure you are not duplicating others’ work!

To create a pull request do the following:

  1. Create a feature branch for your changes and push those changes to the copy of your repository on GitHub. This is the best way to organize and even update your PR.
  2. In your repository, click Pull requests on the right, and then click New pull request:
  3. Ensure that you are creating a PR to the magento:develop branch. We accept PRs to this branch only.
  4. Review the changes, then click Create pull request. Fill out the form, and click Create pull request again to submit the PR—that’s it!

After submitting your PR, you can head over to the Magento 2 repository’s Pull Requests panel to see your PR along with the others. Your PR undergoes automated testing, and if it passes, the core team considers it for inclusion in the Magento 2 core. If some tests fail, please make the corresponding corrections in your code.

Report an issue

If you find a bug in Magento 2 code, you can report it by creating an issue in the Magento 2 repository.

Note: Before creating an issue, please do the following:

  1. Check the documentation to make sure the behavior you are reporting is really a bug, not a feature.
  2. Check the existing issues to make sure you are not duplicating somebody’s work.

To add an issue:

  1. In the Magento 2 public repository, click the Issues link on the right.
    the Issues link at the right
  2. Click New issue.
    the New Issue button
  3. Fill in the Title and issue description.
  4. Click Submit new issue.

Labels applied by the Magento team

Refer to the following table for a description of each label. These labels are applied by the Magento development team to community contributed issues and pull requests, to communicate status, impact, or which team is working on it.

Label image Description
Issue Type
the Bug button An error, flaw, or failure in an existing feature that produces unexpected results.
the Feature Request button A community request to introduce a new feature in Magento.
the Improvement button A request to enhance existing functionality.
the Question button An inquiry about existing functionality.
Domains Impacted
the MX button Affects Merchant Experience.
the CS button Affects Commerce Services.
the PS button Affects Platform Services.
the Doc button Affects Documentation domain.
the PROD button Affects the Product team (mostly feature requests or business logic change).
the Tech button Affects Architect Group (mostly to make decisions around technology changes).
Pull Request Resolution Status
the Accept button The pull request has been accepted and will be merged into mainline code.
the Reject button The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution.
Issue Resolution Status
the Acknowledged button The Magento Team has validated the issue and an internal ticket has been created.
the In progress button The internal ticket is currently in progress, fix is scheduled to be delivered.
the Needs update button The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request.