Skip to content

Commit 04446b6

Browse files
committed
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 '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
1 parent 5b266f6 commit 04446b6

File tree

8,611 files changed

+250861
-150438
lines changed

Some content is hidden

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

8,611 files changed

+250861
-150438
lines changed

.gitignore

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ atlassian*
1313
/app/config_sandbox
1414
/app/etc/local.xml
1515
/app/etc/local.xml.*
16-
/app/etc/modules/XEnterprise_Enabler.xml
16+
/app/etc/modules/XEnterprise_Edition.xml
17+
/app/etc/modules/XSaas_Edition.xml
1718
/downloader/.cache
1819
/downloader/cache.cfg
1920
/downloader/connect.cfg
@@ -28,6 +29,7 @@ atlassian*
2829
/pub/media/*
2930
/pub/media/customer/*
3031
/pub/media/downloadable/*
31-
/pub/media/theme/*
32-
/pub/media/theme/customization/*
32+
/pub/static/*
33+
!/pub/static/.htaccess
3334
/var/*
35+
*swp

CHANGELOG.markdown

+104
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,107 @@
1+
2.0.0.0-dev44
2+
=============
3+
* Product creating & editing:
4+
* Added ability to control base text styling without WYSIWYG when editing description fields
5+
* Added validation for price and quantity fields
6+
* Removed category suggest limit
7+
* Product template management:
8+
* Automatically update Product Template when modifying structure in Create Product flow
9+
* Improvements to change attribute set functionality
10+
* Refactored JavaScript to use JQuery library:
11+
* Refactored the following pages: catalog tags, one page checkout, multishipping checkout, gift options, gift messages (across the board)
12+
* Converted jQuery popupwindow.js plugin to a jQuery widget
13+
* Replaced Prototype code for Switch/Maestro and Solo credit card with jQuery widget
14+
* Replaced Prototype Validation with jQuery validation plugin
15+
* Converted credit card payment tool tip to jQuery in all themes
16+
* Removed legacy JS files from all themes
17+
* Various improvements in look & feel of backend UI:
18+
* Styling of components: catalog, sales, customers, reports, CMS, newsletter
19+
* Generic styling: grids, popup windows
20+
* Changes to support IE browser
21+
* Enhancements in "suggest" JavaScript widget:
22+
* Ability to delete selected item using keyboard
23+
* Ability to display all available search items, if "recent items" is empty
24+
* Fixes of behavior of currently selected elements and "spinner"
25+
* Display "No Records" message in suggest widget if all items already selected
26+
* Fixed suggest widget to no longer show deleted items
27+
* Improved `Magento_Test_Helper_ObjectManager` in unit tests to discover types of constructor arguments
28+
* Removed workaround of unsetting objects referenced in `tearDown()` of integration tests
29+
* Updated Menu and Navigation layout, including redesigned backend menu item System -> My Account
30+
* Made store address format consistent with format of shipping origin address
31+
* Added ability to navigate directly to a section in backend system configuration, with corresponding accordion expanded
32+
* Removed some of unnecessary coupling between several modules
33+
* General improvements to unit and integration test code coverage, as well as compliance with coding standards
34+
* Application framework:
35+
* Implemented ability to compress/decompress data in a cache backend
36+
* Verified ability to disable in configuration triggering of system upgrade
37+
* Abolished code pools and the mechanism of overriding files using include\_path (without alternative)
38+
* Implemented segmentation of cache by types -- ability to assign separate cache configuration per type. Reviewed and verified possibility to isolate configuration cache segment
39+
* Segregated application configuration into several layers. Primary configuration is used by the object manager and loaded before application is initialized
40+
* Instead of `Zend\Di`, implemented `Magento\ObjectManager` library that has less features and suits Magento application needs better in terms of performance
41+
* Introduced "context" object as dependencies for super-classes (`Mage_Core_Model_Abstract`, `Mage_Core_Block_Abstract`, etc) to reduce complexity of their constructors' API
42+
* Implemented tools for pre-populating all auto-generated proxy and factory classes, used by dependency injection framework
43+
* Replaced "developer" mode with general "mode", that has 3 states: developer, default, production
44+
* 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`
45+
* Introduced support for Twig templating
46+
* template rendering, including phtml, was abstracted into a `Mage_Core_Block_Template_Engine` to make support for other template engines easier
47+
* included Magento-specific Twig functions and filters
48+
* phtml templates can now only access public methods of the corresponding Block class
49+
* 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
50+
* Introduced support for webhooks and callbacks: outbound HTTP requests for notifications and real-time integrations
51+
* 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
52+
* 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
53+
* Converted product view page to demonstrate use of Twig templates and services
54+
* Updated shipping carrier `collectRates` logic to support remote callbacks and converted the FedEx shipping carrier to comply with the same interface
55+
* Added webhook support for the following topics: `customer/created`, `customer/updated`, `customer/deleted`, and `order/created`
56+
* Visual design editor:
57+
* Ability to view all CSS-files of a theme
58+
* Ported numerous features of visual design editor from Magento Go 1.x to Magento Core 2.x: style editing, managing catalog images
59+
* Various improvements in UI
60+
* Improved image sizing functionality
61+
* Improved test coverage
62+
* Ability to launch physical themes, including workflow preview mode and workflow design mode
63+
* Ability to duplicate existing themes for customization
64+
* GitHub requests
65+
* [#162](https://github.com/magento/magento2/pull/162) -- classmap needs to be prepended to autoloader stack to have any effect
66+
* [#179](https://github.com/magento/magento2/pull/179) -- fix that makes `Mage_Install` compatible with the new version of SimpleXml
67+
* [#180](https://github.com/magento/magento2/pull/180) -- fixed `getBaseUrl()` when type was injected via setter
68+
* [#203](https://github.com/magento/magento2/pull/203) -- fixed problem with login in to backend area on php 5.4
69+
* [#216](https://github.com/magento/magento2/pull/216) -- explicit nullification of `$_store` in `Mage_Core_Model_Sore_Storage_Db->_initStores()`
70+
* [#220](https://github.com/magento/magento2/pull/220) -- make topmenu HTML editable by an event
71+
* [#221](https://github.com/magento/magento2/pull/221) -- changed minimum required PHP version from PHP 5.2.3 to 5.3.3
72+
* Bug fixes:
73+
* Restored missing Paypal configuration options
74+
* Fixed numerous display issues on the following pages: admin login, product management, category management, CMS poll, VDE, tax, shipping
75+
* Fixed XSS vulnerability related to customer data & bundle options
76+
* Fixed "Preview Theme" functionality
77+
* Fixed JS File upload problem with Internet Explorer
78+
* Replaced `truncateOptions` function in `varien/js.js` with inline widget
79+
* Fixed broken XPaths in `SystemConfiguration.yml`
80+
* Fixed jQuery metadata plugin's data attribute scanning for validation
81+
* Synchronized default value of `quantity_and_stock_status` with Stock Availability control
82+
* Fixed display of G.T. Purchased column in Order grid when order in non-default currency
83+
* Fixed Foreign Key support for MS SQL
84+
* Fixed "Create Customer" functionality on New Order screen
85+
* Restored State/Province field to Review Order page
86+
* Fixed Add New Tax Rate functionality
87+
* Fixed problem with displaying New Shopping Cart Price Rule tab
88+
* Fixed problem of configurable product options getting lost when adding product to wishlist
89+
* Fixed UPS Shipping label printing
90+
* Fixed performance issue with Catalog Management
91+
* Fixed input file type validation when importing customers
92+
* Fixed custom product placeholder image display
93+
* Added missing files referenced by `quick\_style.css`
94+
* Fixed validation error messaging and message placement
95+
* Fixed access problem to SOAP/XML User and Roles pages
96+
* Fixed access problem created when editing your own permissions
97+
* Several fixes for problems with cleaning cache in tag scope
98+
* Fixed invalid link problem in Gift Card email
99+
* Fixed problem with deleting selected product category after changing attribute set
100+
* Fixed theme management for Windows by adopting `Magento_Filesystem` abstraction to access directories
101+
* Fixed cart rendering in case of empty cart
102+
* Remove duplicate "Link to Store Front" link from admin, made obsolete by "Customer View" link
103+
* Removed "Flat Rate" from pre-installed shipping methods
104+
1105
2.0.0.0-dev43
2106
=============
3107
* Implemented functional limitation that restricts max number of catalog products in the system

app/Mage.php

+41-47
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ final class Mage
4646
*/
4747
const PARAM_RUN_TYPE = 'MAGE_RUN_TYPE';
4848

