Skip to content

Commit

Permalink
2.0.0.0-dev75
Browse files Browse the repository at this point in the history
* Modularity improvements:
  * Introduced a new CheckoutAgreements module. Moved all "Terms and Conditions" related logic from Magento_Checkout to Magento_CheckoutAgreements
  * Moved library related logic from `Magento\Core\Model\App`
* Fixed bugs:
  * Fixed an issue where Currency Options were not displayed on the Currency Setup tab
  * Fixed an issue where a fatal error appeared during customer registration if mail server was off
  * Fixed an issue where customer with middle name did not appear in the Customers grid in the backend
  * Fixed an issue where related products were not displayed on the product page in the backend
  * Fixed the broken View Files Population tool
  * Fixed an issue where Magento broke down if the Main Web Site was deleted
  * Fixed potential security issue with orders protect_code
  * Fixed an issue where an error appeared when placing an order if cache was turned on
  * Fixed an issue where a warning appeared when running system_config.php tool
  * Fixed an issue with incorrect reset password link for users on custom websites
  * Fixed an issue with invalid error message displayed when trying to save a customer group with existing group name
  * Fixed an issue with  menu layout non-responsive behavior  in the Blank theme
* Framework Improvements:
  * Covered Magento library components with unit tests
    * `Magento\Framework\Error\*`
    * `Magento\Framework\Event\Observer\*`
    * `Magento\Framework\Filesystem\*`
    * `Magento\Framework\Filesystem\File\*`
  * Updated the obsolete_classes list with changes, introduced by Offline Payment Methods Module implementation
  * Moved `lib/Magento/*` to `lib/Magento/Framework/*`
  * Covered Magento application components with unit tests:
     * `Store\Model\*`
     * `Sales/Helper/Guest.php`
     * `Sales/Helper/Admin.php`
     * `Sales/Model/Observer.php`
     * `Sales/Model/Payment/Method/Converter.php`
     * `Sales/Model/Email/Template.php`
     * `Sales/Model/Observer/Backend/CustomerQuote.php`
     * `Sales/Model/Status/ListStatus.php`
* Refactored the following modules to use Customer Service:
  * Magento_Persistent
  * Magento_GoogleShopping
  * Magento_ProductAlert
  * Magento_SendFriend
  * Moved customer-specific logic from the Magento_ImportExport module to the Customer module
  * Refactored the rest of Customer Group usages
  * Refactored customerAccountService::createAccount to not expose the hashed password input from webapi
  * Implemented a delimiter usage for Cache key in Customer Registry
* Customer Service usage:
  * Updated exception hierarchy with a new localized exception class
  * Updated CRUD APIs to support email and base URL instead of IDs
* JavaScript improvements:
  * Implemented the validation widget
  * Implemented the tooltip widget
  * Implemented the popup/modal window widget
  * Implemented the calendar widget
  * Implemented the suggest widget
* Added configuration for Travis CI
  • Loading branch information
