Skip to content

Commit

Permalink
2.0.0.0-dev44
Browse files Browse the repository at this point in the history
* Product creating & editing:
  * Added ability to control base text styling without WYSIWYG when editing description fields
  * Added validation for price and quantity fields
  * Removed category suggest limit
* Product template management:
  * Automatically update Product Template when modifying structure in Create Product flow
  * Improvements to change attribute set functionality
* Refactored JavaScript to use JQuery library:
  * Refactored the following pages: catalog tags, one page checkout, multishipping checkout, gift options, gift messages (across the board)
  * Converted jQuery popupwindow.js plugin to a jQuery widget
  * Replaced Prototype code for Switch/Maestro and Solo credit card with jQuery widget
  * Replaced Prototype Validation with jQuery validation plugin
  * Converted credit card payment tool tip to jQuery in all themes
  * Removed legacy JS files from all themes
* Various improvements in look & feel of backend UI:
  * Styling of components: catalog, sales, customers, reports, CMS, newsletter
  * Generic styling: grids, popup windows
  * Changes to support IE browser
* Enhancements in "suggest" JavaScript widget:
  * Ability to delete selected item using keyboard
  * Ability to display all available search items, if "recent items" is empty
  * Fixes of behavior of currently selected elements and "spinner"
  * Display "No Records" message in suggest widget if all items already selected
  * Fixed suggest widget to no longer show deleted items
* Improved `Magento_Test_Helper_ObjectManager` in unit tests to discover types of constructor arguments
* Removed workaround of unsetting objects referenced in `tearDown()` of integration tests
* Updated Menu and Navigation layout, including redesigned backend menu item System -> My Account
* Made store address format consistent with format of shipping origin address
* Added ability to navigate directly to a section in backend system configuration, with corresponding accordion expanded
* Removed some of unnecessary coupling between several modules
* General improvements to unit and integration test code coverage, as well as compliance with coding standards
* Application framework:
  * Implemented ability to compress/decompress data in a cache backend
  * Verified ability to disable in configuration triggering of system upgrade
  * Abolished code pools and the mechanism of overriding files using include\_path (without alternative)
  * Implemented segmentation of cache by types -- ability to assign separate cache configuration per type. Reviewed and verified possibility to isolate configuration cache segment
  * Segregated application configuration into several layers. Primary configuration is used by the object manager and loaded before application is initialized
  * Instead of `Zend\Di`, implemented `Magento\ObjectManager` library that has less features and suits Magento application needs better in terms of performance
  * Introduced "context" object as dependencies for super-classes (`Mage_Core_Model_Abstract`, `Mage_Core_Block_Abstract`, etc) to reduce complexity of their constructors' API
  * Implemented tools for pre-populating all auto-generated proxy and factory classes, used by dependency injection framework
  * Replaced "developer" mode with general "mode", that has 3 states: developer, default, production
  * In "production" mode, the application will not invoke fallback for static view files (images, CSS-files, JavaScript). Instead, it will assume that they are already placed in a fully qualified location. Added tools for populating static view files from `app` directory into `pub/static`
  * Introduced support for Twig templating
    * template rendering, including phtml, was abstracted into a 'Template Engine' to make support for other template engines easier
    * included Magento-specific Twig functions and filters
    * phtml templates can now only access public methods of the corresponding Block class
    * ability to define dependencies on data provided by a service that is then made available to the templates -- eliminates some of the code in Blocks
  * Introduced support for webhooks and callbacks: outbound HTTP requests for notifications and real-time integrations
  * Added ability to define options for System Configuration select fields in XML: static options are defined inline, dynamic options can reuse data provided by a service
* Moved product business logic found in blocks into `Mage_Catalog_Service_Product` to consolidate logic into a single structure that both controllers and web services can invoke
* Converted product view page to demonstrate use of Twig templates and services
* Updated shipping carrier `collectRates` logic to support remote callbacks and converted the FedEx shipping carrier to comply with the same interface
* Added webhook support for the following topics: `customer/created`, `customer/updated`, `customer/deleted`, and `order/created`
* Visual design editor:
  * Ability to view all CSS-files of a theme
  * Ported numerous features of visual design editor from Magento Go 1.x to Magento Core 2.x: style editing, managing catalog images
  * Various improvements in UI
  * Improved image sizing functionality
  * Improved test coverage
  * Ability to launch physical themes, including workflow preview mode and workflow design mode
  * Ability to duplicate existing themes for customization