49+
/**
50+
* Application run code
51+
*/
52+
const PARAM_MODE = 'MAGE_MODE';
53+
4954
/**
5055
* Base directory
5156
*/
@@ -99,7 +104,7 @@ final class Mage
99104
*
100105
* @var array
101106
*/
102-
static private $_registry = array();
107+
static private $_registry = array();
103108

104109
/**
105110
* Application root absolute path
@@ -141,21 +146,14 @@ final class Mage
141146
*
142147
* @var bool
143148
*/
144-
static private $_isDownloader = false;
145-
146-
/**
147-
* Is developer mode flag
148-
*
149-
* @var bool
150-
*/
151-
static private $_isDeveloperMode = false;
149+
static private $_isDownloader = false;
152150

153151
/**
154152
* Is allow throw Exception about headers already sent
155153
*
156154
* @var bool
157155
*/
158-
public static $headersSentThrowsException = true;
156+
public static $headersSentThrowsException = true;
159157

160158
/**
161159
* Logger entities
@@ -220,7 +218,7 @@ public static function getVersionInfo()
220218
'revision' => '0',
221219
'patch' => '0',
222220
'stability' => 'dev',
223-
'number' => '43',
221+
'number' => '44',
224222
);
225223
}
226224

@@ -258,9 +256,9 @@ public static function reset()
258256
self::$_config = null;
259257
self::$_objects = null;
260258
self::$_isDownloader = false;
261-
self::$_isDeveloperMode = false;
262259
self::$_loggers = array();
263260
self::$_design = null;
261+
self::$_objectManager = null;
264262
// do not reset $headersSentThrowsException
265263
}
266264

@@ -375,9 +373,7 @@ public static function objects($key = null)
375373
*/
376374
public static function getBaseDir($type = Mage_Core_Model_Dir::ROOT)
377375
{
378-
/** @var $dirs Mage_Core_Model_Dir */
379-
$dirs = self::$_objectManager->get('Mage_Core_Model_Dir');
380-
return $dirs->getDir($type);
376+
return self::getSingleton('Mage_Core_Model_Dir')->getDir($type);
381377
}
382378

