Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!---
Thank you for contributing to Magento.
To help us process this issue we recommend that you add the following information:
- Summary of the issue,
- Information on your environment,
- Steps to reproduce,
- Expected and actual results,
Please also have a look at our guidelines article before adding a new issue https://github.com/magento/magento2/wiki/Issue-reporting-guidelines
-->

### Preconditions
<!---
Please provide as detailed information about your environment as possible.
For example Magento version, tag, HEAD, PHP & MySQL version, etc..
-->
1.
2.

### Steps to reproduce
<!---
It is important to provide a set of clear steps to reproduce this bug.
If relevant please include code samples
-->
1.
2.
3.

### Expected result
<!--- Tell us what should happen -->
1. [Screenshots, logs or description]

### Actual result
<!--- Tell us what happens instead -->
1. [Screenshots, logs or description]
37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!---
Thank you for contributing to Magento.
To help us process this pull request we recommend that you add the following information:
- Summary of the pull request,
- Issue(s) related to the changes made,
- Manual testing scenarios,
-->

<!--- Please provide a general summary of the Pull Request in the Title above -->

### Description
<!---
Please provide a description of the changes proposed in the pull request.
Letting us know what has changed and why it needed changing will help us validate this pull request.
-->

### Fixed Issues (if relevant)
<!---
If relevant, please provide a list of fixed issues in the format magento/magento-cloud-patches#<issue_number>.
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
-->
1. magento/magento-cloud-patches#<issue_number>: Issue title
2. ...

### Manual testing scenarios
<!---
Please provide a set of unambiguous steps to test the proposed code change.
Giving us manual testing scenarios will help with the processing and validation process.
-->
1. ...
2. ...

### Contribution checklist
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] All automated tests passed successfully (all builds on Travis CI are green)
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
/.idea
/vendor
/composer.phar
/composer.lock
/auth.json
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
dist: xenial

git:
depth: false

language: php
php:
- '7.0'
- '7.1'
- '7.2'
- '7.3'

install: composer update

script:
- ./vendor/bin/phpcs ./src --standard=./tests/static/phpcs-ruleset.xml -p -n
- ./vendor/bin/phpmd ./src xml ./tests/static/phpmd-ruleset.xml
- ./vendor/bin/phpunit --configuration ./tests/unit
19 changes: 19 additions & 0 deletions autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
error_reporting(E_ALL);
date_default_timezone_set('UTC');

if (!defined('BP')) {
define('BP', dirname(__DIR__, 3));
}

foreach ([__DIR__ . '/../../autoload.php', __DIR__ . '/vendor/autoload.php'] as $file) {
if (file_exists($file)) {
return require $file;
}
}

throw new RuntimeException('Required file \'autoload.php\' was not found.');
1 change: 1 addition & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dev-ece-patches
10 changes: 10 additions & 0 deletions bin/ece-patches
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env php
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
$container = require __DIR__ . '/../bootstrap.php';

$application = new Magento\CloudPatches\Application($container);
$application->run();
10 changes: 10 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
require __DIR__ . '/autoload.php';

use Magento\CloudPatches\App\Container;

return new Container(__DIR__, BP);
46 changes: 46 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "magento/magento-cloud-patches",
"description": "Provides critical fixes for Magento 2 Enterprise Edition",
"type": "magento2-component",
"version": "1.0.0",
"license": "OSL-3",
"require": {
"php": "^7.0",
"ext-json": "*",
"composer/composer": "@stable",
"symfony/config": "^3.3||^4.3",
"symfony/console": "^2.6||^4.0",
"symfony/dependency-injection": "^3.3||^4.3",
"symfony/process": "^2.1||^4.1"
},
"conflict": {
"symfony/process": "^4.2"
},
"require-dev": {
"phpmd/phpmd": "@stable",
"phpunit/phpunit": "^6.2",
"squizlabs/php_codesniffer": "^3.0"
},
"bin": [
"bin/ece-patches"
],
"autoload": {
"psr-4": {
"Magento\\CloudPatches\\": "src/"
}
},
"scripts": {
"test": [
"@phpcs",
"@phpmd",
"@phpunit"
],
"phpcs": "phpcs src --standard=tests/static/phpcs-ruleset.xml -p -n",
"phpmd": "phpmd src xml tests/static/phpmd-ruleset.xml",
"phpunit": "phpunit --configuration tests/unit"
},
"config": {
"sort-packages": true
},
"prefer-stable": true
}
17 changes: 17 additions & 0 deletions config/services.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<!-- Default configuration for services in *this* file -->
<defaults autowire="true" public="true"/>

<prototype namespace="Magento\CloudPatches\" resource="../src/*" exclude="../src/{Test}"/>

<service id="Magento\CloudPatches\App\Container" autowire="false"/>
<service id="Magento\CloudPatches\Filesystem\DirectoryList" autowire="false"/>
<service id="Composer\Composer"/>
<service id="Magento\CloudPatches\App\GenericException" autowire="false"/>
<service id="Magento\CloudPatches\Command\Patch\ManagerException" autowire="false"/>
<service id="Magento\CloudPatches\Patch\ApplierException" autowire="false"/>
<service id="Magento\CloudPatches\Filesystem\FileNotFoundException" autowire="false"/>
</services>
</container>
Loading