magento-team committed Apr 25, 2014
1 parent 555efce commit 7444894
Show file tree
Hide file tree
Showing 7,679 changed files with 191,676 additions and 177,666 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
43 changes: 43 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
language: php
php:
- 5.4
- 5.5
env:
- TEST_SUITE=unit
- TEST_SUITE=integration
- TEST_SUITE=integration_integrity
- TEST_SUITE=static_phpcs
- TEST_SUITE=static_annotation
matrix:
exclude:
- php: 5.5
env: TEST_SUITE=static_phpcs
- php: 5.5
env: TEST_SUITE=static_annotation
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y -qq postfix
before_script:
# mock mail
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
- echo -e '#!/usr/bin/env bash\nexit 0' | sudo tee /usr/sbin/sendmail
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i | grep "PHP Version" | head -n 1 | grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
# Disable xDebug
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# Create DB for Integration tests
- sh -c "if [ '$TEST_SUITE' = 'integration' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then mysql -e 'create database magento_integration_tests;'; mv dev/tests/integration/etc/local-mysql.travis.xml.dist dev/tests/integration/etc/local-mysql.xml; fi"
# Install tools for static tests
- sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ] || [ '$TEST_SUITE' = 'static_annotation' ]; then pear install pear/PHP_CodeSniffer-1.4.7; fi"
- phpenv rehash;
script:
# Unit tests
- sh -c "if [ '$TEST_SUITE' = 'unit' ]; then phpunit -c dev/tests/unit/phpunit.xml.dist; fi"
# Integration tests
- sh -c "if [ '$TEST_SUITE' = 'integration' ]; then cd dev/tests/integration/; phpunit -c phpunit.xml.dist; fi"
# Integration integrity tests
- sh -c "if [ '$TEST_SUITE' = 'integration_integrity' ]; then cd dev/tests/integration/; phpunit -c phpunit.xml.dist testsuite/Magento/Test/Integrity; fi"
# Static tests [Code Style]
- sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ]; then cd dev/tests/static; phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testCodeStyle'; fi"
# Static tests [Code Style]
- sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
2.0.0.0-dev75
=============
* Modularity improvements:
* Introduced a new CheckoutAgreements module. Moved all "Terms and Conditions" related logic from Magento_Checkout to Magento_CheckoutAgreements
* Moved library related logic from `Magento\Core\Model\App`
* Fixed bugs:
* Fixed an issue where Currency Options were not displayed on the Currency Setup tab
* Fixed an issue where a fatal error appeared during customer registration if mail server was off
* Fixed an issue where customer with middle name did not appear in the Customers grid in the backend
* Fixed an issue where related products were not displayed on the product page in the backend
* Fixed the broken View Files Population tool
* Fixed an issue where Magento broke down if the Main Web Site was deleted
* Fixed potential security issue with orders protect_code
* Fixed an issue where an error appeared when placing an order if cache was turned on
* Fixed an issue where a warning appeared when running system_config.php tool
* Fixed an issue with incorrect reset password link for users on custom websites
* Fixed an issue with invalid error message displayed when trying to save a customer group with existing group name
* Fixed an issue with menu layout non-responsive behavior in the Blank theme
* Framework Improvements:
* Covered Magento library components with unit tests
* `Magento\Framework\Error\*`
* `Magento\Framework\Event\Observer\*`
* `Magento\Framework\Filesystem\*`
* `Magento\Framework\Filesystem\File\*`
* Updated the obsolete_classes list with changes, introduced by Offline Payment Methods Module implementation
* Moved `lib/Magento/*` to `lib/Magento/Framework/*`
* Covered Magento application components with unit tests:
* `Store\Model\*`
* `Sales/Helper/Guest.php`
* `Sales/Helper/Admin.php`
* `Sales/Model/Observer.php`
* `Sales/Model/Payment/Method/Converter.php`
* `Sales/Model/Email/Template.php`
* `Sales/Model/Observer/Backend/CustomerQuote.php`
* `Sales/Model/Status/ListStatus.php`
* Refactored the following modules to use Customer Service:
* Magento_Persistent
* Magento_GoogleShopping
* Magento_ProductAlert
* Magento_SendFriend
* Moved customer-specific logic from the Magento_ImportExport module to the Customer module
* Refactored the rest of Customer Group usages
* Refactored customerAccountService::createAccount to not expose the hashed password input from webapi
* Implemented a delimiter usage for Cache key in Customer Registry
* Customer Service usage:
* Updated exception hierarchy with a new localized exception class
* Updated CRUD APIs to support email and base URL instead of IDs
* JavaScript improvements:
* Implemented the validation widget
* Implemented the tooltip widget
* Implemented the popup/modal window widget
* Implemented the calendar widget
* Implemented the suggest widget
* Added configuration for Travis CI

2.0.0.0-dev74
=============
* Pricing Improvements:
Expand Down
4 changes: 2 additions & 2 deletions app/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
require_once __DIR__ . '/../lib/Magento/Autoload/IncludePath.php';
spl_autoload_register('\Magento\Autoload\IncludePath::load');
require_once __DIR__ . '/../lib/Magento/Framework/Autoload/IncludePath.php';
spl_autoload_register('\Magento\Framework\Autoload\IncludePath::load');
14 changes: 9 additions & 5 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@
require_once BP . '/app/functions.php';

require_once __DIR__ . '/autoload.php';
\Magento\Autoload\IncludePath::addIncludePath(array(BP . '/app/code', BP . '/lib'));
\Magento\Framework\Autoload\IncludePath::addIncludePath(array(BP . '/app/code', BP . '/lib'));
$classMapPath = BP . '/var/classmap.ser';
if (file_exists($classMapPath)) {
require_once BP . '/lib/Magento/Autoload/ClassMap.php';
$classMap = new \Magento\Autoload\ClassMap(BP);
require_once BP . '/lib/Magento/Framework/Autoload/ClassMap.php';
$classMap = new \Magento\Framework\Autoload\ClassMap(BP);
$classMap->addMap(unserialize(file_get_contents($classMapPath)));
spl_autoload_register(array($classMap, 'load'), true, true);
}
Expand All @@ -86,7 +86,11 @@
}