* GitHub requests
  * [#162](#162) -- classmap needs to be prepended to autoloader stack to have any effect
  * [#179](#179) -- fix that makes `Mage_Install` compatible with the new version of SimpleXml
  * [#180](#180) -- fixed `getBaseUrl()` when type was injected via setter
  * [#203](#203) -- fixed problem with login in to backend area on php 5.4
  * [#216](#216) -- explicit nullification of `$_store` in `Mage_Core_Model_Sore_Storage_Db->_initStores()`
  * [#220](#220) -- make topmenu HTML editable by an event
  * [#221](#221) -- changed minimum required PHP version from PHP 5.2.3 to 5.3.3
* Bug fixes:
  * Restored missing Paypal configuration options
  * Fixed numerous display issues on the following pages: admin login, product management, category management, CMS poll, VDE, tax, shipping
  * Fixed XSS vulnerability related to customer data & bundle options
  * Fixed "Preview Theme" functionality
  * Fixed JS File upload problem with Internet Explorer
  * Replaced `truncateOptions` function in `varien/js.js` with inline widget
  * Fixed broken XPaths in `SystemConfiguration.yml`
  * Fixed jQuery metadata plugin's data attribute scanning for validation
  * Synchronized default value of `quantity_and_stock_status` with Stock Availability control
  * Fixed display of G.T. Purchased column in Order grid when order in non-default currency
  * Fixed Foreign Key support for MS SQL
  * Fixed "Create Customer" functionality on New Order screen
  * Restored State/Province field to Review Order page
  * Fixed Add New Tax Rate functionality
  * Fixed problem with displaying New Shopping Cart Price Rule tab
  * Fixed problem of configurable product options getting lost when adding product to wishlist
  * Fixed UPS Shipping label printing
  * Fixed performance issue with Catalog Management
  * Fixed input file type validation when importing customers
  * Fixed custom product placeholder image display
  * Added missing files referenced by `quick\_style.css`
  * Fixed validation error messaging and message placement
  * Fixed access problem to SOAP/XML User and Roles pages
  * Fixed access problem created when editing your own permissions
  * Several fixes for problems with cleaning cache in tag scope
  * Fixed invalid link problem in Gift Card email
  * Fixed problem with deleting selected product category after changing attribute set
  * Fixed theme management for Windows by adopting `Magento_Filesystem` abstraction to access directories
  * Fixed cart rendering in case of empty cart
  * Remove duplicate "Link to Store Front" link from admin, made obsolete by "Customer View" link
  * Removed "Flat Rate" from pre-installed shipping methods
  • Loading branch information
magento-team committed Apr 7, 2013
1 parent 5b266f6 commit 04446b6
Show file tree
Hide file tree
Showing 8,611 changed files with 250,861 additions and 150,438 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ atlassian*
/app/config_sandbox
/app/etc/local.xml
/app/etc/local.xml.*
/app/etc/modules/XEnterprise_Enabler.xml
/app/etc/modules/XEnterprise_Edition.xml
/app/etc/modules/XSaas_Edition.xml
/downloader/.cache
/downloader/cache.cfg
/downloader/connect.cfg
Expand All @@ -28,6 +29,7 @@ atlassian*
/pub/media/*
/pub/media/customer/*
/pub/media/downloadable/*
/pub/media/theme/*
/pub/media/theme/customization/*
/pub/static/*
!/pub/static/.htaccess
/var/*
*swp
104 changes: 104 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,3 +1,107 @@
2.0.0.0-dev44
=============
* Product creating & editing:
* Added ability to control base text styling without WYSIWYG when editing description fields
* Added validation for price and quantity fields
* Removed category suggest limit
* Product template management:
* Automatically update Product Template when modifying structure in Create Product flow
* Improvements to change attribute set functionality
* Refactored JavaScript to use JQuery library:
* Refactored the following pages: catalog tags, one page checkout, multishipping checkout, gift options, gift messages (across the board)
* Converted jQuery popupwindow.js plugin to a jQuery widget
* Replaced Prototype code for Switch/Maestro and Solo credit card with jQuery widget
* Replaced Prototype Validation with jQuery validation plugin
* Converted credit card payment tool tip to jQuery in all themes
* Removed legacy JS files from all themes
* Various improvements in look & feel of backend UI:
* Styling of components: catalog, sales, customers, reports, CMS, newsletter
* Generic styling: grids, popup windows
* Changes to support IE browser
* Enhancements in "suggest" JavaScript widget:
* Ability to delete selected item using keyboard
* Ability to display all available search items, if "recent items" is empty
* Fixes of behavior of currently selected elements and "spinner"
* Display "No Records" message in suggest widget if all items already selected
* Fixed suggest widget to no longer show deleted items
* Improved `Magento_Test_Helper_ObjectManager` in unit tests to discover types of constructor arguments
* Removed workaround of unsetting objects referenced in `tearDown()` of integration tests
* Updated Menu and Navigation layout, including redesigned backend menu item System -> My Account
* Made store address format consistent with format of shipping origin address
* Added ability to navigate directly to a section in backend system configuration, with corresponding accordion expanded
* Removed some of unnecessary coupling between several modules
* General improvements to unit and integration test code coverage, as well as compliance with coding standards
* Application framework:
* Implemented ability to compress/decompress data in a cache backend
* Verified ability to disable in configuration triggering of system upgrade
* Abolished code pools and the mechanism of overriding files using include\_path (without alternative)
* Implemented segmentation of cache by types -- ability to assign separate cache configuration per type. Reviewed and verified possibility to isolate configuration cache segment
* Segregated application configuration into several layers. Primary configuration is used by the object manager and loaded before application is initialized
* Instead of `Zend\Di`, implemented `Magento\ObjectManager` library that has less features and suits Magento application needs better in terms of performance
* Introduced "context" object as dependencies for super-classes (`Mage_Core_Model_Abstract`, `Mage_Core_Block_Abstract`, etc) to reduce complexity of their constructors' API
* Implemented tools for pre-populating all auto-generated proxy and factory classes, used by dependency injection framework
* Replaced "developer" mode with general "mode", that has 3 states: developer, default, production
* In "production" mode, the application will not invoke fallback for static view files (images, CSS-files, JavaScript). Instead, it will assume that they are already placed in a fully qualified location. Added tools for populating static view files from `app` directory into `pub/static`
* Introduced support for Twig templating
* template rendering, including phtml, was abstracted into a `Mage_Core_Block_Template_Engine` to make support for other template engines easier
* included Magento-specific Twig functions and filters
* phtml templates can now only access public methods of the corresponding Block class
* ability to define dependencies on data provided by a service that is then made available to the templates -- eliminates some of the code in Blocks
* Introduced support for webhooks and callbacks: outbound HTTP requests for notifications and real-time integrations
* Added ability to define options for System Configuration select fields in XML: static options are defined inline, dynamic options can reuse data provided by a service
* Moved product business logic found in blocks into `Mage_Catalog_Service_Product` to consolidate logic into a single structure that both controllers and web services can invoke
* Converted product view page to demonstrate use of Twig templates and services
* Updated shipping carrier `collectRates` logic to support remote callbacks and converted the FedEx shipping carrier to comply with the same interface
* Added webhook support for the following topics: `customer/created`, `customer/updated`, `customer/deleted`, and `order/created`
* Visual design editor:
* Ability to view all CSS-files of a theme
* Ported numerous features of visual design editor from Magento Go 1.x to Magento Core 2.x: style editing, managing catalog images
* Various improvements in UI
* Improved image sizing functionality
* Improved test coverage
* Ability to launch physical themes, including workflow preview mode and workflow design mode
* Ability to duplicate existing themes for customization
* GitHub requests
* [#162](https://github.com/magento/magento2/pull/162) -- classmap needs to be prepended to autoloader stack to have any effect
* [#179](https://github.com/magento/magento2/pull/179) -- fix that makes `Mage_Install` compatible with the new version of SimpleXml
* [#180](https://github.com/magento/magento2/pull/180) -- fixed `getBaseUrl()` when type was injected via setter
* [#203](https://github.com/magento/magento2/pull/203) -- fixed problem with login in to backend area on php 5.4
* [#216](https://github.com/magento/magento2/pull/216) -- explicit nullification of `$_store` in `Mage_Core_Model_Sore_Storage_Db->_initStores()`
* [#220](https://github.com/magento/magento2/pull/220) -- make topmenu HTML editable by an event
* [#221](https://github.com/magento/magento2/pull/221) -- changed minimum required PHP version from PHP 5.2.3 to 5.3.3
* Bug fixes:
* Restored missing Paypal configuration options
* Fixed numerous display issues on the following pages: admin login, product management, category management, CMS poll, VDE, tax, shipping
* Fixed XSS vulnerability related to customer data & bundle options
* Fixed "Preview Theme" functionality
* Fixed JS File upload problem with Internet Explorer
* Replaced `truncateOptions` function in `varien/js.js` with inline widget
* Fixed broken XPaths in `SystemConfiguration.yml`
* Fixed jQuery metadata plugin's data attribute scanning for validation
* Synchronized default value of `quantity_and_stock_status` with Stock Availability control
* Fixed display of G.T. Purchased column in Order grid when order in non-default currency
* Fixed Foreign Key support for MS SQL
* Fixed "Create Customer" functionality on New Order screen
* Restored State/Province field to Review Order page
* Fixed Add New Tax Rate functionality
* Fixed problem with displaying New Shopping Cart Price Rule tab
* Fixed problem of configurable product options getting lost when adding product to wishlist
* Fixed UPS Shipping label printing
* Fixed performance issue with Catalog Management
* Fixed input file type validation when importing customers
* Fixed custom product placeholder image display
* Added missing files referenced by `quick\_style.css`
* Fixed validation error messaging and message placement
* Fixed access problem to SOAP/XML User and Roles pages
* Fixed access problem created when editing your own permissions
* Several fixes for problems with cleaning cache in tag scope
* Fixed invalid link problem in Gift Card email
* Fixed problem with deleting selected product category after changing attribute set
* Fixed theme management for Windows by adopting `Magento_Filesystem` abstraction to access directories
* Fixed cart rendering in case of empty cart
* Remove duplicate "Link to Store Front" link from admin, made obsolete by "Customer View" link
* Removed "Flat Rate" from pre-installed shipping methods

2.0.0.0-dev43
=============
* Implemented functional limitation that restricts max number of catalog products in the system
Expand Down
88 changes: 41 additions & 47 deletions app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ final class Mage
*/
const PARAM_RUN_TYPE = 'MAGE_RUN_TYPE';

/**
* Application run code
*/
const PARAM_MODE = 'MAGE_MODE';

/**
* Base directory
*/
Expand Down Expand Up @@ -99,7 +104,7 @@ final class Mage
*
* @var array
*/
static private $_registry = array();
static private $_registry = array();

/**
* Application root absolute path
Expand Down Expand Up @@ -141,21 +146,14 @@ final class Mage
*
* @var bool
*/
static private $_isDownloader = false;

/**
* Is developer mode flag
*
* @var bool
*/
static private $_isDeveloperMode = false;
static private $_isDownloader = false;

/**
* Is allow throw Exception about headers already sent
*
* @var bool
*/
public static $headersSentThrowsException = true;
public static $headersSentThrowsException = true;

/**
* Logger entities
Expand Down Expand Up @@ -220,7 +218,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
'number' => '43',
'number' => '44',
);
}

Expand Down Expand Up @@ -258,9 +256,9 @@ public static function reset()
self::$_config = null;
self::$_objects = null;
self::$_isDownloader = false;
self::$_isDeveloperMode = false;
self::$_loggers = array();
self::$_design = null;
self::$_objectManager = null;
// do not reset $headersSentThrowsException
}

Expand Down Expand Up @@ -375,9 +373,7 @@ public static function objects($key = null)
*/
public static function getBaseDir($type = Mage_Core_Model_Dir::ROOT)
{
/** @var $dirs Mage_Core_Model_Dir */
$dirs = self::$_objectManager->get('Mage_Core_Model_Dir');
return $dirs->getDir($type);
return self::getSingleton('Mage_Core_Model_Dir')->getDir($type);
}

/**
Expand Down Expand Up @@ -442,8 +438,7 @@ public static function getBaseUrl($type = Mage_Core_Model_Store::URL_TYPE_LINK,
*/
public static function getUrl($route = '', $params = array())
{
return self::getObjectManager()->create('Mage_Core_Model_Url', array('data' => array()))
->getUrl($route, $params);
return self::getObjectManager()->create('Mage_Core_Model_Url')->getUrl($route, $params);
}

/**
Expand Down Expand Up @@ -488,9 +483,7 @@ public static function getConfig()
*/
public static function dispatchEvent($name, array $data = array())
{
/** @var $eventManager Mage_Core_Model_Event_Manager */
$eventManager = self::$_objectManager->get('Mage_Core_Model_Event_Manager');
$eventManager->dispatch($name, $data);
return Mage::getSingleton('Mage_Core_Model_Event_Manager')->dispatch($name, $data);
}

/**
Expand All @@ -506,21 +499,20 @@ public static function getModel($modelClass = '', $arguments = array())
if (!is_array($arguments)) {
$arguments = array($arguments);
}
return self::getObjectManager()->create($modelClass, $arguments, false);
return self::getObjectManager()->create($modelClass, $arguments);
}

/**
* Retrieve model object singleton
*
* @param string $modelClass
* @param array $arguments
* @return Mage_Core_Model_Abstract
*/
public static function getSingleton($modelClass = '', array $arguments=array())
public static function getSingleton($modelClass = '')
{
$registryKey = '_singleton/'.$modelClass;
if (!self::registry($registryKey)) {
self::register($registryKey, self::getObjectManager()->get($modelClass, $arguments));
self::register($registryKey, self::getObjectManager()->get($modelClass));
}
return self::registry($registryKey);
}
Expand Down Expand Up @@ -565,17 +557,16 @@ public static function getResourceModel($modelClass, $arguments = array())
}

/**
* Retrieve resource vodel object singleton
* Retrieve resource model object singleton
*
* @param string $modelClass
* @param array $arguments
* @return object
*/
public static function getResourceSingleton($modelClass = '', array $arguments = array())
public static function getResourceSingleton($modelClass = '')
{
$registryKey = '_resource_singleton/'.$modelClass;
if (!self::registry($registryKey)) {
self::register($registryKey, self::getObjectManager()->get($modelClass, $arguments));
self::register($registryKey, self::getObjectManager()->get($modelClass));
}
return self::registry($registryKey);
}
Expand Down Expand Up @@ -629,7 +620,13 @@ public static function getResourceHelper($moduleName)
if (substr($moduleName, 0, 5) == 'Mage_') {
$connection = substr($connection, 5);
}
return self::getObjectManager()->get($helperClassName, array('modulePrefix' => $connection));
$key = 'resourceHelper/' . $connection;
if (!self::registry($key)) {
self::register(
$key, self::getObjectManager()->create($helperClassName, array('modulePrefix' => $connection))
);
}
return self::registry($key);
}

/**
Expand Down Expand Up @@ -682,7 +679,7 @@ public static function app()
*/
public static function isInstalled()
{
return (bool) self::$_objectManager->get('Mage_Core_Model_Config_Primary')->getInstallDate();
return (bool) Mage::getSingleton('Mage_Core_Model_Config_Primary')->getInstallDate();
}

/**
Expand Down Expand Up @@ -723,29 +720,26 @@ public static function logException(Exception $e)
self::$_objectManager->get('Mage_Core_Model_Logger')->logException($e);
}

/**
* Set enabled developer mode
*
* @param bool $mode
* @return bool
*
* @deprecated use Mage_Core_Model_App_State::setIsDeveloperMode()
*/
public static function setIsDeveloperMode($mode)
{
self::$_isDeveloperMode = (bool)$mode;
return self::$_isDeveloperMode;
}

/**
* Retrieve enabled developer mode
*
* @return bool
* @deprecated use Mage_Core_Model_App_State::isDeveloperMode()
* @deprecated use Mage_Core_Model_App_State::getMode()
*/
public static function getIsDeveloperMode()
{
return self::$_isDeveloperMode;
$objectManager = self::getObjectManager();
if (!$objectManager) {
return false;
}

$appState = $objectManager->get('Mage_Core_Model_App_State');
if (!$appState) {
return false;
}

$mode = $appState->getMode();
return $mode == Mage_Core_Model_App_State::MODE_DEVELOPER;
}

/**
Expand All @@ -756,7 +750,7 @@ public static function getIsDeveloperMode()
*/
public static function printException(Exception $e, $extra = '')
{
if (self::$_isDeveloperMode) {
if (self::getIsDeveloperMode()) {
print '<pre>';

if (!empty($extra)) {
Expand Down
Loading

0 comments on commit 04446b6

Please sign in to comment.