Skip to content

Commit 055de4d

Browse files
Merge pull request #29 from magento/develop-fwd
Merge develop into 1.0
2 parents 9c31eac + 91446e6 commit 055de4d

32 files changed

+752
-15
lines changed

.github/CODE_OF_CONDUCT.md

+46
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

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributing to Magento Cloud Components code
2+
3+
Use the GitHub fork & pull model contribution model to submit your code contributions to the Magento Cloud Components 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 Magento Cloud Components 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 using scripts and 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 Components Pull Request Template](https://github.com/magento/magento-cloud-components/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/magento-cloud-components/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/magento-cloud-components/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 Magento Cloud Components 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/bug_report.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Bug report
3+
about: Technical issue with the Magento Cloud Components
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
<!---
10+
Thank you for contributing to Magento.
11+
To help us process this issue we recommend that you add the following information:
12+
- Summary of the issue,
13+
- Information on your environment,
14+
- Steps to reproduce,
15+
- Expected and actual results,
16+
17+
Please also have a look at our guidelines article before adding a new issue https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
18+
-->
19+
20+
### Preconditions
21+
<!---
22+
Please provide as detailed information about your environment as possible.
23+
For example Magento version, tag, HEAD, PHP & MySQL version, etc..
24+
-->
25+
1.
26+
2.
27+
28+
### Steps to reproduce
29+
<!---
30+
It is important to provide a set of clear steps to reproduce this bug.
31+
If relevant please include code samples
32+
-->
33+
1.
34+
2.
35+
3.
36+
37+
### Expected result
38+
<!--- Tell us what should happen -->
39+
1. [Screenshots, logs or description]
40+
41+
### Actual result
42+
<!--- Tell us what happens instead -->
43+
1. [Screenshots, logs or description]
+19
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

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!---
2+
Thank you for contributing to Magento.
3+
To help us process this pull request we recommend that you add the following information:
4+
- Summary of the pull request,
5+
- Issue(s) related to the changes made,
6+
- Manual testing scenarios,
7+
-->
8+
9+
<!--- Please provide a general summary of the Pull Request in the Title above -->
10+
11+
### Description
12+
<!---
13+
Please provide a description of the changes proposed in the pull request.
14+
Letting us know what has changed and why it needed changing will help us validate this pull request.
15+
-->
16+
17+
### Fixed Issues (if relevant)
18+
<!---
19+
If relevant, please provide a list of fixed issues in the format magento/magento-cloud-components#<issue_number>.
20+
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
21+
-->
22+
1. magento/magento-cloud-components#<issue_number>: Issue title
23+
2. ...
24+
25+
### Manual testing scenarios
26+
<!---
27+
Please provide a set of unambiguous steps to test the proposed code change.
28+
Giving us manual testing scenarios will help with the processing and validation process.
29+
-->
30+
1. ...
31+
2. ...
32+
33+
### Release notes
34+
35+
For user-facing changes, add a meaningful release note. For examples, see [Magento Cloud Components release notes](https://devdocs.magento.com/cloud/release-notes/mcc-release-notes.html).
36+
37+
### Associated documentation updates
38+
<!--
39+
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.
40+
-->
41+
Add link to Magento DevDocs PR or Issue, if needed.
42+
43+
### Contribution checklist
44+
- [ ] Pull request has a meaningful description of its purpose
45+
- [ ] Pull request introduces user-facing changes and includes meaningful updates for any required release notes and documentation changes
46+
- [ ] All commits are accompanied by meaningful commit messages

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.idea
2+
/_workdir
23
/composer.lock
34
/vendor
45
/auth.json

.travis.yml

+32-4
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,53 @@
1-
dist: trusty
1+
dist: xenial
22

33
git:
44
depth: false
55

6+
addons:
7+
hosts:
8+
- magento2.docker
9+
10+
services:
11+
- docker
12+
613
language: php
714
php:
815
- '7.1'
916
- '7.2'
1017
- '7.3'
1118

1219
env:
13-
- TEST_SUITE=static-unit XDEBUG=true
20+
- TEST_SUITE=functional
21+
22+
stages:
23+
- static-unit
24+
- test
25+
26+
jobs:
27+
include:
28+
- stage: static-unit
29+
script: ./tests/travis/static-unit.sh;
30+
php: '7.1'
31+
env:
32+
- TEST_SUITE=static-unit
33+
- script: ./tests/travis/static-unit.sh;
34+
php: '7.2'
35+
env:
36+
- TEST_SUITE=static-unit
37+
- script: ./tests/travis/static-unit.sh;
38+
php: '7.3'
39+
env:
40+
- TEST_SUITE=static-unit
1441

1542
install:
43+
- composer config github-oauth.github.com ${GITHUB_TOKEN}
1644
- composer config http-basic.repo.magento.com ${REPO_USERNAME} ${REPO_PASSWORD};
45+
- if [ -n "${MCD_VERSION}" ]; then composer config repositories.mcd git [email protected]:magento/magento-cloud-docker.git && composer require "magento/magento-cloud-docker:${MCD_VERSION}" --no-update; fi;
1746
- composer config repositories.magento composer https://repo.magento.com/
1847
- composer require "magento/framework:*" --no-update
1948
- composer require "magento/module-store:*" --no-update
2049
- composer require "magento/module-url-rewrite:*" --no-update
2150
- composer update -n --no-suggest
2251

2352
script:
24-
- if [ "$TEST_SUITE" == "static-unit" ]; then ./Test/static/static-travis.sh; fi
25-
53+
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ] && [ $TEST_SUITE == "functional" ]; then ./tests/travis/functional.sh; fi;

Model/Cache/InvalidateLogger.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\CloudComponents\Model\Cache;
10+
11+
/**
12+
* Log cache invalidation to a file
13+
*/
14+
class InvalidateLogger extends \Magento\Framework\Cache\InvalidateLogger
15+
{
16+
/**
17+
* Log cache invalidation to a file
18+
*
19+
* @param mixed $invalidateInfo
20+
*/
21+
public function execute($invalidateInfo)
22+
{
23+
$invalidateInfo['trace'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
24+
parent::execute($invalidateInfo);
25+
}
26+
}

Model/Indexation/Logger.php

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\CloudComponents\Model\Indexation;
10+
11+
use Magento\Framework\Indexer\ActionInterface;
12+
use Psr\Log\LoggerInterface;
13+
14+
/**
15+
* Log full re-indexation to a file
16+
*/
17+
class Logger
18+
{
19+
/**
20+
* @var LoggerInterface
21+
*/
22+
private $logger;
23+
24+
/**
25+
* @param LoggerInterface $logger
26+
*/
27+
public function __construct(LoggerInterface $logger)
28+
{
29+
$this->logger = $logger;
30+
}
31+
32+
/**
33+
* Log full re-indexation to a file
34+
*
35+
* @param ActionInterface $subject
36+
*/
37+
public function afterExecuteFull(ActionInterface $subject)
38+
{
39+
$this->logger->debug(
40+
'full_indexation: ' . get_class($subject),
41+
[
42+
'trace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)
43+
]
44+
);
45+
}
46+
}

Model/Logger/Handler/Debug.php

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\CloudComponents\Model\Logger\Handler;
9+
10+
/**
11+
* Debug handler which doesn't require debug mode enabled
12+
*/
13+
class Debug extends \Magento\Framework\Logger\Handler\Debug
14+
{
15+
/**
16+
* @param array $record
17+
* @return mixed
18+
*/
19+
public function isHandling(array $record)
20+
{
21+
return parent::isHandling($record);
22+
}
23+
}

0 commit comments

Comments
 (0)