if (!empty($_SERVER['MAGE_PROFILER'])) {
\Magento\Profiler::applyConfig($_SERVER['MAGE_PROFILER'], dirname(__DIR__), !empty($_REQUEST['isAjax']));
\Magento\Framework\Profiler::applyConfig(
$_SERVER['MAGE_PROFILER'],
dirname(__DIR__),
!empty($_REQUEST['isAjax'])
);
}
}
date_default_timezone_set(\Magento\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE);
date_default_timezone_set(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE);
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public function __construct(
/**
* Renders grid column
*
* @param \Magento\Object $row
* @param \Magento\Framework\Object $row
* @return string
*/
public function render(\Magento\Object $row)
public function render(\Magento\Framework\Object $row)
{
$readDetailsHtml = $row->getUrl() ? '<a class="action-details" target="_blank" href="' . $row->getUrl() . '">' . __(
'Read Details'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class Notice extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstract
/**
* Renders grid column
*
* @param \Magento\Object $row
* @param \Magento\Framework\Object $row
* @return string
*/
public function render(\Magento\Object $row)
public function render(\Magento\Framework\Object $row)
{
return '<span class="grid-row-title">' .
$row->getTitle() .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public function __construct(
/**
* Renders grid column
*
* @param \Magento\Object $row
* @param \Magento\Framework\Object $row
* @return string
*/
public function render(\Magento\Object $row)
public function render(\Magento\Framework\Object $row)
{
$class = '';
$value = '';
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/AdminNotification/Block/ToolbarEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public function formatNotificationDate($dateString)
if (date('Ymd') == date('Ymd', strtotime($dateString))) {
return $this->formatTime(
$dateString,
\Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT,
\Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT,
false
);
}
return $this->formatDate($dateString, \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true);
return $this->formatDate($dateString, \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function markAsReadAction()
$notificationId
);
$this->messageManager->addSuccess(__('The message has been marked as Read.'));
} catch (\Magento\Model\Exception $e) {
} catch (\Magento\Framework\Model\Exception $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException(
Expand Down Expand Up @@ -121,7 +121,7 @@ public function massMarkAsReadAction()
$this->messageManager->addSuccess(
__('A total of %1 record(s) have been marked as Read.', count($ids))
);
} catch (\Magento\Model\Exception $e) {
} catch (\Magento\Framework\Model\Exception $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException(
Expand Down Expand Up @@ -149,7 +149,7 @@ public function removeAction()
try {
$model->setIsRemove(1)->save();
$this->messageManager->addSuccess(__('The message has been removed.'));
} catch (\Magento\Model\Exception $e) {
} catch (\Magento\Framework\Model\Exception $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
Expand Down Expand Up @@ -178,7 +178,7 @@ public function massRemoveAction()
}
}
$this->messageManager->addSuccess(__('Total of %1 record(s) have been removed.', count($ids)));
} catch (\Magento\Model\Exception $e) {
} catch (\Magento\Framework\Model\Exception $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @package Magento_AdminNotification
* @author Magento Core Team <core@magentocommerce.com>
*/
class Frequency implements \Magento\Option\ArrayInterface
class Frequency implements \Magento\Framework\Option\ArrayInterface
{
/**
* @return array
Expand Down
20 changes: 10 additions & 10 deletions app/code/Magento/AdminNotification/Model/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @package Magento_AdminNotification
* @author Magento Core Team <core@magentocommerce.com>
*/
class Feed extends \Magento\Model\AbstractModel
class Feed extends \Magento\Framework\Model\AbstractModel
{
const XML_USE_HTTPS_PATH = 'system/adminnotification/use_https';

Expand Down Expand Up @@ -60,21 +60,21 @@ class Feed extends \Magento\Model\AbstractModel
protected $_inboxFactory;

/**
* @param \Magento\Model\Context $context
* @param \Magento\Registry $registry
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Backend\App\ConfigInterface $backendConfig
* @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory
* @param \Magento\Model\Resource\AbstractResource $resource
* @param \Magento\Data\Collection\Db $resourceCollection
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(
\Magento\Model\Context $context,
\Magento\Registry $registry,
\Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Backend\App\ConfigInterface $backendConfig,
\Magento\AdminNotification\Model\InboxFactory $inboxFactory,
\Magento\Model\Resource\AbstractResource $resource = null,
\Magento\Data\Collection\Db $resourceCollection = null,
\Magento\Framework\Model\Resource\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\Db $resourceCollection = null,
array $data = array()
) {
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
Expand Down Expand Up @@ -189,7 +189,7 @@ public function setLastUpdate()
*/
public function getFeedData()
{
$curl = new \Magento\HTTP\Adapter\Curl();
$curl = new \Magento\Framework\HTTP\Adapter\Curl();
$curl->setConfig(array('timeout' => 2));
$curl->write(\Zend_Http_Client::GET, $this->getFeedUrl(), '1.0');
$data = $curl->read();
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/AdminNotification/Model/Inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* @package Magento_AdminNotification
* @author Magento Core Team <core@magentocommerce.com>
*/
class Inbox extends \Magento\Model\AbstractModel
class Inbox extends \Magento\Framework\Model\AbstractModel
{
const SEVERITY_CRITICAL = 1;

Expand Down Expand Up @@ -133,13 +133,13 @@ public function parse(array $data)
* @param string|string[] $description
* @param string $url
* @param bool $isInternal
* @throws \Magento\Model\Exception
* @throws \Magento\Framework\Model\Exception
* @return $this
*/
public function add($severity, $title, $description, $url = '', $isInternal = true)
{
if (!$this->getSeverities($severity)) {
throw new \Magento\Model\Exception(__('Wrong message type'));
throw new \Magento\Framework\Model\Exception(__('Wrong message type'));
}
if (is_array($description)) {
$description = '<ul><li>' . implode('</li><li>', $description) . '</li></ul>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public function __construct(\Magento\AdminNotification\Model\InboxFactory $notif
*
* @param int $notificationId
* @return void
* @throws \Magento\Model\Exception
* @throws \Magento\Framework\Model\Exception
*/
public function markAsRead($notificationId)
{
$notification = $this->_notificationFactory->create();
$notification->load($notificationId);
if (!$notification->getId()) {
throw new \Magento\Model\Exception('Wrong notification ID specified.');
throw new \Magento\Framework\Model\Exception('Wrong notification ID specified.');
}
$notification->setIsRead(1);
$notification->save();
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/AdminNotification/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public function __construct(
/**
* Predispath admin action controller
*
* @param \Magento\Event\Observer $observer
* @param \Magento\Framework\Event\Observer $observer
* @return void
*/
public function preDispatch(\Magento\Event\Observer $observer)
public function preDispatch(\Magento\Framework\Event\Observer $observer)
{
if ($this->_backendAuthSession->isLoggedIn()) {
$feedModel = $this->_feedFactory->create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Collection extends \Magento\AdminNotification\Model\Resource\Inbox\Collect
/**
* Add remove filter
*
* @return \Magento\AdminNotification\Model\Resource\Grid\Collection|\Magento\Model\Resource\Db\Collection\AbstractCollection
* @return \Magento\AdminNotification\Model\Resource\Grid\Collection|\Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
*/
protected function _initSelect()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @package Magento_AdminNotification
* @author Magento Core Team <core@magentocommerce.com>
*/
class Inbox extends \Magento\Model\Resource\Db\AbstractDb
class Inbox extends \Magento\Framework\Model\Resource\Db\AbstractDb
{
/**
* AdminNotification Resource initialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @package Magento_AdminNotification
* @author Magento Core Team <core@magentocommerce.com>
*/
class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection
class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
{
/**
* Resource collection initialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
namespace Magento\AdminNotification\Model\Resource\Inbox\Collection;

class Critical extends \Magento\Model\Resource\Db\Collection\AbstractCollection
class Critical extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
{
/**
* Resource collection initialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
namespace Magento\AdminNotification\Model\Resource\System;

class Message extends \Magento\Model\Resource\Db\AbstractDb
class Message extends \Magento\Framework\Model\Resource\Db\AbstractDb
{
/**
* Flag that notifies whether Primary key of table is auto-incremeted
Expand Down
Loading

0 comments on commit 7444894

Please sign in to comment.