Skip to content

Commit 87f2a43

Browse files
Merge pull request magento#746 from magento/develop-backport
Backport develop branch
2 parents 07c50d7 + ba77cab commit 87f2a43

File tree

423 files changed

+18065
-7608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

423 files changed

+18065
-7608
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

.github/CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributing to Magento Cloud Tools code
2+
3+
Use the GitHub fork & pull model contribution model to submit your code contributions to the Magento Cloud Tools codebase.
4+
In this contribution model, you maintain your own [fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks) of the ECE-Tools repository, and create a [pull request](https://help.github.com/articles/about-pull-requests/) to submit your proposed changes to the base repository. For details on the fork & pull contribution model, see the [Beginners guide](https://github.com/magento/magento2/wiki/Getting-Started).
5+
6+
Contributions can take the form of new features, changes to existing features, tests, bug fixes, or optimizations. You can also contribute new or updated documentation.
7+
8+
The Magento Cloud development team and community maintainers review all issues and contributions submitted by the developer community in first in, first out order (FIFO). During the review process, reviewers might notify a contributor to request clarification on the proposed changes.
9+
10+
## Prerequisites
11+
12+
You must have a [GitHub account](https://help.github.com/en/github/getting-started-with-github/signing-up-for-a-new-github-account) with [two-factor authentication](https://help.github.com/en/github/authenticating-to-github/configuring-two-factor-authentication) enabled to contribute to Magento repositories. We also recommend creating a [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) to use when interacting with GitHub from scripts or from the command line.
13+
14+
## Contribution requirements
15+
16+
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.3/coding-standards/bk-coding-standards.html).
17+
2. When you submit a Pull request (PR), write a meaningful description to explain the purpose of your contribution. Comprehensive descriptions increase the chances that a pull request can be merged quickly, without requests for additional clarification. See the [Magento Cloud Tools Pull Request Template](https://github.com/magento/ece-tools/blob/develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
18+
3. Commits must be accompanied by meaningful commit messages.
19+
4. If your PR includes bug fixes, provide a step-by-step description of how to reproduce the bug in the pull request description.
20+
3. If your PR includes new logic or new features, you must also submit the following information along with the pull request
21+
* Unit/integration test coverage
22+
* Proposed documentation updates: Submit developer documentation contributions to the [Magento DevDocs repository](https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md). Submit updates to Magento user documentation to the [Magento Merchant documentation repository](https://github.com/magento/merchdocs/blob/master/.github/CONTRIBUTING.md).
23+
4. For larger features or changes, [open an issue](https://github.com/magento/ece-tools/issues/new) to discuss the proposed changes prior to development. Discussing the updates in advance can prevent duplicate or unnecessary effort and allow other contributors to provide input.
24+
25+
## Contribution process
26+
1. Search current [listed issues](https://github.com/magento/ece-tools/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
27+
2. Review and sign the [Contributor License Agreement (CLA)](https://opensource.adobe.com/cla.html) if this is your first time contributing. You only need to sign the CLA once.
28+
3. Create and test your work.
29+
4. Fork the ECE-Tools repository according to the [Fork A Repository instructions](https://github.com/magento/magento2/wiki/Forking-and-Branching) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://github.com/magento/magento2/wiki/Working-Issues-and-PRs#submitting-prs).
30+
5. After you submit the pull request, the Magento Cloud development team will review the contribution and collaborate with you as needed to incorporate your proposed changes.
31+
32+
## Code of Conduct
33+
34+
This project is released with a Contributor Code of Conduct. We expect you to agree to its terms when participating in this project.
35+
The full text is available in the repository [Wiki](https://github.com/magento/magento2/wiki/Magento-Code-of-Conduct).
36+
37+
## Connecting with Community!
38+
39+
Need to find a project? Check out the [Slack Channels](https://github.com/magento/magento2/wiki/Slack-Channels) (with listed project info) and the [Magento Community Portal](https://opensource.magento.com/).

.github/ISSUE_TEMPLATE.md renamed to .github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
name: Bug report
3+
about: Technical issue with the Magento ECE-Tools
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
19
<!---
210
Thank you for contributing to Magento.
311
To help us process this issue we recommend that you add the following information:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<!---
1313
Please provide a description of the changes proposed in the pull request.
1414
Letting us know what has changed and why it needed changing will help us validate this pull request.
15+
16+
If this PR was initiated by an internal JIRA ticket, copy the description from the ticket here so that the information is visible to contributors from the Magento Cloud Community.
1517
-->
1618

1719
### Fixed Issues (if relevant)
@@ -30,8 +32,19 @@
3032
1. ...
3133
2. ...
3234

35+
### Release notes
36+
37+
For user-facing changes, add a meaningful release note. For examples, see [Magento Cloud ECE-tools release notes](https://devdocs.magento.com/cloud/release-notes/ece-release-notes.html).
38+
39+
### Associated documentation updates
40+
<!--
41+
If your proposed update requires user documentation, submit a PR to the Magento DevDocs repository. For extensive updates requiring assistance, submit an issue to DevDocs. See https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md.
42+
-->
43+
Add link to Magento DevDocs PR or Issue, if needed.
44+
3345
### Contribution checklist
3446
- [ ] Pull request has a meaningful description of its purpose
47+
- [ ] Pull request introduces user-facing changes and includes meaningful updates for any required release notes and documentation changes
3548
- [ ] All commits are accompanied by meaningful commit messages
3649
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
3750
- [ ] All automated tests passed successfully (all builds on Travis CI are green)

.github/workflows/ci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
on: [pull_request]
3+
4+
jobs:
5+
static-unit:
6+
name: Acceptance Tests
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-versions: ['7.1', '7.2', '7.3']
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v1
14+
with:
15+
fetch-depth: 1
16+
- name: Prepare PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: ${{ matrix.php-versions }}
20+
extensions: sockets
21+
- name: Remove secure repositories
22+
run: |
23+
composer config --unset repositories.repo.magento.com
24+
composer remove --no-update magento/magento-cloud-components
25+
composer remove --no-update magento/magento-cloud-docker
26+
composer remove --no-update magento/magento-cloud-patches
27+
- name: Composer Update
28+
run: composer update
29+
- name: Static and Unit tests
30+
run: |
31+
./vendor/bin/phpstan analyse -c ./tests/static/phpstan.neon
32+
./vendor/bin/phpcs ./src --standard=./tests/static/phpcs-ruleset.xml -p -n
33+
./vendor/bin/phpmd ./src xml ./tests/static/phpmd-ruleset.xml
34+
./vendor/bin/phpunit --configuration ./tests/unit --coverage-clover ./tests/unit/tmp/clover.xml && php ./tests/unit/code-coverage.php ./tests/unit/tmp/clover.xml
35+
./vendor/bin/phpunit --configuration ./tests/unit
36+
- name: Integration tests
37+
run: ./vendor/bin/phpunit --configuration ./tests/integration
38+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/docker-compose.yml
88
/auth.json
99
/codeception.yml
10+
/_workdir

.travis.yml

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dist: xenial
1+
dist: bionic
22

33
addons:
44
hosts:
@@ -17,51 +17,19 @@ php:
1717
- '7.3'
1818

1919
env:
20-
matrix:
21-
- TEST_SUITE=functional-ce
22-
- TEST_SUITE=functional-ee
23-
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=1
24-
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=2
25-
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=3
26-
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=4
27-
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=5
20+
- TEST_SUITE=functional-ce
21+
- TEST_SUITE=functional-ee
22+
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=1
23+
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=2
24+
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=3
25+
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=4
26+
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=5
27+
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=6
2828

2929
stages:
30-
- static-unit
31-
- integration
3230
- test
3331

3432
jobs:
35-
include:
36-
- stage: static-unit
37-
script: ./tests/travis/static-unit.sh
38-
env:
39-
- TEST_SUITE=static-unit
40-
- XDEBUG=true
41-
- script: ./tests/travis/static-unit.sh
42-
php: '7.2'
43-
env:
44-
- TEST_SUITE=static-unit
45-
- XDEBUG=true
46-
- script: ./tests/travis/static-unit.sh
47-
php: '7.3'
48-
env:
49-
- TEST_SUITE=static-unit
50-
- XDEBUG=true
51-
- stage: integration
52-
script: ./tests/travis/integration.sh;
53-
env:
54-
- TEST_SUITE=integration
55-
- script: ./tests/travis/integration.sh;
56-
php: '7.2'
57-
env:
58-
- TEST_SUITE=integration
59-
- script: ./tests/travis/integration.sh;
60-
php: '7.3'
61-
env:
62-
- TEST_SUITE=integration
63-
64-
matrix:
6533
exclude:
6634
- php: '7.1'
6735
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=1
@@ -73,6 +41,8 @@ matrix:
7341
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=4
7442
- php: '7.1'
7543
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=5
44+
- php: '7.1'
45+
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=6
7646

7747
- php: '7.2'
7848
env: TEST_SUITE=functional-ee
@@ -89,10 +59,7 @@ install:
8959
- composer update -n --no-suggest
9060

9161
before_script:
92-
- if [ $TEST_SUITE == "functional-ce" ]; then echo "COMPOSER_MAGENTO_USERNAME=${REPO_USERNAME_CE}" >> ./.docker/composer.env && echo "COMPOSER_MAGENTO_PASSWORD=${REPO_PASSWORD_CE}" >> ./.docker/composer.env; fi;
93-
- if [ $TEST_SUITE == "functional-ee" ]; then echo "COMPOSER_MAGENTO_USERNAME=${REPO_USERNAME}" >> ./.docker/composer.env && echo "COMPOSER_MAGENTO_PASSWORD=${REPO_PASSWORD}" >> ./.docker/composer.env; fi;
94-
- echo "COMPOSER_GITHUB_TOKEN=${GITHUB_TOKEN}" >> ./.docker/composer.env
95-
- if [ $XDEBUG == "true" ]; then echo "PHP_ENABLE_XDEBUG=true" >> ./.docker/global.env; fi;
62+
- if [ $TEST_SUITE == "functional-ce" ]; then cp codeception.dist.yml codeception.yml && sed -i "s/REPO_USERNAME/REPO_USERNAME_CE/" codeception.yml && sed -i "s/REPO_PASSWORD/REPO_PASSWORD_CE/" codeception.yml; fi;
9663

9764
script:
9865
- if [ $TEST_SUITE == "functional-ce" ]; then ./tests/travis/functional_ce.sh; fi;

codeception.dist.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@ paths:
22
tests: src/Test/Functional
33
output: tests/functional/_output
44
data: tests/functional/_data
5-
support: tests/functional/_support
6-
envs: tests/functional/_envs
5+
support: vendor/magento/magento-cloud-docker/tests/functional/_support
76
actor_suffix: Tester
87
settings:
98
colors: true
109
extensions:
1110
enabled:
1211
- Codeception\Extension\RunFailed
12+
- Codeception\Extension\FailedInfo
1313
params:
14-
- tests/functional/configuration.dist.yml
14+
- vendor/magento/magento-cloud-docker/tests/functional/configuration.dist.yml
15+
- env
1516
modules:
1617
config:
17-
Magento\MagentoCloud\Test\Functional\Codeception\Docker:
18-
db_host: "%Magento.docker.settings.db.host%"
19-
db_port: "%Magento.docker.settings.db.port%"
20-
db_username: "%Magento.docker.settings.db.username%"
21-
db_password: "%Magento.docker.settings.db.password%"
22-
db_path: "%Magento.docker.settings.db.path%"
23-
repo_url: "%Magento.docker.settings.repo.url%"
24-
repo_branch: "%Magento.docker.settings.repo.branch%"
25-
system_ece_tools_dir: "%Magento.docker.settings.system.ece_dir%"
18+
Magento\CloudDocker\Test\Functional\Codeception\TestInfrastructure:
19+
template_repo: "https://github.com/magento/magento-cloud.git"
20+
mcd_repo: "https://github.com/magento/magento-cloud-docker.git"
21+
mcc_repo: "https://github.com/magento/magento-cloud-components.git"
22+
mcp_repo: "https://github.com/magento/magento-cloud-patches.git"
23+
composer_magento_username: "%REPO_USERNAME%"
24+
composer_magento_password: "%REPO_PASSWORD%"
25+
composer_github_token: "%GITHUB_TOKEN%"
26+
printOutput: false
27+
Magento\CloudDocker\Test\Functional\Codeception\Docker:
2628
system_magento_dir: "%Magento.docker.settings.system.magento_dir%"
27-
env_base_url: "%Magento.docker.settings.env.url.base%"
28-
env_secure_base_url: "%Magento.docker.settings.env.url.secure_base%"
29-
volumes: []
3029
printOutput: false
3130
PhpBrowser:
3231
url: "%Magento.docker.settings.env.url.base%"
33-
Magento\MagentoCloud\Test\Functional\Codeception\MagentoDb:
34-
dsn: "mysql:host=127.0.0.1;port=3306;dbname=%Magento.docker.settings.db.path%"
32+
Magento\CloudDocker\Test\Functional\Codeception\MagentoDb:
33+
dsn: "mysql:host=%Magento.docker.settings.db.host%;port=%Magento.docker.settings.db.port%;dbname=%Magento.docker.settings.db.path%"
3534
user: "%Magento.docker.settings.db.username%"
3635
password: "%Magento.docker.settings.db.password%"
36+
exposed_port: "%Magento.docker.settings.db.port%"
3737
reconnect: true

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"ext-PDO": "*",
1616
"ext-json": "*",
1717
"ext-sockets": "*",
18+
"colinmollenhour/credis": "^1.6.0",
1819
"composer/composer": "^1.4",
1920
"composer/semver": "^1.4",
2021
"graylog2/gelf-php": "^1.4.2",
@@ -31,7 +32,7 @@
3132
"symfony/console": "^2.8||^4.0",
3233
"symfony/dependency-injection": "^3.3||^4.3",
3334
"symfony/process": "^2.1||^4.1",
34-
"symfony/serializer": "^2.8||^3.3",
35+
"symfony/serializer": "^2.8||^3.3||^4.0",
3536
"symfony/yaml": "^3.3||^4.0"
3637
},
3738
"require-dev": {
@@ -72,13 +73,15 @@
7273
"@test:phpstan",
7374
"@test:phpcs",
7475
"@test:phpmd",
75-
"@test:phpunit",
76+
"@test:unit",
77+
"@test:integration",
7678
"@test:coverage"
7779
],
7880
"test:phpstan": "phpstan analyse -c tests/static/phpstan.neon",
7981
"test:phpcs": "phpcs src --standard=tests/static/phpcs-ruleset.xml -p -n",
8082
"test:phpmd": "phpmd src xml tests/static/phpmd-ruleset.xml",
81-
"test:phpunit": "phpunit --configuration tests/unit",
83+
"test:unit": "phpunit --configuration tests/unit",
84+
"test:integration": "phpunit --configuration tests/integration",
8285
"test:coverage": "phpunit --configuration tests/unit --coverage-clover tests/unit/tmp/clover.xml && php tests/unit/code-coverage.php tests/unit/tmp/clover.xml",
8386
"test:coverage-generate": "phpunit --configuration tests/unit --coverage-html tests/unit/tmp/coverage",
8487
"pre-autoload-dump": [

0 commit comments

Comments
 (0)