383379
/**
@@ -442,8 +438,7 @@ public static function getBaseUrl($type = Mage_Core_Model_Store::URL_TYPE_LINK,
442438
*/
443439
public static function getUrl($route = '', $params = array())
444440
{
445-
return self::getObjectManager()->create('Mage_Core_Model_Url', array('data' => array()))
446-
->getUrl($route, $params);
441+
return self::getObjectManager()->create('Mage_Core_Model_Url')->getUrl($route, $params);
447442
}
448443

449444
/**
@@ -488,9 +483,7 @@ public static function getConfig()
488483
*/
489484
public static function dispatchEvent($name, array $data = array())
490485
{
491-
/** @var $eventManager Mage_Core_Model_Event_Manager */
492-
$eventManager = self::$_objectManager->get('Mage_Core_Model_Event_Manager');
493-
$eventManager->dispatch($name, $data);
486+
return Mage::getSingleton('Mage_Core_Model_Event_Manager')->dispatch($name, $data);
494487
}
495488

496489
/**
@@ -506,21 +499,20 @@ public static function getModel($modelClass = '', $arguments = array())
506499
if (!is_array($arguments)) {
507500
$arguments = array($arguments);
508501
}
509-
return self::getObjectManager()->create($modelClass, $arguments, false);
502+
return self::getObjectManager()->create($modelClass, $arguments);
510503
}
511504

512505
/**
513506
* Retrieve model object singleton
514507
*
515508
* @param string $modelClass
516-
* @param array $arguments
517509
* @return Mage_Core_Model_Abstract
518510
*/
519-
public static function getSingleton($modelClass = '', array $arguments=array())
511+
public static function getSingleton($modelClass = '')
520512
{
521513
$registryKey = '_singleton/'.$modelClass;
522514
if (!self::registry($registryKey)) {
523-
self::register($registryKey, self::getObjectManager()->get($modelClass, $arguments));
515+
self::register($registryKey, self::getObjectManager()->get($modelClass));
524516
}
525517
return self::registry($registryKey);
526518
}
@@ -565,17 +557,16 @@ public static function getResourceModel($modelClass, $arguments = array())
565557
}
566558

