Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into MAGETWO-31968-Lo…
Browse files Browse the repository at this point in the history
…gger-Fatal-Error
  • Loading branch information
Joan He committed Jan 13, 2015
2 parents fad7cc2 + 1f4cf42 commit 9cedc5a
Show file tree
Hide file tree
Showing 143 changed files with 815 additions and 250 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: php
php:
- 5.4
- 5.5
- 5.6
env:
- TEST_SUITE=unit
- TEST_SUITE=integration
Expand All @@ -14,6 +15,10 @@ matrix:
env: TEST_SUITE=static_phpcs
- php: 5.4
env: TEST_SUITE=static_annotation
- php: 5.6
env: TEST_SUITE=static_phpcs
- php: 5.6
env: TEST_SUITE=static_annotation
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y -qq postfix
Expand Down
11 changes: 5 additions & 6 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
/* PHP version validation */
if (version_compare(phpversion(), '5.4.11', '<') === true) {
if (PHP_SAPI == 'cli') {
echo 'Magento supports PHP 5.4.11 or newer. Please read http://www.magento.com/install.';
echo 'Magento supports PHP 5.4.11 or later. ' .
'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html';
} else {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;">
<h3 style="margin:0;font-size:1.7em;font-weight:normal;text-transform:none;text-align:left;color:#2f2f2f;">
Whoops, it looks like you have an invalid PHP version.</h3>
</div>
<p>Magento supports PHP 5.4.11 or newer.
<p>Magento supports PHP 5.4.11 or later. Please read
<a target="_blank" href="http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html">
Magento System Requirements</a>.
</div>
HTML;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdminNotification/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-admin-notification",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-core": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Authorization/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-authorization",
"description": "Authorization module provides access to Magento ACL functionality.",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-backend": "0.42.0-beta3",
"magento/framework": "0.42.0-beta3",
"magento/magento-composer-installer": "*"
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-backend",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-directory": "0.42.0-beta3",
"magento/module-core": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backup/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-backup",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-core": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Bundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-bundle",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-tax": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Captcha/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-captcha",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-customer": "0.42.0-beta3",
"magento/module-checkout": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-catalog",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-eav": "0.42.0-beta3",
"magento/module-cms": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogImportExport/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-catalog-import-export",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-core": "0.42.0-beta3",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-eav": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogInventory/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-catalog-inventory",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-customer": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogRule/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-catalog-rule",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-rule": "0.42.0-beta3",
"magento/module-catalog": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogSearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-catalog-search",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-search": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogUrlRewrite/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-catalog-url-rewrite",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-backend": "0.42.0-beta3",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-catalog-import-export": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogWidget/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-catalog-widget",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-widget": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Centinel/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-centinel",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-checkout": "0.42.0-beta3",
"magento/module-core": "0.42.0-beta3",
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Checkout/Model/Type/Onepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ protected function _validateCustomerData(array $data)
$quote = $this->getQuote();
$isCustomerNew = !$quote->getCustomerId();
$customer = $quote->getCustomer();
$customerData = $this->extensibleDataObjectConverter->toFlatArray($customer);
$customerData = $this->extensibleDataObjectConverter->toFlatArray($customer, [], '\Magento\Customer\Api\Data\CustomerInterface');

/** @var Form $customerForm */
$customerForm = $this->_formFactory->create(
Expand Down Expand Up @@ -594,7 +594,7 @@ protected function _validateCustomerData(array $data)
$this->_objectCopyService->copyFieldsetToTarget(
'customer_account',
'to_quote',
$this->extensibleDataObjectConverter->toFlatArray($customer),
$this->extensibleDataObjectConverter->toFlatArray($customer, [], '\Magento\Customer\Api\Data\CustomerInterface'),
$quote
);

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Checkout/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-checkout",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-sales": "0.42.0-beta3",
"magento/module-authorization": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CheckoutAgreements/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-checkout-agreements",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-checkout": "0.42.0-beta3",
"magento/module-store": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Cms/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-cms",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-core": "0.42.0-beta3",
"magento/module-theme": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CmsUrlRewrite/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-cms-url-rewrite",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-cms": "0.42.0-beta3",
"magento/module-store": "0.42.0-beta3",
"magento/module-url-rewrite": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/ConfigurableImportExport/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-configurable-import-export",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-catalog-import-export": "0.42.0-beta3",
"magento/module-eav": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/ConfigurableProduct/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-configurable-product",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-catalog": "0.42.0-beta3",
"magento/module-catalog-inventory": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Contact/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-contact",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-customer": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-core",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
"magento/module-cron": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Cron/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-cron",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
"magento/framework": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CurrencySymbol/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-currency-symbol",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-page-cache": "0.42.0-beta3",
"magento/module-directory": "0.42.0-beta3",
Expand Down
6 changes: 5 additions & 1 deletion app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ protected function _prepareForm()
$form->addField('id', 'hidden', ['name' => 'customer_id']);
$customer = $this->_customerRepository->getById($customerId);
$form->setValues(
$this->_extensibleDataObjectConverter->toFlatArray($customer)
$this->_extensibleDataObjectConverter->toFlatArray(
$customer,
[],
'\Magento\Customer\Api\Data\CustomerInterface'
)
)->addValues(
['customer_id' => $customerId]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ protected function _customizeFieldset($fieldset)
);
$form->getElement('website_id')->setRenderer($renderer);

$accountData = $this->_extensibleDataObjectConverter->toFlatArray($this->_getCustomerDataObject());
$accountData = $this->_extensibleDataObjectConverter->toFlatArray(
$this->_getCustomerDataObject(),
[],
'\Magento\Customer\Api\Data\CustomerInterface'
);

if ($this->_getCustomerDataObject()->getId()) {
$customerFormFields = $this->_addEditCustomerFormFields($fieldset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ protected function _validateCustomer($response)
$customerForm = $this->_formFactory->create(
'customer',
'adminhtml_customer',
$this->_extensibleDataObjectConverter->toFlatArray($customer),
$this->_extensibleDataObjectConverter->toFlatArray(
$customer,
[],
'\Magento\Customer\Api\Data\CustomerInterface'
),
true
);
$customerForm->setInvisibleIgnored(true);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Model/AccountManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ protected function createPasswordHash($password)
public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer)
{
$customerErrors = $this->validator->validateData(
$this->extensibleDataObjectConverter->toFlatArray($customer),
$this->extensibleDataObjectConverter->toFlatArray($customer, [], '\Magento\Customer\Api\Data\CustomerInterface'),
[],
'customer'
);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Model/Address/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(ExtensibleDataObjectConverter $extensibleDataObjectC
*/
public function toFlatArray($addressDataObject)
{
$flatAddressArray = $this->extensibleDataObjectConverter->toFlatArray($addressDataObject);
$flatAddressArray = $this->extensibleDataObjectConverter->toFlatArray($addressDataObject, [], '\Magento\Customer\Api\Data\AddressInterface');
//preserve street
$street = $addressDataObject->getStreet();
if (!empty($street) && is_array($street)) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/Model/Customer/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(ExtensibleDataObjectConverter $extensibleDataObjectC
*/
public function toFlatArray(CustomerInterface $customer)
{
$flatArray = $this->extensibleDataObjectConverter->toNestedArray($customer);
$flatArray = $this->extensibleDataObjectConverter->toNestedArray($customer, [], '\Magento\Customer\Api\Data\CustomerInterface');
unset($flatArray["addresses"]);
return ConvertArray::toFlatArray($flatArray);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ public function save(\Magento\Customer\Api\Data\CustomerInterface $customer, $pa
{
$this->validate($customer);
$customerData = $this->extensibleDataObjectConverter->toFlatArray(
$this->customerBuilder->populate($customer)->setAddresses([])->create()
$this->customerBuilder->populate($customer)->setAddresses([])->create(),
[],
'\Magento\Customer\Api\Data\CustomerInterface'
);
$customerModel = $this->customerFactory->create(['data' => $customerData]);
$storeId = $customerModel->getStoreId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function loadData($printQuery = false, $logQuery = false)
$groups = $searchResults->getItems();
foreach ($groups as $group) {
$groupItem = new \Magento\Framework\Object();
$groupItem->addData($this->simpleDataObjectConverter->toFlatArray($group));
$groupItem->addData($this->simpleDataObjectConverter->toFlatArray($group, '\Magento\Customer\Api\Data\GroupInterface'));
$this->_addItem($groupItem);
}
$this->_setIsLoaded();
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-customer",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-eav": "0.42.0-beta3",
"magento/module-directory": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CustomerImportExport/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-customer-import-export",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-backend": "0.42.0-beta3",
"magento/module-core": "0.42.0-beta3",
"magento/module-customer": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/DesignEditor/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-design-editor",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-theme": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Dhl/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-dhl",
"description": "N/A",
"require": {
"php": "~5.4.11|~5.5.0",
"php": "~5.4.11|~5.5.0|~5.6.0",
"magento/module-store": "0.42.0-beta3",
"magento/module-shipping": "0.42.0-beta3",
"magento/module-backend": "0.42.0-beta3",
Expand Down
Loading

0 comments on commit 9cedc5a

Please sign in to comment.