Skip to content

Commit 0b0db79

Browse files
authored
Merge pull request #380 from magento/develop
2 parents 5e9645e + 9c82b84 commit 0b0db79

File tree

147 files changed

+3299
-1564
lines changed

Some content is hidden

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

147 files changed

+3299
-1564
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ language: php
1010
php:
1111
- '7.0'
1212
- '7.1'
13+
- '7.2'
1314

1415
addons:
1516
apt:
@@ -36,8 +37,7 @@ install:
3637
- composer update -n --no-suggest
3738
- ./bin/ece-tools docker:build --test --php ${TRAVIS_PHP_VERSION}
3839

39-
before_script:
40-
- docker-compose up -d --build
40+
before_script: docker-compose up -d
4141

4242
script: ./tests/travis/script.sh
4343

composer.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"license": "proprietary",
77
"require": {
88
"php": "^7.0",
9+
"ext-PDO": "*",
910
"ext-json": "*",
1011
"composer/composer": "@stable",
1112
"composer/semver": "^1.4",
@@ -18,7 +19,8 @@
1819
"psr/container": "^1.0",
1920
"psr/log": "^1.0",
2021
"symfony/console": "^2.6||^4.0",
21-
"symfony/yaml": "^2.3||^3.3"
22+
"symfony/yaml": "^2.3||^3.3",
23+
"twig/twig": "^1.0||^2.0"
2224
},
2325
"require-dev": {
2426
"php-mock/php-mock-phpunit": "^2.0",
@@ -67,6 +69,18 @@
6769
"dist/.magento.env.yaml",
6870
".magento.env.yaml.dist"
6971
],
72+
[
73+
"dist/Makefile",
74+
"Makefile"
75+
],
76+
[
77+
"dist/docker/mnt",
78+
"docker/mnt"
79+
],
80+
[
81+
"dist/docker/mysql",
82+
"docker/mysql"
83+
],
7084
[
7185
"dist/docker/config.php",
7286
"docker/config.php.dist"

dist/.magento.env.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,18 @@
169169
# deploy: #
170170
# GENERATED_CODE_SYMLINK: false #
171171
#######################################################################################################################
172+
# ENABLE_GOOGLE_ANALYTICS - Prevents the disabling of Google Analytics. By default, Google Analytics is enabled only #
173+
# on Production environments. Set this value to true to enable Google Analytics on other environments as well. #
174+
# Google Analytics is always enabled in Production. #
175+
# Magento Version: 2.1.4 and later #
176+
# Default value: false #
177+
# Possible values: true or false #
178+
# Stages: deploy #
179+
# Example: #
180+
# stage: #
181+
# deploy: #
182+
# ENABLE_GOOGLE_ANALYTICS: false #
183+
#######################################################################################################################
172184
# MYSQL_USE_SLAVE_CONNECTION - set to true to automatically use a read-only connection to the database #
173185
# to receive read-only traffic on a non-master node. This improves performance #
174186
# through load balancing, because only one node needs to handle read-write traffic. #

dist/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.PHONY: help
2+
3+
help: ## This help
4+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
5+
6+
.DEFAULT_GOAL := help
7+
8+
pull: ## Pull latest images
9+
docker-compose pull
10+
11+
down: ## Destroy containers
12+
docker-compose down -v
13+
14+
up: ## Re-create and start containers
15+
docker-compose down -v
16+
docker-compose up -d
17+
docker-compose run build cloud-build
18+
docker-compose run deploy cloud-deploy
19+
20+
stop: ## Stop containers
21+
docker-compose stop
22+
23+
start: ## Resume containers
24+
docker-compose start
25+
26+
bash: ## Connect to bash
27+
docker-compose run cli bash

dist/docker/config.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@
1818
'port' => '6379'
1919
]
2020
],
21+
'elasticsearch' => [
22+
[
23+
'host' => 'elasticsearch',
24+
'port' => '9200',
25+
],
26+
],
27+
'rabbitmq' => [
28+
[
29+
'host' => 'rabbitmq',
30+
'port' => '5672',
31+
'username' => 'guest',
32+
'password' => 'guest',
33+
]
34+
],
2135
]
2236
)),
2337
'MAGENTO_CLOUD_ROUTES' => base64_encode(json_encode(
@@ -35,6 +49,7 @@
3549
'MAGENTO_CLOUD_VARIABLES' => base64_encode(json_encode([
3650
'ADMIN_EMAIL' => 'admin@example.com',
3751
'ADMIN_PASSWORD' => '123123q',
52+
'ADMIN_URL' => 'admin',
3853
]
3954
)),
4055
];

dist/docker/mnt/.gitignore

Whitespace-only changes.

dist/docker/mysql/.gitignore

Whitespace-only changes.

dist/docker/mysql/docker-entrypoint-initdb.d/.gitignore

Whitespace-only changes.

patches.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@
131131
"Remove the permission check for the console application": {
132132
"2.2.0 - 2.2.5": "MAGECLOUD-2509__remove_permission_check_for_console_application__2.2.0.patch",
133133
"2.2.6": "MAGECLOUD-2509__remove_permission_check_for_console_application__2.2.6.patch"
134+
},
135+
"Fix for DI compilation with Amazon_Payment module": {
136+
"2.2.6": "MAGECLOUD-2850_fix_amazon_payment_module__2.2.6.patch"
134137
}
135138
}
136139
}
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
diff -Nuar a/vendor/amzn/amazon-pay-module/etc/di.xml b/vendor/amzn/amazon-pay-module/etc/di.xml
2+
index c954f48..e585eae 100644
3+
--- a/vendor/amzn/amazon-pay-module/etc/di.xml
4+
+++ b/vendor/amzn/amazon-pay-module/etc/di.xml
5+
@@ -39,24 +39,20 @@
6+
7+
<!-- Amazon error code mapper -->
8+
9+
- <virtualType name="Amazon\Payment\Gateway\ErrorMapper\VirtualConfigReader"
10+
- type="Magento\Payment\Gateway\ErrorMapper\VirtualConfigReader">
11+
+ <virtualType name="Amazon\Payment\Gateway\ErrorMapper\VirtualConfigReader" type="Magento\Payment\Gateway\ErrorMapper\VirtualConfigReader">
12+
<arguments>
13+
<argument name="fileName" xsi:type="string">amazon_error_mapping.xml</argument>
14+
</arguments>
15+
</virtualType>
16+
- <virtualType name="Amazon\Payment\Gateway\ErrorMapper\VirtualMappingData"
17+
- type="Magento\Payment\Gateway\ErrorMapper\MappingData">
18+
+ <virtualType name="Amazon\Payment\Gateway\ErrorMapper\VirtualMappingData" type="Magento\Payment\Gateway\ErrorMapper\MappingData">
19+
<arguments>
20+
<argument name="reader" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualConfigReader</argument>
21+
<argument name="cacheId" xsi:type="string">amazon_error_mapper</argument>
22+
</arguments>
23+
</virtualType>
24+
- <virtualType name="Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper"
25+
- type="Magento\Payment\Gateway\ErrorMapper\ErrorMessageMapper">
26+
+ <virtualType name="Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper" type="Magento\Payment\Gateway\ErrorMapper\ErrorMessageMapper">
27+
<arguments>
28+
- <argument name="messageMapping" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualMappingData
29+
- </argument>
30+
+ <argument name="messageMapping" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualMappingData</argument>
31+
</arguments>
32+
</virtualType>
33+
34+
@@ -120,15 +116,12 @@
35+
<!-- Authorize command -->
36+
<virtualType name="AmazonAuthorizeCommand" type="Amazon\Payment\Gateway\Command\AmazonAuthCommand">
37+
<arguments>
38+
- <argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\AuthorizationRequest
39+
- </argument>
40+
+ <argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\AuthorizationRequest</argument>
41+
<argument name="handler" xsi:type="object">Amazon\Payment\Gateway\Response\CompleteAuthHandler</argument>
42+
<argument name="transferFactory" xsi:type="object">Amazon\Payment\Gateway\Http\TransferFactory</argument>
43+
<argument name="validator" xsi:type="object">AmazonAuthorizationValidators</argument>
44+
<argument name="client" xsi:type="object">Amazon\Payment\Gateway\Http\Client\AuthorizeClient</argument>
45+
- <argument name="errorMessageMapper"
46+
- xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper
47+
- </argument>
48+
+ <argument name="errorMessageMapper" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper</argument>
49+
</arguments>
50+
</virtualType>
51+
52+
@@ -141,30 +134,24 @@
53+
<!-- Authorize and Capture command -->
54+
<virtualType name="AmazonSaleCommand" type="Amazon\Payment\Gateway\Command\AmazonAuthCommand">
55+
<arguments>
56+
- <argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\AuthorizationRequest
57+
- </argument>
58+
+ <argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\AuthorizationRequest</argument>
59+
<argument name="handler" xsi:type="object">Amazon\Payment\Gateway\Response\CompleteSaleHandler</argument>
60+
<argument name="transferFactory" xsi:type="object">Amazon\Payment\Gateway\Http\TransferFactory</argument>
61+
<argument name="validator" xsi:type="object">AmazonAuthorizationValidators</argument>
62+
<argument name="client" xsi:type="object">Amazon\Payment\Gateway\Http\Client\CaptureClient</argument>
63+
- <argument name="errorMessageMapper"
64+
- xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper
65+
- </argument>
66+
+ <argument name="errorMessageMapper" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper</argument>
67+
</arguments>
68+
</virtualType>
69+
70+
<!-- Capture settlement command -->
71+
<virtualType name="AmazonSettlementCommand" type="Amazon\Payment\Gateway\Command\AmazonAuthCommand">
72+
<arguments>
73+
- <argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\SettlementRequest
74+
- </argument>
75+
+ <argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\SettlementRequest</argument>
76+
<argument name="handler" xsi:type="object">Amazon\Payment\Gateway\Response\SettlementHandler</argument>
77+
<argument name="transferFactory" xsi:type="object">Amazon\Payment\Gateway\Http\TransferFactory</argument>
78+
<argument name="validator" xsi:type="object">AmazonAuthorizationValidators</argument>
79+
<argument name="client" xsi:type="object">Amazon\Payment\Gateway\Http\Client\SettlementClient</argument>
80+
- <argument name="errorMessageMapper"
81+
- xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper
82+
- </argument>
83+
+ <argument name="errorMessageMapper" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper</argument>
84+
</arguments>
85+
</virtualType>
86+
87+
@@ -183,12 +170,9 @@
88+
<argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\RefundRequest</argument>
89+
<argument name="handler" xsi:type="object">Amazon\Payment\Gateway\Response\RefundHandler</argument>
90+
<argument name="transferFactory" xsi:type="object">Amazon\Payment\Gateway\Http\TransferFactory</argument>
91+
- <argument name="validator" xsi:type="object">Amazon\Payment\Gateway\Validator\AuthorizationValidator
92+
- </argument>
93+
+ <argument name="validator" xsi:type="object">Amazon\Payment\Gateway\Validator\AuthorizationValidator</argument>
94+
<argument name="client" xsi:type="object">Amazon\Payment\Gateway\Http\Client\RefundClient</argument>
95+
- <argument name="errorMessageMapper"
96+
- xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper
97+
- </argument>
98+
+ <argument name="errorMessageMapper" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper</argument>
99+
</arguments>
100+
</virtualType>
101+
102+
@@ -198,12 +182,9 @@
103+
<argument name="requestBuilder" xsi:type="object">Amazon\Payment\Gateway\Request\VoidRequest</argument>
104+
<argument name="handler" xsi:type="object">Amazon\Payment\Gateway\Response\VoidHandler</argument>
105+
<argument name="transferFactory" xsi:type="object">Amazon\Payment\Gateway\Http\TransferFactory</argument>
106+
- <argument name="validator" xsi:type="object">Amazon\Payment\Gateway\Validator\AuthorizationValidator
107+
- </argument>
108+
+ <argument name="validator" xsi:type="object">Amazon\Payment\Gateway\Validator\AuthorizationValidator</argument>
109+
<argument name="client" xsi:type="object">Amazon\Payment\Gateway\Http\Client\VoidClient</argument>
110+
- <argument name="errorMessageMapper"
111+
- xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper
112+
- </argument>
113+
+ <argument name="errorMessageMapper" xsi:type="object">Amazon\Payment\Gateway\ErrorMapper\VirtualErrorMessageMapper</argument>
114+
</arguments>
115+
</virtualType>
116+
117+
@@ -237,26 +218,22 @@
118+
119+
<!-- end gateway config -->
120+
121+
- <preference for="Amazon\Payment\Api\OrderInformationManagementInterface"
122+
- type="Amazon\Payment\Model\OrderInformationManagement"/>
123+
+ <preference for="Amazon\Payment\Api\OrderInformationManagementInterface" type="Amazon\Payment\Model\OrderInformationManagement"/>
124+
<preference for="Amazon\Payment\Api\AddressManagementInterface" type="Amazon\Payment\Model\AddressManagement"/>
125+
<preference for="Amazon\Payment\Api\QuoteLinkManagementInterface" type="Amazon\Payment\Model\QuoteLinkManagement"/>
126+
<preference for="Amazon\Payment\Api\Data\QuoteLinkInterface" type="Amazon\Payment\Model\QuoteLink"/>
127+
<preference for="Amazon\Payment\Api\Data\OrderLinkInterface" type="Amazon\Payment\Model\OrderLink"/>
128+
<preference for="Amazon\Payment\Api\Data\PendingCaptureInterface" type="Amazon\Payment\Model\PendingCapture"/>
129+
- <preference for="Amazon\Payment\Api\Data\PendingAuthorizationInterface"
130+
- type="Amazon\Payment\Model\PendingAuthorization"/>
131+
+ <preference for="Amazon\Payment\Api\Data\PendingAuthorizationInterface" type="Amazon\Payment\Model\PendingAuthorization"/>
132+
<preference for="Amazon\Payment\Api\Data\PendingRefundInterface" type="Amazon\Payment\Model\PendingRefund"/>
133+
<preference for="Amazon\Payment\Ipn\IpnHandlerFactoryInterface" type="Amazon\Payment\Ipn\IpnHandlerFactory"/>
134+
<preference for="AmazonPay\IpnHandlerInterface" type="Amazon\Payment\Ipn\IpnHandler"/>
135+
- <preference for="Amazon\Payment\Api\Ipn\CompositeProcessorInterface"
136+
- type="Amazon\Payment\Model\Ipn\CompositeProcessor"/>
137+
+ <preference for="Amazon\Payment\Api\Ipn\CompositeProcessorInterface" type="Amazon\Payment\Model\Ipn\CompositeProcessor"/>
138+
<type name="Magento\Quote\Api\CartRepositoryInterface">
139+
<plugin name="amazon_payment_quote_repository" type="Amazon\Payment\Plugin\QuoteRepository" sortOrder="1"/>
140+
</type>
141+
<type name="Magento\Checkout\Api\ShippingInformationManagementInterface">
142+
- <plugin name="amazon_payment_shipping_information_management"
143+
- type="Amazon\Payment\Plugin\ShippingInformationManagement" sortOrder="1"/>
144+
+ <plugin name="amazon_payment_shipping_information_management" type="Amazon\Payment\Plugin\ShippingInformationManagement" sortOrder="1"/>
145+
</type>
146+
<type name="Magento\Quote\Api\Data\PaymentInterface">
147+
<plugin name="amazon_payment_additional_information" type="Amazon\Payment\Plugin\AdditionalInformation"/>
148+
@@ -280,17 +257,14 @@
149+
</type>
150+
<type name="Amazon\Payment\Model\QueuedRefundUpdater">
151+
<arguments>
152+
- <argument name="adminNotifier" xsi:type="object">Magento\Framework\Notification\NotifierInterface\Proxy
153+
- </argument>
154+
+ <argument name="adminNotifier" xsi:type="object">Magento\Framework\Notification\NotifierInterface\Proxy</argument>
155+
</arguments>
156+
</type>
157+
<type name="Amazon\Payment\Api\Ipn\CompositeProcessorInterface">
158+
<arguments>
159+
<argument name="processors" xsi:type="array">
160+
<item name="captureprocessor" xsi:type="object">Amazon\Payment\Model\Ipn\CaptureProcessor\Proxy</item>
161+
- <item name="authorizationprocessor"
162+
- xsi:type="object">Amazon\Payment\Model\Ipn\AuthorizationProcessor\Proxy
163+
- </item>
164+
+ <item name="authorizationprocessor" xsi:type="object">Amazon\Payment\Model\Ipn\AuthorizationProcessor\Proxy</item>
165+
<item name="orderprocessor" xsi:type="object">Amazon\Payment\Model\Ipn\OrderProcessor\Proxy</item>
166+
<item name="refundprocessor" xsi:type="object">Amazon\Payment\Model\Ipn\RefundProcessor\Proxy</item>
167+
</argument>
168+
@@ -310,8 +284,7 @@
169+
</arguments>
170+
</type>
171+
<type name="Magento\Framework\Webapi\ErrorProcessor">
172+
- <plugin name="amazon_payment_webapi_error_processor" type="Amazon\Payment\Plugin\WebapiErrorProcessor"
173+
- sortOrder="1"/>
174+
+ <plugin name="amazon_payment_webapi_error_processor" type="Amazon\Payment\Plugin\WebapiErrorProcessor" sortOrder="1"/>
175+
</type>
176+
177+
<type name="Amazon\Payment\Gateway\Config\Config">

0 commit comments

Comments
 (0)