567559
/**
568-
* Retrieve resource vodel object singleton
560+
* Retrieve resource model object singleton
569561
*
570562
* @param string $modelClass
571-
* @param array $arguments
572563
* @return object
573564
*/
574-
public static function getResourceSingleton($modelClass = '', array $arguments = array())
565+
public static function getResourceSingleton($modelClass = '')
575566
{
576567
$registryKey = '_resource_singleton/'.$modelClass;
577568
if (!self::registry($registryKey)) {
578-
self::register($registryKey, self::getObjectManager()->get($modelClass, $arguments));
569+
self::register($registryKey, self::getObjectManager()->get($modelClass));
579570
}
580571
return self::registry($registryKey);
581572
}
@@ -629,7 +620,13 @@ public static function getResourceHelper($moduleName)
629620
if (substr($moduleName, 0, 5) == 'Mage_') {
630621
$connection = substr($connection, 5);
631622
}
632-
return self::getObjectManager()->get($helperClassName, array('modulePrefix' => $connection));
623+
$key = 'resourceHelper/' . $connection;
624+
if (!self::registry($key)) {
625+
self::register(
626+
$key, self::getObjectManager()->create($helperClassName, array('modulePrefix' => $connection))
627+
);
628+
}
629+
return self::registry($key);
633630
}
634631

635632
/**
@@ -682,7 +679,7 @@ public static function app()
682679
*/
683680
public static function isInstalled()
684681
{
685-
return (bool) self::$_objectManager->get('Mage_Core_Model_Config_Primary')->getInstallDate();
682+
return (bool) Mage::getSingleton('Mage_Core_Model_Config_Primary')->getInstallDate();
686683
}
687684

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

726-
/**
727-
* Set enabled developer mode
728-
*
729-
* @param bool $mode
730-
* @return bool
731-
*
732-
* @deprecated use Mage_Core_Model_App_State::setIsDeveloperMode()
733-
*/
734-
public static function setIsDeveloperMode($mode)
735-
{
736-
self::$_isDeveloperMode = (bool)$mode;
737-
return self::$_isDeveloperMode;
738-
}
739-
740723
/**
741724
* Retrieve enabled developer mode
742725
*
743726
* @return bool
744-
* @deprecated use Mage_Core_Model_App_State::isDeveloperMode()
727+
* @deprecated use Mage_Core_Model_App_State::getMode()
745728
*/
746729
public static function getIsDeveloperMode()
747730
{
748-
return self::$_isDeveloperMode;
731+
$objectManager = self::getObjectManager();
732+
if (!$objectManager) {
733+
return false;
734+
}
735+
736+
$appState = $objectManager->get('Mage_Core_Model_App_State');
737+
if (!$appState) {
738+
return false;
739+
}
740+
741+
$mode = $appState->getMode();
742+
return $mode == Mage_Core_Model_App_State::MODE_DEVELOPER;
749743
}
750744

751745
/**
@@ -756,7 +750,7 @@ public static function getIsDeveloperMode()
756750
*/
757751
public static function printException(Exception $e, $extra = '')
758752
{
759-
if (self::$_isDeveloperMode) {
753+
if (self::getIsDeveloperMode()) {
760754
print '<pre>';
761755

762756
if (!empty($extra)) {

0 commit comments

Comments
 (0)