diff --git a/.gitignore b/.gitignore index 40a0475b9426d3eb275e8eef380e1a1a68f0c2c4..466ce72d3057d909370a946037bed09c2263045b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,15 +18,14 @@ atlassian* /downloader/.cache /downloader/cache.cfg /downloader/connect.cfg -/lib/flex/uploader/.actionScriptProperties -/lib/flex/uploader/.flexProperties -/lib/flex/uploader/.project -/lib/flex/uploader/.settings -/lib/flex/varien/.actionScriptProperties -/lib/flex/varien/.flexLibProperties -/lib/flex/varien/.project -/lib/flex/varien/.settings -/pub/cache/* +/lib/internal/flex/uploader/.actionScriptProperties +/lib/internal/flex/uploader/.flexProperties +/lib/internal/flex/uploader/.project +/lib/internal/flex/uploader/.settings +/lib/internal/flex/varien/.actionScriptProperties +/lib/internal/flex/varien/.flexLibProperties +/lib/internal/flex/varien/.project +/lib/internal/flex/varien/.settings /pub/media/* /pub/media/customer/* /pub/media/downloadable/* diff --git a/CHANGELOG.md b/CHANGELOG.md index f08223e7f01d382f5bea8dad0c8958ffd59753d8..24f9cc16de182d879ab702411ed8981cfdf1916e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,74 @@ +2.0.0.0-dev80 +============= +* Framework improvements: + * Reworked subsystem of static view files preprocessing + * Refactored implementation of the view files "fallback" and "collecting" (layout XML files, LESS files for @magento_import) mechanisms for better abstraction + * Used the concept of "view asset" in client code of the View library across the board + * Refactored and simplified LESS preprocessing library, mechanisms of merging and minifying static view files + * Reworked the way how links to static view files are generated and served): + * Changed the strategy of generating unique URL for view static files + * Separated the view files publication process from the page generation + * Added a separate entry point (pub/static.php) for file materialization + * View files deployment tool changes: + * Renamed CLI script from generator.php to deploy.php + * Fixed the known limitation of view files deployment tool of being unable to materialize files per languages. Now the list of intended languages can be provided as a CLI parameter + * Expanded the tool parameters + * Improved security and reliability of view files structure: + * Restructured the module view folder by file type: "web" – view static files, "templates" – module template files, and "layout" – module layout files + * Reworked the theme module folder to repeat the same structure as in the module + * Added “web†folder to a theme root which contains static view files + * Renamed the pub/lib to lib/web. Currently there are no static files that are publicly accessible by default. All static view files may be subject of preprocessing + * Renamed the former lib to lib/internal + * Support of RequireJS: + * Adopted RequireJS library and implemented ability for modules or themes to introduce RequireJS configuration (aka shim-config) + * Refactored scripts in the Magento_ConfigurableProduct module to be loaded via RequireJS +* Tax calculation updates: + * Fixed tax calculation rounding issues when discount is applied + * Fixed extra penny problem when exact tax amount ends with 0.5 cent + * Fixed tax calculation errors when customer tax rate is different from store tax rate + * Added support to round tax at individual tax rate + * Fixed price inconsistencies between catalog and shopping cart + * Added support to maintain consistent price including tax for customers with different tax rates + * Added support to allow tax rules with different priorities to be applied to subtotal only +* Fixed bugs: + * Fixed an issue where it was impossible to place an order with Zero Subtotal Checkout using checkout with multiple addresses + * Fixed an issue where an irrelevant confirmation window appeared when placing an order with Zero Subtotal Checkout in the backend + * Fixed an issue where it was impossible to create an order for a new customer in the backend if gift options were enabled + * Fixed an issue where a wrong message about backordered items in cart was displayed in the backend + * Fixed an issue where it was impossible to perform a checkout with multiple addresses when the Validate Each Address Separately option in Multi-address Checkout was enabled + * Fixed an issue where the Minimum Order Amount option was applied to the orders + * Fixed an issue where the duplicated element caused problems when attempting to customize styling of the section + * Fixed an issue where a user was redirected to Dashboard when clicking the Search and Reset buttons on the Recurring Profile page + * Fixed an issue where the Enabled for RMA option was available for online shipping method in Magento 2 CE + * Fixed an issue when free shipping was applied even if the Free Shipping with Minimum Order Amount option was disabled + * Fixed an issue with not displaying a downloadable product with the Links can be purchased separately option enabled on the grouped product page + * Fixed an issue of not generating product price variations during configurable product creation + * Fixed an issue with incorrect work of category pager + * Fixed an issue with file permissions change after the system backup was run + * Fixed an issue with inconsistency between the REST request and response format + * Fixed an issue with the Magento Contact Us form not submitted if secure_base_url doesn't contain "https" + * Fixed an issue with incorrect display of the Price as configured field which didn’t count product options cost + * Fixed an issue with incorrect redirect when clicking the product URL in Pending Review Rss +* JavaScript improvements: + * Added standard validation to the front-end address fields + * Implemented the wishlist widget + * Implemented the tabs widget + * Implemented the collapsible widget + * Implemented the accordion widget + * Implemented the tooltip widget + * Standardized widgets used on one page checkout + 2.0.0.0-dev79 ============= * Tax calculation updates: - * Fixed issues in tax calculation rounding with discount applied - * Fixed an issue with extra penny when exact tax amount ended with 0.5 cent - * Fixed an issue where there were tax calculation errors when customer tax rate was different from store tax rate - * Added support to round tax at individual tax rate - * Fixed price inconsistencies between catalog and shopping cart - * Added support for maintaining consistent price including tax for customers with different tax rates - * Added support for applying tax rules with different priorities to subtotal only + * Fixed issues in tax calculation rounding with discount applied + * Fixed an issue with extra penny when exact tax amount ended with 0.5 cent + * Fixed an issue where there were tax calculation errors when customer tax rate was different from store tax rate + * Added support to round tax at individual tax rate + * Fixed price inconsistencies between catalog and shopping cart + * Added support for maintaining consistent price including tax for customers with different tax rates + * Added support for applying tax rules with different priorities to subtotal only + * Fixed bugs: * Removed the extra '%' sign in the error\notice message on Gift Card Accounts page on the backend * Fixed an issue with image uploading functionality in the Catalog configuration @@ -52,12 +113,16 @@ * Fixed an issue where Quoted price was displayed incorrectly from the shopping cart in the backend * Functional tests: * Tax Rule Creation - * Admin User Roe Creation + * Admin User Role Creation * Simple Product Creation * Customer Group Creation * Update Backend Customer * Newsletter Creation -* Updated composer.json.dist to download and install MTF from Public GitHub repository + * Virtual Product Creation + * Catalog Price Rule Creation + * Category Url Rewrite Creation + * Admin User Role Deletion +* Update composer.json.dist in order to download and install MTF from Public GitHub (MAGETWO-24698) * GitHub requests: * [#542] (https://github.com/magento/magento2/pull/542) Fix ImportExport bug which occurs while importing multiple rows per entity * [#507] (https://github.com/magento/magento2/issues/507) "Insert Image" window is overlapped on menu diff --git a/app/autoload.php b/app/autoload.php index 1a52fe5a9bc4053dcfd8ffcd290d264c1c045eb3..f2ab699eefe54883c61dac4f79f0c254eaeea046 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -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/Framework/Autoload/IncludePath.php'; +require_once __DIR__ . '/../lib/internal/Magento/Framework/Autoload/IncludePath.php'; spl_autoload_register([new \Magento\Framework\Autoload\IncludePath(), 'load']); diff --git a/app/bootstrap.php b/app/bootstrap.php index 202866a451bedace45b4348a6ecd5923f6e4d2a1..f9b998c6bce1ac8f43b9bd0ea6153cf32e68c00c 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -62,10 +62,10 @@ define('BP', dirname(__DIR__)); require_once BP . '/app/functions.php'; require_once __DIR__ . '/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array(BP . '/app/code', BP . '/lib')); +(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array(BP . '/app/code', BP . '/lib/internal')); $classMapPath = BP . '/var/classmap.ser'; if (file_exists($classMapPath)) { - require_once BP . '/lib/Magento/Framework/Autoload/ClassMap.php'; + require_once BP . '/lib/internal/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); diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml b/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml index 460e6fa70b76b2e14101e52c2ad08e129601bfa4..86839ec9013dbdd8a0aac1be8a9228cc8cbe14f7 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml index 25f28e83adfdafcbde6f001c26a9827302361107..3c16d79e9a5ea205a3eec1e9d2236c0fdd025fab 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\AdminNotification\Model\System\MessageList"> <arguments> <argument name="messages" xsi:type="array"> diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/events.xml b/app/code/Magento/AdminNotification/etc/adminhtml/events.xml index 530f11f6ec431252b1a7759255f7a9403c6cce46..d10d0dbf21bba4ea4a0d738f19b60aa76e613941 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/events.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_predispatch"> <observer name="adminnotification" instance="Magento\AdminNotification\Model\Observer" method="preDispatch" /> </event> diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/routes.xml b/app/code/Magento/AdminNotification/etc/adminhtml/routes.xml index 48ee703a10ef9b8a0bc67e2c320d7679464ce768..d572e4315a68cafd0f245c93976cc29adf611bcd 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/routes.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_AdminNotification" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/AdminNotification/etc/module.xml b/app/code/Magento/AdminNotification/etc/module.xml index a965fe02da75eb21b6ab90a051dc89d230d471bb..2c770837bb583699c87edb72e06ef53e0e56faf4 100644 --- a/app/code/Magento/AdminNotification/etc/module.xml +++ b/app/code/Magento/AdminNotification/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_AdminNotification" version="2.0.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/AdminNotification/view/adminhtml/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml similarity index 100% rename from app/code/Magento/AdminNotification/view/adminhtml/notification/window.phtml rename to app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml diff --git a/app/code/Magento/AdminNotification/view/adminhtml/system/messages.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml similarity index 100% rename from app/code/Magento/AdminNotification/view/adminhtml/system/messages.phtml rename to app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml diff --git a/app/code/Magento/AdminNotification/view/adminhtml/system/messages/popup.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml similarity index 100% rename from app/code/Magento/AdminNotification/view/adminhtml/system/messages/popup.phtml rename to app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml diff --git a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml similarity index 100% rename from app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.phtml rename to app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml diff --git a/app/code/Magento/AdminNotification/view/adminhtml/system/notification.js b/app/code/Magento/AdminNotification/view/adminhtml/web/system/notification.js similarity index 100% rename from app/code/Magento/AdminNotification/view/adminhtml/system/notification.js rename to app/code/Magento/AdminNotification/view/adminhtml/web/system/notification.js diff --git a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js b/app/code/Magento/AdminNotification/view/adminhtml/web/toolbar_entry.js similarity index 100% rename from app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js rename to app/code/Magento/AdminNotification/view/adminhtml/web/toolbar_entry.js diff --git a/app/code/Magento/Authorizenet/etc/adminhtml/di.xml b/app/code/Magento/Authorizenet/etc/adminhtml/di.xml index b8a76b965dc1658640fa914f120aad78a6f04730..472bd1217608f6ad6ccc40bf35d33aeb35d6b452 100644 --- a/app/code/Magento/Authorizenet/etc/adminhtml/di.xml +++ b/app/code/Magento/Authorizenet/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Authorizenet\Helper\HelperInterface" type="Magento\Authorizenet\Helper\Backend" /> <type name="Magento\Authorizenet\Model\Directpost\Session"> <arguments> diff --git a/app/code/Magento/Authorizenet/etc/adminhtml/events.xml b/app/code/Magento/Authorizenet/etc/adminhtml/events.xml index 17f1a032802eb2d8df3f3908d20d35c9785cea6f..969d7fb509c89800b134d0762485956c930d5bcc 100644 --- a/app/code/Magento/Authorizenet/etc/adminhtml/events.xml +++ b/app/code/Magento/Authorizenet/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="checkout_submit_all_after"> <observer name="directpost_update_all_edit_increments" instance="Magento\Authorizenet\Model\Directpost\Observer" method="updateAllEditIncrements" /> </event> diff --git a/app/code/Magento/Authorizenet/etc/adminhtml/routes.xml b/app/code/Magento/Authorizenet/etc/adminhtml/routes.xml index 9cae74bde80d624bbcc8c86b8bac3ed43d6824b9..119d61f5c6c8b82f33bb16914577def8e7426292 100644 --- a/app/code/Magento/Authorizenet/etc/adminhtml/routes.xml +++ b/app/code/Magento/Authorizenet/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Authorizenet" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Authorizenet/etc/di.xml b/app/code/Magento/Authorizenet/etc/di.xml index fd9750860b71ee9f88d1993fa46b1b790e78bd32..45ba703191c72f58354f72e26c88810cbc844ff1 100644 --- a/app/code/Magento/Authorizenet/etc/di.xml +++ b/app/code/Magento/Authorizenet/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Authorizenet\Model\Directpost\Observer"> <arguments> <argument name="authorizenetData" xsi:type="object">Magento\Authorizenet\Helper\Data\Proxy</argument> diff --git a/app/code/Magento/Authorizenet/etc/frontend/di.xml b/app/code/Magento/Authorizenet/etc/frontend/di.xml index 3ce29e15f35258ea65b4179c39f2b11a0b1e5d2e..59240f40d34a002e14ffc977361a709c8f42d836 100644 --- a/app/code/Magento/Authorizenet/etc/frontend/di.xml +++ b/app/code/Magento/Authorizenet/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Authorizenet\Helper\HelperInterface" type="Magento\Authorizenet\Helper\Data" /> <type name="Magento\Authorizenet\Model\Directpost\Session"> <arguments> diff --git a/app/code/Magento/Authorizenet/etc/frontend/events.xml b/app/code/Magento/Authorizenet/etc/frontend/events.xml index 2067922851c3b6d21ac645dd19033fe4910210be..ed15ab5ff563058f748bacea1fb8f5f0cdd0f2ab 100644 --- a/app/code/Magento/Authorizenet/etc/frontend/events.xml +++ b/app/code/Magento/Authorizenet/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="checkout_submit_all_after"> <observer name="directpost_save_order_after_submit" instance="Magento\Authorizenet\Model\Directpost\Observer" method="saveOrderAfterSubmit" /> </event> diff --git a/app/code/Magento/Authorizenet/etc/frontend/routes.xml b/app/code/Magento/Authorizenet/etc/frontend/routes.xml index 7b00185f2c1e6795745d9d278c5c8c8a70362886..2ab71f06bf939a48b4f0602a9de2dbb45cd444e2 100644 --- a/app/code/Magento/Authorizenet/etc/frontend/routes.xml +++ b/app/code/Magento/Authorizenet/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="authorizenet" frontName="authorizenet"> <module name="Magento_Authorizenet" /> diff --git a/app/code/Magento/Authorizenet/etc/module.xml b/app/code/Magento/Authorizenet/etc/module.xml index 8a84f38001e92dc83c95dc2f09a1ff30dbac6be4..715f39adf75558022690a47729ba929cec317e7a 100644 --- a/app/code/Magento/Authorizenet/etc/module.xml +++ b/app/code/Magento/Authorizenet/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Authorizenet" version="1.5.0.0" active="true"> <sequence> <module name="Magento_Sales"/> diff --git a/app/code/Magento/Authorizenet/view/adminhtml/directpost/iframe.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/adminhtml/directpost/iframe.phtml rename to app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml diff --git a/app/code/Magento/Authorizenet/view/adminhtml/directpost/info.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/adminhtml/directpost/info.phtml rename to app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml diff --git a/app/code/Magento/Authorizenet/view/adminhtml/form/cc.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/form/cc.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/adminhtml/form/cc.phtml rename to app/code/Magento/Authorizenet/view/adminhtml/templates/form/cc.phtml diff --git a/app/code/Magento/Authorizenet/view/adminhtml/info/cc.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/info/cc.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/adminhtml/info/cc.phtml rename to app/code/Magento/Authorizenet/view/adminhtml/templates/info/cc.phtml diff --git a/app/code/Magento/Authorizenet/view/adminhtml/info/pdf.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/info/pdf.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/adminhtml/info/pdf.phtml rename to app/code/Magento/Authorizenet/view/adminhtml/templates/info/pdf.phtml diff --git a/app/code/Magento/Authorizenet/view/adminhtml/js/direct-post.js b/app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js similarity index 99% rename from app/code/Magento/Authorizenet/view/adminhtml/js/direct-post.js rename to app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js index 6a69f0af023e49ed6b269bd117d5fa128135a7c6..a612fdfbe1d99caa2f6ddd7ec0f35f546c787d79 100644 --- a/app/code/Magento/Authorizenet/view/adminhtml/js/direct-post.js +++ b/app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js @@ -244,7 +244,7 @@ directPost.prototype = { } if (response.update_section) { - $('checkout-' + response.update_section.name + '-load').update(response.update_section.html); + $('checkout-' + response.update_section.name + '-load').replace(response.update_section.html); response.update_section.html.evalScripts(); } diff --git a/app/code/Magento/Authorizenet/view/frontend/directpost/form.phtml b/app/code/Magento/Authorizenet/view/frontend/templates/directpost/form.phtml similarity index 88% rename from app/code/Magento/Authorizenet/view/frontend/directpost/form.phtml rename to app/code/Magento/Authorizenet/view/frontend/templates/directpost/form.phtml index 7204abfd543478bb53646c60ce96970858ac3cee..59d1c1109d113c3ed3b0d453e9ddc85d1f5f0511 100644 --- a/app/code/Magento/Authorizenet/view/frontend/directpost/form.phtml +++ b/app/code/Magento/Authorizenet/view/frontend/templates/directpost/form.phtml @@ -89,14 +89,9 @@ $_orderUrl = $this->helper('Magento\Authorizenet\Helper\Data')->getPlaceOrderFro <label for="<?php echo $_code ?>_cc_cid" class="label"><span><?php echo __('Card Verification Number') ?></span></label> <div class="control"> <input type="number" title="<?php echo __('Card Verification Number') ?>" data-container="cc-cvv" class="input-text cvv" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" data-validate='{required:true, "validate-cc-cvn":"#<?php echo $_code ?>_cc_type"}' autocomplete="off"/> + <?php $_content = '<img src=\"'.$this->getViewFileUrl('Magento_Checkout::cvv.gif').'\" alt=\"'.__('Card Verification Number Visual Reference').'\" title=\"'.__('Card Verification Number Visual Reference').'\" />'; ?> <div class="note"> - <a href="#" id="directpost-cvv-what-is-this" class="action cvv" data-mage-init='{"toggleAdvanced": {"toggleContainers":"#directpost-tool-tip"}}'><span><?php echo __('What is this?') ?></span></a> - </div> - <div class="tooltip hidden" id="directpost-tool-tip"> - <a href="#" id="directpost-tool-tip-close" title="<?php echo __('Close') ?>" data-mage-init='{"toggleAdvanced": {"toggleContainers":"#directpost-tool-tip"}}' class="action close"> - <span><?php echo __('Close') ?></span> - </a> - <div class="content"><img src="<?php echo $this->getViewFileUrl('Magento_Checkout::cvv.gif') ?>" alt="<?php echo __('Card Verification Number Visual Reference') ?>" title="<?php echo __('Card Verification Number Visual Reference') ?>" /></div> + <a href="#" id="directpost-cvv-what-is-this" class="action cvv" title="" data-mage-init='{"tooltip": {"content": "<?php echo $_content ?>"}}'><span><?php echo __('What is this?') ?></span></a> </div> </div> </div> diff --git a/app/code/Magento/Authorizenet/view/frontend/directpost/iframe.phtml b/app/code/Magento/Authorizenet/view/frontend/templates/directpost/iframe.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/frontend/directpost/iframe.phtml rename to app/code/Magento/Authorizenet/view/frontend/templates/directpost/iframe.phtml diff --git a/app/code/Magento/Authorizenet/view/frontend/directpost/info.phtml b/app/code/Magento/Authorizenet/view/frontend/templates/directpost/info.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/frontend/directpost/info.phtml rename to app/code/Magento/Authorizenet/view/frontend/templates/directpost/info.phtml diff --git a/app/code/Magento/Authorizenet/view/frontend/form/cc.phtml b/app/code/Magento/Authorizenet/view/frontend/templates/form/cc.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/frontend/form/cc.phtml rename to app/code/Magento/Authorizenet/view/frontend/templates/form/cc.phtml diff --git a/app/code/Magento/Authorizenet/view/frontend/info/cc.phtml b/app/code/Magento/Authorizenet/view/frontend/templates/info/cc.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/frontend/info/cc.phtml rename to app/code/Magento/Authorizenet/view/frontend/templates/info/cc.phtml diff --git a/app/code/Magento/Authorizenet/view/frontend/js/components.phtml b/app/code/Magento/Authorizenet/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Authorizenet/view/frontend/js/components.phtml rename to app/code/Magento/Authorizenet/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Authorizenet/view/frontend/authorizenet-authenticate.js b/app/code/Magento/Authorizenet/view/frontend/web/authorizenet-authenticate.js similarity index 100% rename from app/code/Magento/Authorizenet/view/frontend/authorizenet-authenticate.js rename to app/code/Magento/Authorizenet/view/frontend/web/authorizenet-authenticate.js diff --git a/app/code/Magento/Authorizenet/view/frontend/js/direct-post.js b/app/code/Magento/Authorizenet/view/frontend/web/js/direct-post.js similarity index 100% rename from app/code/Magento/Authorizenet/view/frontend/js/direct-post.js rename to app/code/Magento/Authorizenet/view/frontend/web/js/direct-post.js diff --git a/app/code/Magento/Authz/etc/adminhtml/di.xml b/app/code/Magento/Authz/etc/adminhtml/di.xml index d9d626001b2fd93b227bf1e94b39b33f8bf74d79..d4a583c57f7a178984b26b10c37522f64871271d 100644 --- a/app/code/Magento/Authz/etc/adminhtml/di.xml +++ b/app/code/Magento/Authz/etc/adminhtml/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Authz\Model\UserLocatorInterface" type="Magento\Authz\Model\UserLocator\Admin"/> </config> diff --git a/app/code/Magento/Authz/etc/di.xml b/app/code/Magento/Authz/etc/di.xml index 0f91223ef3f88290249a55ab7f7c4ad474d0e97d..324792fc21e25fd27ff50409ce0c08ddfe9f9e54 100644 --- a/app/code/Magento/Authz/etc/di.xml +++ b/app/code/Magento/Authz/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Authz\Service\AuthorizationV1Interface" type="Magento\Authz\Service\AuthorizationV1"/> <preference for="Magento\Authz\Model\UserLocatorInterface" type="Magento\Authz\Model\UserLocator\Guest"/> </config> diff --git a/app/code/Magento/Authz/etc/module.xml b/app/code/Magento/Authz/etc/module.xml index c3096891612a94720053b0aabf86426aa99eabce..ff58965b959a6a87e462506a3b5c208cfc844064 100644 --- a/app/code/Magento/Authz/etc/module.xml +++ b/app/code/Magento/Authz/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Authz" version="1.0.0.0" active="true"> <depends> <!--TODO: Dependency on Magento_User is temporary and should be eliminated when ACL is made global--> diff --git a/app/code/Magento/Backend/Block/AbstractBlock.php b/app/code/Magento/Backend/Block/AbstractBlock.php index 3dbd0502205d17a99d804b197447d9225cb9d767..261efd636164b79bef05811ae21b9b6b38d3b801 100644 --- a/app/code/Magento/Backend/Block/AbstractBlock.php +++ b/app/code/Magento/Backend/Block/AbstractBlock.php @@ -25,8 +25,6 @@ namespace Magento\Backend\Block; /** * Backend abstract block - * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AbstractBlock extends \Magento\Framework\View\Element\AbstractBlock { diff --git a/app/code/Magento/Backend/Block/Context.php b/app/code/Magento/Backend/Block/Context.php index 7caecb18d424d9f6d28f530aa61128a648e9d10c..8351e099c1fa2381c95745b46d1e02960d46e8a1 100644 --- a/app/code/Magento/Backend/Block/Context.php +++ b/app/code/Magento/Backend/Block/Context.php @@ -48,7 +48,7 @@ class Context extends \Magento\Framework\View\Element\Context * @param \Magento\Framework\Session\SessionManagerInterface $session * @param \Magento\Framework\Session\SidResolverInterface $sidResolver * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\ConfigInterface $viewConfig * @param \Magento\Framework\App\Cache\StateInterface $cacheState * @param \Magento\Framework\Logger $logger @@ -71,7 +71,7 @@ class Context extends \Magento\Framework\View\Element\Context \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\Logger $logger, @@ -93,7 +93,7 @@ class Context extends \Magento\Framework\View\Element\Context $session, $sidResolver, $scopeConfig, - $viewUrl, + $assetRepo, $viewConfig, $cacheState, $logger, diff --git a/app/code/Magento/Backend/Block/Media/Uploader.php b/app/code/Magento/Backend/Block/Media/Uploader.php index ae0656d91ff882c9694946bc89891b425f15e578..50e29c074266de4b2bc411d02599f0ae1456b11e 100644 --- a/app/code/Magento/Backend/Block/Media/Uploader.php +++ b/app/code/Magento/Backend/Block/Media/Uploader.php @@ -157,6 +157,6 @@ class Uploader extends \Magento\Backend\Block\Widget */ public function getUploaderUrl($url) { - return $this->_viewUrl->getViewFileUrl($url); + return $this->_assetRepo->getUrl($url); } } diff --git a/app/code/Magento/Backend/Block/Template/Context.php b/app/code/Magento/Backend/Block/Template/Context.php index bc4d77914a396d4c95dbccd114fe1d99192265d7..81adf1abc1ea29f25cc09129a9a46cdb22bb50b5 100644 --- a/app/code/Magento/Backend/Block/Template/Context.php +++ b/app/code/Magento/Backend/Block/Template/Context.php @@ -65,7 +65,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context * @param \Magento\Framework\Session\Generic $session * @param \Magento\Framework\Session\SidResolverInterface $sidResolver * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\ConfigInterface $viewConfig * @param \Magento\Framework\App\Cache\StateInterface $cacheState * @param \Magento\Framework\Logger $logger @@ -97,7 +97,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context \Magento\Framework\Session\Generic $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\Logger $logger, @@ -132,7 +132,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context $session, $sidResolver, $scopeConfig, - $viewUrl, + $assetRepo, $viewConfig, $cacheState, $logger, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php index 60d1b2e814695bc19c5ae1e5fd6e40d7a790cc7f..37405568eebe382e0b32a07b92523f8ef33d5f87 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php @@ -91,8 +91,6 @@ class Baseurl extends \Magento\Framework\App\Config\Value $this->_assertStartsWithValuesOrUrl($placeholders, $value); break; case \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_STATIC_URL: - case \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_CACHE_URL: - case \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_LIB_URL: case \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_MEDIA_URL: $this->_assertStartsWithValuesOrUrlOrEmpty($placeholders, $value); break; @@ -119,8 +117,6 @@ class Baseurl extends \Magento\Framework\App\Config\Value $this->_assertStartsWithValuesOrUrl($placeholders, $value); break; case \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL: - case \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL: - case \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL: case \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL: $this->_assertStartsWithValuesOrUrlOrEmpty($placeholders, $value); break; @@ -228,10 +224,8 @@ class Baseurl extends \Magento\Framework\App\Config\Value switch ($this->getPath()) { case \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL: case \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_MEDIA_URL: - case \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_LIB_URL: case \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL: case \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL: - case \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL: $this->_mergeService->cleanMergedJsCss(); break; } diff --git a/app/code/Magento/Backend/etc/adminhtml/acl.xml b/app/code/Magento/Backend/etc/adminhtml/acl.xml index f47208166d7ce898a6d87f4f5f60e659e628b61b..45f9521fd7a3792ab4748aec830050894abe9408 100644 --- a/app/code/Magento/Backend/etc/adminhtml/acl.xml +++ b/app/code/Magento/Backend/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::all" title="Allow everything" sortOrder="10" /> diff --git a/app/code/Magento/Backend/etc/adminhtml/cache.xml b/app/code/Magento/Backend/etc/adminhtml/cache.xml index 8d89af6258bac8b43062e8665dbc1588e1f942f7..06649a0469ba5e74bbbc6e54904901f4f9dd5087 100644 --- a/app/code/Magento/Backend/etc/adminhtml/cache.xml +++ b/app/code/Magento/Backend/etc/adminhtml/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="config" translate="description"> <description>System(config.xml, local.xml) and modules configuration files(config.xml, menu.xml).</description> </type> diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml index 55d4bff058eb324d21723cd4e8d708aca9654d09..0c75baed88bae33ca8cba1958fa7313288635e44 100644 --- a/app/code/Magento/Backend/etc/adminhtml/di.xml +++ b/app/code/Magento/Backend/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Authorization\RoleLocator" type="Magento\Backend\Model\Authorization\RoleLocator" /> <preference for="Magento\Framework\Locale\ResolverInterface" type="Magento\Backend\Model\Locale\Resolver" /> <preference for="Magento\Framework\App\Action\Context" type="Magento\Backend\App\Action\Context" /> diff --git a/app/code/Magento/Backend/etc/adminhtml/events.xml b/app/code/Magento/Backend/etc/adminhtml/events.xml index 09aab5b3220231afc0421a957e59d81710982a38..2ddd054d5d9ded2f2f5494a3d283490b3be792fc 100644 --- a/app/code/Magento/Backend/etc/adminhtml/events.xml +++ b/app/code/Magento/Backend/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="admin_system_config_changed_section_admin"> <observer name="bind_locale" instance="Magento\Backend\Model\Config\Backend\Admin\Observer" method="afterCustomUrlChanged" /> </event> diff --git a/app/code/Magento/Backend/etc/adminhtml/routes.xml b/app/code/Magento/Backend/etc/adminhtml/routes.xml index 721e1d290f479647e0d49f3b29cd82e4a74be29c..16504f05a4579f4e1eb80b62c8857d740ea2e9e4 100644 --- a/app/code/Magento/Backend/etc/adminhtml/routes.xml +++ b/app/code/Magento/Backend/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml" frontName="admin"> <module name="Magento_Backend" /> diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml index 4295c41fb01835ae440d52c070d0031f642ef259..cc52c30d4f06442cdfadcdb01cfc0637d798d2ed 100644 --- a/app/code/Magento/Backend/etc/adminhtml/system.xml +++ b/app/code/Magento/Backend/etc/adminhtml/system.xml @@ -531,16 +531,6 @@ <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> <comment>May be empty or start with {{unsecure_base_url}} placeholder.</comment> </field> - <field id="base_cache_url" translate="label comment" type="text" sortOrder="26" showInDefault="1" showInWebsite="1" showInStore="1"> - <label>Base URL for View Files Cache</label> - <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> - <comment>May be empty or start with {{unsecure_base_url}} placeholder.</comment> - </field> - <field id="base_lib_url" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> - <label>Base URL for Static Library Files</label> - <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> - <comment>May be empty or start with {{unsecure_base_url}} placeholder. <br/> <strong style="color:red">Warning!</strong> When using CDN, in some cases JavaScript may not run properly if CDN is not in your subdomain</comment> - </field> <field id="base_media_url" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Base URL for User Media Files</label> <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> @@ -565,16 +555,6 @@ <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> <comment>May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.</comment> </field> - <field id="base_cache_url" translate="label comment" type="text" sortOrder="26" showInDefault="1" showInWebsite="1" showInStore="1"> - <label>Secure Base URL for View Files Cache</label> - <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> - <comment>May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.</comment> - </field> - <field id="base_lib_url" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> - <label>Secure Base URL for Static Library Files</label> - <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> - <comment>May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.</comment> - </field> <field id="base_media_url" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Secure Base URL for User Media Files</label> <backend_model>Magento\Backend\Model\Config\Backend\Baseurl</backend_model> diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml index cd6813917a314eddfca4cc01d4b60d6da228bbe6..b37ec543458cf6637489c743bbc40cf8417032b8 100644 --- a/app/code/Magento/Backend/etc/di.xml +++ b/app/code/Magento/Backend/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\App\Config\Storage\WriterInterface" type="Magento\Framework\App\Config\Storage\Writer" /> <preference for="Magento\Framework\App\Request\PathInfoProcessorInterface" type="Magento\Backend\App\Request\PathInfoProcessor" /> <preference for="Magento\Backend\Model\Auth\StorageInterface" type="Magento\Backend\Model\Auth\Session" /> diff --git a/app/code/Magento/Backend/etc/events.xml b/app/code/Magento/Backend/etc/events.xml index e52330aa8133f368b2e49f4caed170bbc77b173e..57598dd668cf0cca7fc9a1d2b7af6fcf1c1206cf 100644 --- a/app/code/Magento/Backend/etc/events.xml +++ b/app/code/Magento/Backend/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="adminhtml_controller_action_predispatch_start"> <observer name="massaction" instance="Magento\Backend\Model\Observer" method="massactionPrepareKey" /> </event> diff --git a/app/code/Magento/Backend/etc/install/di.xml b/app/code/Magento/Backend/etc/install/di.xml index 98ea440954293c1522f1a7bc0716a4e0585e2782..fbfccae1431dc76199efd36afc3d0ddaf4e515ff 100644 --- a/app/code/Magento/Backend/etc/install/di.xml +++ b/app/code/Magento/Backend/etc/install/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Backend\App\ConfigInterface" type="Magento\Backend\App\Config" /> </config> diff --git a/app/code/Magento/Backend/etc/module.xml b/app/code/Magento/Backend/etc/module.xml index 5db09fca4b7412cc792abea7f5159b9891e658d4..7a69975949581e8e82c0c060059cc877a9fa36e6 100644 --- a/app/code/Magento/Backend/etc/module.xml +++ b/app/code/Magento/Backend/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Backend" version="2.0.0.0" active="true"> <sequence> <module name="Magento_Directory"/> diff --git a/app/code/Magento/Backend/view/adminhtml/admin/access_denied.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/admin/access_denied.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/admin/formkey.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/formkey.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/admin/formkey.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/admin/formkey.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/admin/login.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/admin/login.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/admin/login_buttons.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/login_buttons.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/admin/login_buttons.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/admin/login_buttons.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/admin/overlay_popup.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/overlay_popup.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/admin/overlay_popup.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/admin/overlay_popup.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/admin/page.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/admin/page.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/admin/popup.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/popup.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/admin/popup.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/admin/popup.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/graph.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/graph/disabled.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph/disabled.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/graph/disabled.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph/disabled.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/grid.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/index.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/index.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/index.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/salebar.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/salebar.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/searches.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/searches.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/searches.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/store/switcher.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/dashboard/totalbar.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/email/order/items.phtml b/app/code/Magento/Backend/view/adminhtml/templates/email/order/items.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/email/order/items.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/email/order/items.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/media/uploader.phtml b/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/media/uploader.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/menu.phtml b/app/code/Magento/Backend/view/adminhtml/templates/menu.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/menu.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/menu.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/copyright.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/copyright.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/copyright.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/footer.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/footer.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/footer.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/head.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/head.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/head.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/head.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/header.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/header.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/js/calendar.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/js/calendar.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/js/components.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/components.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/js/components.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/js/components.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/js/translate.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/translate.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/js/translate.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/js/translate.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/locale.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/locale.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/locale.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/notices.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/notices.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/notices.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/page/system/config/robots/reset.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/system/config/robots/reset.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/page/system/config/robots/reset.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/page/system/config/robots/reset.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/pageactions.phtml b/app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/pageactions.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/pageactions.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/store/switcher.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/store/switcher/enhanced.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/enhanced.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/store/switcher/enhanced.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/store/switcher/enhanced.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/autocomplete.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/autocomplete.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/autocomplete.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/cache/additional.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/cache/additional.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/cache/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/cache/edit.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/edit.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/config/edit.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/config/edit.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/form/field/array.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/form/field/array.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/config/form/field/array.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/config/form/field/array.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/js.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/js.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/config/js.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/config/js.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/switcher.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/config/switcher.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/config/switcher.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/config/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/config/tabs.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/config/tabs.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/config/tabs.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/design/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/design/edit.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/design/edit.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/design/edit.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/design/index.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/design/index.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/design/index.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/design/index.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/info.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/info.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/info.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/info.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/search.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/search.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/shipping/applicable_country.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/shipping/applicable_country.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/shipping/applicable_country.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/shipping/applicable_country.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/system/variable/js.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/variable/js.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/variable/js.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/system/variable/js.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/urlrewrite/categories.phtml b/app/code/Magento/Backend/view/adminhtml/templates/urlrewrite/categories.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/urlrewrite/categories.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/urlrewrite/categories.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/urlrewrite/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/urlrewrite/edit.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/urlrewrite/edit.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/urlrewrite/edit.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/urlrewrite/selector.phtml b/app/code/Magento/Backend/view/adminhtml/templates/urlrewrite/selector.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/urlrewrite/selector.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/urlrewrite/selector.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/accordion.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/accordion.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/breadcrumbs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/breadcrumbs.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/breadcrumbs.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/button.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/button.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/button.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/button/split.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/button/split.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/form.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/form/container.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/form/element.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/element/gallery.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/form/element/gallery.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/element.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/form/renderer/element.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/element.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset/element.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/form/renderer/fieldset/element.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset/element.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/column_set.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/column_set.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/column_set.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/column_set.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/container.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/container/empty.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container/empty.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/container/empty.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/container/empty.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/export.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/export.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/export.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/export.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/extended.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/massaction.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/massaction_extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/massaction_extended.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/grid/serializer.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/grid/serializer.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/tabs.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/tabshoriz.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/tabshoriz.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/tabsleft.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/tabsleft.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/tabsleft.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/widget/view/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/view/container.phtml similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/widget/view/container.phtml rename to app/code/Magento/Backend/view/adminhtml/templates/widget/view/container.phtml diff --git a/app/code/Magento/Backend/view/adminhtml/images/btn_bg.gif b/app/code/Magento/Backend/view/adminhtml/web/images/btn_bg.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/btn_bg.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/btn_bg.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/btn_on_bg.gif b/app/code/Magento/Backend/view/adminhtml/web/images/btn_on_bg.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/btn_on_bg.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/btn_on_bg.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/btn_over_bg.gif b/app/code/Magento/Backend/view/adminhtml/web/images/btn_over_bg.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/btn_over_bg.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/btn_over_bg.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/dragable-handler-vertical.gif b/app/code/Magento/Backend/view/adminhtml/web/images/dragable-handler-vertical.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/dragable-handler-vertical.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/dragable-handler-vertical.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/draggable-handle-bg.gif b/app/code/Magento/Backend/view/adminhtml/web/images/draggable-handle-bg.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/draggable-handle-bg.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/draggable-handle-bg.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/draggable-handle-vertical.gif b/app/code/Magento/Backend/view/adminhtml/web/images/draggable-handle-vertical.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/draggable-handle-vertical.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/draggable-handle-vertical.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/error_msg_icon.gif b/app/code/Magento/Backend/view/adminhtml/web/images/error_msg_icon.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/error_msg_icon.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/error_msg_icon.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/fam_bullet_error.gif b/app/code/Magento/Backend/view/adminhtml/web/images/fam_bullet_error.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/fam_bullet_error.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/fam_bullet_error.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/fam_bullet_success.gif b/app/code/Magento/Backend/view/adminhtml/web/images/fam_bullet_success.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/fam_bullet_success.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/fam_bullet_success.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/gallery-image-base-label.png b/app/code/Magento/Backend/view/adminhtml/web/images/gallery-image-base-label.png similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/gallery-image-base-label.png rename to app/code/Magento/Backend/view/adminhtml/web/images/gallery-image-base-label.png diff --git a/app/code/Magento/Backend/view/adminhtml/images/gallery-image-panel-corner.png b/app/code/Magento/Backend/view/adminhtml/web/images/gallery-image-panel-corner.png similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/gallery-image-panel-corner.png rename to app/code/Magento/Backend/view/adminhtml/web/images/gallery-image-panel-corner.png diff --git a/app/code/Magento/Backend/view/adminhtml/images/image-placeholder.png b/app/code/Magento/Backend/view/adminhtml/web/images/image-placeholder.png similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/image-placeholder.png rename to app/code/Magento/Backend/view/adminhtml/web/images/image-placeholder.png diff --git a/app/code/Magento/Backend/view/adminhtml/images/note_msg_icon.gif b/app/code/Magento/Backend/view/adminhtml/web/images/note_msg_icon.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/note_msg_icon.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/note_msg_icon.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/success_msg_icon.gif b/app/code/Magento/Backend/view/adminhtml/web/images/success_msg_icon.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/success_msg_icon.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/success_msg_icon.gif diff --git a/app/code/Magento/Backend/view/adminhtml/images/warning_msg_icon.gif b/app/code/Magento/Backend/view/adminhtml/web/images/warning_msg_icon.gif similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/images/warning_msg_icon.gif rename to app/code/Magento/Backend/view/adminhtml/web/images/warning_msg_icon.gif diff --git a/app/code/Magento/Backend/view/adminhtml/system/validation-rules.js b/app/code/Magento/Backend/view/adminhtml/web/system/validation-rules.js similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/system/validation-rules.js rename to app/code/Magento/Backend/view/adminhtml/web/system/validation-rules.js diff --git a/app/code/Magento/Backend/view/adminhtml/variables.js b/app/code/Magento/Backend/view/adminhtml/web/variables.js similarity index 100% rename from app/code/Magento/Backend/view/adminhtml/variables.js rename to app/code/Magento/Backend/view/adminhtml/web/variables.js diff --git a/app/code/Magento/Backend/view/install/page/copyright.phtml b/app/code/Magento/Backend/view/install/templates/page/copyright.phtml similarity index 100% rename from app/code/Magento/Backend/view/install/page/copyright.phtml rename to app/code/Magento/Backend/view/install/templates/page/copyright.phtml diff --git a/app/code/Magento/Backup/Model/Backup.php b/app/code/Magento/Backup/Model/Backup.php index 4c7f346bb9382666cac08c65e0e803d3e0018997..a3c64cabe044cb12762bc64d0c351166a0523a21 100644 --- a/app/code/Magento/Backup/Model/Backup.php +++ b/app/code/Magento/Backup/Model/Backup.php @@ -32,7 +32,9 @@ namespace Magento\Backup\Model; */ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Backup\Db\BackupInterface { - /* internal constants */ + /** + * Compress rate + */ const COMPRESS_RATE = 9; /** diff --git a/app/code/Magento/Backup/etc/adminhtml/acl.xml b/app/code/Magento/Backup/etc/adminhtml/acl.xml index 711e6a5e93e2759223fc0a42ec92b1b8223edc79..eb2139dc270aa411673188926176803f95a8f21c 100644 --- a/app/code/Magento/Backup/etc/adminhtml/acl.xml +++ b/app/code/Magento/Backup/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Backup/etc/adminhtml/routes.xml b/app/code/Magento/Backup/etc/adminhtml/routes.xml index 6d2680abc8be76f95d2314031eb9a9059d4105fc..7d2605f49171a162821455380e3b548310cc79c3 100644 --- a/app/code/Magento/Backup/etc/adminhtml/routes.xml +++ b/app/code/Magento/Backup/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="backup" frontName="backup"> <module name="Magento_Backup_Adminhtml" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Backup/etc/di.xml b/app/code/Magento/Backup/etc/di.xml index daae7349bb0d8ca78fe2fe0df68576600749e90c..4b1d7a387e44cda0df8c31780705e5cdaef56184 100644 --- a/app/code/Magento/Backup/etc/di.xml +++ b/app/code/Magento/Backup/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Backup\Db\BackupFactory"> <arguments> <argument name="backupInstanceName" xsi:type="string">Magento\Backup\Model\Backup</argument> diff --git a/app/code/Magento/Backup/etc/module.xml b/app/code/Magento/Backup/etc/module.xml index b29273583a50da9b23231cc040f07728d51320a2..9009e6191b1c0d6dbdc1af5ca3b497dd9e2f3aeb 100644 --- a/app/code/Magento/Backup/etc/module.xml +++ b/app/code/Magento/Backup/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Backup" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Backup/view/adminhtml/backup/dialogs.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml similarity index 100% rename from app/code/Magento/Backup/view/adminhtml/backup/dialogs.phtml rename to app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml diff --git a/app/code/Magento/Backup/view/adminhtml/backup/left.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/left.phtml similarity index 100% rename from app/code/Magento/Backup/view/adminhtml/backup/left.phtml rename to app/code/Magento/Backup/view/adminhtml/templates/backup/left.phtml diff --git a/app/code/Magento/Backup/view/adminhtml/backup/list.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml similarity index 100% rename from app/code/Magento/Backup/view/adminhtml/backup/list.phtml rename to app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml diff --git a/app/code/Magento/Bundle/etc/adminhtml/di.xml b/app/code/Magento/Bundle/etc/adminhtml/di.xml index 671f3a22e4ed71122b974d19a88244bd96bd4796..59d4ad89ff9ec4a90179ce58bd5e51a5f3ae19ea 100644 --- a/app/code/Magento/Bundle/etc/adminhtml/di.xml +++ b/app/code/Magento/Bundle/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Sales\Model\Convert\Quote"> <plugin name="append_bundle_data_to_order" type="Magento\Bundle\Model\Plugin\QuoteItem"/> </type> diff --git a/app/code/Magento/Bundle/etc/adminhtml/events.xml b/app/code/Magento/Bundle/etc/adminhtml/events.xml index ce0feb2bdb3cd58daed4d3c3b491ccec0b3dad74..d58ff7c569d4886e71962d7b45c043836c4b5183 100644 --- a/app/code/Magento/Bundle/etc/adminhtml/events.xml +++ b/app/code/Magento/Bundle/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_edit_action"> <observer name="bundle_observer" instance="Magento\Bundle\Model\Observer" method="setAttributeTabBlock" /> </event> diff --git a/app/code/Magento/Bundle/etc/adminhtml/routes.xml b/app/code/Magento/Bundle/etc/adminhtml/routes.xml index 0d5063e93bf0af30e1cb153b9fd5cef3c344f3c2..aadcdb84a50143af0ebcb57e8ce07e08216bfb43 100644 --- a/app/code/Magento/Bundle/etc/adminhtml/routes.xml +++ b/app/code/Magento/Bundle/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Bundle" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Bundle/etc/di.xml b/app/code/Magento/Bundle/etc/di.xml index 2fb137e4cdfcb7fa8f311d7f7bb4f00ba991d4fa..ecdb2efc911202029fa9f527d29a96e2326fdbe3 100644 --- a/app/code/Magento/Bundle/etc/di.xml +++ b/app/code/Magento/Bundle/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Bundle\Model\Source\Option\Type"> <arguments> <argument name="options" xsi:type="array"> diff --git a/app/code/Magento/Bundle/etc/frontend/di.xml b/app/code/Magento/Bundle/etc/frontend/di.xml index 6c2c3bdfc3315e94bb0cc001446c476a2986c819..5fad6e0b2e4a2ef38d81c5285b1b926e1099582e 100644 --- a/app/code/Magento/Bundle/etc/frontend/di.xml +++ b/app/code/Magento/Bundle/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Sales\Model\Convert\Quote"> <plugin name="append_bundle_data_to_order" type="Magento\Bundle\Model\Plugin\QuoteItem"/> </type> diff --git a/app/code/Magento/Bundle/etc/frontend/events.xml b/app/code/Magento/Bundle/etc/frontend/events.xml index 2c6e534ac1f76f386077012e443153839ce959fd..1b393d50f7377ce4dda565f6502b74ae397cc834 100644 --- a/app/code/Magento/Bundle/etc/frontend/events.xml +++ b/app/code/Magento/Bundle/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_upsell"> <observer name="bundle_observer" instance="Magento\Bundle\Model\Observer" method="appendUpsellProducts" /> </event> diff --git a/app/code/Magento/Bundle/etc/module.xml b/app/code/Magento/Bundle/etc/module.xml index 2835b8d28c6562cad53a341ea34c276b4f8a76ea..8c1f43a62a039b2417725f4b83d5d4ec44b620fc 100644 --- a/app/code/Magento/Bundle/etc/module.xml +++ b/app/code/Magento/Bundle/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Bundle" version="1.6.0.0.2" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/bundle.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/bundle.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/checkbox.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/checkbox.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/checkbox.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/checkbox.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/multi.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/multi.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/multi.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/multi.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/radio.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/radio.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/radio.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/radio.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/select.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/select.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/composite/fieldset/options/type/select.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/type/select.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/edit/bundle.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/edit/bundle.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/edit/bundle/option.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/edit/bundle/option.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/edit/bundle/option/search.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/search.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/edit/bundle/option/search.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/search.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/edit/bundle/option/selection.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/edit/bundle/option/selection.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/product/stock/disabler.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/stock/disabler.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/stock/disabler.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/product/stock/disabler.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml rename to app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/adminhtml/css/bundle-product.css b/app/code/Magento/Bundle/view/adminhtml/web/css/bundle-product.css similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/css/bundle-product.css rename to app/code/Magento/Bundle/view/adminhtml/web/css/bundle-product.css diff --git a/app/code/Magento/Bundle/view/adminhtml/js/bundle-product.js b/app/code/Magento/Bundle/view/adminhtml/web/js/bundle-product.js similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/js/bundle-product.js rename to app/code/Magento/Bundle/view/adminhtml/web/js/bundle-product.js diff --git a/app/code/Magento/Bundle/view/adminhtml/product/validation-rules.js b/app/code/Magento/Bundle/view/adminhtml/web/product/validation-rules.js similarity index 100% rename from app/code/Magento/Bundle/view/adminhtml/product/validation-rules.js rename to app/code/Magento/Bundle/view/adminhtml/web/product/validation-rules.js diff --git a/app/code/Magento/Bundle/view/base/product/price/final_price.phtml b/app/code/Magento/Bundle/view/base/templates/product/price/final_price.phtml similarity index 100% rename from app/code/Magento/Bundle/view/base/product/price/final_price.phtml rename to app/code/Magento/Bundle/view/base/templates/product/price/final_price.phtml diff --git a/app/code/Magento/Bundle/view/base/product/price/selection/amount.phtml b/app/code/Magento/Bundle/view/base/templates/product/price/selection/amount.phtml similarity index 100% rename from app/code/Magento/Bundle/view/base/product/price/selection/amount.phtml rename to app/code/Magento/Bundle/view/base/templates/product/price/selection/amount.phtml diff --git a/app/code/Magento/Bundle/view/base/product/price/tier_prices.phtml b/app/code/Magento/Bundle/view/base/templates/product/price/tier_prices.phtml similarity index 100% rename from app/code/Magento/Bundle/view/base/product/price/tier_prices.phtml rename to app/code/Magento/Bundle/view/base/templates/product/price/tier_prices.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/backbutton.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/backbutton.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/backbutton.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/backbutton.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/customize.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/customize.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/customize.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/customize.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/options/notice.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/options/notice.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/options/notice.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/options/notice.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/summary.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/summary.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/checkbox.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/checkbox.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/multi.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/multi.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/radio.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/radio.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml rename to app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml diff --git a/app/code/Magento/Bundle/view/frontend/email/order/items/creditmemo/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/creditmemo/default.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/email/order/items/creditmemo/default.phtml rename to app/code/Magento/Bundle/view/frontend/templates/email/order/items/creditmemo/default.phtml diff --git a/app/code/Magento/Bundle/view/frontend/email/order/items/invoice/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/invoice/default.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/email/order/items/invoice/default.phtml rename to app/code/Magento/Bundle/view/frontend/templates/email/order/items/invoice/default.phtml diff --git a/app/code/Magento/Bundle/view/frontend/email/order/items/order/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/order/default.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/email/order/items/order/default.phtml rename to app/code/Magento/Bundle/view/frontend/templates/email/order/items/order/default.phtml diff --git a/app/code/Magento/Bundle/view/frontend/email/order/items/shipment/default.phtml b/app/code/Magento/Bundle/view/frontend/templates/email/order/items/shipment/default.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/email/order/items/shipment/default.phtml rename to app/code/Magento/Bundle/view/frontend/templates/email/order/items/shipment/default.phtml diff --git a/app/code/Magento/Bundle/view/frontend/js/components.phtml b/app/code/Magento/Bundle/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/js/components.phtml rename to app/code/Magento/Bundle/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Bundle/view/frontend/rss/catalog/product/price.phtml b/app/code/Magento/Bundle/view/frontend/templates/rss/catalog/product/price.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/rss/catalog/product/price.phtml rename to app/code/Magento/Bundle/view/frontend/templates/rss/catalog/product/price.phtml diff --git a/app/code/Magento/Bundle/view/frontend/sales/order/creditmemo/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/creditmemo/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/sales/order/creditmemo/items/renderer.phtml rename to app/code/Magento/Bundle/view/frontend/templates/sales/order/creditmemo/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/frontend/sales/order/invoice/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/invoice/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/sales/order/invoice/items/renderer.phtml rename to app/code/Magento/Bundle/view/frontend/templates/sales/order/invoice/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/frontend/sales/order/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/sales/order/items/renderer.phtml rename to app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/frontend/sales/order/shipment/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/shipment/items/renderer.phtml similarity index 100% rename from app/code/Magento/Bundle/view/frontend/sales/order/shipment/items/renderer.phtml rename to app/code/Magento/Bundle/view/frontend/templates/sales/order/shipment/items/renderer.phtml diff --git a/app/code/Magento/Bundle/view/frontend/bundle.js b/app/code/Magento/Bundle/view/frontend/web/bundle.js similarity index 100% rename from app/code/Magento/Bundle/view/frontend/bundle.js rename to app/code/Magento/Bundle/view/frontend/web/bundle.js diff --git a/app/code/Magento/Bundle/view/frontend/js/float.js b/app/code/Magento/Bundle/view/frontend/web/js/float.js similarity index 100% rename from app/code/Magento/Bundle/view/frontend/js/float.js rename to app/code/Magento/Bundle/view/frontend/web/js/float.js diff --git a/app/code/Magento/Bundle/view/frontend/js/product-summary.js b/app/code/Magento/Bundle/view/frontend/web/js/product-summary.js similarity index 100% rename from app/code/Magento/Bundle/view/frontend/js/product-summary.js rename to app/code/Magento/Bundle/view/frontend/web/js/product-summary.js diff --git a/app/code/Magento/Bundle/view/frontend/js/slide.js b/app/code/Magento/Bundle/view/frontend/web/js/slide.js similarity index 100% rename from app/code/Magento/Bundle/view/frontend/js/slide.js rename to app/code/Magento/Bundle/view/frontend/web/js/slide.js diff --git a/app/code/Magento/Captcha/Helper/Data.php b/app/code/Magento/Captcha/Helper/Data.php index 639e9cc471abe41c0d7b0ba56435327012cd2b68..581e52566d343e8b6345be52181ab5015bae6169 100644 --- a/app/code/Magento/Captcha/Helper/Data.php +++ b/app/code/Magento/Captcha/Helper/Data.php @@ -150,7 +150,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper $fontsConfig = $this->_config->getValue(\Magento\Captcha\Helper\Data::XML_PATH_CAPTCHA_FONTS, 'default'); $fonts = array(); if ($fontsConfig) { - $libDir = $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::LIB_DIR); + $libDir = $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::LIB_INTERNAL); foreach ($fontsConfig as $fontName => $fontConfig) { $fonts[$fontName] = array( 'label' => $fontConfig['label'], diff --git a/app/code/Magento/Captcha/etc/adminhtml/di.xml b/app/code/Magento/Captcha/etc/adminhtml/di.xml index e9583da9bee3e1fca79d63eb6566bf389eec64c4..fd2bbe8d1d20a5e3151c1900756e4dd0c6d183df 100644 --- a/app/code/Magento/Captcha/etc/adminhtml/di.xml +++ b/app/code/Magento/Captcha/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Captcha\Block\Captcha\DefaultCaptcha" type="Magento\Captcha\Block\Adminhtml\Captcha\DefaultCaptcha" /> <type name="Magento\Captcha\Model\DefaultModel"> <arguments> diff --git a/app/code/Magento/Captcha/etc/adminhtml/events.xml b/app/code/Magento/Captcha/etc/adminhtml/events.xml index ede8e0bd0745e30703606ee912f9ec73c252f470..9b07f5c920b3a8272da4300b09b51b5e99ea8b51 100644 --- a/app/code/Magento/Captcha/etc/adminhtml/events.xml +++ b/app/code/Magento/Captcha/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_predispatch_adminhtml_auth_forgotpassword"> <observer name="captcha" instance="Magento\Captcha\Model\Observer" method="checkUserForgotPasswordBackend" /> </event> diff --git a/app/code/Magento/Captcha/etc/adminhtml/routes.xml b/app/code/Magento/Captcha/etc/adminhtml/routes.xml index 087af2f92d145f50969cbcf46b31170e35596552..4ca5539729d8174b685d7506d19f5ab83b0763d3 100644 --- a/app/code/Magento/Captcha/etc/adminhtml/routes.xml +++ b/app/code/Magento/Captcha/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Captcha" /> diff --git a/app/code/Magento/Captcha/etc/crontab/di.xml b/app/code/Magento/Captcha/etc/crontab/di.xml index 98ea440954293c1522f1a7bc0716a4e0585e2782..fbfccae1431dc76199efd36afc3d0ddaf4e515ff 100644 --- a/app/code/Magento/Captcha/etc/crontab/di.xml +++ b/app/code/Magento/Captcha/etc/crontab/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Backend\App\ConfigInterface" type="Magento\Backend\App\Config" /> </config> diff --git a/app/code/Magento/Captcha/etc/di.xml b/app/code/Magento/Captcha/etc/di.xml index f5d02d44c3f388530406b3b154586352a2826279..0ed5bb7f3219bd3de03ed3d0b9e6441ef08e84d4 100644 --- a/app/code/Magento/Captcha/etc/di.xml +++ b/app/code/Magento/Captcha/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Captcha\Model\DefaultModel"> <arguments> <argument name="session" xsi:type="object">Magento\Customer\Model\Session</argument> diff --git a/app/code/Magento/Captcha/etc/events.xml b/app/code/Magento/Captcha/etc/events.xml index 538366dfa5d254366b4e924e41e2358db0adebac..51a60659e1c3a99900251334c8201e2f38a148a0 100644 --- a/app/code/Magento/Captcha/etc/events.xml +++ b/app/code/Magento/Captcha/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_predispatch_customer_account_loginPost"> <observer name="captcha" instance="Magento\Captcha\Model\Observer" method="checkUserLogin" /> </event> diff --git a/app/code/Magento/Captcha/etc/frontend/events.xml b/app/code/Magento/Captcha/etc/frontend/events.xml index 6ef1d064678b5dee81e73909d885c995efe19dae..846dd3a3740c7e167ab7c20c040baf84d51d79d7 100644 --- a/app/code/Magento/Captcha/etc/frontend/events.xml +++ b/app/code/Magento/Captcha/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_predispatch_contact_index_post"> <observer name="captcha_contact_us_form" instance="Magento\Captcha\Model\Observer" method="checkContactUsForm" /> </event> diff --git a/app/code/Magento/Captcha/etc/frontend/routes.xml b/app/code/Magento/Captcha/etc/frontend/routes.xml index d655defad2e29967160c690cad4fe782b832c39a..34fa909fa2461d931c451b383a9216966d9a09b3 100644 --- a/app/code/Magento/Captcha/etc/frontend/routes.xml +++ b/app/code/Magento/Captcha/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="captcha" frontName="captcha"> <module name="Magento_Captcha" /> diff --git a/app/code/Magento/Captcha/etc/module.xml b/app/code/Magento/Captcha/etc/module.xml index f36473c5ae67099ce3ba3b8b45665457b2f3866e..4bc5e602611f10df4ae5343f96fbd8d55993587d 100644 --- a/app/code/Magento/Captcha/etc/module.xml +++ b/app/code/Magento/Captcha/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Captcha" version="1.7.0.0.0" active="true"> <sequence> <module name="Magento_Customer"/> diff --git a/app/code/Magento/Captcha/view/adminhtml/default.phtml b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml similarity index 100% rename from app/code/Magento/Captcha/view/adminhtml/default.phtml rename to app/code/Magento/Captcha/view/adminhtml/templates/default.phtml diff --git a/app/code/Magento/Captcha/view/adminhtml/reload.png b/app/code/Magento/Captcha/view/adminhtml/web/reload.png similarity index 100% rename from app/code/Magento/Captcha/view/adminhtml/reload.png rename to app/code/Magento/Captcha/view/adminhtml/web/reload.png diff --git a/app/code/Magento/Captcha/view/frontend/default.phtml b/app/code/Magento/Captcha/view/frontend/templates/default.phtml similarity index 100% rename from app/code/Magento/Captcha/view/frontend/default.phtml rename to app/code/Magento/Captcha/view/frontend/templates/default.phtml diff --git a/app/code/Magento/Captcha/view/frontend/js/components.phtml b/app/code/Magento/Captcha/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Captcha/view/frontend/js/components.phtml rename to app/code/Magento/Captcha/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Captcha/view/frontend/captcha.js b/app/code/Magento/Captcha/view/frontend/web/captcha.js similarity index 100% rename from app/code/Magento/Captcha/view/frontend/captcha.js rename to app/code/Magento/Captcha/view/frontend/web/captcha.js diff --git a/app/code/Magento/Captcha/view/frontend/onepage.js b/app/code/Magento/Captcha/view/frontend/web/onepage.js similarity index 100% rename from app/code/Magento/Captcha/view/frontend/onepage.js rename to app/code/Magento/Captcha/view/frontend/web/onepage.js diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php index 39baead916a35f0df834e571e66b9bc476403b5c..89c5e57c17d2383d361456a913b3fa480bddaf82 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php @@ -54,15 +54,15 @@ class BaseImage extends \Magento\Framework\Data\Form\Element\AbstractElement protected $_fileConfig; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection * @param \Magento\Framework\Escaper $escaper - * @param \Magento\Framework\View\UrlFactory $coreViewUrlFactory + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Backend\Model\UrlFactory $backendUrlFactory * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Framework\File\Size $fileConfig @@ -72,7 +72,7 @@ class BaseImage extends \Magento\Framework\Data\Form\Element\AbstractElement \Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, - \Magento\Framework\View\UrlFactory $coreViewUrlFactory, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Backend\Model\UrlFactory $backendUrlFactory, \Magento\Catalog\Helper\Data $catalogData, \Magento\Framework\File\Size $fileConfig, @@ -80,7 +80,7 @@ class BaseImage extends \Magento\Framework\Data\Form\Element\AbstractElement ) { parent::__construct($factoryElement, $factoryCollection, $escaper, $data); - $this->_viewUrl = $coreViewUrlFactory->create(); + $this->_assetRepo = $assetRepo; $this->_url = $backendUrlFactory->create(); $this->_catalogHelperData = $catalogData; $this->_fileConfig = $fileConfig; @@ -106,7 +106,7 @@ class BaseImage extends \Magento\Framework\Data\Form\Element\AbstractElement { $htmlId = $this->_escaper->escapeHtml($this->getHtmlId()); $uploadUrl = $this->_escaper->escapeHtml($this->_getUploadUrl()); - $spacerImage = $this->_viewUrl->getViewFileUrl('images/spacer.gif'); + $spacerImage = $this->_assetRepo->getUrl('images/spacer.gif'); $imagePlaceholderText = __('Click here or drag and drop to add images'); $deleteImageText = __('Delete image'); $makeBaseText = __('Make Base'); diff --git a/app/code/Magento/Catalog/Block/Product/Context.php b/app/code/Magento/Catalog/Block/Product/Context.php index 67b96d869ff8affdd94bd8fcd4c3ea2b3e8961ac..4abf2def9af5de0406b2c692c92a0fbab7b4780e 100644 --- a/app/code/Magento/Catalog/Block/Product/Context.php +++ b/app/code/Magento/Catalog/Block/Product/Context.php @@ -90,8 +90,8 @@ class Context extends \Magento\Framework\View\Element\Template\Context * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Framework\Session\SessionManagerInterface $session * @param \Magento\Framework\Session\SidResolverInterface $sidResolver - * @param \Magento\Framework\App\Config\ScopeConfigInterface|\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\ConfigInterface $viewConfig * @param \Magento\Framework\App\Cache\StateInterface $cacheState * @param \Magento\Framework\Logger $logger @@ -129,7 +129,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\Logger $logger, @@ -176,7 +176,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context $session, $sidResolver, $scopeConfig, - $viewUrl, + $assetRepo, $viewConfig, $cacheState, $logger, diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index 955eb666af1417933cd9ea4eabf59277860db7ea..2532b4196ad1ae8ebf6a7dcc874ec74f5771b543 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -674,6 +674,8 @@ class Toolbar extends \Magento\Framework\View\Element\Template 'design/pagination/pagination_frame_skip', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ) + )->setLimit( + $this->getLimit() )->setCollection( $this->getCollection() ); diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index 4cdf3deb549c69d8e8645a59b6ec687a7419c637..c8b88b31b05335e446f331635eab139d29e40d61 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -108,9 +108,9 @@ class Image extends AbstractHelper protected $_placeholder; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * Core store config @@ -129,19 +129,19 @@ class Image extends AbstractHelper /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Catalog\Model\Product\ImageFactory $productImageFactory - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Catalog\Model\Product\ImageFactory $productImageFactory, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig ) { $this->_productImageFactory = $productImageFactory; parent::__construct($context); $this->_scopeConfig = $scopeConfig; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; } /** @@ -434,7 +434,7 @@ class Image extends AbstractHelper protected function getDefaultPlaceholderUrl() { try { - $url = $this->_viewUrl->getViewFileUrl($this->getPlaceholder()); + $url = $this->_assetRepo->getUrl($this->getPlaceholder()); } catch (\Exception $e) { $this->_logger->logException($e); $url = $this->_urlBuilder->getUrl('', array('_direct' => 'core/index/notfound')); diff --git a/app/code/Magento/Catalog/Helper/Product.php b/app/code/Magento/Catalog/Helper/Product.php index 39d2448ee927f5036da6c32a95773b26d717dd59..efd153138e2287b09fb1c7f484d89f1530ef2fef 100644 --- a/app/code/Magento/Catalog/Helper/Product.php +++ b/app/code/Magento/Catalog/Helper/Product.php @@ -64,9 +64,9 @@ class Product extends \Magento\Core\Helper\Url protected $_priceBlock; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * Core registry @@ -136,7 +136,7 @@ class Product extends \Magento\Core\Helper\Url * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Catalog\Model\Session $catalogSession - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Catalog\Model\Attribute\Config $attributeConfig * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig @@ -150,7 +150,7 @@ class Product extends \Magento\Core\Helper\Url \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Catalog\Model\Session $catalogSession, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\Registry $coreRegistry, \Magento\Catalog\Model\Attribute\Config $attributeConfig, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -165,7 +165,7 @@ class Product extends \Magento\Core\Helper\Url $this->_attributeConfig = $attributeConfig; $this->_coreRegistry = $coreRegistry; $this->_scopeConfig = $scopeConfig; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_coreConfig = $coreConfig; $this->_logger = $context->getLogger(); $this->_reindexPriceIndexerData = $reindexPriceIndexerData; @@ -250,7 +250,7 @@ class Product extends \Magento\Core\Helper\Url $url = false; $attribute = $product->getResource()->getAttribute('image'); if (!$product->getImage()) { - $url = $this->_viewUrl->getViewFileUrl('Magento_Catalog::images/product/placeholder/image.jpg'); + $url = $this->_assetRepo->getUrl('Magento_Catalog::images/product/placeholder/image.jpg'); } elseif ($attribute) { $url = $attribute->getFrontend()->getUrl($product); } @@ -268,7 +268,7 @@ class Product extends \Magento\Core\Helper\Url $url = false; $attribute = $product->getResource()->getAttribute('small_image'); if (!$product->getSmallImage()) { - $url = $this->_viewUrl->getViewFileUrl('Magento_Catalog::images/product/placeholder/small_image.jpg'); + $url = $this->_assetRepo->getUrl('Magento_Catalog::images/product/placeholder/small_image.jpg'); } elseif ($attribute) { $url = $attribute->getFrontend()->getUrl($product); } diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php index c4e0aa98e49c670651c4b16b426bf3504f8ac604..cc8b28d2865d7d5100457443cc1849145a36b13f 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -140,9 +140,9 @@ class Image extends \Magento\Framework\Model\AbstractModel protected $_imageFactory; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Framework\View\FileSystem @@ -185,7 +185,7 @@ class Image extends \Magento\Framework\Model\AbstractModel * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase * @param \Magento\Framework\App\Filesystem $filesystem * @param \Magento\Framework\Image\Factory $imageFactory - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\FileSystem $viewFileSystem * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Model\Resource\AbstractResource $resource @@ -200,7 +200,7 @@ class Image extends \Magento\Framework\Model\AbstractModel \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, \Magento\Framework\App\Filesystem $filesystem, \Magento\Framework\Image\Factory $imageFactory, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Model\Resource\AbstractResource $resource = null, @@ -214,7 +214,7 @@ class Image extends \Magento\Framework\Model\AbstractModel $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); $this->_mediaDirectory->create($this->_catalogProductMediaConfig->getBaseMediaPath()); $this->_imageFactory = $imageFactory; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_viewFileSystem = $viewFileSystem; $this->_scopeConfig = $scopeConfig; } @@ -663,17 +663,12 @@ class Image extends \Magento\Framework\Model\AbstractModel $filePath = $this->_getWatermarkFilePath(); if ($filePath) { - $this->getImageProcessor()->setWatermarkPosition( - $this->getWatermarkPosition() - )->setWatermarkImageOpacity( - $this->getWatermarkImageOpacity() - )->setWatermarkWidth( - $this->getWatermarkWidth() - )->setWatermarkHeight( - $this->getWatermarkHeight() - )->watermark( - $filePath - ); + $imagePreprocessor = $this->getImageProcessor(); + $imagePreprocessor->setWatermarkPosition($this->getWatermarkPosition()); + $imagePreprocessor->setWatermarkImageOpacity($this->getWatermarkImageOpacity()); + $imagePreprocessor->setWatermarkWidth($this->getWatermarkWidth()); + $imagePreprocessor->setWatermarkHeight($this->getWatermarkHeight()); + $imagePreprocessor->watermark($filePath); } return $this; @@ -699,7 +694,7 @@ class Image extends \Magento\Framework\Model\AbstractModel public function getUrl() { if ($this->_newFile === true) { - $url = $this->_viewUrl->getViewFileUrl( + $url = $this->_assetRepo->getUrl( "Magento_Catalog::images/product/placeholder/{$this->getDestinationSubdir()}.jpg" ); } else { @@ -789,10 +784,7 @@ class Image extends \Magento\Framework\Model\AbstractModel } } if (!$filePath) { - $viewFile = $this->_viewFileSystem->getViewFile($file); - if ($this->_mediaDirectory->isFile($this->_mediaDirectory->getRelativePath($viewFile))) { - $filePath = $viewFile; - } + $filePath = $this->_viewFileSystem->getStaticFileName($file); } return $filePath; diff --git a/app/code/Magento/Catalog/Model/Template/Filter.php b/app/code/Magento/Catalog/Model/Template/Filter.php index 7f9ab2732ab6f195dbb6d1db538fcd1f35809fb9..05ca31624675063a8d497abbd09ae0871f8cd150 100644 --- a/app/code/Magento/Catalog/Model/Template/Filter.php +++ b/app/code/Magento/Catalog/Model/Template/Filter.php @@ -48,9 +48,9 @@ class Filter extends \Magento\Framework\Filter\Template protected $_useSessionInUrl = false; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * Store manager @@ -62,17 +62,17 @@ class Filter extends \Magento\Framework\Filter\Template /** * @param \Magento\Framework\Stdlib\String $string * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param array $variables */ public function __construct( \Magento\Framework\Stdlib\String $string, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, $variables = array() ) { $this->_storeManager = $storeManager; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; parent::__construct($string, $variables); } @@ -112,8 +112,20 @@ class Filter extends \Magento\Framework\Filter\Template { $params = $this->_getIncludeParameters($construction[2]); $params['_absolute'] = $this->_useAbsoluteLinks; - - $url = $this->_viewUrl->getViewFileUrl($params['url'], $params); + /** + * @bug: the "_absolute" key is not supported by underlying services + * probably this happened because of multitude of refactorings in past + * The original intent of _absolute parameter was to simply append specified path to a base URL + * bypassing any kind of processing. + * For example, normally you would use {{view url="css/styles.css"}} directive which would automatically resolve + * into something like http://example.com/pub/static/area/theme/en_US/css/styles.css + * But with _absolute, the expected behavior is this: {{view url="favicon.ico" _absolute=true}} should resolve + * into something like http://example.com/favicon.ico + * + * To fix the issue, it is better not to maintain the _absolute parameter anymore in undrelying services, + * but instead just create a different type of directive, for example {{baseUrl path="favicon.ico"}} + */ + $url = $this->_assetRepo->getUrlWithParams($params['url'], $params); return $url; } diff --git a/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php b/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php index 978aedb33a6a8660c973bc4fc1855149c44521e4..1498d9f2ebc1935c4eb6855379accae6c3f55f40 100644 --- a/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php +++ b/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php @@ -78,19 +78,19 @@ class ConfiguredPrice extends FinalPrice implements ConfiguredPriceInterface { $product = $this->item->getProduct(); $value = 0.; + $basePrice = parent::getValue(); $optionIds = $this->item->getOptionByCode('option_ids'); if ($optionIds) { foreach (explode(',', $optionIds->getValue()) as $optionId) { $option = $product->getOptionById($optionId); if ($option) { - /** @var \Magento\Wishlist\Model\Item\Option $itemOption */ $itemOption = $this->item->getOptionByCode('option_' . $option->getId()); /** @var $group \Magento\Catalog\Model\Product\Option\Type\DefaultType */ $group = $option->groupFactory($option->getType()) ->setOption($option) ->setConfigurationItem($this->item) ->setConfigurationItemOption($itemOption); - $value += $group->getOptionPrice($itemOption->getValue(), $this->value); + $value += $group->getOptionPrice($itemOption->getValue(), $basePrice); } } } diff --git a/app/code/Magento/Catalog/etc/adminhtml/acl.xml b/app/code/Magento/Catalog/etc/adminhtml/acl.xml index 9a24e46fd55819ba174a3dc04629685a2f7a1d2c..ca0bad3473dc208cefca91b11dd0cd95bc5e9590 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/acl.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Catalog/etc/adminhtml/di.xml b/app/code/Magento/Catalog/etc/adminhtml/di.xml index 8f744fcbbf427a2a3939aeb8697a8eb6a5a75334..e0ffc5299d76f166f33d282829afef0001657810 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/di.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\HandlerInterface" type="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Handler\Composite" /> <type name="Magento\Catalog\Controller\Adminhtml\Product\Attribute"> <arguments> diff --git a/app/code/Magento/Catalog/etc/adminhtml/events.xml b/app/code/Magento/Catalog/etc/adminhtml/events.xml index 24fdb65f64e5819fa41594dbce5eda7987466fb3..0d4c6042709e1d2bdc692e4cc182d4a3a1f149f6 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/events.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="cms_wysiwyg_images_static_urls_allowed"> <observer name="catalog_wysiwyg" instance="Magento\Catalog\Model\Observer" method="catalogCheckIsUsingStaticUrlsAllowed" /> </event> diff --git a/app/code/Magento/Catalog/etc/adminhtml/routes.xml b/app/code/Magento/Catalog/etc/adminhtml/routes.xml index 6b5d0d4dfa07135055730956f7fda55864b116f6..570765a51933b3776410e63d4c93a22a01341da9 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/routes.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="catalog" frontName="catalog"> <module name="Magento_Catalog_Adminhtml" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml index 94c82da0d55918e08828fa04d5e5c49ba8c108d7..ddd2b82bd7001009edd889482e6b43d5fabc9e47 100644 --- a/app/code/Magento/Catalog/etc/di.xml +++ b/app/code/Magento/Catalog/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Catalog\Model\ProductTypes\ConfigInterface" type="Magento\Catalog\Model\ProductTypes\Config" /> <preference for="Magento\Catalog\Model\ProductOptions\ConfigInterface" type="Magento\Catalog\Model\ProductOptions\Config" /> <preference for="Magento\Catalog\Model\Product\PriceModifierInterface" type="Magento\Catalog\Model\Product\PriceModifier\Composite" /> diff --git a/app/code/Magento/Catalog/etc/events.xml b/app/code/Magento/Catalog/etc/events.xml index 85d42fa8ff76a18fad6bedecc45e2d28f80975e2..435dd539fb907bd1fd734703c59d50970e9edb3d 100644 --- a/app/code/Magento/Catalog/etc/events.xml +++ b/app/code/Magento/Catalog/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_category_save_commit_after"> <observer name="fulltext_reindex" instance="Magento\Catalog\Model\Observer\Reindex" method="fulltextReindex" /> </event> diff --git a/app/code/Magento/Catalog/etc/frontend/di.xml b/app/code/Magento/Catalog/etc/frontend/di.xml index bee7ff9671a387c12cd0834506176c279cca8a7b..51914835414d67ce56bd5947fb21232e1616503f 100644 --- a/app/code/Magento/Catalog/etc/frontend/di.xml +++ b/app/code/Magento/Catalog/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Catalog\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">frontend</argument> diff --git a/app/code/Magento/Catalog/etc/frontend/events.xml b/app/code/Magento/Catalog/etc/frontend/events.xml index 7b8ab5c9701bcfac19fcf04c9d0b332f3985e172..eee61b3ec64d561893cb0d03e32ecab93fb9eea1 100644 --- a/app/code/Magento/Catalog/etc/frontend/events.xml +++ b/app/code/Magento/Catalog/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="customer_login"> <observer name="catalog" instance="Magento\Catalog\Model\Product\Compare\Item" method="bindCustomerLogin" shared="false" /> </event> diff --git a/app/code/Magento/Catalog/etc/frontend/routes.xml b/app/code/Magento/Catalog/etc/frontend/routes.xml index 3f9c81ced745f53eb082e063cb7e74e6aeed622d..de70ebef3cb92660b301f05ecb336b862a21ca05 100644 --- a/app/code/Magento/Catalog/etc/frontend/routes.xml +++ b/app/code/Magento/Catalog/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="catalog" frontName="catalog"> <module name="Magento_Catalog" /> diff --git a/app/code/Magento/Catalog/etc/module.xml b/app/code/Magento/Catalog/etc/module.xml index 941b93fa365400a992506d6b2475582c97275ced..32387b3f84067e3a93f07dec780c6cd7efaf6ef4 100644 --- a/app/code/Magento/Catalog/etc/module.xml +++ b/app/code/Magento/Catalog/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Catalog" version="1.6.0.0.26" active="true"> <sequence> <module name="Magento_Eav"/> diff --git a/app/code/Magento/Catalog/etc/mview.xml b/app/code/Magento/Catalog/etc/mview.xml index a371d1066b821400691d6d3e6b32037069c93bc9..c946a57c53e60bc4ab7d4e100fd22bde6d24f302 100644 --- a/app/code/Magento/Catalog/etc/mview.xml +++ b/app/code/Magento/Catalog/etc/mview.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Mview/etc/mview.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Mview/etc/mview.xsd"> <view id="catalog_category_flat" class="Magento\Catalog\Model\Indexer\Category\Flat" group="indexer"> <subscriptions> <table name="catalog_category_entity" entity_column="entity_id" /> diff --git a/app/code/Magento/Catalog/etc/view.xml b/app/code/Magento/Catalog/etc/view.xml index 237c595ea091044617a1ed63e4000a465cec3bfc..e3f515cdb2d3573554cbd49d26bea3e756cbac57 100644 --- a/app/code/Magento/Catalog/etc/view.xml +++ b/app/code/Magento/Catalog/etc/view.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Magento_Catalog"> <var name="product_image_white_borders">1</var> <var name="product_thumbnail_image_sidebar_size">50</var> <!-- Product thumbnail image size in sidebar --> diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category/checkboxes/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category/checkboxes/tree.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category/edit.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category/edit.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category/edit/form.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/form.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category/edit/form.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/form.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category/tree.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category/widget/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category/widget/tree.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/form/renderer/fieldset/element.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/form/renderer/fieldset/element.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/form.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/form.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/form.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/form.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/js.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/labels.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/labels.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/options.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main/tree/attribute.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/attribute.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main/tree/attribute.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/attribute.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main/tree/group.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/main/tree/group.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/add.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/add.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/main.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/main.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/configure.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/js.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/js.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/js.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/default.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/default.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/default.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/default.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/file.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/select.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/select.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/select.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/select.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/text.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/options/type/text.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/qty.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/qty.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/action/attribute.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/attribute.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/action/attribute.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/attribute.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/action/inventory.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/action/inventory.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/action/websites.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/action/websites.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/attribute_set.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/attribute_set.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/category/new/form.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/category/new/form.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/option.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/option.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/date.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/file.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/select.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/select.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/text.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/options/type/text.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/group.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/group.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/tier.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/price/tier.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/serializer.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/serializer.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/serializer.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/serializer.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/websites.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/websites.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/helper/gallery.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/helper/gallery.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/js.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/price.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/price.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/price.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/price.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/tab/alert.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/alert.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/tab/alert.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/alert.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/tab/inventory.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/tab/inventory.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/widget/chooser/container.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/widget/chooser/container.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/widget/chooser/container.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/widget/chooser/container.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/wysiwyg/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/wysiwyg/js.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/product/edit/attribute/search.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/edit/attribute/search.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/product/edit/tabs.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/tabs.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/edit/tabs.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/product/edit/tabs.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/product/grid/massaction_extended.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/grid/massaction_extended.phtml rename to app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/base-image-uploader.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/base-image-uploader.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/base-image-uploader.js rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/base-image-uploader.js diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category-selector.css b/app/code/Magento/Catalog/view/adminhtml/web/catalog/category-selector.css similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category-selector.css rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/category-selector.css diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category/edit.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/category/edit.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category/edit.js rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/category/edit.js diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/category/form.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/category/form.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/category/form.js rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/category/form.js diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/images/select2.png b/app/code/Magento/Catalog/view/adminhtml/web/catalog/images/select2.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/images/select2.png rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/images/select2.png diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/images/select2x2.png b/app/code/Magento/Catalog/view/adminhtml/web/catalog/images/select2x2.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/images/select2x2.png rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/images/select2x2.png diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/images/spinner.gif b/app/code/Magento/Catalog/view/adminhtml/web/catalog/images/spinner.gif similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/images/spinner.gif rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/images/spinner.gif diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product.js rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/product.js diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/configure.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/configure.js rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/type-switcher.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/type-switcher.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/catalog/type-switcher.js rename to app/code/Magento/Catalog/view/adminhtml/web/catalog/type-switcher.js diff --git a/app/code/Magento/Catalog/view/adminhtml/images/ajax-loader-big.gif b/app/code/Magento/Catalog/view/adminhtml/web/images/ajax-loader-big.gif similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/images/ajax-loader-big.gif rename to app/code/Magento/Catalog/view/adminhtml/web/images/ajax-loader-big.gif diff --git a/app/code/Magento/Catalog/view/adminhtml/images/category_widget_link.gif b/app/code/Magento/Catalog/view/adminhtml/web/images/category_widget_link.gif similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/images/category_widget_link.gif rename to app/code/Magento/Catalog/view/adminhtml/web/images/category_widget_link.gif diff --git a/app/code/Magento/Catalog/view/adminhtml/images/product_widget_link.gif b/app/code/Magento/Catalog/view/adminhtml/web/images/product_widget_link.gif similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/images/product_widget_link.gif rename to app/code/Magento/Catalog/view/adminhtml/web/images/product_widget_link.gif diff --git a/app/code/Magento/Catalog/view/adminhtml/images/product_widget_new.gif b/app/code/Magento/Catalog/view/adminhtml/web/images/product_widget_new.gif similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/images/product_widget_new.gif rename to app/code/Magento/Catalog/view/adminhtml/web/images/product_widget_new.gif diff --git a/app/code/Magento/Catalog/view/adminhtml/js/category-tree.js b/app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/js/category-tree.js rename to app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js diff --git a/app/code/Magento/Catalog/view/adminhtml/js/custom-options.js b/app/code/Magento/Catalog/view/adminhtml/web/js/custom-options.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/js/custom-options.js rename to app/code/Magento/Catalog/view/adminhtml/web/js/custom-options.js diff --git a/app/code/Magento/Catalog/view/adminhtml/js/new-category-dialog.js b/app/code/Magento/Catalog/view/adminhtml/web/js/new-category-dialog.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/js/new-category-dialog.js rename to app/code/Magento/Catalog/view/adminhtml/web/js/new-category-dialog.js diff --git a/app/code/Magento/Catalog/view/adminhtml/js/product-gallery.js b/app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/js/product-gallery.js rename to app/code/Magento/Catalog/view/adminhtml/web/js/product-gallery.js diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_diagonals-thick_18_b81900_40x40.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_18_b81900_40x40.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_20_666666_40x40.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_diagonals-thick_20_666666_40x40.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_diagonals-thick_20_666666_40x40.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_flat_10_000000_40x100.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_flat_10_000000_40x100.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_flat_10_000000_40x100.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_flat_10_000000_40x100.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_glass_100_f6f6f6_1x400.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_glass_100_f6f6f6_1x400.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_glass_100_f6f6f6_1x400.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_glass_100_fdf5ce_1x400.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_glass_100_fdf5ce_1x400.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_glass_100_fdf5ce_1x400.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_glass_65_ffffff_1x400.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_glass_65_ffffff_1x400.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_gloss-wave_35_f67028_500x100.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_gloss-wave_35_f67028_500x100.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_gloss-wave_35_f67028_500x100.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_gloss-wave_35_f67028_500x100.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_highlight-soft_100_eeeeee_1x100.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_100_eeeeee_1x100.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_highlight-soft_75_ffe45c_1x100.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-bg_highlight-soft_75_ffe45c_1x100.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_222222_256x240.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_222222_256x240.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_222222_256x240.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_222222_256x240.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_228ef1_256x240.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_228ef1_256x240.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_228ef1_256x240.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_228ef1_256x240.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_ef8c08_256x240.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_ef8c08_256x240.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_ef8c08_256x240.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_ef8c08_256x240.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_ffd27a_256x240.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_ffd27a_256x240.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_ffd27a_256x240.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_ffd27a_256x240.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_ffffff_256x240.png b/app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_ffffff_256x240.png similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/images/ui-icons_ffffff_256x240.png rename to app/code/Magento/Catalog/view/adminhtml/web/product/images/ui-icons_ffffff_256x240.png diff --git a/app/code/Magento/Catalog/view/adminhtml/product/product.css b/app/code/Magento/Catalog/view/adminhtml/web/product/product.css similarity index 100% rename from app/code/Magento/Catalog/view/adminhtml/product/product.css rename to app/code/Magento/Catalog/view/adminhtml/web/product/product.css diff --git a/app/code/Magento/Catalog/view/base/product/price/amount/default.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml similarity index 93% rename from app/code/Magento/Catalog/view/base/product/price/amount/default.phtml rename to app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml index 13b3d89bf9eddf42797a2c3ad07ccbd1946982a1..7ef4ca3d4684a4e20b1d037d24680755022dc7e4 100644 --- a/app/code/Magento/Catalog/view/base/product/price/amount/default.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml @@ -30,7 +30,7 @@ <span class="price-label"><?php echo $this->getDisplayLabel(); ?></span> <?php endif; ?> <span id="<?php echo $this->getPriceId() ?>" - <?php echo ($this->getPriceDisplayLabel()) ? 'data-label="' . $this->getPriceDisplayLabel() . '"' : '' ?> + <?php echo ($this->getPriceDisplayLabel()) ? 'data-label="' . $this->getPriceDisplayLabel() . '"' : '' ?> class="price-wrapper <?php echo $this->getPriceWrapperCss();?>"> <span class="price"> <?php echo $this->convertAndFormatCurrency($this->getDisplayValue(), (bool) $this->getIncludeContainer()) ?> diff --git a/app/code/Magento/Catalog/view/base/product/price/amount/option.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/amount/option.phtml similarity index 100% rename from app/code/Magento/Catalog/view/base/product/price/amount/option.phtml rename to app/code/Magento/Catalog/view/base/templates/product/price/amount/option.phtml diff --git a/app/code/Magento/Catalog/view/base/product/price/configured_price.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/configured_price.phtml similarity index 100% rename from app/code/Magento/Catalog/view/base/product/price/configured_price.phtml rename to app/code/Magento/Catalog/view/base/templates/product/price/configured_price.phtml diff --git a/app/code/Magento/Catalog/view/base/product/price/final_price.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml similarity index 100% rename from app/code/Magento/Catalog/view/base/product/price/final_price.phtml rename to app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml diff --git a/app/code/Magento/Catalog/view/base/product/price/msrp_price.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/msrp_price.phtml similarity index 100% rename from app/code/Magento/Catalog/view/base/product/price/msrp_price.phtml rename to app/code/Magento/Catalog/view/base/templates/product/price/msrp_price.phtml diff --git a/app/code/Magento/Catalog/view/base/product/price/tier_prices.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml similarity index 100% rename from app/code/Magento/Catalog/view/base/product/price/tier_prices.phtml rename to app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml diff --git a/app/code/Magento/Catalog/view/base/js/msrp.js b/app/code/Magento/Catalog/view/base/web/js/msrp.js similarity index 65% rename from app/code/Magento/Catalog/view/base/js/msrp.js rename to app/code/Magento/Catalog/view/base/web/js/msrp.js index 461b7ec3d6c84678181e9b86dcdcbd5bf276a69a..0173229a1557a3cba407f69d3ce7edf523d17b6d 100644 --- a/app/code/Magento/Catalog/view/base/js/msrp.js +++ b/app/code/Magento/Catalog/view/base/web/js/msrp.js @@ -42,44 +42,50 @@ $(this.options.popupCartButtonId).on('click', $.proxy(function() { this._addToCartSubmit(); }, this)); - $('#map-popup-heading').text(this.options.productName); + $('#map-popup-heading-price').text(this.options.productName); $('#map-popup-price').html($(this.options.realPrice)); - $('#map-popup-msrp').html(this.options.msrpPrice); + $('#map-popup-msrp > span.price').html(this.options.msrpPrice); this.element.trigger('reloadPrice'); - var width = $('#map-popup').width(); - var offsetX = e.pageX - (width / 2) + "px"; - $('#map-popup').addClass('active').css({left: offsetX, top: e.pageY}).show(); + var dialog = $( "#map-popup-click-for-price" ); + this._popupDialog(dialog,this.options.popupId); if (!this.options.showAddToCart) { $('#map-popup-content > .map-popup-checkout').hide(); } - $('#map-popup-content').show(); - $('#map-popup-text').show(); - $('#map-popup-text-what-this').hide(); return false; } }, this)); $(this.options.helpLinkId).on('click', $.proxy(function(e) { - $('#map-popup-heading').text(this.options.productName); - var width = $('#map-popup').width(); - var offsetX = e.pageX - (width / 2) + "px"; - $('#map-popup').addClass('active').css({left: offsetX, top: e.pageY}).show(); - $('#map-popup-content').hide(); - $('#map-popup-text').hide(); - $('#map-popup-text-what-this').show(); + $('#map-popup-heading-what-this').text(this.options.productName); + var dialog = $( "#map-popup-what-this" ); + this._popupDialog(dialog,this.options.helpLinkId); return false; }, this)); - $(this.options.closeButtonId).on('click', $.proxy(function() { - $('#map-popup').removeClass('active').hide(); - return false; - }, this)); + + }, + + _popupDialog : function(target,trigger) { + if(!target.hasClass('ui-dialog-content')) { + target.dropdownDialog({ + appendTo :".column.main", + dialogContentClass : 'active', + timeout: "2000", + autoPosition: true, + "dialogClass" : "popup" + }); + } + $('.mage-dropdown-dialog > .ui-dialog-content').dropdownDialog("close"); + target.dropdownDialog("option","position",{my: "right+50% top", collision: "none", at: "center bottom", of: trigger}); + target.dropdownDialog("option","triggerTarget",trigger); + target.dropdownDialog("open"); }, _addToCartSubmit: function() { this.element.trigger('addToCart', this.element); if (this.options.addToCartUrl) { + $('.mage-dropdown-dialog > .ui-dialog-content').dropdownDialog("close"); $(this.options.cartForm).attr('action', this.options.addToCartUrl); } $(this.options.cartForm).submit(); diff --git a/app/code/Magento/Catalog/view/base/js/tier-price.js b/app/code/Magento/Catalog/view/base/web/js/tier-price.js similarity index 100% rename from app/code/Magento/Catalog/view/base/js/tier-price.js rename to app/code/Magento/Catalog/view/base/web/js/tier-price.js diff --git a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml index c276ef78834bf631ddfc3b7931a7df3e220e0c7e..5b6d8a6fbce64102dce11a9aec35701db756d165 100644 --- a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml @@ -24,6 +24,9 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Core/etc/layout_single.xsd"> + <referenceBlock name="head.components"> + <block class="Magento\Framework\View\Element\Js\Components" name="checkout_page_head_components" template="Magento_Catalog::js/components.phtml"/> + </referenceBlock> <update handle="page_one_column"/> <referenceBlock name="page.main.title"> <arguments> diff --git a/app/code/Magento/Catalog/view/frontend/msrp/popup.phtml b/app/code/Magento/Catalog/view/frontend/msrp/popup.phtml deleted file mode 100644 index 7a0049171f01bcf3fe60a00389109af3f6777f65..0000000000000000000000000000000000000000 --- a/app/code/Magento/Catalog/view/frontend/msrp/popup.phtml +++ /dev/null @@ -1,73 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php -/** - * Template for MAP popup - * - */ -?> -<?php if ($this->helper('Magento\Catalog\Helper\Data')->isMsrpEnabled()): ?> -<div id="map-popup" class="map popup"> - <div class="popup actions"> - <div class="secondary"> - <button type="button" class="action close" id="map-popup-close"> - <span><?php echo __('Close') ?></span> - </button> - </div> - </div> - <div class="popup header"> - <strong class="title" id="map-popup-heading"></strong> - </div> - <div class="popup content"> - <div class="map add form" id="map-popup-content"> - <form action="" method="POST" id="product_addtocart_form_from_popup" class="form map checkout"> - <input type="hidden" name="product" class="product_id" value="" id="map-popup-product-id"/> - <div class="additional-addtocart-box"> - <?php echo $this->getChildHtml(); ?> - </div> - <button type="button" title="<?php echo __('Add to Cart') ?>" class="action tocart primary" id="map-popup-button"> - <span><?php echo __('Add to Cart') ?></span> - </button> - </form> - <div class="price-box"> - <div class="map msrp" id="map-popup-msrp-box"> - <span class="label"><?php echo __('Price'); ?></span> - <div class="old price" id="map-popup-msrp"></div> - </div> - <div class="map price" id="map-popup-price-box"> - <span class="label"><?php echo __('Actual Price'); ?></span> - <div id="map-popup-price" class="actual price"></div> - </div> - </div> - </div> - <div class="map text" id="map-popup-text"> - <?php echo $this->helper('Magento\Catalog\Helper\Data')->getMsrpExplanationMessage(); ?> - </div> - <div class="map help text" id="map-popup-text-what-this"> - <?php echo $this->helper('Magento\Catalog\Helper\Data')->getMsrpExplanationMessageWhatsThis(); ?> - </div> - </div> -</div> -<?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/category/view.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/view.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/category/view.phtml rename to app/code/Magento/Catalog/view/frontend/templates/category/view.phtml diff --git a/app/code/Magento/Catalog/view/frontend/category/widget/link/link_block.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/widget/link/link_block.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/category/widget/link/link_block.phtml rename to app/code/Magento/Catalog/view/frontend/templates/category/widget/link/link_block.phtml diff --git a/app/code/Magento/Catalog/view/frontend/category/widget/link/link_inline.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/widget/link/link_inline.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/category/widget/link/link_inline.phtml rename to app/code/Magento/Catalog/view/frontend/templates/category/widget/link/link_inline.phtml diff --git a/app/code/Magento/Catalog/view/frontend/js/components.phtml b/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml similarity index 90% rename from app/code/Magento/Catalog/view/frontend/js/components.phtml rename to app/code/Magento/Catalog/view/frontend/templates/js/components.phtml index 5028de505f5e3f4d4e8dea77dbd9a290c57d8dfd..f8b30f10b8043461bf7ec1e27102a2f473581af2 100644 --- a/app/code/Magento/Catalog/view/frontend/js/components.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/js/components.phtml @@ -29,6 +29,13 @@ * Declaration of resources needed for defined components */ $.mage.component({ + addToWishlist: [ + '<?php echo $this->getViewFileUrl('Magento_Wishlist::js/add-to-wishlist.js') ?>' + ], + tabs: [ + '<?php echo $this->getViewFileUrl('mage/collapsible.js') ?>', + '<?php echo $this->getViewFileUrl('mage/tabs.js') ?>' + ], catalogSearch: [ '<?php echo $this->getViewFileUrl('jquery/handlebars/handlebars-v1.3.0.js')?>', '<?php echo $this->getViewFileUrl('Magento_CatalogSearch::form-mini.js')?>' @@ -82,6 +89,7 @@ '<?php echo $this->getViewFileUrl('Magento_Catalog::js/date-option.js') ?>' ], zoom: [ + '<?php echo $this->getViewFileUrl('jquery/handlebars/handlebars-v1.3.0.js')?>', '<?php echo $this->getViewFileUrl('mage/zoom.js') ?>' ], gallery: [ diff --git a/app/code/Magento/Catalog/view/frontend/templates/msrp/popup.phtml b/app/code/Magento/Catalog/view/frontend/templates/msrp/popup.phtml new file mode 100644 index 0000000000000000000000000000000000000000..616a0f68804a7982fd927619c848c3fb51a42a66 --- /dev/null +++ b/app/code/Magento/Catalog/view/frontend/templates/msrp/popup.phtml @@ -0,0 +1,80 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> +<?php +/** + * Template for MAP popup + * + */ +?> +<?php if ($this->helper('Magento\Catalog\Helper\Data')->isMsrpEnabled()): ?> + <div id="map-popup-click-for-price" class="map popup"> + <div class="popup header"> + <strong class="title" id="map-popup-heading-price"></strong> + </div> + <div class="popup content"> + <div class="map add form" id="map-popup-content"> + <form action="" method="POST" id="product_addtocart_form_from_popup" class="form map checkout"> + <input type="hidden" name="product" class="product_id" value="" id="map-popup-product-id"/> + + <div class="additional-addtocart-box"> + <?php echo $this->getChildHtml(); ?> + </div> + <button type="button" title="<?php echo __('Add to Cart') ?>" class="action tocart" + id="map-popup-button"> + <span><?php echo __('Add to Cart') ?></span> + </button> + </form> + <div class="price-box"> + <div class="map msrp" id="map-popup-msrp-box"> + <span class="label"><?php echo __('Price'); ?></span> + + <div class="old price" id="map-popup-msrp"> + <span class="price"></span> + </div> + </div> + <div class="map price" id="map-popup-price-box"> + <span class="label"><?php echo __('Actual Price'); ?></span> + + <div id="map-popup-price" class="actual price"></div> + </div> + </div> + </div> + <div class="map text" id="map-popup-text"> + <?php echo $this->helper('Magento\Catalog\Helper\Data')->getMsrpExplanationMessage(); ?> + </div> + </div> + </div> + + <div id="map-popup-what-this" class="map popup"> + <div class="popup header"> + <strong class="title" id="map-popup-heading-what-this"></strong> + </div> + <div class="popup content"> + <div class="map help text" id="map-popup-text-what-this"> + <?php echo $this->helper('Magento\Catalog\Helper\Data')->getMsrpExplanationMessageWhatsThis(); ?> + </div> + </div> + </div> +<?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/navigation/left.phtml b/app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/navigation/left.phtml rename to app/code/Magento/Catalog/view/frontend/templates/navigation/left.phtml diff --git a/app/code/Magento/Catalog/view/frontend/navigation/top.phtml b/app/code/Magento/Catalog/view/frontend/templates/navigation/top.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/navigation/top.phtml rename to app/code/Magento/Catalog/view/frontend/templates/navigation/top.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/compare/link.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/link.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/compare/link.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/compare/link.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/compare/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/compare/list.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/compare/sidebar.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/compare/sidebar.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/gallery.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/image.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/image.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/image_with_borders.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/list.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/list.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/list/items.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/list/toolbar.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/list/toolbar.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/listing.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/listing.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/price_msrp.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/price_msrp.phtml similarity index 98% rename from app/code/Magento/Catalog/view/frontend/product/price_msrp.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/price_msrp.phtml index 3fa751ee849353e437aa4ae59fce6b59b21c8175..6cc66fcc4c16c16a184c953ad8c286ba23889a6c 100644 --- a/app/code/Magento/Catalog/view/frontend/product/price_msrp.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/price_msrp.phtml @@ -40,7 +40,7 @@ <div class="price-box map info"> <?php $_price = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_product->getMsrp()) ?> <?php if ($_product->getMsrp()): ?> - <?php $_msrpPrice = $this->helper('Magento\Core\Helper\Data')->currency($_product->getMsrp(),true,true) ?> + <?php $_msrpPrice = $this->helper('Magento\Core\Helper\Data')->currency($_product->getMsrp(),true,false) ?> <span class="old price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo $_msrpPrice ?></span> <?php endif; ?> <?php $popupId = 'msrp-click-' . $_product->getId() . $this->getRandomString(20); ?> diff --git a/app/code/Magento/Catalog/view/frontend/product/price_msrp_item.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/price_msrp_item.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/price_msrp_item.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/price_msrp_item.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/price_msrp_noform.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/price_msrp_noform.phtml similarity index 98% rename from app/code/Magento/Catalog/view/frontend/product/price_msrp_noform.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/price_msrp_noform.phtml index 56ea468a0ea2c6f6f44549d5fab6d815647a180a..b72e92b2ac7e7fcd7f8fe46438ed5e914a37b653 100644 --- a/app/code/Magento/Catalog/view/frontend/product/price_msrp_noform.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/price_msrp_noform.phtml @@ -39,7 +39,7 @@ <div class="price-box map-info"> <?php $_price = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_product->getMsrp()) ?> <?php if ($_product->getMsrp()): ?> - <?php $_msrpPrice = $this->helper('Magento\Core\Helper\Data')->currency($_product->getMsrp(),true,true) ?> + <?php $_msrpPrice = $this->helper('Magento\Core\Helper\Data')->currency($_product->getMsrp(),true,false) ?> <span class="old-price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo $_msrpPrice ?></span> <?php endif; ?> <?php $popupId = 'msrp-click-' . $_product->getId() . $this->getRandomString(20); ?> diff --git a/app/code/Magento/Catalog/view/frontend/product/price_msrp_rss.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/price_msrp_rss.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/price_msrp_rss.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/price_msrp_rss.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/additional.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/additional.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/additional.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/additional.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/addto.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml similarity index 91% rename from app/code/Magento/Catalog/view/frontend/product/view/addto.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml index e761cd0b6f7f6152863c3b81fd7fbefe3a261678..8cc6550e07527049d5f696566a627c249a7e6f94 100644 --- a/app/code/Magento/Catalog/view/frontend/product/view/addto.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml @@ -43,7 +43,5 @@ $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); class="action tocompare"><span><?php echo __('Add to Compare') ?></span></a> </div> <script type="text/javascript"> - jQuery('body').mage('addToWishlist', - <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode(array('productType' => $_product->getTypeId()))?> - ); + jQuery('body').mage('addToWishlist', <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode(array('productType' => $_product->getTypeId()))?>); </script> diff --git a/app/code/Magento/Catalog/view/frontend/product/view/addtocart.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/addtocart.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/attribute.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/attribute.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/attributes.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/attributes.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/base-image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml similarity index 85% rename from app/code/Magento/Catalog/view/frontend/product/view/base-image.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml index 034bee63e17a7c7bd86358e5b90655d58ea33d42..e40b23d3993294d72411905b360a4e081924ef1f 100644 --- a/app/code/Magento/Catalog/view/frontend/product/view/base-image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml @@ -145,33 +145,36 @@ $thumbHeight = $this->getVar("product_page_more_views:height") ? : $thumbWidth; </script> <script type="text/javascript"> (function($) { - $('[data-role=media-gallery]').mage('gallery', { - 'sizes': { - 'small': { - 'width': <?php echo $thumbWidth ?>, - 'height': <?php echo $thumbHeight ?> + $('[data-role=media-gallery]') + .mage('gallery', { + sizes: { + small: { + width: <?php echo $thumbWidth ?>, + height: <?php echo $thumbHeight ?> + }, + medium: { + width: <?php echo $_resizedWidth ?>, + height: <?php echo $_resizedHeight ?> + } }, - 'medium': { - 'width': <?php echo $_resizedWidth ?>, - 'height': <?php echo $_resizedHeight ?> + controls: { + notice: { + text: '<?php echo $this->escapeJsQuote(__("Click on image to view it full sized")) ?>' + } } - }, - 'controls': { - 'notice': { - 'text': '<?php echo $this->escapeJsQuote(__("Click on image to view it full sized")) ?>' + }) + .mage('zoom', { + controls: { + display: { + left: 20, + top: 65 + }, + notice: { + text: '<?php echo $this->escapeJsQuote(__("Click on image to zoom")) ?>' + } } - } - }).mage('zoom', { - 'controls': { - 'display': { - 'left': 20, - 'top': 65 - }, - 'notice': { - 'text': '<?php echo $this->escapeJsQuote(__("Click on image to zoom")) ?>' - } - } - }).mage('galleryFullScreen', {}); + }) + .mage('galleryFullScreen', {}); })(jQuery); </script> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/product/view/description.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/description.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/description.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/description.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/details.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml similarity index 79% rename from app/code/Magento/Catalog/view/frontend/product/view/details.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml index 5459408352ce1687fbb24f069066d44b27169fa6..c554bdf518c75e0114fa1d9cb0610ad18ad744d3 100644 --- a/app/code/Magento/Catalog/view/frontend/product/view/details.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/details.phtml @@ -25,7 +25,7 @@ <?php if ($detailedInfoGroup = $this->getGroupChildNames('detailed_info', 'getChildHtml')):?> <div class="product info detailed"> <?php $layout = $this->getLayout(); ?> - <dl class="product data items" data-sections="tabs"> + <div class="product data items" data-mage-init='{"tabs":{"openedState":"active"}}'> <?php foreach ($detailedInfoGroup as $name):?> <?php $html = $layout->renderElement($name); @@ -33,8 +33,8 @@ $alias = $layout->getElementAlias($name); $label = $this->escapeHtml($this->getChildData($alias, 'title')); ?> - <dt class="data item title" data-section="title"><a class="data switch" data-toggle="switch" href="#<?php echo $alias; ?>"><?php echo $label; ?></a></dt> - <dd class="data item content" id="<?php echo $alias; ?>" data-section="content"><?php echo $html; ?></dd> + <div class="data item title" data-role="collapsible"><a class="data switch" data-toggle="switch" href="#<?php echo $alias; ?>"><?php echo $label; ?></a></div> + <div class="data item content" id="<?php echo $alias; ?>" data-role="content"><?php echo $html; ?></div> <?php endforeach;?> </dl> </div> diff --git a/app/code/Magento/Catalog/view/frontend/product/view/form.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/form.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/mailto.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/mailto.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/mailto.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/mailto.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options.phtml similarity index 81% rename from app/code/Magento/Catalog/view/frontend/product/view/options.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options.phtml index 97dc955cf46e8b199b40428cf833182f24dae850..f5a517cb1509e75a702d8be7b0c54b0b24de67a4 100644 --- a/app/code/Magento/Catalog/view/frontend/product/view/options.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options.phtml @@ -28,12 +28,10 @@ <?php if (count($_options)):?> <script type="text/javascript"> (function ($) { - $(document).ready(function() { - $('#product_addtocart_form').mage('priceOption', { - 'optionConfig':<?php echo $this->getJsonConfig()?>, - 'controlContainer': '.field' - }).trigger('reloadPrice'); - }); + $('#product_addtocart_form').mage('priceOption', { + 'optionConfig':<?php echo $this->getJsonConfig()?>, + 'controlContainer': '.field' + }).trigger('reloadPrice'); })(jQuery); </script> <?php foreach($_options as $_option): ?> diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/js.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/js.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/js.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/js.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/type/date.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/type/date.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/type/default.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/default.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/type/default.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/default.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/type/file.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/type/select.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/select.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/type/select.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/select.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/type/text.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/type/text.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/text.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/wrapper.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/wrapper.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/wrapper.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/wrapper.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/options/wrapper/bottom.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/wrapper/bottom.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/options/wrapper/bottom.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/options/wrapper/bottom.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/price_clone.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/price_clone.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/price_clone.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/price_clone.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/review.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/review.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/review.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/review.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/view/type/default.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/type/default.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/link/link_block.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/link/link_block.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/widget/link/link_block.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/widget/link/link_block.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/link/link_inline.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/link/link_inline.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/widget/link/link_inline.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/widget/link/link_inline.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_images_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_images_list.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_names_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_names_list.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_grid.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_grid.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_list.phtml rename to app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml diff --git a/app/code/Magento/Catalog/view/frontend/rss/product/price.phtml b/app/code/Magento/Catalog/view/frontend/templates/rss/product/price.phtml similarity index 100% rename from app/code/Magento/Catalog/view/frontend/rss/product/price.phtml rename to app/code/Magento/Catalog/view/frontend/templates/rss/product/price.phtml diff --git a/app/code/Magento/Catalog/view/frontend/images/magnifier_handle.gif b/app/code/Magento/Catalog/view/frontend/web/images/magnifier_handle.gif similarity index 100% rename from app/code/Magento/Catalog/view/frontend/images/magnifier_handle.gif rename to app/code/Magento/Catalog/view/frontend/web/images/magnifier_handle.gif diff --git a/app/code/Magento/Catalog/view/frontend/images/product/placeholder/image.jpg b/app/code/Magento/Catalog/view/frontend/web/images/product/placeholder/image.jpg similarity index 100% rename from app/code/Magento/Catalog/view/frontend/images/product/placeholder/image.jpg rename to app/code/Magento/Catalog/view/frontend/web/images/product/placeholder/image.jpg diff --git a/app/code/Magento/Catalog/view/frontend/images/product/placeholder/small_image.jpg b/app/code/Magento/Catalog/view/frontend/web/images/product/placeholder/small_image.jpg similarity index 100% rename from app/code/Magento/Catalog/view/frontend/images/product/placeholder/small_image.jpg rename to app/code/Magento/Catalog/view/frontend/web/images/product/placeholder/small_image.jpg diff --git a/app/code/Magento/Catalog/view/frontend/images/product/placeholder/thumbnail.jpg b/app/code/Magento/Catalog/view/frontend/web/images/product/placeholder/thumbnail.jpg similarity index 100% rename from app/code/Magento/Catalog/view/frontend/images/product/placeholder/thumbnail.jpg rename to app/code/Magento/Catalog/view/frontend/web/images/product/placeholder/thumbnail.jpg diff --git a/app/code/Magento/Catalog/view/frontend/images/slider_btn_zoom_in.gif b/app/code/Magento/Catalog/view/frontend/web/images/slider_btn_zoom_in.gif similarity index 100% rename from app/code/Magento/Catalog/view/frontend/images/slider_btn_zoom_in.gif rename to app/code/Magento/Catalog/view/frontend/web/images/slider_btn_zoom_in.gif diff --git a/app/code/Magento/Catalog/view/frontend/images/slider_btn_zoom_out.gif b/app/code/Magento/Catalog/view/frontend/web/images/slider_btn_zoom_out.gif similarity index 100% rename from app/code/Magento/Catalog/view/frontend/images/slider_btn_zoom_out.gif rename to app/code/Magento/Catalog/view/frontend/web/images/slider_btn_zoom_out.gif diff --git a/app/code/Magento/Catalog/view/frontend/js/compare.js b/app/code/Magento/Catalog/view/frontend/web/js/compare.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/compare.js rename to app/code/Magento/Catalog/view/frontend/web/js/compare.js diff --git a/app/code/Magento/Catalog/view/frontend/js/date-option.js b/app/code/Magento/Catalog/view/frontend/web/js/date-option.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/date-option.js rename to app/code/Magento/Catalog/view/frontend/web/js/date-option.js diff --git a/app/code/Magento/Catalog/view/frontend/js/file-option.js b/app/code/Magento/Catalog/view/frontend/web/js/file-option.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/file-option.js rename to app/code/Magento/Catalog/view/frontend/web/js/file-option.js diff --git a/app/code/Magento/Catalog/view/frontend/js/gallery.js b/app/code/Magento/Catalog/view/frontend/web/js/gallery.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/gallery.js rename to app/code/Magento/Catalog/view/frontend/web/js/gallery.js diff --git a/app/code/Magento/Catalog/view/frontend/js/list.js b/app/code/Magento/Catalog/view/frontend/web/js/list.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/list.js rename to app/code/Magento/Catalog/view/frontend/web/js/list.js diff --git a/app/code/Magento/Catalog/view/frontend/js/price-option.js b/app/code/Magento/Catalog/view/frontend/web/js/price-option.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/price-option.js rename to app/code/Magento/Catalog/view/frontend/web/js/price-option.js diff --git a/app/code/Magento/Catalog/view/frontend/js/product/list/toolbar.js b/app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/product/list/toolbar.js rename to app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js diff --git a/app/code/Magento/Catalog/view/frontend/js/related-products.js b/app/code/Magento/Catalog/view/frontend/web/js/related-products.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/related-products.js rename to app/code/Magento/Catalog/view/frontend/web/js/related-products.js diff --git a/app/code/Magento/Catalog/view/frontend/js/upsell-products.js b/app/code/Magento/Catalog/view/frontend/web/js/upsell-products.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/upsell-products.js rename to app/code/Magento/Catalog/view/frontend/web/js/upsell-products.js diff --git a/app/code/Magento/Catalog/view/frontend/js/zoom.js b/app/code/Magento/Catalog/view/frontend/web/js/zoom.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/js/zoom.js rename to app/code/Magento/Catalog/view/frontend/web/js/zoom.js diff --git a/app/code/Magento/Catalog/view/frontend/product/view/validation.js b/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js similarity index 100% rename from app/code/Magento/Catalog/view/frontend/product/view/validation.js rename to app/code/Magento/Catalog/view/frontend/web/product/view/validation.js diff --git a/app/code/Magento/Catalog/view/frontend/widgets.css b/app/code/Magento/Catalog/view/frontend/web/widgets.css similarity index 100% rename from app/code/Magento/Catalog/view/frontend/widgets.css rename to app/code/Magento/Catalog/view/frontend/web/widgets.css diff --git a/app/code/Magento/Catalog/view/frontend/zoom.css b/app/code/Magento/Catalog/view/frontend/web/zoom.css similarity index 100% rename from app/code/Magento/Catalog/view/frontend/zoom.css rename to app/code/Magento/Catalog/view/frontend/web/zoom.css diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php index 7d3ed2ac74386eab1096e0527d97804ef6875c30..89e4ea5d1330ee938c1dea969fae7c5f01398669 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/Option.php @@ -79,6 +79,7 @@ class Option $qtyForCheck = $this->quoteItemQtyList->getQty( $option->getProduct()->getId(), $quoteItem->getId(), + $quoteItem->getQuoteId(), $increaseOptionQty ); diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php index 739fad108f364b9c2ac30e4af563437bc9d0af79..cff5d949b98243df4c0183848f14738f7e24be46 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItem.php @@ -72,13 +72,15 @@ class StockItem /** * we are using 0 because original qty was processed */ - $qtyForCheck = $this->quoteItemQtyList->getQty($quoteItem->getProduct()->getId(), $quoteItem->getId(), 0); + $qtyForCheck = $this->quoteItemQtyList + ->getQty($quoteItem->getProduct()->getId(), $quoteItem->getId(), $quoteItem->getQuoteId(), 0); } else { $increaseQty = $quoteItem->getQtyToAdd() ? $quoteItem->getQtyToAdd() : $qty; $rowQty = $qty; $qtyForCheck = $this->quoteItemQtyList->getQty( $quoteItem->getProduct()->getId(), $quoteItem->getId(), + $quoteItem->getQuoteId(), $increaseQty ); } diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/QuoteItemQtyList.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/QuoteItemQtyList.php index dd7c2c36144357c0c21ba32b2d92fa80bedc7454..c24802eb70d37469fa4b27b70401d28fa45da0b4 100644 --- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/QuoteItemQtyList.php +++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/QuoteItemQtyList.php @@ -39,25 +39,26 @@ class QuoteItemQtyList * * @param int $productId * @param int $quoteItemId + * @param int $quoteId * @param float $itemQty * * @return int */ - public function getQty($productId, $quoteItemId, $itemQty) + public function getQty($productId, $quoteItemId, $quoteId, $itemQty) { $qty = $itemQty; if (isset( - $this->_checkedQuoteItems[$productId]['qty'] + $this->_checkedQuoteItems[$quoteId][$productId]['qty'] ) && !in_array( $quoteItemId, - $this->_checkedQuoteItems[$productId]['items'] + $this->_checkedQuoteItems[$quoteId][$productId]['items'] ) ) { - $qty += $this->_checkedQuoteItems[$productId]['qty']; + $qty += $this->_checkedQuoteItems[$quoteId][$productId]['qty']; } - $this->_checkedQuoteItems[$productId]['qty'] = $qty; - $this->_checkedQuoteItems[$productId]['items'][] = $quoteItemId; + $this->_checkedQuoteItems[$quoteId][$productId]['qty'] = $qty; + $this->_checkedQuoteItems[$quoteId][$productId]['items'][] = $quoteItemId; return $qty; } diff --git a/app/code/Magento/CatalogInventory/Model/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Stock/Item.php index 50f5863ad105a38769baeafe1f4904c43ecd1489..da5e39047ffef3516e7097ce1a9281ecc97b2080 100644 --- a/app/code/Magento/CatalogInventory/Model/Stock/Item.php +++ b/app/code/Magento/CatalogInventory/Model/Stock/Item.php @@ -753,9 +753,15 @@ class Item extends \Magento\Framework\Model\AbstractModel $result->setItemBackorders($backorderQty); } else { - $orderedItems = $this->getOrderedItems(); - $itemsLeft = $this->getQty() > $orderedItems ? ($this->getQty() - $orderedItems) * 1 : 0; - $backorderQty = $itemsLeft > 0 ? ($qty - $itemsLeft) * 1 : $qty * 1; + $orderedItems = (int)$this->getOrderedItems(); + + // Available item qty in stock excluding item qty in other quotes + $qtyAvailable = ($this->getQty() - ($summaryQty - $qty))* 1; + if ($qtyAvailable > 0) { + $backorderQty = $qty * 1 - $qtyAvailable; + } else { + $backorderQty = $qty * 1; + } if ($backorderQty > 0) { $result->setItemBackorders($backorderQty); diff --git a/app/code/Magento/CatalogInventory/etc/adminhtml/acl.xml b/app/code/Magento/CatalogInventory/etc/adminhtml/acl.xml index b9e503d9016516685fe710dd966358c57a94cd82..c7ceecc550624727f602e4037ef443fa53e8fe0f 100644 --- a/app/code/Magento/CatalogInventory/etc/adminhtml/acl.xml +++ b/app/code/Magento/CatalogInventory/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml index 49a9c6432669eede5e0550840a1e187d0cacf6f9..a372b8af7220de07d30e5fbdbf8cf6135653782b 100644 --- a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml +++ b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\CatalogInventory\Model\Stock\Item" type="Magento\CatalogInventory\Model\Adminhtml\Stock\Item" /> <type name="Magento\Catalog\Model\Product\CopyConstructor\Composite"> <arguments> diff --git a/app/code/Magento/CatalogInventory/etc/adminhtml/events.xml b/app/code/Magento/CatalogInventory/etc/adminhtml/events.xml index 48a6e81fc643bbf9a2938fe75cc4f61b01d8406d..d974ac66ecf235b6f02566fa0e5b1c740c0205bb 100644 --- a/app/code/Magento/CatalogInventory/etc/adminhtml/events.xml +++ b/app/code/Magento/CatalogInventory/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="after_reindex_process_cataloginventory_stock"> <observer name="cataloginventory" instance="Magento\CatalogInventory\Model\Observer" method="reindexProductsMassAction" /> </event> diff --git a/app/code/Magento/CatalogInventory/etc/di.xml b/app/code/Magento/CatalogInventory/etc/di.xml index 271baaee4a156de8618fddb8cda28be0a72243a3..0548cef5e75be2fcbd6713ec7407ea0411321901 100644 --- a/app/code/Magento/CatalogInventory/etc/di.xml +++ b/app/code/Magento/CatalogInventory/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\CatalogInventory\Model\Observer"> <arguments> <argument name="resourceIndexerStock" xsi:type="object">Magento\CatalogInventory\Model\Resource\Indexer\Stock\Proxy</argument> diff --git a/app/code/Magento/CatalogInventory/etc/events.xml b/app/code/Magento/CatalogInventory/etc/events.xml index 2dc801e9514eda1fcd8a1c451021b0215baa7b20..e1ec586ba12eff7b22317f8238c459ccd6b71bd5 100644 --- a/app/code/Magento/CatalogInventory/etc/events.xml +++ b/app/code/Magento/CatalogInventory/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_block_product_status_display"> <observer name="inventory" instance="Magento\CatalogInventory\Model\Observer" method="displayProductStatusInfo" /> </event> diff --git a/app/code/Magento/CatalogInventory/etc/module.xml b/app/code/Magento/CatalogInventory/etc/module.xml index 05939970bda6191f212a7562433a0cff09204498..2cb076739fa01c6c1899e8cb538837886648a0f2 100644 --- a/app/code/Magento/CatalogInventory/etc/module.xml +++ b/app/code/Magento/CatalogInventory/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_CatalogInventory" version="1.6.0.0.4" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/CatalogInventory/view/frontend/qtyincrements.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml similarity index 100% rename from app/code/Magento/CatalogInventory/view/frontend/qtyincrements.phtml rename to app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml diff --git a/app/code/Magento/CatalogInventory/view/frontend/stockqty/composite.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml similarity index 100% rename from app/code/Magento/CatalogInventory/view/frontend/stockqty/composite.phtml rename to app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml diff --git a/app/code/Magento/CatalogInventory/view/frontend/stockqty/default.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml similarity index 100% rename from app/code/Magento/CatalogInventory/view/frontend/stockqty/default.phtml rename to app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml diff --git a/app/code/Magento/CatalogRule/Model/Rule/Action/Collection.php b/app/code/Magento/CatalogRule/Model/Rule/Action/Collection.php index 8b576e96711bf2de2723f479e4636f4b2dcf35d2..d2df4104f46579dfcb001fb07a27fe1765636c38 100644 --- a/app/code/Magento/CatalogRule/Model/Rule/Action/Collection.php +++ b/app/code/Magento/CatalogRule/Model/Rule/Action/Collection.php @@ -26,18 +26,18 @@ namespace Magento\CatalogRule\Model\Rule\Action; class Collection extends \Magento\Rule\Model\Action\Collection { /** - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\LayoutInterface $layout * @param \Magento\Rule\Model\ActionFactory $actionFactory * @param array $data */ public function __construct( - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\LayoutInterface $layout, \Magento\Rule\Model\ActionFactory $actionFactory, array $data = array() ) { - parent::__construct($viewUrl, $layout, $actionFactory, $data); + parent::__construct($assetRepo, $layout, $actionFactory, $data); $this->setType('Magento\CatalogRule\Model\Rule\Action\Collection'); } diff --git a/app/code/Magento/CatalogRule/etc/adminhtml/acl.xml b/app/code/Magento/CatalogRule/etc/adminhtml/acl.xml index 13b54739407716370e146d8e726d793748ae915f..49694bd4a88af61dd3162898dfad08787e38377e 100644 --- a/app/code/Magento/CatalogRule/etc/adminhtml/acl.xml +++ b/app/code/Magento/CatalogRule/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/CatalogRule/etc/adminhtml/di.xml b/app/code/Magento/CatalogRule/etc/adminhtml/di.xml index 97981feddf17089a890868cd07874a0ebf059520..944adad1f573c68158aa1177a405d1f9eded5126 100644 --- a/app/code/Magento/CatalogRule/etc/adminhtml/di.xml +++ b/app/code/Magento/CatalogRule/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\CatalogRule\Model\Rule"> <arguments> <argument name="relatedCacheTypes" xsi:type="array"> diff --git a/app/code/Magento/CatalogRule/etc/adminhtml/events.xml b/app/code/Magento/CatalogRule/etc/adminhtml/events.xml index d340abe57a1d8c29e0064d24f7dfe21d39609d69..1f8dc132df6c6cc8eeb6c2a4cfcadea321d801cf 100644 --- a/app/code/Magento/CatalogRule/etc/adminhtml/events.xml +++ b/app/code/Magento/CatalogRule/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_get_final_price"> <observer name="catalogrule" instance="Magento\CatalogRule\Model\Observer" method="processAdminFinalPrice" /> </event> diff --git a/app/code/Magento/CatalogRule/etc/adminhtml/routes.xml b/app/code/Magento/CatalogRule/etc/adminhtml/routes.xml index cf46cf087d04a6dfcf19eb1caf8d881c8fc11dc7..64a0c96ab66eb746c8f34314627b8958cb899f0c 100644 --- a/app/code/Magento/CatalogRule/etc/adminhtml/routes.xml +++ b/app/code/Magento/CatalogRule/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="catalog_rule" frontName="catalog_rule"> <module name="Magento_CatalogRule_Adminhtml" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/CatalogRule/etc/crontab/events.xml b/app/code/Magento/CatalogRule/etc/crontab/events.xml index 1b49eab91e66a3daa3746e019e847be64a6cfb8c..dbfa51c8e1c4d7d949b036598821d9efa441af37 100644 --- a/app/code/Magento/CatalogRule/etc/crontab/events.xml +++ b/app/code/Magento/CatalogRule/etc/crontab/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_get_final_price"> <observer name="catalogrule" instance="Magento\CatalogRule\Model\Observer" method="processAdminFinalPrice" /> </event> diff --git a/app/code/Magento/CatalogRule/etc/di.xml b/app/code/Magento/CatalogRule/etc/di.xml index 8f8e328c3f44a0bac75d53ca6187e1d3c3378803..6bab83ce4c4ebc19c1a48ecd56874aff86cf8eca 100644 --- a/app/code/Magento/CatalogRule/etc/di.xml +++ b/app/code/Magento/CatalogRule/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\CatalogRule\Model\Resource\Rule"> <arguments> <argument name="eventManager" xsi:type="object">Magento\Framework\Event\Manager\Proxy</argument> diff --git a/app/code/Magento/CatalogRule/etc/events.xml b/app/code/Magento/CatalogRule/etc/events.xml index 5295627d56ac093aa8c876adaf45ac3538aac20b..939092ebfea77cb620a9a6c0894c657e43c859b2 100644 --- a/app/code/Magento/CatalogRule/etc/events.xml +++ b/app/code/Magento/CatalogRule/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="prepare_catalog_product_price_index_table"> <observer name="catalogrule" instance="Magento\CatalogRule\Model\Observer" method="prepareCatalogProductPriceIndexTable" /> </event> diff --git a/app/code/Magento/CatalogRule/etc/frontend/events.xml b/app/code/Magento/CatalogRule/etc/frontend/events.xml index f51d07a7c2f1e22e89da60e7c81e039d0417fd65..448a0eafa94e86253aae679ee28ac97f40dea292 100644 --- a/app/code/Magento/CatalogRule/etc/frontend/events.xml +++ b/app/code/Magento/CatalogRule/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_get_final_price"> <observer name="catalogrule" instance="Magento\CatalogRule\Model\Observer" method="processFrontFinalPrice" /> </event> diff --git a/app/code/Magento/CatalogRule/etc/module.xml b/app/code/Magento/CatalogRule/etc/module.xml index 07be96e10823188549362af5b415828d40ea0cd8..4eb5a509cf02c7e151a61caff07efd124702fa55 100644 --- a/app/code/Magento/CatalogRule/etc/module.xml +++ b/app/code/Magento/CatalogRule/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_CatalogRule" version="1.6.0.4" active="true"> <sequence> <module name="Magento_Rule"/> diff --git a/app/code/Magento/CatalogRule/view/adminhtml/promo/fieldset.phtml b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml similarity index 100% rename from app/code/Magento/CatalogRule/view/adminhtml/promo/fieldset.phtml rename to app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml diff --git a/app/code/Magento/CatalogRule/view/adminhtml/promo/form.phtml b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml similarity index 100% rename from app/code/Magento/CatalogRule/view/adminhtml/promo/form.phtml rename to app/code/Magento/CatalogRule/view/adminhtml/templates/promo/form.phtml diff --git a/app/code/Magento/CatalogRule/view/adminhtml/promo/js.phtml b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/js.phtml similarity index 100% rename from app/code/Magento/CatalogRule/view/adminhtml/promo/js.phtml rename to app/code/Magento/CatalogRule/view/adminhtml/templates/promo/js.phtml diff --git a/app/code/Magento/CatalogSearch/etc/adminhtml/acl.xml b/app/code/Magento/CatalogSearch/etc/adminhtml/acl.xml index 74b213d104e2521047759da5ca1f128b7ae5ab25..76081cbaba77fa208e8c0526825b07a406ae25e7 100644 --- a/app/code/Magento/CatalogSearch/etc/adminhtml/acl.xml +++ b/app/code/Magento/CatalogSearch/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml b/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml index 194cf5b8e618f42d9c3f7e4c1e741ac0b1191710..cd88f320eefedf1140e99eb9c431d4add88a242b 100644 --- a/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml +++ b/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\CatalogSearch\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">catalogsearch</argument> diff --git a/app/code/Magento/CatalogSearch/etc/di.xml b/app/code/Magento/CatalogSearch/etc/di.xml index 2626beceb0b66cd6019bc4cf61922fea01b95dd0..a58caa081c68a730300052a2616dce92aa9df0f7 100644 --- a/app/code/Magento/CatalogSearch/etc/di.xml +++ b/app/code/Magento/CatalogSearch/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Setup\Migration"> <arguments> <argument name="compositeModules" xsi:type="array"> diff --git a/app/code/Magento/CatalogSearch/etc/frontend/di.xml b/app/code/Magento/CatalogSearch/etc/frontend/di.xml index a04444e52718472e63e33511a31b13e08949014c..f69a0086554aa26c67147894c6872491b937c517 100644 --- a/app/code/Magento/CatalogSearch/etc/frontend/di.xml +++ b/app/code/Magento/CatalogSearch/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\CatalogSearch\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">catalogsearch</argument> diff --git a/app/code/Magento/CatalogSearch/etc/frontend/routes.xml b/app/code/Magento/CatalogSearch/etc/frontend/routes.xml index 1022a0266126c261c21f4a07957bd8dbc3a4b108..89c4a05bb406e124312ef876693a41f3931e87c3 100644 --- a/app/code/Magento/CatalogSearch/etc/frontend/routes.xml +++ b/app/code/Magento/CatalogSearch/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="catalogsearch" frontName="catalogsearch"> <module name="Magento_CatalogSearch" /> diff --git a/app/code/Magento/CatalogSearch/etc/module.xml b/app/code/Magento/CatalogSearch/etc/module.xml index 20ee49e57c1e49e5cd906a15bc7ea33692f5edb9..15534ff9c5c6ebb4b037d14f9b32c1bbb23e3904 100644 --- a/app/code/Magento/CatalogSearch/etc/module.xml +++ b/app/code/Magento/CatalogSearch/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_CatalogSearch" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/CatalogSearch/view/frontend/advanced/form.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml similarity index 100% rename from app/code/Magento/CatalogSearch/view/frontend/advanced/form.phtml rename to app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml diff --git a/app/code/Magento/CatalogSearch/view/frontend/advanced/result.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml similarity index 100% rename from app/code/Magento/CatalogSearch/view/frontend/advanced/result.phtml rename to app/code/Magento/CatalogSearch/view/frontend/templates/advanced/result.phtml diff --git a/app/code/Magento/CatalogSearch/view/frontend/form.mini.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/form.mini.phtml similarity index 100% rename from app/code/Magento/CatalogSearch/view/frontend/form.mini.phtml rename to app/code/Magento/CatalogSearch/view/frontend/templates/form.mini.phtml diff --git a/app/code/Magento/CatalogSearch/view/frontend/result.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml similarity index 100% rename from app/code/Magento/CatalogSearch/view/frontend/result.phtml rename to app/code/Magento/CatalogSearch/view/frontend/templates/result.phtml diff --git a/app/code/Magento/CatalogSearch/view/frontend/term.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/term.phtml similarity index 100% rename from app/code/Magento/CatalogSearch/view/frontend/term.phtml rename to app/code/Magento/CatalogSearch/view/frontend/templates/term.phtml diff --git a/app/code/Magento/CatalogSearch/view/frontend/form-mini.js b/app/code/Magento/CatalogSearch/view/frontend/web/form-mini.js similarity index 94% rename from app/code/Magento/CatalogSearch/view/frontend/form-mini.js rename to app/code/Magento/CatalogSearch/view/frontend/web/form-mini.js index d7be25c798b5821c62364b0d44320333218e8ee2..3fd3f474ed09bed0e09448ad88496c9cd75617c2 100644 --- a/app/code/Magento/CatalogSearch/view/frontend/form-mini.js +++ b/app/code/Magento/CatalogSearch/view/frontend/web/form-mini.js @@ -118,11 +118,19 @@ _onKeyDown: function(e) { var keyCode = e.keyCode || e.which; switch (keyCode) { + case $.ui.keyCode.HOME: + this._getFirstVisibleElement().addClass(this.options.selectClass); + this.responseList.selected = this._getFirstVisibleElement(); + break; + case $.ui.keyCode.END: + this._getLastElement().addClass(this.options.selectClass); + this.responseList.selected = this._getLastElement(); + break; case $.ui.keyCode.ESCAPE: this._resetResponseList(true); this.autoComplete.hide(); break; - case $.ui.keyCode.TAB: + case $.ui.keyCode.ENTER: this.searchForm.trigger('submit'); break; case $.ui.keyCode.DOWN: diff --git a/app/code/Magento/Centinel/etc/adminhtml/di.xml b/app/code/Magento/Centinel/etc/adminhtml/di.xml index 14bf4e05405cf36ad7f9aa267889a02b5ec05e3b..49b1b49842184093e2f4923c797b4876ab198b50 100644 --- a/app/code/Magento/Centinel/etc/adminhtml/di.xml +++ b/app/code/Magento/Centinel/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Centinel\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">centinel_validator</argument> diff --git a/app/code/Magento/Centinel/etc/adminhtml/events.xml b/app/code/Magento/Centinel/etc/adminhtml/events.xml index e6ca030338262e77868854deaa9e7c88a392fb6d..d8872ad9d660bc68e1f1ab85b18ef8cdc301739e 100644 --- a/app/code/Magento/Centinel/etc/adminhtml/events.xml +++ b/app/code/Magento/Centinel/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="payment_info_block_prepare_specific_information"> <observer name="centinel" instance="Magento\Centinel\Model\Observer" method="paymentInfoBlockPrepareSpecificInformation" shared="false" /> </event> diff --git a/app/code/Magento/Centinel/etc/adminhtml/routes.xml b/app/code/Magento/Centinel/etc/adminhtml/routes.xml index 5867e3f06de3f32f5d2f409eaefd01476f9b20a5..ea6a04c7cd6187a6eedf9201de4be89d9889679e 100644 --- a/app/code/Magento/Centinel/etc/adminhtml/routes.xml +++ b/app/code/Magento/Centinel/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Centinel" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Centinel/etc/di.xml b/app/code/Magento/Centinel/etc/di.xml index 7cfa9c54d519c92cedae8104936cf3c1ee29af26..4d90b81dc98bfee3e20be092ab9ae71cde8bafa5 100644 --- a/app/code/Magento/Centinel/etc/di.xml +++ b/app/code/Magento/Centinel/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Centinel\Model\StateFactory"> <arguments> <argument name="stateClassMap" xsi:type="array"> diff --git a/app/code/Magento/Centinel/etc/events.xml b/app/code/Magento/Centinel/etc/events.xml index 7818215186a45bdc88b3d035783b6cc87dfe33c4..ba65b6602b6a8d0b69ec2f7c2a9f4cb8f0199210 100644 --- a/app/code/Magento/Centinel/etc/events.xml +++ b/app/code/Magento/Centinel/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_convert_quote_to_order"> <observer name="centinel" instance="Magento\Centinel\Model\Observer" method="salesEventConvertQuoteToOrder" /> </event> diff --git a/app/code/Magento/Centinel/etc/frontend/di.xml b/app/code/Magento/Centinel/etc/frontend/di.xml index 16f6e789e85abbaa53568a8fd8b282fb8dce87bd..d7a868b509baa1c639787264151534b069cb9499 100644 --- a/app/code/Magento/Centinel/etc/frontend/di.xml +++ b/app/code/Magento/Centinel/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Centinel\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">centinel_validator</argument> diff --git a/app/code/Magento/Centinel/etc/frontend/events.xml b/app/code/Magento/Centinel/etc/frontend/events.xml index 8be4a5a4c788ecf2f01181a4a96d9342199f3bc3..f9efff1e83dd88d71c87ca5530e8ec38778a7dd7 100644 --- a/app/code/Magento/Centinel/etc/frontend/events.xml +++ b/app/code/Magento/Centinel/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="payment_form_block_to_html_before"> <observer name="centinel" instance="Magento\Centinel\Model\Observer" method="paymentFormBlockToHtmlBefore" shared="false" /> </event> diff --git a/app/code/Magento/Centinel/etc/frontend/routes.xml b/app/code/Magento/Centinel/etc/frontend/routes.xml index 18399c6a533d3c8bf88e8f123e7f46f02d94ef51..0b1317bc5d5ce1fb27ba5f27a74fc5710e537595 100644 --- a/app/code/Magento/Centinel/etc/frontend/routes.xml +++ b/app/code/Magento/Centinel/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="centinel" frontName="centinel"> <module name="Magento_Centinel" /> diff --git a/app/code/Magento/Centinel/etc/module.xml b/app/code/Magento/Centinel/etc/module.xml index 2d2ccb389ef665e7b4b3a677fe41c0012b7774ea..932a47ea503c6cbea3399ab391ac8e0a44beb078 100644 --- a/app/code/Magento/Centinel/etc/module.xml +++ b/app/code/Magento/Centinel/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Centinel" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Payment"/> diff --git a/app/code/Magento/Centinel/view/adminhtml/authentication/complete.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml similarity index 100% rename from app/code/Magento/Centinel/view/adminhtml/authentication/complete.phtml rename to app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml diff --git a/app/code/Magento/Centinel/view/adminhtml/authentication/start.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/start.phtml similarity index 100% rename from app/code/Magento/Centinel/view/adminhtml/authentication/start.phtml rename to app/code/Magento/Centinel/view/adminhtml/templates/authentication/start.phtml diff --git a/app/code/Magento/Centinel/view/adminhtml/order/create/abstract.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/order/create/abstract.phtml similarity index 100% rename from app/code/Magento/Centinel/view/adminhtml/order/create/abstract.phtml rename to app/code/Magento/Centinel/view/adminhtml/templates/order/create/abstract.phtml diff --git a/app/code/Magento/Centinel/view/adminhtml/validation/form.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml similarity index 100% rename from app/code/Magento/Centinel/view/adminhtml/validation/form.phtml rename to app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml diff --git a/app/code/Magento/Centinel/view/adminhtml/order_create.js b/app/code/Magento/Centinel/view/adminhtml/web/order_create.js similarity index 100% rename from app/code/Magento/Centinel/view/adminhtml/order_create.js rename to app/code/Magento/Centinel/view/adminhtml/web/order_create.js diff --git a/app/code/Magento/Centinel/view/frontend/authentication.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml similarity index 100% rename from app/code/Magento/Centinel/view/frontend/authentication.phtml rename to app/code/Magento/Centinel/view/frontend/templates/authentication.phtml diff --git a/app/code/Magento/Centinel/view/frontend/authentication/complete.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml similarity index 100% rename from app/code/Magento/Centinel/view/frontend/authentication/complete.phtml rename to app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml diff --git a/app/code/Magento/Centinel/view/frontend/authentication/start.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication/start.phtml similarity index 100% rename from app/code/Magento/Centinel/view/frontend/authentication/start.phtml rename to app/code/Magento/Centinel/view/frontend/templates/authentication/start.phtml diff --git a/app/code/Magento/Centinel/view/frontend/logo.phtml b/app/code/Magento/Centinel/view/frontend/templates/logo.phtml similarity index 100% rename from app/code/Magento/Centinel/view/frontend/logo.phtml rename to app/code/Magento/Centinel/view/frontend/templates/logo.phtml diff --git a/app/code/Magento/Centinel/view/frontend/centinel-authenticate.js b/app/code/Magento/Centinel/view/frontend/web/centinel-authenticate.js similarity index 100% rename from app/code/Magento/Centinel/view/frontend/centinel-authenticate.js rename to app/code/Magento/Centinel/view/frontend/web/centinel-authenticate.js diff --git a/app/code/Magento/Centinel/view/frontend/images/sc_learn_62x34.gif b/app/code/Magento/Centinel/view/frontend/web/images/sc_learn_62x34.gif similarity index 100% rename from app/code/Magento/Centinel/view/frontend/images/sc_learn_62x34.gif rename to app/code/Magento/Centinel/view/frontend/web/images/sc_learn_62x34.gif diff --git a/app/code/Magento/Centinel/view/frontend/images/sc_learn_62x34.png b/app/code/Magento/Centinel/view/frontend/web/images/sc_learn_62x34.png similarity index 100% rename from app/code/Magento/Centinel/view/frontend/images/sc_learn_62x34.png rename to app/code/Magento/Centinel/view/frontend/web/images/sc_learn_62x34.png diff --git a/app/code/Magento/Centinel/view/frontend/images/vbv_ltbg_71x57.gif b/app/code/Magento/Centinel/view/frontend/web/images/vbv_ltbg_71x57.gif similarity index 100% rename from app/code/Magento/Centinel/view/frontend/images/vbv_ltbg_71x57.gif rename to app/code/Magento/Centinel/view/frontend/web/images/vbv_ltbg_71x57.gif diff --git a/app/code/Magento/Centinel/view/frontend/images/vbv_ltbg_71x57.png b/app/code/Magento/Centinel/view/frontend/web/images/vbv_ltbg_71x57.png similarity index 100% rename from app/code/Magento/Centinel/view/frontend/images/vbv_ltbg_71x57.png rename to app/code/Magento/Centinel/view/frontend/web/images/vbv_ltbg_71x57.png diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/CacheInterface.php b/app/code/Magento/Checkout/Block/Cart/Additional/Info.php similarity index 65% rename from lib/Magento/Framework/Css/PreProcessor/Cache/CacheInterface.php rename to app/code/Magento/Checkout/Block/Cart/Additional/Info.php index c80260fe19d41fde320a02ad5f3bbedff18e87ac..e35b9a9579d55db63403e5d2ab501097cc8ce6b9 100644 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/CacheInterface.php +++ b/app/code/Magento/Checkout/Block/Cart/Additional/Info.php @@ -21,32 +21,31 @@ * @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) */ -namespace Magento\Framework\Css\PreProcessor\Cache; -/** - * Less cache manager interface - */ -interface CacheInterface -{ - /** - * @return $this - */ - public function clear(); +namespace Magento\Checkout\Block\Cart\Additional; +class Info extends \Magento\Framework\View\Element\Template +{ /** - * @return null|\Magento\Framework\View\Publisher\FileInterface + * @var \Magento\Sales\Model\Quote\Item\AbstractItem */ - public function get(); + protected $_item; /** - * @param \Magento\Framework\Less\PreProcessor\File\Less $lessFile - * @return void + * @param \Magento\Sales\Model\Quote\Item\AbstractItem $item + * @return $this */ - public function add($lessFile); + public function setItem(\Magento\Sales\Model\Quote\Item\AbstractItem $item) + { + $this->_item = $item; + return $this; + } /** - * @param \Magento\Framework\View\Publisher\FileInterface $cachedFile - * @return $this + * @return \Magento\Sales\Model\Quote\Item\AbstractItem */ - public function save($cachedFile); + public function getItem() + { + return $this->_item; + } } diff --git a/app/code/Magento/Checkout/Block/Onepage/Success.php b/app/code/Magento/Checkout/Block/Onepage/Success.php index 717b9082abc23f5d9c9636fa5c3e64c8693926ae..88191ba42ed5945dfbbeda9b51ad08d8d86274c8 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Success.php +++ b/app/code/Magento/Checkout/Block/Onepage/Success.php @@ -122,7 +122,7 @@ class Success extends \Magento\Framework\View\Element\Template if ($orderId) { $order = $this->_orderFactory->create()->load($orderId); if ($order->getId()) { - $isVisible = !in_array($order->getState(), $this->_orderConfig->getInvisibleOnFrontStates()); + $isVisible = !in_array($order->getStatus(), $this->_orderConfig->getInvisibleOnFrontStatuses()); $canView = $this->httpContext->getValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH) && $isVisible; $this->addData( array( diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php index 96b5cf80f01d2561f5da68955c95dcbcdb4ee0f9..e2bec519374b558d0d5506f57f31ab37f13ffb55 100755 --- a/app/code/Magento/Checkout/Controller/Onepage.php +++ b/app/code/Magento/Checkout/Controller/Onepage.php @@ -125,7 +125,8 @@ class Onepage extends Action */ protected function _expireAjax() { - if (!$this->getOnepage()->getQuote()->hasItems() || $this->getOnepage()->getQuote()->getHasError()) { + $quote = $this->getOnepage()->getQuote(); + if (!$quote->hasItems() || $quote->getHasError() || !$quote->validateMinimumAmount()) { $this->_ajaxRedirectResponse(); return true; } @@ -225,29 +226,11 @@ class Onepage extends Action return; } $quote = $this->getOnepage()->getQuote(); - if (!$quote->hasItems() || $quote->getHasError()) { + if (!$quote->hasItems() || $quote->getHasError() || !$quote->validateMinimumAmount()) { $this->_redirect('checkout/cart'); return; } - if (!$quote->validateMinimumAmount()) { - $error = $this->_objectManager->get( - 'Magento\Framework\App\Config\ScopeConfigInterface' - )->getValue( - 'sales/minimum_order/error_message', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) ? $this->_objectManager->get( - 'Magento\Framework\App\Config\ScopeConfigInterface' - )->getValue( - 'sales/minimum_order/error_message', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) : __( - 'Subtotal must exceed minimum order amount' - ); - $this->messageManager->addError($error); - $this->_redirect('checkout/cart'); - return; - } $this->_objectManager->get('Magento\Checkout\Model\Session')->setCartWasUpdated(false); $currentUrl = $this->_objectManager->create('Magento\Framework\UrlInterface')->getUrl('*/*/*', array('_secure' => true)); $this->_objectManager->get('Magento\Customer\Model\Session')->setBeforeAuthUrl($currentUrl); diff --git a/app/code/Magento/Checkout/etc/adminhtml/di.xml b/app/code/Magento/Checkout/etc/adminhtml/di.xml index 4c8ccdb21bab4c51a85a9a17e124614ce85b38b4..56b53502170837754f5ad84cec2685239c528ef7 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/di.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Checkout\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">adminhtml</argument> diff --git a/app/code/Magento/Checkout/etc/di.xml b/app/code/Magento/Checkout/etc/di.xml index bc0e22426441432cac28431c801d02e92c149b16..8f8a86386aa376376dfa3a1b1db298171c1a91e2 100644 --- a/app/code/Magento/Checkout/etc/di.xml +++ b/app/code/Magento/Checkout/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/Checkout/etc/fieldset.xml b/app/code/Magento/Checkout/etc/fieldset.xml index 9ba8c5b873589597889521b46a6d4f7fdc84cac5..8b61b8c49ffcef4c593628b30ddf3b8d1700396f 100644 --- a/app/code/Magento/Checkout/etc/fieldset.xml +++ b/app/code/Magento/Checkout/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="customer_account"> <field name="prefix"> diff --git a/app/code/Magento/Checkout/etc/frontend/di.xml b/app/code/Magento/Checkout/etc/frontend/di.xml index 1fe6374a0bf4b56cec8b3d1270effeb65a0b28b7..d59e3e04eeb41d55542eab0817136315ce395878 100644 --- a/app/code/Magento/Checkout/etc/frontend/di.xml +++ b/app/code/Magento/Checkout/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Checkout\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">frontend</argument> diff --git a/app/code/Magento/Checkout/etc/frontend/events.xml b/app/code/Magento/Checkout/etc/frontend/events.xml index 805f9cb7dc931cd9b2345a04060fec8bc9e2fae8..634f20b359728de0c0dccacc84fca343725267dd 100644 --- a/app/code/Magento/Checkout/etc/frontend/events.xml +++ b/app/code/Magento/Checkout/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="customer_login"> <observer name="loadCustomerQuote" instance="Magento\Checkout\Model\Observer" method="loadCustomerQuote" /> </event> diff --git a/app/code/Magento/Checkout/etc/frontend/routes.xml b/app/code/Magento/Checkout/etc/frontend/routes.xml index 6feba4e8efe57b2a44958871fa1f570f131583eb..e443cca900d0b3f8ad1f365f1062376306895794 100644 --- a/app/code/Magento/Checkout/etc/frontend/routes.xml +++ b/app/code/Magento/Checkout/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="checkout" frontName="checkout"> <module name="Magento_Checkout" /> diff --git a/app/code/Magento/Checkout/etc/module.xml b/app/code/Magento/Checkout/etc/module.xml index 9718530106bb3e01d89597ee2241e19bdab7acc1..9ce20e05288ee46725170d252f45dff48ebb145a 100644 --- a/app/code/Magento/Checkout/etc/module.xml +++ b/app/code/Magento/Checkout/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Checkout" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Sales"/> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml index d41e73e1b32680f3fb9927310ceffcd962dc4347..2ec74313eff2394673697bc95cdce7d9529a6cad 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml @@ -55,5 +55,5 @@ </container> </block> </referenceContainer> - <!-- <block class="Magento\Framework\View\Element\Template" name="additional.product.info" template="Magento_Core::template.phtml"/> --> + <block class="Magento\Checkout\Block\Cart\Additional\Info" name="additional.product.info" template="cart/additional/info.phtml"/> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/cart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart.phtml diff --git a/app/code/Magento/Paypal/view/frontend/onepage.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/additional/info.phtml similarity index 76% rename from app/code/Magento/Paypal/view/frontend/onepage.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/additional/info.phtml index 4e4e5a15be9670a915522c9eb77f725a6bbd2f39..df7447d39421a01dcca992d5829f37565b6319f6 100644 --- a/app/code/Magento/Paypal/view/frontend/onepage.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/additional/info.phtml @@ -22,10 +22,15 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<script type="text/javascript"> - (function($) { - $('#checkoutSteps').mage('accordion', { - 'activeSelector': '#opc-<?php echo $this->getActiveStep() ?>' - }).mage('opcheckoutPaypalIframe', {}); - })(jQuery); -</script> +<?php +/** + * Shopping cart additional info + * @var $this \Magento\Framework\View\Element\Template + */ +?> +<?php +$name = $this->getNameInLayout(); +foreach ($this->getChildNames($name) as $childName) { + echo $this->getChildBlock($childName)->setItem($this->getItem())->toHtml(); +} +?> \ No newline at end of file diff --git a/app/code/Magento/Checkout/view/frontend/cart/coupon.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml similarity index 91% rename from app/code/Magento/Checkout/view/frontend/cart/coupon.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml index 61537616fbd9b450f1b1711742da46c6853bf864..e8893844658a5c983c31b1cb5017579644b81f2f 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/coupon.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml @@ -22,9 +22,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<div class="block discount"> - <div class="title"><strong><?php echo __('Discount Codes') ?></strong></div> - <div class="content"> +<div class="block discount" id="block-discount" data-mage-init='{"collapsible":{"openedState": "active", "saveState": false}}'> + <div class="title" data-role="title"><strong><?php echo __('Discount Codes') ?></strong></div> + <div class="content" data-role="content"> <form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post" diff --git a/app/code/Magento/Checkout/view/frontend/cart/form.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/form.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/item/configure/updatecart.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/item/default.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cart/methods.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/methods.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/methods.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cart/minicart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/minicart.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cart/noItems.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/noItems.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/noItems.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/noItems.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cart/shipping.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml similarity index 87% rename from app/code/Magento/Checkout/view/frontend/cart/shipping.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml index f3fb66416fc5642a709a2d072a9e3dceac2868f2..a0733178dee443e19bbf20e98fd0f9fc4c8ae8d0 100644 --- a/app/code/Magento/Checkout/view/frontend/cart/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml @@ -23,9 +23,9 @@ */ ?> <?php /** @var $this \Magento\Checkout\Block\Cart\Shipping */ ?> -<div class="block shipping"> - <div class="title"><strong><?php echo __('Estimate Shipping and Tax') ?></strong></div> - <div class="content"> +<div class="block shipping" id="block-shipping" data-mage-init='{"collapsible":{"openedState": "active", "saveState": false}}'> + <div class="title" data-role="title"><strong><?php echo __('Estimate Shipping and Tax') ?></strong></div> + <div class="content" data-role="content"> <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form"> <fieldset class="fieldset estimate"> <p class="field note"><?php echo __('Enter your destination to get a shipping estimate.') ?></p> @@ -39,10 +39,10 @@ <div class="field region<?php if ($this->isStateProvinceRequired()) echo ' required' ?>"> <label for="region_id" class="label"><span><?php echo __('State/Province') ?></span></label> <div class="control"> - <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>> + <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" <?php if ($this->isStateProvinceRequired()):?> data-validate="{'validate-select':true}" <?php endif;?> > <option value=""><?php echo __('Please select region, state or province') ?></option> </select> - <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text" style="display:none;" /> + <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text" /> </div> </div> <?php //endif; ?> @@ -50,14 +50,14 @@ <div class="field city<?php if ($this->isCityRequired()) echo ' required' ?>"> <label for="city" class="label"><span><?php echo __('City') ?></span></label> <div class="control"> - <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" /> + <input class="input-text" <?php if ($this->isCityRequired()):?> data-validate="{'required-entry':true}"<?php endif;?> id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" /> </div> </div> <?php endif; ?> <div class="field postcode<?php if ($this->isZipCodeRequired()) echo ' required' ?>"> <label for="postcode" class="label"><span><?php echo __('Zip/Postal Code') ?></span></label> <div class="control"> - <input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" /> + <input class="input-text" data-validate="{<?php if ($this->isZipCodeRequired()):?> 'required-entry':true,<?php endif;?>'validate-zip':true}" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" /> </div> </div> <div class="actions toolbar"> diff --git a/app/code/Magento/Checkout/view/frontend/cart/sidebar/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/sidebar/default.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cart/totals.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/totals.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cart/totals.phtml rename to app/code/Magento/Checkout/view/frontend/templates/cart/totals.phtml diff --git a/app/code/Magento/Checkout/view/frontend/js/components.phtml b/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml similarity index 72% rename from app/code/Magento/Checkout/view/frontend/js/components.phtml rename to app/code/Magento/Checkout/view/frontend/templates/js/components.phtml index 802bfcec704bed924136a9277d1c1d5ee311fca7..566ce4c6a4736f1e59cca349029ca73cad17f6f8 100644 --- a/app/code/Magento/Checkout/view/frontend/js/components.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/js/components.phtml @@ -32,9 +32,17 @@ paymentAuthentication: [ '<?php echo $this->getViewFileUrl('Magento_Checkout::js/payment-authentication.js') ?>' ], + collapsible: [ + '<?php echo $this->getViewFileUrl('mage/collapsible.js') ?>' + ], dropdownDialog: [ '<?php echo $this->getViewFileUrl('mage/dropdown.js') ?>' ], + accordion: [ + '<?php echo $this->getViewFileUrl('mage/collapsible.js') ?>', + '<?php echo $this->getViewFileUrl('mage/tabs.js') ?>', + '<?php echo $this->getViewFileUrl('mage/accordion.js') ?>' + ], addToCart: [ '<?php echo $this->getViewFileUrl('Magento_Catalog::js/msrp.js') ?>' ], @@ -50,15 +58,25 @@ creditCardType: [ '<?php echo $this->getViewFileUrl('Magento_Payment::cc-type.js') ?>' ], - opcheckout: [ + loader: [ + '<?php echo $this->getViewFileUrl('jquery/handlebars/handlebars-v1.3.0.js')?>', + '<?php echo $this->getViewFileUrl('mage/loader.js') ?>' + ], + tooltip: [ + '<?php echo $this->getViewFileUrl('mage/tooltip.js') ?>' + ], + opcOrderReview: [ '<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>', '<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>', '<?php echo $this->getViewFileUrl('mage/validation.js')?>', '<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>', - '<?php echo $this->getViewFileUrl('Magento_Checkout::js/opcheckout.js') ?>' - ], - accordion: [ - '<?php echo $this->getViewFileUrl('Magento_Checkout::js/accordion.js') ?>' + '<?php echo $this->getViewFileUrl('Magento_Checkout::js/opc-checkout-method.js') ?>', + '<?php echo $this->getViewFileUrl('Magento_Checkout::js/opc-billing-info.js') ?>', + '<?php echo $this->getViewFileUrl('Magento_Checkout::js/opc-shipping-info.js') ?>', + '<?php echo $this->getViewFileUrl('Magento_Checkout::js/opc-shipping-method.js') ?>', + '<?php echo $this->getViewFileUrl('Magento_Checkout::js/opc-payment-info.js') ?>', + '<?php echo $this->getViewFileUrl('Magento_Checkout::js/opc-order-review.js') ?>' + ], sidebar: [ '<?php echo $this->getViewFileUrl('Magento_Checkout::js/sidebar.js') ?>' diff --git a/app/code/Magento/Checkout/view/frontend/onepage.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml similarity index 57% rename from app/code/Magento/Checkout/view/frontend/onepage.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage.phtml index 9b67aade90cd689b2fdd46b2840df00de2e763f9..8002e34e2b9d78b2c19129924954f71c15c5ffeb 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml @@ -24,17 +24,41 @@ /** @var \Magento\Checkout\Block\Onepage\Payment $_paymentBlock */ $_paymentBlock = $this->getLayout()->getBlock('checkout.onepage.payment'); +$_loadingImage = $this->getViewFileUrl('images/loader-2.gif'); ?> +<script id="loader-template" type="text/x-handlebars-template"> + <div class="loading-mask" data-role="loader"> + <div class="loader"> + <img alt="{{imgAlt}}" src="{{icon}}"> + <p>{{loaderText}}</p> + </div> + </div> +</script> + +<?php +$config = array( + 'loader' => array( + 'template' => '#loader-template', + 'icon' => $_loadingImage, + 'texts' => array( + 'loaderText' => __('Loading next step...'), + 'imgAlt' => __('Loading...') + ) + ) +); +$mageConfig = json_encode($config); +?> + <div class="opc wrapper"> <ol class="opc" id="checkoutSteps"> <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?> <?php if (!$this->getChildBlock($_stepId) || !$this->getChildBlock($_stepId)->isShow()): continue; endif; $i++ ?> <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>"> - <div class="step title"> + <div class="step title" data-role="title"> <span class="number"><?php echo $i ?></span> <h2><?php echo $_stepInfo['label'] ?></h2> </div> - <div id="checkout-step-<?php echo $_stepId ?>" class="step content" style="display:none;"> + <div id="checkout-step-<?php echo $_stepId ?>" class="step content" data-role="content" data-mage-init='<?php echo $mageConfig;?>'> <?php echo $this->getChildHtml($_stepId) ?> </div> </li> @@ -42,15 +66,19 @@ $_paymentBlock = $this->getLayout()->getBlock('checkout.onepage.payment'); </ol> <script type="text/javascript"> (function($) { - $('#checkoutSteps').mage('accordion', { - 'activeSelector': '#opc-<?php echo $this->getActiveStep() ?>' - }).mage('opcheckout', $.extend({ - 'checkoutAgreements': '#checkout-agreements', - 'checkoutProgressContainer': '#checkout-progress-wrapper', - 'methodDescription': '.items' - }, - <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode($_paymentBlock->getOptions()); ?> - )); + 'use strict'; + $(document).ready(function() { + $('#checkoutSteps').mage('accordion',{ + 'collapsibleElement' : ' > li', + 'openedState' : 'active' + }).mage('opcOrderReview', $.extend({ + 'checkoutAgreements': '#checkout-agreements', + 'checkoutProgressContainer': '#checkout-progress-wrapper', + 'methodDescription': '.items' + }, + <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode($_paymentBlock->getOptions()); ?> + )); + }); })(jQuery); </script> </div> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/billing.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml similarity index 97% rename from app/code/Magento/Checkout/view/frontend/onepage/billing.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml index ee1ac4a4cfe130b3529eedea07b249bb5ea7694d..3984546188700715c5722a24c38f8b5c046bd8d9 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/billing.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml @@ -198,10 +198,7 @@ <input type="hidden" name="billing[use_for_shipping]" value="1" /> <?php endif; ?> <div class="actions" id="billing-buttons-container"> - <div class="primary"><button type="button" class="button action continue primary"><span><?php echo __('Continue') ?></span></button></div> - <span id="billing-please-wait" class="please-wait load indicator" style="display: none;" data-text="<?php echo __('Loading next step...') ?>"> - <span><?php echo __('Loading next step...') ?></span> - </span> + <div class="primary"><button data-role="opc-continue" type="button" class="button action continue primary"><span><?php echo __('Continue') ?></span></button></div> </div> </form> <script type="text/javascript"> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/failure.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/failure.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/failure.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/link.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/link.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/login.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml similarity index 80% rename from app/code/Magento/Checkout/view/frontend/onepage/login.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml index 96d76214f13b171b6af499a69fbc5be3b5420151..ef238a171a2ec4a0fd19f3997eb790f189629d5e 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/login.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/login.phtml @@ -34,7 +34,7 @@ <div class="block customer login"> <div class="title"><strong><?php echo __('Login') ?></strong></div> <div class="content"> - <form class="form login" + <form class="form login" data-role="login" id="login-form" action="<?php echo $this->getPostAction() ?>" method="post" @@ -99,13 +99,13 @@ <fieldset class="fieldset guest"> <?php if( $this->isAllowedGuestCheckout() ): ?> <div class="field choice"> - <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /> + <input type="radio" name="checkout_method" data-role="checkout-method-guest" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /> <label class="label" for="login:guest"><span><?php echo __('Checkout as Guest') ?></span></label> </div> <?php endif; ?> <?php if( $this->helper('Magento\Customer\Helper\Data')->isRegistrationAllowed() ): ?> <div class="field choice"> - <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER || !$this->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /> + <input type="radio" name="checkout_method" data-role="checkout-method-register" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Magento\Checkout\Model\Type\Onepage::METHOD_REGISTER || !$this->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /> <label class="label" for="login:register"><span><?php echo __('Register') ?></span></label> </div> <?php endif; ?> @@ -114,17 +114,14 @@ <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" /> <?php endif; ?> <div class="actions toolbar"> - <span class="please-wait load indicator" style="display: none;" data-text="<?php echo __('Loading next step...') ?>"> - <span><?php echo __('Loading next step...') ?></span> - </span> <div class="primary"> <?php if ($this->isAllowedGuestCheckout()): ?> - <button id="onepage-guest-register-button" type="button" class="action continue primary" data-checkout='{"isGuestCheckoutAllowed":true}'><span><?php echo __('Continue') ?></span></button> + <button data-role="opc-continue" id="onepage-guest-register-button" type="button" class="action continue primary" data-checkout='{"isGuestCheckoutAllowed":true}'><span><?php echo __('Continue') ?></span></button> <?php elseif ($this->helper('Magento\Checkout\Helper\Data')->isCustomerMustBeLogged()): ?> - <button id="onepage-guest-register-button" type="button" class="action register primary" data-checkout='{"isGuestCheckoutAllowed":false, "registrationUrl":"<?php echo $this->helper('Magento\Customer\Helper\Data')->getRegisterUrl();?>"}'><span><?php echo __('Register') ?></span></button> + <button data-role="opc-continue" id="onepage-guest-register-button" type="button" class="action register primary" data-checkout='{"isGuestCheckoutAllowed":false, "registrationUrl":"<?php echo $this->helper('Magento\Customer\Helper\Data')->getRegisterUrl();?>"}'><span><?php echo __('Register') ?></span></button> <?php else: ?> <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" /> - <button id="onepage-guest-register-button" type="button" class="action register primary" data-checkout='{"isGuestCheckoutAllowed":true}'><span><?php echo __('Register') ?></span></button> + <button data-role="opc-continue" id="onepage-guest-register-button" type="button" class="action register primary" data-checkout='{"isGuestCheckoutAllowed":true}'><span><?php echo __('Register') ?></span></button> <?php endif; ?> </div> </div> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/payment.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml similarity index 80% rename from app/code/Magento/Checkout/view/frontend/onepage/payment.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml index 8e1fe9d71c92a266811016470794e1ea42d4ec93..9bcfe5a2b2a31b0361f11d3cd6464e09286eae72 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/payment.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml @@ -31,14 +31,10 @@ <?php echo $this->getChildChildHtml('additional') ?> <div class="actions toolbar" id="payment-buttons-container"> <div class="primary"> - <button type="button" class="button action continue primary"><span><?php echo __('Continue') ?></span></button> + <button data-role="opc-continue" type="button" class="button action continue primary"><span><?php echo __('Continue') ?></span></button> </div> <div class="secondary"> <a class="action back" href="#"><span><?php echo __('Back') ?></span></a> </div> - <span id="payment-please-wait" class="please-wait load indicator" style="display: none" - data-text="<?php echo __('Loading next step...') ?>"> - <span><?php echo __('Loading next step...') ?></span> - </span> </div> </form> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/payment/methods.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment/methods.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/payment/methods.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/payment/methods.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/progress.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/progress.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/progress.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/review.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/review.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/button.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/button.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/review/button.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/review/button.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/info.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/info.phtml similarity index 77% rename from app/code/Magento/Checkout/view/frontend/onepage/review/info.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/review/info.phtml index 5b3c6e064e17e79878018a0cc3a56984d1f701a1..9faa54fcbd1e5f674f3824a30dc60681e389b19f 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/review/info.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/info.phtml @@ -37,12 +37,12 @@ <th colspan="<?php echo $colspan ?>" class="col subtotal"><?php echo __('Subtotal') ?></th> </tr> <?php if ($this->helper('Magento\Tax\Helper\Data')->displayCartBothPrices()): ?> - <tr> - <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> - <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> - </tr> + <tr> + <th class="col price excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col price incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + <th class="col subtotal excl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(false) ?></th> + <th class="col subtotal incl tax"><?php echo $this->helper('Magento\Tax\Helper\Data')->getIncExcTaxLabel(true) ?></th> + </tr> <?php endif; ?> </thead> <tfoot> @@ -61,8 +61,5 @@ <div class="actions" id="review-buttons-container"> <div class="primary"><?php echo $this->getChildHtml('button') ?></div> <div class="secondary"><?php echo __('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>" class="action edit"><span><?php echo __('Edit Your Cart') ?></span></a></div> - <span class="please-wait load indicator" id="review-please-wait" style="display: none;" data-text="<?php echo __('Submitting order information...') ?>"> - <span><?php echo __('Submitting order information...') ?></span> - </span> </div> </div> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/item.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/item.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/review/item.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/review/item.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/review/totals.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/review/totals.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/review/totals.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/review/totals.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/shipping.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml similarity index 96% rename from app/code/Magento/Checkout/view/frontend/onepage/shipping.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml index fdaafdc6d494191cc02d78c68fb1d9a00a637896..e345dd730646b449eb2d7eea9bdc205d9352eb50 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml @@ -119,11 +119,8 @@ <label class="label" for="shipping:same_as_billing"><span><?php echo __('Use Billing Address') ?></span></label> </div> <div class="actions" id="shipping-buttons-container"> - <div class="primary"><button type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> + <div class="primary"><button data-role="opc-continue" type="button" class="button action continue"><span><?php echo __('Continue') ?></span></button></div> <div class="secondary"><a href="#" class="action back"><span><?php echo __('Back') ?></span></a></div> - <span id="shipping-please-wait" class="please-wait load indicator" style="display: none;" data-text="<?php echo __('Loading next step...') ?>"> - <span><?php echo __('Loading next step...') ?></span> - </span> </div> </form> <script type="text/javascript"> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml similarity index 79% rename from app/code/Magento/Checkout/view/frontend/onepage/shipping_method.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml index 5f576a68c8ab5eaa08b3b9fdebef2a53ee95b6f8..6ef98d165ed1c5ef0e75d35b60a211276e1fd938 100644 --- a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml @@ -31,12 +31,8 @@ </div> <div class="actions toolbar" id="shipping-method-buttons-container"> <div class="primary"> - <button type="button" class="button action continue primary"><span><?php echo __('Continue') ?></span></button> + <button data-role="opc-continue" type="button" class="button action continue primary"><span><?php echo __('Continue') ?></span></button> </div> <div class="secondary"><a class="action back" href="#"><span><?php echo __('Back') ?></span></a></div> - <span id="shipping-method-please-wait" class="please-wait load indicator" style="display: none;" - data-text="<?php echo __('Loading next step...') ?>"> - <span><?php echo __('Loading next step...') ?></span> - </span> </div> </form> diff --git a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method/additional.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/additional.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/shipping_method/additional.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/additional.phtml diff --git a/app/code/Magento/Checkout/view/frontend/onepage/shipping_method/available.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/onepage/shipping_method/available.phtml rename to app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml diff --git a/app/code/Magento/Checkout/view/frontend/success.phtml b/app/code/Magento/Checkout/view/frontend/templates/success.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/success.phtml rename to app/code/Magento/Checkout/view/frontend/templates/success.phtml diff --git a/app/code/Magento/Checkout/view/frontend/total/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/total/default.phtml rename to app/code/Magento/Checkout/view/frontend/templates/total/default.phtml diff --git a/app/code/Magento/Checkout/view/frontend/total/nominal.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/nominal.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/total/nominal.phtml rename to app/code/Magento/Checkout/view/frontend/templates/total/nominal.phtml diff --git a/app/code/Magento/Checkout/view/frontend/total/tax.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/tax.phtml similarity index 100% rename from app/code/Magento/Checkout/view/frontend/total/tax.phtml rename to app/code/Magento/Checkout/view/frontend/templates/total/tax.phtml diff --git a/app/code/Magento/Checkout/view/frontend/cvv.gif b/app/code/Magento/Checkout/view/frontend/web/cvv.gif similarity index 100% rename from app/code/Magento/Checkout/view/frontend/cvv.gif rename to app/code/Magento/Checkout/view/frontend/web/cvv.gif diff --git a/app/code/Magento/Checkout/view/frontend/js/accordion.js b/app/code/Magento/Checkout/view/frontend/web/js/accordion.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/js/accordion.js rename to app/code/Magento/Checkout/view/frontend/web/js/accordion.js diff --git a/app/code/Magento/Checkout/view/frontend/js/discount-codes.js b/app/code/Magento/Checkout/view/frontend/web/js/discount-codes.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/js/discount-codes.js rename to app/code/Magento/Checkout/view/frontend/web/js/discount-codes.js diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-billing-info.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-billing-info.js new file mode 100644 index 0000000000000000000000000000000000000000..479b413d70b306907740eda5deb439e21f6e07e8 --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-billing-info.js @@ -0,0 +1,64 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category one page checkout second step + * @package mage + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +/*global alert*/ +(function($, window) { + 'use strict'; + // Extension for mage.opcheckout - second section(Billing Information) in one page checkout accordion + $.widget('mage.opcBillingInfo', $.mage.opcCheckoutMethod, { + options: { + billing: { + form: '#co-billing-form', + continueSelector: '#opc-billing [data-role=opc-continue]', + addressDropdownSelector: '#billing-address-select', + newAddressFormSelector: '#billing-new-address-form', + emailAddressName: 'billing[email]' + } + }, + + _create: function() { + this._super(); + var events = {}; + events['change ' + this.options.billing.addressDropdownSelector] = function(e) { + this.element.find(this.options.billing.newAddressFormSelector).toggle(!$(e.target).val()); + }; + events['click ' + this.options.billing.continueSelector] = function() { + if ($(this.options.billing.form).validation && $(this.options.billing.form).validation('isValid')) { + this._billingSave(); + } + }; + this._on(events); + + this.element.find(this.options.billing.form).validation(); + } , + + _billingSave: function() { + this._ajaxContinue(this.options.billing.saveUrl, $(this.options.billing.form).serialize(), false, function() { + //Trigger indicating billing save. eg. GiftMessage listens to this to inject gift options + this.element.trigger('billingSave'); + }); + } + }); +})(jQuery, window); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-checkout-method.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-checkout-method.js new file mode 100644 index 0000000000000000000000000000000000000000..b104a0425b0372c9829aa274f6bb118776d80607 --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-checkout-method.js @@ -0,0 +1,268 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category one page checkout first step + * @package mage + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +/*global alert*/ +(function($, window) { + 'use strict'; + // Base widget, handle ajax events and first section(Checkout Method) in one page checkout accordion + $.widget('mage.opcCheckoutMethod', { + options: { + checkout: { + loginGuestSelector: '[data-role=checkout-method-guest]', + loginRegisterSelector: '[data-role=checkout-method-register]', + loginFormSelector: 'form[data-role=login]', + continueSelector: '#opc-login [data-role=opc-continue]', + registerCustomerPasswordSelector: '#co-billing-form .field.password,#co-billing-form .field.confirm', + suggestRegistration: false + }, + sectionSelectorPrefix: 'opc-', + billingSection: 'billing', + ajaxLoaderPlaceButton: false, + updateSelectorPrefix: '#checkout-', + updateSelectorSuffix: '-load', + backSelector: '.action.back', + minBalance: 0.0001, + methodsListContainer: 'dl', + methodContainer: 'dt', + methodDescription : 'dd ul', + methodOn: 'dt input:radio' + }, + + _create: function() { + var self = this; + this.sectionActiveClass = this.element.accordion("option","openedState"); + this.contentSelector = this.element.accordion("option","content"); + this.checkoutPrice = this.options.quoteBaseGrandTotal; + if (this.options.checkout.suggestRegistration) { + $(this.options.checkout.loginGuestSelector).prop('checked', false); + $(this.options.checkout.loginRegisterSelector).prop('checked', true); + } + this._handleSteps(); + var events = {}; + events['click ' + this.options.checkout.continueSelector] = function(e) { + this._continue($(e.currentTarget)); + }; + events['click ' + this.options.backSelector] = function() { + var prev = self.steps.index($('.' + self.sectionActiveClass)) -1 ; + this._activateSection(prev); + }; + events['click ' + '[data-action=checkout-method-login]'] = function(event) { + if($(self.options.checkout.loginFormSelector).validation('isValid')){ + self.element.find('.section').filter('.' + self.sectionActiveClass).children(self.contentSelector).trigger("processStart"); + event.preventDefault(); + setTimeout(function(){ + $(self.options.checkout.loginFormSelector).submit(); + }, 300); + } + }; + $.extend(events, { + ajaxError: '_ajaxError', + showAjaxLoader: '_ajaxSend', + hideAjaxLoader: '_ajaxComplete', + gotoSection: function(e, section) { + this._ajaxUpdateProgress(section); + self.element.find('.section').filter('.' + self.sectionActiveClass).children(self.contentSelector).trigger("processStop"); + var toActivate = this.steps.index($('#' + self.options.sectionSelectorPrefix + section)); + this._activateSection(toActivate); + } + }); + this._on(events); + + this._on($(this.options.checkoutProgressContainer), { + 'click [data-goto-section]' : function(e) { + var gotoSection = $(e.target).data('goto-section'); + self.element.find('.section').filter('.' + self.sectionActiveClass).children(self.contentSelector).trigger("processStop"); + this._ajaxUpdateProgress(gotoSection); + var toActivate = this.steps.index($('#' + self.options.sectionSelectorPrefix + gotoSection)); + this._activateSection(toActivate); + return false; + } + }); + }, + + /** + * Get the checkout steps, disable steps but first, adding callback on before opening section to + * disable all next steps + * @private + */ + _handleSteps: function() { + var self = this; + this.steps = $(this.element).children('[id^=' + this.options.sectionSelectorPrefix + ']'); + this.element.accordion("disable"); + this._activateSection(0); + $.each(this.steps,function() { + $(this).on("beforeOpen",function() { + $(this).nextAll('[id^=' + self.options.sectionSelectorPrefix + ']').collapsible("disable"); + $(this).prevAll('[id^=' + self.options.sectionSelectorPrefix + ']').collapsible("enable"); + }); + }); + }, + + /** + * Activate section + * @param index the index of section you want to open + * @private + */ + _activateSection: function(index) { + this.element.accordion("enable",index); + this.element.accordion("activate",index); + }, + + /** + * Callback function for before ajax send event(global) + * @private + */ + _ajaxSend: function() { + this.element.find('.section').filter('.' + this.sectionActiveClass).children(this.contentSelector).trigger("processStart"); + }, + + /** + * Callback function for ajax complete event(global) + * @private + */ + _ajaxComplete: function() { + this.element.find('.section').filter('.' + this.sectionActiveClass).children(this.contentSelector).trigger("processStop"); + }, + + /** + * ajax error for all onepage checkout ajax calls + * @private + */ + _ajaxError: function() { + window.location.href = this.options.failureUrl; + }, + + /** + * callback function when continue button is clicked + * @private + * @param elem - continue button + * @return {Boolean} + */ + _continue: function(elem) { + var json = elem.data('checkout'); + if (json.isGuestCheckoutAllowed) { + if ($(this.options.checkout.loginGuestSelector).is(':checked')) { + this._ajaxContinue(this.options.checkout.saveUrl, {method:'guest'}, this.options.billingSection); + this.element.find(this.options.checkout.registerCustomerPasswordSelector).hide(); + } else if ($(this.options.checkout.loginRegisterSelector).is(':checked')) { + this._ajaxContinue(this.options.checkout.saveUrl, {method:'register'}, this.options.billingSection); + this.element.find(this.options.checkout.registerCustomerPasswordSelector).show(); + } else { + alert($.mage.__('Please choose to register or to checkout as a guest.')); + return false; + } + } + this.element.trigger('login'); + }, + + /** + * Ajax call to save checkout info to backend and enable next section in accordion + * @private + * @param url - ajax url + * @param data - post data for ajax call + * @param gotoSection - the section needs to show after ajax call + * @param successCallback - custom callback function in ajax success + */ + _ajaxContinue: function(url, data, gotoSection, successCallback) { + $.ajax({ + url: url, + type: 'post', + context: this, + data: data, + dataType: 'json', + beforeSend: this._ajaxSend, + complete: this._ajaxComplete, + success: function(response) { + if (successCallback) { + successCallback.call(this, response); + } + if ($.type(response) === 'object' && !$.isEmptyObject(response)) { + if (response.error) { + var msg = response.message || response.error_messages; + if (msg) { + if ($.type(msg) === 'array') { + msg = msg.join("\n"); + } + $(this.options.countrySelector).trigger('change'); + var emailAddress = {}; + emailAddress[this.options.billing.emailAddressName] = msg; + var billingFormValidator = $( this.options.billing.form ).validate(); + billingFormValidator.showErrors(emailAddress); + } else { + alert($.mage.__(response.error)); + } + return; + } + if (response.redirect) { + $.mage.redirect(response.redirect); + return false; + } + else if (response.success) { + $.mage.redirect(this.options.review.successUrl); + return false; + } + if (response.update_section) { + if (response.update_section.name === 'payment-method' && response.update_section.html.indexOf('data-checkout-price')) { + this.element.find(this.options.payment.form).find('[data-checkout-price]').remove(); + } + $(this.options.updateSelectorPrefix + response.update_section.name + this.options.updateSelectorSuffix) + .html($(response.update_section.html)).trigger('contentUpdated'); + } + if (response.duplicateBillingInfo) { + $(this.options.shipping.copyBillingSelector).prop('checked', true).trigger('click'); + $(this.options.shipping.addressDropdownSelector).val($(this.options.billing.addressDropdownSelector).val()).change(); + } + if (response.goto_section) { + this.element.trigger('gotoSection', response.goto_section); + } + } else { + this.element.trigger('gotoSection', gotoSection); + } + } + }); + }, + + /** + * Update progress sidebar content + * @private + * @param toStep + */ + _ajaxUpdateProgress: function(toStep) { + if (toStep) { + $.ajax({ + url: this.options.progressUrl, + type: 'get', + async: false, + cache: false, + context: this, + data: toStep ? {toStep: toStep} : null, + success: function(response) { + $(this.options.checkoutProgressContainer).html(response); + } + }); + } + } + }); +})(jQuery, window); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js new file mode 100644 index 0000000000000000000000000000000000000000..b8d7cbcd04b7a7e3a1896eb254e244f22bc7b35e --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-order-review.js @@ -0,0 +1,61 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category one page checkout last step + * @package mage + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +/*global alert*/ +(function($, window) { + 'use strict'; + // Extension for mage.opcheckout - last section(Order Review) in one page checkout accordion + $.widget('mage.opcOrderReview', $.mage.opcPaymentInfo, { + options: { + review: { + continueSelector: '#opc-review [data-role=review-save]', + container: '#opc-review', + agreementFormSelector: '#checkout-agreements-form' + } + }, + + _create: function() { + this._super(); + var events = {}; + events['click ' + this.options.review.continueSelector] = this._saveOrder; + events['saveOrder' + this.options.review.container] = this._saveOrder; + this._on(events); + }, + + _saveOrder: function() { + var agreementForm = $(this.options.review.agreementFormSelector), + paymentForm = $(this.options.payment.form); + agreementForm.validation(); + if (agreementForm.validation && + agreementForm.validation('isValid') && + paymentForm.validation && + paymentForm.validation('isValid')) { + this._ajaxContinue( + this.options.review.saveUrl, + paymentForm.serialize() + '&' + agreementForm.serialize()); + } + } + }); +})(jQuery, window); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-payment-info.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-payment-info.js new file mode 100644 index 0000000000000000000000000000000000000000..66454cb776b319dc13b1ce44a44869943af3e365 --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-payment-info.js @@ -0,0 +1,158 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category one page checkout fifth step + * @package mage + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +/*global alert*/ +(function($, window) { + 'use strict'; + // Extension for mage.opcheckout - fifth section(Payment Information) in one page checkout accordion + $.widget('mage.opcPaymentInfo', $.mage.opcShippingMethod, { + options: { + payment: { + form: '#co-payment-form', + continueSelector: '#opc-payment [data-role=opc-continue]', + methodsContainer: '#checkout-payment-method-load', + freeInput: { + tmpl: '<input id="hidden-free" type="hidden" name="payment[method]" value="free">', + selector: '#hidden-free' + } + } + }, + + _create: function() { + this._super(); + var events = {}; + events['click ' + this.options.payment.continueSelector] = function() { + if (this._validatePaymentMethod() && + $(this.options.payment.form).validation && + $(this.options.payment.form).validation('isValid')) { + this._ajaxContinue(this.options.payment.saveUrl, $(this.options.payment.form).serialize()); + } + }; + events['contentUpdated ' + this.options.payment.form] = function() { + $(this.options.payment.form).find('dd [name^="payment["]').prop('disabled', true); + var checkoutPrice = this.element.find(this.options.payment.form).find('[data-checkout-price]').data('checkout-price'); + if ($.isNumeric(checkoutPrice)) { + this.checkoutPrice = checkoutPrice; + } + if (this.checkoutPrice < this.options.minBalance && !this.options.hasRecurringItems) { + this._disablePaymentMethods(); + } else { + this._enablePaymentMethods(); + } + }; + events['click ' + this.options.payment.form + ' dt input:radio'] = '_paymentMethodHandler'; + + $.extend(events, { + updateCheckoutPrice: function(event, data) { + if (data.price) { + this.checkoutPrice += data.price; + } + if (data.totalPrice) { + data.totalPrice = this.checkoutPrice; + } + if (this.checkoutPrice < this.options.minBalance && !this.options.hasRecurringItems) { + // Add free input field, hide and disable unchecked checkbox payment method and all radio button payment methods + this._disablePaymentMethods(); + } else { + // Remove free input field, show all payment method + this._enablePaymentMethods(); + } + } + }); + + this._on(events); + + this.element.find(this.options.payment.form).validation({ + errorPlacement: function(error, element) { + if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-cc-ukss') >= 0) { + element.parents('form').find('[data-validation-msg="validate-cc-ukss"]').html(error); + } else { + element.after(error); + } + } + }); + }, + + /** + * Display payment details when payment method radio button is checked + * @private + * @param e + */ + _paymentMethodHandler: function(e) { + var _this = $(e.target), + parentsDl = _this.closest(this.options.methodsListContainer); + parentsDl.find(this.options.methodOn).prop('checked', false); + _this.prop('checked', true); + parentsDl.find(this.options.methodDescription).hide().find('[name^="payment["]').prop('disabled', true); + _this.parent().nextUntil(this.options.methodContainer).find(this.options.methodDescription).show().find('[name^="payment["]').prop('disabled', false); + }, + + /** + * make sure one payment method is selected + * @private + * @return {Boolean} + */ + _validatePaymentMethod: function() { + var methods = this.element.find('[name^="payment["]'); + if (methods.length === 0) { + alert($.mage.__("We can't complete your order because you don't have a payment method available.")); + return false; + } + if (this.checkoutPrice < this.options.minBalance && !this.options.hasRecurringItems) { + return true; + } else if (methods.filter('input:radio:checked').length) { + return true; + } + alert($.mage.__('Please specify payment method.')); + return false; + }, + + /** + * Disable and enable payment methods + * @private + */ + _disablePaymentMethods: function() { + var paymentForm = $(this.options.payment.form); + paymentForm.find('input[name="payment[method]"]').prop('disabled', true); + paymentForm.find(this.options.payment.methodsContainer).find('[name^="payment["]').prop('disabled', true); + paymentForm.find('input[id^="use"][name^="payment[use"]:not(:checked)').prop('disabled', true).parent(); + paymentForm.find(this.options.payment.freeInput.selector).remove(); + $.tmpl(this.options.payment.freeInput.tmpl).appendTo(paymentForm); + }, + + /** + * Enable and enable payment methods + * @private + */ + _enablePaymentMethods: function() { + var paymentForm = $(this.options.payment.form); + paymentForm.find('input[name="payment[method]"]').prop('disabled', false); + paymentForm.find('input[name="payment[method]"]:checked').trigger('click'); + paymentForm.find(this.options.payment.methodsContainer).show(); + paymentForm.find('input[id^="use"][name^="payment[use"]:not(:checked)').prop('disabled', false).parent().show(); + paymentForm.find(this.options.payment.freeInput.selector).remove(); + } + }); +})(jQuery, window); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-shipping-info.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-shipping-info.js new file mode 100644 index 0000000000000000000000000000000000000000..d5e3bcd54d74982cd6dc8d63d0d9f1b9b61a9f41 --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-shipping-info.js @@ -0,0 +1,86 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category one page checkout third step + * @package mage + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +/*global alert*/ +(function($, window) { + 'use strict'; + // Extension for mage.opcheckout - third section(Shipping Information) in one page checkout accordion + $.widget('mage.opcShippingInfo', $.mage.opcBillingInfo, { + options: { + shipping: { + form: '#co-shipping-form', + continueSelector:'#opc-shipping [data-role=opc-continue]', + addressDropdownSelector: '#shipping-address-select', + newAddressFormSelector: '#shipping-new-address-form', + copyBillingSelector: '#shipping\\:same_as_billing', + countrySelector: '#shipping\\:country_id' + } + }, + + _create: function() { + this._super(); + var events = {}; + events['change ' + this.options.shipping.addressDropdownSelector] = function(e) { + $(this.options.shipping.newAddressFormSelector).toggle(!$(e.target).val()); + }; + var onInputPropChange = function() { + $(this.options.shipping.copyBillingSelector).prop('checked', false); + }; + events['input ' + this.options.shipping.form + ' :input[name]'] = onInputPropChange; + events['propertychange ' + this.options.shipping.form + ' :input[name]'] = onInputPropChange; + events['click ' + this.options.shipping.copyBillingSelector] = function(e) { + if ($(e.target).is(':checked')) { + this._billingToShipping(); + } + }; + events['click ' + this.options.shipping.continueSelector] = function() { + if ($(this.options.shipping.form).validation && $(this.options.shipping.form).validation('isValid')) { + this._ajaxContinue(this.options.shipping.saveUrl, $(this.options.shipping.form).serialize(), false, function() { + //Trigger indicating shipping save. eg. GiftMessage listens to this to inject gift options + this.element.trigger('shippingSave'); + }); + } + }; + this._on(events); + + this.element.find(this.options.shipping.form).validation(); + }, + + /** + * Copy billing address info to shipping address + * @private + */ + _billingToShipping: function() { + $(':input[name]', this.options.billing.form).each($.proxy(function(key, value) { + var fieldObj = $(value.id.replace('billing:', '#shipping\\:')); + fieldObj.val($(value).val()); + if (fieldObj.is("select")) { + fieldObj.trigger('change'); + } + }, this)); + $(this.options.shipping.copyBillingSelector).prop('checked', true); + } + }); +})(jQuery, window); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-shipping-method.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-shipping-method.js new file mode 100644 index 0000000000000000000000000000000000000000..43501eb5876836bd7803d55393e37a0bd9515d4c --- /dev/null +++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-shipping-method.js @@ -0,0 +1,83 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category one page checkout fourth step + * @package mage + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint browser:true jquery:true*/ +/*global alert*/ +(function($, window) { + 'use strict'; + // Extension for mage.opcheckout - fourth section(Shipping Method) in one page checkout accordion + $.widget('mage.opcShippingMethod', $.mage.opcShippingInfo, { + options: { + shippingMethod: { + form: '#co-shipping-method-form', + continueSelector: '#opc-shipping_method [data-role=opc-continue]' + } + }, + + _create: function() { + this._super(); + var events = {}; + events['click ' + this.options.shippingMethod.continueSelector] = function() { + if (this._validateShippingMethod()&& + $(this.options.shippingMethod.form).validation && + $(this.options.shippingMethod.form).validation('isValid')) { + this._ajaxContinue(this.options.shippingMethod.saveUrl, $(this.options.shippingMethod.form).serialize()); + } + }; + $.extend(events, { + 'click input[name=shipping_method]': function(e) { + var selectedPrice = this.shippingCodePrice[$(e.target).val()] || 0, + oldPrice = this.shippingCodePrice[this.currentShippingMethod] || 0; + this.checkoutPrice = this.checkoutPrice - oldPrice + selectedPrice; + this.currentShippingMethod = $(e.target).val(); + }, + 'contentUpdated': function() { + this.currentShippingMethod = this.element.find('input[name="shipping_method"]:checked').val(); + this.shippingCodePrice = this.element.find('[data-shipping-code-price]').data('shipping-code-price'); + } + }); + this._on(events); + + this.element.find(this.options.shippingMethod.form).validation(); + }, + + /** + * Make sure at least one shipping method is selected + * @return {Boolean} + * @private + */ + _validateShippingMethod: function() { + var methods = this.element.find('[name="shipping_method"]'); + if (methods.length === 0) { + alert($.mage.__('We are not able to ship to the selected shipping address. Please choose another address or edit the current address.')); + return false; + } + if (methods.filter(':checked').length) { + return true; + } + alert($.mage.__('Please specify a shipping method.')); + return false; + } + }); +})(jQuery, window); diff --git a/app/code/Magento/Checkout/view/frontend/js/opcheckout.js b/app/code/Magento/Checkout/view/frontend/web/js/opcheckout.js similarity index 99% rename from app/code/Magento/Checkout/view/frontend/js/opcheckout.js rename to app/code/Magento/Checkout/view/frontend/web/js/opcheckout.js index 67e28df2a6ec9db06b5a29e5f8eb6f286d2a4f09..7c1862d44cdc6bd5283848b07b098960b7f7a018 100644 --- a/app/code/Magento/Checkout/view/frontend/js/opcheckout.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/opcheckout.js @@ -91,7 +91,7 @@ */ _ajaxSend: function() { this.element.addClass('loading'); - var loader = this.element.find('.section.active .please-wait').show(); + var loader = this.element.find('.please-wait').show(); if (this.options.ajaxLoaderPlaceButton) { loader.siblings('.button').hide(); } diff --git a/app/code/Magento/Checkout/view/frontend/js/overview.js b/app/code/Magento/Checkout/view/frontend/web/js/overview.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/js/overview.js rename to app/code/Magento/Checkout/view/frontend/web/js/overview.js diff --git a/app/code/Magento/Checkout/view/frontend/js/payment-authentication.js b/app/code/Magento/Checkout/view/frontend/web/js/payment-authentication.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/js/payment-authentication.js rename to app/code/Magento/Checkout/view/frontend/web/js/payment-authentication.js diff --git a/app/code/Magento/Checkout/view/frontend/js/payment.js b/app/code/Magento/Checkout/view/frontend/web/js/payment.js similarity index 96% rename from app/code/Magento/Checkout/view/frontend/js/payment.js rename to app/code/Magento/Checkout/view/frontend/web/js/payment.js index e2bcc7d619fd80b57e488ab765acff5c65afb1c7..05fc7cd13f94dba6a9da6ae9480a8025fa7449f4 100644 --- a/app/code/Magento/Checkout/view/frontend/js/payment.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/payment.js @@ -84,8 +84,9 @@ isValid = false; if (methods.length === 0) { alert($.mage.__("We can't complete your order because you don't have a payment method available.")); - } - else if (methods.filter(':checked').length) { + } else if (this.options.checkoutPrice < this.options.minBalance) { + isValid = true; + } else if (methods.filter('input:radio:checked').length) { isValid = true; } else { alert($.mage.__('Please specify payment method.')); diff --git a/app/code/Magento/Checkout/view/frontend/js/region-updater.js b/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/js/region-updater.js rename to app/code/Magento/Checkout/view/frontend/web/js/region-updater.js diff --git a/app/code/Magento/Checkout/view/frontend/js/shopping-cart.js b/app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/js/shopping-cart.js rename to app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js diff --git a/app/code/Magento/Checkout/view/frontend/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js similarity index 100% rename from app/code/Magento/Checkout/view/frontend/js/sidebar.js rename to app/code/Magento/Checkout/view/frontend/web/js/sidebar.js diff --git a/app/code/Magento/CheckoutAgreements/etc/adminhtml/acl.xml b/app/code/Magento/CheckoutAgreements/etc/adminhtml/acl.xml index b706ff49802b7f52d9eb086cf2bc3c892d04817c..b51f0fe9565ca21d3feb1cc7e412891a1a43a4fe 100644 --- a/app/code/Magento/CheckoutAgreements/etc/adminhtml/acl.xml +++ b/app/code/Magento/CheckoutAgreements/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/CheckoutAgreements/etc/adminhtml/routes.xml b/app/code/Magento/CheckoutAgreements/etc/adminhtml/routes.xml index a0bd79d1ad3aced20a02335a9009f2d257019aef..6dfdfbaee24b02389fb2b655b56b9ec0b52e9a0b 100644 --- a/app/code/Magento/CheckoutAgreements/etc/adminhtml/routes.xml +++ b/app/code/Magento/CheckoutAgreements/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="checkout" frontName="checkout"> <module name="Magento_CheckoutAgreements_Adminhtml" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/CheckoutAgreements/etc/di.xml b/app/code/Magento/CheckoutAgreements/etc/di.xml index b74cd22ecb3ee4923fa6ba901a737065257074b8..3bd5af6262c1b478bc264000b0b01c9850b37c31 100644 --- a/app/code/Magento/CheckoutAgreements/etc/di.xml +++ b/app/code/Magento/CheckoutAgreements/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/CheckoutAgreements/etc/module.xml b/app/code/Magento/CheckoutAgreements/etc/module.xml index fe570a0eedae91eae243618bc3d004ae85660360..32e7c203f9ad34f192a02d649270a00db7d0eefa 100644 --- a/app/code/Magento/CheckoutAgreements/etc/module.xml +++ b/app/code/Magento/CheckoutAgreements/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_CheckoutAgreements" version="1.0.0.0" active="true"> <sequence> <module name="Magento_Core" /> diff --git a/app/code/Magento/CheckoutAgreements/view/frontend/agreements.phtml b/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml similarity index 92% rename from app/code/Magento/CheckoutAgreements/view/frontend/agreements.phtml rename to app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml index d89a7a9316eb3bfb3c3ede50c08749926b13d2c0..39fc5e4e671cae37dab42efb042de804f0597bc3 100644 --- a/app/code/Magento/CheckoutAgreements/view/frontend/agreements.phtml +++ b/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml @@ -38,10 +38,10 @@ <?php echo nl2br($this->escapeHtml($_a->getContent())) ?> <?php endif; ?> </div> - <div class="field choice agree required"> - <input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" /> + <form id="checkout-agreements-form" class="field choice agree required"> + <input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" data-validate="{required:true}"/> <label class="label" for="agreement-<?php echo $_a->getId()?>"><span><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_a->getCheckboxText()) ?></span></label> - </div> + </form> </li> <?php endforeach ?> </ol> diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Config.php b/app/code/Magento/Cms/Model/Wysiwyg/Config.php index 877278785c67f86916db8d501faffddfa25fd91a..f837a38133c0f22ed158c42d8d18e00f04ce9559 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Config.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Config.php @@ -48,9 +48,9 @@ class Config extends \Magento\Framework\Object protected $_authorization; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Core\Model\Variable\Config @@ -98,7 +98,7 @@ class Config extends \Magento\Framework\Object * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Cms\Helper\Data $cmsData * @param \Magento\Framework\AuthorizationInterface $authorization - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Core\Model\Variable\Config $variableConfig * @param \Magento\Widget\Model\Widget\Config $widgetConfig * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig @@ -110,7 +110,7 @@ class Config extends \Magento\Framework\Object \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Cms\Helper\Data $cmsData, \Magento\Framework\AuthorizationInterface $authorization, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Core\Model\Variable\Config $variableConfig, \Magento\Widget\Model\Widget\Config $widgetConfig, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, @@ -122,7 +122,7 @@ class Config extends \Magento\Framework\Object $this->_cmsData = $cmsData; $this->_scopeConfig = $scopeConfig; $this->_authorization = $authorization; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_variableConfig = $variableConfig; $this->_widgetConfig = $widgetConfig; $this->_windowSize = $windowSize; @@ -160,10 +160,10 @@ class Config extends \Magento\Framework\Object 'translator' => $this->_cmsData, 'encode_directives' => true, 'directives_url' => $this->_backendUrl->getUrl('cms/wysiwyg/directive'), - 'popup_css' => $this->_viewUrl->getViewFileUrl( + 'popup_css' => $this->_assetRepo->getUrl( 'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css' ), - 'content_css' => $this->_viewUrl->getViewFileUrl( + 'content_css' => $this->_assetRepo->getUrl( 'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css' ), 'width' => '100%', @@ -208,7 +208,7 @@ class Config extends \Magento\Framework\Object */ public function getSkinImagePlaceholderUrl() { - return $this->_viewUrl->getViewFileUrl('Magento_Cms::images/wysiwyg_skin_image.png'); + return $this->_assetRepo->getUrl('Magento_Cms::images/wysiwyg_skin_image.png'); } /** diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php index aa0fe7730155a592fc0624f0536c48bb5572b028..40d09c13574a27f60ea996f90076b998348fb7b3 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php @@ -63,9 +63,9 @@ class Storage extends \Magento\Framework\Object protected $_imageFactory; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * Core file storage database @@ -150,7 +150,7 @@ class Storage extends \Magento\Framework\Object * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb * @param \Magento\Framework\App\Filesystem $filesystem * @param \Magento\Framework\Image\AdapterFactory $imageFactory - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory $storageCollectionFactory * @param \Magento\Core\Model\File\Storage\FileFactory $storageFileFactory * @param \Magento\Core\Model\File\Storage\DatabaseFactory $storageDatabaseFactory @@ -170,7 +170,7 @@ class Storage extends \Magento\Framework\Object \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb, \Magento\Framework\App\Filesystem $filesystem, \Magento\Framework\Image\AdapterFactory $imageFactory, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory $storageCollectionFactory, \Magento\Core\Model\File\Storage\FileFactory $storageFileFactory, \Magento\Core\Model\File\Storage\DatabaseFactory $storageDatabaseFactory, @@ -187,7 +187,7 @@ class Storage extends \Magento\Framework\Object $this->_coreFileStorageDb = $coreFileStorageDb; $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); $this->_imageFactory = $imageFactory; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_storageCollectionFactory = $storageCollectionFactory; $this->_storageFileFactory = $storageFileFactory; $this->_storageDatabaseFactory = $storageDatabaseFactory; @@ -320,7 +320,7 @@ class Storage extends \Magento\Framework\Object $item->setHeight($size[1]); } } else { - $thumbUrl = $this->_viewUrl->getViewFileUrl(self::THUMB_PLACEHOLDER_PATH_SUFFIX); + $thumbUrl = $this->_assetRepo->getUrl(self::THUMB_PLACEHOLDER_PATH_SUFFIX); } $item->setThumbUrl($thumbUrl); diff --git a/app/code/Magento/Cms/etc/adminhtml/acl.xml b/app/code/Magento/Cms/etc/adminhtml/acl.xml index 1c0617f7029bd0d65b8ab2ebbd4a3d647acb3f6f..59a0ca89f89be51f362f8ce5ef5ef5eca9742c69 100644 --- a/app/code/Magento/Cms/etc/adminhtml/acl.xml +++ b/app/code/Magento/Cms/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Cms/etc/adminhtml/di.xml b/app/code/Magento/Cms/etc/adminhtml/di.xml index 90df7803aaeb8e093bd418b521fb411021de42b6..f80ef0d776ac9bbac3fc6433c04ed4a4f659ef15 100644 --- a/app/code/Magento/Cms/etc/adminhtml/di.xml +++ b/app/code/Magento/Cms/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Cms\Block\Adminhtml\Page\Grid\Renderer\Action\UrlBuilder"> <arguments> <argument name="frontendUrlBuilder" xsi:type="object">Magento\Framework\Url</argument> diff --git a/app/code/Magento/Cms/etc/adminhtml/routes.xml b/app/code/Magento/Cms/etc/adminhtml/routes.xml index f8f3fe4933581564c2e469ca0c36998445dbfb3b..f69daf2ea0fce7f7a21fe4b677e2e698f83e7b11 100644 --- a/app/code/Magento/Cms/etc/adminhtml/routes.xml +++ b/app/code/Magento/Cms/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="cms" frontName="cms"> <module name="Magento_Cms_Adminhtml" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Cms/etc/di.xml b/app/code/Magento/Cms/etc/di.xml index d9abd0f3bffb9e53e5d9513794fb3f42b6e8a454..219506351b6400175513ac871b9bfc7005cd6501 100644 --- a/app/code/Magento/Cms/etc/di.xml +++ b/app/code/Magento/Cms/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Cms\Model\Wysiwyg\Config"> <arguments> <argument name="windowSize" xsi:type="array"> diff --git a/app/code/Magento/Cms/etc/frontend/di.xml b/app/code/Magento/Cms/etc/frontend/di.xml index b702db3c02f7bf5d6eb4fabd7e0c63d59abd440b..3a30677cf8e0c537218f7b8c7a3381ad6d0ffb37 100644 --- a/app/code/Magento/Cms/etc/frontend/di.xml +++ b/app/code/Magento/Cms/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\RouterList"> <arguments> <argument name="routerList" xsi:type="array"> diff --git a/app/code/Magento/Cms/etc/frontend/events.xml b/app/code/Magento/Cms/etc/frontend/events.xml index 3fb33d2aec2236ea09bcfae43e171de4dbc4e735..eab4a9c5e77fda12107e741262605dfa73d36296 100644 --- a/app/code/Magento/Cms/etc/frontend/events.xml +++ b/app/code/Magento/Cms/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_noroute"> <observer name="cms" instance="Magento\Cms\Model\Observer" method="noRoute" /> </event> diff --git a/app/code/Magento/Cms/etc/frontend/routes.xml b/app/code/Magento/Cms/etc/frontend/routes.xml index 30d1b51130648cbe7ccfd2a910d6635aa57fa730..fc38feebaa8689e1387ccddf9737a4ecdfdd48ac 100644 --- a/app/code/Magento/Cms/etc/frontend/routes.xml +++ b/app/code/Magento/Cms/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="cms" frontName="cms"> <module name="Magento_Cms" /> diff --git a/app/code/Magento/Cms/etc/module.xml b/app/code/Magento/Cms/etc/module.xml index 465c267d38c1d81400f21201eee4e4e9950d01da..f06763b72809a5bc4217042a99b1851bf442fb4c 100644 --- a/app/code/Magento/Cms/etc/module.xml +++ b/app/code/Magento/Cms/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Cms" version="2.0.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Cms/view/adminhtml/browser/content.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/browser/content.phtml rename to app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml diff --git a/app/code/Magento/Cms/view/adminhtml/browser/content/files.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/browser/content/files.phtml rename to app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml diff --git a/app/code/Magento/Cms/view/adminhtml/browser/content/uploader.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/browser/content/uploader.phtml rename to app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml diff --git a/app/code/Magento/Cms/view/adminhtml/browser/tree.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/browser/tree.phtml rename to app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml diff --git a/app/code/Magento/Cms/view/adminhtml/page/edit/form/renderer/content.phtml b/app/code/Magento/Cms/view/adminhtml/templates/page/edit/form/renderer/content.phtml similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/page/edit/form/renderer/content.phtml rename to app/code/Magento/Cms/view/adminhtml/templates/page/edit/form/renderer/content.phtml diff --git a/app/code/Magento/Cms/view/adminhtml/images/placeholder_thumbnail.jpg b/app/code/Magento/Cms/view/adminhtml/web/images/placeholder_thumbnail.jpg similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/images/placeholder_thumbnail.jpg rename to app/code/Magento/Cms/view/adminhtml/web/images/placeholder_thumbnail.jpg diff --git a/app/code/Magento/Cms/view/adminhtml/images/widget_block.gif b/app/code/Magento/Cms/view/adminhtml/web/images/widget_block.gif similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/images/widget_block.gif rename to app/code/Magento/Cms/view/adminhtml/web/images/widget_block.gif diff --git a/app/code/Magento/Cms/view/adminhtml/images/widget_page_link.gif b/app/code/Magento/Cms/view/adminhtml/web/images/widget_page_link.gif similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/images/widget_page_link.gif rename to app/code/Magento/Cms/view/adminhtml/web/images/widget_page_link.gif diff --git a/app/code/Magento/Cms/view/adminhtml/images/wysiwyg_skin_image.png b/app/code/Magento/Cms/view/adminhtml/web/images/wysiwyg_skin_image.png similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/images/wysiwyg_skin_image.png rename to app/code/Magento/Cms/view/adminhtml/web/images/wysiwyg_skin_image.png diff --git a/app/code/Magento/Cms/view/adminhtml/js/folder-tree.js b/app/code/Magento/Cms/view/adminhtml/web/js/folder-tree.js similarity index 100% rename from app/code/Magento/Cms/view/adminhtml/js/folder-tree.js rename to app/code/Magento/Cms/view/adminhtml/web/js/folder-tree.js diff --git a/app/code/Magento/Cms/view/frontend/content.phtml b/app/code/Magento/Cms/view/frontend/templates/content.phtml similarity index 100% rename from app/code/Magento/Cms/view/frontend/content.phtml rename to app/code/Magento/Cms/view/frontend/templates/content.phtml diff --git a/app/code/Magento/Cms/view/frontend/default/home.phtml b/app/code/Magento/Cms/view/frontend/templates/default/home.phtml similarity index 100% rename from app/code/Magento/Cms/view/frontend/default/home.phtml rename to app/code/Magento/Cms/view/frontend/templates/default/home.phtml diff --git a/app/code/Magento/Cms/view/frontend/default/no-route.phtml b/app/code/Magento/Cms/view/frontend/templates/default/no-route.phtml similarity index 100% rename from app/code/Magento/Cms/view/frontend/default/no-route.phtml rename to app/code/Magento/Cms/view/frontend/templates/default/no-route.phtml diff --git a/app/code/Magento/Cms/view/frontend/meta.phtml b/app/code/Magento/Cms/view/frontend/templates/meta.phtml similarity index 100% rename from app/code/Magento/Cms/view/frontend/meta.phtml rename to app/code/Magento/Cms/view/frontend/templates/meta.phtml diff --git a/app/code/Magento/Cms/view/frontend/widget/link/link_block.phtml b/app/code/Magento/Cms/view/frontend/templates/widget/link/link_block.phtml similarity index 100% rename from app/code/Magento/Cms/view/frontend/widget/link/link_block.phtml rename to app/code/Magento/Cms/view/frontend/templates/widget/link/link_block.phtml diff --git a/app/code/Magento/Cms/view/frontend/widget/link/link_inline.phtml b/app/code/Magento/Cms/view/frontend/templates/widget/link/link_inline.phtml similarity index 100% rename from app/code/Magento/Cms/view/frontend/widget/link/link_inline.phtml rename to app/code/Magento/Cms/view/frontend/templates/widget/link/link_inline.phtml diff --git a/app/code/Magento/Cms/view/frontend/widget/static_block/default.phtml b/app/code/Magento/Cms/view/frontend/templates/widget/static_block/default.phtml similarity index 100% rename from app/code/Magento/Cms/view/frontend/widget/static_block/default.phtml rename to app/code/Magento/Cms/view/frontend/templates/widget/static_block/default.phtml diff --git a/app/code/Magento/Cms/view/frontend/images/about_us_img.jpg b/app/code/Magento/Cms/view/frontend/web/images/about_us_img.jpg similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/about_us_img.jpg rename to app/code/Magento/Cms/view/frontend/web/images/about_us_img.jpg diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/firefox.png b/app/code/Magento/Cms/view/frontend/web/images/cookies/firefox.png similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/firefox.png rename to app/code/Magento/Cms/view/frontend/web/images/cookies/firefox.png diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie6-1.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie6-1.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie6-1.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie6-1.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie6-2.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie6-2.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie6-2.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie6-2.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie7-1.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-1.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie7-1.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-1.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie7-2.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-2.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie7-2.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-2.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie7-3.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-3.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie7-3.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-3.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie7-4.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-4.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie7-4.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-4.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie7-5.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-5.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie7-5.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-5.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/ie7-6.gif b/app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-6.gif similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/ie7-6.gif rename to app/code/Magento/Cms/view/frontend/web/images/cookies/ie7-6.gif diff --git a/app/code/Magento/Cms/view/frontend/images/cookies/opera.png b/app/code/Magento/Cms/view/frontend/web/images/cookies/opera.png similarity index 100% rename from app/code/Magento/Cms/view/frontend/images/cookies/opera.png rename to app/code/Magento/Cms/view/frontend/web/images/cookies/opera.png diff --git a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/GenerateVariations.php b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/GenerateVariations.php index d4860f05e8574cab36766cc2e337493a12860f12..2a824de4b0253646044082f8cc218ff214199b5a 100644 --- a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/GenerateVariations.php +++ b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/GenerateVariations.php @@ -81,6 +81,7 @@ class GenerateVariations extends Action public function indexAction() { $this->_saveAttributeOptions(); + $this->getRequest()->setParam('variations-matrix', array()); $this->initializationHelper->initialize($this->productBuilder->build($this->getRequest())); $this->_view->loadLayout(); $this->_view->renderLayout(); diff --git a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php index 2b92c3199c95108f94552cbe13941134d807b1c1..c8e5a1f2b2eb09c7d1b62eb0407b61176e8495a0 100644 --- a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php +++ b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php @@ -58,11 +58,9 @@ class Configurable $product->setNewVariationsAttributeSetId($this->request->getPost('new-variations-attribute-set-id')); $associatedProductIds = $this->request->getPost('associated_product_ids', array()); - if ($this->request->getActionName() != 'generateVariations') { - $generatedProductIds = $this->productType->generateSimpleProducts( - $product, - $this->request->getPost('variations-matrix', array()) - ); + $variationsMatrix = $this->request->getParam('variations-matrix', array()); + if (!empty($variationsMatrix)) { + $generatedProductIds = $this->productType->generateSimpleProducts($product, $variationsMatrix); $associatedProductIds = array_merge($associatedProductIds, $generatedProductIds); } $product->setAssociatedProductIds(array_filter($associatedProductIds)); diff --git a/app/code/Magento/ConfigurableProduct/etc/adminhtml/di.xml b/app/code/Magento/ConfigurableProduct/etc/adminhtml/di.xml index 9eb203527b22bbe8f84dffb73b12ab8a4d432046..5f2113950fe6f3a3eb9f9b9928213142f3d457d2 100644 --- a/app/code/Magento/ConfigurableProduct/etc/adminhtml/di.xml +++ b/app/code/Magento/ConfigurableProduct/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper"> <plugin name="configurable" type="Magento\ConfigurableProduct\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Configurable" sortOrder="50" /> </type> diff --git a/app/code/Magento/ConfigurableProduct/etc/adminhtml/events.xml b/app/code/Magento/ConfigurableProduct/etc/adminhtml/events.xml index c9f290f7d0fed941ceca102aa7d1defe6a23b261..e6e3634ad74a5bfcde47897750f1ae4197fab2cd 100644 --- a/app/code/Magento/ConfigurableProduct/etc/adminhtml/events.xml +++ b/app/code/Magento/ConfigurableProduct/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="product_attribute_form_build"> <observer name="configurable" instance="Magento\ConfigurableProduct\Block\Adminhtml\Product\Attribute\Edit\Tab\Advanced\Observer" method="observe" /> </event> diff --git a/app/code/Magento/ConfigurableProduct/etc/adminhtml/routes.xml b/app/code/Magento/ConfigurableProduct/etc/adminhtml/routes.xml index 6106e52830d91af0f0be2a55dc8d156455d9349c..9fd65c700a47d30e37fc2de5b070adc41c14de3b 100644 --- a/app/code/Magento/ConfigurableProduct/etc/adminhtml/routes.xml +++ b/app/code/Magento/ConfigurableProduct/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="catalog" frontName="catalog"> <module name="Magento_ConfigurableProduct" /> diff --git a/app/code/Magento/ConfigurableProduct/etc/di.xml b/app/code/Magento/ConfigurableProduct/etc/di.xml index 393226013bed0a07cbcea6cd76502b3848495fb8..a3b9a10ce9a4c265b5e120c4b9d1ee6509f239cb 100644 --- a/app/code/Magento/ConfigurableProduct/etc/di.xml +++ b/app/code/Magento/ConfigurableProduct/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option"> <plugin name="configurable_product" type="Magento\ConfigurableProduct\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin\ConfigurableProduct" sortOrder="50" /> </type> diff --git a/app/code/Magento/ConfigurableProduct/etc/module.xml b/app/code/Magento/ConfigurableProduct/etc/module.xml index ae53a99001587fdc384b9cf564e5911acc2eba15..3779cf96d8669ce2d95fa1b6d56469724d41fade 100644 --- a/app/code/Magento/ConfigurableProduct/etc/module.xml +++ b/app/code/Magento/ConfigurableProduct/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_ConfigurableProduct" version="1.0.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> @@ -48,6 +48,7 @@ <module name="Magento_CatalogRule" /> <module name="Magento_Directory" /> <module name="Magento_Weee" /> + <module name="Magento_RequireJs" /> </depends> </module> </config> diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/js.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute/js.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/js.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute/new/created.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/new/created.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute/new/created.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/new/created.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute/set/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute/set/js.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/composite/fieldset/configurable.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/composite/fieldset/configurable.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/attribute-js-template.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/attribute-template.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-template.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/attribute-template.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-template.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/config.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/config.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/generator.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/generator.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/generator.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/generator.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/matrix.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/edit/super/matrix.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/form.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/affected-attribute-set-selector/form.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/form.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/affected-attribute-set-selector/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/affected-attribute-set-selector/js.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/attribute-selector/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/attribute-selector/js.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/stock/disabler.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/stock/disabler.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/product/configurable/stock/disabler.phtml rename to app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/stock/disabler.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product-variation.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/catalog/product-variation.js similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product-variation.js rename to app/code/Magento/ConfigurableProduct/view/adminhtml/web/catalog/product-variation.js diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/catalog/product/attribute.js similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/catalog/product/attribute.js rename to app/code/Magento/ConfigurableProduct/view/adminhtml/web/catalog/product/attribute.js diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/css/configurable-product.css b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/css/configurable-product.css similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/css/configurable-product.css rename to app/code/Magento/ConfigurableProduct/view/adminhtml/web/css/configurable-product.css diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/js/configurable.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/configurable.js similarity index 99% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/js/configurable.js rename to app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/configurable.js index 9ddd2af22cc299c1c601d913dfef396a0bf3db2c..f880bb19deb579e482b0d1c79122c8553280df71 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/js/configurable.js +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/configurable.js @@ -319,4 +319,4 @@ Product.Config.prototype = { } } -} +}; diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/product/product.css b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/product/product.css similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/adminhtml/product/product.css rename to app/code/Magento/ConfigurableProduct/view/adminhtml/web/product/product.css diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/layout/catalog_product_view_type_configurable.xml b/app/code/Magento/ConfigurableProduct/view/frontend/layout/catalog_product_view_type_configurable.xml index 1e51e658aae43020d1897704e50c29e91558a0ac..bcb93b40976a1219f7ce599f45574de644554274 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/layout/catalog_product_view_type_configurable.xml +++ b/app/code/Magento/ConfigurableProduct/view/frontend/layout/catalog_product_view_type_configurable.xml @@ -24,6 +24,14 @@ */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Core/etc/layout_single.xsd"> + <referenceBlock name="head"> + <block class="Magento\Theme\Block\Html\Head\Script" name="requirejs" before="-"> + <arguments> + <argument name="file" xsi:type="string">requirejs/require.js</argument> + </arguments> + </block> + <block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config" after="requirejs"/> + </referenceBlock> <referenceBlock name="head.components"> <block class="Magento\Framework\View\Element\Js\Components" name="configurableproduct_product_view_head_components" template="Magento_ConfigurableProduct::js/components.phtml"/> </referenceBlock> diff --git a/pub/lib/mage/tabs.js b/app/code/Magento/ConfigurableProduct/view/frontend/requirejs-config.js similarity index 83% rename from pub/lib/mage/tabs.js rename to app/code/Magento/ConfigurableProduct/view/frontend/requirejs-config.js index 003fadc06c4e5c99e5e7a6af0b56113018aa1a57..3c0b6a3062cb24c49168f24a59b8cab94274ae56 100644 --- a/pub/lib/mage/tabs.js +++ b/app/code/Magento/ConfigurableProduct/view/frontend/requirejs-config.js @@ -21,9 +21,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -(function($) { - 'use strict'; - //Wrapper for widget - $.widget('mage.tabs', $.ui.tabs, { - }); -})(jQuery); +var config = { + shim: { + 'jquery.parsequery': { + deps: ['jquery'] + } + }, + paths: { + 'jquery.parsequery': 'jquery/jquery.parsequery' + } +}; diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/js/components.phtml b/app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/ConfigurableProduct/view/frontend/js/components.phtml rename to app/code/Magento/ConfigurableProduct/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/product/view/type/options/configurable.phtml b/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml similarity index 90% rename from app/code/Magento/ConfigurableProduct/view/frontend/product/view/type/options/configurable.phtml rename to app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml index aef2e4f74c37015ed983f6ed9981929fb5de2ceb..a39891d52f564ed6cb9410c0764e2438eda0f9f1 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/product/view/type/options/configurable.phtml +++ b/app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml @@ -45,10 +45,8 @@ $_attributes = $this->decorateArray($this->getAllowAttributes()); </div> <?php endforeach; ?> <script type="text/javascript"> - (function ($) { - $('#product_addtocart_form').mage('configurable', { - "spConfig":<?php echo $this->getJsonConfig() ?> - }); - })(jQuery); + require(["jquery", "magento!Magento_ConfigurableProduct::js/configurable"], function($){ + $('#product_addtocart_form').configurable({"spConfig":<?php echo $this->getJsonConfig() ?>}); + }) </script> <?php endif;?> diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/js/configurable.js b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js similarity index 99% rename from app/code/Magento/ConfigurableProduct/view/frontend/js/configurable.js rename to app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js index 9373c759a5a9d2edeb66ffcf5d002b013667d1f9..194be8c18961fbc3addfe2e691e75bcae3bdfb28 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/js/configurable.js +++ b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js @@ -22,7 +22,7 @@ */ /*jshint browser:true jquery:true*/ -(function($, undefined) { +define(['jquery', 'jquery-ui', 'jquery.parsequery'], function($){ $.widget('mage.configurable', { options: { superSelector: '.super-attribute-select', @@ -454,4 +454,4 @@ return price; } }); -})(jQuery); +}); diff --git a/app/code/Magento/Connect/etc/adminhtml/acl.xml b/app/code/Magento/Connect/etc/adminhtml/acl.xml index 1ad8914f7dad774f7719f8f261d25075d8e63d6d..fe72bba37e6c4e1ddcb4e260e75ec0820d5afd0a 100644 --- a/app/code/Magento/Connect/etc/adminhtml/acl.xml +++ b/app/code/Magento/Connect/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources /> </acl> diff --git a/app/code/Magento/Connect/etc/adminhtml/routes.xml b/app/code/Magento/Connect/etc/adminhtml/routes.xml index 35fad955f78a20ea11cbfe8daaa8f6a1908e8ecc..7d850cdb949d1feb9bcfadc7c97c81217de0bc7e 100644 --- a/app/code/Magento/Connect/etc/adminhtml/routes.xml +++ b/app/code/Magento/Connect/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Connect" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Connect/etc/di.xml b/app/code/Magento/Connect/etc/di.xml index b06688aff1db0956bd61d894c3f27aea87b0b794..0d0897fee963d9962e46148259c605439acc03d4 100644 --- a/app/code/Magento/Connect/etc/di.xml +++ b/app/code/Magento/Connect/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Connect\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">adminhtml</argument> diff --git a/app/code/Magento/Connect/etc/module.xml b/app/code/Magento/Connect/etc/module.xml index 6cdd56f3d50a1aaadc5d561a18e2e85c79dc4e3a..24f1b50b98c94a105b379004e668f882c1e326a1 100644 --- a/app/code/Magento/Connect/etc/module.xml +++ b/app/code/Magento/Connect/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Connect" version="1.6.0.0" active="true"> <depends> <module name="Magento_Store"/> diff --git a/app/code/Magento/Connect/view/adminhtml/extension/custom/authors.phtml b/app/code/Magento/Connect/view/adminhtml/templates/extension/custom/authors.phtml similarity index 100% rename from app/code/Magento/Connect/view/adminhtml/extension/custom/authors.phtml rename to app/code/Magento/Connect/view/adminhtml/templates/extension/custom/authors.phtml diff --git a/app/code/Magento/Connect/view/adminhtml/extension/custom/contents.phtml b/app/code/Magento/Connect/view/adminhtml/templates/extension/custom/contents.phtml similarity index 100% rename from app/code/Magento/Connect/view/adminhtml/extension/custom/contents.phtml rename to app/code/Magento/Connect/view/adminhtml/templates/extension/custom/contents.phtml diff --git a/app/code/Magento/Connect/view/adminhtml/extension/custom/depends.phtml b/app/code/Magento/Connect/view/adminhtml/templates/extension/custom/depends.phtml similarity index 100% rename from app/code/Magento/Connect/view/adminhtml/extension/custom/depends.phtml rename to app/code/Magento/Connect/view/adminhtml/templates/extension/custom/depends.phtml diff --git a/app/code/Magento/Connect/view/adminhtml/extension/custom/load.phtml b/app/code/Magento/Connect/view/adminhtml/templates/extension/custom/load.phtml similarity index 100% rename from app/code/Magento/Connect/view/adminhtml/extension/custom/load.phtml rename to app/code/Magento/Connect/view/adminhtml/templates/extension/custom/load.phtml diff --git a/app/code/Magento/Connect/view/adminhtml/extension/custom/package.phtml b/app/code/Magento/Connect/view/adminhtml/templates/extension/custom/package.phtml similarity index 100% rename from app/code/Magento/Connect/view/adminhtml/extension/custom/package.phtml rename to app/code/Magento/Connect/view/adminhtml/templates/extension/custom/package.phtml diff --git a/app/code/Magento/Connect/view/adminhtml/extension/custom/release.phtml b/app/code/Magento/Connect/view/adminhtml/templates/extension/custom/release.phtml similarity index 100% rename from app/code/Magento/Connect/view/adminhtml/extension/custom/release.phtml rename to app/code/Magento/Connect/view/adminhtml/templates/extension/custom/release.phtml diff --git a/app/code/Magento/Contact/Controller/Index.php b/app/code/Magento/Contact/Controller/Index.php index 54b75f21519831f939f0ea4eeb949ffc6718339b..66f4f023fe5f0c651fb676d040111b012b298452 100644 --- a/app/code/Magento/Contact/Controller/Index.php +++ b/app/code/Magento/Contact/Controller/Index.php @@ -31,12 +31,24 @@ use Magento\Framework\App\RequestInterface; */ class Index extends \Magento\Framework\App\Action\Action { + /** + * Recipient email config path + */ const XML_PATH_EMAIL_RECIPIENT = 'contact/email/recipient_email'; + /** + * Sender email config path + */ const XML_PATH_EMAIL_SENDER = 'contact/email/sender_email_identity'; + /** + * Email template config path + */ const XML_PATH_EMAIL_TEMPLATE = 'contact/email/email_template'; + /** + * Enabled config path + */ const XML_PATH_ENABLED = 'contact/contact/enabled'; /** @@ -49,19 +61,35 @@ class Index extends \Magento\Framework\App\Action\Action */ protected $inlineTranslation; + /** + * @var \Magento\Framework\App\Config\ScopeConfigInterface + */ + protected $scopeConfig; + + /** + * @var \Magento\Store\Model\StoreManagerInterface + */ + protected $storeManager; + /** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param \Magento\Store\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, - \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation + \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + \Magento\Store\Model\StoreManagerInterface $storeManager ) { parent::__construct($context); $this->_transportBuilder = $transportBuilder; $this->inlineTranslation = $inlineTranslation; + $this->scopeConfig = $scopeConfig; + $this->storeManager = $storeManager; } /** @@ -73,13 +101,7 @@ class Index extends \Magento\Framework\App\Action\Action */ public function dispatch(RequestInterface $request) { - if (!$this->_objectManager->get( - 'Magento\Framework\App\Config\ScopeConfigInterface' - )->isSetFlag( - self::XML_PATH_ENABLED, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) - ) { + if (!$this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) { throw new NotFoundException(); } return parent::dispatch($request); @@ -93,12 +115,9 @@ class Index extends \Magento\Framework\App\Action\Action public function indexAction() { $this->_view->loadLayout(); - $this->_view->getLayout()->getBlock( - 'contactForm' - )->setFormAction( - $this->_objectManager->create('Magento\Framework\UrlInterface')->getUrl('*/*/post') - ); - + $this->_view->getLayout() + ->getBlock('contactForm') + ->setFormAction($this->_url->getUrl('*/*/post', ['_secure' => true])); $this->_view->getLayout()->initMessages(); $this->_view->renderLayout(); } @@ -111,87 +130,64 @@ class Index extends \Magento\Framework\App\Action\Action */ public function postAction() { - if (!$this->getRequest()->isSecure()) { + $post = $this->getRequest()->getPost(); + if (!$post) { $this->_redirect('*/*/'); return; } - $post = $this->getRequest()->getPost(); - if ($post) { - $this->inlineTranslation->suspend(); - try { - $postObject = new \Magento\Framework\Object(); - $postObject->setData($post); - - $error = false; - - if (!\Zend_Validate::is(trim($post['name']), 'NotEmpty')) { - $error = true; - } - - if (!\Zend_Validate::is(trim($post['comment']), 'NotEmpty')) { - $error = true; - } - - if (!\Zend_Validate::is(trim($post['email']), 'EmailAddress')) { - $error = true; - } - - if (\Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) { - $error = true; - } - - if ($error) { - throw new \Exception(); - } - - $scopeConfig = $this->_objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface'); - $storeManager = $this->_objectManager->get('Magento\Store\Model\StoreManagerInterface'); - $transport = $this->_transportBuilder->setTemplateIdentifier( - $scopeConfig->getValue( - self::XML_PATH_EMAIL_TEMPLATE, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) - )->setTemplateOptions( - array( - 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, - 'store' => $storeManager->getStore()->getId() - ) - )->setTemplateVars( - array('data' => $postObject) - )->setFrom( - $scopeConfig->getValue( - self::XML_PATH_EMAIL_SENDER, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) - )->addTo( - $scopeConfig->getValue( - self::XML_PATH_EMAIL_RECIPIENT, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) - )->setReplyTo( - $post['email'] - )->getTransport(); - - $transport->sendMessage(); - - $this->inlineTranslation->resume(); - - $this->messageManager->addSuccess( - __('Thanks for contacting us with your comments and questions. We\'ll respond to you very soon.') - ); - $this->_redirect('*/*/'); - - return; - } catch (\Exception $e) { - $this->inlineTranslation->resume(); - $this->messageManager->addError( - __('We can\'t process your request right now. Sorry, that\'s all we know.') - ); - $this->_redirect('*/*/'); - return; + + $this->inlineTranslation->suspend(); + try { + $postObject = new \Magento\Framework\Object(); + $postObject->setData($post); + + $error = false; + + if (!\Zend_Validate::is(trim($post['name']), 'NotEmpty')) { + $error = true; + } + if (!\Zend_Validate::is(trim($post['comment']), 'NotEmpty')) { + $error = true; + } + if (!\Zend_Validate::is(trim($post['email']), 'EmailAddress')) { + $error = true; } - } else { + if (\Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) { + $error = true; + } + if ($error) { + throw new \Exception(); + } + + $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE; + $transport = $this->_transportBuilder + ->setTemplateIdentifier($this->scopeConfig->getValue(self::XML_PATH_EMAIL_TEMPLATE, $storeScope)) + ->setTemplateOptions( + [ + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, + 'store' => $this->storeManager->getStore()->getId() + ] + ) + ->setTemplateVars(array('data' => $postObject)) + ->setFrom($this->scopeConfig->getValue(self::XML_PATH_EMAIL_SENDER, $storeScope)) + ->addTo($this->scopeConfig->getValue(self::XML_PATH_EMAIL_RECIPIENT, $storeScope)) + ->setReplyTo($post['email']) + ->getTransport(); + + $transport->sendMessage(); + $this->inlineTranslation->resume(); + $this->messageManager->addSuccess( + __('Thanks for contacting us with your comments and questions. We\'ll respond to you very soon.') + ); $this->_redirect('*/*/'); + return; + } catch (\Exception $e) { + $this->inlineTranslation->resume(); + $this->messageManager->addError( + __('We can\'t process your request right now. Sorry, that\'s all we know.') + ); + $this->_redirect('*/*/'); + return; } } } diff --git a/app/code/Magento/Contact/etc/adminhtml/acl.xml b/app/code/Magento/Contact/etc/adminhtml/acl.xml index eef07dc4996842839f42821d181d26ff9a741fe2..d957ae0cd5a164df613a774876e407616865c17b 100644 --- a/app/code/Magento/Contact/etc/adminhtml/acl.xml +++ b/app/code/Magento/Contact/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Contact/etc/frontend/di.xml b/app/code/Magento/Contact/etc/frontend/di.xml index 72d28365aab06de1a833277ebfed6c72b6da6636..66f85b65ef298e1a7b0d36ffe964bc873ca95dae 100644 --- a/app/code/Magento/Contact/etc/frontend/di.xml +++ b/app/code/Magento/Contact/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Core\Model\Url\SecurityInfo"> <arguments> <argument name="secureUrlList" xsi:type="array"> diff --git a/app/code/Magento/Contact/etc/frontend/routes.xml b/app/code/Magento/Contact/etc/frontend/routes.xml index 2e9f7152a10d5b86f91c2d9af50e8bcfc29df498..6f66175955bae240c1827358fa3b5bfb3419a7fc 100644 --- a/app/code/Magento/Contact/etc/frontend/routes.xml +++ b/app/code/Magento/Contact/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="contact" frontName="contact"> <module name="Magento_Contact" /> diff --git a/app/code/Magento/Contact/etc/module.xml b/app/code/Magento/Contact/etc/module.xml index 3a1068a98212add1e471e7a3b90d246c6d60489d..d0181bcdf9d8987ca795ecab701fd53035c3053b 100644 --- a/app/code/Magento/Contact/etc/module.xml +++ b/app/code/Magento/Contact/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Contact" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Contact/view/frontend/form.phtml b/app/code/Magento/Contact/view/frontend/templates/form.phtml similarity index 100% rename from app/code/Magento/Contact/view/frontend/form.phtml rename to app/code/Magento/Contact/view/frontend/templates/form.phtml diff --git a/app/code/Magento/Core/Helper/Theme.php b/app/code/Magento/Core/Helper/Theme.php index 62209c749ac8a7c99dab7ddb5eabda4572c09cb8..d69a0af1be4b11312f5ab063b41b1783636eb26b 100644 --- a/app/code/Magento/Core/Helper/Theme.php +++ b/app/code/Magento/Core/Helper/Theme.php @@ -29,13 +29,6 @@ namespace Magento\Core\Helper; class Theme extends \Magento\Framework\App\Helper\AbstractHelper { - /** - * Filesystem facade - * - * @var \Magento\Framework\App\Filesystem - */ - protected $_filesystem; - /** * Layout merge factory * @@ -44,50 +37,36 @@ class Theme extends \Magento\Framework\App\Helper\AbstractHelper protected $_layoutProcessorFactory; /** - * Theme collection model - * - * @var \Magento\Core\Model\Resource\Theme\Collection - */ - protected $_themeCollection; - - /** - * @var \Magento\Framework\View\FileSystem + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewFileSystem; + protected $_assetRepo; /** * @param \Magento\Framework\App\Helper\Context $context - * @param \Magento\Framework\App\Filesystem $filesystem * @param \Magento\Framework\View\Layout\ProcessorFactory $layoutProcessorFactory - * @param \Magento\Core\Model\Resource\Theme\Collection $themeCollection - * @param \Magento\Framework\View\FileSystem $viewFileSystem + * @param \Magento\Framework\View\Asset\Repository $assetRepo */ public function __construct( \Magento\Framework\App\Helper\Context $context, - \Magento\Framework\App\Filesystem $filesystem, \Magento\Framework\View\Layout\ProcessorFactory $layoutProcessorFactory, - \Magento\Core\Model\Resource\Theme\Collection $themeCollection, - \Magento\Framework\View\FileSystem $viewFileSystem + \Magento\Framework\View\Asset\Repository $assetRepo ) { - $this->_filesystem = $filesystem; $this->_layoutProcessorFactory = $layoutProcessorFactory; - $this->_themeCollection = $themeCollection; - $this->_viewFileSystem = $viewFileSystem; + $this->_assetRepo = $assetRepo; parent::__construct($context); } /** * Get CSS files of a given theme * - * Returned array has a structure - * array( - * 'Magento_Catalog::widgets.css' => 'http://mage2.com/pub/static/frontend/_theme15/en_US/Magento_Cms/widgets.css' - * ) + * Returns an associative array of local assets with FileId used as keys: + * array('Magento_Catalog::widgets.css' => \Magento\Framework\View\Asset\LocalInterface) + * The array will be sorted by keys * * @param \Magento\Framework\View\Design\ThemeInterface $theme - * @return array + * @return \Magento\Framework\View\Asset\LocalInterface[] */ - public function getCssFiles($theme) + public function getCssAssets($theme) { /** @var $layoutProcessor \Magento\Framework\View\Layout\ProcessorInterface */ $layoutProcessor = $this->_layoutProcessorFactory->create(array('theme' => $theme)); @@ -110,257 +89,17 @@ class Theme extends \Magento\Framework\App\Helper\AbstractHelper $layoutElement->xpath($xpathSelectorRefs) ?: array() ); - $params = array('area' => $theme->getArea(), 'themeModel' => $theme, 'skipProxy' => true); + $params = array( + 'area' => $theme->getArea(), + 'themeModel' => $theme, + ); - $rootDirectory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - $files = array(); + $result = array(); foreach ($elements as $fileId) { $fileId = (string)$fileId; - $path = $this->_viewFileSystem->getViewFile($fileId, $params); - $file = array('id' => $fileId, 'path' => $path); - $file['safePath'] = $rootDirectory->getRelativePath($file['path']); - - //keys are used also to remove duplicates - $files[$fileId] = $file; - } - - return $files; - } - - /** - * Get CSS files by group - * - * @param \Magento\Framework\View\Design\ThemeInterface $theme - * @return array - * @throws \LogicException - */ - public function getGroupedCssFiles($theme) - { - $jsDir = $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::PUB_LIB_DIR); - $codeDir = $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::MODULES_DIR); - $designDir = $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::THEMES_DIR); - - $groups = array(); - $themes = array(); - foreach ($this->getCssFiles($theme) as $file) { - $this->_detectTheme($file, $designDir); - $this->_detectGroup($file, $designDir, $jsDir, $codeDir); - - if (isset($file['theme']) && $file['theme']->getThemeId()) { - $themes[$file['theme']->getThemeId()] = $file['theme']; - } - - if (!isset($file['group'])) { - throw new \LogicException(__('Group is missed for file "%1"', $file['safePath'])); - } - $group = $file['group']; - unset($file['theme']); - unset($file['group']); - - if (!isset($groups[$group])) { - $groups[$group] = array(); - } - $groups[$group][] = $file; - } - - if (count($themes) > 1) { - $themes = $this->_sortThemesByHierarchy($themes); - } - - $order = array_merge( - array($codeDir, $jsDir), - array_map( - function ($fileTheme) { - /** @var $fileTheme \Magento\Framework\View\Design\ThemeInterface */ - return $fileTheme->getThemeId(); - }, - $themes - ) - ); - $groups = $this->_sortArrayByArray($groups, $order); - - $labels = $this->_getGroupLabels($themes, $jsDir, $codeDir); - foreach ($groups as $key => $group) { - usort($group, array($this, '_sortGroupFilesCallback')); - $groups[$labels[$key]] = $group; - unset($groups[$key]); - } - return $groups; - } - - /** - * Detect theme view file belongs to and set it to file data under "theme" key - * - * @param array &$file - * @param string $designDir - * @return $this - * @throws \LogicException - */ - protected function _detectTheme(&$file, $designDir) - { - //TODO use cache here, so files of the same theme share one model - - $isInsideDesignDir = substr($file['path'], 0, strlen($designDir)) == $designDir; - if (!$isInsideDesignDir) { - return $this; - } - - $relativePath = substr($file['path'], strlen($designDir)); - - $area = strtok($relativePath, '/'); - $theme = strtok('/'); - - if ($area === false || $theme === false) { - throw new \LogicException(__('Theme path "%1/%2" is incorrect', $area, $theme)); - } - $themeModel = $this->_themeCollection->getThemeByFullPath( - $area . \Magento\Framework\View\Design\ThemeInterface::PATH_SEPARATOR . $theme - ); - - if (!$themeModel || !$themeModel->getThemeId()) { - throw new \LogicException(__('Invalid theme loaded by theme path "%1/%2"', $area, $theme)); - } - - $file['theme'] = $themeModel; - - return $this; - } - - /** - * Detect group where file should be placed and set it to file data under "group" key - * - * @param array &$file - * @param string $designDir - * @param string $jsDir - * @param string $codeDir - * @return $this - * @throws \LogicException - */ - protected function _detectGroup(&$file, $designDir, $jsDir, $codeDir) - { - $group = null; - if (substr($file['path'], 0, strlen($designDir)) == $designDir) { - if (!isset($file['theme']) || !$file['theme']->getThemeId()) { - throw new \LogicException(__('Theme is missed for file "%1"', $file['safePath'])); - } - $group = $file['theme']->getThemeId(); - } elseif (substr($file['path'], 0, strlen($jsDir)) == $jsDir) { - $group = $jsDir; - } elseif (substr($file['path'], 0, strlen($codeDir)) == $codeDir) { - $group = $codeDir; - } else { - throw new \LogicException(__('Invalid view file directory "%1"', $file['safePath'])); - } - $file['group'] = $group; - - return $this; - } - - /** - * Sort themes according to their hierarchy - * - * @param array $themes - * @return array - */ - protected function _sortThemesByHierarchy(array $themes) - { - uasort($themes, array($this, '_sortThemesByHierarchyCallback')); - return $themes; - } - - /** - * Sort one associative array according to another array - * - * $groups = array( - * b => item2, - * a => item1, - * c => item3, - * ); - * $order = array(a,b,c); - * result: array( - * a => item1, - * b => item2, - * c => item3, - * ) - * - * @param array $groups - * @param array $order - * @return array - */ - protected function _sortArrayByArray(array $groups, array $order) - { - $ordered = array(); - foreach ($order as $key) { - if (array_key_exists($key, $groups)) { - $ordered[$key] = $groups[$key]; - unset($groups[$key]); - } - } - return $ordered + $groups; - } - - /** - * Get group labels - * - * @param array $themes - * @param string $jsDir - * @param string $codeDir - * @return array - */ - protected function _getGroupLabels(array $themes, $jsDir, $codeDir) - { - $labels = array($jsDir => (string)__('Library files'), $codeDir => (string)__('Framework files')); - foreach ($themes as $theme) { - /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ - $labels[$theme->getThemeId()] = (string)__('"%1" Theme files', $theme->getThemeTitle()); - } - return $labels; - } - - /** - * Callback for sorting files inside group - * - * Return "1" if $firstFile should go before $secondFile, otherwise return "-1" - * - * @param array $firstFile - * @param array $secondFile - * @return int - */ - protected function _sortGroupFilesCallback(array $firstFile, array $secondFile) - { - $hasContextFirst = strpos($firstFile['id'], '::') !== false; - $hasContextSecond = strpos($secondFile['id'], '::') !== false; - - if ($hasContextFirst && $hasContextSecond) { - $result = strcmp($firstFile['id'], $secondFile['id']); - } elseif (!$hasContextFirst && !$hasContextSecond) { - $result = strcmp($firstFile['id'], $secondFile['id']); - } elseif ($hasContextFirst) { - //case when first item has module context and second item doesn't - $result = 1; - } else { - //case when second item has module context and first item doesn't - $result = -1; + $result[$fileId] = $this->_assetRepo->createAsset($fileId, $params); } + ksort($result); return $result; } - - /** - * Sort themes by hierarchy callback - * - * @param \Magento\Framework\View\Design\ThemeInterface $firstTheme - * @param \Magento\Framework\View\Design\ThemeInterface $secondTheme - * @return int - */ - protected function _sortThemesByHierarchyCallback($firstTheme, $secondTheme) - { - $parentTheme = $firstTheme->getParentTheme(); - while ($parentTheme) { - if ($parentTheme->getThemeId() == $secondTheme->getThemeId()) { - return -1; - } - $parentTheme = $parentTheme->getParentTheme(); - } - return 1; - } } diff --git a/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php b/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php index 7c7bcfb45b5d72b95a97bbe0306c69da8c7b52be..9f3308d7224a008b28cee1adbfa021760a022e84 100644 --- a/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php +++ b/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php @@ -60,9 +60,10 @@ class CleanMergedJsCss { $proceed(); - /** @var \Magento\Framework\Filesystem\Directory\ReadInterface $pubCacheDirectory */ - $pubCacheDirectory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR); - $mergedDir = $pubCacheDirectory->getAbsolutePath() . '/' . \Magento\Framework\View\Asset\Merged::PUBLIC_MERGE_DIR; + /** @var \Magento\Framework\Filesystem\Directory\ReadInterface $pubStaticDirectory */ + $pubStaticDirectory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + $mergedDir = $pubStaticDirectory->getAbsolutePath() . '/' + . \Magento\Framework\View\Asset\Merged::getRelativeDir(); $this->database->deleteFolder($mergedDir); } } diff --git a/app/code/Magento/Core/Model/Design.php b/app/code/Magento/Core/Model/Design.php index c99dc77ec26b3a77ebea6ee78834adb122f8a36f..bccce8f0c9cdfa5c697ba86dd62d19ecc7910adc 100644 --- a/app/code/Magento/Core/Model/Design.php +++ b/app/code/Magento/Core/Model/Design.php @@ -31,8 +31,6 @@ use Magento\Framework\Object\IdentityInterface; /** * Design settings change model * - * @method \Magento\Core\Model\Resource\Design _getResource() - * @method \Magento\Core\Model\Resource\Design getResource() * @method int getStoreId() * @method \Magento\Core\Model\Design setStoreId(int $value) * @method string getDesign() diff --git a/app/code/Magento/Core/Model/Design/Backend/Theme.php b/app/code/Magento/Core/Model/Design/Backend/Theme.php index 043e0ddef1ab3db247188ad52fd476ed300d20c6..516082542e434423dafe754d497f883a9286d76d 100644 --- a/app/code/Magento/Core/Model/Design/Backend/Theme.php +++ b/app/code/Magento/Core/Model/Design/Backend/Theme.php @@ -61,8 +61,10 @@ class Theme extends \Magento\Framework\App\Config\Value */ protected function _beforeSave() { - $design = clone $this->_design; - $design->setDesignTheme($this->getValue(), \Magento\Framework\App\Area::AREA_FRONTEND); + if ('' != $this->getValue()) { + $design = clone $this->_design; + $design->setDesignTheme($this->getValue(), \Magento\Framework\App\Area::AREA_FRONTEND); + } return parent::_beforeSave(); } } diff --git a/app/code/Magento/Core/Model/File/Storage/Response.php b/app/code/Magento/Core/Model/File/Storage/Response.php index 1dd68f4f26470cdd66ca094db34476da4a4f2733..07fe79274064501e026c8faeb8a79881d0d806a9 100644 --- a/app/code/Magento/Core/Model/File/Storage/Response.php +++ b/app/code/Magento/Core/Model/File/Storage/Response.php @@ -25,7 +25,7 @@ namespace Magento\Core\Model\File\Storage; use Magento\Framework\App\Response\Http; -class Response extends Http +class Response extends Http implements \Magento\Framework\App\Response\FileInterface { /** * @var \Magento\Framework\File\Transfer\Adapter\Http diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php index fd0ac72ee327af26f752dee77d7927f4d91c0d3a..55787f7501a449973852b078ba669716f080197c 100644 --- a/app/code/Magento/Core/Model/Layout/Merge.php +++ b/app/code/Magento/Core/Model/Layout/Merge.php @@ -98,7 +98,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface protected $_subst = null; /** - * @var \Magento\Framework\View\Layout\File\SourceInterface + * @var \Magento\Framework\View\File\CollectorInterface */ private $_fileSource; @@ -137,7 +137,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface * * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Layout\File\SourceInterface $fileSource + * @param \Magento\Framework\View\File\CollectorInterface $fileSource * @param \Magento\Core\Model\Resource\Layout\Update $resource * @param \Magento\Framework\App\State $appState * @param \Magento\Framework\Cache\FrontendInterface $cache @@ -149,7 +149,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface public function __construct( \Magento\Framework\View\DesignInterface $design, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Layout\File\SourceInterface $fileSource, + \Magento\Framework\View\File\CollectorInterface $fileSource, \Magento\Core\Model\Resource\Layout\Update $resource, \Magento\Framework\App\State $appState, \Magento\Framework\Cache\FrontendInterface $cache, @@ -610,7 +610,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface { $layoutStr = ''; $theme = $this->_getPhysicalTheme($this->_theme); - $updateFiles = $this->_fileSource->getFiles($theme); + $updateFiles = $this->_fileSource->getFiles($theme, '*.xml'); $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); $useErrors = libxml_use_internal_errors(true); foreach ($updateFiles as $file) { diff --git a/app/code/Magento/Core/Model/Observer.php b/app/code/Magento/Core/Model/Observer.php index b76f2fc6b8041425c90bf99f2200765704858b23..43c3053c391ff43cd73c48b9f45378644d084acf 100644 --- a/app/code/Magento/Core/Model/Observer.php +++ b/app/code/Magento/Core/Model/Observer.php @@ -51,9 +51,9 @@ class Observer protected $_config; /** - * @var \Magento\Framework\View\Asset\PublicFileFactory + * @var \Magento\Framework\View\Asset\Repository */ - protected $_assetFileFactory; + protected $_assetRepo; /** * @var \Magento\Core\Model\Theme\Registration @@ -70,7 +70,7 @@ class Observer * @param \Magento\Framework\View\DesignInterface $design * @param \Magento\Framework\View\Asset\GroupedCollection $assets * @param \Magento\Framework\App\Config\ReinitableConfigInterface $config - * @param \Magento\Framework\View\Asset\PublicFileFactory $assetFileFactory + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param Theme\Registration $registration * @param \Magento\Framework\Logger $logger */ @@ -79,14 +79,14 @@ class Observer \Magento\Framework\View\DesignInterface $design, \Magento\Framework\View\Asset\GroupedCollection $assets, \Magento\Framework\App\Config\ReinitableConfigInterface $config, - \Magento\Framework\View\Asset\PublicFileFactory $assetFileFactory, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Core\Model\Theme\Registration $registration, \Magento\Framework\Logger $logger ) { $this->_cacheFrontendPool = $cacheFrontendPool; $this->_currentTheme = $design->getDesignTheme(); $this->_pageAssets = $assets; - $this->_assetFileFactory = $assetFileFactory; + $this->_assetRepo = $assetRepo; $this->_registration = $registration; $this->_logger = $logger; } @@ -138,10 +138,16 @@ class Observer try { $service = $themeFile->getCustomizationService(); if ($service instanceof \Magento\Framework\View\Design\Theme\Customization\FileAssetInterface) { - $asset = $this->_assetFileFactory->create( - array('file' => $themeFile->getFullPath(), 'contentType' => $service->getContentType()) + $identifier = $themeFile->getData('file_path'); + $dirPath = \Magento\Framework\View\Design\Theme\Customization\Path::DIR_NAME + . '/' . $this->_currentTheme->getId(); + $asset = $this->_assetRepo->createArbitrary( + $identifier, + $dirPath, + \Magento\Framework\App\Filesystem::MEDIA_DIR, + \Magento\Framework\UrlInterface::URL_TYPE_MEDIA ); - $this->_pageAssets->add($themeFile->getData('file_path'), $asset); + $this->_pageAssets->add($identifier, $asset); } } catch (\InvalidArgumentException $e) { $this->_logger->logException($e); diff --git a/app/code/Magento/Core/Model/Theme.php b/app/code/Magento/Core/Model/Theme.php index e99692f4fc5fcc0dfddbaa08bbeac48d7092f6a1..408a3546b7b1766c35f4d0e3fdd463069f16f103 100644 --- a/app/code/Magento/Core/Model/Theme.php +++ b/app/code/Magento/Core/Model/Theme.php @@ -53,11 +53,6 @@ use Magento\Framework\View\Design\ThemeInterface; */ class Theme extends \Magento\Framework\Model\AbstractModel implements ThemeInterface { - /** - * Filename of view configuration - */ - const FILENAME_VIEW_CONFIG = 'view.xml'; - /** * {@inheritdoc} * diff --git a/app/code/Magento/Core/Model/Theme/Domain/Physical.php b/app/code/Magento/Core/Model/Theme/Domain/Physical.php index 379ccb0926495cd2618b777806f3ae16ddd407f5..09902c830907d76d0731e2b2c3e6a27637a8b5a6 100644 --- a/app/code/Magento/Core/Model/Theme/Domain/Physical.php +++ b/app/code/Magento/Core/Model/Theme/Domain/Physical.php @@ -86,7 +86,7 @@ class Physical implements \Magento\Framework\View\Design\Theme\Domain\PhysicalIn /** @var $themeCustomization \Magento\Framework\View\Design\ThemeInterface */ $themeCustomization = $this->_themeFactory->create()->setData($themeData); - $themeCustomization->getThemeImage()->createPreviewImageCopy($theme->getPreviewImage()); + $themeCustomization->getThemeImage()->createPreviewImageCopy($theme); $themeCustomization->save(); $this->_themeCopyService->copy($theme, $themeCustomization); diff --git a/app/code/Magento/Core/Model/Theme/Image/Path.php b/app/code/Magento/Core/Model/Theme/Image/Path.php index 243f7f23551b5acdef4caf954a2adb4d97643539..2f2c183c4d56ae0a7cf598a5762de488931193c7 100644 --- a/app/code/Magento/Core/Model/Theme/Image/Path.php +++ b/app/code/Magento/Core/Model/Theme/Image/Path.php @@ -22,11 +22,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Core\Model\Theme\Image; + +use Magento\Framework\View\Design\ThemeInterface; + /** * Theme Image Path */ -namespace Magento\Core\Model\Theme\Image; - class Path implements \Magento\Framework\View\Design\Theme\Image\PathInterface { /** @@ -35,49 +37,71 @@ class Path implements \Magento\Framework\View\Design\Theme\Image\PathInterface const DEFAULT_PREVIEW_IMAGE = 'Magento_Core::theme/default_preview.jpg'; /** - * Filesystem instance + * Media Directory * - * @var \Magento\Framework\App\Filesystem + * @var \Magento\Framework\Filesystem\Directory\ReadInterface */ - protected $filesystem; + protected $mediaDirectory; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $viewUrl; + protected $assetRepo; /** * @var \Magento\Store\Model\StoreManagerInterface */ - protected $_storeManager; + protected $storeManager; /** * Initialize dependencies * * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Store\Model\StoreManagerInterface $storeManager */ public function __construct( \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Store\Model\StoreManagerInterface $storeManager ) { - $this->filesystem = $filesystem; - $this->viewUrl = $viewUrl; - $this->_storeManager = $storeManager; + $this->mediaDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR); + $this->assetRepo = $assetRepo; + $this->storeManager = $storeManager; + } + + /** + * Get url to preview image + * + * @param \Magento\Core\Model\Theme|ThemeInterface $theme + * @return string + */ + public function getPreviewImageUrl(ThemeInterface $theme) + { + return $theme->isPhysical() + ? $this->assetRepo->getUrlWithParams( + $theme->getPreviewImage(), + ['area' => $theme->getData('area'), 'themeModel' => $theme] + ) + : $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) + . self::PREVIEW_DIRECTORY_PATH . '/' . $theme->getPreviewImage(); } /** - * Get preview image directory url + * Get path to preview image * + * @param \Magento\Core\Model\Theme|ThemeInterface $theme * @return string */ - public function getPreviewImageDirectoryUrl() + public function getPreviewImagePath(ThemeInterface $theme) { - return $this->_storeManager->getStore()->getBaseUrl( - \Magento\Framework\UrlInterface::URL_TYPE_MEDIA - ) . self::PREVIEW_DIRECTORY_PATH . '/'; + return $theme->isPhysical() + ? $this->assetRepo->createAsset( + $theme->getPreviewImage(), + ['area' => $theme->getData('area'), 'themeModel' => $theme] + ) + ->getSourceFile() + : $this->mediaDirectory->getAbsolutePath(self::PREVIEW_DIRECTORY_PATH . '/' . $theme->getPreviewImage()); } /** @@ -87,7 +111,7 @@ class Path implements \Magento\Framework\View\Design\Theme\Image\PathInterface */ public function getPreviewImageDefaultUrl() { - return $this->viewUrl->getViewFileUrl(self::DEFAULT_PREVIEW_IMAGE); + return $this->assetRepo->getUrl(self::DEFAULT_PREVIEW_IMAGE); } /** @@ -97,8 +121,7 @@ class Path implements \Magento\Framework\View\Design\Theme\Image\PathInterface */ public function getImagePreviewDirectory() { - return $this->filesystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR) - . '/' . self::PREVIEW_DIRECTORY_PATH; + return $this->mediaDirectory->getAbsolutePath(self::PREVIEW_DIRECTORY_PATH); } /** @@ -108,6 +131,6 @@ class Path implements \Magento\Framework\View\Design\Theme\Image\PathInterface */ public function getTemporaryDirectory() { - return $this->filesystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR) . '/theme/origin'; + return $this->mediaDirectory->getRelativePath('/theme/origin'); } } diff --git a/app/code/Magento/Core/Model/Variable/Config.php b/app/code/Magento/Core/Model/Variable/Config.php index 044e0c3fcec671bfe971c996221890c67ae90fc1..961c9fba90072b4d39062825e06ea48f7c25ee20 100644 --- a/app/code/Magento/Core/Model/Variable/Config.php +++ b/app/code/Magento/Core/Model/Variable/Config.php @@ -32,9 +32,9 @@ namespace Magento\Core\Model\Variable; class Config { /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Backend\Model\UrlInterface @@ -42,12 +42,12 @@ class Config protected $_url; /** - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Backend\Model\UrlInterface $url */ - public function __construct(\Magento\Framework\View\Url $viewUrl, \Magento\Backend\Model\UrlInterface $url) + public function __construct(\Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Backend\Model\UrlInterface $url) { - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_url = $url; } @@ -91,7 +91,7 @@ class Config public function getWysiwygJsPluginSrc() { $editorPluginJs = 'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js'; - return $this->_viewUrl->getViewFileUrl($editorPluginJs); + return $this->_assetRepo->getUrl($editorPluginJs); } /** diff --git a/app/code/Magento/Core/Model/View/Design.php b/app/code/Magento/Core/Model/View/Design.php index 8246225e7f17ceb821b078aeb358ef02cc6098f3..8bfb62a8be3be845b74a37f5e50bf472894b5a7e 100644 --- a/app/code/Magento/Core/Model/View/Design.php +++ b/app/code/Magento/Core/Model/View/Design.php @@ -229,6 +229,33 @@ class Design implements \Magento\Framework\View\DesignInterface return $this->_theme; } + /** + * {@inheritdoc} + */ + public function getThemePath(\Magento\Framework\View\Design\ThemeInterface $theme) + { + $themePath = $theme->getThemePath(); + if (!$themePath) { + $themeId = $theme->getId(); + if ($themeId) { + $themePath = self::PUBLIC_THEME_DIR . $themeId; + } else { + $themePath = self::PUBLIC_VIEW_DIR; + } + } + return $themePath; + } + + /** + * Get locale + * + * @return string + */ + public function getLocale() + { + return $this->_locale->getLocaleCode(); + } + /** * {@inheritdoc} */ @@ -237,7 +264,7 @@ class Design implements \Magento\Framework\View\DesignInterface $params = array( 'area' => $this->getArea(), 'themeModel' => $this->getDesignTheme(), - 'locale' => $this->_locale->getLocaleCode() + 'locale' => $this->getLocale(), ); return $params; diff --git a/app/code/Magento/Core/etc/cache.xml b/app/code/Magento/Core/etc/cache.xml index 8858369b285a59aa9468356185138c4e845642ed..49e187476d465259bdbee7f97f7e0e17b48911b4 100644 --- a/app/code/Magento/Core/etc/cache.xml +++ b/app/code/Magento/Core/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="config" translate="label,description" instance="Magento\Framework\App\Cache\Type\Config"> <label>Configuration</label> <description>System(config.xml, local.xml) and modules configuration files(config.xml).</description> @@ -36,6 +36,14 @@ <label>Blocks HTML output</label> <description>Page blocks HTML.</description> </type> + <type name="view_files_fallback" translate="label,description" instance="Magento\Framework\View\Design\FileResolution\Fallback\Cache"> + <label>View files fallback</label> + <description>Paths to view files (e.g., PHTML templates, images, CSS, JS files).</description> + </type> + <type name="view_files_preprocessing" translate="label,description" instance="Magento\Framework\View\Asset\PreProcessor\Cache"> + <label>View files pre-processing</label> + <description>Paths to pre-processed view files (e.g, CSS files with fixed paths or generated from LESS files).</description> + </type> <type name="collections" translate="label,description" instance="Magento\Framework\App\Cache\Type\Collection"> <label>Collections Data</label> <description>Collection data files.</description> diff --git a/app/code/Magento/Core/etc/config.xml b/app/code/Magento/Core/etc/config.xml index da9dcb7521911f7effdbba372e73facb18b86c54..ebd6b27a17cf9973693edf295441fb907ef0a939 100644 --- a/app/code/Magento/Core/etc/config.xml +++ b/app/code/Magento/Core/etc/config.xml @@ -97,18 +97,10 @@ <uri>pub</uri> <permissions>511</permissions> </pub> - <pub_lib> - <read_only>0</read_only> - <path>pub/lib</path> - <uri>pub/lib</uri> - <permissions>511</permissions> - </pub_lib> - <view_cache> - <read_only>0</read_only> - <path>pub/cache</path> - <uri>pub/cache</uri> - <permissions>511</permissions> - </view_cache> + <lib_web> + <read_only>1</read_only> + <path>lib/web</path> + </lib_web> <tmp> <read_only>0</read_only> <path>var/tmp</path> diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml index fe465164a60a35c075522c98318d2e8b79283c3b..7746ba1f0d87e5d58937bc447c02a03c84e4c532 100644 --- a/app/code/Magento/Core/etc/di.xml +++ b/app/code/Magento/Core/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Acl\CacheInterface" type="Magento\Framework\Acl\Cache" /> <preference for="Magento\Framework\App\AreaInterface" type="Magento\Framework\App\Area" /> <preference for="Magento\Framework\Module\Updater\SetupInterface" type="Magento\Framework\Module\Setup" /> @@ -118,7 +118,7 @@ <type name="Magento\Core\Model\Theme\Collection" shared="false" /> <type name="Magento\Core\Model\Layout\Merge"> <arguments> - <argument name="fileSource" xsi:type="object">Magento\Framework\View\Layout\File\Source\Aggregated</argument> + <argument name="fileSource" xsi:type="object">Magento\Framework\View\Layout\File\Collector\Aggregated</argument> <argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Layout</argument> </arguments> </type> @@ -127,47 +127,72 @@ <argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Layout</argument> </arguments> </type> - <virtualType name="layoutFileSourceBaseFiltered" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput"> + + <virtualType name="layoutFileSourceBase" type="Magento\Framework\View\File\Collector\Base"> <arguments> - <argument name="subject" xsi:type="object">Magento\Framework\View\Layout\File\Source\Base</argument> + <argument name="subDir" xsi:type="string">layout</argument> </arguments> </virtualType> - <virtualType name="layoutFileSourceBaseSorted" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency"> + <virtualType name="layoutFileSourceBaseFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> + <arguments> + <argument name="subject" xsi:type="object">layoutFileSourceBase</argument> + </arguments> + </virtualType> + <virtualType name="layoutFileSourceBaseSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> <arguments> <argument name="subject" xsi:type="object">layoutFileSourceBaseFiltered</argument> </arguments> </virtualType> - <virtualType name="layoutFileSourceThemeFiltered" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput"> + + <virtualType name="layoutFileSourceTheme" type="Magento\Framework\View\File\Collector\ThemeModular"> <arguments> - <argument name="subject" xsi:type="object">Magento\Framework\View\Layout\File\Source\Theme</argument> + <argument name="subDir" xsi:type="string">layout</argument> </arguments> </virtualType> - <virtualType name="layoutFileSourceThemeSorted" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency"> + <virtualType name="layoutFileSourceThemeFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> + <arguments> + <argument name="subject" xsi:type="object">layoutFileSourceTheme</argument> + </arguments> + </virtualType> + <virtualType name="layoutFileSourceThemeSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> <arguments> <argument name="subject" xsi:type="object">layoutFileSourceThemeFiltered</argument> </arguments> </virtualType> - <virtualType name="layoutFileSourceOverrideBaseFiltered" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput"> + + <virtualType name="layoutFileSourceOverrideBase" type="Magento\Framework\View\File\Collector\Override\Base"> <arguments> - <argument name="subject" xsi:type="object">Magento\Framework\View\Layout\File\Source\Override\Base</argument> + <argument name="subDir" xsi:type="string">layout/override/base</argument> </arguments> </virtualType> - <virtualType name="layoutFileSourceOverrideBaseSorted" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency"> + <virtualType name="layoutFileSourceOverrideBaseFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> + <arguments> + <argument name="subject" xsi:type="object">layoutFileSourceOverrideBase</argument> + </arguments> + </virtualType> + <virtualType name="layoutFileSourceOverrideBaseSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> <arguments> <argument name="subject" xsi:type="object">layoutFileSourceOverrideBaseFiltered</argument> </arguments> </virtualType> - <virtualType name="layoutFileSourceOverrideThemeFiltered" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput"> + + <virtualType name="layoutFileSourceOverrideTheme" type="Magento\Framework\View\File\Collector\Override\ThemeModular"> + <arguments> + <argument name="subDir" xsi:type="string">layout/override/theme</argument> + </arguments> + </virtualType> + <virtualType name="layoutFileSourceOverrideThemeFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> <arguments> - <argument name="subject" xsi:type="object">Magento\Framework\View\Layout\File\Source\Override\Theme</argument> + <argument name="subject" xsi:type="object">layoutFileSourceOverrideTheme</argument> </arguments> </virtualType> - <virtualType name="layoutFileSourceOverrideThemeSorted" type="Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency"> + <virtualType name="layoutFileSourceOverrideThemeSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> <arguments> <argument name="subject" xsi:type="object">layoutFileSourceOverrideThemeFiltered</argument> </arguments> </virtualType> - <type name="Magento\Framework\View\Layout\File\Source\Aggregated"> + + <type name="Magento\Framework\View\Layout\File\Collector\Aggregated"> <arguments> <argument name="baseFiles" xsi:type="object">layoutFileSourceBaseSorted</argument> <argument name="themeFiles" xsi:type="object">layoutFileSourceThemeSorted</argument> @@ -175,6 +200,7 @@ <argument name="overrideThemeFiles" xsi:type="object">layoutFileSourceOverrideThemeSorted</argument> </arguments> </type> + <type name="Magento\Framework\View\Design\Theme\Image"> <arguments> <argument name="uploader" xsi:type="object">Magento\Framework\View\Design\Theme\Image\Uploader\Proxy</argument> @@ -227,39 +253,6 @@ </argument> </arguments> </type> - <type name="Magento\Framework\View\Publisher"> - <arguments> - <argument name="preProcessor" xsi:type="object">Magento\Framework\View\Asset\PreProcessor\Composite</argument> - </arguments> - </type> - <type name="Magento\Framework\View\Publisher\CssFile"> - <arguments> - <argument name="allowDuplication" xsi:type="boolean">true</argument> - </arguments> - </type> - <type name="Magento\Framework\View\Publisher\File"> - <arguments> - <argument name="allowDuplication" xsi:type="boolean">true</argument> - </arguments> - </type> - <type name="Magento\Framework\View\Asset\PreProcessor\Composite"> - <arguments> - <argument name="preProcessorsConfig" xsi:type="array"> - <item name="css_preprocessor" xsi:type="array"> - <item name="class" xsi:type="string">Magento\Framework\Css\PreProcessor\Composite</item> - <item name="asset_type" xsi:type="string">css</item> - </item> - </argument> - </arguments> - </type> - <type name="Magento\Framework\Css\PreProcessor\Composite"> - <arguments> - <argument name="preProcessors" xsi:type="array"> - <item name="css_source_processor" xsi:type="string">Magento\Framework\Css\PreProcessor\Less</item> - <item name="css_url_processor" xsi:type="string">Magento\Framework\Css\PreProcessor\UrlResolver</item> - </argument> - </arguments> - </type> <type name="Magento\Framework\Object\Copy\Config\Reader"> <arguments> <argument name="fileName" xsi:type="string">fieldset.xml</argument> @@ -268,8 +261,8 @@ </type> <type name="Magento\Framework\Object\Copy\Config\SchemaLocator"> <arguments> - <argument name="schema" xsi:type="string">lib/Magento/Framework/Object/etc/fieldset.xsd</argument> - <argument name="perFileSchema" xsi:type="string">lib/Magento/Framework/Object/etc/fieldset_file.xsd</argument> + <argument name="schema" xsi:type="string">lib/internal/Magento/Framework/Object/etc/fieldset.xsd</argument> + <argument name="perFileSchema" xsi:type="string">lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd</argument> </arguments> </type> <type name="Magento\Framework\Object\Copy\Config\Data"> @@ -391,7 +384,6 @@ </type> <type name="Magento\Framework\View\Asset\MergeService"> <plugin name="cleanMergedJsCss" type="Magento\Core\Model\Asset\Plugin\CleanMergedJsCss"/> - <plugin name="clearLessImportCache" type="Magento\Framework\Css\PreProcessor\Cache\Plugin\ImportCleaner" sortOrder="10"/> </type> <type name="Magento\Core\Model\Url\ScopeResolver"> <arguments> @@ -400,35 +392,44 @@ </type> <type name="Magento\Framework\Less\PreProcessor\Instruction\MagentoImport"> <arguments> - <argument name="fileSource" xsi:type="object">Magento\Framework\Less\File\Source\Aggregated</argument> + <argument name="fileSource" xsi:type="object">Magento\Framework\Less\File\Collector\Aggregated</argument> </arguments> </type> - <type name="Magento\Framework\Less\PreProcessor\Instruction\Import"> + <virtualType name="lessFileSourceBase" type="Magento\Framework\View\File\Collector\Base"> <arguments> - <argument name="preProcessor" xsi:type="object">Magento\Framework\Less\PreProcessor\Proxy</argument> + <argument name="subDir" xsi:type="string">web</argument> </arguments> - </type> - <type name="Magento\Framework\Less\File\Source\Aggregated"> + </virtualType> + <virtualType name="lessFileSourceBaseFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> <arguments> - <argument name="libraryFiles" xsi:type="object">Magento\Framework\Less\File\Source\Library</argument> - <argument name="baseFiles" xsi:type="object">Magento\Framework\Less\File\Source\Base</argument> - <argument name="themeFiles" xsi:type="object">Magento\Framework\Less\File\Source\Theme</argument> + <argument name="subject" xsi:type="object">lessFileSourceBase</argument> </arguments> - </type> - <type name="Magento\Framework\Css\PreProcessor\Less"> - <plugin name="process_less" type="Magento\Framework\Css\PreProcessor\Cache\Plugin\Less" sortOrder="10"/> - </type> - <type name="Magento\Framework\Less\PreProcessor"> - <plugin name="process_less" type="Magento\Framework\Css\PreProcessor\Cache\Plugin\InstructionPreProcessor" sortOrder="10"/> + </virtualType> + <virtualType name="lessFileSourceBaseSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> <arguments> - <argument name="preProcessors" xsi:type="array"> - <item name="magento_import" xsi:type="array"> - <item name="class" xsi:type="string">Magento\Framework\Less\PreProcessor\Instruction\MagentoImport</item> - </item> - <item name="import" xsi:type="array"> - <item name="class" xsi:type="string">Magento\Framework\Less\PreProcessor\Instruction\Import</item> - </item> - </argument> + <argument name="subject" xsi:type="object">lessFileSourceBaseFiltered</argument> + </arguments> + </virtualType> + <virtualType name="lessFileOverriddenBase" type="Magento\Framework\View\File\Collector\Override\Base"> + <arguments> + <argument name="subDir" xsi:type="string">web</argument> + </arguments> + </virtualType> + <virtualType name="lessFileSourceThemeFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> + <arguments> + <argument name="subject" xsi:type="object">lessFileSourceTheme</argument> + </arguments> + </virtualType> + <virtualType name="lessFileSourceThemeSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> + <arguments> + <argument name="subject" xsi:type="object">lessFileSourceThemeFiltered</argument> + </arguments> + </virtualType> + <type name="Magento\Framework\Less\File\Collector\Aggregated"> + <arguments> + <argument name="libraryFiles" xsi:type="object">Magento\Framework\Less\File\Collector\Library</argument> + <argument name="baseFiles" xsi:type="object">lessFileSourceBaseSorted</argument> + <argument name="overriddenBaseFiles" xsi:type="object">lessFileOverriddenBase</argument> </arguments> </type> <type name="Magento\Framework\App\Config\Initial\Converter"> diff --git a/app/code/Magento/Core/etc/events.xml b/app/code/Magento/Core/etc/events.xml index fddba498b604e4303a5afc071835895c92da3ec1..e6b794ec8a2be8a6ef4f506177fb205538bb4772 100644 --- a/app/code/Magento/Core/etc/events.xml +++ b/app/code/Magento/Core/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="theme_delete_before"> <observer name="clean_core_related_content" instance="Magento\Core\Model\Theme\Observer" method="cleanThemeRelatedContent" /> </event> diff --git a/app/code/Magento/Core/etc/frontend/di.xml b/app/code/Magento/Core/etc/frontend/di.xml index 6f4382650fd8427d50fb713b1d74074275b5898e..845639a371110c0ebc7affba3b4866791af6949c 100644 --- a/app/code/Magento/Core/etc/frontend/di.xml +++ b/app/code/Magento/Core/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Session\Generic"> <arguments> <argument name="sessionName" xsi:type="string">frontend</argument> diff --git a/app/code/Magento/Core/etc/frontend/events.xml b/app/code/Magento/Core/etc/frontend/events.xml index bfe8fd28ec8f08a127761412dc0a37341b66df28..5202497bad18da701f4220731c690135e15df656 100644 --- a/app/code/Magento/Core/etc/frontend/events.xml +++ b/app/code/Magento/Core/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_layout_render_before"> <observer name="theme" instance="Magento\Core\Model\Observer" method="applyThemeCustomization" /> </event> diff --git a/app/code/Magento/Core/etc/frontend/routes.xml b/app/code/Magento/Core/etc/frontend/routes.xml index ada8932c1f2c3ed2c2eb3a93911a726ef9c53e8f..a6576cc003fb2c3f629deb47aefa3c3102af03e5 100644 --- a/app/code/Magento/Core/etc/frontend/routes.xml +++ b/app/code/Magento/Core/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="core" frontName="core"> <module name="Magento_Core" /> diff --git a/app/code/Magento/Core/etc/layouts.xsd b/app/code/Magento/Core/etc/layouts.xsd index ec8789d57286c3d4d3d5fd879e7f9c60af355a23..25b19855ff7868d1d8447677e61aab6d3b0bdca2 100644 --- a/app/code/Magento/Core/etc/layouts.xsd +++ b/app/code/Magento/Core/etc/layouts.xsd @@ -25,7 +25,7 @@ --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:redefine schemaLocation="../../../../../lib/Magento/Framework/Data/etc/argument/types.xsd"> + <xs:redefine schemaLocation="../../../../../lib/internal/Magento/Framework/Data/etc/argument/types.xsd"> <xs:complexType name="argumentType" abstract="true" mixed="true"> <xs:complexContent> <xs:extension base="argumentType"> diff --git a/app/code/Magento/Core/etc/module.xml b/app/code/Magento/Core/etc/module.xml index 1c808f398d80b6037e2ef0060f202f643a53d951..a48515d1fb7a9d9956d4c58852cf321e38bfcdb0 100644 --- a/app/code/Magento/Core/etc/module.xml +++ b/app/code/Magento/Core/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Core" version="1.6.0.16" active="true"> <depends> <module name="Magento_Store"/> diff --git a/app/code/Magento/Core/etc/resources.xml b/app/code/Magento/Core/etc/resources.xml index 2eeba71dc6c7df0058d8fa54fb742e8a7f2d0cf3..1909ff6a57f50c1429bd970f3d49dc56e002d51c 100644 --- a/app/code/Magento/Core/etc/resources.xml +++ b/app/code/Magento/Core/etc/resources.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/App/etc/resources.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/App/etc/resources.xsd"> <resource name="core_setup" extends="default_setup" /> </config> diff --git a/app/code/Magento/Core/view/adminhtml/calendar.gif b/app/code/Magento/Core/view/adminhtml/web/calendar.gif similarity index 100% rename from app/code/Magento/Core/view/adminhtml/calendar.gif rename to app/code/Magento/Core/view/adminhtml/web/calendar.gif diff --git a/app/code/Magento/Core/view/adminhtml/fam_book_open.png b/app/code/Magento/Core/view/adminhtml/web/fam_book_open.png similarity index 100% rename from app/code/Magento/Core/view/adminhtml/fam_book_open.png rename to app/code/Magento/Core/view/adminhtml/web/fam_book_open.png diff --git a/app/code/Magento/Core/view/adminhtml/prototype/magento.css b/app/code/Magento/Core/view/adminhtml/web/prototype/magento.css similarity index 100% rename from app/code/Magento/Core/view/adminhtml/prototype/magento.css rename to app/code/Magento/Core/view/adminhtml/web/prototype/magento.css diff --git a/app/code/Magento/Core/view/adminhtml/prototype/magento/btn_bg.gif b/app/code/Magento/Core/view/adminhtml/web/prototype/magento/btn_bg.gif similarity index 100% rename from app/code/Magento/Core/view/adminhtml/prototype/magento/btn_bg.gif rename to app/code/Magento/Core/view/adminhtml/web/prototype/magento/btn_bg.gif diff --git a/app/code/Magento/Core/view/adminhtml/prototype/magento/content_bg.gif b/app/code/Magento/Core/view/adminhtml/web/prototype/magento/content_bg.gif similarity index 100% rename from app/code/Magento/Core/view/adminhtml/prototype/magento/content_bg.gif rename to app/code/Magento/Core/view/adminhtml/web/prototype/magento/content_bg.gif diff --git a/app/code/Magento/Core/view/adminhtml/prototype/magento/top_bg.gif b/app/code/Magento/Core/view/adminhtml/web/prototype/magento/top_bg.gif similarity index 100% rename from app/code/Magento/Core/view/adminhtml/prototype/magento/top_bg.gif rename to app/code/Magento/Core/view/adminhtml/web/prototype/magento/top_bg.gif diff --git a/app/code/Magento/Core/view/adminhtml/prototype/magento/window_close.png b/app/code/Magento/Core/view/adminhtml/web/prototype/magento/window_close.png similarity index 100% rename from app/code/Magento/Core/view/adminhtml/prototype/magento/window_close.png rename to app/code/Magento/Core/view/adminhtml/web/prototype/magento/window_close.png diff --git a/app/code/Magento/Core/view/adminhtml/theme/default_preview.jpg b/app/code/Magento/Core/view/adminhtml/web/theme/default_preview.jpg similarity index 100% rename from app/code/Magento/Core/view/adminhtml/theme/default_preview.jpg rename to app/code/Magento/Core/view/adminhtml/web/theme/default_preview.jpg diff --git a/app/code/Magento/Core/view/frontend/messages.phtml b/app/code/Magento/Core/view/frontend/templates/messages.phtml similarity index 100% rename from app/code/Magento/Core/view/frontend/messages.phtml rename to app/code/Magento/Core/view/frontend/templates/messages.phtml diff --git a/app/code/Magento/Core/view/frontend/require_cookie.phtml b/app/code/Magento/Core/view/frontend/templates/require_cookie.phtml similarity index 100% rename from app/code/Magento/Core/view/frontend/require_cookie.phtml rename to app/code/Magento/Core/view/frontend/templates/require_cookie.phtml diff --git a/app/code/Magento/Core/view/frontend/template.phtml b/app/code/Magento/Core/view/frontend/templates/template.phtml similarity index 100% rename from app/code/Magento/Core/view/frontend/template.phtml rename to app/code/Magento/Core/view/frontend/templates/template.phtml diff --git a/app/code/Magento/Core/view/frontend/text.phtml b/app/code/Magento/Core/view/frontend/templates/text.phtml similarity index 100% rename from app/code/Magento/Core/view/frontend/text.phtml rename to app/code/Magento/Core/view/frontend/templates/text.phtml diff --git a/app/code/Magento/Core/view/frontend/calendar.gif b/app/code/Magento/Core/view/frontend/web/calendar.gif similarity index 100% rename from app/code/Magento/Core/view/frontend/calendar.gif rename to app/code/Magento/Core/view/frontend/web/calendar.gif diff --git a/app/code/Magento/Core/view/frontend/fam_book_open.png b/app/code/Magento/Core/view/frontend/web/fam_book_open.png similarity index 100% rename from app/code/Magento/Core/view/frontend/fam_book_open.png rename to app/code/Magento/Core/view/frontend/web/fam_book_open.png diff --git a/app/code/Magento/Core/view/frontend/js/require-cookie.js b/app/code/Magento/Core/view/frontend/web/js/require-cookie.js similarity index 100% rename from app/code/Magento/Core/view/frontend/js/require-cookie.js rename to app/code/Magento/Core/view/frontend/web/js/require-cookie.js diff --git a/app/code/Magento/Core/view/frontend/prototype/magento.css b/app/code/Magento/Core/view/frontend/web/prototype/magento.css similarity index 100% rename from app/code/Magento/Core/view/frontend/prototype/magento.css rename to app/code/Magento/Core/view/frontend/web/prototype/magento.css diff --git a/app/code/Magento/Core/view/frontend/translate_edit_icon.png b/app/code/Magento/Core/view/frontend/web/translate_edit_icon.png similarity index 100% rename from app/code/Magento/Core/view/frontend/translate_edit_icon.png rename to app/code/Magento/Core/view/frontend/web/translate_edit_icon.png diff --git a/app/code/Magento/Core/view/frontend/translate_edit_icon_hover.png b/app/code/Magento/Core/view/frontend/web/translate_edit_icon_hover.png similarity index 100% rename from app/code/Magento/Core/view/frontend/translate_edit_icon_hover.png rename to app/code/Magento/Core/view/frontend/web/translate_edit_icon_hover.png diff --git a/app/code/Magento/Cron/etc/crontab/events.xml b/app/code/Magento/Cron/etc/crontab/events.xml index fc86ea3cf74fb9e4223cbee5af1adf4d9abb0850..704371e78a5b3699f89eec6e58f5d032ed7596ad 100644 --- a/app/code/Magento/Cron/etc/crontab/events.xml +++ b/app/code/Magento/Cron/etc/crontab/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="default"> <observer name="cron_observer" instance="Magento\Cron\Model\Observer" method="dispatch" /> </event> diff --git a/app/code/Magento/Cron/etc/di.xml b/app/code/Magento/Cron/etc/di.xml index a87f0f5d1e09d77290a0b4ba1b3c285d89813496..e2af396831911c43997b2747b88eb3ef94427a95 100644 --- a/app/code/Magento/Cron/etc/di.xml +++ b/app/code/Magento/Cron/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Cron\Model\ConfigInterface" type="Magento\Cron\Model\Config" /> <preference for="Magento\Framework\Shell\CommandRendererInterface" type="Magento\Framework\Shell\CommandRenderer" /> <type name="Magento\Cron\Model\Config\Reader\Db"> diff --git a/app/code/Magento/Cron/etc/module.xml b/app/code/Magento/Cron/etc/module.xml index bfdd9d8d961e4690ad85540c1aabefb70bc1a702..98f73ba7c4e5e39d1936d743dbf03750cbae8373 100644 --- a/app/code/Magento/Cron/etc/module.xml +++ b/app/code/Magento/Cron/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Cron" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Store"/> diff --git a/app/code/Magento/CurrencySymbol/etc/adminhtml/acl.xml b/app/code/Magento/CurrencySymbol/etc/adminhtml/acl.xml index 68c7b050335a4aadaf858d0288b5068507e69079..001ddce966885517db2fbc4e1cf9667e984088e6 100644 --- a/app/code/Magento/CurrencySymbol/etc/adminhtml/acl.xml +++ b/app/code/Magento/CurrencySymbol/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/CurrencySymbol/etc/adminhtml/routes.xml b/app/code/Magento/CurrencySymbol/etc/adminhtml/routes.xml index c0f3cd88fd37d5b1ea93debda476279113c5e61c..231d506ec3f3d89be419d2d253f6bdfac867d4e3 100644 --- a/app/code/Magento/CurrencySymbol/etc/adminhtml/routes.xml +++ b/app/code/Magento/CurrencySymbol/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_CurrencySymbol" /> diff --git a/app/code/Magento/CurrencySymbol/etc/di.xml b/app/code/Magento/CurrencySymbol/etc/di.xml index 4ab46c8038d939a029de423e2e8a9d7a4f72204c..6767d8d788f2a87c48a583b4f5aebdeb1e77d0a0 100644 --- a/app/code/Magento/CurrencySymbol/etc/di.xml +++ b/app/code/Magento/CurrencySymbol/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Setup\Migration"> <arguments> <argument name="compositeModules" xsi:type="array"> diff --git a/app/code/Magento/CurrencySymbol/etc/events.xml b/app/code/Magento/CurrencySymbol/etc/events.xml index 4827d7d4046f48700ad5e04ba4ff16138091fe2b..b69da9e752e4350aedb64ba93cff4292babc2588 100644 --- a/app/code/Magento/CurrencySymbol/etc/events.xml +++ b/app/code/Magento/CurrencySymbol/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="currency_display_options_forming"> <observer name="magento_currencysymbol_currency_display_options" instance="Magento\CurrencySymbol\Model\Observer" method="currencyDisplayOptions" /> </event> diff --git a/app/code/Magento/CurrencySymbol/etc/module.xml b/app/code/Magento/CurrencySymbol/etc/module.xml index ed041de8f6af5463949f328777be8d1f35f8270c..572b7c34aa46de86307bf0c672cb695f842ada8a 100644 --- a/app/code/Magento/CurrencySymbol/etc/module.xml +++ b/app/code/Magento/CurrencySymbol/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_CurrencySymbol" version="1.0.0.0.0" active="true"> <sequence> <module name="Magento_Widget"/> diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/grid.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml similarity index 100% rename from app/code/Magento/CurrencySymbol/view/adminhtml/grid.phtml rename to app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/system/currency/rate/matrix.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml similarity index 100% rename from app/code/Magento/CurrencySymbol/view/adminhtml/system/currency/rate/matrix.phtml rename to app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/system/currency/rate/services.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/services.phtml similarity index 100% rename from app/code/Magento/CurrencySymbol/view/adminhtml/system/currency/rate/services.phtml rename to app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/services.phtml diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/system/currency/rates.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rates.phtml similarity index 100% rename from app/code/Magento/CurrencySymbol/view/adminhtml/system/currency/rates.phtml rename to app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rates.phtml diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php index b1c1f9f35957b8391d04f573e3e973d7404c3427..46979f93e0b1f0364c36a15e4d53e760802a533b 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php @@ -29,8 +29,6 @@ use Magento\Directory\Model\Currency; /** * Adminhtml customer orders grid block - * - * @SuppressWarnings(PHPMD.LongVariable) */ class Cart extends \Magento\Backend\Block\Widget\Grid\Extended { @@ -224,7 +222,7 @@ class Cart extends \Magento\Backend\Block\Widget\Grid\Extended */ public function getGridParentHtml() { - $templateName = $this->_viewFileSystem->getFilename($this->_parentTemplate, ['_relative' => true]); + $templateName = $this->_viewFileSystem->getTemplateFileName($this->_parentTemplate, ['_relative' => true]); return $this->fetchView($templateName); } diff --git a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php index 2136227985ca66bfeca9278ac06913f46961498d..54185cc5f855e5e2e932894ae522263bbb674eb3 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Form/Element/File.php @@ -31,9 +31,9 @@ namespace Magento\Customer\Block\Adminhtml\Form\Element; class File extends \Magento\Framework\Data\Form\Element\AbstractElement { /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * Adminhtml data @@ -47,7 +47,7 @@ class File extends \Magento\Framework\Data\Form\Element\AbstractElement * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection * @param \Magento\Framework\Escaper $escaper * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param array $data */ public function __construct( @@ -55,11 +55,11 @@ class File extends \Magento\Framework\Data\Form\Element\AbstractElement \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, $data = array() ) { $this->_adminhtmlData = $adminhtmlData; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; parent::__construct($factoryElement, $factoryCollection, $escaper, $data); $this->setType('file'); } @@ -152,7 +152,7 @@ class File extends \Magento\Framework\Data\Form\Element\AbstractElement $image = array( 'alt' => __('Download'), 'title' => __('Download'), - 'src' => $this->_viewUrl->getViewFileUrl('images/fam_bullet_disk.gif'), + 'src' => $this->_assetRepo->getUrl('images/fam_bullet_disk.gif'), 'class' => 'v-middle' ); $url = $this->_getPreviewUrl(); diff --git a/app/code/Magento/Customer/Model/ImportExport/Import/AbstractCustomer.php b/app/code/Magento/Customer/Model/ImportExport/Import/AbstractCustomer.php index 3ebe516d82c994eb789b3a50f441f7e728dd6d03..846d3863f823cb63b2db5f9709f68c218f78d68b 100644 --- a/app/code/Magento/Customer/Model/ImportExport/Import/AbstractCustomer.php +++ b/app/code/Magento/Customer/Model/ImportExport/Import/AbstractCustomer.php @@ -80,6 +80,11 @@ abstract class AbstractCustomer extends \Magento\ImportExport\Model\Import\Entit */ protected $_storageFactory; + /** + * {@inheritdoc} + */ + protected $masterAttributeCode = '_email'; + /** * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Framework\Stdlib\String $string diff --git a/app/code/Magento/Customer/Model/ImportExport/Import/Customer.php b/app/code/Magento/Customer/Model/ImportExport/Import/Customer.php index d0d14e9cd35101f46949cba589c4ee981738260d..bf67390988b34bfd782314410488be024d066c31 100644 --- a/app/code/Magento/Customer/Model/ImportExport/Import/Customer.php +++ b/app/code/Magento/Customer/Model/ImportExport/Import/Customer.php @@ -127,6 +127,11 @@ class Customer extends AbstractCustomer */ protected $_resourceHelper; + /** + * {@inheritdoc} + */ + protected $masterAttributeCode = 'email'; + /** * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Framework\Stdlib\String $string diff --git a/app/code/Magento/Customer/Model/ImportExport/Import/CustomerComposite.php b/app/code/Magento/Customer/Model/ImportExport/Import/CustomerComposite.php index d3bdb83e552f5c842179eac971ac30d119a4d1e4..73129b34dc82156437115558c1546c6554846abb 100644 --- a/app/code/Magento/Customer/Model/ImportExport/Import/CustomerComposite.php +++ b/app/code/Magento/Customer/Model/ImportExport/Import/CustomerComposite.php @@ -141,6 +141,11 @@ class CustomerComposite extends \Magento\ImportExport\Model\Import\AbstractEntit */ protected $_dataSourceModels; + /** + * {@inheritdoc} + */ + protected $masterAttributeCode = 'email'; + /** * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Framework\Stdlib\String $string diff --git a/app/code/Magento/Customer/etc/adminhtml/acl.xml b/app/code/Magento/Customer/etc/adminhtml/acl.xml index ffd443cb892a5633d60cd49cb2f76ef71361bf3b..392c11a8359822096fe8e5250bed380851d6c4d3 100644 --- a/app/code/Magento/Customer/etc/adminhtml/acl.xml +++ b/app/code/Magento/Customer/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Customer/etc/adminhtml/di.xml b/app/code/Magento/Customer/etc/adminhtml/di.xml index 7417e1ccfdafc9e9b3b48a8ee12fadfa17e4699e..18759291cfbd655851d6ea0ce2cc3229a42c0f8f 100644 --- a/app/code/Magento/Customer/etc/adminhtml/di.xml +++ b/app/code/Magento/Customer/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Customer\Model\Customer" type="Magento\Customer\Model\Backend\Customer" /> <type name="Magento\Customer\Model\Session"> <arguments> diff --git a/app/code/Magento/Customer/etc/adminhtml/routes.xml b/app/code/Magento/Customer/etc/adminhtml/routes.xml index 886bb90056c5d1b11475da0096e1d101396a5be7..ff498380ce3f87e588fae6b6a1f0aead1fa27bda 100644 --- a/app/code/Magento/Customer/etc/adminhtml/routes.xml +++ b/app/code/Magento/Customer/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="customer" frontName="customer"> <module name="Magento_Customer" /> diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml index c75d6400a19f69fc0dafcd1e09658426293c8475..186380578ca14412a01a0dce55f3ad608f77af21 100644 --- a/app/code/Magento/Customer/etc/di.xml +++ b/app/code/Magento/Customer/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Customer\Service\V1\CustomerAddressServiceInterface" type="Magento\Customer\Service\V1\CustomerAddressService" /> <preference for="Magento\Customer\Service\V1\CustomerGroupServiceInterface" diff --git a/app/code/Magento/Customer/etc/events.xml b/app/code/Magento/Customer/etc/events.xml index 071a79a87267c6f83e7705fb84fdd841ae1ac427..e3c8b99f7425e38186db9ed7622eaad19c7ded3c 100644 --- a/app/code/Magento/Customer/etc/events.xml +++ b/app/code/Magento/Customer/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="customer_address_save_before"> <observer name="customer_address_before_save_viv_observer" instance="Magento\Customer\Model\Observer" method="beforeAddressSave" /> </event> diff --git a/app/code/Magento/Customer/etc/fieldset.xml b/app/code/Magento/Customer/etc/fieldset.xml index 2309e7d95598b4f1b8e2eb00926d7e08ace67093..0ad1f29d093dc6f07d7a8e1373f4a072a9a923b0 100644 --- a/app/code/Magento/Customer/etc/fieldset.xml +++ b/app/code/Magento/Customer/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="customer_account"> <field name="prefix"> diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml index 5227f97a315e3575d5075416e971e690beca131c..3946f5ec328d88f7dac9e83b1d167d00d2a35f4e 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Customer\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">frontend</argument> diff --git a/app/code/Magento/Customer/etc/frontend/routes.xml b/app/code/Magento/Customer/etc/frontend/routes.xml index 5451e972a17d5beb186a4ae16eecfcd51645fc6b..a051bb138b3658eae61a1957b0ec6125460f2980 100644 --- a/app/code/Magento/Customer/etc/frontend/routes.xml +++ b/app/code/Magento/Customer/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="customer" frontName="customer"> <module name="Magento_Customer" /> diff --git a/app/code/Magento/Customer/etc/module.xml b/app/code/Magento/Customer/etc/module.xml index 4207fbfae2cc5e2efd387d2305ff23b501ef90bb..c69e0ccb726d0fb3e457a4adf15e13900b34a6fa 100644 --- a/app/code/Magento/Customer/etc/module.xml +++ b/app/code/Magento/Customer/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Customer" version="1.6.2.0.5" active="true"> <sequence> <module name="Magento_Eav"/> diff --git a/app/code/Magento/Customer/etc/validation.xml b/app/code/Magento/Customer/etc/validation.xml index 26c46dbf6def4467c1bee3cc3c12639bc2ae0108..c56033525375630d449a455e74393a376ba58f8b 100644 --- a/app/code/Magento/Customer/etc/validation.xml +++ b/app/code/Magento/Customer/etc/validation.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="customer"> <rules> <rule name="check_eav"> diff --git a/app/code/Magento/Customer/view/adminhtml/edit/js.phtml b/app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/edit/js.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/edit/js.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/edit/tab/account/form/renderer/group.phtml b/app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/group.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/edit/tab/account/form/renderer/group.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/edit/tab/account/form/renderer/group.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/online.phtml b/app/code/Magento/Customer/view/adminhtml/templates/online.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/online.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/online.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/sales/order/create/address/form/renderer/vat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/sales/order/create/address/form/renderer/vat.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/system/config/validatevat.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/tab/addresses.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/tab/addresses.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/tab/cart.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/tab/cart.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/tab/newsletter.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/tab/newsletter.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/tab/newsletter.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/tab/view.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/view.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/tab/view.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/tab/view.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/tab/view/sales.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/tab/view/sales.phtml rename to app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml diff --git a/app/code/Magento/Customer/view/adminhtml/edit/tab/js/addresses.js b/app/code/Magento/Customer/view/adminhtml/web/edit/tab/js/addresses.js similarity index 100% rename from app/code/Magento/Customer/view/adminhtml/edit/tab/js/addresses.js rename to app/code/Magento/Customer/view/adminhtml/web/edit/tab/js/addresses.js diff --git a/app/code/Magento/Customer/view/frontend/account/customer.phtml b/app/code/Magento/Customer/view/frontend/templates/account/customer.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/account/customer.phtml rename to app/code/Magento/Customer/view/frontend/templates/account/customer.phtml diff --git a/app/code/Magento/Customer/view/frontend/account/dashboard/address.phtml b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/account/dashboard/address.phtml rename to app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml diff --git a/app/code/Magento/Customer/view/frontend/account/dashboard/hello.phtml b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/hello.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/account/dashboard/hello.phtml rename to app/code/Magento/Customer/view/frontend/templates/account/dashboard/hello.phtml diff --git a/app/code/Magento/Customer/view/frontend/account/dashboard/info.phtml b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/account/dashboard/info.phtml rename to app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml diff --git a/app/code/Magento/Customer/view/frontend/account/link/authorization.phtml b/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/account/link/authorization.phtml rename to app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml diff --git a/app/code/Magento/Customer/view/frontend/account/link/back.phtml b/app/code/Magento/Customer/view/frontend/templates/account/link/back.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/account/link/back.phtml rename to app/code/Magento/Customer/view/frontend/templates/account/link/back.phtml diff --git a/app/code/Magento/Customer/view/frontend/account/navigation.phtml b/app/code/Magento/Customer/view/frontend/templates/account/navigation.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/account/navigation.phtml rename to app/code/Magento/Customer/view/frontend/templates/account/navigation.phtml diff --git a/app/code/Magento/Customer/view/frontend/additionalinfocustomer.phtml b/app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/additionalinfocustomer.phtml rename to app/code/Magento/Customer/view/frontend/templates/additionalinfocustomer.phtml diff --git a/app/code/Magento/Customer/view/frontend/address/book.phtml b/app/code/Magento/Customer/view/frontend/templates/address/book.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/address/book.phtml rename to app/code/Magento/Customer/view/frontend/templates/address/book.phtml diff --git a/app/code/Magento/Customer/view/frontend/address/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml similarity index 98% rename from app/code/Magento/Customer/view/frontend/address/edit.phtml rename to app/code/Magento/Customer/view/frontend/templates/address/edit.phtml index 4f9b844fba9b25adad13619e3630cbc6a8af9541..134e5aaf64e455c4062e31e52912492b46be1223 100644 --- a/app/code/Magento/Customer/view/frontend/address/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml @@ -92,7 +92,7 @@ <div class="field region required"> <label class="label" for="region_id"><span><?php echo __('State/Province') ?></span></label> <div class="control"> - <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;"<?php echo (!$this->getConfig('general/region/display_all')) ? ' disabled="disabled"' :'';?>> + <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" class="validate-select" <?php echo (!$this->getConfig('general/region/display_all')) ? ' disabled="disabled"' :'';?>> <option value=""><?php echo __('Please select region, state or province') ?></option> </select> <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo __('State/Province') ?>" class="input-text <?php echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>"<?php echo (!$this->getConfig('general/region/display_all')) ? ' disabled="disabled"' :'';?>/> diff --git a/app/code/Magento/Customer/view/frontend/form/confirmation.phtml b/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/form/confirmation.phtml rename to app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml diff --git a/app/code/Magento/Customer/view/frontend/form/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml similarity index 98% rename from app/code/Magento/Customer/view/frontend/form/edit.phtml rename to app/code/Magento/Customer/view/frontend/templates/form/edit.phtml index 98848c5be303e856099658eb4fa89511e7af883f..2a07ade97d98e6cde94fa2e18097afe57ef301e8 100755 --- a/app/code/Magento/Customer/view/frontend/form/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml @@ -53,7 +53,7 @@ </div> </fieldset> - <fieldset class="fieldset password" style="display:none;"> + <fieldset class="fieldset password"> <legend class="legend"><span><?php echo __('Change Password') ?></span></legend><br> <div class="field password current required"> <label class="label" for="current-password"><span><?php echo __('Current Password') ?></span></label> diff --git a/app/code/Magento/Customer/view/frontend/form/forgotpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/form/forgotpassword.phtml rename to app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml diff --git a/app/code/Magento/Customer/view/frontend/form/login.phtml b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/form/login.phtml rename to app/code/Magento/Customer/view/frontend/templates/form/login.phtml diff --git a/app/code/Magento/Customer/view/frontend/form/newsletter.phtml b/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/form/newsletter.phtml rename to app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml diff --git a/app/code/Magento/Customer/view/frontend/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/form/register.phtml rename to app/code/Magento/Customer/view/frontend/templates/form/register.phtml diff --git a/app/code/Magento/Customer/view/frontend/form/resetforgottenpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/form/resetforgottenpassword.phtml rename to app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml diff --git a/app/code/Magento/Customer/view/frontend/js/components.phtml b/app/code/Magento/Customer/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/js/components.phtml rename to app/code/Magento/Customer/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Customer/view/frontend/logout.phtml b/app/code/Magento/Customer/view/frontend/templates/logout.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/logout.phtml rename to app/code/Magento/Customer/view/frontend/templates/logout.phtml diff --git a/app/code/Magento/Customer/view/frontend/newcustomer.phtml b/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/newcustomer.phtml rename to app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml diff --git a/app/code/Magento/Customer/view/frontend/widget/dob.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/widget/dob.phtml rename to app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml diff --git a/app/code/Magento/Customer/view/frontend/widget/gender.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/widget/gender.phtml rename to app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml diff --git a/app/code/Magento/Customer/view/frontend/widget/name.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/widget/name.phtml rename to app/code/Magento/Customer/view/frontend/templates/widget/name.phtml diff --git a/app/code/Magento/Customer/view/frontend/widget/taxvat.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml similarity index 100% rename from app/code/Magento/Customer/view/frontend/widget/taxvat.phtml rename to app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml diff --git a/app/code/Magento/Customer/view/frontend/address.js b/app/code/Magento/Customer/view/frontend/web/address.js similarity index 100% rename from app/code/Magento/Customer/view/frontend/address.js rename to app/code/Magento/Customer/view/frontend/web/address.js diff --git a/app/code/Magento/Customer/view/frontend/js/checkout-balance.js b/app/code/Magento/Customer/view/frontend/web/js/checkout-balance.js similarity index 100% rename from app/code/Magento/Customer/view/frontend/js/checkout-balance.js rename to app/code/Magento/Customer/view/frontend/web/js/checkout-balance.js diff --git a/app/code/Magento/Customer/view/frontend/set-password.js b/app/code/Magento/Customer/view/frontend/web/set-password.js similarity index 100% rename from app/code/Magento/Customer/view/frontend/set-password.js rename to app/code/Magento/Customer/view/frontend/web/set-password.js diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php index 8a87cccb0e0548c032861512a2c431c79fb643ce..e930901fd1eb18dd999a6436ed7f4e8e271980be 100644 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php +++ b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css.php @@ -26,28 +26,71 @@ namespace Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code; /** * Block that renders CSS tab */ -class Css extends \Magento\Framework\View\Element\Template +class Css extends \Magento\Backend\Block\Widget\Form { /** - * Get file groups content + * @var \Magento\DesignEditor\Helper\Data + */ + protected $_designEditorHelper; + + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\DesignEditor\Helper\Data $designEditorHelper + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\DesignEditor\Helper\Data $designEditorHelper, + array $data = array() + ) { + $this->_designEditorHelper = $designEditorHelper; + parent::__construct($context, $data); + } + + /** + * Get CSS file assets * - * @return string[] + * Note: someone must set them in the first place + * + * @return \Magento\Framework\View\Asset\LocalInterface[] */ - public function getFileGroups() + public function getAssets() { - $groups = array(); - foreach ($this->getCssFiles() as $groupName => $files) { - $groups[] = $this->getChildBlock( - 'design_editor_tools_code_css_group' - )->setTitle( - $groupName - )->setFiles( - $files - )->setThemeId( - $this->getThemeId() - )->toHtml(); - } + return $this->_getData('assets'); + } - return $groups; + /** + * Get url to download CSS file + * + * @param string $fileId + * @param int $themeId + * @return string + */ + public function getDownloadUrl($fileId, $themeId) + { + return $this->getUrl( + 'adminhtml/system_design_theme/downloadCss', + ['theme_id' => $themeId, 'file' => $this->_designEditorHelper->urlEncode($fileId)] + ); + } + + /** + * Check if files group needs "add" button + * + * @return false + */ + public function hasAddButton() + { + return false; + } + + /** + * Check if files group needs download buttons next to each file + * + * @return true + */ + public function hasDownloadButton() + { + return true; } } diff --git a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css/Group.php b/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css/Group.php deleted file mode 100644 index 3e9bf4dfc188ff1cbe945015f9a79939f8f50c9e..0000000000000000000000000000000000000000 --- a/app/code/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/Css/Group.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css; - -/** - * Block that renders group of files - */ -class Group extends \Magento\Backend\Block\Widget\Form -{ - /** - * @var \Magento\DesignEditor\Helper\Data - */ - protected $_designEditorHelper; - - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\DesignEditor\Helper\Data $designEditorHelper - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\DesignEditor\Helper\Data $designEditorHelper, - array $data = array() - ) { - $this->_designEditorHelper = $designEditorHelper; - parent::__construct($context, $data); - } - - /** - * Get url to download CSS file - * - * @param string $fileId - * @param int $themeId - * @return string - */ - public function getDownloadUrl($fileId, $themeId) - { - return $this->getUrl( - 'adminhtml/system_design_theme/downloadCss', - array('theme_id' => $themeId, 'file' => $this->_designEditorHelper->urlEncode($fileId)) - ); - } - - /** - * Check if files group needs "add" button - * - * @return false - */ - public function hasAddButton() - { - return false; - } - - /** - * Check if files group needs download buttons next to each file - * - * @return true - */ - public function hasDownloadButton() - { - return true; - } -} diff --git a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php index 2cadd9c668aa00b37ed4f4365dc4f020dba11e3c..212faed41bebd4c7610d2b1f305bda17b1873e12 100644 --- a/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php +++ b/app/code/Magento/DesignEditor/Controller/Adminhtml/System/Design/Editor.php @@ -303,7 +303,7 @@ class Editor extends \Magento\Backend\App\Action } $themeCopy->setData($theme->getData()); $themeCopy->setId(null)->setThemeTitle(__('Copy of [%1]', $theme->getThemeTitle())); - $themeCopy->getThemeImage()->createPreviewImageCopy($theme->getPreviewImage()); + $themeCopy->getThemeImage()->createPreviewImageCopy($theme); $themeCopy->save(); $copyService->copy($theme, $themeCopy); $this->messageManager->addSuccess(__('You saved a duplicate copy of this theme in "My Customizations."')); @@ -420,8 +420,9 @@ class Editor extends \Magento\Backend\App\Action if ($cssTabBlock) { /** @var $helper \Magento\Core\Helper\Theme */ $helper = $this->_objectManager->get('Magento\Core\Helper\Theme'); - $cssFiles = $helper->getGroupedCssFiles($theme); - $cssTabBlock->setCssFiles($cssFiles)->setThemeId($theme->getId()); + $assets = $helper->getCssAssets($theme); + $cssTabBlock->setAssets($assets) + ->setThemeId($theme->getId()); } return $this; } diff --git a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php index 2c47c5d64d4cfe75c128b5b70aba918ca20cf63d..d4ecf8c0db1ddb3c2c32dfcbd9185dd5fa8a07bd 100644 --- a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php +++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php @@ -53,9 +53,9 @@ class Factory protected $_objectManager; /** - * @var \Magento\Framework\View\FileSystem + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewFileSystem; + protected $assetRepo; /** * @var \Magento\Framework\Config\FileIteratorFactory @@ -69,18 +69,18 @@ class Factory /** * @param \Magento\Framework\ObjectManager $objectManager - * @param \Magento\Framework\View\FileSystem $viewFileSystem + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory * @param \Magento\Framework\App\Filesystem $filesystem */ public function __construct( \Magento\Framework\ObjectManager $objectManager, - \Magento\Framework\View\FileSystem $viewFileSystem, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory, \Magento\Framework\App\Filesystem $filesystem ) { $this->_objectManager = $objectManager; - $this->_viewFileSystem = $viewFileSystem; + $this->assetRepo = $assetRepo; $this->fileIteratorFactory = $fileIteratorFactory; $this->filesystem = $filesystem; } @@ -98,10 +98,11 @@ class Factory if (!isset($this->_fileNames[$type])) { throw new \Magento\Framework\Exception("Unknown control configuration type: \"{$type}\""); } - return $this->_viewFileSystem->getFilename( + return $this->assetRepo->createAsset( $this->_fileNames[$type], - array('area' => \Magento\Framework\View\DesignInterface::DEFAULT_AREA, 'themeModel' => $theme) - ); + ['area' => \Magento\Framework\View\DesignInterface::DEFAULT_AREA, 'themeModel' => $theme] + ) + ->getSourceFile(); } /** @@ -130,7 +131,6 @@ class Factory break; default: throw new \Magento\Framework\Exception("Unknown control configuration type: \"{$type}\""); - break; } $rootDirectory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); $paths = array(); diff --git a/app/code/Magento/DesignEditor/Model/Observer.php b/app/code/Magento/DesignEditor/Model/Observer.php index 968bf91f42c7e3083d7ae7927562e8fcb6134c80..c2dfb3aa8850da07bf166701914e80926b4a6ef2 100644 --- a/app/code/Magento/DesignEditor/Model/Observer.php +++ b/app/code/Magento/DesignEditor/Model/Observer.php @@ -80,7 +80,7 @@ class Observer $nonVdeAssets = array_diff_key($pageAssets->getAll(), $vdeAssets); foreach ($nonVdeAssets as $assetId => $asset) { - if ($asset->getContentType() == \Magento\Framework\View\Publisher::CONTENT_TYPE_JS) { + if ($asset->getContentType() == 'js') { $pageAssets->remove($assetId); } } diff --git a/app/code/Magento/DesignEditor/etc/adminhtml/acl.xml b/app/code/Magento/DesignEditor/etc/adminhtml/acl.xml index 2942666b9e5d9dd8622a35fae83df9a25fd14099..7b37bc1c5bc5a55b18bb7670602292e2a6cf4edf 100644 --- a/app/code/Magento/DesignEditor/etc/adminhtml/acl.xml +++ b/app/code/Magento/DesignEditor/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/DesignEditor/etc/adminhtml/di.xml b/app/code/Magento/DesignEditor/etc/adminhtml/di.xml index 8c1d300142611f1b24bf8cb4464802d4c4e8ce83..5d797bc1ebee6d6b4e102e69cd621d0ffa081299 100644 --- a/app/code/Magento/DesignEditor/etc/adminhtml/di.xml +++ b/app/code/Magento/DesignEditor/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Files\Content\Files"> <arguments> <argument name="storageHelper" xsi:type="object">Magento\Theme\Helper\Storage\Proxy</argument> diff --git a/app/code/Magento/DesignEditor/etc/adminhtml/routes.xml b/app/code/Magento/DesignEditor/etc/adminhtml/routes.xml index e65ba1e1a43ff2197568d78313e76332b1f6c853..bb53563f0c40992960fb375d9d3182873c6bf685 100644 --- a/app/code/Magento/DesignEditor/etc/adminhtml/routes.xml +++ b/app/code/Magento/DesignEditor/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_DesignEditor" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/DesignEditor/etc/di.xml b/app/code/Magento/DesignEditor/etc/di.xml index 12ae6aa1fb5fcd2d99997e0e97ed58f2d0593150..1cc3fe387a1bb950a59320f55c1e571f09d3e268 100644 --- a/app/code/Magento/DesignEditor/etc/di.xml +++ b/app/code/Magento/DesignEditor/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\DesignEditor\Controller\Varien\Router\Standard"> <arguments> <argument name="routerId" xsi:type="string">vde</argument> diff --git a/app/code/Magento/DesignEditor/etc/events.xml b/app/code/Magento/DesignEditor/etc/events.xml index cfcc791699f13d23040ccb416775e8d25fbb5050..8740c7be56ce92dc3976d5e6d2ea67882c0deb11 100644 --- a/app/code/Magento/DesignEditor/etc/events.xml +++ b/app/code/Magento/DesignEditor/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="save_view_configuration"> <observer name="save_view_configuration_observer" instance="Magento\DesignEditor\Model\Observer" method="saveQuickStyles" /> <observer name="design_editor_change_timestamp" instance="Magento\DesignEditor\Model\Observer" method="saveChangeTime" /> diff --git a/app/code/Magento/DesignEditor/etc/frontend/di.xml b/app/code/Magento/DesignEditor/etc/frontend/di.xml index 2dba851d484bba42325329ea3ea672ca151da9cd..6296580bab0b972760d556076f473badd5f440a8 100644 --- a/app/code/Magento/DesignEditor/etc/frontend/di.xml +++ b/app/code/Magento/DesignEditor/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\RouterList"> <arguments> <argument name="routerList" xsi:type="array"> diff --git a/app/code/Magento/DesignEditor/etc/frontend/routes.xml b/app/code/Magento/DesignEditor/etc/frontend/routes.xml index 49bcc38679c3bb2bbe9f625e53cb9dc94c52ee7a..d0ee5224516b94053bb08b3967d78628a31fcc00 100644 --- a/app/code/Magento/DesignEditor/etc/frontend/routes.xml +++ b/app/code/Magento/DesignEditor/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="designeditor" frontName="design"> <module name="Magento_DesignEditor" /> diff --git a/app/code/Magento/DesignEditor/etc/module.xml b/app/code/Magento/DesignEditor/etc/module.xml index 71f5c3dd39520846547efcac3cc72b70b41c7cdb..9cdbed9c9d096cae53c3fdd46bd79ca5648177df 100644 --- a/app/code/Magento/DesignEditor/etc/module.xml +++ b/app/code/Magento/DesignEditor/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_DesignEditor" version="1.0.0.3" active="true"> <sequence> <module name="Magento_Theme"/> diff --git a/app/code/Magento/DesignEditor/etc/vde/events.xml b/app/code/Magento/DesignEditor/etc/vde/events.xml index cf33baf278208d196163eb40272fed4d89a3c8cc..3887ba71a6cece03c578a041d7ffffa4ec1cd94f 100644 --- a/app/code/Magento/DesignEditor/etc/vde/events.xml +++ b/app/code/Magento/DesignEditor/etc/vde/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_layout_generate_blocks_after"> <observer name="vde_editor" instance="Magento\DesignEditor\Model\Observer" method="clearJs" /> </event> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/css/group.phtml b/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/css/group.phtml deleted file mode 100644 index a0a6cd480c32ee078c7f1914d1fb224186ebe023..0000000000000000000000000000000000000000 --- a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/css/group.phtml +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<?php /** @var $this \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css\Group */ ?> - -<div class="files-list"> - <div class="files-list-header"> - <h5 class="title" title="<?php echo $this->escapeHtml($this->getTitle()) ?>"><?php echo $this->getTitle() ?></h5> - <?php if ($this->hasAddButton()): ?> - <a href="#vde-tab-custom" class="action-add" data-toggle="tab" title="<?php echo __('Add Custom'); ?>"> - <span><?php echo __('Add Custom'); ?></span> - </a> - <?php endif ?> - </div> - <div class="files-list-content"> - <ul class="items"> - <?php foreach ($this->getFiles() as $file): ?> - <li class="item"> - <span class="filename" title="<?php echo $file['safePath'] ?>"><?php echo $file['id'] ?></span> - <?php if ($this->hasDownloadButton()): ?> - <a href="<?php echo $this->getDownloadUrl($file['id'], $this->getThemeId()) ?>" class="action-download" title="<?php echo __('Download file'); ?>"> - <span><?php echo __('Download file'); ?></span> - </a> - <?php endif ?> - <!-- - placeholder for "Edit button" - <a href="#vde-tab-custom" class="action-edit" title="<?php echo __('Edit Custom CSS'); ?>"> - <span><?php echo __('Edit Custom CSS'); ?></span> - </a> - --> - </li> - <?php endforeach ?> - </ul> - </div> -</div> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/layout/adminhtml_system_design_editor_launch.xml b/app/code/Magento/DesignEditor/view/adminhtml/layout/adminhtml_system_design_editor_launch.xml index 693f0c85d1b6447bf293f63f41494e06b9cb9611..6d16857051c480c94184edfc51f91cef0491f989 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/layout/adminhtml_system_design_editor_launch.xml +++ b/app/code/Magento/DesignEditor/view/adminhtml/layout/adminhtml_system_design_editor_launch.xml @@ -165,9 +165,7 @@ <block class="Magento\Backend\Block\Template" name="design_editor_tools_code_tab_handle" as="tab_handle" template="Magento_DesignEditor::editor/tools/tabs/handle.phtml"/> <block class="Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Tabs\Body" name="design_editor_tools_code_tab_body" as="tab_body" template="Magento_DesignEditor::editor/tools/tabs/body.phtml"/> <!-- Tab with CSS list --> - <block class="Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css" name="design_editor_tools_code_css" template="Magento_DesignEditor::editor/tools/code/css.phtml"> - <block class="Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css\Group" name="design_editor_tools_code_css_group" template="Magento_DesignEditor::editor/tools/code/css/group.phtml"/> - </block> + <block class="Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css" name="design_editor_tools_code_css" template="Magento_DesignEditor::editor/tools/code/css.phtml"/> <!-- Tab with JavaScript list --> <block class="Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js" name="design_editor_tools_code_js" template="Magento_DesignEditor::editor/tools/code/js.phtml"/> <!-- Tab with Custom CSS --> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/dialog.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/dialog.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/dialog.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/dialog.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/container.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/container.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/container.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/background-uploader.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/background-uploader.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/background-uploader.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/background-uploader.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/checkbox-utility.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/checkbox-utility.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/checkbox-utility.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/checkbox-utility.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/color-picker.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/color-picker.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/color-picker.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/color-picker.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/composite.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/composite.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/composite/children.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/children.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/composite/children.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/children.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/composite/wrapper.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/wrapper.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/composite/wrapper.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/composite/wrapper.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/element/input.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/input.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/element/input.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/input.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/element/wrapper.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/wrapper.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/element/wrapper.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/element/wrapper.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/font.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/font.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/font.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/font.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/logo-uploader.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/logo-uploader.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/logo-uploader.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/logo-uploader.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/simple.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/simple.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/simple.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/simple.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/template.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/template.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/form/renderer/template.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/form/renderer/template.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar/buttons.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar/buttons.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar/buttons/edit.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons/edit.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/toolbar/buttons/edit.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/toolbar/buttons/edit.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/block.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/block.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/block.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/block.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/css.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/css.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/css.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/css.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/custom.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/custom.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/custom.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/custom.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/image-sizing.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/image-sizing.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/image-sizing.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/image-sizing.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/js.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/code/js.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/content.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/content.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/content/files.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/files.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/content/files.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/files.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/content/uploader.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/uploader.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/content/uploader.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/uploader.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/js.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/js.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/js.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/js.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/tree.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/tree.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/files/tree.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/tree.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/quick-styles/form.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/quick-styles/form.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/quick-styles/form.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/quick-styles/form.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/settings.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/settings.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/settings.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/settings.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs/body.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/body.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs/body.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/body.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs/handle.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/handle.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs/handle.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/handle.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs/super-handle.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/super-handle.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/editor/tools/tabs/super-handle.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/tabs/super-handle.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/available.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/available.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/available.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/button.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/button.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/button.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/customized.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/customized.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/customized.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/list/available.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/list/available.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/list/available_ajax.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available_ajax.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/list/available_ajax.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/available_ajax.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/list/customized.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/customized.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/list/customized.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/list/customized.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/selector/first_entrance.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/first_entrance.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/selector/first_entrance.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/first_entrance.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/selector/my_customizations_tab.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/my_customizations_tab.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/selector/my_customizations_tab.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/my_customizations_tab.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/selector/storeview.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/storeview.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/selector/storeview.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/storeview.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/theme/selector/theme_edit.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/theme_edit.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/theme/selector/theme_edit.phtml rename to app/code/Magento/DesignEditor/view/adminhtml/templates/theme/selector/theme_edit.phtml diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.eot b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.eot similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.eot rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.eot diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.svg b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.svg similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.svg rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.svg diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.ttf b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.ttf similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.ttf rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.ttf diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.woff b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.woff similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/MUI-Icons.woff rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/MUI-Icons.woff diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.eot b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.eot similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.eot rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.eot diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.svg b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.svg similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.svg rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.svg diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.ttf b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.ttf similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.ttf rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.ttf diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.woff b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.woff similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBlack-webfont.woff rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBlack-webfont.woff diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.eot b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.eot similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.eot rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.eot diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.svg b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.svg similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.svg rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.svg diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.ttf b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.ttf similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.ttf rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.ttf diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.woff b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.woff similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansBold-webfont.woff rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansBold-webfont.woff diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.eot b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.eot similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.eot rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.eot diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.svg b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.svg similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.svg rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.svg diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.ttf b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.ttf similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.ttf rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.ttf diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.woff b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.woff similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansLight-webfont.woff rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansLight-webfont.woff diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.eot b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.eot similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.eot rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.eot diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.svg b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.svg similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.svg rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.svg diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.ttf b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.ttf similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.ttf rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.ttf diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.woff b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.woff similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansRegular-webfont.woff rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansRegular-webfont.woff diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.eot b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.eot similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.eot rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.eot diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.svg b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.svg similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.svg rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.svg diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.ttf b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.ttf similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.ttf rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.ttf diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.woff b/app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.woff similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/fonts/calluna/CallunaSansSemiBold-webfont.woff rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/fonts/calluna/CallunaSansSemiBold-webfont.woff diff --git a/app/code/Magento/DesignEditor/view/adminhtml/css/styles.css b/app/code/Magento/DesignEditor/view/adminhtml/web/css/styles.css similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/css/styles.css rename to app/code/Magento/DesignEditor/view/adminhtml/web/css/styles.css diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/arrow_down.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/arrow_down.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/arrow_down.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/arrow_down.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/arrow_up.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/arrow_up.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/arrow_up.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/arrow_up.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/block.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/block.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/block.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/block.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/button.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/button.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/button.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/button.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/button_hover.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/button_hover.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/button_hover.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/button_hover.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/checked.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/checked.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/checked.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/checked.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/container.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/container.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/container.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/container.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/container_hover.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/container_hover.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/container_hover.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/container_hover.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/gallery-image-base-label.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/gallery-image-base-label.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/gallery-image-base-label.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/gallery-image-base-label.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/i_msg-error.gif b/app/code/Magento/DesignEditor/view/adminhtml/web/images/i_msg-error.gif similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/i_msg-error.gif rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/i_msg-error.gif diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/i_msg-success.gif b/app/code/Magento/DesignEditor/view/adminhtml/web/images/i_msg-success.gif similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/i_msg-success.gif rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/i_msg-success.gif diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/jstree_plus_minus.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/jstree_plus_minus.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/jstree_plus_minus.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/jstree_plus_minus.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/logo-store-designer.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/logo-store-designer.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/logo-store-designer.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/logo-store-designer.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/stub.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/stub.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/stub.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/stub.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/theme-preview-back.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/theme-preview-back.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/theme-preview-back.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/theme-preview-back.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/vde-message-bg.gif b/app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-message-bg.gif similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/vde-message-bg.gif rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-message-bg.gif diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/vde-panel-top-shadow.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-panel-top-shadow.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/vde-panel-top-shadow.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-panel-top-shadow.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-image-settings-fill-frame.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-image-settings-fill-frame.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-image-settings-fill-frame.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-image-settings-fill-frame.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-main-tabs-icons-sprite.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-main-tabs-icons-sprite.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-main-tabs-icons-sprite.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-main-tabs-icons-sprite.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-panel-draggable-handler-bg.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-panel-draggable-handler-bg.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-panel-draggable-handler-bg.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-panel-draggable-handler-bg.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-text-edit-icon-sprite.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-text-edit-icon-sprite.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-text-edit-icon-sprite.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-text-edit-icon-sprite.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-text-menu-icon-sprite.png b/app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-text-menu-icon-sprite.png similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/images/vde-tools-text-menu-icon-sprite.png rename to app/code/Magento/DesignEditor/view/adminhtml/web/images/vde-tools-text-menu-icon-sprite.png diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/custom-css.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/custom-css.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/custom-css.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/custom-css.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/dialog.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/dialog.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/dialog.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/dialog.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/image-sizing.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/image-sizing.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/image-sizing.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/image-sizing.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/infinitescroll.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/infinitescroll.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/infinitescroll.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/infinitescroll.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/message.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/message.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/message.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/message.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/quick-style-element.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/quick-style-element.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/quick-style-element.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/quick-style-element.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/quick-style-uploader.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/quick-style-uploader.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/quick-style-uploader.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/quick-style-uploader.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/theme-assign.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-assign.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/theme-assign.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-assign.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/theme-delete.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-delete.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/theme-delete.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-delete.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/theme-edit.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-edit.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/theme-edit.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-edit.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/theme-revert.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-revert.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/theme-revert.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-revert.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/theme-save.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-save.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/theme-save.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-save.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/theme-selector.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-selector.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/theme-selector.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/theme-selector.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/tools-files.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/tools-files.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/tools-files.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/tools-files.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/tools-panel.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/tools-panel.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/tools-panel.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/tools-panel.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/tools.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/tools.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/tools.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/tools.js diff --git a/app/code/Magento/DesignEditor/view/adminhtml/js/vde-frame.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/vde-frame.js similarity index 100% rename from app/code/Magento/DesignEditor/view/adminhtml/js/vde-frame.js rename to app/code/Magento/DesignEditor/view/adminhtml/web/js/vde-frame.js diff --git a/app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml b/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml similarity index 100% rename from app/code/Magento/DesignEditor/view/frontend/translate_inline.phtml rename to app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index bae49d47f7501a7b8387c12d1389ba3d79529374..0022a288e52e037984e797017e2bf8c3550db0b6 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -67,13 +67,6 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin */ protected $_request = null; - /** - * Raw rate request data - * - * @var \Magento\Framework\Object|null - */ - protected $_rawRequest = null; - /** * Rate result data * @@ -516,7 +509,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin $requestObject->setBaseSubtotalInclTax($request->getBaseSubtotalInclTax()); - $this->_rawRequest = $requestObject; + $this->setRawRequest($requestObject); return $this; } @@ -1368,7 +1361,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin protected function _mapRequestToShipment(\Magento\Framework\Object $request) { $request->setOrigCountryId($request->getShipperAddressCountryCode()); - $this->_rawRequest = $request; + $this->setRawRequest($request); $customsValue = 0; $packageWeight = 0; $packages = $request->getPackages(); diff --git a/app/code/Magento/Dhl/etc/adminhtml/system.xml b/app/code/Magento/Dhl/etc/adminhtml/system.xml index 84d27021668dd9c7e693291839bb1cac82b90b78..e70e326b3eef9eb2c3aa7063a48c94b70909b672 100644 --- a/app/code/Magento/Dhl/etc/adminhtml/system.xml +++ b/app/code/Magento/Dhl/etc/adminhtml/system.xml @@ -165,10 +165,6 @@ <label>Debug</label> <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model> </field> - <field id="active_rma" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Enabled for RMA</label> - <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model> - </field> </group> </section> </system> diff --git a/app/code/Magento/Dhl/etc/di.xml b/app/code/Magento/Dhl/etc/di.xml index f380701bae3b91f547f2acad5e81abc63adb99ce..88fd2eda943afccee2dc0131525a391210ee5fd5 100644 --- a/app/code/Magento/Dhl/etc/di.xml +++ b/app/code/Magento/Dhl/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/Dhl/etc/module.xml b/app/code/Magento/Dhl/etc/module.xml index 90343af9783eb6ce9ac7e11f9446626d417a5037..63ad7d986951e99b0dadc2fe30d43c6b5e955cb4 100644 --- a/app/code/Magento/Dhl/etc/module.xml +++ b/app/code/Magento/Dhl/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Dhl" version="2.0.0.0" active="true"> <depends> <module name="Magento_Store"/> diff --git a/app/code/Magento/Dhl/view/adminhtml/unitofmeasure.phtml b/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml similarity index 100% rename from app/code/Magento/Dhl/view/adminhtml/unitofmeasure.phtml rename to app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml diff --git a/app/code/Magento/Dhl/view/adminhtml/logo.jpg b/app/code/Magento/Dhl/view/adminhtml/web/logo.jpg similarity index 100% rename from app/code/Magento/Dhl/view/adminhtml/logo.jpg rename to app/code/Magento/Dhl/view/adminhtml/web/logo.jpg diff --git a/app/code/Magento/Directory/Block/Data.php b/app/code/Magento/Directory/Block/Data.php index 2c44e8cb527bdda5f0f2371f0c6b2d17cf7e0756..71f2561b0832b37155c7a14dd10cbfef48ed48b4 100644 --- a/app/code/Magento/Directory/Block/Data.php +++ b/app/code/Magento/Directory/Block/Data.php @@ -131,12 +131,12 @@ class Data extends \Magento\Framework\View\Element\Template $id )->setTitle( __($title) - )->setClass( - 'validate-select' )->setValue( $defValue )->setOptions( $options + )->setExtraParams( + 'data-validate="{\'validate-select\':true}"' )->getHtml(); \Magento\Framework\Profiler::stop('TEST: ' . __METHOD__); diff --git a/app/code/Magento/Directory/etc/adminhtml/di.xml b/app/code/Magento/Directory/etc/adminhtml/di.xml index e0156340263c40b4c5d6351f33bdfbfdad9273da..36095d3aae5435e5d373a28910603801ef0050ef 100644 --- a/app/code/Magento/Directory/etc/adminhtml/di.xml +++ b/app/code/Magento/Directory/etc/adminhtml/di.xml @@ -23,5 +23,5 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> </config> diff --git a/app/code/Magento/Directory/etc/adminhtml/routes.xml b/app/code/Magento/Directory/etc/adminhtml/routes.xml index ea918debe1cfc546178e74893765e50c823bde3c..340ba3f5f0e3cfcade3c6c1419b717d9b04fe9b3 100644 --- a/app/code/Magento/Directory/etc/adminhtml/routes.xml +++ b/app/code/Magento/Directory/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="directory" frontName="directory"> <module name="Magento_Directory" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Directory/etc/di.xml b/app/code/Magento/Directory/etc/di.xml index 75b5678b86425b79d4f257ca36a18cdfb9c98bb4..830d7e7b64916083b7ecb69b4f22103bb57d668f 100644 --- a/app/code/Magento/Directory/etc/di.xml +++ b/app/code/Magento/Directory/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Directory\Model\Resource\Country\Collection" shared="false" /> <type name="Magento\Directory\Model\Currency\Import\Config"> <arguments> diff --git a/app/code/Magento/Directory/etc/frontend/routes.xml b/app/code/Magento/Directory/etc/frontend/routes.xml index d99c94d46c896f6a5a78e301cf7559eef9dbe2c2..108c166334db75631ad515b09a07b9affe9df176 100644 --- a/app/code/Magento/Directory/etc/frontend/routes.xml +++ b/app/code/Magento/Directory/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="directory" frontName="directory"> <module name="Magento_Directory" /> diff --git a/app/code/Magento/Directory/etc/module.xml b/app/code/Magento/Directory/etc/module.xml index 716e1576ac8ac432e8e7e80c93bd70e873cc4453..4ebeb70547d0e6768b038ef66cf400a3eb5a83b4 100644 --- a/app/code/Magento/Directory/etc/module.xml +++ b/app/code/Magento/Directory/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Directory" version="1.6.0.2" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Directory/view/adminhtml/js/optional_zip_countries.phtml b/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml similarity index 100% rename from app/code/Magento/Directory/view/adminhtml/js/optional_zip_countries.phtml rename to app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml diff --git a/app/code/Magento/Directory/view/frontend/currency.phtml b/app/code/Magento/Directory/view/frontend/templates/currency.phtml similarity index 100% rename from app/code/Magento/Directory/view/frontend/currency.phtml rename to app/code/Magento/Directory/view/frontend/templates/currency.phtml diff --git a/app/code/Magento/Directory/view/frontend/currency/switch.phtml b/app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml similarity index 100% rename from app/code/Magento/Directory/view/frontend/currency/switch.phtml rename to app/code/Magento/Directory/view/frontend/templates/currency/switch.phtml diff --git a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php index f775410b7f26add382312cf6c1430dd8f8ce6f1a..381fbf736304e0c3da1f600f1b58ddeefbb9a409 100644 --- a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php +++ b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit.php @@ -57,9 +57,8 @@ class Edit extends \Magento\Catalog\Controller\Adminhtml\Product */ protected function _processDownload($resource, $resourceType) { + /* @var $helper \Magento\Downloadable\Helper\Download */ $helper = $this->_objectManager->get('Magento\Downloadable\Helper\Download'); - /* @var $helper DownloadHelper */ - $helper->setResource($resource, $resourceType); $fileName = $helper->getFilename(); @@ -86,12 +85,12 @@ class Edit extends \Magento\Catalog\Controller\Adminhtml\Product } if ($contentDisposition = $helper->getContentDisposition()) { - $this->getResponse()->setHeader('Content-Disposition', $contentDisposition . '; filename=' . $fileName); + $this->getResponse() + ->setHeader('Content-Disposition', $contentDisposition . '; filename=' . $fileName); } $this->getResponse()->clearBody(); $this->getResponse()->sendHeaders(); - $helper->output(); } diff --git a/app/code/Magento/Downloadable/Model/Product/Type.php b/app/code/Magento/Downloadable/Model/Product/Type.php index 0ba029fe56b36b64cae0ef5c0cb2fc809f122bcf..d11ca2dd414222288f0c3eefa6801f5a9ac17b75 100644 --- a/app/code/Magento/Downloadable/Model/Product/Type.php +++ b/app/code/Magento/Downloadable/Model/Product/Type.php @@ -444,9 +444,9 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual { parent::beforeSave($product); if ($this->getLinkSelectionRequired($product)) { - $product->setTypeHasRequiredOptions(true); + $product->setTypeHasRequiredOptions(true)->setRequiredOptions(true); } else { - $product->setTypeHasRequiredOptions(false); + $product->setTypeHasRequiredOptions(false)->setRequiredOptions(false); } // Update links_exist attribute value diff --git a/app/code/Magento/Downloadable/etc/adminhtml/acl.xml b/app/code/Magento/Downloadable/etc/adminhtml/acl.xml index efe61b755b683892b69c43d109e44ac5dbd1b2a0..5c136bb1549b3e408ca732d49cca33b94f7a1f9d 100644 --- a/app/code/Magento/Downloadable/etc/adminhtml/acl.xml +++ b/app/code/Magento/Downloadable/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Downloadable/etc/adminhtml/di.xml b/app/code/Magento/Downloadable/etc/adminhtml/di.xml index 95f7572bc9c735021c16c07f6d7f3e7507c9a9f0..ebfbd21d65db0cbef14b6c2ad04bea36cdd65291 100644 --- a/app/code/Magento/Downloadable/etc/adminhtml/di.xml +++ b/app/code/Magento/Downloadable/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper"> <plugin name="Downloadable" type="Magento\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Downloadable" sortOrder="70" /> </type> diff --git a/app/code/Magento/Downloadable/etc/adminhtml/events.xml b/app/code/Magento/Downloadable/etc/adminhtml/events.xml index 57ef885122f09537982ca7f572ceed15c82753ff..dc7f33a76bc61e46a27e94c68b6534502c2bdc95 100644 --- a/app/code/Magento/Downloadable/etc/adminhtml/events.xml +++ b/app/code/Magento/Downloadable/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_order_item_save_commit_after"> <observer name="downloadable_observer" instance="Magento\Downloadable\Model\Observer" method="saveDownloadableOrderItem" /> </event> diff --git a/app/code/Magento/Downloadable/etc/adminhtml/routes.xml b/app/code/Magento/Downloadable/etc/adminhtml/routes.xml index 003e8b0494027a25f35b8f17dd81dfec366bc32a..d9206c792b0544308b64129a722c21d7459e59e7 100644 --- a/app/code/Magento/Downloadable/etc/adminhtml/routes.xml +++ b/app/code/Magento/Downloadable/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Downloadable" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Downloadable/etc/di.xml b/app/code/Magento/Downloadable/etc/di.xml index f2a15bf24b2f54605e9a226a97a5448c748f1293..8d51abb5b4681e1cc34f8e484eefb735d898164f 100644 --- a/app/code/Magento/Downloadable/etc/di.xml +++ b/app/code/Magento/Downloadable/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Downloadable\Helper\Download"> <arguments> <argument name="coreFileStorageDb" xsi:type="object">Magento\Core\Helper\File\Storage\Database\Proxy</argument> diff --git a/app/code/Magento/Downloadable/etc/fieldset.xml b/app/code/Magento/Downloadable/etc/fieldset.xml index c585f3cf1137717671457efa12fb78e08025ec3a..56dbeb6ad34168f51d037ffffbda03431cd74548 100644 --- a/app/code/Magento/Downloadable/etc/fieldset.xml +++ b/app/code/Magento/Downloadable/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="downloadable_sales_copy_order"> <field name="entity_id"> diff --git a/app/code/Magento/Downloadable/etc/frontend/di.xml b/app/code/Magento/Downloadable/etc/frontend/di.xml index de3bc16ad50c2cf6264928cfc24cdcc6cb30e974..1d08e3f9774dfb57cb30228ad6f376349fc6a051 100644 --- a/app/code/Magento/Downloadable/etc/frontend/di.xml +++ b/app/code/Magento/Downloadable/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Core\Model\Url\SecurityInfo"> <arguments> <argument name="secureUrlList" xsi:type="array"> diff --git a/app/code/Magento/Downloadable/etc/frontend/events.xml b/app/code/Magento/Downloadable/etc/frontend/events.xml index 5cad8d700c862ae31757deed9d091dd8f516bde2..a986769e40b0b785f63baa4840698aed2832f284 100644 --- a/app/code/Magento/Downloadable/etc/frontend/events.xml +++ b/app/code/Magento/Downloadable/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_order_item_save_commit_after"> <observer name="downloadable_observer" instance="Magento\Downloadable\Model\Observer" method="saveDownloadableOrderItem" /> </event> diff --git a/app/code/Magento/Downloadable/etc/frontend/routes.xml b/app/code/Magento/Downloadable/etc/frontend/routes.xml index baa62f4d101625a106bfbbfa6498d34372c4a916..a4da4ed84d7dd35bc4eb33702fa8f0d26d88d4ba 100644 --- a/app/code/Magento/Downloadable/etc/frontend/routes.xml +++ b/app/code/Magento/Downloadable/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="downloadable" frontName="downloadable"> <module name="Magento_Downloadable" /> diff --git a/app/code/Magento/Downloadable/etc/module.xml b/app/code/Magento/Downloadable/etc/module.xml index 0c0c55011336bebaab8d207697ff254485f88da4..be2513d638dc546bd14862f038ee2657aa65088e 100644 --- a/app/code/Magento/Downloadable/etc/module.xml +++ b/app/code/Magento/Downloadable/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Downloadable" version="1.6.0.0.3" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Downloadable/view/adminhtml/product/composite/fieldset/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/product/composite/fieldset/downloadable.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/product/composite/fieldset/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable/links.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable/links.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable/samples.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable/samples.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/creditmemo/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/creditmemo/name.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/invoice/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/invoice/name.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/items/column/downloadable/name.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/order/creditmemo/create/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/creditmemo/create/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/order/creditmemo/create/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/creditmemo/create/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/order/creditmemo/view/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/creditmemo/view/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/order/creditmemo/view/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/creditmemo/view/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/order/invoice/create/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/invoice/create/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/order/invoice/create/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/invoice/create/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/order/invoice/view/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/invoice/view/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/order/invoice/view/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/invoice/view/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/sales/order/view/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/view/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/sales/order/view/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/adminhtml/templates/sales/order/view/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/adminhtml/product/validation-rules.js b/app/code/Magento/Downloadable/view/adminhtml/web/product/validation-rules.js similarity index 100% rename from app/code/Magento/Downloadable/view/adminhtml/product/validation-rules.js rename to app/code/Magento/Downloadable/view/adminhtml/web/product/validation-rules.js diff --git a/app/code/Magento/Downloadable/view/frontend/layout/checkout_cart_item_renderers.xml b/app/code/Magento/Downloadable/view/frontend/layout/checkout_cart_item_renderers.xml index 89e30b023d0d65354516f03f83df5e1c916cfd4d..2726f51099300b071ec2d0496eb05cb5f548ade3 100644 --- a/app/code/Magento/Downloadable/view/frontend/layout/checkout_cart_item_renderers.xml +++ b/app/code/Magento/Downloadable/view/frontend/layout/checkout_cart_item_renderers.xml @@ -28,6 +28,6 @@ <block class="Magento\Downloadable\Block\Checkout\Cart\Item\Renderer" as="downloadable" template="checkout/cart/item/default.phtml"/> </referenceBlock> <referenceBlock name="additional.product.info"> - <block class="Magento\Framework\View\Element\Template" name="downloadable.product.links" template="checkout/links.phtml"/> + <block class="Magento\Framework\View\Element\Template" name="downloadable.product.links" template="Magento_Downloadable::checkout/links.phtml"/> </referenceBlock> </layout> diff --git a/app/code/Magento/Downloadable/view/frontend/catalog/product/links.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/catalog/product/links.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/catalog/product/samples.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/samples.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/catalog/product/samples.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/catalog/product/samples.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/catalog/product/type.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/catalog/product/type.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/checkout/cart/item/default.phtml b/app/code/Magento/Downloadable/view/frontend/templates/checkout/cart/item/default.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/checkout/cart/item/default.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/checkout/cart/item/default.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/checkout/links.phtml b/app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/checkout/links.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/checkout/links.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/checkout/success.phtml b/app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/checkout/success.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/checkout/success.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/customer/products/list.phtml b/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/customer/products/list.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/email/order/items/creditmemo/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/creditmemo/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/email/order/items/creditmemo/downloadable.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/email/order/items/creditmemo/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/email/order/items/invoice/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/invoice/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/email/order/items/invoice/downloadable.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/email/order/items/invoice/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/email/order/items/order/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/email/order/items/order/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/email/order/items/order/downloadable.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/email/order/items/order/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/js/components.phtml b/app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/js/components.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/creditmemo/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/sales/order/creditmemo/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/sales/order/creditmemo/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/sales/order/invoice/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/invoice/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/sales/order/invoice/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/sales/order/invoice/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/sales/order/items/renderer/downloadable.phtml b/app/code/Magento/Downloadable/view/frontend/templates/sales/order/items/renderer/downloadable.phtml similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/sales/order/items/renderer/downloadable.phtml rename to app/code/Magento/Downloadable/view/frontend/templates/sales/order/items/renderer/downloadable.phtml diff --git a/app/code/Magento/Downloadable/view/frontend/downloadable.js b/app/code/Magento/Downloadable/view/frontend/web/downloadable.js similarity index 100% rename from app/code/Magento/Downloadable/view/frontend/downloadable.js rename to app/code/Magento/Downloadable/view/frontend/web/downloadable.js diff --git a/app/code/Magento/Eav/etc/cache.xml b/app/code/Magento/Eav/etc/cache.xml index 7a66b6723ffc41653ed53cb0cbafd823d76141b0..0fcbf556a825ae5954215f88fbcc67ce173a6f59 100644 --- a/app/code/Magento/Eav/etc/cache.xml +++ b/app/code/Magento/Eav/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="eav" translate="label,description" instance="Magento\Eav\Model\Cache\Type"> <label>EAV types and attributes</label> <description>Entity types declaration cache.</description> diff --git a/app/code/Magento/Eav/etc/di.xml b/app/code/Magento/Eav/etc/di.xml index 9011b7b9085da4c4c63cb244b4c7e022d1657a80..4fb09a1fc82365ca6d5266b711efb9ec2f1909ec 100644 --- a/app/code/Magento/Eav/etc/di.xml +++ b/app/code/Magento/Eav/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Eav\Model\Entity\Setup\PropertyMapperInterface" type="Magento\Eav\Model\Entity\Setup\PropertyMapper\Composite" /> <type name="Magento\Eav\Model\Resource\Helper"> <arguments> diff --git a/app/code/Magento/Eav/etc/module.xml b/app/code/Magento/Eav/etc/module.xml index 8da83443c593e164b0623a809c841ce19042e7cf..d20dbc8669df9abf7c77b377afb9ec0b10219f8b 100644 --- a/app/code/Magento/Eav/etc/module.xml +++ b/app/code/Magento/Eav/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Eav" version="1.6.0.2" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Eav/etc/validation.xml b/app/code/Magento/Eav/etc/validation.xml index c9c396437919f37573a0a1d43469fa7a9d24731d..2849b5356dc57b976545f00ec0c1e53912944c32 100644 --- a/app/code/Magento/Eav/etc/validation.xml +++ b/app/code/Magento/Eav/etc/validation.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="eav_entity"> <rules> <rule name="eav_attribute_data"> diff --git a/app/code/Magento/Eav/view/adminhtml/attribute/edit/js.phtml b/app/code/Magento/Eav/view/adminhtml/templates/attribute/edit/js.phtml similarity index 100% rename from app/code/Magento/Eav/view/adminhtml/attribute/edit/js.phtml rename to app/code/Magento/Eav/view/adminhtml/templates/attribute/edit/js.phtml diff --git a/app/code/Magento/Email/Model/BackendTemplate.php b/app/code/Magento/Email/Model/BackendTemplate.php index 37c762a3ae68127ba6b4404734c1b377f51d6c88..e55cfd3270d9b8752a45b4408e50ba2424242faf 100644 --- a/app/code/Magento/Email/Model/BackendTemplate.php +++ b/app/code/Magento/Email/Model/BackendTemplate.php @@ -42,7 +42,7 @@ class BackendTemplate extends Template * @param \Magento\Core\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\FileSystem $viewFileSystem * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Email\Model\Template\FilterFactory $emailFilterFactory @@ -59,7 +59,7 @@ class BackendTemplate extends Template \Magento\Core\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Email\Model\Template\FilterFactory $emailFilterFactory, @@ -74,7 +74,7 @@ class BackendTemplate extends Template $appEmulation, $storeManager, $filesystem, - $viewUrl, + $assetRepo, $viewFileSystem, $scopeConfig, $emailFilterFactory, diff --git a/app/code/Magento/Email/Model/Template.php b/app/code/Magento/Email/Model/Template.php index a45076dae31517fe5f5dd105c6992e115b3cdca6..2557b3263ee05e37a4290ca5e6d9f00dd37c635c 100644 --- a/app/code/Magento/Email/Model/Template.php +++ b/app/code/Magento/Email/Model/Template.php @@ -140,9 +140,9 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento protected $_filesystem; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Framework\View\FileSystem @@ -177,7 +177,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento * @param \Magento\Core\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\FileSystem $viewFileSystem * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param Template\FilterFactory $emailFilterFactory @@ -193,7 +193,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento \Magento\Core\Model\App\Emulation $appEmulation, StoreManagerInterface $storeManager, \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Email\Model\Template\FilterFactory $emailFilterFactory, @@ -202,7 +202,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento ) { $this->_scopeConfig = $scopeConfig; $this->_filesystem = $filesystem; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_viewFileSystem = $viewFileSystem; $this->_emailFilterFactory = $emailFilterFactory; $this->_emailConfig = $emailConfig; @@ -252,7 +252,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento */ public function getDefaultEmailLogo() { - return $this->_viewUrl->getViewFileUrl( + return $this->_assetRepo->getUrlWithParams( 'Magento_Email::logo_email.gif', array('area' => \Magento\Framework\App\Area::AREA_FRONTEND) ); diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php index 2844c2e671e7650736cb5a3f42d8372c9606ecc2..9a183ff687bed88506ff46b69eabc143702ab894 100644 --- a/app/code/Magento/Email/Model/Template/Filter.php +++ b/app/code/Magento/Email/Model/Template/Filter.php @@ -65,9 +65,9 @@ class Filter extends \Magento\Framework\Filter\Template protected $_plainTemplateMode = false; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Framework\Logger @@ -132,7 +132,7 @@ class Filter extends \Magento\Framework\Filter\Template * @param \Magento\Framework\Stdlib\String $string * @param \Magento\Framework\Logger $logger * @param \Magento\Framework\Escaper $escaper - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Core\Model\VariableFactory $coreVariableFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager @@ -148,7 +148,7 @@ class Filter extends \Magento\Framework\Filter\Template \Magento\Framework\Stdlib\String $string, \Magento\Framework\Logger $logger, \Magento\Framework\Escaper $escaper, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Core\Model\VariableFactory $coreVariableFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, @@ -159,7 +159,7 @@ class Filter extends \Magento\Framework\Filter\Template $variables = array() ) { $this->_escaper = $escaper; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_logger = $logger; $this->_scopeConfig = $scopeConfig; $this->_modifiers['escape'] = array($this, 'modifierEscape'); @@ -367,7 +367,7 @@ class Filter extends \Magento\Framework\Filter\Template public function viewDirective($construction) { $params = $this->_getIncludeParameters($construction[2]); - $url = $this->_viewUrl->getViewFileUrl($params['url'], $params); + $url = $this->_assetRepo->getUrlWithParams($params['url'], $params); return $url; } diff --git a/app/code/Magento/Email/etc/adminhtml/acl.xml b/app/code/Magento/Email/etc/adminhtml/acl.xml index efd29cb1bfbdb32185a5b9a966e4304072dd8d7c..46699dfcc8feed729ede95e5120084a0edfd24ff 100644 --- a/app/code/Magento/Email/etc/adminhtml/acl.xml +++ b/app/code/Magento/Email/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Email/etc/adminhtml/routes.xml b/app/code/Magento/Email/etc/adminhtml/routes.xml index d7931e911a28327fde81fe10a7e4f263894ab51d..e24b968e468c424f2abbced829cf88f5f7445b00 100644 --- a/app/code/Magento/Email/etc/adminhtml/routes.xml +++ b/app/code/Magento/Email/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Email" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Email/etc/di.xml b/app/code/Magento/Email/etc/di.xml index 2109ac2366390007cd922c3c75b36446b79a94eb..81a29481e144d6e8bd6de4ad4b43772d019fa692 100644 --- a/app/code/Magento/Email/etc/di.xml +++ b/app/code/Magento/Email/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Mail\TemplateInterface" type="Magento\Email\Model\Template" /> <preference for="Magento\Framework\Mail\Template\FactoryInterface" type="Magento\Framework\Mail\Template\Factory" /> <preference for="Magento\Framework\Mail\TransportInterface" type="Magento\Framework\Mail\Transport" /> diff --git a/app/code/Magento/Email/etc/module.xml b/app/code/Magento/Email/etc/module.xml index 1081b997f64b4ed1d72f98f9a4023fc6a178672c..a6e229044674cbf6c859fe9246dac2af477bc3a8 100644 --- a/app/code/Magento/Email/etc/module.xml +++ b/app/code/Magento/Email/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Email" version="1.0.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Email/view/adminhtml/template/edit.phtml b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml similarity index 100% rename from app/code/Magento/Email/view/adminhtml/template/edit.phtml rename to app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml diff --git a/app/code/Magento/Email/view/adminhtml/template/list.phtml b/app/code/Magento/Email/view/adminhtml/templates/template/list.phtml similarity index 100% rename from app/code/Magento/Email/view/adminhtml/template/list.phtml rename to app/code/Magento/Email/view/adminhtml/templates/template/list.phtml diff --git a/app/code/Magento/Email/view/adminhtml/template/preview.phtml b/app/code/Magento/Email/view/adminhtml/templates/template/preview.phtml similarity index 100% rename from app/code/Magento/Email/view/adminhtml/template/preview.phtml rename to app/code/Magento/Email/view/adminhtml/templates/template/preview.phtml diff --git a/app/code/Magento/Email/view/frontend/logo_email.gif b/app/code/Magento/Email/view/frontend/web/logo_email.gif similarity index 100% rename from app/code/Magento/Email/view/frontend/logo_email.gif rename to app/code/Magento/Email/view/frontend/web/logo_email.gif diff --git a/app/code/Magento/Fedex/Model/Carrier.php b/app/code/Magento/Fedex/Model/Carrier.php index e3bbade581144e65760d966551947d0a133a112a..2b1a595d3f397be2c806a24451d6e238dc1306d0 100644 --- a/app/code/Magento/Fedex/Model/Carrier.php +++ b/app/code/Magento/Fedex/Model/Carrier.php @@ -69,13 +69,6 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C */ protected $_request = null; - /** - * Raw rate request data - * - * @var \Magento\Framework\Object|null - */ - protected $_rawRequest = null; - /** * Rate result data * @@ -351,7 +344,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C $r->setBaseSubtotalInclTax($request->getBaseSubtotalInclTax()); - $this->_rawRequest = $r; + $this->setRawRequest($r); return $this; } diff --git a/app/code/Magento/Fedex/etc/adminhtml/system.xml b/app/code/Magento/Fedex/etc/adminhtml/system.xml index b992af4f5c0d5873c6b469d9e57b97758c9c8585..c718b28fad57e886abba7e50421ee657787545b0 100644 --- a/app/code/Magento/Fedex/etc/adminhtml/system.xml +++ b/app/code/Magento/Fedex/etc/adminhtml/system.xml @@ -32,10 +32,6 @@ <label>Enabled for Checkout</label> <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model> </field> - <field id="active_rma" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Enabled for RMA</label> - <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model> - </field> <field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Title</label> </field> diff --git a/app/code/Magento/Fedex/etc/di.xml b/app/code/Magento/Fedex/etc/di.xml index e32e20fbec94b9844843141879b61e327939cf7e..e3936c559b9bbba7ab5885413324adac8ef23774 100644 --- a/app/code/Magento/Fedex/etc/di.xml +++ b/app/code/Magento/Fedex/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shippingmethod"> <plugin name="rma_tab_shippingmethod_fedex" type="Magento\Fedex\Model\Plugin\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shippingmethod"/> diff --git a/app/code/Magento/Fedex/etc/module.xml b/app/code/Magento/Fedex/etc/module.xml index 97f2db612d22742cf892375a26d9ca745293c257..f335996dc1926ee309cbb6fc4c627694142dc43d 100644 --- a/app/code/Magento/Fedex/etc/module.xml +++ b/app/code/Magento/Fedex/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Fedex" version="2.0.0.0" active="true"> <depends> <module name="Magento_Store"/> diff --git a/app/code/Magento/GiftMessage/etc/adminhtml/di.xml b/app/code/Magento/GiftMessage/etc/adminhtml/di.xml index 56936b939329a65c4ab54ac099740a667e09de3d..14dc1ab9c5c8ee3e9950d1dc9af979bfb706e1b2 100644 --- a/app/code/Magento/GiftMessage/etc/adminhtml/di.xml +++ b/app/code/Magento/GiftMessage/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\GiftMessage\Model\Plugin\QuoteItem" shared="false" /> <type name="Magento\Sales\Model\Convert\Quote"> <plugin name="gift_message_quote_item_conversion" type="Magento\GiftMessage\Model\Plugin\QuoteItem"/> diff --git a/app/code/Magento/GiftMessage/etc/adminhtml/events.xml b/app/code/Magento/GiftMessage/etc/adminhtml/events.xml index c431a91abfabc0383b472390f0fd7e60156d94a7..6fa2b3cb2aa0877dd46bc93388045c57327a4961 100644 --- a/app/code/Magento/GiftMessage/etc/adminhtml/events.xml +++ b/app/code/Magento/GiftMessage/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_convert_quote_address_to_order"> <observer name="giftmessage" instance="Magento\GiftMessage\Model\Observer" method="salesEventConvertQuoteAddressToOrder" shared="false" /> </event> diff --git a/app/code/Magento/GiftMessage/etc/di.xml b/app/code/Magento/GiftMessage/etc/di.xml index 569a6c232cf475127a311e33d6c563510f43bfc1..dfd24e2665603429d6adb98db839e082a96df494 100644 --- a/app/code/Magento/GiftMessage/etc/di.xml +++ b/app/code/Magento/GiftMessage/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/GiftMessage/etc/frontend/di.xml b/app/code/Magento/GiftMessage/etc/frontend/di.xml index 98ce815dbc655267b58de340254572eefcc2a934..6cf4118eb473b934db6289dc15a8a516629a56be 100644 --- a/app/code/Magento/GiftMessage/etc/frontend/di.xml +++ b/app/code/Magento/GiftMessage/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\GiftMessage\Model\Plugin\QuoteItem" shared="false" /> <type name="Magento\Sales\Model\Convert\Quote"> <plugin name="gift_message_quote_item_conversion" type="Magento\GiftMessage\Model\Plugin\QuoteItem"/> diff --git a/app/code/Magento/GiftMessage/etc/frontend/events.xml b/app/code/Magento/GiftMessage/etc/frontend/events.xml index 4874cc5fcd884b56a8dff798d0989804b54fc163..9fa15733eeefce49eda7f1cab4818aba261f76e4 100644 --- a/app/code/Magento/GiftMessage/etc/frontend/events.xml +++ b/app/code/Magento/GiftMessage/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_convert_quote_address_to_order"> <observer name="giftmessage" instance="Magento\GiftMessage\Model\Observer" method="salesEventConvertQuoteAddressToOrder" shared="false" /> </event> diff --git a/app/code/Magento/GiftMessage/etc/frontend/routes.xml b/app/code/Magento/GiftMessage/etc/frontend/routes.xml index bcdce1fc1f60f2c9bd90f1b9944c663db1d1d517..5d0cec3b51cc6474ff8406b71ed5d8ea7527df56 100644 --- a/app/code/Magento/GiftMessage/etc/frontend/routes.xml +++ b/app/code/Magento/GiftMessage/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="giftmessage" frontName="giftmessage"> <module name="Magento_GiftMessage" /> diff --git a/app/code/Magento/GiftMessage/etc/module.xml b/app/code/Magento/GiftMessage/etc/module.xml index 754052d2196fa64f9a1c468819546edb10c619fb..9dd4428274f6590eacdad09f80b8a31bc9e6c60c 100644 --- a/app/code/Magento/GiftMessage/etc/module.xml +++ b/app/code/Magento/GiftMessage/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_GiftMessage" version="1.6.0.1" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/GiftMessage/view/adminhtml/giftoptionsform.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml similarity index 100% rename from app/code/Magento/GiftMessage/view/adminhtml/giftoptionsform.phtml rename to app/code/Magento/GiftMessage/view/adminhtml/templates/giftoptionsform.phtml diff --git a/app/code/Magento/GiftMessage/view/adminhtml/popup.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml similarity index 100% rename from app/code/Magento/GiftMessage/view/adminhtml/popup.phtml rename to app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml diff --git a/app/code/Magento/GiftMessage/view/adminhtml/sales/order/create/giftoptions.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml similarity index 100% rename from app/code/Magento/GiftMessage/view/adminhtml/sales/order/create/giftoptions.phtml rename to app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml diff --git a/app/code/Magento/GiftMessage/view/adminhtml/sales/order/create/items.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/items.phtml similarity index 100% rename from app/code/Magento/GiftMessage/view/adminhtml/sales/order/create/items.phtml rename to app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/items.phtml diff --git a/app/code/Magento/GiftMessage/view/adminhtml/sales/order/view/giftoptions.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml similarity index 100% rename from app/code/Magento/GiftMessage/view/adminhtml/sales/order/view/giftoptions.phtml rename to app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml diff --git a/app/code/Magento/GiftMessage/view/adminhtml/sales/order/view/items.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/items.phtml similarity index 100% rename from app/code/Magento/GiftMessage/view/adminhtml/sales/order/view/items.phtml rename to app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/items.phtml diff --git a/app/code/Magento/GiftMessage/view/frontend/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml similarity index 100% rename from app/code/Magento/GiftMessage/view/frontend/inline.phtml rename to app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml diff --git a/app/code/Magento/GiftMessage/view/frontend/extra-options.js b/app/code/Magento/GiftMessage/view/frontend/web/extra-options.js similarity index 100% rename from app/code/Magento/GiftMessage/view/frontend/extra-options.js rename to app/code/Magento/GiftMessage/view/frontend/web/extra-options.js diff --git a/app/code/Magento/GiftMessage/view/frontend/gift-options.js b/app/code/Magento/GiftMessage/view/frontend/web/gift-options.js similarity index 100% rename from app/code/Magento/GiftMessage/view/frontend/gift-options.js rename to app/code/Magento/GiftMessage/view/frontend/web/gift-options.js diff --git a/app/code/Magento/GoogleAdwords/etc/frontend/events.xml b/app/code/Magento/GoogleAdwords/etc/frontend/events.xml index 4f8dd587191076dffac16be64f6e97d5d1faf23d..c5c9b1ae62dc0cabf5e9509967db5e963ff57de7 100644 --- a/app/code/Magento/GoogleAdwords/etc/frontend/events.xml +++ b/app/code/Magento/GoogleAdwords/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="checkout_onepage_controller_success_action"> <observer name="googleadwords_order_success" instance="Magento\GoogleAdwords\Model\Observer" method="setConversionValue" /> </event> diff --git a/app/code/Magento/GoogleAdwords/etc/module.xml b/app/code/Magento/GoogleAdwords/etc/module.xml index de40566f1dca16acd251ab850d785a7d71bfaaa2..ca5ea54fe48c1d194b59a70a2f169fabb7da421a 100644 --- a/app/code/Magento/GoogleAdwords/etc/module.xml +++ b/app/code/Magento/GoogleAdwords/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_GoogleAdwords" version="2.0.0.0" active="true"> <sequence> <module name="Magento_Checkout"/> diff --git a/app/code/Magento/GoogleAdwords/view/frontend/code.phtml b/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml similarity index 100% rename from app/code/Magento/GoogleAdwords/view/frontend/code.phtml rename to app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml diff --git a/app/code/Magento/GoogleAnalytics/etc/adminhtml/acl.xml b/app/code/Magento/GoogleAnalytics/etc/adminhtml/acl.xml index 4bf8d2b1f7815413a359cfedb0193a00de2832c0..7354a089cf21e6343206d5cc07f04e8ed34900f6 100644 --- a/app/code/Magento/GoogleAnalytics/etc/adminhtml/acl.xml +++ b/app/code/Magento/GoogleAnalytics/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/GoogleAnalytics/etc/di.xml b/app/code/Magento/GoogleAnalytics/etc/di.xml index 56afe67cba0e38d13c836183b1ddb24c04a66e7c..43d7fccff817b730df1d2aaebe079af0db45defb 100644 --- a/app/code/Magento/GoogleAnalytics/etc/di.xml +++ b/app/code/Magento/GoogleAnalytics/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Setup\Migration"> <arguments> <argument name="compositeModules" xsi:type="array"> diff --git a/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml b/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml index 448785e53e61880415e75f01e9d4e436e3a745b7..f733092ff8be870a9dbe85ada26670d98fc20784 100644 --- a/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml +++ b/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="checkout_onepage_controller_success_action"> <observer name="googleanalytics_order_success" instance="Magento\GoogleAnalytics\Model\Observer" method="setGoogleAnalyticsOnOrderSuccessPageView" /> </event> diff --git a/app/code/Magento/GoogleAnalytics/etc/module.xml b/app/code/Magento/GoogleAnalytics/etc/module.xml index 63114d145f5d926e560c6c58cdfec54a712a0de7..3f2b5f92209c1e701a81486874600241a8665d90 100644 --- a/app/code/Magento/GoogleAnalytics/etc/module.xml +++ b/app/code/Magento/GoogleAnalytics/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_GoogleAnalytics" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/GoogleAnalytics/view/frontend/ga.phtml b/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml similarity index 100% rename from app/code/Magento/GoogleAnalytics/view/frontend/ga.phtml rename to app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml diff --git a/app/code/Magento/GoogleOptimizer/etc/events.xml b/app/code/Magento/GoogleOptimizer/etc/events.xml index 148f61f5b57cabb1653ac2630970d02ddf1ebe45..1607806176e8e0fb35c6160a524850debdb4b563 100644 --- a/app/code/Magento/GoogleOptimizer/etc/events.xml +++ b/app/code/Magento/GoogleOptimizer/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_save_after"> <observer name="googleoptimizer_observer" instance="Magento\GoogleOptimizer\Model\Observer\Product\Save" method="saveGoogleExperimentScript" /> </event> diff --git a/app/code/Magento/GoogleOptimizer/etc/module.xml b/app/code/Magento/GoogleOptimizer/etc/module.xml index 239f34674e663487a169badcb5b3ff1e2f56aa42..8db326345d6efb333b3c29391e8c79a325b1abcc 100644 --- a/app/code/Magento/GoogleOptimizer/etc/module.xml +++ b/app/code/Magento/GoogleOptimizer/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_GoogleOptimizer" version="2.0.0.0" active="true"> <sequence> <module name="Magento_GoogleAnalytics"/> diff --git a/app/code/Magento/GoogleShopping/etc/adminhtml/acl.xml b/app/code/Magento/GoogleShopping/etc/adminhtml/acl.xml index 9a808164a055b00567b8c6f93ffee6afb73c16f1..965d797ebb1af58f3e58ee15977c97d3fbbd6d74 100644 --- a/app/code/Magento/GoogleShopping/etc/adminhtml/acl.xml +++ b/app/code/Magento/GoogleShopping/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/GoogleShopping/etc/adminhtml/di.xml b/app/code/Magento/GoogleShopping/etc/adminhtml/di.xml index 39be97bd30d666293194b0368b2cc3d21d9a3dd5..d6a6e611bc6a5b916d283640e533ef7a6b8a7961 100644 --- a/app/code/Magento/GoogleShopping/etc/adminhtml/di.xml +++ b/app/code/Magento/GoogleShopping/etc/adminhtml/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Session\SessionManagerInterface" type="Magento\Backend\Model\Session" /> </config> diff --git a/app/code/Magento/GoogleShopping/etc/adminhtml/events.xml b/app/code/Magento/GoogleShopping/etc/adminhtml/events.xml index 2343913c82063390c0bbb8b362241bfb38466147..f10715e501ee888f41b11e1978b9fc0b5c83d077 100644 --- a/app/code/Magento/GoogleShopping/etc/adminhtml/events.xml +++ b/app/code/Magento/GoogleShopping/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_save_after"> <observer name="googleshopping_observer" instance="Magento\GoogleShopping\Model\Observer" method="saveProductItem" /> </event> diff --git a/app/code/Magento/GoogleShopping/etc/adminhtml/routes.xml b/app/code/Magento/GoogleShopping/etc/adminhtml/routes.xml index 4063e8ba147bea0320e2a698b8951977b61bb906..4e5bd7c43e6b7ad964c149796b7d0c208da22a16 100644 --- a/app/code/Magento/GoogleShopping/etc/adminhtml/routes.xml +++ b/app/code/Magento/GoogleShopping/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_GoogleShopping" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/GoogleShopping/etc/di.xml b/app/code/Magento/GoogleShopping/etc/di.xml index a8bda028cf9ec673a7861a2d500f0350502d824f..fa22706224eb28c045c9959d1709546264351bbe 100644 --- a/app/code/Magento/GoogleShopping/etc/di.xml +++ b/app/code/Magento/GoogleShopping/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\GoogleShopping\Model\Resource\Helper" type="Magento\Framework\DB\Helper"> <arguments> <argument name="modulePrefix" xsi:type="string">Core</argument> diff --git a/app/code/Magento/GoogleShopping/etc/module.xml b/app/code/Magento/GoogleShopping/etc/module.xml index 996643bf8dfb58ab2f92162faf973a97c41db99c..75d213e2b0b3c902056ce94724deba2364618d13 100644 --- a/app/code/Magento/GoogleShopping/etc/module.xml +++ b/app/code/Magento/GoogleShopping/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_GoogleShopping" version="1.6.0.0.1" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/captcha.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml similarity index 100% rename from app/code/Magento/GoogleShopping/view/adminhtml/captcha.phtml rename to app/code/Magento/GoogleShopping/view/adminhtml/templates/captcha.phtml diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/items.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/items.phtml similarity index 100% rename from app/code/Magento/GoogleShopping/view/adminhtml/items.phtml rename to app/code/Magento/GoogleShopping/view/adminhtml/templates/items.phtml diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/types/edit.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml similarity index 100% rename from app/code/Magento/GoogleShopping/view/adminhtml/types/edit.phtml rename to app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit.phtml diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/types/edit/attributes.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml similarity index 100% rename from app/code/Magento/GoogleShopping/view/adminhtml/types/edit/attributes.phtml rename to app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/types/edit/select.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/select.phtml similarity index 100% rename from app/code/Magento/GoogleShopping/view/adminhtml/types/edit/select.phtml rename to app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/select.phtml diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/googleshopping.js b/app/code/Magento/GoogleShopping/view/adminhtml/web/googleshopping.js similarity index 100% rename from app/code/Magento/GoogleShopping/view/adminhtml/googleshopping.js rename to app/code/Magento/GoogleShopping/view/adminhtml/web/googleshopping.js diff --git a/app/code/Magento/GroupedProduct/etc/adminhtml/di.xml b/app/code/Magento/GroupedProduct/etc/adminhtml/di.xml index 37da17e5575c38c46fa5df7c6511500c60448683..dbc58b6bf1e901659b28e745506904bad8288e0c 100644 --- a/app/code/Magento/GroupedProduct/etc/adminhtml/di.xml +++ b/app/code/Magento/GroupedProduct/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\GroupedProduct\Model\Product\Type\Grouped" type="Magento\GroupedProduct\Model\Product\Type\Grouped\Backend" /> <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks"> <plugin name="GroupedProduct" type="Magento\GroupedProduct\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks\Plugin\Grouped" /> diff --git a/app/code/Magento/GroupedProduct/etc/adminhtml/routes.xml b/app/code/Magento/GroupedProduct/etc/adminhtml/routes.xml index ec0956b0947ae7a0dc8b660727e8fad4d80abccb..9fbc9f85d3b9cc071cde7bba01072ad630f6b8a9 100644 --- a/app/code/Magento/GroupedProduct/etc/adminhtml/routes.xml +++ b/app/code/Magento/GroupedProduct/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="groupedProduct" frontName="groupedProduct"> <module name="Magento_GroupedProduct" /> diff --git a/app/code/Magento/GroupedProduct/etc/di.xml b/app/code/Magento/GroupedProduct/etc/di.xml index fc518ce0a0e36a8c540c799c35ef35fac217f937..f708f1943bfaae9454b530be97c87f1b90ba5d0c 100644 --- a/app/code/Magento/GroupedProduct/etc/di.xml +++ b/app/code/Magento/GroupedProduct/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/GroupedProduct/etc/module.xml b/app/code/Magento/GroupedProduct/etc/module.xml index 9e9b5101e2a9365d5a71a749bf432a30cb0ef085..f4d35a7d072f160a388ff56b62b7c170565a45aa 100644 --- a/app/code/Magento/GroupedProduct/etc/module.xml +++ b/app/code/Magento/GroupedProduct/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_GroupedProduct" version="0.0.1" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml rename to app/code/Magento/GroupedProduct/view/adminhtml/templates/catalog/product/composite/fieldset/grouped.phtml diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/container.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/container.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/container.phtml rename to app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/container.phtml diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/grouped.phtml rename to app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/grouped.phtml diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/list.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/list.phtml rename to app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/product/stock/disabler.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/stock/disabler.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/adminhtml/product/stock/disabler.phtml rename to app/code/Magento/GroupedProduct/view/adminhtml/templates/product/stock/disabler.phtml diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/css/grouped-product.css b/app/code/Magento/GroupedProduct/view/adminhtml/web/css/grouped-product.css similarity index 100% rename from app/code/Magento/GroupedProduct/view/adminhtml/css/grouped-product.css rename to app/code/Magento/GroupedProduct/view/adminhtml/web/css/grouped-product.css diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/js/grouped-product.js b/app/code/Magento/GroupedProduct/view/adminhtml/web/js/grouped-product.js similarity index 100% rename from app/code/Magento/GroupedProduct/view/adminhtml/js/grouped-product.js rename to app/code/Magento/GroupedProduct/view/adminhtml/web/js/grouped-product.js diff --git a/app/code/Magento/GroupedProduct/view/base/product/price/final_price.phtml b/app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/base/product/price/final_price.phtml rename to app/code/Magento/GroupedProduct/view/base/templates/product/price/final_price.phtml diff --git a/app/code/Magento/GroupedProduct/view/frontend/product/price.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/price.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/frontend/product/price.phtml rename to app/code/Magento/GroupedProduct/view/frontend/templates/product/price.phtml diff --git a/app/code/Magento/GroupedProduct/view/frontend/product/view/type/grouped.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/frontend/product/view/type/grouped.phtml rename to app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml diff --git a/app/code/Magento/GroupedProduct/view/frontend/rss/product/price.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/rss/product/price.phtml similarity index 100% rename from app/code/Magento/GroupedProduct/view/frontend/rss/product/price.phtml rename to app/code/Magento/GroupedProduct/view/frontend/templates/rss/product/price.phtml diff --git a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php index 2354819249d21cb6b3b3b591da898b946cf1b730..ffbde767b70ed0d929d3793d32dd72fbbf8e56b0 100644 --- a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php +++ b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php @@ -241,6 +241,13 @@ abstract class AbstractEntity */ protected $_bunchSize; + /** + * Code of a primary attribute which identifies the entity group if import contains of multiple rows + * + * @var string + */ + protected $masterAttributeCode; + /** * Core store config * @@ -335,22 +342,26 @@ abstract class AbstractEntity protected function _saveValidatedBunches() { $source = $this->getSource(); - $processedDataSize = 0; $bunchRows = array(); $startNewBunch = false; - $nextRowBackup = array(); $source->rewind(); $this->_dataSourceModel->cleanBunches(); + $masterAttributeCode = $this->getMasterAttributeCode(); - while ($source->valid() || $bunchRows) { + while ($source->valid() || count($bunchRows) || isset($entityGroup)) { if ($startNewBunch || !$source->valid()) { + /* If the end approached add last validated entity group to the bunch */ + if (!$source->valid() && isset($entityGroup)) { + foreach ($entityGroup as $key => $value) { + $bunchRows[$key] = $value; + } + unset($entityGroup); + } $this->_dataSourceModel->saveBunch($this->getEntityTypeCode(), $this->getBehavior(), $bunchRows); - $bunchRows = $nextRowBackup; - $processedDataSize = strlen(serialize($bunchRows)); + $bunchRows = array(); $startNewBunch = false; - $nextRowBackup = array(); } if ($source->valid()) { // errors limit check @@ -358,21 +369,32 @@ abstract class AbstractEntity return $this; } $rowData = $source->current(); - // add row to bunch for save - if ($this->validateRow($rowData, $source->key())) { - $rowData = $this->_prepareRowForDb($rowData); - $rowSize = strlen($this->_jsonHelper->jsonEncode($rowData)); - - $isBunchSizeExceeded = $this->_bunchSize > 0 && count($bunchRows) >= $this->_bunchSize; - if ($processedDataSize + $rowSize >= $this->_maxDataSize || $isBunchSizeExceeded) { - $startNewBunch = true; - $nextRowBackup = array($source->key() => $rowData); - } else { - $bunchRows[$source->key()] = $rowData; - $processedDataSize += $rowSize; + if (isset($rowData[$masterAttributeCode]) && trim($rowData[$masterAttributeCode])) { + /* Add entity group that passed validation to bunch */ + if (isset($entityGroup)) { + foreach ($entityGroup as $key => $value) { + $bunchRows[$key] = $value; + } + $productDataSize = strlen(serialize($bunchRows)); + + /* Check if the new bunch should be started */ + $isBunchSizeExceeded = ($this->_bunchSize > 0 && count($bunchRows) >= $this->_bunchSize); + $startNewBunch = $productDataSize >= $this->_maxDataSize || $isBunchSizeExceeded; } + + /* And start a new one */ + $entityGroup = array(); } + + if (isset($entityGroup) && $this->validateRow($rowData, $source->key())) { + /* Add row to entity group */ + $entityGroup[$source->key()] = $this->_prepareRowForDb($rowData); + } elseif (isset($entityGroup)) { + /* In case validation of one line of the group fails kill the entire group */ + unset($entityGroup); + } + $this->_processedRowsCount++; $source->next(); } @@ -577,6 +599,14 @@ abstract class AbstractEntity return in_array($attributeCode, $this->_specialAttributes); } + /** + * @return string the master attribute code to use in an import + */ + public function getMasterAttributeCode() + { + return $this->masterAttributeCode; + } + /** * Check one attribute can be overridden in child * diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php index 7de7071b68217a3dec23087d7430a032a5a9dc1f..06e176661e99e5cf0e29700cf6b37a194e20037b 100644 --- a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php +++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php @@ -458,6 +458,11 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity */ private $_logger; + /** + * {@inheritdoc} + */ + protected $masterAttributeCode = 'sku'; + /** * @param \Magento\Core\Helper\Data $coreData * @param \Magento\ImportExport\Helper\Data $importExportData diff --git a/app/code/Magento/ImportExport/etc/adminhtml/acl.xml b/app/code/Magento/ImportExport/etc/adminhtml/acl.xml index 43401e599d315e52b685c0ae3e9df9a182bccd69..21a4534e03b3c884f50fc4e5d8d5a95c6cd61d12 100644 --- a/app/code/Magento/ImportExport/etc/adminhtml/acl.xml +++ b/app/code/Magento/ImportExport/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/ImportExport/etc/adminhtml/routes.xml b/app/code/Magento/ImportExport/etc/adminhtml/routes.xml index 0ade5c9aef1ab0f2da42c17052f25d41edcb86ca..959f0eb79e941ed8d571857e332fcbb4a1348b8b 100644 --- a/app/code/Magento/ImportExport/etc/adminhtml/routes.xml +++ b/app/code/Magento/ImportExport/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_ImportExport" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/ImportExport/etc/di.xml b/app/code/Magento/ImportExport/etc/di.xml index 54ac8913bda04a61b71c91e58585088c6131812f..0f22db67afc88f0b0f5a6eba6fa0736f93e43f53 100644 --- a/app/code/Magento/ImportExport/etc/di.xml +++ b/app/code/Magento/ImportExport/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\ImportExport\Model\Import\ConfigInterface" type="Magento\ImportExport\Model\Import\Config" /> <preference for="Magento\ImportExport\Model\Export\ConfigInterface" type="Magento\ImportExport\Model\Export\Config" /> <preference for="Magento\ImportExport\Model\Export\RowCustomizerInterface" type="Magento\ImportExport\Model\Export\RowCustomizer\Composite" /> diff --git a/app/code/Magento/ImportExport/etc/module.xml b/app/code/Magento/ImportExport/etc/module.xml index 7a6a68bed87f0411b51a2e9d0bfab6ca82925193..620e9e9784722562e46c87ee53f24e717f51e234 100644 --- a/app/code/Magento/ImportExport/etc/module.xml +++ b/app/code/Magento/ImportExport/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_ImportExport" version="1.6.0.4" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/ImportExport/view/adminhtml/busy.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/busy.phtml similarity index 100% rename from app/code/Magento/ImportExport/view/adminhtml/busy.phtml rename to app/code/Magento/ImportExport/view/adminhtml/templates/busy.phtml diff --git a/app/code/Magento/ImportExport/view/adminhtml/export/form/after.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/after.phtml similarity index 100% rename from app/code/Magento/ImportExport/view/adminhtml/export/form/after.phtml rename to app/code/Magento/ImportExport/view/adminhtml/templates/export/form/after.phtml diff --git a/app/code/Magento/ImportExport/view/adminhtml/export/form/before.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml similarity index 100% rename from app/code/Magento/ImportExport/view/adminhtml/export/form/before.phtml rename to app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml diff --git a/app/code/Magento/ImportExport/view/adminhtml/export/form/filter/after.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/filter/after.phtml similarity index 100% rename from app/code/Magento/ImportExport/view/adminhtml/export/form/filter/after.phtml rename to app/code/Magento/ImportExport/view/adminhtml/templates/export/form/filter/after.phtml diff --git a/app/code/Magento/ImportExport/view/adminhtml/import/form/after.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/after.phtml similarity index 100% rename from app/code/Magento/ImportExport/view/adminhtml/import/form/after.phtml rename to app/code/Magento/ImportExport/view/adminhtml/templates/import/form/after.phtml diff --git a/app/code/Magento/ImportExport/view/adminhtml/import/form/before.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/before.phtml similarity index 100% rename from app/code/Magento/ImportExport/view/adminhtml/import/form/before.phtml rename to app/code/Magento/ImportExport/view/adminhtml/templates/import/form/before.phtml diff --git a/app/code/Magento/ImportExport/view/adminhtml/import/frame/result.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/import/frame/result.phtml similarity index 100% rename from app/code/Magento/ImportExport/view/adminhtml/import/frame/result.phtml rename to app/code/Magento/ImportExport/view/adminhtml/templates/import/frame/result.phtml diff --git a/app/code/Magento/Index/etc/adminhtml/acl.xml b/app/code/Magento/Index/etc/adminhtml/acl.xml index 199a6ddd8409b85759a6d06d733469b522169db9..3c2f0f4925083d4bf9ab6bd4f7fc38c3a0cf91f6 100644 --- a/app/code/Magento/Index/etc/adminhtml/acl.xml +++ b/app/code/Magento/Index/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Index/etc/adminhtml/di.xml b/app/code/Magento/Index/etc/adminhtml/di.xml index 0b4ae9fe63a173b8231769313be65e4fdb556134..8ec4ff4eadd2cd29f555ba7edfb5f0087fd1382c 100644 --- a/app/code/Magento/Index/etc/adminhtml/di.xml +++ b/app/code/Magento/Index/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\AdminNotification\Model\System\MessageList"> <arguments> <argument name="messages" xsi:type="array"> diff --git a/app/code/Magento/Index/etc/adminhtml/routes.xml b/app/code/Magento/Index/etc/adminhtml/routes.xml index 90e6c818d90b7f2b460e62fb37ea1fd767e66784..643858ca001cd851c899bc24c885c9f5fd11ebdc 100644 --- a/app/code/Magento/Index/etc/adminhtml/routes.xml +++ b/app/code/Magento/Index/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Index" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Index/etc/di.xml b/app/code/Magento/Index/etc/di.xml index bd29f8424eb1c8d1c3eaab8bb6c5f51bcd88db1f..6a08ca9a1bbc10f71b51596013d09261d44c0591 100644 --- a/app/code/Magento/Index/etc/di.xml +++ b/app/code/Magento/Index/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Index\Model\Indexer\ConfigInterface" type="Magento\Index\Model\Indexer\Config" /> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> diff --git a/app/code/Magento/Index/etc/events.xml b/app/code/Magento/Index/etc/events.xml index 24203f02789618c4f40c3e8f6b5cad74c44181d6..d95ba2a15ca52d463a1d0c62e389d71b90fced8a 100644 --- a/app/code/Magento/Index/etc/events.xml +++ b/app/code/Magento/Index/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="store_save_commit_after"> <observer name="index" instance="Magento\Index\Model\Observer" method="processStoreSave" /> </event> diff --git a/app/code/Magento/Index/etc/module.xml b/app/code/Magento/Index/etc/module.xml index b68528e9e13a67b2734d33389efcb68e9aad9d4d..7adaab6cadc48e1e718e6cc0e57e6c80b1584b4c 100644 --- a/app/code/Magento/Index/etc/module.xml +++ b/app/code/Magento/Index/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Index" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Indexer/etc/adminhtml/acl.xml b/app/code/Magento/Indexer/etc/adminhtml/acl.xml index 0467d91a06e9253cbb36347ae8917fd23c34f335..43be5a630531efc4009bde220221c052655b2798 100644 --- a/app/code/Magento/Indexer/etc/adminhtml/acl.xml +++ b/app/code/Magento/Indexer/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Indexer/etc/adminhtml/routes.xml b/app/code/Magento/Indexer/etc/adminhtml/routes.xml index c842b6169699b9b4e868c4ab11191a54e176490c..11293b3b86fb14fae84e446b73cdca7f46f871d7 100644 --- a/app/code/Magento/Indexer/etc/adminhtml/routes.xml +++ b/app/code/Magento/Indexer/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="indexer" frontName="indexer"> <module name="Magento_Indexer"/> diff --git a/app/code/Magento/Indexer/etc/di.xml b/app/code/Magento/Indexer/etc/di.xml index 87a127c166ece8acdf9a944d8d7e3d62d05f7ad6..5746a1348cd0f34521fc1be06da9d01693440cce 100644 --- a/app/code/Magento/Indexer/etc/di.xml +++ b/app/code/Magento/Indexer/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Mview\View\State\CollectionInterface" type="Magento\Indexer\Model\Resource\Mview\View\State\Collection" /> <preference for="Magento\Framework\Mview\View\StateInterface" type="Magento\Indexer\Model\Mview\View\State" /> <preference for="Magento\Indexer\Model\ConfigInterface" type="Magento\Indexer\Model\Config" /> diff --git a/app/code/Magento/Indexer/etc/module.xml b/app/code/Magento/Indexer/etc/module.xml index 235e016191262a12ef2038c08d21b5606e62b635..22eadde60c56877a95df94a273cbac4d7f430d31 100644 --- a/app/code/Magento/Indexer/etc/module.xml +++ b/app/code/Magento/Indexer/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Indexer" version="1.0.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Install/Model/Installer/Config.php b/app/code/Magento/Install/Model/Installer/Config.php index 06a3c2d5b610c75c92e17459cc4e139b5408d583..1311d7d9a08ab6787cb06d5798178625a1a3fd49 100644 --- a/app/code/Magento/Install/Model/Installer/Config.php +++ b/app/code/Magento/Install/Model/Installer/Config.php @@ -94,7 +94,7 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller $this->_request = $request; $this->_storeManager = $storeManager; $this->_filesystem = $filesystem; - $this->_pubDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::PUB_LIB_DIR); + $this->_pubDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::PUB_DIR); $this->_configDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::CONFIG_DIR); $this->messageManager = $messageManager; } @@ -228,7 +228,7 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller try { $staticFile = $this->_findFirstFileRelativePath('', '/.+\.(html?|js|css|gif|jpe?g|png)$/'); $staticUrl = $baseUrl . $this->_filesystem->getUri( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR + \Magento\Framework\App\Filesystem::PUB_DIR ) . '/' . $staticFile; $client = new \Magento\Framework\HTTP\ZendClient($staticUrl); $response = $client->request('GET'); @@ -252,20 +252,19 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller protected function _findFirstFileRelativePath($dir, $pattern = '/.*/') { $childDirs = array(); - foreach ($this->_pubDirectory->read($dir) as $itemName) { - $itemPath = $dir . '/' . $itemName; + foreach ($this->_pubDirectory->read($dir) as $itemPath) { if ($this->_pubDirectory->isFile($itemPath)) { - if (preg_match($pattern, $itemName)) { - return $itemName; + if (preg_match($pattern, $itemPath)) { + return $itemPath; } } else { - $childDirs[$itemName] = $itemPath; + $childDirs[$itemPath] = $itemPath; } } foreach ($childDirs as $dirName => $dirPath) { $filePath = $this->_findFirstFileRelativePath($dirPath, $pattern); if ($filePath) { - return $dirName . '/' . $filePath; + return $filePath; } } return null; diff --git a/app/code/Magento/Install/etc/di.xml b/app/code/Magento/Install/etc/di.xml index ffce8125ab2a7afe258035b4039348421e487a5a..5978523573d55e3f02b33ff4f872f2d8e7168abc 100644 --- a/app/code/Magento/Install/etc/di.xml +++ b/app/code/Magento/Install/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\View\Design\Theme\ListInterface" type="Magento\Core\Model\Theme\Collection" /> <preference for="Magento\Framework\Module\ResourceInterface" type="Magento\Install\Model\Resource\Resource" /> <virtualType name="Magento\Install\Model\Session\Storage" type="Magento\Framework\Session\Storage"> diff --git a/app/code/Magento/Install/etc/frontend/di.xml b/app/code/Magento/Install/etc/frontend/di.xml index 48de5fc4bb4ea938d81485a9e66d01d4f7c34909..c4f97b70589bdc9a9da25dd0d7f048115a7df3ea 100644 --- a/app/code/Magento/Install/etc/frontend/di.xml +++ b/app/code/Magento/Install/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Core\Model\Url\SecurityInfo"> <arguments> <argument name="secureUrlList" xsi:type="array"> diff --git a/app/code/Magento/Install/etc/frontend/routes.xml b/app/code/Magento/Install/etc/frontend/routes.xml index 5149bd8af323cb16413be7bb35b45508a52da6a1..0a76f3dab22ba0576c50ebe7542ae95ac1615d74 100644 --- a/app/code/Magento/Install/etc/frontend/routes.xml +++ b/app/code/Magento/Install/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="install" frontName="install"> <module name="Magento_Install" /> diff --git a/app/code/Magento/Install/etc/install/di.xml b/app/code/Magento/Install/etc/install/di.xml index 839ec8210e3dccedd01c3572f12949336586fb83..ed15b6d40d8eb99b6f16f89aacc7706f761fb3c4 100644 --- a/app/code/Magento/Install/etc/install/di.xml +++ b/app/code/Magento/Install/etc/install/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Core\Model\Theme" type="Magento\Core\Model\Theme\Data" /> <type name="Magento\Framework\App\RouterList" shared="true"> <arguments> diff --git a/app/code/Magento/Install/etc/install/events.xml b/app/code/Magento/Install/etc/install/events.xml index 6f2fe00489cf71b16c72ef2fb2f5687504ecf4f2..5f027077cba44aeb4808e894d9e2b1c6dd65395f 100644 --- a/app/code/Magento/Install/etc/install/events.xml +++ b/app/code/Magento/Install/etc/install/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="core_locale_set_locale"> <observer name="bind_locale" instance="Magento\Install\Model\Observer" method="bindLocale" /> </event> diff --git a/app/code/Magento/Install/etc/install/routes.xml b/app/code/Magento/Install/etc/install/routes.xml index 88e8680934a6ef5ca7f9e546615b3d5d93a2992c..4baf339c284dd6eeed4945aaed02f4205342aa7d 100644 --- a/app/code/Magento/Install/etc/install/routes.xml +++ b/app/code/Magento/Install/etc/install/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="install"> <route id="install" frontName="install"> <module name="Magento_Install" /> diff --git a/app/code/Magento/Install/etc/module.xml b/app/code/Magento/Install/etc/module.xml index c30de77f84ca83bf9e51eb5015120795929725c3..45e9608efdf9d5fd564344eca2e27b0f08c07362 100644 --- a/app/code/Magento/Install/etc/module.xml +++ b/app/code/Magento/Install/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Install" version="0.7.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Install/view/install/begin.phtml b/app/code/Magento/Install/view/install/templates/begin.phtml similarity index 100% rename from app/code/Magento/Install/view/install/begin.phtml rename to app/code/Magento/Install/view/install/templates/begin.phtml diff --git a/app/code/Magento/Install/view/install/config.phtml b/app/code/Magento/Install/view/install/templates/config.phtml similarity index 100% rename from app/code/Magento/Install/view/install/config.phtml rename to app/code/Magento/Install/view/install/templates/config.phtml diff --git a/app/code/Magento/Install/view/install/create_admin.phtml b/app/code/Magento/Install/view/install/templates/create_admin.phtml similarity index 100% rename from app/code/Magento/Install/view/install/create_admin.phtml rename to app/code/Magento/Install/view/install/templates/create_admin.phtml diff --git a/app/code/Magento/Install/view/install/db/main.phtml b/app/code/Magento/Install/view/install/templates/db/main.phtml similarity index 100% rename from app/code/Magento/Install/view/install/db/main.phtml rename to app/code/Magento/Install/view/install/templates/db/main.phtml diff --git a/app/code/Magento/Install/view/install/db/mysql4.phtml b/app/code/Magento/Install/view/install/templates/db/mysql4.phtml similarity index 100% rename from app/code/Magento/Install/view/install/db/mysql4.phtml rename to app/code/Magento/Install/view/install/templates/db/mysql4.phtml diff --git a/app/code/Magento/Install/view/install/download.phtml b/app/code/Magento/Install/view/install/templates/download.phtml similarity index 100% rename from app/code/Magento/Install/view/install/download.phtml rename to app/code/Magento/Install/view/install/templates/download.phtml diff --git a/app/code/Magento/Install/view/install/end.phtml b/app/code/Magento/Install/view/install/templates/end.phtml similarity index 100% rename from app/code/Magento/Install/view/install/end.phtml rename to app/code/Magento/Install/view/install/templates/end.phtml diff --git a/app/code/Magento/Install/view/install/locale.phtml b/app/code/Magento/Install/view/install/templates/locale.phtml similarity index 100% rename from app/code/Magento/Install/view/install/locale.phtml rename to app/code/Magento/Install/view/install/templates/locale.phtml diff --git a/app/code/Magento/Install/view/install/page.phtml b/app/code/Magento/Install/view/install/templates/page.phtml similarity index 100% rename from app/code/Magento/Install/view/install/page.phtml rename to app/code/Magento/Install/view/install/templates/page.phtml diff --git a/app/code/Magento/Install/view/install/state.phtml b/app/code/Magento/Install/view/install/templates/state.phtml similarity index 100% rename from app/code/Magento/Install/view/install/state.phtml rename to app/code/Magento/Install/view/install/templates/state.phtml diff --git a/app/code/Magento/Install/view/install/css/mage-js-ee-style.css b/app/code/Magento/Install/view/install/web/css/mage-js-ee-style.css similarity index 100% rename from app/code/Magento/Install/view/install/css/mage-js-ee-style.css rename to app/code/Magento/Install/view/install/web/css/mage-js-ee-style.css diff --git a/app/code/Magento/Install/view/install/css/mage-js-style.css b/app/code/Magento/Install/view/install/web/css/mage-js-style.css similarity index 100% rename from app/code/Magento/Install/view/install/css/mage-js-style.css rename to app/code/Magento/Install/view/install/web/css/mage-js-style.css diff --git a/app/code/Magento/Install/view/install/css/validate.css b/app/code/Magento/Install/view/install/web/css/validate.css similarity index 100% rename from app/code/Magento/Install/view/install/css/validate.css rename to app/code/Magento/Install/view/install/web/css/validate.css diff --git a/app/code/Magento/Install/view/install/images/validation_advice_bg.gif b/app/code/Magento/Install/view/install/web/images/validation_advice_bg.gif similarity index 100% rename from app/code/Magento/Install/view/install/images/validation_advice_bg.gif rename to app/code/Magento/Install/view/install/web/images/validation_advice_bg.gif diff --git a/app/code/Magento/Install/view/install/js/install.js b/app/code/Magento/Install/view/install/web/js/install.js similarity index 100% rename from app/code/Magento/Install/view/install/js/install.js rename to app/code/Magento/Install/view/install/web/js/install.js diff --git a/app/code/Magento/Integration/etc/adminhtml/routes.xml b/app/code/Magento/Integration/etc/adminhtml/routes.xml index 81f8d779524ce1eda381abfd45b775060b038d98..88b6b1c8c250c28c10e009cb0745f81eefa2cdef 100644 --- a/app/code/Magento/Integration/etc/adminhtml/routes.xml +++ b/app/code/Magento/Integration/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Integration" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Integration/etc/cache.xml b/app/code/Magento/Integration/etc/cache.xml index 8cc61a1736819b90227c7e33a437247c68d02287..b95a74c064e8b8ac82bbda99b8ac557b31ba38ac 100644 --- a/app/code/Magento/Integration/etc/cache.xml +++ b/app/code/Magento/Integration/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="config_integration" translate="label,description" instance="Magento\Integration\Model\Cache\Type"> <label>Integrations Configuration</label> <description>Integration configuration file.</description> diff --git a/app/code/Magento/Integration/etc/di.xml b/app/code/Magento/Integration/etc/di.xml index d238833d88a24479dc106fa177e9be5b803e855a..7b4ba5c7dec2ae30a9b8552954ae65e704a3e199 100644 --- a/app/code/Magento/Integration/etc/di.xml +++ b/app/code/Magento/Integration/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Integration\Service\IntegrationV1Interface" type="Magento\Integration\Service\IntegrationV1" /> <preference for="Magento\Integration\Service\OauthV1Interface" type="Magento\Integration\Service\OauthV1" /> <preference for="Magento\Framework\Oauth\ConsumerInterface" type="Magento\Integration\Model\Oauth\Consumer"/> diff --git a/app/code/Magento/Integration/etc/frontend/routes.xml b/app/code/Magento/Integration/etc/frontend/routes.xml index 11ae3aa131ffa596de480f1d1e0dde51fff67847..b0d70e2f0b814e0a9e9bb1782f1d2f82387096ed 100644 --- a/app/code/Magento/Integration/etc/frontend/routes.xml +++ b/app/code/Magento/Integration/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="oauth" frontName="oauth"> <module name="Magento_Integration" /> diff --git a/app/code/Magento/Integration/etc/module.xml b/app/code/Magento/Integration/etc/module.xml index 3aa28410dacad237eb752e8f26a1fe7a2e8318c7..e25b38c846e55a6c54ddd735a51481976d19637f 100644 --- a/app/code/Magento/Integration/etc/module.xml +++ b/app/code/Magento/Integration/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Integration" version="1.0.0.2" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Integration/view/adminhtml/integration/activate/permissions.phtml b/app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions.phtml similarity index 100% rename from app/code/Magento/Integration/view/adminhtml/integration/activate/permissions.phtml rename to app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions.phtml diff --git a/app/code/Magento/Integration/view/adminhtml/integration/popup_container.phtml b/app/code/Magento/Integration/view/adminhtml/templates/integration/popup_container.phtml similarity index 100% rename from app/code/Magento/Integration/view/adminhtml/integration/popup_container.phtml rename to app/code/Magento/Integration/view/adminhtml/templates/integration/popup_container.phtml diff --git a/app/code/Magento/Integration/view/adminhtml/integration/tokens_exchange.phtml b/app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml similarity index 100% rename from app/code/Magento/Integration/view/adminhtml/integration/tokens_exchange.phtml rename to app/code/Magento/Integration/view/adminhtml/templates/integration/tokens_exchange.phtml diff --git a/app/code/Magento/Integration/view/adminhtml/integration.css b/app/code/Magento/Integration/view/adminhtml/web/integration.css similarity index 100% rename from app/code/Magento/Integration/view/adminhtml/integration.css rename to app/code/Magento/Integration/view/adminhtml/web/integration.css diff --git a/app/code/Magento/Integration/view/adminhtml/js/integration.js b/app/code/Magento/Integration/view/adminhtml/web/js/integration.js similarity index 100% rename from app/code/Magento/Integration/view/adminhtml/js/integration.js rename to app/code/Magento/Integration/view/adminhtml/web/js/integration.js diff --git a/app/code/Magento/LayeredNavigation/etc/adminhtml/events.xml b/app/code/Magento/LayeredNavigation/etc/adminhtml/events.xml index 708e65cce37ef719015c740114313c3675081d83..d834882609171569c510e057f8e95da227a39deb 100644 --- a/app/code/Magento/LayeredNavigation/etc/adminhtml/events.xml +++ b/app/code/Magento/LayeredNavigation/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="product_attribute_form_build_front_tab"> <observer name="layeredNavigation" instance="Magento\LayeredNavigation\Block\Adminhtml\Product\Attribute\Edit\Tab\Front\Observer" method="observe" /> </event> diff --git a/app/code/Magento/LayeredNavigation/etc/frontend/di.xml b/app/code/Magento/LayeredNavigation/etc/frontend/di.xml index bba1a6d8e8ab28f09e863673b678274dc14874f2..ca76a6d3713431b0dea0787e7040ae5e70b1d5b9 100644 --- a/app/code/Magento/LayeredNavigation/etc/frontend/di.xml +++ b/app/code/Magento/LayeredNavigation/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\LayeredNavigation\Block\Navigation\Category" type="Magento\LayeredNavigation\Block\Navigation"> <arguments> <argument name="catalogLayer" xsi:type="object">Magento\Catalog\Model\Layer\Category</argument> diff --git a/app/code/Magento/LayeredNavigation/etc/module.xml b/app/code/Magento/LayeredNavigation/etc/module.xml index dab890abbbd2282c1327027b3d1cbb305cec9f77..c0aa73544598d1c3cb3b6e04ef204b1728fbd035 100644 --- a/app/code/Magento/LayeredNavigation/etc/module.xml +++ b/app/code/Magento/LayeredNavigation/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_LayeredNavigation" version="1.0.0.0" active="true"> <depends> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layer/filter.phtml b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml similarity index 100% rename from app/code/Magento/LayeredNavigation/view/frontend/layer/filter.phtml rename to app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layer/state.phtml b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml similarity index 100% rename from app/code/Magento/LayeredNavigation/view/frontend/layer/state.phtml rename to app/code/Magento/LayeredNavigation/view/frontend/templates/layer/state.phtml diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layer/view.phtml b/app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml similarity index 100% rename from app/code/Magento/LayeredNavigation/view/frontend/layer/view.phtml rename to app/code/Magento/LayeredNavigation/view/frontend/templates/layer/view.phtml diff --git a/app/code/Magento/Log/etc/di.xml b/app/code/Magento/Log/etc/di.xml index 7daaf76b61239e714cbe4fbf2c53b7393a0170a1..2a45826caf27d53467a4e3ec7253f7dea9c61bab 100644 --- a/app/code/Magento/Log/etc/di.xml +++ b/app/code/Magento/Log/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Log\Model\Shell\Command\Clean"> <arguments> <argument name="storeManager" xsi:type="object">Magento\Store\Model\StoreManager\Proxy</argument> diff --git a/app/code/Magento/Log/etc/frontend/events.xml b/app/code/Magento/Log/etc/frontend/events.xml index e0c8e2741c5b8b72d6482eac92c171a24d0dd5e2..f8eae9512b1142fb766ff4bbac67b1565ed2b3f3 100644 --- a/app/code/Magento/Log/etc/frontend/events.xml +++ b/app/code/Magento/Log/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="controller_action_predispatch"> <observer name="log" instance="Magento\Log\Model\Visitor" method="initByRequest" /> </event> diff --git a/app/code/Magento/Log/etc/module.xml b/app/code/Magento/Log/etc/module.xml index cf75653b9b4b57d80c1f25784affd6eb3f043b62..deeb8f6a6d188e89132c01644bf5c095336cc766 100644 --- a/app/code/Magento/Log/etc/module.xml +++ b/app/code/Magento/Log/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Log" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Multishipping/etc/adminhtml/acl.xml b/app/code/Magento/Multishipping/etc/adminhtml/acl.xml index d274e9ca5c2747e82725da41fd17f3b6ba1f346b..82bdbc1398e62d8fc18befb0c91c133aa426e427 100644 --- a/app/code/Magento/Multishipping/etc/adminhtml/acl.xml +++ b/app/code/Magento/Multishipping/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Multishipping/etc/frontend/di.xml b/app/code/Magento/Multishipping/etc/frontend/di.xml index 8b01190ea15306ade75ea5d89a6ff1860c98d20c..c3a8ed9b477cc48957c9b406f63de9ce11f472e8 100644 --- a/app/code/Magento/Multishipping/etc/frontend/di.xml +++ b/app/code/Magento/Multishipping/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Core\Model\Url\SecurityInfo"> <arguments> <argument name="secureUrlList" xsi:type="array"> diff --git a/app/code/Magento/Multishipping/etc/frontend/routes.xml b/app/code/Magento/Multishipping/etc/frontend/routes.xml index 2ec883ed4430c9f07f592d105fffe7f6bbe59381..241cd18adc91679f5bd772876b01f6b7736500d4 100644 --- a/app/code/Magento/Multishipping/etc/frontend/routes.xml +++ b/app/code/Magento/Multishipping/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="multishipping" frontName="multishipping"> <module name="Magento_Multishipping"/> diff --git a/app/code/Magento/Multishipping/etc/module.xml b/app/code/Magento/Multishipping/etc/module.xml index d22a4726b641b60456249df1b67df7fe17011814..d9b44bf9785bc77b5d598a749481dadca33c9726 100644 --- a/app/code/Magento/Multishipping/etc/module.xml +++ b/app/code/Magento/Multishipping/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Multishipping" version="2.0.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/address/select.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/address/select.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/addresses.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/addresses.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/billing.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/billing.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/billing/items.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing/items.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/billing/items.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/billing/items.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/item/default.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/item/default.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/item/default.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/item/default.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/link.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/link.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/link.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/overview.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/overview.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/overview/item.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview/item.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/overview/item.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/overview/item.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/shipping.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/shipping.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/state.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/state.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/state.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/checkout/success.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/checkout/success.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/js/components.phtml b/app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/js/components.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/multishipping/item/default.phtml b/app/code/Magento/Multishipping/view/frontend/templates/multishipping/item/default.phtml similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/multishipping/item/default.phtml rename to app/code/Magento/Multishipping/view/frontend/templates/multishipping/item/default.phtml diff --git a/app/code/Magento/Multishipping/view/frontend/js/multi-shipping.js b/app/code/Magento/Multishipping/view/frontend/web/js/multi-shipping.js similarity index 100% rename from app/code/Magento/Multishipping/view/frontend/js/multi-shipping.js rename to app/code/Magento/Multishipping/view/frontend/web/js/multi-shipping.js diff --git a/app/code/Magento/Newsletter/etc/adminhtml/acl.xml b/app/code/Magento/Newsletter/etc/adminhtml/acl.xml index 3029c58e82fe12022382bd48e3c3fde6e6bcf3e1..c8d22e1fd87db174000f4ca32793d3caf2cf398f 100644 --- a/app/code/Magento/Newsletter/etc/adminhtml/acl.xml +++ b/app/code/Magento/Newsletter/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Newsletter/etc/adminhtml/di.xml b/app/code/Magento/Newsletter/etc/adminhtml/di.xml index a3f2721c6a3c2b444510611fb2fce0241ddc5943..55fed61209db6a38b9c7dc88578703b91c7b4a06 100644 --- a/app/code/Magento/Newsletter/etc/adminhtml/di.xml +++ b/app/code/Magento/Newsletter/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Newsletter\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">adminhtml</argument> diff --git a/app/code/Magento/Newsletter/etc/adminhtml/routes.xml b/app/code/Magento/Newsletter/etc/adminhtml/routes.xml index 479ac3a8f61a45267bb4fa549300584a651bf822..d1ef6dd9a6a940b05dccb853246b63fc95ebc76f 100644 --- a/app/code/Magento/Newsletter/etc/adminhtml/routes.xml +++ b/app/code/Magento/Newsletter/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="newsletter" frontName="newsletter"> <module name="Magento_Newsletter" /> diff --git a/app/code/Magento/Newsletter/etc/di.xml b/app/code/Magento/Newsletter/etc/di.xml index d048bfbd9a5c8ca77f026ca007ba09dbed32a4a0..ed15862fe639b0b1efc945762cd4f11755418965 100644 --- a/app/code/Magento/Newsletter/etc/di.xml +++ b/app/code/Magento/Newsletter/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Newsletter\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">newsletter</argument> diff --git a/app/code/Magento/Newsletter/etc/frontend/di.xml b/app/code/Magento/Newsletter/etc/frontend/di.xml index 939a3b9eb607f773d6b336f879c83aea8bbfc0df..aeac870fe3165f9f522c62967f517da73d5f00f2 100644 --- a/app/code/Magento/Newsletter/etc/frontend/di.xml +++ b/app/code/Magento/Newsletter/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Newsletter\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">frontend</argument> diff --git a/app/code/Magento/Newsletter/etc/frontend/routes.xml b/app/code/Magento/Newsletter/etc/frontend/routes.xml index 76bf5abe47fe312d8d3b8190ebdeacad647c1076..df102795536ae8da9609e1a9b05a2bd149cda2bf 100644 --- a/app/code/Magento/Newsletter/etc/frontend/routes.xml +++ b/app/code/Magento/Newsletter/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="newsletter" frontName="newsletter"> <module name="Magento_Newsletter" /> diff --git a/app/code/Magento/Newsletter/etc/module.xml b/app/code/Magento/Newsletter/etc/module.xml index f1063ed2e6becc7eb755fcc7d4b7d3ba2c2fbe7b..0ed329fcb42220c5bd3ff3312ffd73f35478dec9 100644 --- a/app/code/Magento/Newsletter/etc/module.xml +++ b/app/code/Magento/Newsletter/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Newsletter" version="1.6.0.2" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Newsletter/view/adminhtml/preview/iframeswitcher.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/preview/iframeswitcher.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/preview/store.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/preview/store.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/problem/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/problem/list.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/queue/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/queue/edit.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/queue/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/queue/list.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/queue/list.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/queue/preview.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/preview.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/queue/preview.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/queue/preview.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/subscriber/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/subscriber/list.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/template/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/template/edit.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/template/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/template/list.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/template/list.phtml diff --git a/app/code/Magento/Newsletter/view/adminhtml/template/preview.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/template/preview.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/adminhtml/template/preview.phtml rename to app/code/Magento/Newsletter/view/adminhtml/templates/template/preview.phtml diff --git a/app/code/Magento/Newsletter/view/frontend/js/components.phtml b/app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/frontend/js/components.phtml rename to app/code/Magento/Newsletter/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Newsletter/view/frontend/subscribe.phtml b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml similarity index 100% rename from app/code/Magento/Newsletter/view/frontend/subscribe.phtml rename to app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml diff --git a/app/code/Magento/Newsletter/view/frontend/newsletter.js b/app/code/Magento/Newsletter/view/frontend/web/newsletter.js similarity index 100% rename from app/code/Magento/Newsletter/view/frontend/newsletter.js rename to app/code/Magento/Newsletter/view/frontend/web/newsletter.js diff --git a/app/code/Magento/OfflinePayments/etc/events.xml b/app/code/Magento/OfflinePayments/etc/events.xml index 8e06e159a9546ec7b05a60c8da4054f74e606377..f14598b08426d33b72e51b42c130a50d1b70df90 100644 --- a/app/code/Magento/OfflinePayments/etc/events.xml +++ b/app/code/Magento/OfflinePayments/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_order_payment_save_before"> <observer name="payment_before_save" instance="Magento\OfflinePayments\Model\Observer" method="beforeOrderPaymentSave" /> </event> diff --git a/app/code/Magento/OfflinePayments/etc/module.xml b/app/code/Magento/OfflinePayments/etc/module.xml index ffd43c8ad33133c91ece14ed02776ab4325fccf3..6e1c51754de2cbb6d93e1e1c5bd2730878c005d9 100644 --- a/app/code/Magento/OfflinePayments/etc/module.xml +++ b/app/code/Magento/OfflinePayments/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_OfflinePayments" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/form/banktransfer.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/form/banktransfer.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/form/cashondelivery.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/form/ccsave.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/ccsave.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/form/ccsave.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/form/ccsave.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/form/checkmo.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/form/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/form/purchaseorder.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/info/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/info/checkmo.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/info/checkmo.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/info/pdf/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/checkmo.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/info/pdf/checkmo.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/checkmo.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/info/pdf/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/purchaseorder.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/info/pdf/purchaseorder.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/info/pdf/purchaseorder.phtml diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/info/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/info/purchaseorder.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/adminhtml/info/purchaseorder.phtml rename to app/code/Magento/OfflinePayments/view/adminhtml/templates/info/purchaseorder.phtml diff --git a/app/code/Magento/OfflinePayments/view/frontend/form/banktransfer.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/frontend/form/banktransfer.phtml rename to app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml diff --git a/app/code/Magento/OfflinePayments/view/frontend/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/frontend/form/cashondelivery.phtml rename to app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml diff --git a/app/code/Magento/OfflinePayments/view/frontend/form/ccsave.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/ccsave.phtml similarity index 89% rename from app/code/Magento/OfflinePayments/view/frontend/form/ccsave.phtml rename to app/code/Magento/OfflinePayments/view/frontend/templates/form/ccsave.phtml index 52a5027a2b176919d33fa79e791a38124b43e6df..a2270efa5676ea21d1feca33f2833dab8ac7593c 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/form/ccsave.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/ccsave.phtml @@ -81,15 +81,10 @@ <div class="field cvv required"> <label for="<?php echo $_code ?>_cc_cid" class="label"><span><?php echo __('Card Verification Number') ?></span></label> <div class="control"> - <input type="number" title="<?php echo __('Card Verification Number') ?>" class="input-text cvv" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" data-validate='{required:true, "validate-cc-cvn":"#<?php echo $_code ?>_cc_type"}'/> + <input type="number" title="<?php echo __('Card Verification Number') ?>" class="input-text cvv" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" data-validate='{required:true, "validate-cc-cvn":"#<?php echo $_code ?>_cc_type"}'/> + <?php $_content = '<img src=\"'.$this->getViewFileUrl('Magento_Checkout::cvv.gif').'\" alt=\"'.__('Card Verification Number Visual Reference').'\" title=\"'.__('Card Verification Number Visual Reference').'\" />'; ?> <div class="note"> - <a href="#" class="action cvv" data-mage-init='{"toggleAdvanced": {"toggleContainers":"#ccv-save-tooltip"}}'><span><?php echo __('What is this?') ?></span></a> - </div> - <div class="tooltip hidden" id="ccv-save-tooltip"> - <a data-mage-init='{"toggleAdvanced": {"toggleContainers":"#ccv-save-tooltip"}}' href="#" title="<?php echo __('Close') ?>" class="action close"><span><?php echo __('Close') ?></span></a> - <div class="content"> - <img src="<?php echo $this->getViewFileUrl('Magento_Checkout::cvv.gif') ?>" alt="<?php echo __('Card Verification Number Visual Reference') ?>" title="<?php echo __('Card Verification Number Visual Reference') ?>" /> - </div> + <a href="#" class="action cvv" title="" data-mage-init='{"tooltip": {"content": "<?php echo $_content ?>"}}'><span><?php echo __('What is this?') ?></span></a> </div> </div> </div> diff --git a/app/code/Magento/OfflinePayments/view/frontend/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/frontend/form/checkmo.phtml rename to app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml diff --git a/app/code/Magento/OfflinePayments/view/frontend/form/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/frontend/form/purchaseorder.phtml rename to app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml diff --git a/app/code/Magento/OfflinePayments/view/frontend/info/checkmo.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/frontend/info/checkmo.phtml rename to app/code/Magento/OfflinePayments/view/frontend/templates/info/checkmo.phtml diff --git a/app/code/Magento/OfflinePayments/view/frontend/info/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/info/purchaseorder.phtml similarity index 100% rename from app/code/Magento/OfflinePayments/view/frontend/info/purchaseorder.phtml rename to app/code/Magento/OfflinePayments/view/frontend/templates/info/purchaseorder.phtml diff --git a/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml b/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml index 2b5a01e3cfeb88358afdb03d493ee6dd164e9476..e6688c7183b8faef43a6eadf0d579a97c8512301 100644 --- a/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml +++ b/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="adminhtml_block_salesrule_actions_prepareform"> <observer name="offlineshipping_salesrule" instance="Magento\OfflineShipping\Model\Observer\SalesRule\ActionsTab" method="prepareForm" /> </event> diff --git a/app/code/Magento/OfflineShipping/etc/adminhtml/routes.xml b/app/code/Magento/OfflineShipping/etc/adminhtml/routes.xml index 3ac054bcffc9b7c30010c8ea0fd7069d6e420c1e..2686cf90839ebb7994ca45548d5050b35d1e164f 100644 --- a/app/code/Magento/OfflineShipping/etc/adminhtml/routes.xml +++ b/app/code/Magento/OfflineShipping/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_OfflineShipping" before="Magento_Backend" /> diff --git a/app/code/Magento/OfflineShipping/etc/di.xml b/app/code/Magento/OfflineShipping/etc/di.xml index 868a6329f9b214e695b9fab010de54299b31d339..9990c562c275d4c30e6506194a68a003496b9f94 100644 --- a/app/code/Magento/OfflineShipping/etc/di.xml +++ b/app/code/Magento/OfflineShipping/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Checkout\Block\Cart\Shipping"> <plugin name="checkout_cart_shipping_plugin" type="Magento\OfflineShipping\Model\Plugin\Checkout\Block\Cart\Shipping"/> </type> diff --git a/app/code/Magento/OfflineShipping/etc/fieldset.xml b/app/code/Magento/OfflineShipping/etc/fieldset.xml index 58b3a02f07d9c8463a1bd780b7054fe6026a5815..a84e3e0191189218ca1b7fdeea854b8280380a6e 100644 --- a/app/code/Magento/OfflineShipping/etc/fieldset.xml +++ b/app/code/Magento/OfflineShipping/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_item"> <field name="free_shipping"> diff --git a/app/code/Magento/OfflineShipping/etc/module.xml b/app/code/Magento/OfflineShipping/etc/module.xml index e0061292dd59fd7bcfed62381377dd2a7bf37146..a8fd8cafc290e61e53d7b03f00546b6775bbd267 100644 --- a/app/code/Magento/OfflineShipping/etc/module.xml +++ b/app/code/Magento/OfflineShipping/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_OfflineShipping" version="2.0.0.0" active="true"> <sequence> <module name="Magento_Store"/> diff --git a/app/code/Magento/Ogone/etc/frontend/di.xml b/app/code/Magento/Ogone/etc/frontend/di.xml index d9db9df666436526801a6ec4f4e7b6f28ae1c750..992c632e522739525b031a5a003d25ab95b7999e 100644 --- a/app/code/Magento/Ogone/etc/frontend/di.xml +++ b/app/code/Magento/Ogone/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Core\Model\Url\SecurityInfo"> <arguments> <argument name="secureUrlList" xsi:type="array"> diff --git a/app/code/Magento/Ogone/etc/frontend/routes.xml b/app/code/Magento/Ogone/etc/frontend/routes.xml index 2c414d3998efa1e217b72d91d1c26af96bb116ef..82511a76d6d45516975b150ae06ebc874727026b 100644 --- a/app/code/Magento/Ogone/etc/frontend/routes.xml +++ b/app/code/Magento/Ogone/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="ogone" frontName="ogone"> <module name="Magento_Ogone" /> diff --git a/app/code/Magento/Ogone/etc/module.xml b/app/code/Magento/Ogone/etc/module.xml index 9dcc42717d2005c8e1553f8a8a2e6040f95a21ed..7858fceddce93b6668fd431be7f1b36b6827464e 100644 --- a/app/code/Magento/Ogone/etc/module.xml +++ b/app/code/Magento/Ogone/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Ogone" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Sales"/> diff --git a/app/code/Magento/Ogone/etc/resources.xml b/app/code/Magento/Ogone/etc/resources.xml index c07eb9413d010312eca7abd6038d69dee6a8ccf3..827cfc4f465f91f42420a0de196f5ba270efdadd 100644 --- a/app/code/Magento/Ogone/etc/resources.xml +++ b/app/code/Magento/Ogone/etc/resources.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/App/etc/resources.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/App/etc/resources.xsd"> <resource name="ogone_setup" extends="core_setup" /> <resource name="ogone_write" extends="core_write" /> <resource name="ogone_read" extends="core_read" /> diff --git a/app/code/Magento/Ogone/view/adminhtml/info.phtml b/app/code/Magento/Ogone/view/adminhtml/templates/info.phtml similarity index 100% rename from app/code/Magento/Ogone/view/adminhtml/info.phtml rename to app/code/Magento/Ogone/view/adminhtml/templates/info.phtml diff --git a/app/code/Magento/Ogone/view/frontend/form.phtml b/app/code/Magento/Ogone/view/frontend/templates/form.phtml similarity index 100% rename from app/code/Magento/Ogone/view/frontend/form.phtml rename to app/code/Magento/Ogone/view/frontend/templates/form.phtml diff --git a/app/code/Magento/Ogone/view/frontend/info.phtml b/app/code/Magento/Ogone/view/frontend/templates/info.phtml similarity index 100% rename from app/code/Magento/Ogone/view/frontend/info.phtml rename to app/code/Magento/Ogone/view/frontend/templates/info.phtml diff --git a/app/code/Magento/Ogone/view/frontend/paypage.phtml b/app/code/Magento/Ogone/view/frontend/templates/paypage.phtml similarity index 100% rename from app/code/Magento/Ogone/view/frontend/paypage.phtml rename to app/code/Magento/Ogone/view/frontend/templates/paypage.phtml diff --git a/app/code/Magento/Ogone/view/frontend/placeform.phtml b/app/code/Magento/Ogone/view/frontend/templates/placeform.phtml similarity index 100% rename from app/code/Magento/Ogone/view/frontend/placeform.phtml rename to app/code/Magento/Ogone/view/frontend/templates/placeform.phtml diff --git a/app/code/Magento/PageCache/etc/adminhtml/di.xml b/app/code/Magento/PageCache/etc/adminhtml/di.xml index 12977b3e46e0c2983b658c5ee76319bcb2a26781..5f0573f1fa5179310ec5affa0b4d4a74f5b9ce51 100644 --- a/app/code/Magento/PageCache/etc/adminhtml/di.xml +++ b/app/code/Magento/PageCache/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Widget\Model\Widget\Instance"> <arguments> <argument name="relatedCacheTypes" xsi:type="array"> diff --git a/app/code/Magento/PageCache/etc/adminhtml/routes.xml b/app/code/Magento/PageCache/etc/adminhtml/routes.xml index 298543f3e29ee6c5ca93ccb40ffc3195e27acd03..5b290427e3355a0bd654a93e6f48c3398df1e27d 100644 --- a/app/code/Magento/PageCache/etc/adminhtml/routes.xml +++ b/app/code/Magento/PageCache/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_PageCache" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/PageCache/etc/cache.xml b/app/code/Magento/PageCache/etc/cache.xml index eae3ee0cbb0112c5928871bb58f02f8d3a7580ab..334e14a383144229cbe505870bad8c8e73efdf52 100644 --- a/app/code/Magento/PageCache/etc/cache.xml +++ b/app/code/Magento/PageCache/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="full_page" translate="label,description" instance="Magento\PageCache\Model\Cache\Type"> <label>Page Cache</label> <description>Full page caching.</description> diff --git a/app/code/Magento/PageCache/etc/events.xml b/app/code/Magento/PageCache/etc/events.xml index 0de00234d62af5739ec0836250d30f83762fb0d5..b99208180d601abc154ab1a718559a4dea42d3d4 100644 --- a/app/code/Magento/PageCache/etc/events.xml +++ b/app/code/Magento/PageCache/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="core_layout_render_element"> <observer name="pagecache" instance="Magento\PageCache\Model\Observer" method="processLayoutRenderElement" /> </event> diff --git a/app/code/Magento/PageCache/etc/frontend/di.xml b/app/code/Magento/PageCache/etc/frontend/di.xml index 6986beb0721660c62c26df9b2af20826d77a4def..c2ea16a521e5cdc30446b216589afa3d6c996707 100644 --- a/app/code/Magento/PageCache/etc/frontend/di.xml +++ b/app/code/Magento/PageCache/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\FrontControllerInterface"> <plugin name="front-controller-builtin-cache" type="Magento\PageCache\Model\App\FrontController\BuiltinPlugin"/> <plugin name="front-controller-varnish-cache" type="Magento\PageCache\Model\App\FrontController\VarnishPlugin"/> diff --git a/app/code/Magento/PageCache/etc/frontend/routes.xml b/app/code/Magento/PageCache/etc/frontend/routes.xml index 7f9b4ddb548e072186d8134780276484d4d78970..8af8b7f49ef5dccd798f5f6bc56dc03e2da22ae5 100644 --- a/app/code/Magento/PageCache/etc/frontend/routes.xml +++ b/app/code/Magento/PageCache/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="magento_pagecache" frontName="page_cache"> <module name="Magento_PageCache" /> diff --git a/app/code/Magento/PageCache/etc/module.xml b/app/code/Magento/PageCache/etc/module.xml index ec5119d028f8383a135ff0cc2c7e3f16b1f198b8..85eb07eae8cd09ca635e33ba5f17369d9588b910 100644 --- a/app/code/Magento/PageCache/etc/module.xml +++ b/app/code/Magento/PageCache/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_PageCache" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/PageCache/view/adminhtml/page_cache_validation.phtml b/app/code/Magento/PageCache/view/adminhtml/templates/page_cache_validation.phtml similarity index 100% rename from app/code/Magento/PageCache/view/adminhtml/page_cache_validation.phtml rename to app/code/Magento/PageCache/view/adminhtml/templates/page_cache_validation.phtml diff --git a/app/code/Magento/PageCache/view/frontend/javascript.phtml b/app/code/Magento/PageCache/view/frontend/templates/javascript.phtml similarity index 90% rename from app/code/Magento/PageCache/view/frontend/javascript.phtml rename to app/code/Magento/PageCache/view/frontend/templates/javascript.phtml index 5b7fb5be0fb6be091708527ec863e8b042edb039..5cf07fc668ef743a454e7a93bf150667fdd3ccbf 100644 --- a/app/code/Magento/PageCache/view/frontend/javascript.phtml +++ b/app/code/Magento/PageCache/view/frontend/templates/javascript.phtml @@ -25,8 +25,8 @@ <?php /** @var \Magento\PageCache\Block\Javascript $this */ ?> <script type="text/javascript"> //<![CDATA[ - (function ($) { - $('body').mage('pageCache', <?php echo $this->getScriptOptions(); ?>); - })(jQuery); + jQuery(function () { + jQuery('body').mage('pageCache', <?php echo $this->getScriptOptions(); ?>); + }); //]]> </script> \ No newline at end of file diff --git a/app/code/Magento/PageCache/view/frontend/js/components.phtml b/app/code/Magento/PageCache/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/PageCache/view/frontend/js/components.phtml rename to app/code/Magento/PageCache/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/PageCache/view/frontend/js/comments.js b/app/code/Magento/PageCache/view/frontend/web/js/comments.js similarity index 100% rename from app/code/Magento/PageCache/view/frontend/js/comments.js rename to app/code/Magento/PageCache/view/frontend/web/js/comments.js diff --git a/app/code/Magento/PageCache/view/frontend/js/form-key.js b/app/code/Magento/PageCache/view/frontend/web/js/form-key.js similarity index 100% rename from app/code/Magento/PageCache/view/frontend/js/form-key.js rename to app/code/Magento/PageCache/view/frontend/web/js/form-key.js diff --git a/app/code/Magento/PageCache/view/frontend/js/msg-box.js b/app/code/Magento/PageCache/view/frontend/web/js/msg-box.js similarity index 100% rename from app/code/Magento/PageCache/view/frontend/js/msg-box.js rename to app/code/Magento/PageCache/view/frontend/web/js/msg-box.js diff --git a/app/code/Magento/PageCache/view/frontend/js/page-cache.js b/app/code/Magento/PageCache/view/frontend/web/js/page-cache.js similarity index 100% rename from app/code/Magento/PageCache/view/frontend/js/page-cache.js rename to app/code/Magento/PageCache/view/frontend/web/js/page-cache.js diff --git a/app/code/Magento/PayPalRecurringPayment/etc/di.xml b/app/code/Magento/PayPalRecurringPayment/etc/di.xml index 3294296de392749c4e2f68026735462f524c22f3..e590d3bfd13d58eac617c8501152ae763c898313 100644 --- a/app/code/Magento/PayPalRecurringPayment/etc/di.xml +++ b/app/code/Magento/PayPalRecurringPayment/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\RecurringPayment\Model\ManagerInterface" type="Magento\PayPalRecurringPayment\Model\Express" /> <preference for="Magento\Paypal\Model\Api\Nvp" type="Magento\PayPalRecurringPayment\Model\Api\Nvp" /> <type name="Magento\Paypal\Model\IpnFactory"> diff --git a/app/code/Magento/PayPalRecurringPayment/etc/module.xml b/app/code/Magento/PayPalRecurringPayment/etc/module.xml index 9ae9462a4a2788af3490bf072b92a4f51a348e4a..8f0cd9b74a67fcfdfce5efd8472c429645111830 100644 --- a/app/code/Magento/PayPalRecurringPayment/etc/module.xml +++ b/app/code/Magento/PayPalRecurringPayment/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_PayPalRecurringPayment" version="1.0.0.0" active="true"> <depends> <module name="Magento_Customer"/> diff --git a/app/code/Magento/Payment/etc/adminhtml/acl.xml b/app/code/Magento/Payment/etc/adminhtml/acl.xml index af60d9b3b70aac42f7d1286ba08b9ec584f87e4f..c8ad3fd70b76ada846e8c7086d5a535a3c27bc77 100644 --- a/app/code/Magento/Payment/etc/adminhtml/acl.xml +++ b/app/code/Magento/Payment/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Payment/etc/di.xml b/app/code/Magento/Payment/etc/di.xml index 3cb005465f076df360cbf452f626d0f3d2a5a487..0983fc499a488d61e95658f10f6a3c1479ee7f70 100644 --- a/app/code/Magento/Payment/etc/di.xml +++ b/app/code/Magento/Payment/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Payment\Model\Config\Reader"> <arguments> <argument name="fileName" xsi:type="string">payment.xml</argument> diff --git a/app/code/Magento/Payment/etc/events.xml b/app/code/Magento/Payment/etc/events.xml index a140b5ff0a5eb0976c3332513f70e5d443c51fb5..0a3bbe07bf429a4023df35bfb6f9fc9b0040dc9b 100644 --- a/app/code/Magento/Payment/etc/events.xml +++ b/app/code/Magento/Payment/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_order_save_before"> <observer name="payment_sales_order_save_before" instance="Magento\Payment\Model\Observer" method="salesOrderBeforeSave" /> </event> diff --git a/app/code/Magento/Payment/etc/module.xml b/app/code/Magento/Payment/etc/module.xml index 32fa4dd8ddaf11b651200c3437c94ab41965599f..59f19e657f1d04816f2dd57905380f96d9bc55ec 100644 --- a/app/code/Magento/Payment/etc/module.xml +++ b/app/code/Magento/Payment/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Payment" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Payment/view/adminhtml/form/cc.phtml b/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml similarity index 100% rename from app/code/Magento/Payment/view/adminhtml/form/cc.phtml rename to app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml diff --git a/app/code/Magento/Payment/view/adminhtml/info/default.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml similarity index 100% rename from app/code/Magento/Payment/view/adminhtml/info/default.phtml rename to app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml diff --git a/app/code/Magento/Payment/view/adminhtml/info/instructions.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml similarity index 100% rename from app/code/Magento/Payment/view/adminhtml/info/instructions.phtml rename to app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml diff --git a/app/code/Magento/Payment/view/adminhtml/info/pdf/default.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml similarity index 100% rename from app/code/Magento/Payment/view/adminhtml/info/pdf/default.phtml rename to app/code/Magento/Payment/view/adminhtml/templates/info/pdf/default.phtml diff --git a/app/code/Magento/Payment/view/adminhtml/info/substitution.phtml b/app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml similarity index 100% rename from app/code/Magento/Payment/view/adminhtml/info/substitution.phtml rename to app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml diff --git a/app/code/Magento/Payment/view/frontend/form/cc.phtml b/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml similarity index 90% rename from app/code/Magento/Payment/view/frontend/form/cc.phtml rename to app/code/Magento/Payment/view/frontend/templates/form/cc.phtml index 64e822cb2712a53204268610cb3b91357be2aa85..bef0428c86c6a170248d1fe1b39de9597427ca27 100644 --- a/app/code/Magento/Payment/view/frontend/form/cc.phtml +++ b/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml @@ -76,14 +76,9 @@ <label for="<?php echo $_code ?>_cc_cid" class="label"><span><?php echo __('Card Verification Number') ?></span></label> <div class="control"> <input type="number" title="<?php echo __('Card Verification Number') ?>" class="input-text cvv" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" data-validate='{required:true, "validate-cc-cvn":"#<?php echo $_code ?>_cc_type"}' /> + <?php $_content = '<img src=\"'.$this->getViewFileUrl('Magento_Checkout::cvv.gif').'\" alt=\"'.__('Card Verification Number Visual Reference').'\" title=\"'.__('Card Verification Number Visual Reference').'\" />'; ?> <div class="note"> - <a href="#" class="action cvv" data-mage-init='{"toggleAdvanced": {"toggleContainers": "#<?php echo $_code ?>_cc_type_cvv_div .tooltip"}}'><span><?php echo __('What is this?') ?></span></a> - </div> - <div class="tooltip hidden"> - <a data-mage-init='{"toggleAdvanced": {"toggleContainers": "#<?php echo $_code ?>_cc_type_cvv_div .tooltip"}}' href="#" title="<?php echo __('Close') ?>" class="action close"><span><?php echo __('Close') ?></span></a> - <div class="content"> - <img src="<?php echo $this->getViewFileUrl('Magento_Checkout::cvv.gif') ?>" alt="<?php echo __('Card Verification Number Visual Reference') ?>" title="<?php echo __('Card Verification Number Visual Reference') ?>" /> - </div> + <a href="#" class="action cvv" title="Hello" data-mage-init='{"tooltip": {"content": "<?php echo $_content ?>"}}'><span><?php echo __('What is this?') ?></span></a> </div> </div> </div> diff --git a/app/code/Magento/Payment/view/frontend/info/default.phtml b/app/code/Magento/Payment/view/frontend/templates/info/default.phtml similarity index 100% rename from app/code/Magento/Payment/view/frontend/info/default.phtml rename to app/code/Magento/Payment/view/frontend/templates/info/default.phtml diff --git a/app/code/Magento/Payment/view/frontend/info/instructions.phtml b/app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml similarity index 100% rename from app/code/Magento/Payment/view/frontend/info/instructions.phtml rename to app/code/Magento/Payment/view/frontend/templates/info/instructions.phtml diff --git a/app/code/Magento/Payment/view/frontend/cc-type.js b/app/code/Magento/Payment/view/frontend/web/cc-type.js similarity index 100% rename from app/code/Magento/Payment/view/frontend/cc-type.js rename to app/code/Magento/Payment/view/frontend/web/cc-type.js diff --git a/app/code/Magento/Paypal/Block/Billing/Agreement/View.php b/app/code/Magento/Paypal/Block/Billing/Agreement/View.php index 99db5bce42100749c459664a87a767841210275d..afc456880446f3eece020dadd7798e99a0ce5a61 100644 --- a/app/code/Magento/Paypal/Block/Billing/Agreement/View.php +++ b/app/code/Magento/Paypal/Block/Billing/Agreement/View.php @@ -127,8 +127,8 @@ class View extends \Magento\Framework\View\Element\Template 'customer_id', (int)$this->_customerSession->getCustomerId() )->addFieldToFilter( - 'state', - array('in' => $this->_orderConfig->getVisibleOnFrontStates()) + 'status', + array('in' => $this->_orderConfig->getVisibleOnFrontStatuses()) )->setOrder( 'created_at', 'desc' diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index 69846059de35575b79614755e9adb858bdb71d48..8960bf31dffa3b8ad78b1779bb6420f08b050c82 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -21,6 +21,7 @@ * @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) */ + namespace Magento\Paypal\Block; /** @@ -112,7 +113,7 @@ class Iframe extends \Magento\Payment\Block\Form $templateFile = "{$templatePath}/iframe.phtml"; $directory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $file = $this->_viewFileSystem->getFilename($templateFile, array('module' => 'Magento_Paypal')); + $file = $this->_viewFileSystem->getTemplateFileName($templateFile, array('module' => 'Magento_Paypal')); if ($directory->isExist($directory->getRelativePath($file))) { $this->setTemplate($templateFile); } else { diff --git a/app/code/Magento/Paypal/etc/adminhtml/acl.xml b/app/code/Magento/Paypal/etc/adminhtml/acl.xml index ec5e75beb8a652bf3d21c5b0c903e225a6285868..d0f32046bc40ad4dd0ca43a21c3845b32cb7576f 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/acl.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Paypal/etc/adminhtml/di.xml b/app/code/Magento/Paypal/etc/adminhtml/di.xml index decb22ebd79a4ae20fe9fa7c640fc827ab727bc8..7a9dcd1d84cccdb869484905a53e140fd23f8616 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/di.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Paypal\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">paypal</argument> diff --git a/app/code/Magento/Paypal/etc/adminhtml/events.xml b/app/code/Magento/Paypal/etc/adminhtml/events.xml index d6e900bc1b444013073b4f61baf9713cc14b9b3a..73533435cfd16b2c9afd9aec733b1a80aec1d952 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/events.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="payment_method_is_active"> <observer name="sales_billing_agreement" instance="Magento\Paypal\Model\Observer" method="restrictAdminBillingAgreementUsage" /> </event> diff --git a/app/code/Magento/Paypal/etc/adminhtml/routes.xml b/app/code/Magento/Paypal/etc/adminhtml/routes.xml index 5ea080e7b525c638ecb505a8283d9188c6aea4d7..057ebd7b352352b63d6fec05e62e22be403b4066 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/routes.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="paypal" frontName="paypal"> <module name="Magento_Paypal" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Paypal/etc/di.xml b/app/code/Magento/Paypal/etc/di.xml index 10f2a2797b1290cef4eaa45b368d82cdaa95b1db..902cae04b2a1a94b1c9151b1812d978087a4df73 100644 --- a/app/code/Magento/Paypal/etc/di.xml +++ b/app/code/Magento/Paypal/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/Paypal/etc/events.xml b/app/code/Magento/Paypal/etc/events.xml index c3dfcc10998b01cf09d210f557527dba285b11f9..ddce9b1eee8691075e4fc89e7c8aa03e00d94f72 100644 --- a/app/code/Magento/Paypal/etc/events.xml +++ b/app/code/Magento/Paypal/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_order_payment_place_end"> <observer name="paypal" instance="Magento\Paypal\Model\Observer" method="addBillingAgreementToSession" /> </event> diff --git a/app/code/Magento/Paypal/etc/frontend/di.xml b/app/code/Magento/Paypal/etc/frontend/di.xml index 2a04f7376b6c01db37771ee147223336a1812c27..5b7dbd8539dcd723b2ccbf000a7bb1d288e70926 100644 --- a/app/code/Magento/Paypal/etc/frontend/di.xml +++ b/app/code/Magento/Paypal/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Paypal\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">paypal</argument> diff --git a/app/code/Magento/Paypal/etc/frontend/events.xml b/app/code/Magento/Paypal/etc/frontend/events.xml index 027e377892ed79bf6c489462cc790cb639e397c3..c3ae6feba325f55abab22ca208729e3a9cee93c2 100644 --- a/app/code/Magento/Paypal/etc/frontend/events.xml +++ b/app/code/Magento/Paypal/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="checkout_submit_all_after"> <observer name="hss_save_order_after_submit" instance="Magento\Paypal\Model\Observer" method="saveOrderAfterSubmit" /> </event> diff --git a/app/code/Magento/Paypal/etc/frontend/routes.xml b/app/code/Magento/Paypal/etc/frontend/routes.xml index 24b4a67aca4a21f41223c14880eac80b51f19ba2..b587ce8f4233524bf8d5cb5dea0ffa495c49c32d 100644 --- a/app/code/Magento/Paypal/etc/frontend/routes.xml +++ b/app/code/Magento/Paypal/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="paypal" frontName="paypal"> <module name="Magento_Paypal" /> diff --git a/app/code/Magento/Paypal/etc/module.xml b/app/code/Magento/Paypal/etc/module.xml index 7b144b0e26a10243559ec20699a0392ee5b022a9..06a0b12f1558f22ea751aa6dc2a82b307bd57a6a 100644 --- a/app/code/Magento/Paypal/etc/module.xml +++ b/app/code/Magento/Paypal/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Paypal" version="1.6.0.3" active="true"> <sequence> <module name="Magento_Checkout"/> diff --git a/app/code/Magento/Paypal/view/adminhtml/billing/agreement/form.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/form.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/billing/agreement/form.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/form.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/billing/agreement/view/form.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/view/form.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/billing/agreement/view/form.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/view/form.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/billing/agreement/view/tab/info.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/view/tab/info.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/billing/agreement/view/tab/info.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/view/tab/info.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/payment/form/billing/agreement.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/payment/form/billing/agreement.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/payment/form/billing/agreement.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/payment/form/billing/agreement.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/system/config/api_wizard.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/api_wizard.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/system/config/api_wizard.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/system/config/api_wizard.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/system/config/fieldset/hint.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/hint.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/system/config/fieldset/hint.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/hint.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/system/config/fieldset/store.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/store.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/system/config/fieldset/store.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/system/config/fieldset/store.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/system/config/payflowlink/advanced.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/system/config/payflowlink/advanced.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/system/config/payflowlink/info.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/info.phtml similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/system/config/payflowlink/info.phtml rename to app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/info.phtml diff --git a/app/code/Magento/Paypal/view/adminhtml/images/logo-paypal.png b/app/code/Magento/Paypal/view/adminhtml/web/images/logo-paypal.png similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/images/logo-paypal.png rename to app/code/Magento/Paypal/view/adminhtml/web/images/logo-paypal.png diff --git a/app/code/Magento/Paypal/view/adminhtml/images/paypal-logo.png b/app/code/Magento/Paypal/view/adminhtml/web/images/paypal-logo.png similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/images/paypal-logo.png rename to app/code/Magento/Paypal/view/adminhtml/web/images/paypal-logo.png diff --git a/app/code/Magento/Paypal/view/adminhtml/images/pp-allinone.png b/app/code/Magento/Paypal/view/adminhtml/web/images/pp-allinone.png similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/images/pp-allinone.png rename to app/code/Magento/Paypal/view/adminhtml/web/images/pp-allinone.png diff --git a/app/code/Magento/Paypal/view/adminhtml/images/pp-alt.png b/app/code/Magento/Paypal/view/adminhtml/web/images/pp-alt.png similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/images/pp-alt.png rename to app/code/Magento/Paypal/view/adminhtml/web/images/pp-alt.png diff --git a/app/code/Magento/Paypal/view/adminhtml/images/pp-gateways.png b/app/code/Magento/Paypal/view/adminhtml/web/images/pp-gateways.png similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/images/pp-gateways.png rename to app/code/Magento/Paypal/view/adminhtml/web/images/pp-gateways.png diff --git a/app/code/Magento/Paypal/view/adminhtml/images/pp-uk.png b/app/code/Magento/Paypal/view/adminhtml/web/images/pp-uk.png similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/images/pp-uk.png rename to app/code/Magento/Paypal/view/adminhtml/web/images/pp-uk.png diff --git a/app/code/Magento/Paypal/view/adminhtml/logo.gif b/app/code/Magento/Paypal/view/adminhtml/web/logo.gif similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/logo.gif rename to app/code/Magento/Paypal/view/adminhtml/web/logo.gif diff --git a/app/code/Magento/Paypal/view/adminhtml/section.png b/app/code/Magento/Paypal/view/adminhtml/web/section.png similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/section.png rename to app/code/Magento/Paypal/view/adminhtml/web/section.png diff --git a/app/code/Magento/Paypal/view/adminhtml/styles.css b/app/code/Magento/Paypal/view/adminhtml/web/styles.css similarity index 100% rename from app/code/Magento/Paypal/view/adminhtml/styles.css rename to app/code/Magento/Paypal/view/adminhtml/web/styles.css diff --git a/app/code/Magento/Paypal/view/frontend/billing/agreement/view.phtml b/app/code/Magento/Paypal/view/frontend/templates/billing/agreement/view.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/billing/agreement/view.phtml rename to app/code/Magento/Paypal/view/frontend/templates/billing/agreement/view.phtml diff --git a/app/code/Magento/Paypal/view/frontend/billing/agreements.phtml b/app/code/Magento/Paypal/view/frontend/templates/billing/agreements.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/billing/agreements.phtml rename to app/code/Magento/Paypal/view/frontend/templates/billing/agreements.phtml diff --git a/app/code/Magento/Paypal/view/frontend/checkout/onepage/success/billing_agreement.phtml b/app/code/Magento/Paypal/view/frontend/templates/checkout/onepage/success/billing_agreement.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/checkout/onepage/success/billing_agreement.phtml rename to app/code/Magento/Paypal/view/frontend/templates/checkout/onepage/success/billing_agreement.phtml diff --git a/app/code/Magento/Paypal/view/frontend/express/review.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/review.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/express/review.phtml rename to app/code/Magento/Paypal/view/frontend/templates/express/review.phtml diff --git a/app/code/Magento/Paypal/view/frontend/express/review/address.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/review/address.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/express/review/address.phtml rename to app/code/Magento/Paypal/view/frontend/templates/express/review/address.phtml diff --git a/app/code/Magento/Paypal/view/frontend/express/review/details.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/review/details.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/express/review/details.phtml rename to app/code/Magento/Paypal/view/frontend/templates/express/review/details.phtml diff --git a/app/code/Magento/Paypal/view/frontend/express/review/shipping/method.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/review/shipping/method.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/express/review/shipping/method.phtml rename to app/code/Magento/Paypal/view/frontend/templates/express/review/shipping/method.phtml diff --git a/app/code/Magento/Paypal/view/frontend/express/shortcut.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/shortcut.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/express/shortcut.phtml rename to app/code/Magento/Paypal/view/frontend/templates/express/shortcut.phtml diff --git a/app/code/Magento/Paypal/view/frontend/hss/form.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/form.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/hss/form.phtml rename to app/code/Magento/Paypal/view/frontend/templates/hss/form.phtml diff --git a/app/code/Magento/Paypal/view/frontend/hss/iframe.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/iframe.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/hss/iframe.phtml rename to app/code/Magento/Paypal/view/frontend/templates/hss/iframe.phtml diff --git a/app/code/Magento/Paypal/view/frontend/hss/info.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/info.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/hss/info.phtml rename to app/code/Magento/Paypal/view/frontend/templates/hss/info.phtml diff --git a/app/code/Magento/Paypal/view/frontend/hss/js.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/js.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/hss/js.phtml rename to app/code/Magento/Paypal/view/frontend/templates/hss/js.phtml diff --git a/app/code/Magento/Paypal/view/frontend/hss/redirect.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/redirect.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/hss/redirect.phtml rename to app/code/Magento/Paypal/view/frontend/templates/hss/redirect.phtml diff --git a/app/code/Magento/Paypal/view/frontend/hss/review/button.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/review/button.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/hss/review/button.phtml rename to app/code/Magento/Paypal/view/frontend/templates/hss/review/button.phtml diff --git a/app/code/Magento/Paypal/view/frontend/js/components.phtml b/app/code/Magento/Paypal/view/frontend/templates/js/components.phtml similarity index 91% rename from app/code/Magento/Paypal/view/frontend/js/components.phtml rename to app/code/Magento/Paypal/view/frontend/templates/js/components.phtml index e4c90dda5f6b6c953ed87e8b96c9565c30d34659..6d9bf4e498fd1bb934e095b8da6ab6b300d5c547 100644 --- a/app/code/Magento/Paypal/view/frontend/js/components.phtml +++ b/app/code/Magento/Paypal/view/frontend/templates/js/components.phtml @@ -29,9 +29,6 @@ * Declaration of resources needed for defined components */ $.mage.component({ - accordion: [ - '<?php echo $this->getViewFileUrl('Magento_Checkout::js/accordion.js') ?>' - ], opcheckoutPaypalIframe: [ '<?php echo $this->getViewFileUrl('Magento_Paypal::js/opcheckout.js') ?>' ], diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/test.phtml b/app/code/Magento/Paypal/view/frontend/templates/onepage.phtml similarity index 87% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/test.phtml rename to app/code/Magento/Paypal/view/frontend/templates/onepage.phtml index 6f63b67433dea6b58e4a085e2caffd13f78b5a2e..b5ee9018416d124a10aa603f0084ce9bcff95089 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/test.phtml +++ b/app/code/Magento/Paypal/view/frontend/templates/onepage.phtml @@ -21,4 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -echo 'Content of this file is not asserted. Only its presence.'; +?> +<script type="text/javascript"> + (function($) { + $('#checkoutSteps').mage('opcheckoutPaypalIframe'); + })(jQuery); +</script> diff --git a/app/code/Magento/Paypal/view/frontend/partner/logo.phtml b/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/partner/logo.phtml rename to app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowadvanced/form.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/form.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowadvanced/form.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/form.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowadvanced/iframe.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowadvanced/iframe.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/iframe.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowadvanced/info.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/info.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowadvanced/info.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/info.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowadvanced/redirect.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/redirect.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowadvanced/redirect.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/redirect.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowexpress/review.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowexpress/review.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowexpress/review.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowexpress/review.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowlink/form.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/form.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowlink/form.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowlink/form.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowlink/iframe.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowlink/iframe.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowlink/iframe.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowlink/info.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/info.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowlink/info.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowlink/info.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payflowlink/redirect.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payflowlink/redirect.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payment/form/billing/agreement.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/form/billing/agreement.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payment/form/billing/agreement.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payment/form/billing/agreement.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payment/mark.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payment/mark.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml diff --git a/app/code/Magento/Paypal/view/frontend/payment/redirect.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/redirect.phtml similarity index 100% rename from app/code/Magento/Paypal/view/frontend/payment/redirect.phtml rename to app/code/Magento/Paypal/view/frontend/templates/payment/redirect.phtml diff --git a/app/code/Magento/Paypal/view/frontend/js/opcheckout.js b/app/code/Magento/Paypal/view/frontend/web/js/opcheckout.js similarity index 96% rename from app/code/Magento/Paypal/view/frontend/js/opcheckout.js rename to app/code/Magento/Paypal/view/frontend/web/js/opcheckout.js index b92f15c8a5465274a2b40b9fde9da067a48e18a8..93a18d5e7db7e2a405f710ece62c20b2410f3778 100644 --- a/app/code/Magento/Paypal/view/frontend/js/opcheckout.js +++ b/app/code/Magento/Paypal/view/frontend/web/js/opcheckout.js @@ -23,7 +23,7 @@ /*jshint browser:true jquery:true*/ (function ($, window) { "use strict"; - $.widget('mage.opcheckoutPaypalIframe', $.mage.opcheckout, { + $.widget('mage.opcheckoutPaypalIframe', $.mage.opcOrderReview, { options: { review: { submitContainer: '#checkout-review-submit' diff --git a/app/code/Magento/Paypal/view/frontend/js/paypal-checkout.js b/app/code/Magento/Paypal/view/frontend/web/js/paypal-checkout.js similarity index 100% rename from app/code/Magento/Paypal/view/frontend/js/paypal-checkout.js rename to app/code/Magento/Paypal/view/frontend/web/js/paypal-checkout.js diff --git a/app/code/Magento/Paypal/view/frontend/order-review.js b/app/code/Magento/Paypal/view/frontend/web/order-review.js similarity index 100% rename from app/code/Magento/Paypal/view/frontend/order-review.js rename to app/code/Magento/Paypal/view/frontend/web/order-review.js diff --git a/app/code/Magento/Persistent/etc/adminhtml/acl.xml b/app/code/Magento/Persistent/etc/adminhtml/acl.xml index 19db4d9c54c6b9b4e2d9e68dd1263c43a9486c24..986e38739e4d861668d73545a919fd970e58d7c3 100644 --- a/app/code/Magento/Persistent/etc/adminhtml/acl.xml +++ b/app/code/Magento/Persistent/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Persistent/etc/frontend/di.xml b/app/code/Magento/Persistent/etc/frontend/di.xml index 8a9b9f62c4eb682e45d055c378c5cf6cdc0a205b..db997b25019ebfe93d6a8808947a10929dfbc904 100644 --- a/app/code/Magento/Persistent/etc/frontend/di.xml +++ b/app/code/Magento/Persistent/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Core\Model\Url\SecurityInfo"> <arguments> <argument name="secureUrlList" xsi:type="array"> diff --git a/app/code/Magento/Persistent/etc/frontend/events.xml b/app/code/Magento/Persistent/etc/frontend/events.xml index 26200acea0687d3ecb0692055aeabce65655d8d3..a5d1e80835f697d53525380134dc533cb0950593 100644 --- a/app/code/Magento/Persistent/etc/frontend/events.xml +++ b/app/code/Magento/Persistent/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="customer_data_object_login"> <observer name="persistent" instance="Magento\Persistent\Model\Observer\Session" method="synchronizePersistentOnLogin" /> </event> diff --git a/app/code/Magento/Persistent/etc/frontend/routes.xml b/app/code/Magento/Persistent/etc/frontend/routes.xml index 727656c687400bdce81b724ffbccd1680e315c57..749c9fa5ce4a990e18688967ea67dc931207467a 100644 --- a/app/code/Magento/Persistent/etc/frontend/routes.xml +++ b/app/code/Magento/Persistent/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="persistent" frontName="persistent"> <module name="Magento_Persistent" /> diff --git a/app/code/Magento/Persistent/etc/module.xml b/app/code/Magento/Persistent/etc/module.xml index 5df3f0d2707d23be14635a3d66caa8903cd3b78c..90455c4ea3c2b0ca8349c23d5f7caa3df652f0fb 100644 --- a/app/code/Magento/Persistent/etc/module.xml +++ b/app/code/Magento/Persistent/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Persistent" version="1.0.0.0" active="true"> <sequence> <module name="Magento_Checkout"/> diff --git a/app/code/Magento/Persistent/view/frontend/remember_me.phtml b/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml similarity index 100% rename from app/code/Magento/Persistent/view/frontend/remember_me.phtml rename to app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml diff --git a/app/code/Magento/ProductAlert/etc/di.xml b/app/code/Magento/ProductAlert/etc/di.xml index 75e94df1df788286859bb0fbe95e8160a4bc2d7b..7c7b54ef86983abef0309ec28bb226a148d63193 100644 --- a/app/code/Magento/ProductAlert/etc/di.xml +++ b/app/code/Magento/ProductAlert/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Setup\Migration"> <arguments> <argument name="compositeModules" xsi:type="array"> diff --git a/app/code/Magento/ProductAlert/etc/frontend/routes.xml b/app/code/Magento/ProductAlert/etc/frontend/routes.xml index ca125601a0ff25174986c3ebe82e38ef6410776c..5370c96230833d162ecb1a322ed91fecdd385122 100644 --- a/app/code/Magento/ProductAlert/etc/frontend/routes.xml +++ b/app/code/Magento/ProductAlert/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="productalert" frontName="productalert"> <module name="Magento_ProductAlert" /> diff --git a/app/code/Magento/ProductAlert/etc/module.xml b/app/code/Magento/ProductAlert/etc/module.xml index 153c5875aee78973bfab7f79921103d8f381f58b..5a58fa1ad0c1bbe968725c4945c49e7ff15f24ca 100644 --- a/app/code/Magento/ProductAlert/etc/module.xml +++ b/app/code/Magento/ProductAlert/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_ProductAlert" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/ProductAlert/view/frontend/email/price.phtml b/app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml similarity index 100% rename from app/code/Magento/ProductAlert/view/frontend/email/price.phtml rename to app/code/Magento/ProductAlert/view/frontend/templates/email/price.phtml diff --git a/app/code/Magento/ProductAlert/view/frontend/email/stock.phtml b/app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml similarity index 100% rename from app/code/Magento/ProductAlert/view/frontend/email/stock.phtml rename to app/code/Magento/ProductAlert/view/frontend/templates/email/stock.phtml diff --git a/app/code/Magento/ProductAlert/view/frontend/product/view.phtml b/app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml similarity index 100% rename from app/code/Magento/ProductAlert/view/frontend/product/view.phtml rename to app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml diff --git a/app/code/Magento/RecurringPayment/Block/Payment/Related/Orders/Grid.php b/app/code/Magento/RecurringPayment/Block/Payment/Related/Orders/Grid.php index 5d91f7a29aaa87f1fb5c065d469559e17b90b76f..b64915a82b8f28b1abd1010d391c8d483f0aabf1 100644 --- a/app/code/Magento/RecurringPayment/Block/Payment/Related/Orders/Grid.php +++ b/app/code/Magento/RecurringPayment/Block/Payment/Related/Orders/Grid.php @@ -118,7 +118,7 @@ class Grid extends \Magento\RecurringPayment\Block\Payment\View 'status' ) ); - $this->_relatedOrders->addFieldToFilter('state', array('in' => $this->_config->getVisibleOnFrontStates())); + $this->_relatedOrders->addFieldToFilter('status', array('in' => $this->_config->getVisibleOnFrontStatuses())); $pager = $this->getLayout()->createBlock( 'Magento\Theme\Block\Html\Pager' diff --git a/app/code/Magento/RecurringPayment/etc/adminhtml/acl.xml b/app/code/Magento/RecurringPayment/etc/adminhtml/acl.xml index 766ff13497356dea34ae1afb7ff4d9964a854294..5a259ef64af4207f4539c1aea14a6820e40cedf3 100644 --- a/app/code/Magento/RecurringPayment/etc/adminhtml/acl.xml +++ b/app/code/Magento/RecurringPayment/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/RecurringPayment/etc/adminhtml/events.xml b/app/code/Magento/RecurringPayment/etc/adminhtml/events.xml index c89d0288d0962cf59a46144e960dae4423102bc7..1cc1c666f9383602fe1d60c13c9d2c0d81202007 100644 --- a/app/code/Magento/RecurringPayment/etc/adminhtml/events.xml +++ b/app/code/Magento/RecurringPayment/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="adminhtml_catalog_product_form_prepare_excluded_field_list"> <observer name="magento_recurringpayment" instance="Magento\RecurringPayment\Model\Observer" method="addFormExcludedAttribute"/> </event> diff --git a/app/code/Magento/RecurringPayment/etc/adminhtml/routes.xml b/app/code/Magento/RecurringPayment/etc/adminhtml/routes.xml index 3f3158a79c272f63ef958fc107d0f3b4a47215db..3866591d3e635311d184d9f98256483c04cb3879 100644 --- a/app/code/Magento/RecurringPayment/etc/adminhtml/routes.xml +++ b/app/code/Magento/RecurringPayment/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="sales" frontName="sales"> <module name="Magento_RecurringPayment" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/RecurringPayment/etc/di.xml b/app/code/Magento/RecurringPayment/etc/di.xml index 95cf072dbc5459bb973ad1339b236386aae60ccb..b2f1aba96635cef4466b861d18efd459ad0f2515 100644 --- a/app/code/Magento/RecurringPayment/etc/di.xml +++ b/app/code/Magento/RecurringPayment/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Checkout\Model\Session\SuccessValidator" type="Magento\RecurringPayment\Model\SuccessValidator" /> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> diff --git a/app/code/Magento/RecurringPayment/etc/events.xml b/app/code/Magento/RecurringPayment/etc/events.xml index 362b57c2bf3dd2e350bff38a81eb99697bf04d5b..b907b714472bfe679b0800e6fafe25213dd45c50 100644 --- a/app/code/Magento/RecurringPayment/etc/events.xml +++ b/app/code/Magento/RecurringPayment/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_model_service_quote_submit_nominal_items"> <observer name="magento_recurringpayment" instance="Magento\RecurringPayment\Model\Observer\CheckoutManagerObserver" method="submitRecurringPayments" /> </event> diff --git a/app/code/Magento/RecurringPayment/etc/fieldset.xml b/app/code/Magento/RecurringPayment/etc/fieldset.xml index e5333411aba800e693c146e4f6035a21ee14e314..e5230cf650e578ce4c92ff0ab042a78592b98bfd 100644 --- a/app/code/Magento/RecurringPayment/etc/fieldset.xml +++ b/app/code/Magento/RecurringPayment/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_item"> <field name="is_recurring"> diff --git a/app/code/Magento/RecurringPayment/etc/frontend/events.xml b/app/code/Magento/RecurringPayment/etc/frontend/events.xml index 4ce4c7ccf249443792b3ee2bc1fe0438ab052378..1b5eb81801a48d6c6a6aa991b614299d59bcab2f 100644 --- a/app/code/Magento/RecurringPayment/etc/frontend/events.xml +++ b/app/code/Magento/RecurringPayment/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_type_prepare_full_options"> <observer name="recurring_payment_prepare_options" instance="Magento\RecurringPayment\Model\Observer" method="prepareProductRecurringPaymentOptions" /> </event> diff --git a/app/code/Magento/RecurringPayment/etc/frontend/routes.xml b/app/code/Magento/RecurringPayment/etc/frontend/routes.xml index 121a929bddbdbcb70b03be954e5c2edcfe1533ca..68138ffac6ef38797f70d8738c439c18953414e6 100644 --- a/app/code/Magento/RecurringPayment/etc/frontend/routes.xml +++ b/app/code/Magento/RecurringPayment/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="sales" frontName="sales"> <module name="Magento_RecurringPayment" /> diff --git a/app/code/Magento/RecurringPayment/etc/module.xml b/app/code/Magento/RecurringPayment/etc/module.xml index 2cbb5ccb7b29ce1e72d47025738fc6ee6c86517e..7a0aa47c1246ddd77baf6e80c82db9b7e8340fe2 100644 --- a/app/code/Magento/RecurringPayment/etc/module.xml +++ b/app/code/Magento/RecurringPayment/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_RecurringPayment" version="1.0.0.0" active="true"> <sequence> <module name="Magento_Sales"/> diff --git a/app/code/Magento/RecurringPayment/view/adminhtml/layout/sales_recurringpayment_grid.xml b/app/code/Magento/RecurringPayment/view/adminhtml/layout/sales_recurringpayment_grid.xml index 12f5bbda38f63ebe7db040b843c239ce8aeba0bb..d2784189b0312ed7d57f5ae6d2eeb68db8c4a96f 100644 --- a/app/code/Magento/RecurringPayment/view/adminhtml/layout/sales_recurringpayment_grid.xml +++ b/app/code/Magento/RecurringPayment/view/adminhtml/layout/sales_recurringpayment_grid.xml @@ -25,5 +25,5 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Core/etc/layout_single.xsd"> <remove name="root"/> - <block class="Magento\RecurringPayment\Block\Payment\Grid" name="sales.recurring.payment.grid" output="1"/> + <block class="Magento\RecurringPayment\Block\Adminhtml\Payment\Grid" name="sales.recurring.adminhtml.payment.grid" output="1"/> </layout> diff --git a/app/code/Magento/RecurringPayment/view/adminhtml/recurring/payment/view.phtml b/app/code/Magento/RecurringPayment/view/adminhtml/templates/recurring/payment/view.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/adminhtml/recurring/payment/view.phtml rename to app/code/Magento/RecurringPayment/view/adminhtml/templates/recurring/payment/view.phtml diff --git a/app/code/Magento/RecurringPayment/view/adminhtml/recurring/payment/view/info.phtml b/app/code/Magento/RecurringPayment/view/adminhtml/templates/recurring/payment/view/info.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/adminhtml/recurring/payment/view/info.phtml rename to app/code/Magento/RecurringPayment/view/adminhtml/templates/recurring/payment/view/info.phtml diff --git a/app/code/Magento/RecurringPayment/view/frontend/catalog/product/view/payment/options.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/catalog/product/view/payment/options.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/frontend/catalog/product/view/payment/options.phtml rename to app/code/Magento/RecurringPayment/view/frontend/templates/catalog/product/view/payment/options.phtml diff --git a/app/code/Magento/RecurringPayment/view/frontend/catalog/product/view/payment/schedule.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/catalog/product/view/payment/schedule.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/frontend/catalog/product/view/payment/schedule.phtml rename to app/code/Magento/RecurringPayment/view/frontend/templates/catalog/product/view/payment/schedule.phtml diff --git a/app/code/Magento/RecurringPayment/view/frontend/checkout/onepage/success.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/checkout/onepage/success.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/frontend/checkout/onepage/success.phtml rename to app/code/Magento/RecurringPayment/view/frontend/templates/checkout/onepage/success.phtml diff --git a/app/code/Magento/RecurringPayment/view/frontend/recurring/grid.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/grid.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/frontend/recurring/grid.phtml rename to app/code/Magento/RecurringPayment/view/frontend/templates/recurring/grid.phtml diff --git a/app/code/Magento/RecurringPayment/view/frontend/recurring/payment/view.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/frontend/recurring/payment/view.phtml rename to app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view.phtml diff --git a/app/code/Magento/RecurringPayment/view/frontend/recurring/payment/view/info.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view/info.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/frontend/recurring/payment/view/info.phtml rename to app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view/info.phtml diff --git a/app/code/Magento/RecurringPayment/view/frontend/recurring/payments.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payments.phtml similarity index 100% rename from app/code/Magento/RecurringPayment/view/frontend/recurring/payments.phtml rename to app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payments.phtml diff --git a/app/code/Magento/Reports/etc/adminhtml/acl.xml b/app/code/Magento/Reports/etc/adminhtml/acl.xml index 809116cb0508cb372041f3193a313a72665a594c..45984f2766ebf0d714a3eac00e3a9a90fa3ff127 100644 --- a/app/code/Magento/Reports/etc/adminhtml/acl.xml +++ b/app/code/Magento/Reports/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Reports/etc/adminhtml/di.xml b/app/code/Magento/Reports/etc/adminhtml/di.xml index 3b043558c7331eaab561f03f471731eb20824c1e..42ebf99024b6c0915fd61e4e359d1ed70d86bf3e 100644 --- a/app/code/Magento/Reports/etc/adminhtml/di.xml +++ b/app/code/Magento/Reports/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Reports\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">adminhtml</argument> diff --git a/app/code/Magento/Reports/etc/adminhtml/routes.xml b/app/code/Magento/Reports/etc/adminhtml/routes.xml index b1de433d31e58ba96cc3983f235c7fe3063b4b3e..a81e2cac98265e6b2d92f676b0ebbb477668278a 100644 --- a/app/code/Magento/Reports/etc/adminhtml/routes.xml +++ b/app/code/Magento/Reports/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="reports" frontName="reports"> <module name="Magento_Reports_Adminhtml" before="Magento_Reports" /> diff --git a/app/code/Magento/Reports/etc/di.xml b/app/code/Magento/Reports/etc/di.xml index 97926fcf535655e48eb42157ff457fb398838f7b..f8aa8143386e25bda2336a20d25f0f1a770d66fb 100644 --- a/app/code/Magento/Reports/etc/di.xml +++ b/app/code/Magento/Reports/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Log\Model\Resource\Log"> <plugin name="reportLog" type="Magento\Reports\Model\Plugin\Log" /> </type> diff --git a/app/code/Magento/Reports/etc/frontend/di.xml b/app/code/Magento/Reports/etc/frontend/di.xml index b1923b77ba40c7ef3ba87a89e670caa61cc408e3..a5ab4ba4e5d1b456e5002aa8716fa0fb0e532981 100644 --- a/app/code/Magento/Reports/etc/frontend/di.xml +++ b/app/code/Magento/Reports/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Reports\Model\Session"> <arguments> <argument name="sessionName" xsi:type="string">frontend</argument> diff --git a/app/code/Magento/Reports/etc/frontend/events.xml b/app/code/Magento/Reports/etc/frontend/events.xml index 6ccbdd6af4354a7a1649f9c89f01004daf19da3d..ffd60827ffb0bcd25000bb440c88a0f1d9e8c9f3 100644 --- a/app/code/Magento/Reports/etc/frontend/events.xml +++ b/app/code/Magento/Reports/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_compare_remove_product"> <observer name="reports" instance="Magento\Reports\Model\Event\Observer" method="catalogProductCompareRemoveProduct" /> </event> diff --git a/app/code/Magento/Reports/etc/module.xml b/app/code/Magento/Reports/etc/module.xml index 07e86cebac68a03be4c591308ef3461d731ed44d..115fde5d242345eda522d3ea39df437afae4d655 100644 --- a/app/code/Magento/Reports/etc/module.xml +++ b/app/code/Magento/Reports/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Reports" version="1.6.0.0.2" active="true"> <sequence> <module name="Magento_Customer"/> diff --git a/app/code/Magento/Reports/view/adminhtml/grid.phtml b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/grid.phtml rename to app/code/Magento/Reports/view/adminhtml/templates/grid.phtml diff --git a/app/code/Magento/Reports/view/adminhtml/report/grid/container.phtml b/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/report/grid/container.phtml rename to app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml diff --git a/app/code/Magento/Reports/view/adminhtml/report/refresh/statistics.phtml b/app/code/Magento/Reports/view/adminhtml/templates/report/refresh/statistics.phtml similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/report/refresh/statistics.phtml rename to app/code/Magento/Reports/view/adminhtml/templates/report/refresh/statistics.phtml diff --git a/app/code/Magento/Reports/view/adminhtml/report/wishlist.phtml b/app/code/Magento/Reports/view/adminhtml/templates/report/wishlist.phtml similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/report/wishlist.phtml rename to app/code/Magento/Reports/view/adminhtml/templates/report/wishlist.phtml diff --git a/app/code/Magento/Reports/view/adminhtml/store/switcher.phtml b/app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/store/switcher.phtml rename to app/code/Magento/Reports/view/adminhtml/templates/store/switcher.phtml diff --git a/app/code/Magento/Reports/view/adminhtml/store/switcher/enhanced.phtml b/app/code/Magento/Reports/view/adminhtml/templates/store/switcher/enhanced.phtml similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/store/switcher/enhanced.phtml rename to app/code/Magento/Reports/view/adminhtml/templates/store/switcher/enhanced.phtml diff --git a/app/code/Magento/Reports/view/adminhtml/images/product_widget_compared.gif b/app/code/Magento/Reports/view/adminhtml/web/images/product_widget_compared.gif similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/images/product_widget_compared.gif rename to app/code/Magento/Reports/view/adminhtml/web/images/product_widget_compared.gif diff --git a/app/code/Magento/Reports/view/adminhtml/images/product_widget_viewed.gif b/app/code/Magento/Reports/view/adminhtml/web/images/product_widget_viewed.gif similarity index 100% rename from app/code/Magento/Reports/view/adminhtml/images/product_widget_viewed.gif rename to app/code/Magento/Reports/view/adminhtml/web/images/product_widget_viewed.gif diff --git a/app/code/Magento/Reports/view/frontend/js/components.phtml b/app/code/Magento/Reports/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/js/components.phtml rename to app/code/Magento/Reports/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Reports/view/frontend/product/widget/viewed.phtml b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/product/widget/viewed.phtml rename to app/code/Magento/Reports/view/frontend/templates/product/widget/viewed.phtml diff --git a/app/code/Magento/Reports/view/frontend/product/widget/viewed/item.phtml b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/product/widget/viewed/item.phtml rename to app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml diff --git a/app/code/Magento/Reports/view/frontend/product_compared.phtml b/app/code/Magento/Reports/view/frontend/templates/product_compared.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/product_compared.phtml rename to app/code/Magento/Reports/view/frontend/templates/product_compared.phtml diff --git a/app/code/Magento/Reports/view/frontend/product_viewed.phtml b/app/code/Magento/Reports/view/frontend/templates/product_viewed.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/product_viewed.phtml rename to app/code/Magento/Reports/view/frontend/templates/product_viewed.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/column/compared_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/compared/column/compared_default_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/column/compared_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/compared/column/compared_images_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/column/compared_names_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/compared/column/compared_names_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/compared/content/compared_grid.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/compared/content/compared_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_default_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_images_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_names_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_names_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_grid.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml similarity index 100% rename from app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_list.phtml rename to app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml diff --git a/app/code/Magento/Reports/view/frontend/js/recently-viewed.js b/app/code/Magento/Reports/view/frontend/web/js/recently-viewed.js similarity index 100% rename from app/code/Magento/Reports/view/frontend/js/recently-viewed.js rename to app/code/Magento/Reports/view/frontend/web/js/recently-viewed.js diff --git a/app/code/Magento/RequireJs/Block/Html/Head/Config.php b/app/code/Magento/RequireJs/Block/Html/Head/Config.php new file mode 100644 index 0000000000000000000000000000000000000000..0c01fa9ba8aa66fb02b85475d955c473796e75f9 --- /dev/null +++ b/app/code/Magento/RequireJs/Block/Html/Head/Config.php @@ -0,0 +1,90 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\RequireJs\Block\Html\Head; + +use Magento\Theme\Block\Html\Head\AssetBlockInterface; + +/** + * Block responsible for including RequireJs config on the page + */ +class Config extends \Magento\Framework\View\Element\AbstractBlock implements AssetBlockInterface +{ + /** + * @var \Magento\Framework\RequireJs\Config + */ + private $config; + + /** + * @var \Magento\RequireJs\Model\FileManager + */ + private $fileManager; + + /** + * @var \Magento\Framework\View\Asset\LocalInterface + */ + private $asset; + + /** + * @param \Magento\Framework\View\Element\Context $context + * @param \Magento\Framework\RequireJs\Config $config + * @param \Magento\RequireJs\Model\FileManager $fileManager + * @param array $data + */ + public function __construct( + \Magento\Framework\View\Element\Context $context, + \Magento\Framework\RequireJs\Config $config, + \Magento\RequireJs\Model\FileManager $fileManager, + array $data = array() + ) { + parent::__construct($context, $data); + $this->config = $config; + $this->fileManager = $fileManager; + } + + /** + * Include RequireJs configuration as an asset on the page + * + * @return \Magento\Framework\View\Asset\LocalInterface + */ + public function getAsset() + { + if (!$this->asset) { + $this->asset = $this->fileManager->createRequireJsAsset(); + } + return $this->asset; + } + + /** + * Include base RequireJs configuration necessary for working with Magento application + * + * @return string|void + */ + protected function _toHtml() + { + return "<script type=\"text/javascript\">\n" + . $this->config->getBaseConfig() + . "</script>\n"; + } +} diff --git a/app/code/Magento/RequireJs/Model/FileManager.php b/app/code/Magento/RequireJs/Model/FileManager.php new file mode 100644 index 0000000000000000000000000000000000000000..d412c33b44f57fde2a24183830b7dcf46f0a9060 --- /dev/null +++ b/app/code/Magento/RequireJs/Model/FileManager.php @@ -0,0 +1,97 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\RequireJs\Model; + +/** + * A service for handling RequireJS files in the application + */ +class FileManager +{ + /** + * @var \Magento\Framework\RequireJs\Config + */ + private $config; + + /** + * @var \Magento\Framework\App\Filesystem + */ + private $filesystem; + + /** + * @var \Magento\Framework\App\State + */ + private $appState; + + /** + * @var \Magento\Framework\View\Asset\Repository + */ + private $assetRepo; + + /** + * @param \Magento\Framework\RequireJs\Config $config + * @param \Magento\Framework\App\Filesystem $appFilesystem + * @param \Magento\Framework\App\State $appState + * @param \Magento\Framework\View\Asset\Repository $assetRepo + */ + public function __construct( + \Magento\Framework\RequireJs\Config $config, + \Magento\Framework\App\Filesystem $appFilesystem, + \Magento\Framework\App\State $appState, + \Magento\Framework\View\Asset\Repository $assetRepo + ) { + $this->config = $config; + $this->filesystem = $appFilesystem; + $this->appState = $appState; + $this->assetRepo = $assetRepo; + } + + /** + * Create a view asset representing the aggregated configuration file + * + * @return \Magento\Framework\View\Asset\File + */ + public function createRequireJsAsset() + { + $relPath = $this->config->getConfigFileRelativePath(); + $this->ensureSourceFile($relPath); + return $this->assetRepo->createArbitrary($relPath, ''); + } + + /** + * Make sure the aggregated configuration is materialized + * + * By default write the file if it doesn't exist, but in developer mode always do it. + * + * @param string $relPath + * @return void + */ + private function ensureSourceFile($relPath) + { + $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + if ($this->appState->getMode() == \Magento\Framework\App\State::MODE_DEVELOPER || !$dir->isExist($relPath)) { + $dir->writeFile($relPath, $this->config->getConfig()); + } + } +} diff --git a/app/code/Magento/RequireJs/etc/di.xml b/app/code/Magento/RequireJs/etc/di.xml new file mode 100644 index 0000000000000000000000000000000000000000..41ba7a67c4e7ef732b77c5eb534a9b21472fde6c --- /dev/null +++ b/app/code/Magento/RequireJs/etc/di.xml @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> + <virtualType name="requirejsConfigFileSourceBaseFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> + <arguments> + <argument name="subject" xsi:type="object">Magento\Framework\View\File\Collector\Base</argument> + </arguments> + </virtualType> + <virtualType name="requirejsConfigFileSourceBaseSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> + <arguments> + <argument name="subject" xsi:type="object">requirejsConfigFileSourceBaseFiltered</argument> + </arguments> + </virtualType> + <virtualType name="requirejsFileSourceThemeFiltered" type="Magento\Framework\View\File\Collector\Decorator\ModuleOutput"> + <arguments> + <argument name="subject" xsi:type="object">Magento\Framework\View\File\Collector\ThemeModular</argument> + </arguments> + </virtualType> + <virtualType name="requirejsFileSourceThemeSorted" type="Magento\Framework\View\File\Collector\Decorator\ModuleDependency"> + <arguments> + <argument name="subject" xsi:type="object">requirejsFileSourceThemeFiltered</argument> + </arguments> + </virtualType> + <type name="Magento\Framework\RequireJs\Config\File\Collector\Aggregated"> + <arguments> + <argument name="baseFiles" xsi:type="object">requirejsConfigFileSourceBaseSorted</argument> + <argument name="themeModularFiles" xsi:type="object">requirejsFileSourceThemeSorted</argument> + <argument name="themeFiles" xsi:type="object">Magento\Framework\View\File\Collector\Theme</argument> + </arguments> + </type> +</config> diff --git a/app/code/Magento/RequireJs/etc/module.xml b/app/code/Magento/RequireJs/etc/module.xml new file mode 100644 index 0000000000000000000000000000000000000000..8e381f0ce4693d57baed2e808bc08fd3bfaae1d5 --- /dev/null +++ b/app/code/Magento/RequireJs/etc/module.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> + <module name="Magento_RequireJs" version="1.0.0.0" active="true"> + <depends> + <module name="Magento_Theme"/> + </depends> + </module> +</config> diff --git a/app/code/Magento/Review/Model/Resource/Review.php b/app/code/Magento/Review/Model/Resource/Review.php index 6a898d044772b295b1a7772e2c1d12a3e3970707..5d047fe81a9c18cd1b96973a95fe13a45895f858 100644 --- a/app/code/Magento/Review/Model/Resource/Review.php +++ b/app/code/Magento/Review/Model/Resource/Review.php @@ -27,8 +27,6 @@ use Magento\Framework\Model\AbstractModel; /** * Review resource model - * - * @author Magento Core Team <core@magentocommerce.com> */ class Review extends \Magento\Framework\Model\Resource\Db\AbstractDb { @@ -323,7 +321,7 @@ class Review extends \Magento\Framework\Model\Resource\Db\AbstractDb $this->_reviewTable . '.review_id=store.review_id AND store.store_id = :store_id', array() ); - $bind[':store_id'] = (int)$storeId; + $bind[':store_id'] = (int) $storeId; } if ($approvedOnly) { $select->where("{$this->_reviewTable}.status_id = :status_id"); @@ -361,15 +359,10 @@ class Review extends \Magento\Framework\Model\Resource\Db\AbstractDb true, $ratingSummaryObject->getStoreId() ); - $select = $readAdapter->select()->from( - $this->_aggregateTable - )->where( - 'entity_pk_value = :pk_value' - )->where( - 'entity_type = :entity_type' - )->where( - 'store_id = :store_id' - ); + $select = $readAdapter->select()->from($this->_aggregateTable) + ->where('entity_pk_value = :pk_value') + ->where('entity_type = :entity_type') + ->where('store_id = :store_id'); $bind = array( ':pk_value' => $object->getEntityPkValue(), ':entity_type' => $object->getEntityId(), @@ -379,17 +372,11 @@ class Review extends \Magento\Framework\Model\Resource\Db\AbstractDb $data = new \Magento\Framework\Object(); - $data->setReviewsCount( - $reviewsCount - )->setEntityPkValue( - $object->getEntityPkValue() - )->setEntityType( - $object->getEntityId() - )->setRatingSummary( - $ratingSummary > 0 ? $ratingSummary : 0 - )->setStoreId( - $ratingSummaryObject->getStoreId() - ); + $data->setReviewsCount($reviewsCount) + ->setEntityPkValue($object->getEntityPkValue()) + ->setEntityType($object->getEntityId()) + ->setRatingSummary($ratingSummary > 0 ? $ratingSummary : 0) + ->setStoreId($ratingSummaryObject->getStoreId()); $writeAdapter->beginTransaction(); try { @@ -418,15 +405,9 @@ class Review extends \Magento\Framework\Model\Resource\Db\AbstractDb if (empty($reviewId)) { return array(); } - $select = $adapter->select()->from( - array('v' => $this->getTable('rating_option_vote')), - 'r.rating_id' - )->joinInner( - array('r' => $this->getTable('rating')), - 'v.rating_id=r.rating_id' - )->where( - 'v.review_id = :revire_id' - ); + $select = $adapter->select()->from(array('v' => $this->getTable('rating_option_vote')), 'r.rating_id') + ->joinInner(array('r' => $this->getTable('rating')), 'v.rating_id=r.rating_id') + ->where('v.review_id = :revire_id'); return $adapter->fetchCol($select, array(':revire_id' => $reviewId)); } @@ -472,12 +453,8 @@ class Review extends \Magento\Framework\Model\Resource\Db\AbstractDb public function getEntityIdByCode($entityCode) { $adapter = $this->_getReadAdapter(); - $select = $adapter->select()->from( - $this->_reviewEntityTable, - array('entity_id') - )->where( - 'entity_code = :entity_code' - ); + $select = $adapter->select()->from($this->_reviewEntityTable, array('entity_id')) + ->where('entity_code = :entity_code'); return $adapter->fetchOne($select, array(':entity_code' => $entityCode)); } diff --git a/app/code/Magento/Review/Model/Review.php b/app/code/Magento/Review/Model/Review.php index 9008d5d1130a27b6431ff341a30173f0823278c3..b4e22d8efa4ebb1d32aa72189d769dba804c4669 100644 --- a/app/code/Magento/Review/Model/Review.php +++ b/app/code/Magento/Review/Model/Review.php @@ -30,8 +30,6 @@ use Magento\Catalog\Model\Product; /** * Review model * - * @method \Magento\Review\Model\Resource\Review _getResource() - * @method \Magento\Review\Model\Resource\Review getResource() * @method string getCreatedAt() * @method \Magento\Review\Model\Review setCreatedAt(string $value) * @method \Magento\Review\Model\Review setEntityId(int $value) @@ -39,8 +37,6 @@ use Magento\Catalog\Model\Product; * @method \Magento\Review\Model\Review setEntityPkValue(int $value) * @method int getStatusId() * @method \Magento\Review\Model\Review setStatusId(int $value) - * - * @author Magento Core Team <core@magentocommerce.com> */ class Review extends \Magento\Framework\Model\AbstractModel { @@ -52,18 +48,33 @@ class Review extends \Magento\Framework\Model\AbstractModel protected $_eventPrefix = 'review'; /** - * Review entity codes + * Product entity review code */ const ENTITY_PRODUCT_CODE = 'product'; + /** + * Customer entity review code + */ const ENTITY_CUSTOMER_CODE = 'customer'; + /** + * Category entity review code + */ const ENTITY_CATEGORY_CODE = 'category'; + /** + * Approved review status code + */ const STATUS_APPROVED = 1; + /** + * Pending review status code + */ const STATUS_PENDING = 2; + /** + * Not Approved review status code + */ const STATUS_NOT_APPROVED = 3; /** @@ -242,6 +253,22 @@ class Review extends \Magento\Framework\Model\AbstractModel return $this->_urlModel->getUrl('review/product/view', array('id' => $this->getReviewId())); } + /** + * Get product view url + * + * @param string|int $productId + * @param string|int $storeId + * @return string + */ + public function getProductUrl($productId, $storeId) + { + if ($storeId) { + $this->_urlModel->setScope($storeId); + } + + return $this->_urlModel->getUrl('catalog/product/view', array('id' => $productId)); + } + /** * Validate review summary fields * @@ -289,24 +316,23 @@ class Review extends \Magento\Framework\Model\AbstractModel public function appendSummary($collection) { $entityIds = array(); - foreach ($collection->getItems() as $_item) { - $entityIds[] = $_item->getEntityId(); + foreach ($collection->getItems() as $item) { + $entityIds[] = $item->getEntityId(); } if (sizeof($entityIds) == 0) { return $this; } - $summaryData = $this->_summaryFactory->create()->addEntityFilter( - $entityIds - )->addStoreFilter( - $this->_storeManager->getStore()->getId() - )->load(); + $summaryData = $this->_summaryFactory->create() + ->addEntityFilter($entityIds) + ->addStoreFilter($this->_storeManager->getStore()->getId()) + ->load(); - foreach ($collection->getItems() as $_item) { - foreach ($summaryData as $_summary) { - if ($_summary->getEntityPkValue() == $_item->getEntityId()) { - $_item->setRatingSummary($_summary); + foreach ($collection->getItems() as $item) { + foreach ($summaryData as $summary) { + if ($summary->getEntityPkValue() == $item->getEntityId()) { + $item->setRatingSummary($summary); } } } @@ -344,9 +370,8 @@ class Review extends \Magento\Framework\Model\AbstractModel { $store = $this->_storeManager->getStore($store); if ($store) { - return in_array($store->getId(), (array)$this->getStores()); + return in_array($store->getId(), (array) $this->getStores()); } - return false; } diff --git a/app/code/Magento/Review/etc/adminhtml/acl.xml b/app/code/Magento/Review/etc/adminhtml/acl.xml index 47bb54a3e79bdcf64c43075d1662ac15a13257ff..baab497a5fff3e50225667568163166253ce5d52 100644 --- a/app/code/Magento/Review/etc/adminhtml/acl.xml +++ b/app/code/Magento/Review/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Review/etc/adminhtml/di.xml b/app/code/Magento/Review/etc/adminhtml/di.xml index 3d6fc646b42dccfc58fa2aac02487159f3ce5ae1..7260638f2afe11f12d7179c9a9bb2f7ebe7f235e 100644 --- a/app/code/Magento/Review/etc/adminhtml/di.xml +++ b/app/code/Magento/Review/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Review\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">review</argument> diff --git a/app/code/Magento/Review/etc/adminhtml/events.xml b/app/code/Magento/Review/etc/adminhtml/events.xml index ad22b131c3d1f2cf46fc4593bf988065c0984ed3..2da9ea01ff871a3fb5c3e90277ce62a2d8c33ddb 100644 --- a/app/code/Magento/Review/etc/adminhtml/events.xml +++ b/app/code/Magento/Review/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_delete_after_done"> <observer name="review" instance="Magento\Review\Model\Observer" method="processProductAfterDeleteEvent" /> </event> diff --git a/app/code/Magento/Review/etc/adminhtml/routes.xml b/app/code/Magento/Review/etc/adminhtml/routes.xml index 23384e724c20a58309a14184dcb4d6a72c135d70..47eae073204a1d77c90f46f82833defce1b2fe65 100644 --- a/app/code/Magento/Review/etc/adminhtml/routes.xml +++ b/app/code/Magento/Review/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="review" frontName="review"> <module name="Magento_Review" /> diff --git a/app/code/Magento/Review/etc/di.xml b/app/code/Magento/Review/etc/di.xml index 8b888e3abacda6249bac7f35b15ef00ca444cd04..eb0efd7b65c070eddfd41c337d50310aea03ddfb 100644 --- a/app/code/Magento/Review/etc/di.xml +++ b/app/code/Magento/Review/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Catalog\Block\Product\ReviewRendererInterface" type="Magento\Review\Block\Product\ReviewRenderer" /> <type name="Magento\Framework\Model\ActionValidator\RemoveAction"> <arguments> @@ -39,4 +39,9 @@ </argument> </arguments> </type> + <type name="Magento\Review\Model\Review"> + <arguments> + <argument name="urlModel" xsi:type="object">Magento\Framework\Url</argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Review/etc/frontend/di.xml b/app/code/Magento/Review/etc/frontend/di.xml index ca19d82e77b95d5dee9a3e571354646b7d7415c7..7829e68592091779d97c8937375e4035637c50ac 100644 --- a/app/code/Magento/Review/etc/frontend/di.xml +++ b/app/code/Magento/Review/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Review\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">review</argument> diff --git a/app/code/Magento/Review/etc/frontend/events.xml b/app/code/Magento/Review/etc/frontend/events.xml index 6aa1120eb2448d15a2d5d83282dad558f7912cac..d733f9c5dc85aef237e0f122a9b1148a57c55298 100644 --- a/app/code/Magento/Review/etc/frontend/events.xml +++ b/app/code/Magento/Review/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="tag_tag_product_collection_load_after"> <observer name="review" instance="Magento\Review\Model\Observer" method="tagProductCollectionLoadAfter" shared="false" /> </event> diff --git a/app/code/Magento/Review/etc/frontend/routes.xml b/app/code/Magento/Review/etc/frontend/routes.xml index 08db32ae7dbd2bd23402e6e2ba471036ea2b4da4..ef9549b93c943ccdcaedb5e1594f706c007fc320 100644 --- a/app/code/Magento/Review/etc/frontend/routes.xml +++ b/app/code/Magento/Review/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="review" frontName="review"> <module name="Magento_Review" /> diff --git a/app/code/Magento/Review/etc/module.xml b/app/code/Magento/Review/etc/module.xml index d88e9e2871da2e6798f83a6c776538fef4a840b0..bc399c761d03632c60f92b943ba775e03ab44fdf 100644 --- a/app/code/Magento/Review/etc/module.xml +++ b/app/code/Magento/Review/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Review" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Review/view/adminhtml/add.phtml b/app/code/Magento/Review/view/adminhtml/templates/add.phtml similarity index 100% rename from app/code/Magento/Review/view/adminhtml/add.phtml rename to app/code/Magento/Review/view/adminhtml/templates/add.phtml diff --git a/app/code/Magento/Review/view/adminhtml/rating/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml similarity index 100% rename from app/code/Magento/Review/view/adminhtml/rating/detailed.phtml rename to app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml diff --git a/app/code/Magento/Review/view/adminhtml/rating/options.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml similarity index 100% rename from app/code/Magento/Review/view/adminhtml/rating/options.phtml rename to app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml diff --git a/app/code/Magento/Review/view/adminhtml/rating/stars/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml similarity index 100% rename from app/code/Magento/Review/view/adminhtml/rating/stars/detailed.phtml rename to app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml diff --git a/app/code/Magento/Review/view/adminhtml/rating/stars/summary.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml similarity index 100% rename from app/code/Magento/Review/view/adminhtml/rating/stars/summary.phtml rename to app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml diff --git a/app/code/Magento/Review/view/adminhtml/js/rating.js b/app/code/Magento/Review/view/adminhtml/web/js/rating.js similarity index 100% rename from app/code/Magento/Review/view/adminhtml/js/rating.js rename to app/code/Magento/Review/view/adminhtml/web/js/rating.js diff --git a/app/code/Magento/Review/view/adminhtml/rating/validation-rules.js b/app/code/Magento/Review/view/adminhtml/web/rating/validation-rules.js similarity index 100% rename from app/code/Magento/Review/view/adminhtml/rating/validation-rules.js rename to app/code/Magento/Review/view/adminhtml/web/rating/validation-rules.js diff --git a/app/code/Magento/Review/view/frontend/customer/list.phtml b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/customer/list.phtml rename to app/code/Magento/Review/view/frontend/templates/customer/list.phtml diff --git a/app/code/Magento/Review/view/frontend/customer/recent.phtml b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/customer/recent.phtml rename to app/code/Magento/Review/view/frontend/templates/customer/recent.phtml diff --git a/app/code/Magento/Review/view/frontend/customer/view.phtml b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/customer/view.phtml rename to app/code/Magento/Review/view/frontend/templates/customer/view.phtml diff --git a/app/code/Magento/Review/view/frontend/detailed.phtml b/app/code/Magento/Review/view/frontend/templates/detailed.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/detailed.phtml rename to app/code/Magento/Review/view/frontend/templates/detailed.phtml diff --git a/app/code/Magento/Review/view/frontend/empty.phtml b/app/code/Magento/Review/view/frontend/templates/empty.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/empty.phtml rename to app/code/Magento/Review/view/frontend/templates/empty.phtml diff --git a/app/code/Magento/Review/view/frontend/form.phtml b/app/code/Magento/Review/view/frontend/templates/form.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/form.phtml rename to app/code/Magento/Review/view/frontend/templates/form.phtml diff --git a/app/code/Magento/Review/view/frontend/helper/summary.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/helper/summary.phtml rename to app/code/Magento/Review/view/frontend/templates/helper/summary.phtml diff --git a/app/code/Magento/Review/view/frontend/helper/summary_short.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/helper/summary_short.phtml rename to app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml diff --git a/app/code/Magento/Review/view/frontend/product/view/count.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/count.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/product/view/count.phtml rename to app/code/Magento/Review/view/frontend/templates/product/view/count.phtml diff --git a/app/code/Magento/Review/view/frontend/product/view/list.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/product/view/list.phtml rename to app/code/Magento/Review/view/frontend/templates/product/view/list.phtml diff --git a/app/code/Magento/Review/view/frontend/product/view/other.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/product/view/other.phtml rename to app/code/Magento/Review/view/frontend/templates/product/view/other.phtml diff --git a/app/code/Magento/Review/view/frontend/redirect.phtml b/app/code/Magento/Review/view/frontend/templates/redirect.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/redirect.phtml rename to app/code/Magento/Review/view/frontend/templates/redirect.phtml diff --git a/app/code/Magento/Review/view/frontend/view.phtml b/app/code/Magento/Review/view/frontend/templates/view.phtml similarity index 100% rename from app/code/Magento/Review/view/frontend/view.phtml rename to app/code/Magento/Review/view/frontend/templates/view.phtml diff --git a/app/code/Magento/Rss/Block/Catalog/Review.php b/app/code/Magento/Rss/Block/Catalog/Review.php index d71b7613d338c0b17839786a8696c38f31f1e9fc..714d9bc3ca9420bb69865f3d6e6e719402871943 100644 --- a/app/code/Magento/Rss/Block/Catalog/Review.php +++ b/app/code/Magento/Rss/Block/Catalog/Review.php @@ -89,12 +89,10 @@ class Review extends \Magento\Backend\Block\AbstractBlock /** @var $reviewModel \Magento\Review\Model\Review */ $reviewModel = $this->_reviewFactory->create(); - $collection = $reviewModel->getProductCollection()->addStatusFilter( - $reviewModel->getPendingStatus() - )->addAttributeToSelect( - 'name', - 'inner' - )->setDateOrder(); + $collection = $reviewModel->getProductCollection() + ->addStatusFilter($reviewModel->getPendingStatus()) + ->addAttributeToSelect('name', 'inner') + ->setDateOrder(); $this->_eventManager->dispatch('rss_catalog_review_collection_select', array('collection' => $collection)); @@ -117,38 +115,22 @@ class Review extends \Magento\Backend\Block\AbstractBlock /** @var $rssObj \Magento\Rss\Model\Rss */ $rssObj = $args['rssObj']; $row = $args['row']; - - $productUrl = $this->_urlBuilder->setScope( - $row['store_id'] - )->getUrl( - 'catalog/product/view', - array('id' => $row['entity_id']) - ); + /** @var \Magento\Review\Model\Review $reviewModel */ + $reviewModel = $args['reviewModel']; + $productUrl = $reviewModel->getProductUrl($row['entity_id'], $row['store_id']); $reviewUrl = $this->getUrl( 'review/product/edit/', array('id' => $row['review_id'], '_secure' => true, '_nosecret' => true) ); $storeName = $this->_storeManager->getStore($row['store_id'])->getName(); - $description = '<p>' . __( - 'Product: <a href="%1">%2</a> <br/>', - $productUrl, - $row['name'] - ) . __( - 'Summary of review: %1 <br/>', - $row['title'] - ) . __( - 'Review: %1 <br/>', - $row['detail'] - ) . __( - 'Store: %1 <br/>', - $storeName - ) . __( - 'Click <a href="%1">here</a> to view the review.', - $reviewUrl - ) . '</p>'; + $description = '<p>' . __('Product: <a href="%1" target="_blank">%2</a> <br/>', $productUrl, $row['name']) + . __('Summary of review: %1 <br/>', $row['title']) . __('Review: %1 <br/>', $row['detail']) + . __('Store: %1 <br/>', $storeName) + . __('Click <a href="%1">here</a> to view the review.', $reviewUrl) + . '</p>'; $rssObj->_addEntry( array( - 'title' => __('Product: "%1" review By: %2', $row['name'], $row['nickname']), + 'title' => __('Product: "%1" reviewed by: %2', $row['name'], $row['nickname']), 'link' => 'test', 'description' => $description ) diff --git a/app/code/Magento/Rss/etc/adminhtml/acl.xml b/app/code/Magento/Rss/etc/adminhtml/acl.xml index 0e2370ca2f103ccff774f50a836d865c6a9063ea..b3a7b17e76adcc722780087ed60117996ff2b5af 100644 --- a/app/code/Magento/Rss/etc/adminhtml/acl.xml +++ b/app/code/Magento/Rss/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Rss/etc/adminhtml/di.xml b/app/code/Magento/Rss/etc/adminhtml/di.xml index 6be6fe14279721b8c21f2b7756a5cc8ff15a2896..111c8235aaeb05c7579a833ba67f4cc5679dd346 100644 --- a/app/code/Magento/Rss/etc/adminhtml/di.xml +++ b/app/code/Magento/Rss/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Rss\Controller\Adminhtml\Authenticate"> <plugin name="adminAuthentication" type="Magento\Rss\App\Action\Plugin\Authentication"/> </type> diff --git a/app/code/Magento/Rss/etc/adminhtml/routes.xml b/app/code/Magento/Rss/etc/adminhtml/routes.xml index e76a9ca12939302fd27d175d22e58f9c36f2d8b0..481e049916d3820eee99ff1eeb11c47ab7666b7f 100644 --- a/app/code/Magento/Rss/etc/adminhtml/routes.xml +++ b/app/code/Magento/Rss/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="rss" frontName="rss"> <module name="Magento_Rss_Adminhtml" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Rss/etc/di.xml b/app/code/Magento/Rss/etc/di.xml index 1eb0b3793c9d9266fc760c89ef79ae0ec15b6543..2c9f1eff2f2ae566f1de641b99d4a3c0710d19a3 100644 --- a/app/code/Magento/Rss/etc/di.xml +++ b/app/code/Magento/Rss/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Rss\Block\Context" type="Magento\Catalog\Block\Product\Context"> <arguments> <argument name="wishlistHelper" xsi:type="object">Magento\Rss\Helper\WishlistRss</argument> diff --git a/app/code/Magento/Rss/etc/frontend/routes.xml b/app/code/Magento/Rss/etc/frontend/routes.xml index 46bfcd2805fc687a95c1c850d6a19953b4297b7f..4464adc1d2d6e50ab6871811a78e51ca638025b7 100644 --- a/app/code/Magento/Rss/etc/frontend/routes.xml +++ b/app/code/Magento/Rss/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="rss" frontName="rss"> <module name="Magento_Rss" /> diff --git a/app/code/Magento/Rss/etc/module.xml b/app/code/Magento/Rss/etc/module.xml index 6c1323160745a2a2987fa3a3f754a4afb2b914c6..cd63a0e8e5e507c1ef79c7d9c6dc5c1136cd1f99 100644 --- a/app/code/Magento/Rss/etc/module.xml +++ b/app/code/Magento/Rss/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Rss" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Rss/view/frontend/category/link.phtml b/app/code/Magento/Rss/view/frontend/templates/category/link.phtml similarity index 100% rename from app/code/Magento/Rss/view/frontend/category/link.phtml rename to app/code/Magento/Rss/view/frontend/templates/category/link.phtml diff --git a/app/code/Magento/Rss/view/frontend/list.phtml b/app/code/Magento/Rss/view/frontend/templates/list.phtml similarity index 100% rename from app/code/Magento/Rss/view/frontend/list.phtml rename to app/code/Magento/Rss/view/frontend/templates/list.phtml diff --git a/app/code/Magento/Rss/view/frontend/order/details.phtml b/app/code/Magento/Rss/view/frontend/templates/order/details.phtml similarity index 100% rename from app/code/Magento/Rss/view/frontend/order/details.phtml rename to app/code/Magento/Rss/view/frontend/templates/order/details.phtml diff --git a/app/code/Magento/Rule/Model/Action/AbstractAction.php b/app/code/Magento/Rule/Model/Action/AbstractAction.php index ca0481bf29e757ef441078e81b496789fe2ff508..ae5f35814706e512d7d269284400399a40f647a8 100644 --- a/app/code/Magento/Rule/Model/Action/AbstractAction.php +++ b/app/code/Magento/Rule/Model/Action/AbstractAction.php @@ -32,9 +32,9 @@ use Magento\Framework\Data\Form\Element\AbstractElement; abstract class AbstractAction extends \Magento\Framework\Object implements ActionInterface { /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Framework\View\LayoutInterface @@ -42,16 +42,16 @@ abstract class AbstractAction extends \Magento\Framework\Object implements Actio protected $_layout; /** - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\LayoutInterface $layout * @param array $data */ public function __construct( - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\LayoutInterface $layout, array $data = array() ) { - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_layout = $layout; parent::__construct($data); @@ -330,7 +330,7 @@ abstract class AbstractAction extends \Magento\Framework\Object implements Actio */ public function getAddLinkHtml() { - $src = $this->_viewUrl->getViewFileUrl('images/rule_component_add.gif'); + $src = $this->_assetRepo->getUrl('images/rule_component_add.gif'); $html = '<img src="' . $src . '" alt="" class="rule-param-add v-middle" />'; return $html; } @@ -340,7 +340,7 @@ abstract class AbstractAction extends \Magento\Framework\Object implements Actio */ public function getRemoveLinkHtml() { - $src = $this->_viewUrl->getViewFileUrl('images/rule_component_remove.gif'); + $src = $this->_assetRepo->getUrl('images/rule_component_remove.gif'); $html = '<span class="rule-param"><a href="javascript:void(0)" class="rule-param-remove"><img src="' . $src . '" alt="" class="v-middle" /></a></span>'; diff --git a/app/code/Magento/Rule/Model/Action/Collection.php b/app/code/Magento/Rule/Model/Action/Collection.php index 9a8e23b02a764f18d9bb119769e12c8f51764c29..7e2390058da648f34078f1417abbb1ecb94311bb 100644 --- a/app/code/Magento/Rule/Model/Action/Collection.php +++ b/app/code/Magento/Rule/Model/Action/Collection.php @@ -31,13 +31,13 @@ class Collection extends AbstractAction protected $_actionFactory; /** - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\LayoutInterface $layout * @param \Magento\Rule\Model\ActionFactory $actionFactory * @param array $data */ public function __construct( - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\LayoutInterface $layout, \Magento\Rule\Model\ActionFactory $actionFactory, array $data = array() @@ -45,7 +45,7 @@ class Collection extends AbstractAction $this->_actionFactory = $actionFactory; $this->_layout = $layout; - parent::__construct($viewUrl, $layout, $data); + parent::__construct($assetRepo, $layout, $data); $this->setActions(array()); $this->setType('Magento\Rule\Model\Action\Collection'); diff --git a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php index bc89c13407b56cd405c07ec388dad02c5b0d7826..d7f7c8d3bb78cad053bcc435191f2e84ff1f5fff 100644 --- a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php +++ b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php @@ -61,9 +61,9 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co protected $_arrayInputTypes = array(); /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface @@ -81,7 +81,7 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co */ public function __construct(Context $context, array $data = array()) { - $this->_viewUrl = $context->getViewUrl(); + $this->_assetRepo = $context->getAssetRepository(); $this->_localeDate = $context->getLocaleDate(); $this->_layout = $context->getLayout(); @@ -626,7 +626,7 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co */ public function getAddLinkHtml() { - $src = $this->_viewUrl->getViewFileUrl('images/rule_component_add.gif'); + $src = $this->_assetRepo->getUrl('images/rule_component_add.gif'); $html = '<img src="' . $src . '" class="rule-param-add v-middle" alt="" title="' . __('Add') . '"/>'; return $html; } @@ -636,7 +636,7 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co */ public function getRemoveLinkHtml() { - $src = $this->_viewUrl->getViewFileUrl('images/rule_component_remove.gif'); + $src = $this->_assetRepo->getUrl('images/rule_component_remove.gif'); $html = ' <span class="rule-param"><a href="javascript:void(0)" class="rule-param-remove" title="' . __( 'Remove' ) . '"><img src="' . $src . '" alt="" class="v-middle" /></a></span>'; diff --git a/app/code/Magento/Rule/Model/Condition/Context.php b/app/code/Magento/Rule/Model/Condition/Context.php index d969c94fdc232ee093331d75033bcf797df068b0..9e818d074c04dfada37d66bb967d496bf7384a36 100644 --- a/app/code/Magento/Rule/Model/Condition/Context.php +++ b/app/code/Magento/Rule/Model/Condition/Context.php @@ -31,9 +31,9 @@ namespace Magento\Rule\Model\Condition; class Context implements \Magento\Framework\ObjectManager\ContextInterface { /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface @@ -56,20 +56,20 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface protected $_logger; /** - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Framework\View\LayoutInterface $layout * @param \Magento\Rule\Model\ConditionFactory $conditionFactory * @param \Magento\Framework\Logger $logger */ public function __construct( - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\View\LayoutInterface $layout, \Magento\Rule\Model\ConditionFactory $conditionFactory, \Magento\Framework\Logger $logger ) { - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_localeDate = $localeDate; $this->_layout = $layout; $this->_conditionFactory = $conditionFactory; @@ -77,11 +77,11 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface } /** - * @return \Magento\Framework\View\Url + * @return \Magento\Framework\View\Asset\Repository */ - public function getViewUrl() + public function getAssetRepository() { - return $this->_viewUrl; + return $this->_assetRepo; } /** diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php index a021013a8dbc0b8915938b77f88dfb34ddf389c0..c984002ae1eaf2bee9f7e47c569ef238ecc47544 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -285,7 +285,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon switch ($this->getAttribute()) { case 'sku': case 'category_ids': - $image = $this->_viewUrl->getViewFileUrl('images/rule_chooser_trigger.gif'); + $image = $this->_assetRepo->getUrl('images/rule_chooser_trigger.gif'); break; } @@ -409,7 +409,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon if (is_object($this->getAttributeObject())) { switch ($this->getAttributeObject()->getFrontendInput()) { case 'date': - $element->setImage($this->_viewUrl->getViewFileUrl('images/grid-cal.gif')); + $element->setImage($this->_assetRepo->getUrl('images/grid-cal.gif')); break; default: break; diff --git a/app/code/Magento/Rule/etc/module.xml b/app/code/Magento/Rule/etc/module.xml index 7a25be6adef825c24f63038a309de51302624204..3ffa4a7cf2c2f1e7f6580a83502aee5152c70b41 100644 --- a/app/code/Magento/Rule/etc/module.xml +++ b/app/code/Magento/Rule/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Rule" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Rule/view/adminhtml/rules.js b/app/code/Magento/Rule/view/adminhtml/web/rules.js similarity index 100% rename from app/code/Magento/Rule/view/adminhtml/rules.js rename to app/code/Magento/Rule/view/adminhtml/web/rules.js diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php index 31662089c813c09a9628ac8bdff2b205ec61ccc4..006b3fa5d827dafb4a3439a89e45fcf5a333d0ba 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php @@ -142,7 +142,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic return ''; } - if ($this->_getSession()->hasCustomerId()) { + if ($this->_getSession()->hasCustomerId() && $this->_getSession()->getCustomerId()) { $customerData = $this->_customerService->getCustomer($this->_getSession()->getCustomerId()); return $this->_customerViewHelper->getCustomerName($customerData); } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php index 762722487623937209d2ff43e6012f8a46525317..c58adca1e8848a36626ef8a16d86efa1e72b413a 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php @@ -130,19 +130,33 @@ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate foreach ($items as $item) { // To dispatch inventory event sales_quote_item_qty_set_after, set item qty $item->setQty($item->getQty()); - $stockItem = $item->getProduct()->getStockItem(); - if ($stockItem instanceof \Magento\CatalogInventory\Model\Stock\Item) { - // This check has been performed properly in Inventory observer, so it has no sense - /* - $check = $stockItem->checkQuoteItemQty($item->getQty(), $item->getQty(), $item->getQty()); - $item->setMessage($check->getMessage()); - $item->setHasError($check->getHasError()); - */ - if ($item->getProduct()->getStatus() == ProductStatus::STATUS_DISABLED) { - $item->setMessage(__('This product is disabled.')); - $item->setHasError(true); + + if (!$item->getMessage()) { + //Getting stock items for last quantity validation before grid display + $stockItemToCheck = array(); + + $childItems = $item->getChildren(); + if (count($childItems)) { + foreach ($childItems as $childItem) { + $stockItemToCheck[] = $childItem->getProduct()->getStockItem(); + } + } else { + $stockItemToCheck[] = $item->getProduct()->getStockItem(); + } + + foreach ($stockItemToCheck as $stockItem) { + if ($stockItem instanceof \Magento\CatalogInventory\Model\Stock\Item) { + $check = $stockItem->checkQuoteItemQty($item->getQty(), $item->getQty(), $item->getQty()); + $item->setMessage($check->getMessage()); + $item->setHasError($check->getHasError()); + } } } + + if ($item->getProduct()->getStatus() == ProductStatus::STATUS_DISABLED) { + $item->setMessage(__('This product is disabled.')); + $item->setHasError(true); + } } $this->getQuote()->setIsSuperMode($oldSuperMode); return $items; diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php index a663a8a62a5f0fdfa9d88d7d4f856c16c0aac23c..267d7c4deaf27c2bac93f38337f9ddc49c8c4ec9 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Status/Assign/Form.php @@ -122,6 +122,11 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic array('name' => 'is_default', 'label' => __('Use Order Status As Default'), 'value' => 1) ); + $fieldset->addField( + 'visible_on_front', + 'checkbox', + array('name' => 'visible_on_front', 'label' => __('Visible On Frontend'), 'value' => 1) + ); $form->setAction($this->getUrl('sales/order_status/assignPost')); $form->setUseContainer(true); diff --git a/app/code/Magento/Sales/Block/Order/History.php b/app/code/Magento/Sales/Block/Order/History.php index 924fb3b7c84ee18e632664ab58e45b77fb9113b5..1a9403726cd3a288df3e34e96f99a9e0a34abd2d 100644 --- a/app/code/Magento/Sales/Block/Order/History.php +++ b/app/code/Magento/Sales/Block/Order/History.php @@ -82,8 +82,8 @@ class History extends \Magento\Framework\View\Element\Template 'customer_id', $this->_customerSession->getCustomer()->getId() )->addFieldToFilter( - 'state', - array('in' => $this->_orderConfig->getVisibleOnFrontStates()) + 'status', + array('in' => $this->_orderConfig->getVisibleOnFrontStatuses()) )->setOrder( 'created_at', 'desc' diff --git a/app/code/Magento/Sales/Block/Order/Recent.php b/app/code/Magento/Sales/Block/Order/Recent.php index b1dc87b748fcf43cad606855b7b723b20e4342a6..8e5b596f1422b375a1c92d1313eefc558831a515 100644 --- a/app/code/Magento/Sales/Block/Order/Recent.php +++ b/app/code/Magento/Sales/Block/Order/Recent.php @@ -90,8 +90,8 @@ class Recent extends \Magento\Framework\View\Element\Template 'customer_id', $this->_customerSession->getCustomer()->getId() )->addAttributeToFilter( - 'state', - array('in' => $this->_orderConfig->getVisibleOnFrontStates()) + 'status', + array('in' => $this->_orderConfig->getVisibleOnFrontStatuses()) )->addAttributeToSort( 'created_at', 'desc' diff --git a/app/code/Magento/Sales/Block/Reorder/Sidebar.php b/app/code/Magento/Sales/Block/Reorder/Sidebar.php index 2346f45276834116f9c39e1309c6c7469798a77e..aec1518410413088e5dee94810ed1b0e7c1b9f30 100644 --- a/app/code/Magento/Sales/Block/Reorder/Sidebar.php +++ b/app/code/Magento/Sales/Block/Reorder/Sidebar.php @@ -108,8 +108,8 @@ class Sidebar extends \Magento\Framework\View\Element\Template implements \Magen 'customer_id', $customerId )->addAttributeToFilter( - 'state', - array('in' => $this->_orderConfig->getVisibleOnFrontStates()) + 'status', + array('in' => $this->_orderConfig->getVisibleOnFrontStatuses()) )->addAttributeToSort( 'created_at', 'desc' diff --git a/app/code/Magento/Sales/Controller/AbstractController.php b/app/code/Magento/Sales/Controller/AbstractController.php index 057c8b6c899bf8d7e5045b2cd36980504c254ffd..fb65d0748a7b94156bb57a95b72d05632fe38054 100644 --- a/app/code/Magento/Sales/Controller/AbstractController.php +++ b/app/code/Magento/Sales/Controller/AbstractController.php @@ -39,8 +39,10 @@ abstract class AbstractController extends \Magento\Framework\App\Action\Action * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\Registry $coreRegistry */ - public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry) - { + public function __construct( + \Magento\Framework\App\Action\Context $context, + \Magento\Framework\Registry $coreRegistry + ) { $this->_coreRegistry = $coreRegistry; parent::__construct($context); } @@ -54,12 +56,12 @@ abstract class AbstractController extends \Magento\Framework\App\Action\Action protected function _canViewOrder($order) { $customerId = $this->_objectManager->get('Magento\Customer\Model\Session')->getCustomerId(); - $availableStates = $this->_objectManager->get('Magento\Sales\Model\Order\Config')->getVisibleOnFrontStates(); - if ($order->getId() && $order->getCustomerId() && $order->getCustomerId() == $customerId && in_array( - $order->getState(), - $availableStates, - true - ) + $availableStatuses = $this->_objectManager->get('Magento\Sales\Model\Order\Config') + ->getVisibleOnFrontStatuses(); + if ($order->getId() + && $order->getCustomerId() + && $order->getCustomerId() == $customerId + && in_array($order->getStatus(), $availableStatuses, true) ) { return true; } diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php index d772795c8ad360ed02bc080c295681c0a23b72da..4637f63a949ac65b3195b1f46cdf230261c3e3d1 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Status.php @@ -200,10 +200,11 @@ class Status extends \Magento\Backend\App\Action if ($data) { $state = $this->getRequest()->getParam('state'); $isDefault = $this->getRequest()->getParam('is_default'); + $visibleOnFront = $this->getRequest()->getParam('visible_on_front'); $status = $this->_initStatus(); if ($status && $status->getStatus()) { try { - $status->assignState($state, $isDefault); + $status->assignState($state, $isDefault, $visibleOnFront); $this->messageManager->addSuccess(__('You have assigned the order status.')); $this->_redirect('sales/*/'); return; diff --git a/app/code/Magento/Sales/Model/Email/Template.php b/app/code/Magento/Sales/Model/Email/Template.php index 7592792472e855340945db3423ba3eae1e032ab2..e2fc7063d3eb93e56eb913b144563ab20db919b8 100644 --- a/app/code/Magento/Sales/Model/Email/Template.php +++ b/app/code/Magento/Sales/Model/Email/Template.php @@ -21,8 +21,12 @@ * @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) */ + namespace Magento\Sales\Model\Email; +/** + * Sales email template model + */ class Template extends \Magento\Email\Model\Template { /** @@ -32,7 +36,7 @@ class Template extends \Magento\Email\Model\Template */ public function getInclude($template, array $variables) { - $filename = $this->_viewFileSystem->getFilename($template); + $filename = $this->_viewFileSystem->getTemplateFileName($template); if (!$filename) { return ''; } diff --git a/app/code/Magento/Sales/Model/Order/Config.php b/app/code/Magento/Sales/Model/Order/Config.php index 12db9f0776e362e4177b96f489a279efa87f1e59..eb3cf72690d3ce80335b773bb70d283695ac28b6 100644 --- a/app/code/Magento/Sales/Model/Order/Config.php +++ b/app/code/Magento/Sales/Model/Order/Config.php @@ -31,29 +31,29 @@ class Config /** * @var \Magento\Sales\Model\Resource\Order\Status\Collection */ - protected $_collection; + protected $collection; /** * Statuses per state array * * @var array */ - protected $_stateStatuses; + protected $stateStatuses; /** * @var array */ - private $_states; + private $statuses; /** * @var Status */ - protected $_orderStatusFactory; + protected $orderStatusFactory; /** * @var \Magento\Sales\Model\Resource\Order\Status\CollectionFactory */ - protected $_orderStatusCollectionFactory; + protected $orderStatusCollectionFactory; /** * Constructor @@ -65,8 +65,8 @@ class Config \Magento\Sales\Model\Order\StatusFactory $orderStatusFactory, \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $orderStatusCollectionFactory ) { - $this->_orderStatusFactory = $orderStatusFactory; - $this->_orderStatusCollectionFactory = $orderStatusCollectionFactory; + $this->orderStatusFactory = $orderStatusFactory; + $this->orderStatusCollectionFactory = $orderStatusCollectionFactory; } /** @@ -74,10 +74,10 @@ class Config */ protected function _getCollection() { - if ($this->_collection == null) { - $this->_collection = $this->_orderStatusCollectionFactory->create()->joinStates(); + if ($this->collection == null) { + $this->collection = $this->orderStatusCollectionFactory->create()->joinStates(); } - return $this->_collection; + return $this->collection; } /** @@ -105,7 +105,7 @@ class Config $status = false; $stateNode = $this->_getState($state); if ($stateNode) { - $status = $this->_orderStatusFactory->create()->loadDefaultByState($state); + $status = $this->orderStatusFactory->create()->loadDefaultByState($state); $status = $status->getStatus(); } return $status; @@ -119,7 +119,7 @@ class Config */ public function getStatusLabel($code) { - $status = $this->_orderStatusFactory->create()->load($code); + $status = $this->orderStatusFactory->create()->load($code); return $status->getStoreLabel(); } @@ -145,7 +145,7 @@ class Config */ public function getStatuses() { - $statuses = $this->_orderStatusCollectionFactory->create()->toOptionHash(); + $statuses = $this->orderStatusCollectionFactory->create()->toOptionHash(); return $statuses; } @@ -175,8 +175,8 @@ class Config public function getStateStatuses($state, $addLabels = true) { $key = md5(serialize(array($state, $addLabels))); - if (isset($this->_stateStatuses[$key])) { - return $this->_stateStatuses[$key]; + if (isset($this->stateStatuses[$key])) { + return $this->stateStatuses[$key]; } $statuses = array(); @@ -186,7 +186,7 @@ class Config foreach ($state as $_state) { $stateNode = $this->_getState($_state); if ($stateNode) { - $collection = $this->_orderStatusCollectionFactory->create()->addStateFilter($_state)->orderByLabel(); + $collection = $this->orderStatusCollectionFactory->create()->addStateFilter($_state)->orderByLabel(); foreach ($collection as $item) { $status = $item->getData('status'); if ($addLabels) { @@ -197,7 +197,7 @@ class Config } } } - $this->_stateStatuses[$key] = $statuses; + $this->stateStatuses[$key] = $statuses; return $statuses; } @@ -206,35 +206,36 @@ class Config * * @return array */ - public function getVisibleOnFrontStates() + public function getVisibleOnFrontStatuses() { - return $this->_getStates(true); + return $this->_getStatuses(true); } /** - * Get order states, visible on frontend + * Get order statuses, invisible on frontend * * @return array */ - public function getInvisibleOnFrontStates() + public function getInvisibleOnFrontStatuses() { - return $this->_getStates(false); + return $this->_getStatuses(false); } /** - * @param bool $visibility + * Get existing order statuses + * Visible or invisible on frontend according to passed param * + * @param bool $visibility * @return array */ - protected function _getStates($visibility) + protected function _getStatuses($visibility) { - $visibility = (bool)$visibility; - if ($this->_states == null) { + if ($this->statuses == null) { foreach ($this->_getCollection() as $item) { - $visible = (bool)$item->getData('visible_on_front'); - $this->_states[$visible][] = $item->getData('state'); + $visible = (bool) $item->getData('visible_on_front'); + $this->statuses[$visible][] = $item->getData('status'); } } - return $this->_states[$visibility]; + return $this->statuses[(bool) $visibility]; } } diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php index 23ae364ccdd470d4c374cb67d97b2b1d33a90896..e34716cca608d585183ebb1ae4bea4e09ae652d7 100644 --- a/app/code/Magento/Sales/Model/Order/Payment.php +++ b/app/code/Magento/Sales/Model/Order/Payment.php @@ -337,71 +337,102 @@ class Payment extends \Magento\Payment\Model\Info $methodInstance->setStore($order->getStoreId()); $orderState = \Magento\Sales\Model\Order::STATE_NEW; - $stateObject = new \Magento\Framework\Object(); + $orderStatus = $methodInstance->getConfigData('order_status'); + $isCustomerNotified = false; - /** - * Do order payment validation on payment method level - */ + // Do order payment validation on payment method level $methodInstance->validate(); $action = $methodInstance->getConfigPaymentAction(); + if ($action) { if ($methodInstance->isInitializeNeeded()) { - /** - * For method initialization we have to use original config value for payment action - */ + $stateObject = new \Magento\Framework\Object(); + // For method initialization we have to use original config value for payment action $methodInstance->initialize($methodInstance->getConfigData('payment_action'), $stateObject); + $orderState = $stateObject->getState() ?: $orderState; + $orderStatus = $stateObject->getStatus() ?: $orderStatus; + $isCustomerNotified = $stateObject->getIsNotified(); } else { $orderState = \Magento\Sales\Model\Order::STATE_PROCESSING; - switch ($action) { - case \Magento\Payment\Model\Method\AbstractMethod::ACTION_ORDER: - $this->_order($order->getBaseTotalDue()); - break; - case \Magento\Payment\Model\Method\AbstractMethod::ACTION_AUTHORIZE: - $this->_authorize(true, $order->getBaseTotalDue()); - // base amount will be set inside - $this->setAmountAuthorized($order->getTotalDue()); - break; - case \Magento\Payment\Model\Method\AbstractMethod::ACTION_AUTHORIZE_CAPTURE: - $this->setAmountAuthorized($order->getTotalDue()); - $this->setBaseAmountAuthorized($order->getBaseTotalDue()); - $this->capture(null); - break; - default: - break; - } + $this->processAction($action, $order); } } - $orderIsNotified = null; - if ($stateObject->getState() && $stateObject->getStatus()) { - $orderState = $stateObject->getState(); - $orderStatus = $stateObject->getStatus(); - $orderIsNotified = $stateObject->getIsNotified(); - } else { - $orderStatus = $methodInstance->getConfigData('order_status'); - if (!$orderStatus) { - $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState); - } - } - $isCustomerNotified = null !== $orderIsNotified ? $orderIsNotified : $order->getCustomerNoteNotify(); - $message = $order->getCustomerNote(); + $isCustomerNotified = $isCustomerNotified ?: $order->getCustomerNoteNotify(); - // add message if order was put into review during authorization or capture - if ($order->getState() == \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW) { - if ($message) { - $order->addStatusToHistory($order->getStatus(), $message, $isCustomerNotified); - } - } elseif ($order->getState() && ($orderStatus !== $order->getStatus() || $message)) { - $order->setState($orderState, $orderStatus, $message, $isCustomerNotified); - } elseif ($order->getState() != $orderState || $order->getStatus() != $orderStatus || $message) { - $order->setState($orderState, $orderStatus, $message, $isCustomerNotified); + if (!in_array($orderStatus, $order->getConfig()->getStateStatuses($orderState))) { + $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState); } + $this->updateOrder($order, $orderState, $orderStatus, $isCustomerNotified); + $this->_eventManager->dispatch('sales_order_payment_place_end', array('payment' => $this)); return $this; } + /** + * Set appropriate state to order or add status to order history + * + * @param \Magento\Sales\Model\Order $order + * @param string $orderState + * @param string $orderStatus + * @param bool $isCustomerNotified + * @return void + */ + protected function updateOrder(\Magento\Sales\Model\Order $order, $orderState, $orderStatus, $isCustomerNotified) + { + // add message if order was put into review during authorization or capture + $message = $order->getCustomerNote(); + $originalOrderState = $order->getState(); + $originalOrderStatus = $order->getStatus(); + + switch (true) { + case ($message && ($originalOrderState == \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW)): + $order->addStatusToHistory($originalOrderStatus, $message, $isCustomerNotified); + break; + case ($message): + case ($originalOrderState && $message): + case ($originalOrderState != $orderState): + case ($originalOrderStatus != $orderStatus): + $order->setState($orderState, $orderStatus, $message, $isCustomerNotified); + break; + default: + break; + } + } + + /** + * Perform actions based on passed action name + * + * @param string $action + * @param \Magento\Sales\Model\Order $order + * @return void + */ + protected function processAction($action, \Magento\Sales\Model\Order $order) + { + $totalDue = $order->getTotalDue(); + $baseTotalDue = $order->getBaseTotalDue(); + + switch ($action) { + case \Magento\Payment\Model\Method\AbstractMethod::ACTION_ORDER: + $this->_order($baseTotalDue); + break; + case \Magento\Payment\Model\Method\AbstractMethod::ACTION_AUTHORIZE: + $this->_authorize(true, $baseTotalDue); + // base amount will be set inside + $this->setAmountAuthorized($totalDue); + break; + case \Magento\Payment\Model\Method\AbstractMethod::ACTION_AUTHORIZE_CAPTURE: + $this->setAmountAuthorized($totalDue); + $this->setBaseAmountAuthorized($baseTotalDue); + $this->capture(null); + break; + default: + break; + } + } + /** * Capture the payment online * Requires an invoice. If there is no invoice specified, will automatically prepare an invoice for order diff --git a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php index 9422e2040c50372b982dabbfd52613de09e08de9..68c63ee63d3dc9836931d69a225a3614742e422a 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php @@ -841,7 +841,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object protected function _setFontRegular($object, $size = 7) { $font = \Zend_Pdf_Font::fontWithPath( - $this->_rootDirectory->getAbsolutePath('lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf') + $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf') ); $object->setFont($font, $size); return $font; @@ -857,7 +857,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object protected function _setFontBold($object, $size = 7) { $font = \Zend_Pdf_Font::fontWithPath( - $this->_rootDirectory->getAbsolutePath('lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf') + $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf') ); $object->setFont($font, $size); return $font; @@ -873,7 +873,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object protected function _setFontItalic($object, $size = 7) { $font = \Zend_Pdf_Font::fontWithPath( - $this->_rootDirectory->getAbsolutePath('lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf') + $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_It-2.8.2.ttf') ); $object->setFont($font, $size); return $font; diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php index ac0761bb5b7ebef934dcf16352fc19c524cea293..2ae59f42080f0993b6558cbd9951915778be5a01 100644 --- a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php @@ -350,7 +350,7 @@ abstract class AbstractItems extends \Magento\Framework\Model\AbstractModel protected function _setFontRegular($size = 7) { $font = \Zend_Pdf_Font::fontWithPath( - $this->_rootDirectory->getAbsolutePath('lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf') + $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf') ); $this->getPage()->setFont($font, $size); return $font; @@ -365,7 +365,7 @@ abstract class AbstractItems extends \Magento\Framework\Model\AbstractModel protected function _setFontBold($size = 7) { $font = \Zend_Pdf_Font::fontWithPath( - $this->_rootDirectory->getAbsolutePath('lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf') + $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf') ); $this->getPage()->setFont($font, $size); return $font; @@ -380,7 +380,7 @@ abstract class AbstractItems extends \Magento\Framework\Model\AbstractModel protected function _setFontItalic($size = 7) { $font = \Zend_Pdf_Font::fontWithPath( - $this->_rootDirectory->getAbsolutePath('lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf') + $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_It-2.8.2.ttf') ); $this->getPage()->setFont($font, $size); return $font; diff --git a/app/code/Magento/Sales/Model/Order/Status.php b/app/code/Magento/Sales/Model/Order/Status.php index 18937a5960badeed86bf325d09990a94ecb8997e..baf4bcc821d535b954e8d440a4cdcc2409a0724b 100644 --- a/app/code/Magento/Sales/Model/Order/Status.php +++ b/app/code/Magento/Sales/Model/Order/Status.php @@ -62,18 +62,21 @@ class Status extends \Magento\Framework\Model\AbstractModel * Assign order status to particular state * * @param string $state - * @param boolean $isDefault make the status as default one for state + * @param bool $isDefault make the status as default one for state + * @param bool $visibleOnFront * @return $this * @throws \Exception */ - public function assignState($state, $isDefault = false) + public function assignState($state, $isDefault = false, $visibleOnFront = false) { - $this->_getResource()->beginTransaction(); + /** @var \Magento\Sales\Model\Resource\Order\Status $resource */ + $resource = $this->_getResource(); + $resource->beginTransaction(); try { - $this->_getResource()->assignState($this->getStatus(), $state, $isDefault); - $this->_getResource()->commit(); + $resource->assignState($this->getStatus(), $state, $isDefault, $visibleOnFront); + $resource->commit(); } catch (\Exception $e) { - $this->_getResource()->rollBack(); + $resource->rollBack(); throw $e; } return $this; @@ -88,14 +91,16 @@ class Status extends \Magento\Framework\Model\AbstractModel */ public function unassignState($state) { - $this->_getResource()->beginTransaction(); + /** @var \Magento\Sales\Model\Resource\Order\Status $resource */ + $resource = $this->_getResource(); + $resource->beginTransaction(); try { - $this->_getResource()->unassignState($this->getStatus(), $state); - $this->_getResource()->commit(); - $params = array('status' => $this->getStatus(), 'state' => $state); + $resource->unassignState($this->getStatus(), $state); + $resource->commit(); + $params = ['status' => $this->getStatus(), 'state' => $state]; $this->_eventManager->dispatch('sales_order_status_unassign', $params); } catch (\Exception $e) { - $this->_getResource()->rollBack(); + $resource->rollBack(); throw $e; } return $this; diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php index 1d7c9e6cf2d6304afab3d46168286d834ef2f8c0..72808e0480709133713aaa56cf4f768542e7519d 100644 --- a/app/code/Magento/Sales/Model/Quote.php +++ b/app/code/Magento/Sales/Model/Quote.php @@ -2037,16 +2037,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel $addresses = $this->getAllAddresses(); if ($multishipping) { - if ($minOrderMulti) { - foreach ($addresses as $address) { - foreach ($address->getQuote()->getItemsCollection() as $item) { - $amount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount(); - if ($amount < $minAmount) { - return false; - } - } - } - } else { + if (!$minOrderMulti) { $baseTotal = 0; foreach ($addresses as $address) { /* @var $address Address */ diff --git a/app/code/Magento/Sales/Model/Quote/Address/AbstractCarrierInterface.php b/app/code/Magento/Sales/Model/Quote/Address/AbstractCarrierInterface.php index 008faf29b218c6493e2c5bc68d4d62401b85fd82..41ce8b4d6a1e114c647e0f7ed8268cdb68a8be27 100644 --- a/app/code/Magento/Sales/Model/Quote/Address/AbstractCarrierInterface.php +++ b/app/code/Magento/Sales/Model/Quote/Address/AbstractCarrierInterface.php @@ -131,15 +131,6 @@ interface AbstractCarrierInterface */ public function getSortOrder(); - /** - * Calculate price considering free shipping and handling fee - * - * @param string $cost - * @param string $method - * @return float|string - */ - public function getMethodPrice($cost, $method = ''); - /** * Get the handling fee for the shipping + cost * diff --git a/app/code/Magento/Sales/Model/Resource/Order/Status.php b/app/code/Magento/Sales/Model/Resource/Order/Status.php index 8618cb3c78c8e60cc1f5782393a0ec0d8df35abb..d7c855469cb1c78a87d84f0cd397cd887b5332e0 100644 --- a/app/code/Magento/Sales/Model/Resource/Order/Status.php +++ b/app/code/Magento/Sales/Model/Resource/Order/Status.php @@ -140,20 +140,26 @@ class Status extends \Magento\Framework\Model\Resource\Db\AbstractDb * @param string $status * @param string $state * @param bool $isDefault + * @param bool $visibleOnFront * @return $this */ - public function assignState($status, $state, $isDefault) + public function assignState($status, $state, $isDefault, $visibleOnFront = false) { if ($isDefault) { $this->_getWriteAdapter()->update( $this->_stateTable, - array('is_default' => 0), - array('state = ?' => $state) + ['is_default' => 0], + ['state = ?' => $state] ); } $this->_getWriteAdapter()->insertOnDuplicate( $this->_stateTable, - array('status' => $status, 'state' => $state, 'is_default' => (int)$isDefault) + [ + 'status' => $status, + 'state' => $state, + 'is_default' => (int)$isDefault, + 'visible_on_front' => (int)$visibleOnFront + ] ); return $this; } diff --git a/app/code/Magento/Sales/etc/adminhtml/acl.xml b/app/code/Magento/Sales/etc/adminhtml/acl.xml index e1bedd62e6a33cf5a0dd589df1e329b4b2642958..b92215e664fcf6bfcd8f6dab07d3f13ec54fa3cc 100644 --- a/app/code/Magento/Sales/etc/adminhtml/acl.xml +++ b/app/code/Magento/Sales/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Sales/etc/adminhtml/events.xml b/app/code/Magento/Sales/etc/adminhtml/events.xml index 78a8b603c760c01ff8b9d5ff758ac6b9a09e9775..bca587904314ccdfb375ec3fcc5e89c9837c5022 100644 --- a/app/code/Magento/Sales/etc/adminhtml/events.xml +++ b/app/code/Magento/Sales/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_product_delete_before"> <observer name="sales_quote_observer" instance="Magento\Sales\Model\Observer\Backend\CatalogProductQuote" method="subtractQtyFromQuotes" /> </event> diff --git a/app/code/Magento/Sales/etc/adminhtml/routes.xml b/app/code/Magento/Sales/etc/adminhtml/routes.xml index 9403bf6918323d7656274086d2e8618c2109f8af..d6634833bfc056591c1384f59ef2d000929debaa 100644 --- a/app/code/Magento/Sales/etc/adminhtml/routes.xml +++ b/app/code/Magento/Sales/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="sales" frontName="sales"> <module name="Magento_Sales" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Sales/etc/di.xml b/app/code/Magento/Sales/etc/di.xml index c0a8c520e30e075657e2e6f0c0251979b881ea65..e002ac9b155e8ee7f7ec4694cc4dee5acc444ccc 100644 --- a/app/code/Magento/Sales/etc/di.xml +++ b/app/code/Magento/Sales/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Sales\Model\Resource\Report" shared="false" /> <type name="Magento\Sales\Model\Order\Pdf\Config\Reader"> <arguments> diff --git a/app/code/Magento/Sales/etc/events.xml b/app/code/Magento/Sales/etc/events.xml index d139e63b07f05d54e22b04b4278e457f894f9396..9910d259433192cc71075626cd8fc80552acd88d 100644 --- a/app/code/Magento/Sales/etc/events.xml +++ b/app/code/Magento/Sales/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_order_place_after"> <observer name="sales_vat_request_params_order_comment" instance="Magento\Sales\Model\Observer" method="addVatRequestParamsOrderComment" /> </event> diff --git a/app/code/Magento/Sales/etc/fieldset.xml b/app/code/Magento/Sales/etc/fieldset.xml index b0e7f686e889643d4e43629b12b221ee83c3d29c..f81a8e5dd54e6ed3640a518649702abf5c9fd202 100644 --- a/app/code/Magento/Sales/etc/fieldset.xml +++ b/app/code/Magento/Sales/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_copy_order"> <field name="customer_email"> diff --git a/app/code/Magento/Sales/etc/frontend/di.xml b/app/code/Magento/Sales/etc/frontend/di.xml index 57c59161ada3aab92f3af848df2c7bd11ecac285..e417a782684cea5d932b1951c4e7eca6013d895a 100644 --- a/app/code/Magento/Sales/etc/frontend/di.xml +++ b/app/code/Magento/Sales/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Core\Model\Url\SecurityInfo"> <arguments> <argument name="secureUrlList" xsi:type="array"> diff --git a/app/code/Magento/Sales/etc/frontend/events.xml b/app/code/Magento/Sales/etc/frontend/events.xml index da26182bb1942d8181623b071c8a38c4a212c5f2..d57edc0533e807b74f3a4c2e44e7aae223dbfa9c 100644 --- a/app/code/Magento/Sales/etc/frontend/events.xml +++ b/app/code/Magento/Sales/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_quote_address_collect_totals_before"> <observer name="sales_customer_validate_vat_number" instance="Magento\Sales\Model\Observer\Frontend\Quote\Address\CollectTotals" method="dispatch" /> </event> diff --git a/app/code/Magento/Sales/etc/frontend/routes.xml b/app/code/Magento/Sales/etc/frontend/routes.xml index 9d07a156e42476bd0d89926a3920830059a47219..321d12e268b6da52fcb63cc219062019e8bc0c64 100644 --- a/app/code/Magento/Sales/etc/frontend/routes.xml +++ b/app/code/Magento/Sales/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="sales" frontName="sales"> <module name="Magento_Sales" /> diff --git a/app/code/Magento/Sales/etc/module.xml b/app/code/Magento/Sales/etc/module.xml index cc1160fb70f38dcd8c8e4dc76bd6cd41d6f42db5..80e5a3b4a6fee4e05a789b1ace4df660da6c9ec5 100644 --- a/app/code/Magento/Sales/etc/module.xml +++ b/app/code/Magento/Sales/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Sales" version="1.6.0.12" active="true"> <sequence> <module name="Magento_Rule"/> diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml index a9976e0717fa42c54b2fc277da461e19c03adfbb..c868e50b74934a348509751d5b0436af570f87ca 100644 --- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml +++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_status_index.xml @@ -79,6 +79,26 @@ </argument> </arguments> </block> + <block class="Magento\Backend\Block\Widget\Grid\Column" as="visible_on_front"> + <arguments> + <argument name="header" xsi:type="string" translate="true">Visible On Frontend</argument> + <argument name="index" xsi:type="string">visible_on_front</argument> + <argument name="type" xsi:type="string">options</argument> + <argument name="sortable" xsi:type="string">0</argument> + <argument name="column_css_class" xsi:type="string">col-status-visible</argument> + <argument name="header_css_class" xsi:type="string">col-status-visible</argument> + <argument name="options" xsi:type="array"> + <item name="no" xsi:type="array"> + <item name="value" xsi:type="string">0</item> + <item name="label" xsi:type="string" translate="true">No</item> + </item> + <item name="yes" xsi:type="array"> + <item name="value" xsi:type="string">1</item> + <item name="label" xsi:type="string" translate="true">Yes</item> + </item> + </argument> + </arguments> + </block> <block class="Magento\Sales\Block\Status\Grid\Column\State" as="state"> <arguments> <argument name="header" xsi:type="string" translate="true">State Code and Title</argument> diff --git a/app/code/Magento/Sales/view/adminhtml/items/column/name.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/items/column/name.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/items/column/qty.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/items/column/qty.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/items/column/qty.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/items/renderer/default.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/address/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/address/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/address/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/address/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/comments/view.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/comments/view.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/abstract.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/abstract.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/abstract.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/abstract.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/billing/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/billing/method/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/comment.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/comment.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/coupons/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/coupons/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/data.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/data.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/form/account.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/account.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/form/account.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/form/account.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/form/address.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/form/address.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/giftmessage.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/giftmessage.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/items.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/items.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/items/grid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/items/grid.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/js.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/js.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/js.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/js.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/newsletter/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/newsletter/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/shipping/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/shipping/method/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/sidebar.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/sidebar.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/sidebar/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/sidebar/items.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/store/select.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/store/select.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/totals.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/totals.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/totals/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/totals/default.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/totals/grandtotal.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/totals/grandtotal.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/totals/shipping.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/totals/shipping.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/totals/subtotal.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/totals/subtotal.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/totals/tax.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/items.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/items/renderer/default.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/totals/adjustments.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/creditmemo/create/totals/adjustments.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/creditmemo/view/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/creditmemo/view/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/creditmemo/view/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/creditmemo/view/items.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/creditmemo/view/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/creditmemo/view/items/renderer/default.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/giftoptions.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/giftoptions.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/giftoptions.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/invoice/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/invoice/create/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/invoice/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/invoice/create/items.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/invoice/create/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/invoice/create/items/renderer/default.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/invoice/view/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/invoice/view/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/invoice/view/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/invoice/view/items.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/invoice/view/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/invoice/view/items/renderer/default.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totalbar.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totalbar.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totalbar.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/discount.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/discount.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/discount.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/discount.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/due.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/due.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/footer.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/footer.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/footer.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/footer.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/grand.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/grand.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/item.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/item.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/item.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/item.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/main.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/main.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/main.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/main.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/paid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/paid.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/paid.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/paid.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/refunded.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/refunded.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/refunded.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/refunded.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/shipping.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/shipping.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/shipping.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/shipping.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/totals/tax.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/form.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/form.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/giftmessage.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/giftmessage.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/giftmessage.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/giftmessage.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/history.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/history.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/info.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/info.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/info.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/items.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/items.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/items/renderer/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/items/renderer/default.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/tab/history.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/history.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/tab/history.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/history.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/tab/info.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/view/tab/info.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/page/js/components.phtml b/app/code/Magento/Sales/view/adminhtml/templates/page/js/components.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/page/js/components.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/page/js/components.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/transactions/detail.phtml b/app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/transactions/detail.phtml rename to app/code/Magento/Sales/view/adminhtml/templates/transactions/detail.phtml diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/giftmessage.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/giftmessage.js similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/create/giftmessage.js rename to app/code/Magento/Sales/view/adminhtml/web/order/create/giftmessage.js diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js similarity index 99% rename from app/code/Magento/Sales/view/adminhtml/order/create/scripts.js rename to app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js index 72efd85f214feba2e0c3b2f34ab889f58337a20d..78245571189691eeac32245e9b3331869d804ed7 100644 --- a/app/code/Magento/Sales/view/adminhtml/order/create/scripts.js +++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js @@ -405,6 +405,7 @@ AdminOrder.prototype = { applyCoupon : function(code){ this.loadArea(['items', 'shipping_method', 'totals', 'billing_method'], true, {'order[coupon][code]':code, reset_shipping: true}); + this.orderItemChanged = false; }, addProduct : function(id){ diff --git a/app/code/Magento/Sales/view/adminhtml/order/edit/message.js b/app/code/Magento/Sales/view/adminhtml/web/order/edit/message.js similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/edit/message.js rename to app/code/Magento/Sales/view/adminhtml/web/order/edit/message.js diff --git a/app/code/Magento/Sales/view/adminhtml/order/giftoptions_tooltip.js b/app/code/Magento/Sales/view/adminhtml/web/order/giftoptions_tooltip.js similarity index 100% rename from app/code/Magento/Sales/view/adminhtml/order/giftoptions_tooltip.js rename to app/code/Magento/Sales/view/adminhtml/web/order/giftoptions_tooltip.js diff --git a/app/code/Magento/Sales/view/frontend/email/creditmemo/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/creditmemo/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/creditmemo/items.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/creditmemo/items.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/invoice/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/invoice/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/invoice/items.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/invoice/items.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/items.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/items.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/items/creditmemo/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/items/creditmemo/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/items/creditmemo/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/items/invoice/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/items/invoice/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/items/order/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/order/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/items/order/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/items/order/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/items/shipment/default.phtml b/app/code/Magento/Sales/view/frontend/templates/email/items/shipment/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/items/shipment/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/items/shipment/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/shipment/items.phtml b/app/code/Magento/Sales/view/frontend/templates/email/shipment/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/shipment/items.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/shipment/items.phtml diff --git a/app/code/Magento/Sales/view/frontend/email/shipment/track.phtml b/app/code/Magento/Sales/view/frontend/templates/email/shipment/track.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/email/shipment/track.phtml rename to app/code/Magento/Sales/view/frontend/templates/email/shipment/track.phtml diff --git a/app/code/Magento/Sales/view/frontend/guest/form.phtml b/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/guest/form.phtml rename to app/code/Magento/Sales/view/frontend/templates/guest/form.phtml diff --git a/app/code/Magento/Sales/view/frontend/js/components.phtml b/app/code/Magento/Sales/view/frontend/templates/js/components.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/js/components.phtml rename to app/code/Magento/Sales/view/frontend/templates/js/components.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/comments.phtml b/app/code/Magento/Sales/view/frontend/templates/order/comments.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/comments.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/comments.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/creditmemo.phtml b/app/code/Magento/Sales/view/frontend/templates/order/creditmemo.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/creditmemo.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/creditmemo.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/creditmemo/items.phtml b/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/creditmemo/items.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/creditmemo/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/creditmemo/items/renderer/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/history.phtml b/app/code/Magento/Sales/view/frontend/templates/order/history.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/history.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/history.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/info.phtml b/app/code/Magento/Sales/view/frontend/templates/order/info.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/info.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/info.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/info/buttons.phtml b/app/code/Magento/Sales/view/frontend/templates/order/info/buttons.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/info/buttons.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/info/buttons.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/invoice.phtml b/app/code/Magento/Sales/view/frontend/templates/order/invoice.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/invoice.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/invoice.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/invoice/items.phtml b/app/code/Magento/Sales/view/frontend/templates/order/invoice/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/invoice/items.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/invoice/items.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/invoice/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/invoice/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/invoice/items/renderer/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/invoice/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/items.phtml b/app/code/Magento/Sales/view/frontend/templates/order/items.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/items.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/items.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/items/renderer/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/print.phtml b/app/code/Magento/Sales/view/frontend/templates/order/print.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/print.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/print.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/print/creditmemo.phtml b/app/code/Magento/Sales/view/frontend/templates/order/print/creditmemo.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/print/creditmemo.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/print/creditmemo.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/print/invoice.phtml b/app/code/Magento/Sales/view/frontend/templates/order/print/invoice.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/print/invoice.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/print/invoice.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/print/shipment.phtml b/app/code/Magento/Sales/view/frontend/templates/order/print/shipment.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/print/shipment.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/print/shipment.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/recent.phtml b/app/code/Magento/Sales/view/frontend/templates/order/recent.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/recent.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/recent.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/shipment/items/renderer/default.phtml b/app/code/Magento/Sales/view/frontend/templates/order/shipment/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/shipment/items/renderer/default.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/shipment/items/renderer/default.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/totals.phtml b/app/code/Magento/Sales/view/frontend/templates/order/totals.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/totals.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/totals.phtml diff --git a/app/code/Magento/Sales/view/frontend/order/view.phtml b/app/code/Magento/Sales/view/frontend/templates/order/view.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/order/view.phtml rename to app/code/Magento/Sales/view/frontend/templates/order/view.phtml diff --git a/app/code/Magento/Sales/view/frontend/reorder/sidebar.phtml b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/reorder/sidebar.phtml rename to app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml diff --git a/app/code/Magento/Sales/view/frontend/widget/guest/form.phtml b/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml similarity index 100% rename from app/code/Magento/Sales/view/frontend/widget/guest/form.phtml rename to app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml diff --git a/app/code/Magento/Sales/view/frontend/gift-message.js b/app/code/Magento/Sales/view/frontend/web/gift-message.js similarity index 100% rename from app/code/Magento/Sales/view/frontend/gift-message.js rename to app/code/Magento/Sales/view/frontend/web/gift-message.js diff --git a/app/code/Magento/Sales/view/frontend/orders-returns.js b/app/code/Magento/Sales/view/frontend/web/orders-returns.js similarity index 100% rename from app/code/Magento/Sales/view/frontend/orders-returns.js rename to app/code/Magento/Sales/view/frontend/web/orders-returns.js diff --git a/app/code/Magento/SalesRule/Model/Rule/Action/Collection.php b/app/code/Magento/SalesRule/Model/Rule/Action/Collection.php index 6450f3500070cbd4f6002a86b3d7407f566f61ce..a0ef3bc6c6046cc47c6af8f454328bd27f916a6e 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Action/Collection.php +++ b/app/code/Magento/SalesRule/Model/Rule/Action/Collection.php @@ -26,18 +26,18 @@ namespace Magento\SalesRule\Model\Rule\Action; class Collection extends \Magento\Rule\Model\Action\Collection { /** - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\LayoutInterface $layout * @param \Magento\Rule\Model\ActionFactory $actionFactory * @param array $data */ public function __construct( - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\LayoutInterface $layout, \Magento\Rule\Model\ActionFactory $actionFactory, array $data = array() ) { - parent::__construct($viewUrl, $layout, $actionFactory, $data); + parent::__construct($assetRepo, $layout, $actionFactory, $data); $this->setType('Magento\SalesRule\Model\Rule\Action\Collection'); } diff --git a/app/code/Magento/SalesRule/etc/adminhtml/acl.xml b/app/code/Magento/SalesRule/etc/adminhtml/acl.xml index 8ec451e7226b6baa53baa32ba523510a909ca96d..b23b3d35206e56686e45d597069e5bb1996759da 100644 --- a/app/code/Magento/SalesRule/etc/adminhtml/acl.xml +++ b/app/code/Magento/SalesRule/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/SalesRule/etc/adminhtml/di.xml b/app/code/Magento/SalesRule/etc/adminhtml/di.xml index a5fb0ca129f5d4e1f1443d19d4a8d2facea341dc..4618b580e89e45ce6db98661d0254284166d3b78 100644 --- a/app/code/Magento/SalesRule/etc/adminhtml/di.xml +++ b/app/code/Magento/SalesRule/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\SalesRule\Helper\Coupon"> <arguments> <argument name="couponParameters" xsi:type="array"> diff --git a/app/code/Magento/SalesRule/etc/adminhtml/events.xml b/app/code/Magento/SalesRule/etc/adminhtml/events.xml index 7d572c0f2343f84ef00f2954482e668f39a18a02..f4b0258f4926ac84ba2a0427e0d3d80bf87af579 100644 --- a/app/code/Magento/SalesRule/etc/adminhtml/events.xml +++ b/app/code/Magento/SalesRule/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_entity_attribute_delete_after"> <observer name="salesrule" instance="Magento\SalesRule\Model\Observer" method="catalogAttributeDeleteAfter" /> </event> diff --git a/app/code/Magento/SalesRule/etc/adminhtml/routes.xml b/app/code/Magento/SalesRule/etc/adminhtml/routes.xml index 16316ebebf3540c0a6d57f3ac43ca9bc5094b80e..28cb7a7ae0c3988919fcb5132ec74829e951457e 100644 --- a/app/code/Magento/SalesRule/etc/adminhtml/routes.xml +++ b/app/code/Magento/SalesRule/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="sales_rule" frontName="sales_rule"> <module name="Magento_SalesRule" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/SalesRule/etc/di.xml b/app/code/Magento/SalesRule/etc/di.xml index 7ef91f4136d7213fb2d1f844bc05db0801f85091..964c0212e85b49c21955672c8db79b6b6f556be8 100644 --- a/app/code/Magento/SalesRule/etc/di.xml +++ b/app/code/Magento/SalesRule/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\SalesRule\Model\Resource\Rule\Collection" shared="false" /> <type name="Magento\Sales\Model\Quote\Config"> <plugin name="append_sales_rule_keys_to_quote" type="Magento\SalesRule\Model\Plugin\QuoteConfigProductAttributes"/> diff --git a/app/code/Magento/SalesRule/etc/events.xml b/app/code/Magento/SalesRule/etc/events.xml index 5fbdd1e7c49afeb0353d3af0aa6cf591dc8161f2..9fb91f66916599ae3574b9d7c5de2d0d2f5a0e7d 100644 --- a/app/code/Magento/SalesRule/etc/events.xml +++ b/app/code/Magento/SalesRule/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_order_place_after"> <observer name="salesrule" instance="Magento\SalesRule\Model\Observer" method="salesOrderAfterPlace" /> </event> diff --git a/app/code/Magento/SalesRule/etc/fieldset.xml b/app/code/Magento/SalesRule/etc/fieldset.xml index 54c10c1b504e52f1793ba5fdf9c30236aba524f2..a2c9dd17662d3dc26a468405bcf97106b8b4d333 100644 --- a/app/code/Magento/SalesRule/etc/fieldset.xml +++ b/app/code/Magento/SalesRule/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_address"> <field name="discount_description"> diff --git a/app/code/Magento/SalesRule/etc/module.xml b/app/code/Magento/SalesRule/etc/module.xml index 181adf3bb82ea45ae721bb88950a255cf288435d..9473ffe728eeaad9f18dd6708a12819fa4b31541 100644 --- a/app/code/Magento/SalesRule/etc/module.xml +++ b/app/code/Magento/SalesRule/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_SalesRule" version="1.6.0.4" active="true"> <sequence> <module name="Magento_Rule"/> diff --git a/app/code/Magento/SalesRule/view/adminhtml/promo/salesrulejs.phtml b/app/code/Magento/SalesRule/view/adminhtml/templates/promo/salesrulejs.phtml similarity index 100% rename from app/code/Magento/SalesRule/view/adminhtml/promo/salesrulejs.phtml rename to app/code/Magento/SalesRule/view/adminhtml/templates/promo/salesrulejs.phtml diff --git a/app/code/Magento/Sendfriend/etc/frontend/events.xml b/app/code/Magento/Sendfriend/etc/frontend/events.xml index 0cbe5ef470732db64907be11c02737185e32670e..3e795e729cd906f32399e2ea6852ad37099446b4 100644 --- a/app/code/Magento/Sendfriend/etc/frontend/events.xml +++ b/app/code/Magento/Sendfriend/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_controller_product_view"> <observer name="sendfriend" instance="Magento\Sendfriend\Model\Observer" method="register" /> </event> diff --git a/app/code/Magento/Sendfriend/etc/frontend/routes.xml b/app/code/Magento/Sendfriend/etc/frontend/routes.xml index d594e827d7b77501dc52911dccc64cddccf0bd72..6d1b8f5e9128041e5141d8bd81f743595827a238 100644 --- a/app/code/Magento/Sendfriend/etc/frontend/routes.xml +++ b/app/code/Magento/Sendfriend/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="sendfriend" frontName="sendfriend"> <module name="Magento_Sendfriend" /> diff --git a/app/code/Magento/Sendfriend/etc/module.xml b/app/code/Magento/Sendfriend/etc/module.xml index e36768cc091ca0c852eaf75e9d4dc736b5696f67..677d686992ac5be6cd5b5db12f3bf65b4e3fa200 100644 --- a/app/code/Magento/Sendfriend/etc/module.xml +++ b/app/code/Magento/Sendfriend/etc/module.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Sendfriend" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Sendfriend/view/frontend/send.phtml b/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml similarity index 100% rename from app/code/Magento/Sendfriend/view/frontend/send.phtml rename to app/code/Magento/Sendfriend/view/frontend/templates/send.phtml diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php index 97e6f65918ba817bac839030115a572cdc6d68ae..e45325b71bec540b74cbddc006ab351bc3f5014f 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php @@ -452,26 +452,6 @@ abstract class AbstractCarrier extends \Magento\Framework\Object implements Abst } } - /** - * Calculate price considering free shipping and handling fee - * - * @param string $cost - * @param string $method - * @return float|string - */ - public function getMethodPrice($cost, $method = '') - { - return $method == $this->getConfigData( - $this->_freeMethod - ) && (!$this->getConfigFlag( - 'free_shipping_enable' - ) || $this->getConfigData( - 'free_shipping_subtotal' - ) <= $this->_rawRequest->getBaseSubtotalInclTax()) ? '0.00' : $this->getFinalPriceWithHandlingFee( - $cost - ); - } - /** * Get the handling fee for the shipping + cost * diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php index 25acd7cc1f857427fce770c096793a77870ef10d..4e49f5597e96121c7b84a280be67949b412a94f9 100644 --- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php +++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php @@ -107,6 +107,13 @@ abstract class AbstractCarrierOnline extends AbstractCarrier */ protected $_currencyFactory; + /** + * Raw rate request data + * + * @var \Magento\Framework\Object|null + */ + protected $_rawRequest = null; + /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory @@ -568,4 +575,34 @@ abstract class AbstractCarrierOnline extends AbstractCarrier { return false; } + + /** + * @param \Magento\Framework\Object|null $request + * @return $this + */ + public function setRawRequest($request) + { + $this->_rawRequest = $request; + return $this; + } + + /** + * Calculate price considering free shipping and handling fee + * + * @param string $cost + * @param string $method + * @return float|string + */ + public function getMethodPrice($cost, $method = '') + { + return $method == $this->getConfigData( + $this->_freeMethod + ) && $this->getConfigFlag( + 'free_shipping_enable' + ) && $this->getConfigData( + 'free_shipping_subtotal' + ) <= $this->_rawRequest->getBaseSubtotalInclTax() ? '0.00' : $this->getFinalPriceWithHandlingFee( + $cost + ); + } } diff --git a/app/code/Magento/Shipping/etc/adminhtml/acl.xml b/app/code/Magento/Shipping/etc/adminhtml/acl.xml index 08f7a77fe3803fe0cc5a8a2a75eeee783e544919..277cd0ce9f79c3d3aafa17daf2b6149aa13b566c 100644 --- a/app/code/Magento/Shipping/etc/adminhtml/acl.xml +++ b/app/code/Magento/Shipping/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Shipping/etc/adminhtml/di.xml b/app/code/Magento/Shipping/etc/adminhtml/di.xml index 349ddeff3b17b958dafe7993607cad1b124b0c0d..e3119ac3a520da000e1745fc55ebcf47f2d11d40 100644 --- a/app/code/Magento/Shipping/etc/adminhtml/di.xml +++ b/app/code/Magento/Shipping/etc/adminhtml/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Shipping\Model\Shipping" type="Magento\Shipping\Model\Shipping\Labels" /> </config> diff --git a/app/code/Magento/Shipping/etc/adminhtml/routes.xml b/app/code/Magento/Shipping/etc/adminhtml/routes.xml index 0ce9bb6b90b3e5c5a01495c11f0e0e95b7acfb8d..0e7667bf6785c3c83f4d78441eb462b12b04fa28 100644 --- a/app/code/Magento/Shipping/etc/adminhtml/routes.xml +++ b/app/code/Magento/Shipping/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Shipping" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Shipping/etc/di.xml b/app/code/Magento/Shipping/etc/di.xml index 51def6c24d1b0c88a56c5a70643cc65f604dcf82..9fc1119d4e8ebeef6e293a8780213af21377d004 100644 --- a/app/code/Magento/Shipping/etc/di.xml +++ b/app/code/Magento/Shipping/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Sales\Model\Quote\Address\RateCollectorInterface" type="Magento\Shipping\Model\Shipping" /> <preference for="Magento\Sales\Model\Quote\Address\CarrierFactoryInterface" type="Magento\Shipping\Model\CarrierFactory" /> <preference for="Magento\Shipping\Model\Carrier\Source\GenericInterface" type="\Magento\Shipping\Model\Carrier\Source\GenericDefault" /> diff --git a/app/code/Magento/Shipping/etc/frontend/routes.xml b/app/code/Magento/Shipping/etc/frontend/routes.xml index 940b418aa4aa87c5028fe30f32207440112973b1..7697ac53ae2251b807152637e1741cdb4c9462c8 100644 --- a/app/code/Magento/Shipping/etc/frontend/routes.xml +++ b/app/code/Magento/Shipping/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="shipping" frontName="shipping"> <module name="Magento_Shipping" /> diff --git a/app/code/Magento/Shipping/etc/module.xml b/app/code/Magento/Shipping/etc/module.xml index d2b5e732c33c3902f12596dcc6d87ad63e7399f4..34d73231ab3182b3aa21ebf6c1dc11141c16ee28 100644 --- a/app/code/Magento/Shipping/etc/module.xml +++ b/app/code/Magento/Shipping/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Shipping" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Shipping/view/adminhtml/create/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/create/form.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/create/items.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/create/items.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/create/items/renderer/default.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/create/items/renderer/default.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/create/items/renderer/default.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/order/Tracking/view.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/Tracking/view.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/order/Tracking/view.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/order/Tracking/view.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/order/packaging/grid.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/order/packaging/grid.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/order/packaging/packed.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/order/packaging/packed.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/order/packaging/popup.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/order/packaging/popup.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/order/tracking.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/order/tracking.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/order/view/info.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/order/view/info.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/view/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/view/form.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/view/items.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/view/items.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/view/items/renderer/default.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/items/renderer/default.phtml similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/view/items/renderer/default.phtml rename to app/code/Magento/Shipping/view/adminhtml/templates/view/items/renderer/default.phtml diff --git a/app/code/Magento/Shipping/view/adminhtml/order/packaging.js b/app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js similarity index 100% rename from app/code/Magento/Shipping/view/adminhtml/order/packaging.js rename to app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js diff --git a/app/code/Magento/Shipping/view/frontend/items.phtml b/app/code/Magento/Shipping/view/frontend/templates/items.phtml similarity index 100% rename from app/code/Magento/Shipping/view/frontend/items.phtml rename to app/code/Magento/Shipping/view/frontend/templates/items.phtml diff --git a/app/code/Magento/Shipping/view/frontend/order/shipment.phtml b/app/code/Magento/Shipping/view/frontend/templates/order/shipment.phtml similarity index 100% rename from app/code/Magento/Shipping/view/frontend/order/shipment.phtml rename to app/code/Magento/Shipping/view/frontend/templates/order/shipment.phtml diff --git a/app/code/Magento/Shipping/view/frontend/tracking/link.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml similarity index 100% rename from app/code/Magento/Shipping/view/frontend/tracking/link.phtml rename to app/code/Magento/Shipping/view/frontend/templates/tracking/link.phtml diff --git a/app/code/Magento/Shipping/view/frontend/tracking/popup.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml similarity index 100% rename from app/code/Magento/Shipping/view/frontend/tracking/popup.phtml rename to app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml diff --git a/app/code/Magento/Sitemap/etc/adminhtml/acl.xml b/app/code/Magento/Sitemap/etc/adminhtml/acl.xml index c7d535dce9c4500b4668014a71c32753c4a90a0a..5d5c2b7c7c97918b0d690487a37fd3d088954c25 100644 --- a/app/code/Magento/Sitemap/etc/adminhtml/acl.xml +++ b/app/code/Magento/Sitemap/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Sitemap/etc/adminhtml/routes.xml b/app/code/Magento/Sitemap/etc/adminhtml/routes.xml index 20b3ec3ec6b462254aeb806d8a06bd2341df8ec9..241002221ed39b64da6a357b87fccf8b6876fa18 100644 --- a/app/code/Magento/Sitemap/etc/adminhtml/routes.xml +++ b/app/code/Magento/Sitemap/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Sitemap" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Sitemap/etc/di.xml b/app/code/Magento/Sitemap/etc/di.xml index 700de5218f738efedc2dceb104680815887adeb7..fb66d2bfb3c3649869678d3b2778c57ae36c090d 100644 --- a/app/code/Magento/Sitemap/etc/di.xml +++ b/app/code/Magento/Sitemap/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Sitemap\Model\Sitemap"> <arguments> <argument name="resource" xsi:type="object">Magento\Sitemap\Model\Resource\Sitemap</argument> diff --git a/app/code/Magento/Sitemap/etc/module.xml b/app/code/Magento/Sitemap/etc/module.xml index 609f5cc52ccdddb0007edeea9fb18e880a0ff828..6799e965400d34124cb981cdb928cad052cf4a2b 100644 --- a/app/code/Magento/Sitemap/etc/module.xml +++ b/app/code/Magento/Sitemap/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Sitemap" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php index 465b1776793d6f6ed2af9cbf7376b334f31989ea..3e52c98e2eae2d653048defdfcae559e9397cb36 100644 --- a/app/code/Magento/Store/Model/Store.php +++ b/app/code/Magento/Store/Model/Store.php @@ -76,18 +76,10 @@ class Store extends AbstractModel implements const XML_PATH_UNSECURE_BASE_LINK_URL = 'web/unsecure/base_link_url'; - const XML_PATH_SECURE_BASE_LIB_URL = 'web/secure/base_lib_url'; - - const XML_PATH_UNSECURE_BASE_LIB_URL = 'web/unsecure/base_lib_url'; - const XML_PATH_SECURE_BASE_STATIC_URL = 'web/secure/base_static_url'; const XML_PATH_UNSECURE_BASE_STATIC_URL = 'web/unsecure/base_static_url'; - const XML_PATH_SECURE_BASE_CACHE_URL = 'web/secure/base_cache_url'; - - const XML_PATH_UNSECURE_BASE_CACHE_URL = 'web/unsecure/base_cache_url'; - const XML_PATH_SECURE_BASE_MEDIA_URL = 'web/secure/base_media_url'; const XML_PATH_UNSECURE_BASE_MEDIA_URL = 'web/unsecure/base_media_url'; @@ -580,19 +572,6 @@ class Store extends AbstractModel implements $url = $this->_updatePathUseRewrites($url); break; - case \Magento\Framework\UrlInterface::URL_TYPE_LIB: - $path = $secure ? self::XML_PATH_SECURE_BASE_LIB_URL : self::XML_PATH_UNSECURE_BASE_LIB_URL; - $url = $this->_getConfig($path); - if (!$url) { - $url = $this->getBaseUrl( - \Magento\Framework\UrlInterface::URL_TYPE_WEB, - $secure - ) . $this->filesystem->getUri( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR - ); - } - break; - case \Magento\Framework\UrlInterface::URL_TYPE_STATIC: $path = $secure ? self::XML_PATH_SECURE_BASE_STATIC_URL : self::XML_PATH_UNSECURE_BASE_STATIC_URL; $url = $this->_getConfig($path); @@ -606,19 +585,6 @@ class Store extends AbstractModel implements } break; - case \Magento\Framework\UrlInterface::URL_TYPE_CACHE: - $path = $secure ? self::XML_PATH_SECURE_BASE_CACHE_URL : self::XML_PATH_UNSECURE_BASE_CACHE_URL; - $url = $this->_getConfig($path); - if (!$url) { - $url = $this->getBaseUrl( - \Magento\Framework\UrlInterface::URL_TYPE_WEB, - $secure - ) . $this->filesystem->getUri( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - ); - } - break; - case \Magento\Framework\UrlInterface::URL_TYPE_MEDIA: $url = $this->_getMediaScriptUrl($this->filesystem, $secure); if (!$url) { diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index b36bfe84fd1e5f126ada9f16b3ab95c5a0b309d7..a5cbe17abdf4daec6b59b3ffe3720a6ae1f5b037 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\Module\Updater\SetupFactory"> <arguments> <argument name="resourceTypes" xsi:type="array"> diff --git a/app/code/Magento/Store/etc/frontend/di.xml b/app/code/Magento/Store/etc/frontend/di.xml index 8e3e9a61833213803d922947e8de141605b1071b..956752b786f6ba0760c847abb5b697120d4f306b 100644 --- a/app/code/Magento/Store/etc/frontend/di.xml +++ b/app/code/Magento/Store/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\FrontController"> <plugin name="requestPreprocessor" type="Magento\Store\App\FrontController\Plugin\RequestPreprocessor" sortOrder="50"/> </type> diff --git a/app/code/Magento/Store/etc/module.xml b/app/code/Magento/Store/etc/module.xml index ab638bfe4f64fcdbcb259e46f94a5efb8edabcf3..157da61d7c187e5ed5580d6c2f1bcb2e82a086d9 100644 --- a/app/code/Magento/Store/etc/module.xml +++ b/app/code/Magento/Store/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Store" version="2.0.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Store/view/frontend/switch/flags.phtml b/app/code/Magento/Store/view/frontend/templates/switch/flags.phtml similarity index 100% rename from app/code/Magento/Store/view/frontend/switch/flags.phtml rename to app/code/Magento/Store/view/frontend/templates/switch/flags.phtml diff --git a/app/code/Magento/Store/view/frontend/switch/languages.phtml b/app/code/Magento/Store/view/frontend/templates/switch/languages.phtml similarity index 100% rename from app/code/Magento/Store/view/frontend/switch/languages.phtml rename to app/code/Magento/Store/view/frontend/templates/switch/languages.phtml diff --git a/app/code/Magento/Store/view/frontend/switch/stores.phtml b/app/code/Magento/Store/view/frontend/templates/switch/stores.phtml similarity index 100% rename from app/code/Magento/Store/view/frontend/switch/stores.phtml rename to app/code/Magento/Store/view/frontend/templates/switch/stores.phtml diff --git a/app/code/Magento/Tax/etc/adminhtml/acl.xml b/app/code/Magento/Tax/etc/adminhtml/acl.xml index 837517ea3b87fff5a3f8c9bde93d71e1756b80af..2f84eb4523a2ac1b6810db7277c2d1ccb87778b4 100644 --- a/app/code/Magento/Tax/etc/adminhtml/acl.xml +++ b/app/code/Magento/Tax/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Tax/etc/adminhtml/routes.xml b/app/code/Magento/Tax/etc/adminhtml/routes.xml index 0df2f8fe88e9e45a1aa55a7f47581e4e7584280b..c8255c434b11128c72787c58de4a2e301af202b0 100644 --- a/app/code/Magento/Tax/etc/adminhtml/routes.xml +++ b/app/code/Magento/Tax/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="tax" frontName="tax"> <module name="Magento_Tax" /> diff --git a/app/code/Magento/Tax/etc/di.xml b/app/code/Magento/Tax/etc/di.xml index f916d6a5490c25a2236f6e5fd9aa8a34ac3ab4e0..2e0a6513eac231ea7f31b07ef40ee5acc6c52af5 100644 --- a/app/code/Magento/Tax/etc/di.xml +++ b/app/code/Magento/Tax/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Tax\Helper\Data"> <arguments> <argument name="taxConfig" xsi:type="object">Magento\Tax\Model\Config\Proxy</argument> diff --git a/app/code/Magento/Tax/etc/events.xml b/app/code/Magento/Tax/etc/events.xml index 1e45dd4cdd7ea6bbe9861f201c24012a0c353bb7..25f9156c435e75b4eef5d52696c85618be87b010 100644 --- a/app/code/Magento/Tax/etc/events.xml +++ b/app/code/Magento/Tax/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="sales_convert_quote_address_to_order"> <observer name="tax" instance="Magento\Tax\Model\Observer" method="salesEventConvertQuoteAddressToOrder" /> </event> diff --git a/app/code/Magento/Tax/etc/fieldset.xml b/app/code/Magento/Tax/etc/fieldset.xml index caffbb520ad11e82c54465b64f699a972a209f8c..89f280c35bfbe803706c3167a8db49b4e514977a 100644 --- a/app/code/Magento/Tax/etc/fieldset.xml +++ b/app/code/Magento/Tax/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_address"> <field name="subtotal_incl_tax"> diff --git a/app/code/Magento/Tax/etc/module.xml b/app/code/Magento/Tax/etc/module.xml index 11fadea58db848614a890dcfcb9b775b62043b41..39c8385237c06b43917c1f0d6099460299f72b52 100644 --- a/app/code/Magento/Tax/etc/module.xml +++ b/app/code/Magento/Tax/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Tax" version="1.6.0.6" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Tax/view/adminhtml/class/page/edit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/class/page/edit.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/class/page/edit.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/class/page/edit.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/importExport.phtml b/app/code/Magento/Tax/view/adminhtml/templates/importExport.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/importExport.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/importExport.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/importExportHeader.phtml b/app/code/Magento/Tax/view/adminhtml/templates/importExportHeader.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/importExportHeader.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/importExportHeader.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/rate/form.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/rate/js.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/rate/js.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/rate/title.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/rate/title.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/rule/edit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/rule/edit.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/rule/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/rule/rate/form.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/toolbar/class/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/toolbar/class/add.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/toolbar/class/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/toolbar/class/save.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/toolbar/rate/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/toolbar/rate/add.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/toolbar/rate/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/toolbar/rate/save.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/toolbar/rule/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/toolbar/rule/add.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/toolbar/rule/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml similarity index 100% rename from app/code/Magento/Tax/view/adminhtml/toolbar/rule/save.phtml rename to app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml diff --git a/app/code/Magento/Tax/view/base/pricing/adjustment.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml similarity index 86% rename from app/code/Magento/Tax/view/base/pricing/adjustment.phtml rename to app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml index 23e2b92fb67143943d833f249b4591f1f0b4e39c..448e736b231bcea95c3c93b5f3ed567fc7c6ddee 100644 --- a/app/code/Magento/Tax/view/base/pricing/adjustment.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml @@ -26,9 +26,9 @@ <?php /** @var \Magento\Tax\Pricing\Render\Adjustment $this */ ?> <?php if ($this->displayBothPrices()): ?> -<span id="<?php echo $this->buildIdWithPrefix('price-including-tax-') ?>" - data-label="<?php echo __('Incl. Tax') ?>" - class="price-wrapper price-including-tax"> + <span id="<?php echo $this->buildIdWithPrefix('price-including-tax-') ?>" + data-label="<?php echo __('Incl. Tax') ?>" + class="price-wrapper price-including-tax"> <span class="price" ><?php echo $this->getDisplayAmount(false) ?></span> </span> <?php endif; ?> diff --git a/app/code/Magento/Tax/view/base/pricing/adjustment/bundle.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml similarity index 100% rename from app/code/Magento/Tax/view/base/pricing/adjustment/bundle.phtml rename to app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml diff --git a/app/code/Magento/Tax/view/base/pricing/adjustment/downloadable.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/downloadable.phtml similarity index 100% rename from app/code/Magento/Tax/view/base/pricing/adjustment/downloadable.phtml rename to app/code/Magento/Tax/view/base/templates/pricing/adjustment/downloadable.phtml diff --git a/app/code/Magento/Tax/view/frontend/checkout/discount.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/discount.phtml similarity index 100% rename from app/code/Magento/Tax/view/frontend/checkout/discount.phtml rename to app/code/Magento/Tax/view/frontend/templates/checkout/discount.phtml diff --git a/app/code/Magento/Tax/view/frontend/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml similarity index 100% rename from app/code/Magento/Tax/view/frontend/checkout/grandtotal.phtml rename to app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml diff --git a/app/code/Magento/Tax/view/frontend/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml similarity index 100% rename from app/code/Magento/Tax/view/frontend/checkout/shipping.phtml rename to app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml diff --git a/app/code/Magento/Tax/view/frontend/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml similarity index 100% rename from app/code/Magento/Tax/view/frontend/checkout/subtotal.phtml rename to app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml diff --git a/app/code/Magento/Tax/view/frontend/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml similarity index 100% rename from app/code/Magento/Tax/view/frontend/checkout/tax.phtml rename to app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml diff --git a/app/code/Magento/Tax/view/frontend/order/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml similarity index 100% rename from app/code/Magento/Tax/view/frontend/order/tax.phtml rename to app/code/Magento/Tax/view/frontend/templates/order/tax.phtml diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php index ad562af85d79ac8790d5c25679d4fb27b4d326a1..24cf71586969fb540d001351bef9d5cfbd6a5f2f 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php @@ -22,38 +22,15 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Form\Element; + /** * Image form element that generates correct thumbnail image URL for theme preview image + * + * @method \Magento\Core\Model\Theme getTheme() */ -namespace Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Form\Element; - class Image extends \Magento\Framework\Data\Form\Element\Image { - /** - * @var \Magento\Framework\View\Design\Theme\Image\PathInterface - */ - protected $_imagePath; - - /** - * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement - * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection - * @param \Magento\Framework\Escaper $escaper - * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Magento\Framework\View\Design\Theme\Image\PathInterface $imagePath - * @param array $data - */ - public function __construct( - \Magento\Framework\Data\Form\Element\Factory $factoryElement, - \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, - \Magento\Framework\Escaper $escaper, - \Magento\Framework\UrlInterface $urlBuilder, - \Magento\Framework\View\Design\Theme\Image\PathInterface $imagePath, - $data = array() - ) { - $this->_imagePath = $imagePath; - parent::__construct($factoryElement, $factoryCollection, $escaper, $urlBuilder, $data); - } - /** * Get image preview url * @@ -61,10 +38,6 @@ class Image extends \Magento\Framework\Data\Form\Element\Image */ protected function _getUrl() { - $url = false; - if ($this->getValue()) { - $url = $this->_imagePath->getPreviewImageDirectoryUrl() . $this->getValue(); - } - return $url; + return $this->getTheme() ? $this->getTheme()->getThemeImage()->getPreviewImageUrl() : null; } } diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php index 4488dd7359b5cc58eaef45fcf724e1fc8224bd1d..42d9c7dfb578b65af7349f745755f050e2e4f352 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php @@ -121,36 +121,31 @@ class Css extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Abstra array('legend' => __('Theme CSS'), 'class' => 'fieldset-wide') ); $this->_addElementTypes($themeFieldset); - foreach ($this->getFiles() as $groupName => $files) { - foreach ($files as &$file) { - $file = $this->_convertFileData($file); - } - $themeFieldset->addField( - 'theme_css_view_' . $groupName, - 'links', - array('label' => $groupName, 'title' => $groupName, 'name' => 'links', 'values' => $files) + + $links = array(); + /** @var \Magento\Framework\View\Asset\LocalInterface $asset */ + foreach ($this->getFiles() as $fileId => $asset) { + $links[$fileId] = array( + 'href' => $this->getDownloadUrl($fileId, $this->_getCurrentTheme()->getId()), + 'label' => $fileId, + 'title' => $asset->getPath(), + 'delimiter' => '<br />' ); } + $themeFieldset->addField( + 'theme_css_view_assets', + 'links', + array( + 'label' => __('Theme CSS Assets'), + 'title' => __('Theme CSS Assets'), + 'name' => 'links', + 'values' => $links, + ) + ); return $this; } - /** - * Prepare file items for output on page for download - * - * @param \Magento\Core\Model\Theme\File $file - * @return array - */ - protected function _convertFileData($file) - { - return array( - 'href' => $this->getDownloadUrl($file['id'], $this->_getCurrentTheme()->getId()), - 'label' => $file['id'], - 'title' => $file['safePath'], - 'delimiter' => '<br />' - ); - } - /** * Set custom css fieldset * diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php index c9863c226b453c3def73e815aab019cd69f2aae9..3c231f3e4fa7848ad97a9d64339e111ad31f0e6c 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php @@ -23,6 +23,8 @@ */ namespace Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab; +use \Magento\Framework\View\Design\ThemeInterface; + /** * Theme form, general tab * @@ -37,22 +39,18 @@ class General extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Ab */ protected $_isThemeEditable = false; - /** - * @var \Magento\Framework\View\Design\Theme\Image\PathInterface - */ - protected $_themeImagePath; - /** * @var \Magento\Framework\File\Size */ protected $_fileSize; /** + * Constructor + * * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Framework\ObjectManager $objectManager - * @param \Magento\Framework\View\Design\Theme\Image\PathInterface $themeImagePath * @param \Magento\Framework\File\Size $fileSize * @param array $data */ @@ -61,11 +59,9 @@ class General extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Ab \Magento\Framework\Registry $registry, \Magento\Framework\Data\FormFactory $formFactory, \Magento\Framework\ObjectManager $objectManager, - \Magento\Framework\View\Design\Theme\Image\PathInterface $themeImagePath, \Magento\Framework\File\Size $fileSize, array $data = array() ) { - $this->_themeImagePath = $themeImagePath; $this->_fileSize = $fileSize; parent::__construct($context, $registry, $formFactory, $objectManager, $data); } @@ -81,7 +77,9 @@ class General extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Ab $session = $this->_objectManager->get('Magento\Backend\Model\Session'); $formDataFromSession = $session->getThemeData(); $this->_isThemeEditable = $this->_getCurrentTheme()->isEditable(); - $formData = $this->_getCurrentTheme()->getData(); + /** @var $currentTheme ThemeInterface */ + $currentTheme = $this->_getCurrentTheme(); + $formData = $currentTheme->getData(); if ($formDataFromSession && isset($formData['theme_id'])) { unset($formDataFromSession['preview_image']); $formData = array_merge($formData, $formDataFromSession); @@ -91,16 +89,13 @@ class General extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Ab /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); - - $this->_addThemeFieldset($form, $formData); - + $this->_addThemeFieldset($form, $formData, $currentTheme); if (!$this->getIsThemeExist()) { $formData = array_merge($formData, $this->_getDefaults()); } $form->addValues($formData); $form->setFieldNameSuffix('theme'); $this->setForm($form); - return $this; } @@ -109,10 +104,11 @@ class General extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Ab * * @param \Magento\Framework\Data\Form $form * @param array $formData + * @param \Magento\Core\Model\Theme|ThemeInterface $theme * @return $this * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - protected function _addThemeFieldset($form, $formData) + protected function _addThemeFieldset($form, $formData, ThemeInterface $theme) { $themeFieldset = $form->addFieldset('theme', array('legend' => __('Theme Settings'))); $this->_addElementTypes($themeFieldset); @@ -209,10 +205,11 @@ class General extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Ab 'title' => __('Theme Preview Image'), 'name' => 'preview', 'required' => false, - 'note' => $this->_getPreviewImageNote() + 'note' => $this->_getPreviewImageNote(), + 'theme' => $theme ) ); - } elseif (!empty($formData['preview_image'])) { + } elseif ($theme->hasPreviewImage()) { $themeFieldset->addField( 'preview_image', 'note', @@ -221,11 +218,11 @@ class General extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Ab 'title' => __('Theme Preview Image'), 'name' => 'preview', 'after_element_html' => '<a href="' - . $this->_themeImagePath->getPreviewImageDirectoryUrl() - . $formData['preview_image'] . '" onclick="imagePreview(\'theme_preview_image\'); return false;">' + . $theme->getThemeImage()->getPreviewImageUrl() + . '" onclick="imagePreview(\'theme_preview_image\'); return false;">' . '<img width="50" src="' - . $this->_themeImagePath->getPreviewImageDirectoryUrl() - . $formData['preview_image'] . '" id="theme_preview_image" /></a>' + . $theme->getThemeImage()->getPreviewImageUrl() + . '" id="theme_preview_image" /></a>' ) ); } diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Js.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Js.php index 5dce324e80d1e44f7171e2574ddc16728963cb5d..18d6d53af5d2c15316886304fccedf7418078025 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Js.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Js.php @@ -53,7 +53,7 @@ class Js extends \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Abstrac protected function _addThemeJsFieldset() { $form = $this->getForm(); - $themeFieldset = $form->addFieldset('theme_js', array('legend' => __('Theme Java Script'))); + $themeFieldset = $form->addFieldset('theme_js', array('legend' => __('Theme JavaScript'))); $customization = $this->_getCurrentTheme()->getCustomization(); $customJsFiles = $customization->getFilesByType( \Magento\Framework\View\Design\Theme\Customization\File\Js::TYPE diff --git a/app/code/Magento/Theme/Block/Html/Head.php b/app/code/Magento/Theme/Block/Html/Head.php index 2d5696e69b468b070c4ae99a11596d941f4f65a3..e61ccd27114c85f072689308d72c127bd3b3c7a0 100644 --- a/app/code/Magento/Theme/Block/Html/Head.php +++ b/app/code/Magento/Theme/Block/Html/Head.php @@ -189,10 +189,10 @@ class Head extends \Magento\Framework\View\Element\Template } } - if ($contentType == \Magento\Framework\View\Publisher::CONTENT_TYPE_JS) { + if ($contentType == 'js') { $groupTemplate = '<script' . $attributes . ' type="text/javascript" src="%s"></script>' . "\n"; } else { - if ($contentType == \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS) { + if ($contentType == 'css') { $attributes = ' rel="stylesheet" type="text/css"' . ($attributes ?: ' media="all"'); } $groupTemplate = '<link' . $attributes . ' href="%s" />' . "\n"; diff --git a/app/code/Magento/Theme/Block/Html/Head/Css.php b/app/code/Magento/Theme/Block/Html/Head/Css.php index d5d8afeca0ac75d17149d09c4924d64ac4adacf8..c0203bb1c383d2e627c79cd0febf5c1841f4af50 100644 --- a/app/code/Magento/Theme/Block/Html/Head/Css.php +++ b/app/code/Magento/Theme/Block/Html/Head/Css.php @@ -28,35 +28,13 @@ namespace Magento\Theme\Block\Html\Head; */ class Css extends \Magento\Framework\View\Element\AbstractBlock implements AssetBlockInterface { - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory, - array $data = array() - ) { - parent::__construct($context, $data); - - $this->setAsset( - $viewFileFactory->create( - array( - 'file' => (string)$this->getFile(), - 'contentType' => \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, - ) - ) - ); - } - /** * Get block asset * - * @return \Magento\Framework\View\Asset\AssetInterface + * @return \Magento\Framework\View\Asset\LocalInterface */ public function getAsset() { - return $this->_getData('asset'); + return $this->_assetRepo->createAsset($this->_getData('file')); } } diff --git a/app/code/Magento/Theme/Block/Html/Head/Link.php b/app/code/Magento/Theme/Block/Html/Head/Link.php index 18c006675b2dd39c54eaf2907fefa4211bca4714..a2649c5564a60b5de68471f87368aaae0a2c5608 100644 --- a/app/code/Magento/Theme/Block/Html/Head/Link.php +++ b/app/code/Magento/Theme/Block/Html/Head/Link.php @@ -33,24 +33,6 @@ class Link extends \Magento\Framework\View\Element\Template implements AssetBloc */ const VIRTUAL_CONTENT_TYPE = 'link'; - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Framework\View\Asset\RemoteFactory $remoteFactory - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\View\Asset\RemoteFactory $remoteFactory, - array $data = array() - ) { - parent::__construct($context, $data); - $this->setAsset( - $remoteFactory->create( - array('url' => (string)$this->getData('url'), 'contentType' => self::VIRTUAL_CONTENT_TYPE) - ) - ); - } - /** * Get block asset * @@ -58,6 +40,6 @@ class Link extends \Magento\Framework\View\Element\Template implements AssetBloc */ public function getAsset() { - return $this->_getData('asset'); + return $this->_assetRepo->createRemoteAsset($this->_getData('url'), self::VIRTUAL_CONTENT_TYPE); } } diff --git a/app/code/Magento/Theme/Block/Html/Head/Script.php b/app/code/Magento/Theme/Block/Html/Head/Script.php index 16bc1630ee1d8eec178e094ccca21a370115994a..c2dcea0793f1017cdcfb14adcb371b87fcfb8cb6 100644 --- a/app/code/Magento/Theme/Block/Html/Head/Script.php +++ b/app/code/Magento/Theme/Block/Html/Head/Script.php @@ -23,41 +23,18 @@ */ namespace Magento\Theme\Block\Html\Head; -use Magento\Theme\Block\Html\Head\AssetBlockInterface; - /** * Script page block */ class Script extends \Magento\Framework\View\Element\AbstractBlock implements AssetBlockInterface { - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory, - array $data = array() - ) { - parent::__construct($context, $data); - $this->setAsset( - $viewFileFactory->create( - array( - 'file' => (string)$this->getFile(), - 'contentType' => \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, - ) - ) - ); - } - /** * Get block asset * - * @return \Magento\Framework\View\Asset\AssetInterface + * @return \Magento\Framework\View\Asset\LocalInterface */ public function getAsset() { - return $this->getData('asset'); + return $this->_assetRepo->createAsset($this->_getData('file')); } } diff --git a/app/code/Magento/Theme/Block/Html/Topmenu.php b/app/code/Magento/Theme/Block/Html/Topmenu.php index 657b8f09c483391b140aa7abb3f7632dadc20e6d..0be00e8aa4889d07c99f65883bf8e5e1d6f79392 100644 --- a/app/code/Magento/Theme/Block/Html/Topmenu.php +++ b/app/code/Magento/Theme/Block/Html/Topmenu.php @@ -161,10 +161,6 @@ class Topmenu extends Template implements IdentityInterface return $html; } - if (!empty($childrenWrapClass)) { - $html .= '<div class="' . $childrenWrapClass . '">'; - } - $colStops = null; if ($childLevel == 0 && $limit) { $colStops = $this->_columnBrake($child->getChildren(), $limit); @@ -174,9 +170,6 @@ class Topmenu extends Template implements IdentityInterface $html .= $this->_getHtml($child, $childrenWrapClass, $limit, $colStops); $html .= '</ul>'; - if (!empty($childrenWrapClass)) { - $html .= '</div>'; - } return $html; } diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php index 6fa3700373c77a12050e5f444e0f026d388fa6f6..54b2a41d9f9570e195d2c3b8dd4d4f171a18261b 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php @@ -43,18 +43,34 @@ class Theme extends \Magento\Backend\App\Action */ protected $_fileFactory; + /** + * @var \Magento\Framework\View\Asset\Repository + */ + protected $_assetRepo; + + /** + * @var \Magento\Framework\App\Filesystem + */ + protected $_appFileSystem; + /** * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory + * @param \Magento\Framework\View\Asset\Repository $assetRepo + * @param \Magento\Framework\App\Filesystem $appFileSystem */ public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry, - \Magento\Framework\App\Response\Http\FileFactory $fileFactory + \Magento\Framework\App\Response\Http\FileFactory $fileFactory, + \Magento\Framework\View\Asset\Repository $assetRepo, + \Magento\Framework\App\Filesystem $appFileSystem ) { $this->_coreRegistry = $coreRegistry; $this->_fileFactory = $fileFactory; + $this->_assetRepo = $assetRepo; + $this->_appFileSystem = $appFileSystem; parent::__construct($context); } @@ -110,12 +126,12 @@ class Theme extends \Magento\Backend\App\Action $this->_coreRegistry->register('current_theme', $theme); $this->_view->loadLayout(); - /** @var $tab \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab_Css */ + /** @var $tab \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Css */ $tab = $this->_view->getLayout()->getBlock('theme_edit_tabs_tab_css_tab'); if ($tab && $tab->canShowTab()) { /** @var $helper \Magento\Core\Helper\Theme */ $helper = $this->_objectManager->get('Magento\Core\Helper\Theme'); - $files = $helper->getGroupedCssFiles($theme); + $files = $helper->getCssAssets($theme); $tab->setFiles($files); } $this->_setActiveMenu('Magento_Theme::system_design_theme'); @@ -134,6 +150,7 @@ class Theme extends \Magento\Backend\App\Action * Save action * * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function saveAction() { @@ -154,6 +171,7 @@ class Theme extends \Magento\Backend\App\Action ); try { if ($this->getRequest()->getPost()) { + /** @var $theme \Magento\Core\Model\Theme */ if (!empty($themeData['theme_id'])) { $theme = $themeFactory->create($themeData['theme_id']); } else { @@ -349,28 +367,26 @@ class Theme extends \Magento\Backend\App\Action /** @var $helper \Magento\Core\Helper\Theme */ $helper = $this->_objectManager->get('Magento\Core\Helper\Theme'); - $fileName = $helper->urlDecode($file); + $fileId = $helper->urlDecode($file); try { /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface')->load($themeId); if (!$theme->getId()) { - throw new \InvalidArgumentException(sprintf('We cannot find a theme with id "%1".', $themeId)); + throw new \InvalidArgumentException(sprintf('Theme not found: "%1".', $themeId)); } - - $themeCss = $helper->getCssFiles($theme); - if (!isset($themeCss[$fileName])) { - throw new \InvalidArgumentException( - sprintf('Css file "%s" is not in the theme with id "%d".', $fileName, $themeId) - ); - } - + $asset = $this->_assetRepo->createAsset($fileId, array('themeModel' => $theme)); + $relPath = $this->_appFileSystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR) + ->getRelativePath($asset->getSourceFile()); return $this->_fileFactory->create( - $fileName, - array('type' => 'filename', 'value' => $themeCss[$fileName]['path']), + $relPath, + array( + 'type' => 'filename', + 'value' => $relPath + ), \Magento\Framework\App\Filesystem::ROOT_DIR ); } catch (\Exception $e) { - $this->messageManager->addException($e, __('We cannot find file "%1".', $fileName)); + $this->messageManager->addException($e, __('File not found: "%1".', $fileId)); $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php index fa63119df0ddded03777b6ff81780047b87272c8..b3388af0069cc9e912e51d185c17a48f28c0ee88 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php @@ -36,15 +36,23 @@ class Files extends \Magento\Backend\App\Action */ protected $_fileFactory; + /** + * @var \Magento\Theme\Helper\Storage + */ + protected $storage; + /** * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory + * @param \Magento\Theme\Helper\Storage $storage */ public function __construct( \Magento\Backend\App\Action\Context $context, - \Magento\Framework\App\Response\Http\FileFactory $fileFactory + \Magento\Framework\App\Response\Http\FileFactory $fileFactory, + \Magento\Theme\Helper\Storage $storage ) { $this->_fileFactory = $fileFactory; + $this->storage = $storage; parent::__construct($context); } @@ -89,7 +97,7 @@ class Files extends \Magento\Backend\App\Action { $name = $this->getRequest()->getPost('name'); try { - $path = $this->_getSession()->getStoragePath(); + $path = $this->storage->getCurrentPath(); $result = $this->_getStorage()->createFolder($name, $path); } catch (\Magento\Framework\Model\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); @@ -108,7 +116,7 @@ class Files extends \Magento\Backend\App\Action public function deleteFolderAction() { try { - $path = $this->_getSession()->getStoragePath(); + $path = $this->storage->getCurrentPath(); $this->_getStorage()->deleteDirectory($path); } catch (\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); @@ -128,9 +136,7 @@ class Files extends \Magento\Backend\App\Action $this->_view->getLayout()->getBlock('wysiwyg_files.files')->setStorage($this->_getStorage()); $this->_view->renderLayout(); - $this->_getSession()->setStoragePath( - $this->_objectManager->get('Magento\Theme\Helper\Storage')->getCurrentPath() - ); + $this->_getSession()->setStoragePath($this->storage->getCurrentPath()); } catch (\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)); @@ -145,7 +151,7 @@ class Files extends \Magento\Backend\App\Action public function uploadAction() { try { - $path = $this->_getSession()->getStoragePath(); + $path = $this->storage->getCurrentPath(); $result = $this->_getStorage()->uploadFile($path); } catch (\Exception $e) { $result = array('error' => $e->getMessage(), 'errorcode' => $e->getCode()); diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php index 0a3347f1aec57209be9a242df624522616cb1541..98ada5862ccd7e4d14286c22b25f7091dc01274f 100644 --- a/app/code/Magento/Theme/Helper/Storage.php +++ b/app/code/Magento/Theme/Helper/Storage.php @@ -117,7 +117,7 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper $this->_session = $session; $this->_themeFactory = $themeFactory; $this->mediaDirectoryWrite = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); - $this->mediaDirectoryWrite->create($this->getStorageRoot()); + $this->mediaDirectoryWrite->create($this->mediaDirectoryWrite->getRelativePath($this->getStorageRoot())); } /** diff --git a/app/code/Magento/Theme/Model/Url/Plugin/Signature.php b/app/code/Magento/Theme/Model/Url/Plugin/Signature.php new file mode 100644 index 0000000000000000000000000000000000000000..c2d20386016fbcc19f4fb89ed74196c6e83e5aa1 --- /dev/null +++ b/app/code/Magento/Theme/Model/Url/Plugin/Signature.php @@ -0,0 +1,108 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Theme\Model\Url\Plugin; + +/** + * Plugin that activates signing of static file URLs with corresponding deployment version + */ +class Signature +{ + /** + * XPath for configuration setting of signing static files + */ + const XML_PATH_STATIC_FILE_SIGNATURE = 'dev/static/sign'; + + /** + * Template of signature component of URL, parametrized with the deployment version of static files + */ + const SIGNATURE_TEMPLATE = 'version%s'; + + /** + * @var \Magento\Framework\View\Url\ConfigInterface + */ + private $config; + + /** + * @var \Magento\Framework\App\View\Deployment\Version + */ + private $deploymentVersion; + + /** + * @param \Magento\Framework\View\Url\ConfigInterface $config + * @param \Magento\Framework\App\View\Deployment\Version $deploymentVersion + */ + public function __construct( + \Magento\Framework\View\Url\ConfigInterface $config, + \Magento\Framework\App\View\Deployment\Version $deploymentVersion + ) { + $this->config = $config; + $this->deploymentVersion = $deploymentVersion; + } + + /** + * Append signature to rendered base URL for static view files + * + * @param \Magento\Framework\Url\ScopeInterface $subject + * @param callable $proceed + * @param string $type + * @param null $secure + * @return string + * @see \Magento\Framework\Url\ScopeInterface::getBaseUrl() + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function aroundGetBaseUrl( + \Magento\Framework\Url\ScopeInterface $subject, + \Closure $proceed, + $type = \Magento\Framework\UrlInterface::URL_TYPE_LINK, + $secure = null + ) { + $baseUrl = $proceed($type, $secure); + if ($type == \Magento\Framework\UrlInterface::URL_TYPE_STATIC && $this->isUrlSignatureEnabled()) { + $baseUrl .= $this->renderUrlSignature() . '/'; + } + return $baseUrl; + } + + /** + * Whether signing of URLs is enabled or not + * + * @return bool + */ + protected function isUrlSignatureEnabled() + { + return (bool)$this->config->getValue(self::XML_PATH_STATIC_FILE_SIGNATURE); + } + + /** + * Render URL signature from the template + * + * @return string + */ + protected function renderUrlSignature() + { + return sprintf(self::SIGNATURE_TEMPLATE, $this->deploymentVersion->getValue()); + } +} diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php index 3cd0b38d7df3410801c908f686797633d21a2e3f..132ffa1d5e1dcaa0e8d5f9fd28138e52adcb462d 100644 --- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php +++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php @@ -214,7 +214,7 @@ class Storage public function deleteFile($file) { $file = $this->_helper->urlDecode($file); - $path = $this->mediaWriteDirectory->getRelativePath($this->_helper->getSession()->getStoragePath()); + $path = $this->mediaWriteDirectory->getRelativePath($this->_helper->getCurrentPath()); $filePath = $this->mediaWriteDirectory->getRelativePath($path . '/' . $file); $thumbnailPath = $this->_helper->getThumbnailDirectory($filePath) . '/' . $file; diff --git a/app/code/Magento/Theme/etc/adminhtml/acl.xml b/app/code/Magento/Theme/etc/adminhtml/acl.xml index a91377b8e47cc47668fc692e68fe972b599595c5..a0c5dab927ed3fa4804f16209244671d99556e8b 100644 --- a/app/code/Magento/Theme/etc/adminhtml/acl.xml +++ b/app/code/Magento/Theme/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Theme/etc/adminhtml/di.xml b/app/code/Magento/Theme/etc/adminhtml/di.xml index 769b94cb7bd48c3d5e265347c80e7ed96a84616c..8b3df17d682ab22792f83723e71ed845c2514c93 100644 --- a/app/code/Magento/Theme/etc/adminhtml/di.xml +++ b/app/code/Magento/Theme/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Content"> <arguments> <argument name="storageHelper" xsi:type="object">Magento\Theme\Helper\Storage\Proxy</argument> diff --git a/app/code/Magento/Theme/etc/adminhtml/routes.xml b/app/code/Magento/Theme/etc/adminhtml/routes.xml index 35bbd600f13dab99f92a08ad390c50f4d20b3c3d..141dbc519a1030729d909a67863a334b6952ee51 100644 --- a/app/code/Magento/Theme/etc/adminhtml/routes.xml +++ b/app/code/Magento/Theme/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Theme" /> diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml index bcd899b70ec26b4edebd3bf6372e0dbae4bc9db1..8e15a13552e34dd372c7db417c1b7a1d1a1bfe0d 100644 --- a/app/code/Magento/Theme/etc/di.xml +++ b/app/code/Magento/Theme/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Theme\Model\Config"> <arguments> <argument name="configCache" xsi:type="object">Magento\Framework\App\Cache\Type\Config</argument> @@ -61,4 +61,15 @@ <argument name="helper" xsi:type="object">Magento\Theme\Helper\Storage\Proxy</argument> </arguments> </type> + <preference for="Magento\Framework\App\View\Deployment\Version\StorageInterface" type="Magento\Framework\App\View\Deployment\Version\Storage\File"/> + <preference for="Magento\Framework\App\View\Deployment\Version\GeneratorInterface" type="Magento\Framework\App\View\Deployment\Version\Generator\Timestamp"/> + <type name="Magento\Framework\App\View\Deployment\Version\Storage\File"> + <arguments> + <argument name="directoryCode" xsi:type="const">Magento\Framework\App\Filesystem::STATIC_VIEW_DIR</argument> + <argument name="fileName" xsi:type="string">deployed_version.txt</argument> + </arguments> + </type> + <type name="Magento\Framework\Url\ScopeInterface"> + <plugin name="urlSignature" type="Magento\Theme\Model\Url\Plugin\Signature"/> + </type> </config> diff --git a/app/code/Magento/Theme/etc/module.xml b/app/code/Magento/Theme/etc/module.xml index 3849ab4ab62d3890db28c59ab37923fd42ce7d15..7cdd4ecce17a1b42c6f744cd58fb8d07275019c8 100644 --- a/app/code/Magento/Theme/etc/module.xml +++ b/app/code/Magento/Theme/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Theme" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Theme/view/adminhtml/browser/content.phtml b/app/code/Magento/Theme/view/adminhtml/templates/browser/content.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/browser/content.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/browser/content.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/browser/content/files.phtml b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/files.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/browser/content/files.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/browser/content/files.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/browser/content/uploader.phtml b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/browser/content/uploader.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/empty.phtml b/app/code/Magento/Theme/view/adminhtml/templates/empty.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/empty.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/empty.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/tabs/css.phtml b/app/code/Magento/Theme/view/adminhtml/templates/tabs/css.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/tabs/css.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/tabs/css.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/tabs/fieldset/js.phtml b/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/tabs/fieldset/js.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/tabs/js.phtml b/app/code/Magento/Theme/view/adminhtml/templates/tabs/js.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/tabs/js.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/tabs/js.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/title.phtml b/app/code/Magento/Theme/view/adminhtml/templates/title.phtml similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/title.phtml rename to app/code/Magento/Theme/view/adminhtml/templates/title.phtml diff --git a/app/code/Magento/Theme/view/adminhtml/css/theme.css b/app/code/Magento/Theme/view/adminhtml/web/css/theme.css similarity index 87% rename from app/code/Magento/Theme/view/adminhtml/css/theme.css rename to app/code/Magento/Theme/view/adminhtml/web/css/theme.css index 6c798842ffdedb3e6973089cad3293856759bfe9..72f6a1e18372f1bfea75cf2aca613a2dea009145 100644 --- a/app/code/Magento/Theme/view/adminhtml/css/theme.css +++ b/app/code/Magento/Theme/view/adminhtml/web/css/theme.css @@ -28,7 +28,7 @@ } .js-files-container .js-file { - background: url("Magento_Theme::/images/js_icon.gif") no-repeat scroll 5px 50% #ECECEC; + background: url("Magento_Theme::images/js_icon.gif") no-repeat scroll 5px 50% #ECECEC; border: 1px solid #CCCCCC; padding: 5px 5px 10px 30px; margin-left: 10px; @@ -65,11 +65,11 @@ } .js-files-container li .up { - background: url("Magento_Theme::/images/bkg_movable-arrows.png") no-repeat scroll 50% 3px #ECECEC; + background: url("Magento_Theme::images/bkg_movable-arrows.png") no-repeat scroll 50% 3px #ECECEC; } .js-files-container li .down { - background: url("Magento_Theme::/images/bkg_movable-arrows.png") no-repeat scroll 50% -27px #ECECEC; + background: url("Magento_Theme::images/bkg_movable-arrows.png") no-repeat scroll 50% -27px #ECECEC; bottom: 0; top: auto; } @@ -88,4 +88,4 @@ #theme_js .uploader { padding-left: 30px; -} \ No newline at end of file +} diff --git a/app/code/Magento/Theme/view/adminhtml/favicon.ico b/app/code/Magento/Theme/view/adminhtml/web/favicon.ico similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/favicon.ico rename to app/code/Magento/Theme/view/adminhtml/web/favicon.ico diff --git a/app/code/Magento/Theme/view/adminhtml/images/bkg_movable-arrows.png b/app/code/Magento/Theme/view/adminhtml/web/images/bkg_movable-arrows.png similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/images/bkg_movable-arrows.png rename to app/code/Magento/Theme/view/adminhtml/web/images/bkg_movable-arrows.png diff --git a/app/code/Magento/Theme/view/adminhtml/images/js_icon.gif b/app/code/Magento/Theme/view/adminhtml/web/images/js_icon.gif similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/images/js_icon.gif rename to app/code/Magento/Theme/view/adminhtml/web/images/js_icon.gif diff --git a/app/code/Magento/Theme/view/adminhtml/js/custom-js-list.js b/app/code/Magento/Theme/view/adminhtml/web/js/custom-js-list.js similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/js/custom-js-list.js rename to app/code/Magento/Theme/view/adminhtml/web/js/custom-js-list.js diff --git a/app/code/Magento/Theme/view/adminhtml/js/form.js b/app/code/Magento/Theme/view/adminhtml/web/js/form.js similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/js/form.js rename to app/code/Magento/Theme/view/adminhtml/web/js/form.js diff --git a/app/code/Magento/Theme/view/adminhtml/js/sortable.js b/app/code/Magento/Theme/view/adminhtml/web/js/sortable.js similarity index 100% rename from app/code/Magento/Theme/view/adminhtml/js/sortable.js rename to app/code/Magento/Theme/view/adminhtml/web/js/sortable.js diff --git a/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml b/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml index 94f1fe9cf0b9ec674ef7669bc3f5542c1c6a34a3..5f825917ac5ac9d9294386b71e44f0be53d2e919 100644 --- a/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml +++ b/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml @@ -118,7 +118,7 @@ </block> <block class="Magento\Theme\Block\Html\Head\Script" name="magento-loader-js"> <arguments> - <argument name="file" xsi:type="string">mage/loader_old.js</argument> + <argument name="file" xsi:type="string">mage/loader.js</argument> </arguments> </block> <block class="Magento\Theme\Block\Html\Head\Script" name="magento-dataPost-js"> @@ -126,6 +126,11 @@ <argument name="file" xsi:type="string">mage/dataPost.js</argument> </arguments> </block> + <block class="Magento\Theme\Block\Html\Head\Script" name="magento-menu-js"> + <arguments> + <argument name="file" xsi:type="string">mage/menu.js</argument> + </arguments> + </block> <block class="Magento\Framework\View\Element\Js\Components" name="head.components" as="components" template="Magento_Theme::js/components.phtml"/> </referenceBlock> </layout> diff --git a/app/code/Magento/Theme/view/frontend/1column.phtml b/app/code/Magento/Theme/view/frontend/templates/1column.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/1column.phtml rename to app/code/Magento/Theme/view/frontend/templates/1column.phtml diff --git a/app/code/Magento/Theme/view/frontend/2columns-left.phtml b/app/code/Magento/Theme/view/frontend/templates/2columns-left.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/2columns-left.phtml rename to app/code/Magento/Theme/view/frontend/templates/2columns-left.phtml diff --git a/app/code/Magento/Theme/view/frontend/2columns-right.phtml b/app/code/Magento/Theme/view/frontend/templates/2columns-right.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/2columns-right.phtml rename to app/code/Magento/Theme/view/frontend/templates/2columns-right.phtml diff --git a/app/code/Magento/Theme/view/frontend/3columns.phtml b/app/code/Magento/Theme/view/frontend/templates/3columns.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/3columns.phtml rename to app/code/Magento/Theme/view/frontend/templates/3columns.phtml diff --git a/app/code/Magento/Theme/view/frontend/callouts/left_col.phtml b/app/code/Magento/Theme/view/frontend/templates/callouts/left_col.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/callouts/left_col.phtml rename to app/code/Magento/Theme/view/frontend/templates/callouts/left_col.phtml diff --git a/app/code/Magento/Theme/view/frontend/callouts/right_col.phtml b/app/code/Magento/Theme/view/frontend/templates/callouts/right_col.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/callouts/right_col.phtml rename to app/code/Magento/Theme/view/frontend/templates/callouts/right_col.phtml diff --git a/app/code/Magento/Theme/view/frontend/empty.phtml b/app/code/Magento/Theme/view/frontend/templates/empty.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/empty.phtml rename to app/code/Magento/Theme/view/frontend/templates/empty.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/block.phtml b/app/code/Magento/Theme/view/frontend/templates/html/block.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/block.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/block.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/breadcrumbs.phtml b/app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/breadcrumbs.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/breadcrumbs.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/bugreport.phtml b/app/code/Magento/Theme/view/frontend/templates/html/bugreport.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/bugreport.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/bugreport.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/copyright.phtml b/app/code/Magento/Theme/view/frontend/templates/html/copyright.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/copyright.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/copyright.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/footer.phtml b/app/code/Magento/Theme/view/frontend/templates/html/footer.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/footer.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/footer.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/head.phtml b/app/code/Magento/Theme/view/frontend/templates/html/head.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/head.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/head.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/header.phtml b/app/code/Magento/Theme/view/frontend/templates/html/header.phtml similarity index 94% rename from app/code/Magento/Theme/view/frontend/html/header.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/header.phtml index 1922deb00d64222f289c28b31405563d35d3a7cd..3da19c109af6c39f3bc879b4c288419eada2afda 100644 --- a/app/code/Magento/Theme/view/frontend/html/header.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/header.phtml @@ -25,10 +25,10 @@ * @var \Magento\Theme\Block\Html\Header $this */ ?> - <?php switch($this->getShowPart()): case 'logo': ?> <?php $storeName = $this->getThemeName() ? $this->getThemeName() : $this->getLogoAlt();?> + <span data-action="toggle-nav" class="action toggle nav"><?php echo __('Toggle Nav') ?></span> <?php if ($this->isHomePage()):?> <strong class="logo"> <img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /> diff --git a/app/code/Magento/Theme/view/frontend/html/notices.phtml b/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/notices.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/notices.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/pager.phtml b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/pager.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/pager.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/skip.phtml b/app/code/Magento/Theme/view/frontend/templates/html/skip.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/skip.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/skip.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/title.phtml b/app/code/Magento/Theme/view/frontend/templates/html/title.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/html/title.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/title.phtml diff --git a/app/code/Magento/Theme/view/frontend/html/topmenu.phtml b/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml similarity index 91% rename from app/code/Magento/Theme/view/frontend/html/topmenu.phtml rename to app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml index 012e39f6bc243f0525555549a3338e73b9850f42..6abd5a02a2244840156a2e31780eb043a07b4e4b 100644 --- a/app/code/Magento/Theme/view/frontend/html/topmenu.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml @@ -33,7 +33,7 @@ <?php $_menu = $this->getHtml('level-top','submenu', $columnsLimit) ?> <?php if ($_menu): ?> <nav class="navigation" role="navigation"> - <ul> + <ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'> <?php echo $_menu; ?> </ul> </nav> diff --git a/app/code/Magento/Theme/view/frontend/js/calendar.phtml b/app/code/Magento/Theme/view/frontend/templates/js/calendar.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/js/calendar.phtml rename to app/code/Magento/Theme/view/frontend/templates/js/calendar.phtml diff --git a/app/code/Magento/Theme/view/frontend/js/components.phtml b/app/code/Magento/Theme/view/frontend/templates/js/components.phtml similarity index 95% rename from app/code/Magento/Theme/view/frontend/js/components.phtml rename to app/code/Magento/Theme/view/frontend/templates/js/components.phtml index 7d5e1cb96bdc8d849b969d1086049472d465ea41..d93c42a2d0805ff73d75abadf94af6dbf370339f 100644 --- a/app/code/Magento/Theme/view/frontend/js/components.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/js/components.phtml @@ -50,6 +50,9 @@ redirectUrl: [ '<?php echo $this->getViewFileUrl('mage/redirect-url.js') ?>' ], + dropdownDialog: [ + '<?php echo $this->getViewFileUrl('mage/dropdown.js') ?>' + ], cookieBlock: [ '<?php echo $this->getViewFileUrl('Magento_Theme::js/notices.js') ?>' ] diff --git a/app/code/Magento/Theme/view/frontend/js/cookie.phtml b/app/code/Magento/Theme/view/frontend/templates/js/cookie.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/js/cookie.phtml rename to app/code/Magento/Theme/view/frontend/templates/js/cookie.phtml diff --git a/app/code/Magento/Theme/view/frontend/link.phtml b/app/code/Magento/Theme/view/frontend/templates/link.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/link.phtml rename to app/code/Magento/Theme/view/frontend/templates/link.phtml diff --git a/app/code/Magento/Theme/view/frontend/popup.phtml b/app/code/Magento/Theme/view/frontend/templates/popup.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/popup.phtml rename to app/code/Magento/Theme/view/frontend/templates/popup.phtml diff --git a/app/code/Magento/Theme/view/frontend/print.phtml b/app/code/Magento/Theme/view/frontend/templates/print.phtml similarity index 100% rename from app/code/Magento/Theme/view/frontend/print.phtml rename to app/code/Magento/Theme/view/frontend/templates/print.phtml diff --git a/app/code/Magento/Theme/view/frontend/css/tabs.css b/app/code/Magento/Theme/view/frontend/web/css/tabs.css similarity index 100% rename from app/code/Magento/Theme/view/frontend/css/tabs.css rename to app/code/Magento/Theme/view/frontend/web/css/tabs.css diff --git a/app/code/Magento/Theme/view/frontend/css/validate.css b/app/code/Magento/Theme/view/frontend/web/css/validate.css similarity index 100% rename from app/code/Magento/Theme/view/frontend/css/validate.css rename to app/code/Magento/Theme/view/frontend/web/css/validate.css diff --git a/app/code/Magento/Theme/view/frontend/favicon.ico b/app/code/Magento/Theme/view/frontend/web/favicon.ico similarity index 100% rename from app/code/Magento/Theme/view/frontend/favicon.ico rename to app/code/Magento/Theme/view/frontend/web/favicon.ico diff --git a/app/code/Magento/Theme/view/frontend/images/validation_advice_bg.gif b/app/code/Magento/Theme/view/frontend/web/images/validation_advice_bg.gif similarity index 100% rename from app/code/Magento/Theme/view/frontend/images/validation_advice_bg.gif rename to app/code/Magento/Theme/view/frontend/web/images/validation_advice_bg.gif diff --git a/app/code/Magento/Theme/view/frontend/js/notices.js b/app/code/Magento/Theme/view/frontend/web/js/notices.js similarity index 100% rename from app/code/Magento/Theme/view/frontend/js/notices.js rename to app/code/Magento/Theme/view/frontend/web/js/notices.js diff --git a/app/code/Magento/Theme/view/frontend/js/row-builder.js b/app/code/Magento/Theme/view/frontend/web/js/row-builder.js similarity index 100% rename from app/code/Magento/Theme/view/frontend/js/row-builder.js rename to app/code/Magento/Theme/view/frontend/web/js/row-builder.js diff --git a/app/code/Magento/Theme/view/frontend/js/truncate.js b/app/code/Magento/Theme/view/frontend/web/js/truncate.js similarity index 100% rename from app/code/Magento/Theme/view/frontend/js/truncate.js rename to app/code/Magento/Theme/view/frontend/web/js/truncate.js diff --git a/app/code/Magento/Theme/view/frontend/menu.js b/app/code/Magento/Theme/view/frontend/web/menu.js similarity index 100% rename from app/code/Magento/Theme/view/frontend/menu.js rename to app/code/Magento/Theme/view/frontend/web/menu.js diff --git a/app/code/Magento/Theme/view/install/favicon.ico b/app/code/Magento/Theme/view/install/web/favicon.ico similarity index 100% rename from app/code/Magento/Theme/view/install/favicon.ico rename to app/code/Magento/Theme/view/install/web/favicon.ico diff --git a/app/code/Magento/Translation/Model/Js/DataProvider.php b/app/code/Magento/Translation/Model/Js/DataProvider.php index 7bfc9a5dd188477d5b76eeb91d6c0a2d210f5480..2908b845229328c779c983644e66821fe70eaf5b 100644 --- a/app/code/Magento/Translation/Model/Js/DataProvider.php +++ b/app/code/Magento/Translation/Model/Js/DataProvider.php @@ -174,6 +174,7 @@ class DataProvider implements DataProviderInterface 'Edit Order' => __('Edit Order'), 'Ok' => __('Ok'), 'Please specify at least one search term.' => __('Please specify at least one search term.'), + 'Create New Wish List' => __('Create New Wish List'), ); } } diff --git a/app/code/Magento/Translation/etc/adminhtml/di.xml b/app/code/Magento/Translation/etc/adminhtml/di.xml index d116257b411bed8dd5285033c90aa6bc6aa596d1..822ca3cb33b1d27de8d2d34f30396c1061e46487 100644 --- a/app/code/Magento/Translation/etc/adminhtml/di.xml +++ b/app/code/Magento/Translation/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Translate\Inline\ConfigInterface" type="Magento\Backend\Model\Translate\Inline\Config" /> <type name="Magento\Translation\Model\Resource\Translate"> <arguments> diff --git a/app/code/Magento/Translation/etc/adminhtml/routes.xml b/app/code/Magento/Translation/etc/adminhtml/routes.xml index 4b7be520b50bfa174f77a829c5d47998e9381002..336d7286d9beb31268640c1db09e33ffda787565 100644 --- a/app/code/Magento/Translation/etc/adminhtml/routes.xml +++ b/app/code/Magento/Translation/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="translation" frontName="translation"> <module name="Magento_Translation" /> diff --git a/app/code/Magento/Translation/etc/cache.xml b/app/code/Magento/Translation/etc/cache.xml index 410f898b6500c23ed3e19fd7b3e2429b24a16645..cf704ed036e33ea52e2724f22bde5c3924da0c32 100644 --- a/app/code/Magento/Translation/etc/cache.xml +++ b/app/code/Magento/Translation/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="translate" translate="label,description" instance="Magento\Framework\App\Cache\Type\Translate"> <label>Translations</label> <description>Translation files.</description> diff --git a/app/code/Magento/Translation/etc/di.xml b/app/code/Magento/Translation/etc/di.xml index 96740a99b106bc3dced4fa9806673473ea7700f1..4e81b854ab2bf6d2043dd4dcf0d6b8f6f358fcbd 100644 --- a/app/code/Magento/Translation/etc/di.xml +++ b/app/code/Magento/Translation/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Translate\InlineInterface" type="Magento\Framework\Translate\Inline" /> <preference for="Magento\Framework\Translate\Inline\ConfigInterface" type="Magento\Translation\Model\Inline\Config" /> <preference for="Magento\Framework\Translate\Inline\ProviderInterface" type="Magento\Framework\Translate\Inline\Provider" /> diff --git a/app/code/Magento/Translation/etc/frontend/routes.xml b/app/code/Magento/Translation/etc/frontend/routes.xml index 8492fbee148f7685ca081550817122ae77abda17..73b335cf68f523674835e64acc889ccd4bb78e28 100644 --- a/app/code/Magento/Translation/etc/frontend/routes.xml +++ b/app/code/Magento/Translation/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="translation" frontName="translation"> <module name="Magento_Translation" /> diff --git a/app/code/Magento/Translation/etc/module.xml b/app/code/Magento/Translation/etc/module.xml index 423abf670d029bcaea6b721135f916138aa8693f..f8b7f811b039b2a9dbd3ca031b85e7172500fcd6 100644 --- a/app/code/Magento/Translation/etc/module.xml +++ b/app/code/Magento/Translation/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Translation" version="1.0.0.1" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Translation/view/adminhtml/translate_inline.phtml b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml similarity index 100% rename from app/code/Magento/Translation/view/adminhtml/translate_inline.phtml rename to app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml diff --git a/app/code/Magento/Translation/view/frontend/translate_inline.phtml b/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml similarity index 100% rename from app/code/Magento/Translation/view/frontend/translate_inline.phtml rename to app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml diff --git a/app/code/Magento/Ups/Model/Carrier.php b/app/code/Magento/Ups/Model/Carrier.php index b65f70a814705be883e871d84a056dbf4f3b3988..85f3345115a26b5a5a31645816b188faf33b75de 100644 --- a/app/code/Magento/Ups/Model/Carrier.php +++ b/app/code/Magento/Ups/Model/Carrier.php @@ -63,13 +63,6 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface */ protected $_request; - /** - * Raw rate request data - * - * @var \Magento\Framework\Object - */ - protected $_rawRequest; - /** * Rate result data * diff --git a/app/code/Magento/Ups/etc/adminhtml/system.xml b/app/code/Magento/Ups/etc/adminhtml/system.xml index 81b4f6f62d8e1761b9bcc7d9a4772979a0aaa50a..7986c103a69000cf91b87e3e1fca7550b50ea2dc 100644 --- a/app/code/Magento/Ups/etc/adminhtml/system.xml +++ b/app/code/Magento/Ups/etc/adminhtml/system.xml @@ -164,10 +164,6 @@ <label>Debug</label> <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model> </field> - <field id="active_rma" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Enabled for RMA</label> - <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model> - </field> </group> </section> </system> diff --git a/app/code/Magento/Ups/etc/module.xml b/app/code/Magento/Ups/etc/module.xml index 05c2a1cf0d5528bccba633c8e304fc13ee07f5a0..7b1efb8d8b4eaba0352f10a7654272ff9c605031 100644 --- a/app/code/Magento/Ups/etc/module.xml +++ b/app/code/Magento/Ups/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Ups" version="2.0.0.0" active="true"> <depends> <module name="Magento_Store"/> diff --git a/app/code/Magento/Ups/view/adminhtml/system/shipping/carrier_config.phtml b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml similarity index 100% rename from app/code/Magento/Ups/view/adminhtml/system/shipping/carrier_config.phtml rename to app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml diff --git a/app/code/Magento/UrlRewrite/etc/frontend/di.xml b/app/code/Magento/UrlRewrite/etc/frontend/di.xml index f2dbb426520dfd7070ce54fec5d264d719036205..92fe1f4f05d176c2bed3d34a4da56c886d4fe732 100644 --- a/app/code/Magento/UrlRewrite/etc/frontend/di.xml +++ b/app/code/Magento/UrlRewrite/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\FrontController"> <plugin name="urlRewrite" type="Magento\UrlRewrite\App\FrontController\Plugin\UrlRewrite" sortOrder="60"/> </type> diff --git a/app/code/Magento/UrlRewrite/etc/module.xml b/app/code/Magento/UrlRewrite/etc/module.xml index bcec4aef7785bd1c5f5dee769df7d9f81081f0b9..974b6b161876a45dd249039146329ce33bdd3717 100644 --- a/app/code/Magento/UrlRewrite/etc/module.xml +++ b/app/code/Magento/UrlRewrite/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_UrlRewrite" version="1.0.0.0" active="true"> <depends> <module name="Magento_Catalog" /> diff --git a/app/code/Magento/User/etc/adminhtml/acl.xml b/app/code/Magento/User/etc/adminhtml/acl.xml index cd8b17e2897f0ebccf3d53d69e7cbaacd74a3554..a8858235707b7aab0c3d588ce2b794d4c13bd888 100644 --- a/app/code/Magento/User/etc/adminhtml/acl.xml +++ b/app/code/Magento/User/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/User/etc/adminhtml/di.xml b/app/code/Magento/User/etc/adminhtml/di.xml index 636b03d6fe5978d8d0f0544cf1107233f483acc1..74e6aa732de98b972209fc89f666ab2bc19ac5fa 100644 --- a/app/code/Magento/User/etc/adminhtml/di.xml +++ b/app/code/Magento/User/etc/adminhtml/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Backend\Model\Auth\Credential\StorageInterface" type="Magento\User\Model\User" /> </config> diff --git a/app/code/Magento/User/etc/adminhtml/routes.xml b/app/code/Magento/User/etc/adminhtml/routes.xml index 183fca3856f82833ff0473e939b0afff07ecc69c..c692d33c990101e1c2434e51a6589113d908d35c 100644 --- a/app/code/Magento/User/etc/adminhtml/routes.xml +++ b/app/code/Magento/User/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_User" before="Magento_Backend" /> diff --git a/app/code/Magento/User/etc/di.xml b/app/code/Magento/User/etc/di.xml index c6c6dee1201778888a2e6bf70b7410bca6ad9ee8..f27e20b7c4f8529483a98728f5b8105fec7ec0ef 100644 --- a/app/code/Magento/User/etc/di.xml +++ b/app/code/Magento/User/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\User\Model\Role" shared="false" /> <type name="Magento\User\Model\Resource\Rules"> <arguments> diff --git a/app/code/Magento/User/etc/module.xml b/app/code/Magento/User/etc/module.xml index ceb5662c291b480e09f99183e97eacd8e1b7fcee..77029c20545359215c0d36e72f2ec261bc6c0e65 100644 --- a/app/code/Magento/User/etc/module.xml +++ b/app/code/Magento/User/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_User" version="1.6.1.6" active="true"> <sequence> <module name="Magento_Backend"/> diff --git a/app/code/Magento/User/view/adminhtml/admin/forgotpassword.phtml b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/admin/forgotpassword.phtml rename to app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword.phtml diff --git a/app/code/Magento/User/view/adminhtml/admin/forgotpassword_url.phtml b/app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword_url.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/admin/forgotpassword_url.phtml rename to app/code/Magento/User/view/adminhtml/templates/admin/forgotpassword_url.phtml diff --git a/app/code/Magento/User/view/adminhtml/admin/resetforgottenpassword.phtml b/app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/admin/resetforgottenpassword.phtml rename to app/code/Magento/User/view/adminhtml/templates/admin/resetforgottenpassword.phtml diff --git a/app/code/Magento/User/view/adminhtml/role/edit.phtml b/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/role/edit.phtml rename to app/code/Magento/User/view/adminhtml/templates/role/edit.phtml diff --git a/app/code/Magento/User/view/adminhtml/role/info.phtml b/app/code/Magento/User/view/adminhtml/templates/role/info.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/role/info.phtml rename to app/code/Magento/User/view/adminhtml/templates/role/info.phtml diff --git a/app/code/Magento/User/view/adminhtml/role/users.phtml b/app/code/Magento/User/view/adminhtml/templates/role/users.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/role/users.phtml rename to app/code/Magento/User/view/adminhtml/templates/role/users.phtml diff --git a/app/code/Magento/User/view/adminhtml/role/users_grid_js.phtml b/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/role/users_grid_js.phtml rename to app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml diff --git a/app/code/Magento/User/view/adminhtml/user/roles_grid_js.phtml b/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml similarity index 100% rename from app/code/Magento/User/view/adminhtml/user/roles_grid_js.phtml rename to app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml diff --git a/app/code/Magento/User/view/adminhtml/js/roles-tree.js b/app/code/Magento/User/view/adminhtml/web/js/roles-tree.js similarity index 100% rename from app/code/Magento/User/view/adminhtml/js/roles-tree.js rename to app/code/Magento/User/view/adminhtml/web/js/roles-tree.js diff --git a/app/code/Magento/Usps/Model/Carrier.php b/app/code/Magento/Usps/Model/Carrier.php index 2232b869d69bf0334216b1161d6f93af5f5cd8cc..c150954b7866c0bdc56c9f19dd563646cd2da1a4 100644 --- a/app/code/Magento/Usps/Model/Carrier.php +++ b/app/code/Magento/Usps/Model/Carrier.php @@ -93,13 +93,6 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C */ protected $_request = null; - /** - * Raw rate request data - * - * @var \Magento\Framework\Object|null - */ - protected $_rawRequest = null; - /** * Rate result data * @@ -346,7 +339,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C $r->setBaseSubtotalInclTax($request->getBaseSubtotalInclTax()); - $this->_rawRequest = $r; + $this->setRawRequest($r); return $this; } diff --git a/app/code/Magento/Usps/etc/adminhtml/di.xml b/app/code/Magento/Usps/etc/adminhtml/di.xml index 4e1e85a399cf881eafe1460c78bfd2f2974a13f9..fc2d498d46560e7d634077528c7d8f026fc4c4e4 100644 --- a/app/code/Magento/Usps/etc/adminhtml/di.xml +++ b/app/code/Magento/Usps/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shipping\Packaging"> <arguments> <argument name="sourceSizeModel" xsi:type="object">Magento\Usps\Model\Source\Size</argument> diff --git a/app/code/Magento/Usps/etc/adminhtml/system.xml b/app/code/Magento/Usps/etc/adminhtml/system.xml index 25a4ca04e9d6514f3ef9dbaa8895a5db069b0c41..e41bce203f8f4758eee4053d0a89664b21414ccf 100644 --- a/app/code/Magento/Usps/etc/adminhtml/system.xml +++ b/app/code/Magento/Usps/etc/adminhtml/system.xml @@ -152,10 +152,6 @@ <field id="sort_order" translate="label" type="text" sortOrder="220" showInDefault="1" showInWebsite="1" showInStore="0"> <label>Sort Order</label> </field> - <field id="active_rma" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Enabled for RMA</label> - <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model> - </field> </group> </section> </system> diff --git a/app/code/Magento/Usps/etc/module.xml b/app/code/Magento/Usps/etc/module.xml index 06ee1a771dc7e855019ca2bcffd9b4016a669544..970190b71e8a96f89e4e05f8981229189dbe20dc 100644 --- a/app/code/Magento/Usps/etc/module.xml +++ b/app/code/Magento/Usps/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Usps" version="2.0.0.0" active="true"> <depends> <module name="Magento_Store"/> diff --git a/app/code/Magento/Webapi/Controller/Response.php b/app/code/Magento/Webapi/Controller/Response.php index 0546910615d89ff93d221e94540ac42418154e10..5f1e96d5a890d7492c13cdfe1ba6225251700053 100644 --- a/app/code/Magento/Webapi/Controller/Response.php +++ b/app/code/Magento/Webapi/Controller/Response.php @@ -25,7 +25,7 @@ */ namespace Magento\Webapi\Controller; -class Response extends \Zend_Controller_Response_Http implements \Magento\Framework\App\ResponseInterface +class Response extends \Zend_Controller_Response_Http implements \Magento\Framework\App\Response\HttpInterface { /** * Character set which must be used in response. diff --git a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php index c48d78a54f58c1f30a480c31afec3c679c77e004..f89ad856e697bac26dacd3c25d8551c7f48e0711 100644 --- a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php +++ b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php @@ -79,13 +79,17 @@ class ServiceArgsSerializer $inputData = []; foreach ($params as $param) { $paramName = $param->getName(); - if (isset($inputArray[$paramName])) { + $snakeCaseParamName = strtolower(preg_replace("/(?<=\\w)(?=[A-Z])/", "_$1", $paramName)); + if (isset($inputArray[$paramName]) || isset($inputArray[$snakeCaseParamName])) { + $paramValue = isset($inputArray[$paramName]) + ? $inputArray[$paramName] + : $inputArray[$snakeCaseParamName]; + if ($this->_isArrayParam($param)) { $paramType = "{$param->getType()}[]"; } else { $paramType = $param->getType(); } - $paramValue = $inputArray[$paramName]; $inputData[] = $this->_convertValue($paramValue, $paramType); } else { $inputData[] = $param->getDefaultValue(); // not set, so use default diff --git a/app/code/Magento/Webapi/etc/cache.xml b/app/code/Magento/Webapi/etc/cache.xml index ccf42cb5ad2695086b3fa7fd480af70a602fd01b..2b14318c7b19fa77cba1654f919e06bfea35ccb6 100644 --- a/app/code/Magento/Webapi/etc/cache.xml +++ b/app/code/Magento/Webapi/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="config_webservice" translate="label,description" instance="Magento\Webapi\Model\Cache\Type"> <label>Web Services Configuration</label> <description>REST and SOAP configurations, generated WSDL file.</description> diff --git a/app/code/Magento/Webapi/etc/di.xml b/app/code/Magento/Webapi/etc/di.xml index c2f96a9f6f357cb507ce61f2ead2b3244354b2c6..7cc770692bcf7b7105b387f330a8e834ccd65d6a 100644 --- a/app/code/Magento/Webapi/etc/di.xml +++ b/app/code/Magento/Webapi/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\AreaList"> <arguments> <argument name="areas" xsi:type="array"> diff --git a/app/code/Magento/Webapi/etc/frontend/di.xml b/app/code/Magento/Webapi/etc/frontend/di.xml index 9ff3a43bb4ea859bc27b31676f4e8c47c483f52d..cf6be80fcb0d6f41d226a9e05986f6219d1c0155 100644 --- a/app/code/Magento/Webapi/etc/frontend/di.xml +++ b/app/code/Magento/Webapi/etc/frontend/di.xml @@ -24,7 +24,7 @@ */ --> <!-- Temporarily moved to etc/frontend due to bug in Plugin framework --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Integration\Model\Resource\Setup"> <plugin name="webapiSetup" type="Magento\Webapi\Model\Plugin\Setup" /> </type> diff --git a/app/code/Magento/Webapi/etc/module.xml b/app/code/Magento/Webapi/etc/module.xml index ef697999f93b98d11e65f5546e0e755ac68612f3..0b17a6de534d8ee9a405b81cbbd4d5117f7b662e 100644 --- a/app/code/Magento/Webapi/etc/module.xml +++ b/app/code/Magento/Webapi/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Webapi" version="1.0.0.4" active="true"> <sequence> <module name="Magento_Core"/> diff --git a/app/code/Magento/Webapi/etc/webapi_rest/di.xml b/app/code/Magento/Webapi/etc/webapi_rest/di.xml index 7fda81d650574739ff22080f008f13ea3d9558e8..1c3a3896a04564f2117f58b66974bbc2f7f4b41c 100644 --- a/app/code/Magento/Webapi/etc/webapi_rest/di.xml +++ b/app/code/Magento/Webapi/etc/webapi_rest/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Authz\Model\UserLocatorInterface" type="Magento\Webapi\Model\Authz\UserLocator"/> <type name="Magento\Webapi\Model\Authz\UserLocator"> <arguments> diff --git a/app/code/Magento/Webapi/etc/webapi_soap/di.xml b/app/code/Magento/Webapi/etc/webapi_soap/di.xml index b3f571fb668f05453e242126b10c0a783f4355c3..1c8ce71112253995987b8cfd862ff999b84083d2 100644 --- a/app/code/Magento/Webapi/etc/webapi_soap/di.xml +++ b/app/code/Magento/Webapi/etc/webapi_soap/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Authz\Model\UserLocatorInterface" type="Magento\Webapi\Model\Authz\UserLocator"/> <type name="Magento\Webapi\Model\Authz\UserLocator"> <arguments> diff --git a/app/code/Magento/Webapi/view/adminhtml/integration/activate/permissions/tab/webapi.phtml b/app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml similarity index 100% rename from app/code/Magento/Webapi/view/adminhtml/integration/activate/permissions/tab/webapi.phtml rename to app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml diff --git a/app/code/Magento/Webapi/view/adminhtml/resourcetree.phtml b/app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml similarity index 100% rename from app/code/Magento/Webapi/view/adminhtml/resourcetree.phtml rename to app/code/Magento/Webapi/view/adminhtml/templates/resourcetree.phtml diff --git a/app/code/Magento/Weee/etc/adminhtml/events.xml b/app/code/Magento/Weee/etc/adminhtml/events.xml index 03c8de80252988522a42d73667ba644287dc4cb6..c47cdf4f190707cb2827e324b44299ff1e5f5a15 100644 --- a/app/code/Magento/Weee/etc/adminhtml/events.xml +++ b/app/code/Magento/Weee/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="adminhtml_catalog_product_edit_prepare_form"> <observer name="weee" instance="Magento\Weee\Model\Observer" method="setWeeeRendererInForm" /> </event> diff --git a/app/code/Magento/Weee/etc/di.xml b/app/code/Magento/Weee/etc/di.xml index 4b93eda0eea335438be9df29dcb98708148a1449..00efd9736abc41471ad2603907b60c28c9ea3038 100644 --- a/app/code/Magento/Weee/etc/di.xml +++ b/app/code/Magento/Weee/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Weee\Helper\Data"> <arguments> <argument name="weeeTax" xsi:type="object">Magento\Weee\Model\Tax\Proxy</argument> diff --git a/app/code/Magento/Weee/etc/events.xml b/app/code/Magento/Weee/etc/events.xml index e1eba181bbac1d6e42ad0f89de5bb25781a917f0..7060ddcbf14419d55fad534d53b973ba1cd2f296 100644 --- a/app/code/Magento/Weee/etc/events.xml +++ b/app/code/Magento/Weee/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="catalog_entity_attribute_save_before"> <observer name="weee" instance="Magento\Weee\Model\Observer" method="assignBackendModelToAttribute" shared="false" /> </event> diff --git a/app/code/Magento/Weee/etc/fieldset.xml b/app/code/Magento/Weee/etc/fieldset.xml index 595ecab977acf4fb18ef8eaea5288306cac9d927..f66d273ca99e5c1388b2f840aee9367f2c6e629d 100644 --- a/app/code/Magento/Weee/etc/fieldset.xml +++ b/app/code/Magento/Weee/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_item"> <field name="weee_tax_applied"> diff --git a/app/code/Magento/Weee/etc/module.xml b/app/code/Magento/Weee/etc/module.xml index 4ee18de9cfc0bd2438c4e91eb94bd75fa2e6fcb0..b2aa4af66ad0113f358011702a240d8ecde52d85 100644 --- a/app/code/Magento/Weee/etc/module.xml +++ b/app/code/Magento/Weee/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Weee" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Catalog"/> diff --git a/app/code/Magento/Weee/view/adminhtml/renderer/tax.phtml b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml similarity index 100% rename from app/code/Magento/Weee/view/adminhtml/renderer/tax.phtml rename to app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml diff --git a/app/code/Magento/Weee/view/adminhtml/js/fpt-attribute.js b/app/code/Magento/Weee/view/adminhtml/web/js/fpt-attribute.js similarity index 100% rename from app/code/Magento/Weee/view/adminhtml/js/fpt-attribute.js rename to app/code/Magento/Weee/view/adminhtml/web/js/fpt-attribute.js diff --git a/app/code/Magento/Weee/view/base/pricing/adjustment.phtml b/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml similarity index 100% rename from app/code/Magento/Weee/view/base/pricing/adjustment.phtml rename to app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml diff --git a/app/code/Magento/Weee/view/frontend/tax-toggle.js b/app/code/Magento/Weee/view/frontend/web/tax-toggle.js similarity index 100% rename from app/code/Magento/Weee/view/frontend/tax-toggle.js rename to app/code/Magento/Weee/view/frontend/web/tax-toggle.js diff --git a/app/code/Magento/Widget/Model/Template/Filter.php b/app/code/Magento/Widget/Model/Template/Filter.php index a7dc190bf130f3e495e9c47710cb7477ae372b99..cf69ae091fa632f0e18d66383d3161e3ab83d3dc 100644 --- a/app/code/Magento/Widget/Model/Template/Filter.php +++ b/app/code/Magento/Widget/Model/Template/Filter.php @@ -42,7 +42,7 @@ class Filter extends \Magento\Cms\Model\Template\Filter * @param \Magento\Framework\Stdlib\String $string * @param \Magento\Framework\Logger $logger * @param \Magento\Framework\Escaper $escaper - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Core\Model\VariableFactory $coreVariableFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager @@ -57,7 +57,7 @@ class Filter extends \Magento\Cms\Model\Template\Filter \Magento\Framework\Stdlib\String $string, \Magento\Framework\Logger $logger, \Magento\Framework\Escaper $escaper, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Core\Model\VariableFactory $coreVariableFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, @@ -74,7 +74,7 @@ class Filter extends \Magento\Cms\Model\Template\Filter $string, $logger, $escaper, - $viewUrl, + $assetRepo, $scopeConfig, $coreVariableFactory, $storeManager, diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php index e251c440c405bf5c699b5c1af31d8ca27097f300..3d117f8e8f0eee1fef2b6fc95d87e902893c488d 100644 --- a/app/code/Magento/Widget/Model/Widget.php +++ b/app/code/Magento/Widget/Model/Widget.php @@ -42,9 +42,14 @@ class Widget protected $_configCacheType; /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; + + /** + * @var \Magento\Framework\View\Asset\Source + */ + protected $_assetSource; /** * @var \Magento\Framework\View\FileSystem @@ -66,18 +71,21 @@ class Widget /** * @param \Magento\Framework\Escaper $escaper * @param \Magento\Widget\Model\Config\Data $dataStorage - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo + * @param \Magento\Framework\View\Asset\Source $assetSource * @param \Magento\Framework\View\FileSystem $viewFileSystem */ public function __construct( \Magento\Framework\Escaper $escaper, \Magento\Widget\Model\Config\Data $dataStorage, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, + \Magento\Framework\View\Asset\Source $assetSource, \Magento\Framework\View\FileSystem $viewFileSystem ) { $this->_escaper = $escaper; $this->_dataStorage = $dataStorage; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; + $this->_assetSource = $assetSource; $this->_viewFileSystem = $viewFileSystem; } @@ -287,10 +295,14 @@ class Widget if (is_array($widget) && isset($widget['placeholder_image'])) { $placeholder = (string)$widget['placeholder_image']; } - if (!$placeholder || !$this->_viewFileSystem->getViewFile($placeholder)) { - $placeholder = 'Magento_Widget::placeholder.gif'; + if ($placeholder) { + $asset = $this->_assetRepo->createAsset($placeholder); + $placeholder = $this->_assetSource->getFile($asset); + if ($placeholder) { + return $asset->getUrl(); + } } - return $this->_viewUrl->getViewFileUrl($placeholder); + return $this->_assetRepo->getUrl('Magento_Widget::placeholder.gif'); } /** diff --git a/app/code/Magento/Widget/Model/Widget/Config.php b/app/code/Magento/Widget/Model/Widget/Config.php index c280f9a84cfaf90cc1029bcec87ceeb0830902bc..712756adcc1870c2ad85600942ac3e7c7575899e 100644 --- a/app/code/Magento/Widget/Model/Widget/Config.php +++ b/app/code/Magento/Widget/Model/Widget/Config.php @@ -28,9 +28,9 @@ namespace Magento\Widget\Model\Widget; class Config { /** - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * @var \Magento\Widget\Model\Widget @@ -55,18 +55,18 @@ class Config /** * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Core\Helper\Data $coreHelper - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Widget\Model\WidgetFactory $widgetFactory */ public function __construct( \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Core\Helper\Data $coreHelper, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Widget\Model\WidgetFactory $widgetFactory ) { $this->_backendUrl = $backendUrl; $this->_coreHelper = $coreHelper; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_widgetFactory = $widgetFactory; } @@ -78,7 +78,7 @@ class Config */ public function getPluginSettings($config) { - $url = $this->_viewUrl->getViewFileUrl( + $url = $this->_assetRepo->getUrl( 'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js' ); $settings = array( diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php index b6c7ab8f71afbf6daea19699c96df91d392f5878..8539b6fa4cdcdd6fa74b1caa5935f777dda7431e 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Widget/Instance.php @@ -26,8 +26,6 @@ namespace Magento\Widget\Model\Widget; /** * Widget Instance Model * - * @method \Magento\Widget\Model\Resource\Widget\Instance _getResource() - * @method \Magento\Widget\Model\Resource\Widget\Instance getResource() * @method string getTitle() * @method \Magento\Widget\Model\Widget\Instance setTitle(string $value) * @method \Magento\Widget\Model\Widget\Instance setStoreIds(string $value) @@ -36,8 +34,6 @@ namespace Magento\Widget\Model\Widget; * @method \Magento\Widget\Model\Widget\Instance setSortOrder(int $value) * @method \Magento\Widget\Model\Widget\Instance setThemeId(int $value) * @method int getThemeId() - * - * @author Magento Core Team <core@magentocommerce.com> */ class Instance extends \Magento\Framework\Model\AbstractModel { @@ -373,7 +369,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel { if (is_string($this->getData('widget_parameters'))) { return unserialize($this->getData('widget_parameters')); - } else if (is_null($this->getData('widget_parameters'))) { + } elseif (null === $this->getData('widget_parameters')) { return array(); } return is_array($this->getData('widget_parameters')) ? $this->getData('widget_parameters') : array(); @@ -438,7 +434,8 @@ class Instance extends \Magento\Framework\Model\AbstractModel ) ); - $isReadable = $this->_directory->isReadable($this->_directory->getRelativePath($configFile)); + $isReadable = $configFile + && $this->_directory->isReadable($this->_directory->getRelativePath($configFile)); if ($isReadable) { $config = $this->_reader->readFile($configFile); $widgetName = isset($this->_widgetConfigXml['name']) ? $this->_widgetConfigXml['name'] : null; @@ -546,7 +543,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel */ public function generateLayoutUpdateXml($container, $templatePath = '') { - $templateFilename = $this->_viewFileSystem->getFilename( + $templateFilename = $this->_viewFileSystem->getTemplateFileName( $templatePath, array( 'area' => $this->getArea(), diff --git a/app/code/Magento/Widget/etc/adminhtml/acl.xml b/app/code/Magento/Widget/etc/adminhtml/acl.xml index b1e02a0bed8a61bd1b446154e40b72e6fc364cae..a885eca4694920f0a149eac6b86d7935ff903b8a 100644 --- a/app/code/Magento/Widget/etc/adminhtml/acl.xml +++ b/app/code/Magento/Widget/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Widget/etc/adminhtml/di.xml b/app/code/Magento/Widget/etc/adminhtml/di.xml index bf123d7c0fd4c4fd7cd30469ff9779a12f466b1d..b78d15dc13e6a385107fd9967c72a04b9ada7bfc 100644 --- a/app/code/Magento/Widget/etc/adminhtml/di.xml +++ b/app/code/Magento/Widget/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Widget\Model\Widget\Instance"> <arguments> <argument name="relatedCacheTypes" xsi:type="array"> diff --git a/app/code/Magento/Widget/etc/adminhtml/routes.xml b/app/code/Magento/Widget/etc/adminhtml/routes.xml index 61a4461d973026518e9ba4fc4b071c4f07a441e9..9eaf0777470b6936bef94930c120ee75a7121aa8 100644 --- a/app/code/Magento/Widget/etc/adminhtml/routes.xml +++ b/app/code/Magento/Widget/etc/adminhtml/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="admin"> <route id="adminhtml"> <module name="Magento_Widget" before="Magento_Adminhtml" /> diff --git a/app/code/Magento/Widget/etc/di.xml b/app/code/Magento/Widget/etc/di.xml index 9f3a46f00b689500a059e21b66c6886f6538d37a..965d8ecb82ad081b2c5639337b7cef45c284060e 100644 --- a/app/code/Magento/Widget/etc/di.xml +++ b/app/code/Magento/Widget/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Widget\Model\Config\Reader"> <arguments> <argument name="fileName" xsi:type="string">widget.xml</argument> diff --git a/app/code/Magento/Widget/etc/module.xml b/app/code/Magento/Widget/etc/module.xml index 8af5a37c3bec58e24c614af76d3dc8d55891e9c5..b1880423c649c050c8835a15e5607ef963b6f122 100644 --- a/app/code/Magento/Widget/etc/module.xml +++ b/app/code/Magento/Widget/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Widget" version="1.6.0.2" active="true"> <sequence> <module name="Magento_Cms"/> diff --git a/app/code/Magento/Widget/view/adminhtml/instance/edit/layout.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml similarity index 100% rename from app/code/Magento/Widget/view/adminhtml/instance/edit/layout.phtml rename to app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml diff --git a/app/code/Magento/Widget/view/adminhtml/instance/js.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/js.phtml similarity index 100% rename from app/code/Magento/Widget/view/adminhtml/instance/js.phtml rename to app/code/Magento/Widget/view/adminhtml/templates/instance/js.phtml diff --git a/app/code/Magento/Widget/view/adminhtml/placeholder.gif b/app/code/Magento/Widget/view/adminhtml/web/placeholder.gif similarity index 100% rename from app/code/Magento/Widget/view/adminhtml/placeholder.gif rename to app/code/Magento/Widget/view/adminhtml/web/placeholder.gif diff --git a/app/code/Magento/Wishlist/etc/adminhtml/acl.xml b/app/code/Magento/Wishlist/etc/adminhtml/acl.xml index 7868cdd4078271c34967615bfb29a9b1e5160214..cec8e12ff1d1156c1edde51e7499c40398e15cf5 100644 --- a/app/code/Magento/Wishlist/etc/adminhtml/acl.xml +++ b/app/code/Magento/Wishlist/etc/adminhtml/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::admin"> diff --git a/app/code/Magento/Wishlist/etc/adminhtml/di.xml b/app/code/Magento/Wishlist/etc/adminhtml/di.xml index d13ed14850b1d0a36ad859ef1416db29f5173761..acb985b627d5da450c0c12e20abcffd65f187b95 100644 --- a/app/code/Magento/Wishlist/etc/adminhtml/di.xml +++ b/app/code/Magento/Wishlist/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Wishlist\Model\Wishlist"> <arguments> <argument name="useCurrentWebsite" xsi:type="boolean">false</argument> diff --git a/app/code/Magento/Wishlist/etc/di.xml b/app/code/Magento/Wishlist/etc/di.xml index 824f2a7cf45c5351de29c9ee4150e94fea02c61b..30f0f73519ac57c88dcf4a097fa4a2134e15f3d3 100644 --- a/app/code/Magento/Wishlist/etc/di.xml +++ b/app/code/Magento/Wishlist/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Wishlist\Model\Resource\Item\Collection\Grid"> <arguments> <argument name="resource" xsi:type="object">Magento\Wishlist\Model\Resource\Item</argument> diff --git a/app/code/Magento/Wishlist/etc/events.xml b/app/code/Magento/Wishlist/etc/events.xml index 51a6607b842176833f84860203d81a3edbe702a6..70ed1308dfa809b2b2e21e32cf9c02ab4b70e985 100644 --- a/app/code/Magento/Wishlist/etc/events.xml +++ b/app/code/Magento/Wishlist/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="checkout_cart_update_items_before"> <observer name="wishlist" instance="Magento\Wishlist\Model\Observer" method="processCartUpdateBefore" /> </event> diff --git a/app/code/Magento/Wishlist/etc/frontend/di.xml b/app/code/Magento/Wishlist/etc/frontend/di.xml index 0c7c3a88d479628cdcf0a47c88dfe4b33ebe1f67..1bd1fde51a6d0a0744c5d3114a6bf14ddd95b10a 100644 --- a/app/code/Magento/Wishlist/etc/frontend/di.xml +++ b/app/code/Magento/Wishlist/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <virtualType name="Magento\Wishlist\Model\Session\Storage" type="Magento\Framework\Session\Storage"> <arguments> <argument name="namespace" xsi:type="string">wishlist</argument> diff --git a/app/code/Magento/Wishlist/etc/frontend/events.xml b/app/code/Magento/Wishlist/etc/frontend/events.xml index d91ca6ff26ae55fe765ecbe9722086f4670d5e6d..a2223db8b2e5f5fc93ab0e8f8beead7c4fbd44ce 100644 --- a/app/code/Magento/Wishlist/etc/frontend/events.xml +++ b/app/code/Magento/Wishlist/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="customer_login"> <observer name="wishlist" instance="Magento\Wishlist\Model\Observer" method="customerLogin" /> </event> diff --git a/app/code/Magento/Wishlist/etc/frontend/routes.xml b/app/code/Magento/Wishlist/etc/frontend/routes.xml index a3e2deb348c692cb5df285dd3f58b73b4ea06a7a..b11f784421bf4d17a316fb5a66c7990c25f679f5 100644 --- a/app/code/Magento/Wishlist/etc/frontend/routes.xml +++ b/app/code/Magento/Wishlist/etc/frontend/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="standard"> <route id="wishlist" frontName="wishlist"> <module name="Magento_Wishlist" /> diff --git a/app/code/Magento/Wishlist/etc/module.xml b/app/code/Magento/Wishlist/etc/module.xml index b34f798969b6233f93607341045675f63f833776..78fb20dd85a9febd3c0061a7ef788b6a23698faf 100644 --- a/app/code/Magento/Wishlist/etc/module.xml +++ b/app/code/Magento/Wishlist/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Wishlist" version="1.6.0.0" active="true"> <sequence> <module name="Magento_Customer"/> diff --git a/app/code/Magento/Wishlist/etc/view.xml b/app/code/Magento/Wishlist/etc/view.xml index ee6eae430bcc568e210da93ab92bae88545dee9d..31990b4da8360a128110bcdf05a0fa96379ccaf7 100644 --- a/app/code/Magento/Wishlist/etc/view.xml +++ b/app/code/Magento/Wishlist/etc/view.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Magento_Wishlist"> <var name="product_image_size">113</var> <!-- Product image size used in wishlist --> </vars> diff --git a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml rename to app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml index 1138642649f3ed04af543067e43549eb3d526e5a..ffa262e76caf63a3855b3a923d4a10f18e2d3ad6 100644 --- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml +++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_index.xml @@ -25,6 +25,9 @@ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Core/etc/layout_single.xsd"> <update handle="customer_account"/> + <referenceBlock name="head.components"> + <block class="Magento\Framework\View\Element\Js\Components" name="wishlist_head_components" template="Magento_Wishlist::js/components.phtml"/> + </referenceBlock> <referenceContainer name="content"> <block class="Magento\Wishlist\Block\Customer\Wishlist" name="customer.wishlist" template="view.phtml" cacheable="false"> <block class="Magento\Wishlist\Block\Customer\Wishlist\Items" name="customer.wishlist.items" as="items" template="item/list.phtml" cacheable="false"> diff --git a/app/code/Magento/Wishlist/view/frontend/button/share.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/button/share.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/button/tocart.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml similarity index 90% rename from app/code/Magento/Wishlist/view/frontend/button/tocart.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml index 5418b61961d75990f8bdff3c2b48a1c0fe80ef12..dd387f86de36a12a06c338c5d9209f47399ce81f 100644 --- a/app/code/Magento/Wishlist/view/frontend/button/tocart.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml @@ -24,7 +24,7 @@ ?> <?php if($this->getWishlist()->getItemsCount() && $this->getWishlist()->isSalable()): ?> - <button type="button" title="<?php echo __('Add All to Cart') ?>" class="action tocart"> + <button type="button" data-role="all-tocart" title="<?php echo __('Add All to Cart') ?>" class="action tocart"> <span><?php echo __('Add All to Cart') ?></span> </button> <?php endif;?> diff --git a/app/code/Magento/Wishlist/view/frontend/button/update.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/button/update.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/email/items.phtml b/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/email/items.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/email/rss.phtml b/app/code/Magento/Wishlist/view/frontend/templates/email/rss.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/email/rss.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/email/rss.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/item/column/cart.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml similarity index 88% rename from app/code/Magento/Wishlist/view/frontend/item/column/cart.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml index 0efbccd7888f1b0cff9632820fdc81c90af9d219..67f80b6811467bfa1cfb7722be6bc2b04543bf23 100644 --- a/app/code/Magento/Wishlist/view/frontend/item/column/cart.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml @@ -32,11 +32,12 @@ $product = $item->getProduct(); <?php endforeach;?> <div class="box tocart"> <?php if ($item->canHaveQty() && $product->isVisibleInSiteVisibility()): ?> - <input type="number" class="input-text qty" data-validate="{required:true,'validate-greater-than-zero':true}" + <input type="number" data-role="qty" class="input-text qty" data-validate="{required:true,'validate-greater-than-zero':true}" name="qty[<?php echo $item->getId() ?>]" value="<?php echo $this->getAddToCartQty($item) * 1 ?>"> + <?php endif; ?> <?php if ($product->isSaleable()): ?> - <button type="button" title="<?php echo __('Add to Cart') ?>" data-item-id="<?php echo $item->getId()?>" class="action tocart"> + <button type="button" data-role="tocart" title="<?php echo __('Add to Cart') ?>" data-item-id="<?php echo $item->getId()?>" class="action tocart"> <span><?php echo __('Add to Cart') ?></span> </button> <?php else: ?> diff --git a/app/code/Magento/Wishlist/view/frontend/item/column/image.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/item/column/image.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/item/column/info.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/info.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/item/column/info.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/item/column/info.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/item/column/remove.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml similarity index 84% rename from app/code/Magento/Wishlist/view/frontend/item/column/remove.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml index f658442f960620fb491bfd80ff9aa356ce26dfbe..0ffce5076dae15e3dc86f704db15786ba7e7f4a6 100644 --- a/app/code/Magento/Wishlist/view/frontend/item/column/remove.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml @@ -23,6 +23,6 @@ */ ?> -<a href="#" data-post-remove='<?php echo $this->getItemRemoveParams($this->getItem()); ?>' title="<?php echo __('Remove Item') ?>" class="btn-remove action delete"> +<a href="#" data-role="remove" data-post-remove='<?php echo $this->getItemRemoveParams($this->getItem()); ?>' title="<?php echo __('Remove Item') ?>" class="btn-remove action delete"> <span><?php echo __('Remove item');?></span> </a> diff --git a/app/code/Magento/Wishlist/view/frontend/item/configure/addto.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/item/configure/addto.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/item/list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/item/list.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/js/components.phtml b/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml similarity index 72% rename from app/code/Magento/Wishlist/view/frontend/js/components.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml index 223538be23d16506138d036896ac8d835bd7bef5..d5cb3564a243f5882aa6f78b7545d25434300e16 100644 --- a/app/code/Magento/Wishlist/view/frontend/js/components.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/js/components.phtml @@ -29,6 +29,14 @@ * Declaration of resources needed for defined components */ $.mage.component({ + wishlist: [ + '<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>', + '<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>', + '<?php echo $this->getViewFileUrl('mage/validation.js')?>', + '<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>', + '<?php echo $this->getViewFileUrl('jquery/handlebars/handlebars-v1.3.0.js')?>', + '<?php echo $this->getViewFileUrl('Magento_Wishlist::wishlist.js')?>' + ], addToWishlist: [ '<?php echo $this->getViewFileUrl('Magento_Wishlist::js/add-to-wishlist.js') ?>' ], diff --git a/app/code/Magento/Wishlist/view/frontend/link.phtml b/app/code/Magento/Wishlist/view/frontend/templates/link.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/link.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/link.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/options_list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/options_list.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_item.phtml b/app/code/Magento/Wishlist/view/frontend/templates/render/item/price_msrp_item.phtml similarity index 99% rename from app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_item.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/render/item/price_msrp_item.phtml index e2fb0913df81710474fa9a3277943b137bc6e6b5..46adf8abbd87a72f299cde37808319201112b6b3 100644 --- a/app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_item.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/render/item/price_msrp_item.phtml @@ -44,7 +44,7 @@ <div class="price-box msrp"> <?php $_price = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_product->getMsrp()) ?> <?php if($_product->getMsrp()): ?> - <?php $_msrpPrice = $_coreHelper->currency($_product->getMsrp(),true,true) ?> + <?php $_msrpPrice = $_coreHelper->currency($_product->getMsrp(),true,false) ?> <span class="old-price" ><?php echo $_msrpPrice ?></span> <?php endif; ?> <?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?> diff --git a/app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_rss.phtml b/app/code/Magento/Wishlist/view/frontend/templates/render/item/price_msrp_rss.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/render/item/price_msrp_rss.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/render/item/price_msrp_rss.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/shared.phtml b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/shared.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/shared.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/sharing.phtml b/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/sharing.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/sidebar.phtml b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/sidebar.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml diff --git a/app/code/Magento/Wishlist/view/frontend/view.phtml b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml similarity index 86% rename from app/code/Magento/Wishlist/view/frontend/view.phtml rename to app/code/Magento/Wishlist/view/frontend/templates/view.phtml index 17aa5cf8ea3fb303351664dec97ef9a5999a470a..b0a32da2843ccc353eb52aaed575258b64263e54 100644 --- a/app/code/Magento/Wishlist/view/frontend/view.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml @@ -65,13 +65,13 @@ </div> </div> </form> - <script id="form-tmpl" type="text/x-jQuery-tmpl"> - <form id="wishlist-hidden-form" method="post" action="${url}" class="no-display"> - {{if itemId}}<input name="item_id" value="${itemId}">{{/if}} - {{if wishlistId}}<input name="wishlist_id" value="${wishlistId}">{{/if}} - {{if qty}}<input name="qty" value="${qty}">{{/if}} - {{if item}}<input name="item" value="${item}">{{/if}} - {{if entity}}<input name="entity" value="${entity}">{{/if}} + <script id="form-tmpl" type="text/x-handlebars-template"> + <form id="wishlist-hidden-form" method="post" action="{{url}}" class="no-display"> + {{#if itemId}}<input name="item_id" value="{{itemId}}">{{/if}} + {{#if wishlistId}}<input name="wishlist_id" value="{{wishlistId}}">{{/if}} + {{#if qty}}<input name="qty" value="{{qty}}">{{/if}} + {{#if item}}<input name="item" value="{{item}}">{{/if}} + {{#if entity}}<input name="entity" value="{{entity}}">{{/if}} </form> </script> <?php endif ?> diff --git a/app/code/Magento/Wishlist/view/frontend/js/add-to-wishlist.js b/app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/js/add-to-wishlist.js rename to app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js diff --git a/app/code/Magento/Wishlist/view/frontend/js/search.js b/app/code/Magento/Wishlist/view/frontend/web/js/search.js similarity index 100% rename from app/code/Magento/Wishlist/view/frontend/js/search.js rename to app/code/Magento/Wishlist/view/frontend/web/js/search.js diff --git a/app/code/Magento/Wishlist/view/frontend/wishlist.js b/app/code/Magento/Wishlist/view/frontend/web/wishlist.js similarity index 89% rename from app/code/Magento/Wishlist/view/frontend/wishlist.js rename to app/code/Magento/Wishlist/view/frontend/web/wishlist.js index 0e2037fba99d052e881f32e51ee4791957c81e88..8d577b6ec8113019d9514e4791105ba1aa0e04cc 100644 --- a/app/code/Magento/Wishlist/view/frontend/wishlist.js +++ b/app/code/Magento/Wishlist/view/frontend/web/wishlist.js @@ -23,19 +23,20 @@ /*jshint browser:true jquery:true sub:true*/ /*global alert*/ -(function($, window) { +/*global Handlebars*/ + +(function($, Handlebars, window) { "use strict"; $.widget('mage.wishlist', { options: { dataAttribute: 'item-id', nameFormat: 'qty[{0}]', - btnRemoveSelector: '.btn-remove', - qtySelector: '.qty', - addToCartSelector: '.btn-cart', - addAllToCartSelector: '.btn-add', + btnRemoveSelector: '[data-role=remove]', + qtySelector: '[data-role=qty]', + addToCartSelector: '[data-role=tocart]', + addAllToCartSelector: '[data-role=all-tocart]', commentInputType: 'textarea', - infoList: false, - confirmRemoveMessage: 'Are you sure you want to remove this product from your wishlist?' + infoList: false }, /** @@ -52,13 +53,19 @@ $.proxy(_this._addItemsToCart($(context).parents('.cart-cell').find(_this.options.addToCartSelector)), _this); }) .on('click', this.options.btnRemoveSelector, $.proxy(function(event) { - if (this._confirmRemoveWishlistItem()) { - $.mage.dataPost().postData($(event.currentTarget).data('post-remove')); - } + event.preventDefault(); + $.mage.dataPost().postData($(event.currentTarget).data('post-remove')); }, this)) .on('click', this.options.addAllToCartSelector, $.proxy(this._addAllWItemsToCart, this)) .on('focusin focusout', this.options.commentInputType, $.proxy(this._focusComment, this)); } + + // Setup validation for the form + this.element.mage('validation', { + errorPlacement: function(error, element) { + error.insertAfter(element.next()); + } + }); }, /** @@ -96,14 +103,6 @@ }, - /** - * Confirmation window for removing wish list item. - * @private - */ - _confirmRemoveWishlistItem: function() { - return window.confirm(this.options.confirmRemoveMessage); - }, - /** * Add all wish list items to cart * @private @@ -202,10 +201,13 @@ item: json['itemId'], entity: json['entity'], url: json['url'] - }; - $(_this.options.formTmplSelector).tmpl(tmplJson).appendTo('body'); + }, + source = $(_this.options.formTmplSelector).html(), + template = Handlebars.compile(source), + html = template(tmplJson); + $(html).appendTo('body'); $(_this.options.formTmplId).submit(); }); } }); -})(jQuery, window); +})(jQuery, Handlebars, window); diff --git a/app/design/adminhtml/Magento/backend/Magento_AdminNotification/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_AdminNotification/web/css/source/module.less similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_AdminNotification/css/source/module.less rename to app/design/adminhtml/Magento/backend/Magento_AdminNotification/web/css/source/module.less diff --git a/app/design/adminhtml/Magento/backend/Magento_Backend/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module.less similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_Backend/css/source/module.less rename to app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module.less diff --git a/app/design/adminhtml/Magento/backend/Magento_Backend/images/logo-magento-small.png b/app/design/adminhtml/Magento/backend/Magento_Backend/web/images/logo-magento-small.png similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_Backend/images/logo-magento-small.png rename to app/design/adminhtml/Magento/backend/Magento_Backend/web/images/logo-magento-small.png diff --git a/app/design/adminhtml/Magento/backend/Magento_Backend/images/logo-magento.png b/app/design/adminhtml/Magento/backend/Magento_Backend/web/images/logo-magento.png similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_Backend/images/logo-magento.png rename to app/design/adminhtml/Magento/backend/Magento_Backend/web/images/logo-magento.png diff --git a/app/design/adminhtml/Magento/backend/Magento_Catalog/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_Catalog/web/css/source/module.less similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_Catalog/css/source/module.less rename to app/design/adminhtml/Magento/backend/Magento_Catalog/web/css/source/module.less diff --git a/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/module.less similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/css/source/module.less rename to app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/module.less diff --git a/app/design/adminhtml/Magento/backend/Magento_Core/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_Core/web/css/source/module.less similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_Core/css/source/module.less rename to app/design/adminhtml/Magento/backend/Magento_Core/web/css/source/module.less diff --git a/app/design/adminhtml/Magento/backend/Magento_Tax/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/module.less similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_Tax/css/source/module.less rename to app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/module.less diff --git a/app/design/adminhtml/Magento/backend/Magento_Theme/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_Theme/web/css/source/module.less similarity index 100% rename from app/design/adminhtml/Magento/backend/Magento_Theme/css/source/module.less rename to app/design/adminhtml/Magento/backend/Magento_Theme/web/css/source/module.less diff --git a/app/design/adminhtml/Magento/backend/theme.xml b/app/design/adminhtml/Magento/backend/theme.xml index 93044da0057687179909c2ad539f63cac8d1a60f..accbe0e90204f09a0da214b0276cb83be2a82b44 100644 --- a/app/design/adminhtml/Magento/backend/theme.xml +++ b/app/design/adminhtml/Magento/backend/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento 2 backend</title> <version>1.0.0.0</version> </theme> diff --git a/app/design/adminhtml/Magento/backend/css/admin.less b/app/design/adminhtml/Magento/backend/web/css/admin.less similarity index 100% rename from app/design/adminhtml/Magento/backend/css/admin.less rename to app/design/adminhtml/Magento/backend/web/css/admin.less diff --git a/app/design/adminhtml/Magento/backend/css/pages.less b/app/design/adminhtml/Magento/backend/web/css/pages.less similarity index 100% rename from app/design/adminhtml/Magento/backend/css/pages.less rename to app/design/adminhtml/Magento/backend/web/css/pages.less diff --git a/app/design/adminhtml/Magento/backend/css/source/abstract.less b/app/design/adminhtml/Magento/backend/web/css/source/abstract.less similarity index 100% rename from app/design/adminhtml/Magento/backend/css/source/abstract.less rename to app/design/adminhtml/Magento/backend/web/css/source/abstract.less diff --git a/app/design/adminhtml/Magento/backend/css/source/dashboard.less b/app/design/adminhtml/Magento/backend/web/css/source/dashboard.less similarity index 100% rename from app/design/adminhtml/Magento/backend/css/source/dashboard.less rename to app/design/adminhtml/Magento/backend/web/css/source/dashboard.less diff --git a/app/design/adminhtml/Magento/backend/css/source/navigation.less b/app/design/adminhtml/Magento/backend/web/css/source/navigation.less similarity index 100% rename from app/design/adminhtml/Magento/backend/css/source/navigation.less rename to app/design/adminhtml/Magento/backend/web/css/source/navigation.less diff --git a/app/design/adminhtml/Magento/backend/css/source/table.less b/app/design/adminhtml/Magento/backend/web/css/source/table.less similarity index 100% rename from app/design/adminhtml/Magento/backend/css/source/table.less rename to app/design/adminhtml/Magento/backend/web/css/source/table.less diff --git a/app/design/adminhtml/Magento/backend/css/source/theme.less b/app/design/adminhtml/Magento/backend/web/css/source/theme.less similarity index 100% rename from app/design/adminhtml/Magento/backend/css/source/theme.less rename to app/design/adminhtml/Magento/backend/web/css/source/theme.less diff --git a/app/design/adminhtml/Magento/backend/css/styles.less b/app/design/adminhtml/Magento/backend/web/css/styles.less similarity index 82% rename from app/design/adminhtml/Magento/backend/css/styles.less rename to app/design/adminhtml/Magento/backend/web/css/styles.less index 47983cc820a5e3bb44a56dee6d6c0f7dbdc84b96..7d16f2f148793892337df5e3fa6be0606563ece4 100644 --- a/app/design/adminhtml/Magento/backend/css/styles.less +++ b/app/design/adminhtml/Magento/backend/web/css/styles.less @@ -29,15 +29,15 @@ // Import theme vars overrides and mixins @import "source/lib/lib.less"; // Import all lib files @import "../less/styles/vars.less"; -@import "source/theme.less"; // import theme styles -@import "source/table.less"; // import theme styles +@import "source/theme"; // import theme styles +@import "source/table"; // import theme styles @baseDir: "../"; //default -@import "source/navigation.less"; // import theme navigation -@import "source/dashboard.less"; // import theme navigation +@import "source/navigation"; // import theme navigation +@import "source/dashboard"; // import theme navigation // Magento Import instructions //@magento_import "source/module.less"; // import theme styles -@import (reference) "source/abstract.less"; // import theme styles +@import (reference) "source/abstract"; // import theme styles diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.eot b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.eot similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.eot rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.eot diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.svg b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.svg rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.svg diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.ttf b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.ttf similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.ttf rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.ttf diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.woff b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.woff similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBlack-webfont.woff rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBlack-webfont.woff diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.eot b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.eot similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.eot rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.eot diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.svg b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.svg rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.svg diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.ttf b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.ttf similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.ttf rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.ttf diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.woff b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.woff similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansBold-webfont.woff rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansBold-webfont.woff diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.eot b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.eot similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.eot rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.eot diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.svg b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.svg rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.svg diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.ttf b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.ttf similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.ttf rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.ttf diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.woff b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.woff similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansLight-webfont.woff rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansLight-webfont.woff diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.eot b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.eot similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.eot rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.eot diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.svg b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.svg rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.svg diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.ttf b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.ttf similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.ttf rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.ttf diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.woff b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.woff similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansRegular-webfont.woff rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansRegular-webfont.woff diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.eot b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.eot similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.eot rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.eot diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.svg b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.svg rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.svg diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.ttf b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.ttf similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.ttf rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.ttf diff --git a/app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.woff b/app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.woff similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/calluna/CallunaSansSemiBold-webfont.woff rename to app/design/adminhtml/Magento/backend/web/fonts/calluna/CallunaSansSemiBold-webfont.woff diff --git a/app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.eot b/app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.eot similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.eot rename to app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.eot diff --git a/app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.svg b/app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.svg rename to app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.svg diff --git a/app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.ttf b/app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.ttf similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.ttf rename to app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.ttf diff --git a/app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.woff b/app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.woff similarity index 100% rename from app/design/adminhtml/Magento/backend/fonts/icons/admin-icons.woff rename to app/design/adminhtml/Magento/backend/web/fonts/icons/admin-icons.woff diff --git a/app/design/adminhtml/Magento/backend/images/ajax-loader-tr.gif b/app/design/adminhtml/Magento/backend/web/images/ajax-loader-tr.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/ajax-loader-tr.gif rename to app/design/adminhtml/Magento/backend/web/images/ajax-loader-tr.gif diff --git a/app/design/adminhtml/Magento/backend/images/ajax-loader.gif b/app/design/adminhtml/Magento/backend/web/images/ajax-loader.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/ajax-loader.gif rename to app/design/adminhtml/Magento/backend/web/images/ajax-loader.gif diff --git a/app/design/adminhtml/Magento/backend/images/body-bg.jpg b/app/design/adminhtml/Magento/backend/web/images/body-bg.jpg similarity index 100% rename from app/design/adminhtml/Magento/backend/images/body-bg.jpg rename to app/design/adminhtml/Magento/backend/web/images/body-bg.jpg diff --git a/app/design/adminhtml/Magento/backend/images/cancel_icon.gif b/app/design/adminhtml/Magento/backend/web/images/cancel_icon.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/cancel_icon.gif rename to app/design/adminhtml/Magento/backend/web/images/cancel_icon.gif diff --git a/app/design/adminhtml/Magento/backend/images/edit_icon.gif b/app/design/adminhtml/Magento/backend/web/images/edit_icon.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/edit_icon.gif rename to app/design/adminhtml/Magento/backend/web/images/edit_icon.gif diff --git a/app/design/adminhtml/Magento/backend/images/fam_application_form_delete.png b/app/design/adminhtml/Magento/backend/web/images/fam_application_form_delete.png similarity index 100% rename from app/design/adminhtml/Magento/backend/images/fam_application_form_delete.png rename to app/design/adminhtml/Magento/backend/web/images/fam_application_form_delete.png diff --git a/app/design/adminhtml/Magento/backend/images/fam_bin.gif b/app/design/adminhtml/Magento/backend/web/images/fam_bin.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/fam_bin.gif rename to app/design/adminhtml/Magento/backend/web/images/fam_bin.gif diff --git a/app/design/adminhtml/Magento/backend/images/fam_bullet_disk.gif b/app/design/adminhtml/Magento/backend/web/images/fam_bullet_disk.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/fam_bullet_disk.gif rename to app/design/adminhtml/Magento/backend/web/images/fam_bullet_disk.gif diff --git a/app/design/adminhtml/Magento/backend/images/fam_leaf.png b/app/design/adminhtml/Magento/backend/web/images/fam_leaf.png similarity index 100% rename from app/design/adminhtml/Magento/backend/images/fam_leaf.png rename to app/design/adminhtml/Magento/backend/web/images/fam_leaf.png diff --git a/app/design/adminhtml/Magento/backend/images/fam_link.gif b/app/design/adminhtml/Magento/backend/web/images/fam_link.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/fam_link.gif rename to app/design/adminhtml/Magento/backend/web/images/fam_link.gif diff --git a/app/design/adminhtml/Magento/backend/images/fam_package_go.gif b/app/design/adminhtml/Magento/backend/web/images/fam_package_go.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/fam_package_go.gif rename to app/design/adminhtml/Magento/backend/web/images/fam_package_go.gif diff --git a/app/design/adminhtml/Magento/backend/images/fam_refresh.gif b/app/design/adminhtml/Magento/backend/web/images/fam_refresh.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/fam_refresh.gif rename to app/design/adminhtml/Magento/backend/web/images/fam_refresh.gif diff --git a/app/design/adminhtml/Magento/backend/images/grid-cal.gif b/app/design/adminhtml/Magento/backend/web/images/grid-cal.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/grid-cal.gif rename to app/design/adminhtml/Magento/backend/web/images/grid-cal.gif diff --git a/app/design/adminhtml/Magento/backend/images/grouped_to_order_icon.png b/app/design/adminhtml/Magento/backend/web/images/grouped_to_order_icon.png similarity index 100% rename from app/design/adminhtml/Magento/backend/images/grouped_to_order_icon.png rename to app/design/adminhtml/Magento/backend/web/images/grouped_to_order_icon.png diff --git a/app/design/adminhtml/Magento/backend/images/ico_success.gif b/app/design/adminhtml/Magento/backend/web/images/ico_success.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/ico_success.gif rename to app/design/adminhtml/Magento/backend/web/images/ico_success.gif diff --git a/app/design/adminhtml/Magento/backend/images/pager_arrow_left_off.gif b/app/design/adminhtml/Magento/backend/web/images/pager_arrow_left_off.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/pager_arrow_left_off.gif rename to app/design/adminhtml/Magento/backend/web/images/pager_arrow_left_off.gif diff --git a/app/design/adminhtml/Magento/backend/images/pager_arrow_right_off.gif b/app/design/adminhtml/Magento/backend/web/images/pager_arrow_right_off.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/pager_arrow_right_off.gif rename to app/design/adminhtml/Magento/backend/web/images/pager_arrow_right_off.gif diff --git a/app/design/adminhtml/Magento/backend/images/process_spinner.gif b/app/design/adminhtml/Magento/backend/web/images/process_spinner.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/process_spinner.gif rename to app/design/adminhtml/Magento/backend/web/images/process_spinner.gif diff --git a/app/design/adminhtml/Magento/backend/images/rule_chooser_trigger.gif b/app/design/adminhtml/Magento/backend/web/images/rule_chooser_trigger.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/rule_chooser_trigger.gif rename to app/design/adminhtml/Magento/backend/web/images/rule_chooser_trigger.gif diff --git a/app/design/adminhtml/Magento/backend/images/rule_component_add.gif b/app/design/adminhtml/Magento/backend/web/images/rule_component_add.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/rule_component_add.gif rename to app/design/adminhtml/Magento/backend/web/images/rule_component_add.gif diff --git a/app/design/adminhtml/Magento/backend/images/rule_component_apply.gif b/app/design/adminhtml/Magento/backend/web/images/rule_component_apply.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/rule_component_apply.gif rename to app/design/adminhtml/Magento/backend/web/images/rule_component_apply.gif diff --git a/app/design/adminhtml/Magento/backend/images/rule_component_remove.gif b/app/design/adminhtml/Magento/backend/web/images/rule_component_remove.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/images/rule_component_remove.gif rename to app/design/adminhtml/Magento/backend/web/images/rule_component_remove.gif diff --git a/app/design/adminhtml/Magento/backend/images/select-bg.svg b/app/design/adminhtml/Magento/backend/web/images/select-bg.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/images/select-bg.svg rename to app/design/adminhtml/Magento/backend/web/images/select-bg.svg diff --git a/app/design/adminhtml/Magento/backend/images/subconfig-bg.png b/app/design/adminhtml/Magento/backend/web/images/subconfig-bg.png similarity index 100% rename from app/design/adminhtml/Magento/backend/images/subconfig-bg.png rename to app/design/adminhtml/Magento/backend/web/images/subconfig-bg.png diff --git a/app/design/adminhtml/Magento/backend/images/switcher.png b/app/design/adminhtml/Magento/backend/web/images/switcher.png similarity index 100% rename from app/design/adminhtml/Magento/backend/images/switcher.png rename to app/design/adminhtml/Magento/backend/web/images/switcher.png diff --git a/app/design/adminhtml/Magento/backend/js/theme.js b/app/design/adminhtml/Magento/backend/web/js/theme.js similarity index 100% rename from app/design/adminhtml/Magento/backend/js/theme.js rename to app/design/adminhtml/Magento/backend/web/js/theme.js diff --git a/app/design/adminhtml/Magento/backend/less/clearless/all.less b/app/design/adminhtml/Magento/backend/web/less/clearless/all.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/all.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/all.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/arrows.less b/app/design/adminhtml/Magento/backend/web/less/clearless/arrows.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/arrows.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/arrows.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/grids.less b/app/design/adminhtml/Magento/backend/web/less/clearless/grids.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/grids.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/grids.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/helpers.less b/app/design/adminhtml/Magento/backend/web/less/clearless/helpers.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/helpers.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/helpers.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/icons.less b/app/design/adminhtml/Magento/backend/web/less/clearless/icons.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/icons.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/icons.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/resets.less b/app/design/adminhtml/Magento/backend/web/less/clearless/resets.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/resets.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/resets.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/settings.less b/app/design/adminhtml/Magento/backend/web/less/clearless/settings.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/settings.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/settings.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/sprites.less b/app/design/adminhtml/Magento/backend/web/less/clearless/sprites.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/sprites.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/sprites.less diff --git a/app/design/adminhtml/Magento/backend/less/clearless/typography.less b/app/design/adminhtml/Magento/backend/web/less/clearless/typography.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/clearless/typography.less rename to app/design/adminhtml/Magento/backend/web/less/clearless/typography.less diff --git a/app/design/adminhtml/Magento/backend/less/lib/buttons.less b/app/design/adminhtml/Magento/backend/web/less/lib/buttons.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/lib/buttons.less rename to app/design/adminhtml/Magento/backend/web/less/lib/buttons.less diff --git a/app/design/adminhtml/Magento/backend/less/styles/base.less b/app/design/adminhtml/Magento/backend/web/less/styles/base.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/styles/base.less rename to app/design/adminhtml/Magento/backend/web/less/styles/base.less diff --git a/app/design/adminhtml/Magento/backend/less/styles/debug.less b/app/design/adminhtml/Magento/backend/web/less/styles/debug.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/styles/debug.less rename to app/design/adminhtml/Magento/backend/web/less/styles/debug.less diff --git a/app/design/adminhtml/Magento/backend/less/styles/header.less b/app/design/adminhtml/Magento/backend/web/less/styles/header.less similarity index 100% rename from app/design/adminhtml/Magento/backend/less/styles/header.less rename to app/design/adminhtml/Magento/backend/web/less/styles/header.less diff --git a/app/design/adminhtml/Magento/backend/less/styles/pages.less b/app/design/adminhtml/Magento/backend/web/less/styles/pages.less similarity index 99% rename from app/design/adminhtml/Magento/backend/less/styles/pages.less rename to app/design/adminhtml/Magento/backend/web/less/styles/pages.less index 53d103577bb7f2b6f2c8a656e8a4aa1a4149b4be..3d77a2a7af34c68411ae9867de2aa3cc0bc160bc 100644 --- a/app/design/adminhtml/Magento/backend/less/styles/pages.less +++ b/app/design/adminhtml/Magento/backend/web/less/styles/pages.less @@ -21,7 +21,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -@import "vars.less"; +@import "vars"; /* Product Creation @@ -2034,4 +2034,4 @@ table.items-to-invoice tbody tr:hover td { clear: both; } -@import "debug.less"; +@import "debug"; diff --git a/app/design/adminhtml/Magento/backend/less/styles/vars.less b/app/design/adminhtml/Magento/backend/web/less/styles/vars.less similarity index 99% rename from app/design/adminhtml/Magento/backend/less/styles/vars.less rename to app/design/adminhtml/Magento/backend/web/less/styles/vars.less index 7343b38255092fa575bae0116af65089c397a383..4f42dddc8c375dc6cab6b7e945d2d09b07cc5e84 100644 --- a/app/design/adminhtml/Magento/backend/less/styles/vars.less +++ b/app/design/adminhtml/Magento/backend/web/less/styles/vars.less @@ -21,7 +21,7 @@ // * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) // */ -@import "../clearless/all.less"; +@import "../clearless/all"; @baseDir: ~".."; diff --git a/app/design/adminhtml/Magento/backend/mui/base.css b/app/design/adminhtml/Magento/backend/web/mui/base.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/base.css rename to app/design/adminhtml/Magento/backend/web/mui/base.css diff --git a/app/design/adminhtml/Magento/backend/mui/components.css b/app/design/adminhtml/Magento/backend/web/mui/components.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/components.css rename to app/design/adminhtml/Magento/backend/web/mui/components.css diff --git a/app/design/adminhtml/Magento/backend/mui/elements.css b/app/design/adminhtml/Magento/backend/web/mui/elements.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/elements.css rename to app/design/adminhtml/Magento/backend/web/mui/elements.css diff --git a/app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.eot b/app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.eot similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.eot rename to app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.eot diff --git a/app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.svg b/app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.svg rename to app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.svg diff --git a/app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.ttf b/app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.ttf similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.ttf rename to app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.ttf diff --git a/app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.woff b/app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.woff similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/fonts/MUI-Icons.woff rename to app/design/adminhtml/Magento/backend/web/mui/fonts/MUI-Icons.woff diff --git a/app/design/adminhtml/Magento/backend/mui/form.css b/app/design/adminhtml/Magento/backend/web/mui/form.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/form.css rename to app/design/adminhtml/Magento/backend/web/mui/form.css diff --git a/app/design/adminhtml/Magento/backend/mui/grid.css b/app/design/adminhtml/Magento/backend/web/mui/grid.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/grid.css rename to app/design/adminhtml/Magento/backend/web/mui/grid.css diff --git a/app/design/adminhtml/Magento/backend/mui/icons.css b/app/design/adminhtml/Magento/backend/web/mui/icons.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/icons.css rename to app/design/adminhtml/Magento/backend/web/mui/icons.css diff --git a/app/design/adminhtml/Magento/backend/mui/images/ajax-loader-big.gif b/app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader-big.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/ajax-loader-big.gif rename to app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader-big.gif diff --git a/app/design/adminhtml/Magento/backend/mui/images/ajax-loader-small.gif b/app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader-small.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/ajax-loader-small.gif rename to app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader-small.gif diff --git a/app/design/adminhtml/Magento/backend/mui/images/ajax-loader-white.gif b/app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader-white.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/ajax-loader-white.gif rename to app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader-white.gif diff --git a/app/design/adminhtml/Magento/backend/mui/images/ajax-loader.gif b/app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader.gif similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/ajax-loader.gif rename to app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader.gif diff --git a/app/design/adminhtml/Magento/backend/mui/images/ajax-loader.svg b/app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader.svg similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/ajax-loader.svg rename to app/design/adminhtml/Magento/backend/web/mui/images/ajax-loader.svg diff --git a/app/design/adminhtml/Magento/backend/mui/images/pagination-arrows-bg.png b/app/design/adminhtml/Magento/backend/web/mui/images/pagination-arrows-bg.png similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/pagination-arrows-bg.png rename to app/design/adminhtml/Magento/backend/web/mui/images/pagination-arrows-bg.png diff --git a/app/design/adminhtml/Magento/backend/mui/images/rating-bg.png b/app/design/adminhtml/Magento/backend/web/mui/images/rating-bg.png similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/rating-bg.png rename to app/design/adminhtml/Magento/backend/web/mui/images/rating-bg.png diff --git a/app/design/adminhtml/Magento/backend/mui/images/sorter-bg.png b/app/design/adminhtml/Magento/backend/web/mui/images/sorter-bg.png similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/sorter-bg.png rename to app/design/adminhtml/Magento/backend/web/mui/images/sorter-bg.png diff --git a/app/design/adminhtml/Magento/backend/mui/images/view-mode-bg.png b/app/design/adminhtml/Magento/backend/web/mui/images/view-mode-bg.png similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/images/view-mode-bg.png rename to app/design/adminhtml/Magento/backend/web/mui/images/view-mode-bg.png diff --git a/app/design/adminhtml/Magento/backend/mui/print.css b/app/design/adminhtml/Magento/backend/web/mui/print.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/print.css rename to app/design/adminhtml/Magento/backend/web/mui/print.css diff --git a/app/design/adminhtml/Magento/backend/mui/reset.css b/app/design/adminhtml/Magento/backend/web/mui/reset.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/reset.css rename to app/design/adminhtml/Magento/backend/web/mui/reset.css diff --git a/app/design/adminhtml/Magento/backend/mui/utils.css b/app/design/adminhtml/Magento/backend/web/mui/utils.css similarity index 100% rename from app/design/adminhtml/Magento/backend/mui/utils.css rename to app/design/adminhtml/Magento/backend/web/mui/utils.css diff --git a/app/design/frontend/Magento/blank/Magento_Bundle/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Bundle/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Bundle/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Bundle/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Catalog/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/css/source/widgets.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/widgets.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Catalog/css/source/widgets.less rename to app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/widgets.less diff --git a/app/design/frontend/Magento/blank/Magento_CatalogSearch/css/source/module.less b/app/design/frontend/Magento/blank/Magento_CatalogSearch/web/css/source/module.less similarity index 83% rename from app/design/frontend/Magento/blank/Magento_CatalogSearch/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_CatalogSearch/web/css/source/module.less index 7c12804f670d0f3c7f1ea5d834e4058156d5a9ec..f687a20fd91cd5d00504362f3a9ba8ae4fa93ebd 100644 --- a/app/design/frontend/Magento/blank/Magento_CatalogSearch/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_CatalogSearch/web/css/source/module.less @@ -72,40 +72,39 @@ } .search.autocomplete { - position: absolute; - z-index: 3; - background: @autocomplete-background; - border: @autocomplete-border; - border-top: 0; - overflow: hidden; - display: none; - &:extend(.add-box-sizing all); - top: 100%; - margin-top: -15px; - left: 0; - ul { - li { - border-top: @autocomplete-item-border; - cursor: pointer; - padding: 5px 40px 5px 10px; - margin: 0; - position: relative; - text-align: left; - white-space: normal; - &:first-child { - border-top: none; - } - &:hover { - background: @autocomplete-item-hover; - } - .amount { - color: @autocomplete-item-amount-color; - position: absolute; - right: 7px; - top: 5px; - } - } + position: absolute; + top: 31px; + left: 15px; + z-index: 3; + background: @autocomplete-background; + border: @autocomplete-border; + border-top: 0; + overflow: hidden; + display: none; + &:extend(.add-box-sizing all); + ul { + li { + border-top: @autocomplete-item-border; + cursor: pointer; + padding: 5px 40px 5px 10px; + margin: 0; + position: relative; + text-align: left; + white-space: normal; + &:first-child { + border-top: none; + } + &:hover, &.selected { + background: @autocomplete-item-hover; + } + .amount { + color: @autocomplete-item-amount-color; + position: absolute; + right: 7px; + top: 5px; + } } + } } .form.search.advanced { diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module.less similarity index 99% rename from app/design/frontend/Magento/blank/Magento_Checkout/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module.less index 0ae135b5105ab68b827fc313170d93459b2f72c7..9904ec69c6e786d98d37ae7bb9b7542761e14c46 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module.less @@ -57,23 +57,20 @@ right: 0; top: 0; } - &.active { - .icon-font-symbol( - @_icon-font-content: @icon-prev, - @_icon-font-position: after - ); - } strong { font-weight: @font-weight-base; } } - .content { - display: none; - } &.active { .content { display: block; } + .title { + .icon-font-symbol( + @_icon-font-content: @icon-prev, + @_icon-font-position: after + ); + } } .item.options { margin-left: 0; @@ -198,7 +195,6 @@ padding-bottom: 20px; } } - .product { &.photo { display: block; diff --git a/app/design/frontend/Magento/blank/Magento_Cms/css/source/widgets.less b/app/design/frontend/Magento/blank/Magento_Cms/web/css/source/widgets.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Cms/css/source/widgets.less rename to app/design/frontend/Magento/blank/Magento_Cms/web/css/source/widgets.less diff --git a/app/design/frontend/Magento/blank/Magento_Customer/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Customer/web/css/source/module.less similarity index 98% rename from app/design/frontend/Magento/blank/Magento_Customer/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Customer/web/css/source/module.less index 8e99ea23f9f781590973f7fdea608bcc35f7c229..0ba4028718921718106cb2d36ea2faa487ccd770 100644 --- a/app/design/frontend/Magento/blank/Magento_Customer/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Customer/web/css/source/module.less @@ -53,6 +53,18 @@ } } +.address.edit { + #region_id { + display: none; + } +} + +.form.edit.account{ + .fieldset.password{ + display: none; + } +} + .address.billing, .address.shipping, .box.information, diff --git a/app/design/frontend/Magento/blank/Magento_Downloadable/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Downloadable/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Downloadable/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Downloadable/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Multishipping/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Multishipping/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Multishipping/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Multishipping/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Newsletter/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Newsletter/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Newsletter/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Newsletter/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Paypal/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Paypal/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Paypal/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Paypal/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Reports/css/source/widgets.less b/app/design/frontend/Magento/blank/Magento_Reports/web/css/source/widgets.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Reports/css/source/widgets.less rename to app/design/frontend/Magento/blank/Magento_Reports/web/css/source/widgets.less diff --git a/app/design/frontend/Magento/blank/Magento_Review/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Review/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Review/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Review/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Sales/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Sales/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Sales/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Sales/css/source/widgets.less b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/widgets.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Sales/css/source/widgets.less rename to app/design/frontend/Magento/blank/Magento_Sales/web/css/source/widgets.less diff --git a/app/design/frontend/Magento/blank/Magento_Sendfriend/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Sendfriend/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Sendfriend/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Sendfriend/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/Magento_Theme/layout/default_head_blocks.xml b/app/design/frontend/Magento/blank/Magento_Theme/layout/default_head_blocks.xml index 5ba299de040ce9a665f7a03d0bd2668a3ee00896..8decbb34245732b567f2d64ef682718012e9b246 100644 --- a/app/design/frontend/Magento/blank/Magento_Theme/layout/default_head_blocks.xml +++ b/app/design/frontend/Magento/blank/Magento_Theme/layout/default_head_blocks.xml @@ -47,7 +47,7 @@ </block> <block class="Magento\Theme\Block\Html\Head\Script" name="js-navigation-menu-js"> <arguments> - <argument name="file" xsi:type="string">js/navigation-menu.js</argument> + <argument name="file" xsi:type="string">mage/menu.js</argument> </arguments> </block> <block class="Magento\Theme\Block\Html\Head\Script" name="js-theme-js"> diff --git a/app/design/frontend/Magento/blank/Magento_Theme/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Theme/web/css/source/module.less similarity index 95% rename from app/design/frontend/Magento/blank/Magento_Theme/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Theme/web/css/source/module.less index 03dcf370b01f61112936b40c74ae3b559d1ce480..f4252512b6cafa35d0478abd6c429ca71b393115 100644 --- a/app/design/frontend/Magento/blank/Magento_Theme/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Theme/web/css/source/module.less @@ -57,9 +57,7 @@ body { position: relative; padding-right: 90px; } - .switcher, - .links, - .panel { + .switcher { display: none; } } @@ -96,7 +94,6 @@ body { @_icon-font-size: 28px ); .icon-text-hide(); - display: block; position: absolute; top: 12px; left: 15px; @@ -255,6 +252,13 @@ body { &.panel { > .header.links { float: right; + position: relative; + left: 0; + background: none; + height: auto; + width: auto; + -webkit-box-shadow: none; + box-shadow: none; .list-inline(); > li { margin: 0 0 0 15px; @@ -293,6 +297,7 @@ body { float: right; margin: 0; .transition(margin .3s ease-out 0); + left: 0 !important; } .footer { @@ -307,6 +312,9 @@ body { } } } + .action.toggle.nav { + display: none; + } } .no-display { diff --git a/app/design/frontend/Magento/blank/Magento_Wishlist/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Wishlist/web/css/source/module.less similarity index 100% rename from app/design/frontend/Magento/blank/Magento_Wishlist/css/source/module.less rename to app/design/frontend/Magento/blank/Magento_Wishlist/web/css/source/module.less diff --git a/app/design/frontend/Magento/blank/view.xml b/app/design/frontend/Magento/blank/etc/view.xml similarity index 99% rename from app/design/frontend/Magento/blank/view.xml rename to app/design/frontend/Magento/blank/etc/view.xml index 6c89777afa4d567699bcdb4458d450961f57830e..3630532eb21d0dae4a1761029fec9e47f6a795fc 100644 --- a/app/design/frontend/Magento/blank/view.xml +++ b/app/design/frontend/Magento/blank/etc/view.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Magento_Catalog"> <var name="product_small_image_sidebar_size">100</var> <!-- Override for small product image --> <var name="product_base_image_size">275</var> <!-- Override for base product image --> diff --git a/app/design/frontend/Magento/blank/theme.xml b/app/design/frontend/Magento/blank/theme.xml index 127408a2bba0e44d135f95966964dce0dcec8bd4..15abef70d144b27a4d90631f2c99eb8988567ba2 100644 --- a/app/design/frontend/Magento/blank/theme.xml +++ b/app/design/frontend/Magento/blank/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Blank</title> <version>2.0.0.0</version> <media> diff --git a/app/design/frontend/Magento/blank/css/print.less b/app/design/frontend/Magento/blank/web/css/print.less similarity index 100% rename from app/design/frontend/Magento/blank/css/print.less rename to app/design/frontend/Magento/blank/web/css/print.less diff --git a/app/design/frontend/Magento/blank/css/source/abstract.less b/app/design/frontend/Magento/blank/web/css/source/abstract.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/abstract.less rename to app/design/frontend/Magento/blank/web/css/source/abstract.less diff --git a/app/design/frontend/Magento/blank/css/source/actions-toolbar.less b/app/design/frontend/Magento/blank/web/css/source/actions-toolbar.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/actions-toolbar.less rename to app/design/frontend/Magento/blank/web/css/source/actions-toolbar.less diff --git a/app/design/frontend/Magento/blank/css/source/breadcrumbs.less b/app/design/frontend/Magento/blank/web/css/source/breadcrumbs.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/breadcrumbs.less rename to app/design/frontend/Magento/blank/web/css/source/breadcrumbs.less diff --git a/app/design/frontend/Magento/blank/css/source/buttons.less b/app/design/frontend/Magento/blank/web/css/source/buttons.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/buttons.less rename to app/design/frontend/Magento/blank/web/css/source/buttons.less diff --git a/app/design/frontend/Magento/blank/css/source/dropdowns.less b/app/design/frontend/Magento/blank/web/css/source/dropdowns.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/dropdowns.less rename to app/design/frontend/Magento/blank/web/css/source/dropdowns.less diff --git a/app/design/frontend/Magento/blank/css/source/forms.less b/app/design/frontend/Magento/blank/web/css/source/forms.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/forms.less rename to app/design/frontend/Magento/blank/web/css/source/forms.less diff --git a/app/design/frontend/Magento/blank/css/source/icons.less b/app/design/frontend/Magento/blank/web/css/source/icons.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/icons.less rename to app/design/frontend/Magento/blank/web/css/source/icons.less diff --git a/app/design/frontend/Magento/blank/css/source/layout.less b/app/design/frontend/Magento/blank/web/css/source/layout.less similarity index 68% rename from app/design/frontend/Magento/blank/css/source/layout.less rename to app/design/frontend/Magento/blank/web/css/source/layout.less index cce3c27b71581720ff1c48dd7d1ac8cd087e5713..efb644ff4a5993a172915e6c928cb59042a3a4c8 100644 --- a/app/design/frontend/Magento/blank/css/source/layout.less +++ b/app/design/frontend/Magento/blank/web/css/source/layout.less @@ -38,6 +38,21 @@ padding-right: @layout-indent; } +.page.wrapper { + position: relative; + left: 0; + -webkit-transition: all .25s ease-out; + -moz-transition: all .25s ease-out; + transition: all .25s ease-out; +} + +.page.wrapper.open{ + left: 86%; + -webkit-transition: all .25s ease-on; + -moz-transition: all .25s ease-out; + transition: all .25s ease-out; +} + .columns { #layout-columns(); > .column { @@ -49,6 +64,22 @@ } } +.page.header { + .panel.wrapper { + position: absolute; + top: 0; + left: -86%; + background: #f5f5f5; + height: 100%; + width: 86%; + -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); + .panel.header { + padding: 0; + } + } +} + // // Desktop //-------------------------------------- @@ -80,4 +111,19 @@ #layout-columns > .right(); padding-left: @layout-column-right-offset; } + .page.header { + .panel.wrapper { + position: relative; + top: 0; + left: 0; + background: none; + height: auto; + width: auto; + -webkit-box-shadow: none; + box-shadow: none; + .panel.header { + padding: 10px 20px; + } + } + } } diff --git a/app/design/frontend/Magento/blank/css/source/loaders.less b/app/design/frontend/Magento/blank/web/css/source/loaders.less similarity index 85% rename from app/design/frontend/Magento/blank/css/source/loaders.less rename to app/design/frontend/Magento/blank/web/css/source/loaders.less index 529caba60047db320dc6862c58f96732998cfea5..23cf21d17389fcb849a856b649f05971ba35a2c2 100644 --- a/app/design/frontend/Magento/blank/css/source/loaders.less +++ b/app/design/frontend/Magento/blank/web/css/source/loaders.less @@ -29,3 +29,16 @@ display: none; } } + +.loading-mask { + .loading-mask(); + background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5); + .loader { + > img { + .loading-mask(); + } + > p { + display: none; + } + } +} \ No newline at end of file diff --git a/app/design/frontend/Magento/blank/css/source/messages.less b/app/design/frontend/Magento/blank/web/css/source/messages.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/messages.less rename to app/design/frontend/Magento/blank/web/css/source/messages.less diff --git a/app/design/frontend/Magento/blank/css/source/navigation.less b/app/design/frontend/Magento/blank/web/css/source/navigation.less similarity index 99% rename from app/design/frontend/Magento/blank/css/source/navigation.less rename to app/design/frontend/Magento/blank/web/css/source/navigation.less index 91d0157a72abfa4e33f60afe806028c4a8f6c0f5..b73ca7b44d2ce424538709929e4682623bda6274 100644 --- a/app/design/frontend/Magento/blank/css/source/navigation.less +++ b/app/design/frontend/Magento/blank/web/css/source/navigation.less @@ -52,6 +52,7 @@ body { .header.links { padding: 10px 20px; + display: block; li { display: block; margin: 0; @@ -161,7 +162,6 @@ body { } } } - .main-navigation(); .main-navigation-desktop(); diff --git a/app/design/frontend/Magento/blank/css/source/pages.less b/app/design/frontend/Magento/blank/web/css/source/pages.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/pages.less rename to app/design/frontend/Magento/blank/web/css/source/pages.less diff --git a/app/design/frontend/Magento/blank/css/source/popups.less b/app/design/frontend/Magento/blank/web/css/source/popups.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/popups.less rename to app/design/frontend/Magento/blank/web/css/source/popups.less diff --git a/app/design/frontend/Magento/blank/css/source/price.less b/app/design/frontend/Magento/blank/web/css/source/price.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/price.less rename to app/design/frontend/Magento/blank/web/css/source/price.less diff --git a/app/design/frontend/Magento/blank/css/source/rating.less b/app/design/frontend/Magento/blank/web/css/source/rating.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/rating.less rename to app/design/frontend/Magento/blank/web/css/source/rating.less diff --git a/app/design/frontend/Magento/blank/css/source/sections.less b/app/design/frontend/Magento/blank/web/css/source/sections.less similarity index 88% rename from app/design/frontend/Magento/blank/css/source/sections.less rename to app/design/frontend/Magento/blank/web/css/source/sections.less index 4c4b60b20f10201942c396ef2accc7696b57880d..8c66efcacdcd4c71c7df6df3f19150bee8fda4a8 100644 --- a/app/design/frontend/Magento/blank/css/source/sections.less +++ b/app/design/frontend/Magento/blank/web/css/source/sections.less @@ -37,3 +37,13 @@ ); } } + +@media only screen +and (max-width : @break-point-1) { + .product.data.items { + .data-accordion(); + .data.item { + display: block; + } + } +} diff --git a/app/design/frontend/Magento/blank/css/source/tables.less b/app/design/frontend/Magento/blank/web/css/source/tables.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/tables.less rename to app/design/frontend/Magento/blank/web/css/source/tables.less diff --git a/app/design/frontend/Magento/blank/css/source/theme.less b/app/design/frontend/Magento/blank/web/css/source/theme.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/theme.less rename to app/design/frontend/Magento/blank/web/css/source/theme.less diff --git a/app/design/frontend/Magento/blank/css/source/tooltips.less b/app/design/frontend/Magento/blank/web/css/source/tooltips.less similarity index 96% rename from app/design/frontend/Magento/blank/css/source/tooltips.less rename to app/design/frontend/Magento/blank/web/css/source/tooltips.less index aee51b3bee20db2a1fb03f2bc995a6bf050b3cde..19842b13f8ff4cff0a3bd6cc77236465fa17597d 100644 --- a/app/design/frontend/Magento/blank/css/source/tooltips.less +++ b/app/design/frontend/Magento/blank/web/css/source/tooltips.less @@ -52,3 +52,8 @@ } } } + +.ui-tooltip { + position: absolute; + z-index: 9999; +} diff --git a/app/design/frontend/Magento/blank/css/source/typography.less b/app/design/frontend/Magento/blank/web/css/source/typography.less similarity index 100% rename from app/design/frontend/Magento/blank/css/source/typography.less rename to app/design/frontend/Magento/blank/web/css/source/typography.less diff --git a/app/design/frontend/Magento/blank/css/styles.less b/app/design/frontend/Magento/blank/web/css/styles.less similarity index 100% rename from app/design/frontend/Magento/blank/css/styles.less rename to app/design/frontend/Magento/blank/web/css/styles.less diff --git a/app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.eot b/app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.eot similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.eot rename to app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.eot diff --git a/app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.svg b/app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.svg similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.svg rename to app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.svg diff --git a/app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.ttf b/app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.ttf similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.ttf rename to app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.ttf diff --git a/app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.woff b/app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.woff similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/bold/opensans-700.woff rename to app/design/frontend/Magento/blank/web/fonts/opensans/bold/opensans-700.woff diff --git a/app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.eot b/app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.eot similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.eot rename to app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.eot diff --git a/app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.svg b/app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.svg similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.svg rename to app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.svg diff --git a/app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.ttf b/app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.ttf similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.ttf rename to app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.ttf diff --git a/app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.woff b/app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.woff similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/light/opensans-300.woff rename to app/design/frontend/Magento/blank/web/fonts/opensans/light/opensans-300.woff diff --git a/app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.eot b/app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.eot similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.eot rename to app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.eot diff --git a/app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.svg b/app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.svg similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.svg rename to app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.svg diff --git a/app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.ttf b/app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.ttf similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.ttf rename to app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.ttf diff --git a/app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.woff b/app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.woff similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/regular/opensans-400.woff rename to app/design/frontend/Magento/blank/web/fonts/opensans/regular/opensans-400.woff diff --git a/app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.eot b/app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.eot similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.eot rename to app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.eot diff --git a/app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.svg b/app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.svg similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.svg rename to app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.svg diff --git a/app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.ttf b/app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.ttf similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.ttf rename to app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.ttf diff --git a/app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.woff b/app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.woff similarity index 100% rename from app/design/frontend/Magento/blank/fonts/opensans/semibold/opensans-600.woff rename to app/design/frontend/Magento/blank/web/fonts/opensans/semibold/opensans-600.woff diff --git a/app/design/frontend/Magento/blank/images/logo.gif b/app/design/frontend/Magento/blank/web/images/logo.gif similarity index 100% rename from app/design/frontend/Magento/blank/images/logo.gif rename to app/design/frontend/Magento/blank/web/images/logo.gif diff --git a/app/design/frontend/Magento/blank/js/navigation-menu.js b/app/design/frontend/Magento/blank/web/js/navigation-menu.js similarity index 100% rename from app/design/frontend/Magento/blank/js/navigation-menu.js rename to app/design/frontend/Magento/blank/web/js/navigation-menu.js diff --git a/app/design/frontend/Magento/blank/js/responsive.js b/app/design/frontend/Magento/blank/web/js/responsive.js similarity index 69% rename from app/design/frontend/Magento/blank/js/responsive.js rename to app/design/frontend/Magento/blank/web/js/responsive.js index 4001a5658ac58fab6fe39e245edb12e479376695..b432e624f44b82ae54c10514b129e837ee59908e 100644 --- a/app/design/frontend/Magento/blank/js/responsive.js +++ b/app/design/frontend/Magento/blank/web/js/responsive.js @@ -46,15 +46,18 @@ })(); var galleryElement = $('[data-role=media-gallery]'); - if (galleryElement.length && galleryElement.data('zoom')) { + if (galleryElement.length && galleryElement.data('mageZoom')) { galleryElement.zoom('enable'); } - if (galleryElement.length && galleryElement.data('gallery')) { + if (galleryElement.length && galleryElement.data('mageGallery')) { galleryElement.gallery("option","disableLinks",true); + galleryElement.gallery("option","showNav",false); + galleryElement.gallery("option","showThumbs",true); } - if (galleryElement.length && galleryElement.data('galleryFullScreen')) { - galleryElement.galleryFullScreen('enable'); - } + + setTimeout(function(){ + $(".product.data.items").tabs("option","openOnFocus",true); + }, 500); }, // Switch to Mobile Version exit: function() { @@ -81,47 +84,22 @@ $('#checkout-progress-wrapper .content').toggle(); }); -// (function() { -// var productInfoMain = $('.product.info.main'), -// productInfoAdditional = $("#product-info-additional"); -// -// if (!productInfoAdditional.length) { -// -// var productTitle = productInfoMain.find(".page.title.product").clone(), -// productStock = productInfoMain.find(".stock:not(.alert)").clone(); -// -// productInfoAdditional = $("<div/>", { -// id: "product-info-additional", -// addClass: "product info additional" -// }); -// -// $('.catalog-product-view .column.main') -// .prepend(productInfoAdditional); -// -// productInfoAdditional -// .append(productTitle) -// .append(productStock); -// -// } else { -// productInfoAdditional.removeClass("hidden"); -// } -// -// productInfoMain.addClass("responsive"); -// -// })(); var galleryElement = $('[data-role=media-gallery]'); setTimeout(function(){ - if (galleryElement.length && galleryElement.data('zoom')) { + if (galleryElement.length && galleryElement.data('mageZoom')) { galleryElement.zoom('disable'); } - if (galleryElement.length && galleryElement.data('gallery')) { + if (galleryElement.length && galleryElement.data('mageGallery')) { galleryElement.gallery("option","disableLinks",false); - } - if (galleryElement.length && galleryElement.data('galleryFullScreen')) { - galleryElement.galleryFullScreen('disable'); + galleryElement.gallery("option","showNav",true); + galleryElement.gallery("option","showThumbs",false); } }, 2000); + setTimeout(function(){ + $(".product.data.items").tabs("option","openOnFocus",false); + }, 500); + } }); diff --git a/app/design/frontend/Magento/blank/js/theme.js b/app/design/frontend/Magento/blank/web/js/theme.js similarity index 66% rename from app/design/frontend/Magento/blank/js/theme.js rename to app/design/frontend/Magento/blank/web/js/theme.js index 16bd0ebb290a0ac3aa8fc40122177ea3b1409f7f..f492c996cc6ea7b298805f5a3abe1651e0f48adf 100644 --- a/app/design/frontend/Magento/blank/js/theme.js +++ b/app/design/frontend/Magento/blank/web/js/theme.js @@ -28,24 +28,12 @@ $(document).ready(function() { if ($('body').hasClass('checkout-cart-index')) { - $('.cart.summary > .block > .title').dropdown({autoclose:false, menu:'.title + .content'}); if ($('#co-shipping-method-form .fieldset.rates').length > 0 && $('#co-shipping-method-form .fieldset.rates :checked').length === 0 ) { - $('.block.shipping > .title').addClass('active'); - $('.block.shipping').addClass('active'); + $("#block-shipping").on("collapsiblecreate" ,function() { + $("#block-shipping").collapsible("forceActivate"); + }); } } - - if ($('[role="navigation"]').length) { - $('[role="navigation"]').navigationMenu({ - responsive: true, - submenuContiniumEffect: true - }); - } else { - $('<nav class="navigation" role="navigation"></nav>').navigationMenu({ - responsive: true, - submenuContiniumEffect: true - }); - } }); })(window.jQuery); diff --git a/app/design/frontend/Magento/plushe/theme.xml b/app/design/frontend/Magento/plushe/theme.xml index ea411f21ad25b90ac32d2aa82b3a10b7690b7408..9d6e99bd163e26457d2feb59b01cc3f846064a67 100644 --- a/app/design/frontend/Magento/plushe/theme.xml +++ b/app/design/frontend/Magento/plushe/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Plushe</title> <version>2.0.0.0</version> <parent>Magento/blank</parent> diff --git a/app/design/install/Magento/basic/theme.xml b/app/design/install/Magento/basic/theme.xml index a262acf431410e76a305cce133747eea8547aa90..a16406212d9810e9ff766b9871ffc143fc522d82 100644 --- a/app/design/install/Magento/basic/theme.xml +++ b/app/design/install/Magento/basic/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Basic</title> <version>2.0.0.0</version> </theme> diff --git a/app/design/install/Magento/basic/css/boxes.css b/app/design/install/Magento/basic/web/css/boxes.css similarity index 100% rename from app/design/install/Magento/basic/css/boxes.css rename to app/design/install/Magento/basic/web/css/boxes.css diff --git a/app/design/install/Magento/basic/css/clears.css b/app/design/install/Magento/basic/web/css/clears.css similarity index 100% rename from app/design/install/Magento/basic/css/clears.css rename to app/design/install/Magento/basic/web/css/clears.css diff --git a/app/design/install/Magento/basic/css/ie7minus.css b/app/design/install/Magento/basic/web/css/ie7minus.css similarity index 100% rename from app/design/install/Magento/basic/css/ie7minus.css rename to app/design/install/Magento/basic/web/css/ie7minus.css diff --git a/app/design/install/Magento/basic/css/iestyles.css b/app/design/install/Magento/basic/web/css/iestyles.css similarity index 100% rename from app/design/install/Magento/basic/css/iestyles.css rename to app/design/install/Magento/basic/web/css/iestyles.css diff --git a/app/design/install/Magento/basic/css/reset.css b/app/design/install/Magento/basic/web/css/reset.css similarity index 100% rename from app/design/install/Magento/basic/css/reset.css rename to app/design/install/Magento/basic/web/css/reset.css diff --git a/app/design/install/Magento/basic/images/error_msg_icon.gif b/app/design/install/Magento/basic/web/images/error_msg_icon.gif similarity index 100% rename from app/design/install/Magento/basic/images/error_msg_icon.gif rename to app/design/install/Magento/basic/web/images/error_msg_icon.gif diff --git a/app/design/install/Magento/basic/images/footer_bg.gif b/app/design/install/Magento/basic/web/images/footer_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/footer_bg.gif rename to app/design/install/Magento/basic/web/images/footer_bg.gif diff --git a/app/design/install/Magento/basic/images/footer_container_bg.gif b/app/design/install/Magento/basic/web/images/footer_container_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/footer_container_bg.gif rename to app/design/install/Magento/basic/web/images/footer_container_bg.gif diff --git a/app/design/install/Magento/basic/images/footer_info_separator.gif b/app/design/install/Magento/basic/web/images/footer_info_separator.gif similarity index 100% rename from app/design/install/Magento/basic/images/footer_info_separator.gif rename to app/design/install/Magento/basic/web/images/footer_info_separator.gif diff --git a/app/design/install/Magento/basic/images/footer_informational_bg.gif b/app/design/install/Magento/basic/web/images/footer_informational_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/footer_informational_bg.gif rename to app/design/install/Magento/basic/web/images/footer_informational_bg.gif diff --git a/app/design/install/Magento/basic/images/footer_left.gif b/app/design/install/Magento/basic/web/images/footer_left.gif similarity index 100% rename from app/design/install/Magento/basic/images/footer_left.gif rename to app/design/install/Magento/basic/web/images/footer_left.gif diff --git a/app/design/install/Magento/basic/images/footer_legality_bg.gif b/app/design/install/Magento/basic/web/images/footer_legality_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/footer_legality_bg.gif rename to app/design/install/Magento/basic/web/images/footer_legality_bg.gif diff --git a/app/design/install/Magento/basic/images/footer_right.gif b/app/design/install/Magento/basic/web/images/footer_right.gif similarity index 100% rename from app/design/install/Magento/basic/images/footer_right.gif rename to app/design/install/Magento/basic/web/images/footer_right.gif diff --git a/app/design/install/Magento/basic/images/header_bg.gif b/app/design/install/Magento/basic/web/images/header_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/header_bg.gif rename to app/design/install/Magento/basic/web/images/header_bg.gif diff --git a/app/design/install/Magento/basic/images/header_nav_bg.gif b/app/design/install/Magento/basic/web/images/header_nav_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/header_nav_bg.gif rename to app/design/install/Magento/basic/web/images/header_nav_bg.gif diff --git a/app/design/install/Magento/basic/images/header_top_bg.jpg b/app/design/install/Magento/basic/web/images/header_top_bg.jpg similarity index 100% rename from app/design/install/Magento/basic/images/header_top_bg.jpg rename to app/design/install/Magento/basic/web/images/header_top_bg.jpg diff --git a/app/design/install/Magento/basic/images/header_top_container_bg.jpg b/app/design/install/Magento/basic/web/images/header_top_container_bg.jpg similarity index 100% rename from app/design/install/Magento/basic/images/header_top_container_bg.jpg rename to app/design/install/Magento/basic/web/images/header_top_container_bg.jpg diff --git a/app/design/install/Magento/basic/images/i_notice.gif b/app/design/install/Magento/basic/web/images/i_notice.gif similarity index 100% rename from app/design/install/Magento/basic/images/i_notice.gif rename to app/design/install/Magento/basic/web/images/i_notice.gif diff --git a/app/design/install/Magento/basic/images/main_bg.gif b/app/design/install/Magento/basic/web/images/main_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/main_bg.gif rename to app/design/install/Magento/basic/web/images/main_bg.gif diff --git a/app/design/install/Magento/basic/images/main_container_bg.gif b/app/design/install/Magento/basic/web/images/main_container_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/main_container_bg.gif rename to app/design/install/Magento/basic/web/images/main_container_bg.gif diff --git a/app/design/install/Magento/basic/images/note_msg_icon.gif b/app/design/install/Magento/basic/web/images/note_msg_icon.gif similarity index 100% rename from app/design/install/Magento/basic/images/note_msg_icon.gif rename to app/design/install/Magento/basic/web/images/note_msg_icon.gif diff --git a/app/design/install/Magento/basic/images/success_msg_icon.gif b/app/design/install/Magento/basic/web/images/success_msg_icon.gif similarity index 100% rename from app/design/install/Magento/basic/images/success_msg_icon.gif rename to app/design/install/Magento/basic/web/images/success_msg_icon.gif diff --git a/app/design/install/Magento/basic/images/validation_advice_bg.gif b/app/design/install/Magento/basic/web/images/validation_advice_bg.gif similarity index 100% rename from app/design/install/Magento/basic/images/validation_advice_bg.gif rename to app/design/install/Magento/basic/web/images/validation_advice_bg.gif diff --git a/app/etc/di.xml b/app/etc/di.xml index aceedacc59183274574678c584933ff68e1c48dd..ce52a337e5ef3bc1d923bb7f99ad580d9905465b 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\App\RequestInterface" type="Magento\Framework\App\Request\Http" /> <preference for="Magento\Framework\App\Request\PathInfoProcessorInterface" type="Magento\Store\App\Request\PathInfoProcessor" /> <preference for="Magento\Framework\App\ResponseInterface" type="Magento\Framework\App\Response\Http" /> @@ -87,6 +87,7 @@ <preference for="Magento\Framework\Mview\View\CollectionInterface" type="Magento\Framework\Mview\View\Collection" /> <preference for="Magento\Framework\Mview\View\SubscriptionInterface" type="Magento\Framework\Mview\View\Subscription" /> <preference for="Magento\Framework\Mview\View\ChangelogInterface" type="Magento\Framework\Mview\View\Changelog" /> + <preference for="Magento\Framework\View\Design\FileResolution\Fallback\CacheDataInterface" type="Magento\Framework\View\Design\FileResolution\Fallback\CacheData\Flat"/> <type name="Magento\Framework\Model\Context"> <arguments> <argument name="actionValidator" xsi:type="object">Magento\Framework\Model\ActionValidator\RemoveAction\Proxy</argument> @@ -141,6 +142,11 @@ <argument name="appMode" xsi:type="init_parameter">Magento\Framework\App\State::PARAM_MODE</argument> </arguments> </type> + <type name="Magento\Framework\View\Asset\MinifyService"> + <arguments> + <argument name="appMode" xsi:type="init_parameter">Magento\Framework\App\State::PARAM_MODE</argument> + </arguments> + </type> <type name="Magento\Framework\App\Arguments\Loader"> <arguments> <argument name="customFile" xsi:type="init_parameter">Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE</argument> @@ -260,28 +266,6 @@ <argument name="session" xsi:type="object">Magento\Framework\Session\Generic\Proxy</argument> </arguments> </type> - <type name="Magento\Framework\View\Url"> - <arguments> - <argument name="fileUrlMap" xsi:type="array"> - <item name="urlLib" xsi:type="array"> - <item name="key" xsi:type="const">Magento\Framework\UrlInterface::URL_TYPE_LIB</item> - <item name="value" xsi:type="const">Magento\Framework\App\Filesystem::PUB_LIB_DIR</item> - </item> - <item name="urlMedia" xsi:type="array"> - <item name="key" xsi:type="const">Magento\Framework\UrlInterface::URL_TYPE_MEDIA</item> - <item name="value" xsi:type="const">Magento\Framework\App\Filesystem::MEDIA_DIR</item> - </item> - <item name="urlStatic" xsi:type="array"> - <item name="key" xsi:type="const">Magento\Framework\UrlInterface::URL_TYPE_STATIC</item> - <item name="value" xsi:type="const">Magento\Framework\App\Filesystem::STATIC_VIEW_DIR</item> - </item> - <item name="urlCache" xsi:type="array"> - <item name="key" xsi:type="const">Magento\Framework\UrlInterface::URL_TYPE_CACHE</item> - <item name="value" xsi:type="const">Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR</item> - </item> - </argument> - </arguments> - </type> <type name="Magento\Framework\App\Filesystem"> <arguments> <argument name="fileReadFactory" xsi:type="object">Magento\Framework\Filesystem\File\ReadFactory</argument> @@ -355,6 +339,46 @@ <argument name="stateCollection" xsi:type="object" shared="false">Magento\Framework\Mview\View\State\CollectionInterface</argument> </arguments> </type> + <type name="Magento\Framework\App\StaticResource"> + <arguments> + <argument name="response" xsi:type="object" shared="false">Magento\Core\Model\File\Storage\Response</argument> + </arguments> + </type> + <virtualType name="fallbackResolverSimpleWithGroupedCache" type="Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple"> + <arguments> + <argument name="cache" xsi:type="object">Magento\Framework\View\Design\FileResolution\Fallback\CacheData\Grouped</argument> + </arguments> + </virtualType> + <type name="Magento\Framework\View\Design\FileResolution\Fallback\File"> + <arguments> + <argument name="resolver" xsi:type="object">fallbackResolverSimpleWithGroupedCache</argument> + </arguments> + </type> + <type name="Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile"> + <arguments> + <argument name="resolver" xsi:type="object">fallbackResolverSimpleWithGroupedCache</argument> + </arguments> + </type> + <type name="Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile"> + <arguments> + <argument name="resolver" xsi:type="object">fallbackResolverSimpleWithGroupedCache</argument> + </arguments> + </type> + <virtualType name="viewFileFallbackResolver" type="Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Alternative"> + <arguments> + <argument name="cache" xsi:type="object">Magento\Framework\View\Design\FileResolution\Fallback\CacheData\Flat</argument> + <argument name="alternativeExtensions" xsi:type="array"> + <item name="css" xsi:type="array"> + <item name="less" xsi:type="string">less</item> + </item> + </argument> + </arguments> + </virtualType> + <type name="Magento\Framework\View\Design\FileResolution\Fallback\StaticFile"> + <arguments> + <argument name="resolver" xsi:type="object">viewFileFallbackResolver</argument> + </arguments> + </type> <type name="Magento\Framework\Code\Generator"> <arguments> <argument name="generatedEntities" xsi:type="array"> diff --git a/composer.json b/composer.json index d121cb986fda3c4737c1be2e2d06d512e9ea9e78..2efe02a4907e9d15f60ad7573bc3426556d999d3 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ }, "autoload": { "psr-0": { - "": ["app/code", "lib"] + "": ["app/code", "lib/internal"] } }, "minimum-stability": "dev" diff --git a/dev/tests/functional/etc/global/di.xml b/dev/tests/functional/etc/global/di.xml index 65c87ee730029c52a4fe5f2af85b9eb69ff1e439..ee0fa44a350393e975953f01e62abab3331f82cb 100644 --- a/dev/tests/functional/etc/global/di.xml +++ b/dev/tests/functional/etc/global/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Mtf\Util\Generate\Fixture\FieldsProviderInterface" type="Mtf\Util\Generate\Fixture\FieldsProvider" /> <preference for="Mtf\Util\Generate\Repository\CollectionProviderInterface" type="Mtf\Util\Generate\Repository\CollectionProvider" /> </config> diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/DatepickerElement.php b/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/DatepickerElement.php new file mode 100644 index 0000000000000000000000000000000000000000..dfebc90bf0336e697eaf158a292aeb790e7864f9 --- /dev/null +++ b/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/DatepickerElement.php @@ -0,0 +1,112 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Mtf\Client\Driver\Selenium\Element; + +use Mtf\Client\Driver\Selenium\Element; +use Mtf\Client\Element as ElementInterface; +use Mtf\Client\Element\Locator; + +/** + * Class DatepickerElement + * General class for datepicker elements. + */ +class DatepickerElement extends Element +{ + /** + * DatePicker button + * + * @var string + */ + protected $datePickerButton = './/following-sibling::img[contains(@class,"ui-datepicker-trigger")]'; + + /** + * DatePicker block + * + * @var string + */ + protected $datePickerBlock = './/ancestor::body//*[contains(@id,"ui-datepicker-div")]'; + + /** + * Field Month on the DatePicker + * + * @var string + */ + protected $datePickerMonth = './/*[contains(@class,"ui-datepicker-month")]'; + + /** + * Field Year on the DatePicker + * + * @var string + */ + protected $datePickerYear = './/*[contains(@class,"ui-datepicker-year")]'; + + /** + * Calendar on the DatePicker + * + * @var string + */ + protected $datePickerCalendar = './/*[contains(@class,"ui-datepicker-calendar")]//*/td/a[text()="%s"]'; + + /** + * DatePicker button 'Close' + * + * @var string + */ + protected $datePickerButtonClose = './/*[contains(@class,"ui-datepicker-close")]'; + + /** + * Set the date from datePicker + * + * @param string $value + * @return void + */ + public function setValue($value) + { + $date = $this->parseDate($value); + + $this->find($this->datePickerButton, Locator::SELECTOR_XPATH)->click(); + $datapicker = $this->find($this->datePickerBlock, Locator::SELECTOR_XPATH); + $datapicker->find($this->datePickerMonth, Locator::SELECTOR_XPATH, 'select')->setValue($date[0]); + $datapicker->find($this->datePickerYear, Locator::SELECTOR_XPATH, 'select')->setValue($date[2]); + $datapicker->find(sprintf($this->datePickerCalendar, $date[1]), Locator::SELECTOR_XPATH)->click(); + $datapicker->find($this->datePickerButtonClose, Locator::SELECTOR_XPATH)->click(); + } + + /** + * Parse date from string to array + * + * @param string $value + * @return array + */ + protected function parseDate($value) + { + $date = strtotime($value); + $date = strftime("%b %#d, %Y %I:%M %p", $date); + $date = preg_split('/[,\s]/', $date); + array_splice($date, 2, 1); + + return $date; + } +} diff --git a/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SelectstoreElement.php b/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SelectstoreElement.php new file mode 100644 index 0000000000000000000000000000000000000000..09826f30c4d5ddd1beac96ca15ea26f58360937c --- /dev/null +++ b/dev/tests/functional/lib/Mtf/Client/Driver/Selenium/Element/SelectstoreElement.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Mtf\Client\Driver\Selenium\Element; + +use Mtf\Client\Driver\Selenium\Element; +use Mtf\Client\Element\Locator; + +/** + * Class SelectstoreElement + * Typified element class for option group selectors + */ +class SelectstoreElement extends SelectElement +{ + /** + * Store option group selector + * + * @var string + */ + protected $storeGroup = 'optgroup[option[contains(.,"%s")]]'; + + /** + * Website option group selector + * + * @var string + */ + protected $website = 'optgroup[following-sibling::optgroup[option[contains(.,"%s")]]]'; + + /** + * Get the value of form element + * + * @return string + */ + public function getValue() + { + $selectedLabel = trim($this->_getWrappedElement()->selectedLabel()); + $value = trim( + $this->_getWrappedElement()->byXPath(sprintf($this->website, $selectedLabel))->attribute('label') + ); + $value .= '/' . trim( + $this->_getWrappedElement()->byXPath(sprintf($this->storeGroup, $selectedLabel))->attribute('label'), + chr(0xC2) . chr(0xA0) + ); + $value .= '/' . $selectedLabel; + return $value; + } + + /** + * Select value in dropdown which has option groups + * + * @param string $value + * @throws \Exception + * @return void + */ + public function setValue($value) + { + $group = explode('/', $value); + $optionLocator = './/optgroup[contains(@label,"' + . $group[0] . '")]/following-sibling::optgroup[contains(@label,"' + . $group[1] . '")]/option[contains(text(), "' + . $group[2] . '")]'; + $option = $this->_context->find($optionLocator, Locator::SELECTOR_XPATH); + if (!$option->isVisible()) { + throw new \Exception('[' . implode('/', $value) . '] option is not visible in store switcher.'); + } + $option->click(); + } +} diff --git a/dev/tests/functional/lib/Mtf/Util/Generate/testcase.xml b/dev/tests/functional/lib/Mtf/Util/Generate/testcase.xml index 19edcac77746368272de05ee0b04d90da9e6e555..2f47021158bc1d8a1ff4d1dc5b264383342324e4 100644 --- a/dev/tests/functional/lib/Mtf/Util/Generate/testcase.xml +++ b/dev/tests/functional/lib/Mtf/Util/Generate/testcase.xml @@ -93,11 +93,47 @@ </components> <steps> <step>Login to backend.</step> - <step>Navigate to MARKETING -> Newsletter Template.</step> + <step>Navigate to MARKETING -> Newsletter Template.</step> <step>Add New Template.</step> <step>Fill in all data according to data set.</step> <step>Save.</step> <step>Perform asserts.</step> </steps> </testcase> + <testcase> + <id>MTA-25</id> + <ticketId>MTA-25</ticketId> + <name>UpdateProductSimpleEntityTest</name> + <description>Cover UpdateProductSimpleEntity with fucntional tests designed for automation</description> + <module>Catalog</module> + <components> + <component>Products (CS)</component> + </components> + <steps> + <step>Login to backend.</step> + <step>Navigate to PRODUCTS > Catalog.</step> + <step>Select a product in the grid.</step> + <step>Edit test value(s) according to dataset.</step> + <step>Click "Save".</step> + <step>Perform asserts</step> + </steps> + </testcase> + <testcase> + <id>MTA-16</id> + <ticketId>MTA-16</ticketId> + <name>CreateVirtualProductEntityTest</name> + <description>Test Creation for CreateVirtualProductEntity</description> + <module>Catalog</module> + <components> + <component>Virtual Product (CS)</component> + </components> + <steps> + <step>Login as admin.</step> + <step>Navigate to the Products > Inventory > Catalog.</step> + <step>Click on "+" dropdown and select Virtual Product type.</step> + <step>Fill in all data according to data set.</step> + <step>Save product.</step> + <step>Verify created product.</step> + </steps> + </testcase> </testcases> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Pagination.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Pagination.php new file mode 100644 index 0000000000000000000000000000000000000000..1f8a1b06c6bd48d9928966a62431ead7d253d0a6 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Handler/Pagination.php @@ -0,0 +1,85 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Backend\Test\Handler; + +use Mtf\Util\Protocol\CurlInterface; +use Mtf\Util\Protocol\CurlTransport; +use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Mtf\System\Config; + +/** + * Class Pagination + * Used to omit possible issue, when searched Id is not on the same page in cURL response + */ +class Pagination +{ + /** + * Pattern for searching grid table in cURL response + * + * @var string + */ + protected $regExpPattern; + + /** + * Url of cURL request + * + * @var string + */ + protected $url; + + /** + * Setting all Pagination params for Pagination object. + * Required url for cURL request and regexp pattern for searching in cURL response. + * + * @param $url + * @param $regExpPattern + */ + public function __construct($url, $regExpPattern) + { + $this->url = $url; + $this->regExpPattern = $regExpPattern; + } + + /** + * Retrieves id from cURL response + * + * @throws \Exception + * @return mixed + */ + public function getId() + { + $url = $_ENV['app_backend_url'] . $this->url; + $curl = new BackendDecorator(new CurlTransport(), new Config); + $curl->addOption(CURLOPT_HEADER, 1); + $curl->write(CurlInterface::POST, $url, '1.0'); + $response = $curl->read(); + $curl->close(); + preg_match($this->regExpPattern, $response, $matches); + if (empty($matches)) { + throw new \Exception('Cannot find id'); + } + return $matches[1]; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Urlrewrite/UrlrewriteEdit.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Urlrewrite/UrlrewriteEdit.php deleted file mode 100644 index 4a42b8a8886a3390a6079646759b2ffa4b1127aa..0000000000000000000000000000000000000000 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Urlrewrite/UrlrewriteEdit.php +++ /dev/null @@ -1,141 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -namespace Magento\Backend\Test\Page\Urlrewrite; - -use Mtf\Page\Page; -use Mtf\Factory\Factory; - -/** - * Class UrlrewriteEdit - * Backend URL rewrite edit/new page - * - */ -class UrlrewriteEdit extends Page -{ - /** - * URL for URL rewrite edit/new page - */ - const MCA = 'admin/urlrewrite/edit'; - - /** - * Category tree block UI ID - * - * @var string - */ - protected $categoryTreeBlock = '[data-ui-id="category-selector"]'; - - /** - * URL rewrite information form block UI ID - * - * @var string - */ - protected $urlRewriteFormBlock = '[id="page:main-container"]'; - - /** - * Product grid block UI ID - * - * @var string - */ - protected $productGridBlock = '[id="productGrid"]'; - - /** - * URL rewrite type selector block UI ID - * - * @var string - */ - protected $typeSelectorBlock = '[data-ui-id="urlrewrite-type-selector"]'; - - /** - * @var string - */ - protected $pageActionsBlock = '.page-main-actions'; - - /** - * Init page. Set page URL. - */ - protected function _init() - { - parent::_init(); - $this->_url = $_ENV['app_backend_url'] . self::MCA; - } - - /** - * Retrieve category tree block - * - * @return \Magento\Backend\Test\Block\Urlrewrite\Catalog\Category\Tree - */ - public function getCategoryTreeBlock() - { - return Factory::getBlockFactory()->getMagentoBackendUrlrewriteCatalogCategoryTree( - $this->_browser->find($this->categoryTreeBlock) - ); - } - - /** - * Retrieve URL rewrite information form block - * - * @return \Magento\Backend\Test\Block\Urlrewrite\Catalog\Edit\Form - */ - public function getUrlRewriteInformationForm() - { - return Factory::getBlockFactory()->getMagentoBackendUrlrewriteCatalogEditForm( - $this->_browser->find($this->urlRewriteFormBlock) - ); - } - - /** - * Retrieve product grid block - * - * @return \Magento\Backend\Test\Block\Urlrewrite\Catalog\Product\Grid - */ - public function getProductGridBlock() - { - return Factory::getBlockFactory()->getMagentoBackendUrlrewriteCatalogProductGrid( - $this->_browser->find($this->productGridBlock) - ); - } - - /** - * Retrieve URL rewrite type selector block - * - * @return \Magento\Backend\Test\Block\Urlrewrite\Selector - */ - public function getUrlRewriteTypeSelectorBlock() - { - return Factory::getBlockFactory()->getMagentoBackendUrlrewriteSelector( - $this->_browser->find($this->typeSelectorBlock) - ); - } - - /** - * @return \Magento\Backend\Test\Block\FormPageActions - */ - public function getActionsBlock() - { - return Factory::getBlockFactory()->getMagentoBackendFormPageActions( - $this->_browser->find($this->pageActionsBlock) - ); - } -} diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Urlrewrite/UrlrewriteGrid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Urlrewrite/UrlrewriteGrid.php deleted file mode 100644 index 04d7156630fd83a67b54d198b6ed660428a6cd21..0000000000000000000000000000000000000000 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Page/Urlrewrite/UrlrewriteGrid.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -namespace Magento\Backend\Test\Page\Urlrewrite; - -use Mtf\Page\Page; -use Mtf\Factory\Factory; - -/** - * Class UrlrewriteGrid - * Backend URL rewrite grid page - * - */ -class UrlrewriteGrid extends Page -{ - /** - * URL for URL rewrite grid - */ - const MCA = 'admin/urlrewrite/index'; - - /** - * Page actions block UI ID - * - * @var string - */ - protected $pageActionsBlock = '.page-actions'; - - /** - * Messages block UI ID - * - * @var string - */ - - protected $messagesBlock = '.messages .messages'; - - /** - * Init page. Set page URL. - */ - protected function _init() - { - parent::_init(); - $this->_url = $_ENV['app_backend_url'] . self::MCA; - } - - /** - * Retrieve page actions block - * - * @return \Magento\Backend\Test\Block\Urlrewrite\Actions - */ - public function getPageActionsBlock() - { - return Factory::getBlockFactory()->getMagentoBackendUrlrewriteActions( - $this->_browser->find($this->pageActionsBlock) - ); - } - - /** - * Retrieve messages block - * - * @return \Magento\Core\Test\Block\Messages - */ - public function getMessagesBlock() - { - return Factory::getBlockFactory()->getMagentoCoreMessages( - $this->_browser->find($this->messagesBlock) - ); - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/CustomOptionsTab.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/CustomOptionsTab.php index 7de6ebe8edd278708f95d8eb065a6df9e7b60e87..3238cb19301b619179fb609120a578b1e1a666e3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/CustomOptionsTab.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/CustomOptionsTab.php @@ -68,7 +68,7 @@ class CustomOptionsTab extends Tab public function fillFormTab(array $fields, Element $element = null) { $fields = reset($fields); - if (empty($fields['value'])) { + if (empty($fields['value']) || !is_array($fields['value'])) { return $this; } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.php index a600e6af39c314db769280750e77831e3980282a..ac327030fc2fdbb5ffb6e2e7959d3e16532f16c8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.php @@ -29,10 +29,11 @@ use Mtf\Factory\Factory; use Mtf\Client\Element\Locator; use Mtf\Fixture\FixtureInterface; use Magento\Catalog\Test\Fixture\Product; -use Magento\Catalog\Test\Fixture\Category; use Magento\Backend\Test\Block\Widget\Tab; use Magento\Backend\Test\Block\Widget\FormTabs; use Magento\Catalog\Test\Fixture\ConfigurableProduct; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; +use Mtf\Fixture\InjectableFixture; /** * Class ProductForm @@ -89,10 +90,17 @@ class Form extends FormTabs */ protected $advancedTabPanel = '[role="tablist"] [role="tabpanel"][aria-expanded="true"]:not("overflow")'; + /** + * Locator status of products + * + * @var string + */ + protected $onlineSwitcher = '#product-online-switcher + [for="product-online-switcher"]'; + /** * Category fixture * - * @var Category + * @var CatalogCategoryEntity */ protected $category; @@ -100,14 +108,17 @@ class Form extends FormTabs * Fill the product form * * @param FixtureInterface $fixture - * @param Category $category + * @param CatalogCategoryEntity $category * @param Element $element * @return $this */ - public function fillProduct(FixtureInterface $fixture, Category $category = null, Element $element = null) + public function fillProduct(FixtureInterface $fixture, CatalogCategoryEntity $category = null, Element $element = null) { $this->category = $category; $this->fillCategory($fixture); + if ($fixture instanceof InjectableFixture && $fixture->getStatus() === 'Product offline') { + $this->_rootElement->find($this->onlineSwitcher)->click(); + } return parent::fill($fixture, $element); } @@ -136,13 +147,17 @@ class Form extends FormTabs protected function fillCategory(FixtureInterface $fixture) { // TODO should be removed after suggest widget implementation as typified element - $categoryName = $this->category - ? $this->category->getCategoryName() - : ($fixture->getCategoryName() ? $fixture->getCategoryName() : ''); - - if (!$categoryName) { + $categoryName = null; + if (!empty($this->category)) { + $categoryName = $this->category->getName(); + } + if (empty($categoryName) && !($fixture instanceof InjectableFixture)) { + $categoryName = $fixture->getCategoryName(); + } + if (empty($categoryName)) { return; } + $category = $this->_rootElement->find( str_replace( '%categoryName%', diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.xml index 6e9319187ff4d099f37041f8660f88284c7d1ad0..fc1169c2d07dc26f596aa2c22b16e150f7d8e602 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Form.xml @@ -29,25 +29,25 @@ <selector>#product_info_tabs_product-details</selector> <strategy>css selector</strategy> <wrapper>product</wrapper> - <fields> - <tax_class_id> - <input>select</input> - </tax_class_id> - <is_virtual> - <input>checkbox</input> - </is_virtual> - <qty> - <selector>[name='product[quantity_and_stock_status][qty]']</selector> - </qty> - <quantity_and_stock_status> - <selector>[name='product[quantity_and_stock_status][is_in_stock]']</selector> - <input>select</input> - </quantity_and_stock_status> - <description> - <selector>#description</selector> - <input>textarea</input> - </description> - </fields> + <fields> + <tax_class_id> + <input>select</input> + </tax_class_id> + <is_virtual> + <input>checkbox</input> + </is_virtual> + <qty> + <selector>#qty</selector> + </qty> + <quantity_and_stock_status> + <selector>#quantity_and_stock_status</selector> + <input>select</input> + </quantity_and_stock_status> + <description> + <selector>#description</selector> + <input>textarea</input> + </description> + </fields> </product-details> <websites> <class>\Magento\Backend\Test\Block\Widget\Tab</class> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php index dbb3c7a717e6cd6b13a853ccd330ad5b1deea11a..9360e0d761f52514720b8415d656aa3133f0cdb2 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php @@ -87,7 +87,7 @@ class Price extends Block * * @var string */ - protected $closeMap = '#map-popup-close'; + protected $closeMap = '//section[@class="page main"]//div[@class="ui-dialog-buttonset"]//button'; /** * Price from selector @@ -254,7 +254,8 @@ class Price extends Block */ public function closeMapBlock() { - $this->_rootElement->find($this->closeMap, Locator::SELECTOR_CSS)->click(); + $this->_rootElement->find($this->closeMap, Locator::SELECTOR_XPATH)->click(); + $this->waitForElementNotVisible($this->closeMap, Locator::SELECTOR_XPATH); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php index 2eceac5d6d0ebad32346d74cf46a242a413dbe94..f03aa6d5e63dce1e45e88dcba4a0374f9be505d4 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php @@ -112,7 +112,7 @@ class View extends Block * * @var string */ - protected $mapPopup = '#map-popup'; + protected $mapPopup = '#map-popup-click-for-price'; /** * Stock Availability control diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php index 958aa9fda7cd36a25726511467ff230e7f439baf..2bb98bc26af8c5593f6dd0a8b2a2961757690624 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php @@ -67,7 +67,7 @@ class CustomOptions extends Block * * @var string */ - protected $selectLocator = '//div[contains(@class,"control")]//select'; + protected $selectLocator = './div[contains(@class,"control")]//select'; /** * Title value CSS locator @@ -88,7 +88,7 @@ class CustomOptions extends Block * * @var string */ - protected $optionLocator = '//option[%d]'; + protected $optionLocator = './option[%d]'; /** * Option XPath locator by value diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php index f3bd7ca03010665350546d4467ada588abecefa7..cfcff41e0c71d4d909da439d4b401a8bc9620c22 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonAbsent.php @@ -62,7 +62,7 @@ class AssertAddToCartButtonAbsent extends AbstractConstraint * * @var CatalogProductSimple */ - protected $catalogProductSimple; + protected $product; /** * Product Page on Frontend @@ -76,7 +76,7 @@ class AssertAddToCartButtonAbsent extends AbstractConstraint * * @param CmsIndex $cmsIndex * @param CatalogCategoryView $catalogCategoryView - * @param CatalogProductSimple $catalogProductSimple + * @param CatalogProductSimple $product * @param CatalogProductView $catalogProductView * * @return void @@ -84,12 +84,12 @@ class AssertAddToCartButtonAbsent extends AbstractConstraint public function processAssert( CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, - CatalogProductSimple $catalogProductSimple, + CatalogProductSimple $product, CatalogProductView $catalogProductView ) { $this->catalogCategoryView = $catalogCategoryView; $this->cmsIndex = $cmsIndex; - $this->catalogProductSimple = $catalogProductSimple; + $this->product = $product; $this->catalogProductView = $catalogProductView; $this->addToCardAbsentOnCategory(); @@ -105,7 +105,7 @@ class AssertAddToCartButtonAbsent extends AbstractConstraint { $this->cmsIndex->open(); $this->cmsIndex->getTopmenu()->selectCategoryByName( - $this->catalogProductSimple->getCategoryIds()[0]['name'] + $this->product->getCategoryIds()[0]['name'] ); \PHPUnit_Framework_Assert::assertFalse( $this->catalogCategoryView->getListProductBlock()->checkAddToCardButton(), @@ -122,9 +122,9 @@ class AssertAddToCartButtonAbsent extends AbstractConstraint { $this->cmsIndex->open(); $this->cmsIndex->getTopmenu()->selectCategoryByName( - $this->catalogProductSimple->getCategoryIds()[0]['name'] + $this->product->getCategoryIds()[0]['name'] ); - $this->catalogCategoryView->getListProductBlock()->openProductViewPage($this->catalogProductSimple->getName()); + $this->catalogCategoryView->getListProductBlock()->openProductViewPage($this->product->getName()); \PHPUnit_Framework_Assert::assertFalse( $this->catalogProductView->getViewBlock()->checkAddToCardButton(), "Button 'Add to Card' is present on Product page" diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php index 60b6febce2924aa106087516662280d5d06c0164..2cca302e251376a35c932c12f2f04674fbe65b8b 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddToCartButtonPresent.php @@ -62,7 +62,7 @@ class AssertAddToCartButtonPresent extends AbstractConstraint * * @var CatalogProductSimple */ - protected $catalogProductSimple; + protected $product; /** * Product Page on Frontend @@ -76,7 +76,7 @@ class AssertAddToCartButtonPresent extends AbstractConstraint * * @param CmsIndex $cmsIndex * @param CatalogCategoryView $catalogCategoryView - * @param CatalogProductSimple $catalogProductSimple + * @param CatalogProductSimple $product * @param CatalogProductView $catalogProductView * * @return void @@ -84,12 +84,12 @@ class AssertAddToCartButtonPresent extends AbstractConstraint public function processAssert( CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, - CatalogProductSimple $catalogProductSimple, + CatalogProductSimple $product, CatalogProductView $catalogProductView ) { $this->catalogCategoryView = $catalogCategoryView; $this->cmsIndex = $cmsIndex; - $this->catalogProductSimple = $catalogProductSimple; + $this->product = $product; $this->catalogProductView = $catalogProductView; $this->addToCardPresentOnCategory(); @@ -105,7 +105,7 @@ class AssertAddToCartButtonPresent extends AbstractConstraint { $this->cmsIndex->open(); $this->cmsIndex->getTopmenu()->selectCategoryByName( - $this->catalogProductSimple->getCategoryIds()[0]['name'] + $this->product->getCategoryIds()[0]['name'] ); \PHPUnit_Framework_Assert::assertTrue( $this->catalogCategoryView->getListProductBlock()->checkAddToCardButton(), @@ -122,9 +122,9 @@ class AssertAddToCartButtonPresent extends AbstractConstraint { $this->cmsIndex->open(); $this->cmsIndex->getTopmenu()->selectCategoryByName( - $this->catalogProductSimple->getCategoryIds()[0]['name'] + $this->product->getCategoryIds()[0]['name'] ); - $this->catalogCategoryView->getListProductBlock()->openProductViewPage($this->catalogProductSimple->getName()); + $this->catalogCategoryView->getListProductBlock()->openProductViewPage($this->product->getName()); \PHPUnit_Framework_Assert::assertTrue( $this->catalogProductView->getViewBlock()->checkAddToCardButton(), "Button 'Add to Card' is absent on Product page" diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCustomOptionsOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCustomOptionsOnProductPage.php index 288629bbdcee71f08be19c3ab736bbedf7a99a60..49c2917a8fef1131ddb2c558480b56501d080219 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCustomOptionsOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCustomOptionsOnProductPage.php @@ -115,7 +115,10 @@ class AssertCustomOptionsOnProductPage extends AbstractConstraint protected function prepareOptionArray(array $options) { $result = []; - $productPrice = $this->product->getPrice(); + $productPrice = $this->product->hasData('group_price') + ? $this->product->getPrice() + : $this->product->getGroupPrice()[0]['price']; + $placeholder = ['Yes' => true, 'No' => false]; foreach ($options as $option) { $result[$option['title']]['is_require'] = $placeholder[$option['is_require']]; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php index 654a826c0c321b783aebedc68f16ccd319d08f9c..d02f71f0fbbe74c8df40059b3adee3bb8b35a76e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductForm.php @@ -34,6 +34,29 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; */ class AssertProductForm extends AbstractConstraint { + /** + * Formatting options for numeric values + * + * @var array + */ + protected $formattingOptions = [ + 'price' => [ + 'decimals' => 2, + 'dec_point' => '.', + 'thousands_sep' => '' + ], + 'qty' => [ + 'decimals' => 4, + 'dec_point' => '.', + 'thousands_sep' => '' + ], + 'weight' => [ + 'decimals' => 4, + 'dec_point' => '.', + 'thousands_sep' => '' + ] + ]; + /** * Constraint severeness * @@ -78,34 +101,21 @@ class AssertProductForm extends AbstractConstraint $compareData = $product->getData(); $compareData = array_filter($compareData); - $compareData['price'] = $this->priceFormat($compareData['price']); - $compareData['qty'] = number_format($compareData['qty'], 4, '.', ''); - $compareData['weight'] = number_format($compareData['weight'], 4, '.', ''); - unset($compareData['url_key']); - - if (!empty($compareData['tier_price'])) { - foreach ($compareData['tier_price'] as &$value) { - $value['price'] = $this->priceFormat($value['price']); - } - unset($value); - } - if (!empty($compareData['group_price'])) { - foreach ($compareData['group_price'] as &$value) { - $value['price'] = $this->priceFormat($value['price']); - } - unset($value); - } - if (!empty($compareData['custom_options'])) { - $placeholder = ['Yes' => true, 'No' => false]; - foreach ($compareData['custom_options'] as &$option) { - $option['is_require'] = $placeholder[$option['is_require']]; - foreach ($option['options'] as &$value) { - $value['price'] = $this->priceFormat($value['price']); + array_walk_recursive( + $compareData, + function (&$item, $key, $formattingOptions) { + if (isset($formattingOptions[$key])) { + $item = number_format( + $item, + $formattingOptions[$key]['decimals'], + $formattingOptions[$key]['dec_point'], + $formattingOptions[$key]['thousands_sep'] + ); } - unset($value); - } - unset($option); - } + }, + $this->formattingOptions + ); + unset($compareData['url_key']); return $compareData; } @@ -120,10 +130,9 @@ class AssertProductForm extends AbstractConstraint protected function compareArray(array $fixtureData, array $formData) { $errors = []; - ksort($fixtureData); - ksort($formData); - if (array_keys($fixtureData) !== array_keys($formData)) { - return ['arrays do not correspond to each other in composition']; + $keysDiff = array_diff(array_keys($fixtureData), array_keys($formData)); + if (!empty($keysDiff)) { + return ['fixture data do not correspond to form data in composition']; } foreach ($fixtureData as $key => $value) { @@ -146,17 +155,6 @@ class AssertProductForm extends AbstractConstraint return $errors; } - /** - * Formatting prices - * - * @param $price - * @return string - */ - protected function priceFormat($price) - { - return number_format($price, 2, '.', ''); - } - /** * Returns a string representation of the object. * diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php index 24097b3170328f23194bfd2fccc5a6be1eaf1343..477d4a5195735fa8317094b1269df72d4feaec9a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCategory.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Test\Constraint; use Mtf\Fixture\FixtureInterface; use Magento\Cms\Test\Page\CmsIndex; use Mtf\Constraint\AbstractConstraint; -use Magento\Catalog\Test\Fixture\Category; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; /** @@ -48,18 +48,18 @@ class AssertProductInCategory extends AbstractConstraint * @param CatalogCategoryView $catalogCategoryView * @param CmsIndex $cmsIndex * @param FixtureInterface $product - * @param Category $category + * @param CatalogCategoryEntity $category * @return void */ public function processAssert( CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, FixtureInterface $product, - Category $category + CatalogCategoryEntity $category ) { //Open category view page and check visible product $cmsIndex->open(); - $cmsIndex->getTopmenu()->selectCategoryByName($category->getCategoryName()); + $cmsIndex->getTopmenu()->selectCategoryByName($category->getName()); $isProductVisible = $catalogCategoryView->getListProductBlock()->isProductVisible($product->getName()); while (!$isProductVisible && $catalogCategoryView->getToolbar()->nextPage()) { @@ -96,7 +96,7 @@ class AssertProductInCategory extends AbstractConstraint } /** - * Returns a string representation of the object. + * Returns a string representation of the object * * @return string */ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php new file mode 100644 index 0000000000000000000000000000000000000000..7776d97ccdb2d4ef2aa4a7cf1ff514248d545350 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductIsNotDisplayingOnFrontend.php @@ -0,0 +1,115 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Catalog\Test\Constraint; + +use Mtf\Fixture\FixtureInterface; +use Magento\Cms\Test\Page\CmsIndex; +use Mtf\Constraint\AbstractConstraint; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; +use Magento\CatalogSearch\Test\Page\CatalogsearchResult; +use Magento\Catalog\Test\Page\Product\CatalogProductView; +use Magento\Catalog\Test\Page\Category\CatalogCategoryView; + +/** + * Class AssertProductIsNotDisplayingOnFrontend + */ +class AssertProductIsNotDisplayingOnFrontend extends AbstractConstraint +{ + /** + * Message on the product page 404 + */ + const NOT_FOUND_MESSAGE = 'Whoops, our bad...'; + + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert that product with current configurations is not displayed on front-end + * + * @param CatalogProductView $catalogProductView + * @param CatalogsearchResult $catalogSearchResult + * @param CatalogCategoryView $catalogCategoryView + * @param CmsIndex $cmsIndex + * @param FixtureInterface $product + * @param CatalogCategoryEntity $category + */ + public function processAssert( + CatalogProductView $catalogProductView, + CatalogsearchResult $catalogSearchResult, + CatalogCategoryView $catalogCategoryView, + CmsIndex $cmsIndex, + FixtureInterface $product, + CatalogCategoryEntity $category + ) { + $errors = []; + // Check the product page is not available + // TODO fix initialization url for frontend page + $catalogProductView->init($product); + $catalogProductView->open(); + $titleBlock = $catalogProductView->getTitleBlock(); + + if ($titleBlock->getTitle() !== self::NOT_FOUND_MESSAGE) { + $errors[] = '- the headline on the page does not match, the text should be -> "' + . self::NOT_FOUND_MESSAGE . '"'; + } + + $cmsIndex->open(); + $cmsIndex->getSearchBlock()->search($product->getSku()); + if ($catalogSearchResult->getListProductBlock()->isProductVisible($product->getName())) { + $errors[] = '- successful product search'; + } + + $cmsIndex->open(); + $cmsIndex->getTopmenu()->selectCategoryByName($category->getName()); + $isProductVisible = $catalogCategoryView->getListProductBlock()->isProductVisible($product->getName()); + while (!$isProductVisible && $catalogCategoryView->getToolbar()->nextPage()) { + $isProductVisible = $catalogCategoryView->getListProductBlock()->isProductVisible($product->getName()); + } + + if ($isProductVisible) { + $errors[] = '- product found in this category'; + } + + \PHPUnit_Framework_Assert::assertTrue( + empty($errors), + "In the process of checking product availability on the frontend, found the following errors:\n" + . implode("\n", $errors) + ); + } + + /** + * Returns a string representation of the object. + * + * @return string + */ + public function toString() + { + return 'Assertion that the product is not available on the pages of the frontend.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php index aff6b2713f390f2a85e62525b8bd7558f91b37bf..630fad6e5bfad817745a1e3cd1df038cc1e6cd13 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSearchableBySku.php @@ -41,6 +41,20 @@ class AssertProductSearchableBySku extends AbstractConstraint */ protected $severeness = 'low'; + /** + * Displays an error message + * + * @var string + */ + protected $errorMessage = 'The product has not been found by SKU'; + + /** + * Message for passing test + * + * @var string + */ + protected $successfulMessage = 'Product successfully found by SKU'; + /** * Assert that product can be searched via Quick Search using searchable product attributes (Search by SKU). * @@ -56,19 +70,28 @@ class AssertProductSearchableBySku extends AbstractConstraint ) { $cmsIndex->open(); $cmsIndex->getSearchBlock()->search($product->getSku()); + + if ($product->getVisibility() === 'Catalog' || $product->getQuantityAndStockStatus() === 'Out of Stock') { + $isVisible = !($catalogSearchResult->getListProductBlock()->isProductVisible($product->getName())); + $this->errorMessage = 'Product successfully found by SKU'; + $this->successfulMessage = 'The product has not been found by SKU'; + } else { + $isVisible = $catalogSearchResult->getListProductBlock()->isProductVisible($product->getName()); + } + \PHPUnit_Framework_Assert::assertTrue( - $catalogSearchResult->getListProductBlock()->isProductVisible($product->getName()), - 'Product was not found by SKU.' + $isVisible, + $this->errorMessage ); } /** - * Returns a string representation of the object. + * Returns a string representation of the object * * @return string */ public function toString() { - return "Product is searchable by SKU."; + return $this->successfulMessage; } } diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/ImportCleaner.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSkuAutoGenerated.php similarity index 50% rename from lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/ImportCleaner.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSkuAutoGenerated.php index 60d33044531818a0babe383b56aa8b7b50a47857..c8e30f4c41e4862c5c12a0d7942699e87593116c 100644 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/ImportCleaner.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSkuAutoGenerated.php @@ -21,37 +21,49 @@ * @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) */ -namespace Magento\Framework\Css\PreProcessor\Cache\Plugin; -use Magento\Framework\App\Filesystem; -use Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage; +namespace Magento\Catalog\Test\Constraint; + +use Mtf\Fixture\FixtureInterface; +use Mtf\Constraint\AbstractConstraint; +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; /** - * Plugin for cache flushing from admin panel + * Class AssertProductSkuAutoGenerated */ -class ImportCleaner +class AssertProductSkuAutoGenerated extends AbstractConstraint { /** - * @var Storage + * Constraint severeness + * + * @var string */ - protected $importStorage; + protected $severeness = 'low'; /** - * @param Storage $importStorage + * Asserts that SKU successfully generated + * + * @param FixtureInterface $product + * @param CatalogProductIndex $productGrid + * @return void */ - public function __construct(Storage $importStorage) + public function processAssert(FixtureInterface $product, CatalogProductIndex $productGrid) { - $this->importStorage = $importStorage; + $filter = ['sku' => $product->getName()]; + $productGrid->open(); + \PHPUnit_Framework_Assert::assertTrue( + $productGrid->getProductGrid()->isRowVisible($filter), + 'SKU is not automatically generated for a product.' + ); } /** - * @param \Magento\Framework\View\Asset\MergeService $subject + * Returns a string representation of the object. * - * @return void - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @return string */ - public function beforeCleanMergedJsCss(\Magento\Framework\View\Asset\MergeService $subject) + public function toString() { - $this->importStorage->clearMaps(); + return 'Sku successfully generated'; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php index db04ab19a913ad5344c0842d05d9109ee5868a61..de868e8d8a941ba278ac6ef4031fc53cff404f71 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductVisibleInCategory.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Test\Constraint; use Mtf\Fixture\FixtureInterface; use Magento\Cms\Test\Page\CmsIndex; use Mtf\Constraint\AbstractConstraint; -use Magento\Catalog\Test\Fixture\Category; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; use Magento\Catalog\Test\Page\Category\CatalogCategoryView; /** @@ -42,32 +42,53 @@ class AssertProductVisibleInCategory extends AbstractConstraint */ protected $severeness = 'low'; + + /** + * Displays an error message + * + * @var string + */ + protected $errorMessage = 'Product is absent on category page.'; + + /** + * Message for passing test + * + * @var string + */ + protected $successfulMessage = 'Product is visible in the assigned category.'; + /** * Assert that product is visible in the assigned category * * @param CatalogCategoryView $catalogCategoryView * @param CmsIndex $cmsIndex * @param FixtureInterface $product - * @param Category $category + * @param CatalogCategoryEntity $category * @return void */ public function processAssert( CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, FixtureInterface $product, - Category $category + CatalogCategoryEntity $category ) { $cmsIndex->open(); - $cmsIndex->getTopmenu()->selectCategoryByName($category->getCategoryName()); + $cmsIndex->getTopmenu()->selectCategoryByName($category->getName()); $isProductVisible = $catalogCategoryView->getListProductBlock()->isProductVisible($product->getName()); while (!$isProductVisible && $catalogCategoryView->getToolbar()->nextPage()) { $isProductVisible = $catalogCategoryView->getListProductBlock()->isProductVisible($product->getName()); } + if ($product->getVisibility() === 'Search' || $product->getQuantityAndStockStatus() === 'Out of Stock') { + $isProductVisible = !$isProductVisible; + $this->errorMessage = 'Product found in this category'; + $this->successfulMessage = 'Asserts that the product could not be found in this category'; + } + \PHPUnit_Framework_Assert::assertTrue( $isProductVisible, - 'Product is absent on category page.' + $this->errorMessage ); } @@ -78,6 +99,6 @@ class AssertProductVisibleInCategory extends AbstractConstraint */ public function toString() { - return 'Product is visible in the assigned category.'; + return $this->successfulMessage; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php index 802363d4ba2292ffe2b42a6e10bb963aa703c500..65bbb63233883c51a8c8f6706dc7742c77445083 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php @@ -342,7 +342,6 @@ class CatalogProductSimple extends InjectableFixture 'backend_type' => 'varchar', 'is_required' => '0', 'default_value' => 'Block after Info Column', - 'default_value' => 'Block after Info Column', 'input' => 'select', ]; @@ -452,8 +451,9 @@ class CatalogProductSimple extends InjectableFixture 'attribute_code' => 'status', 'backend_type' => 'int', 'is_required' => '0', - 'default_value' => '1', - 'input' => 'select', + 'default_value' => 'Product online', + 'input' => 'checkbox', + 'group' => 'product-details', ]; protected $tax_class_id = [ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml index d0fe5a35c437bf1d863d2170cec692eac5606abb..eeb11a335032f2579b81237ca093bfa3de5c7f90 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml @@ -343,8 +343,9 @@ <attribute_code>status</attribute_code> <backend_type>int</backend_type> <is_required>0</is_required> - <default_value>1</default_value> - <input>select</input> + <default_value>Product online</default_value> + <input>checkbox</input> + <group>product-details</group> </status> <tax_class_id> <attribute_code>tax_class_id</attribute_code> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php index 9c62c829c9565773ab83f4d5e5d161184a260afe..1cd466a917eec6d14dd1916d4c28b112efc3b10c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php @@ -59,18 +59,28 @@ class CategoryIds implements FixtureInterface array $data = [] ) { $this->params = $params; - if (isset($data['presets']) && $data['presets'] !== '-') { + + if (!empty($data['category']) + && empty($data['presets']) + && $data['category'] instanceof CatalogCategoryEntity + ) { + /** @var CatalogCategoryEntity $category */ + $category = $data['category']; + $this->data[] = [ + 'id' => $category->getId(), + 'name' => $category->getName(), + ]; + $this->category[] = $category; + } elseif (isset($data['presets']) && $data['presets'] !== '-') { $presets = explode(',', $data['presets']); foreach ($presets as $preset) { $category = $fixtureFactory->createByCode('catalogCategoryEntity', ['dataSet' => $preset]); $category->persist(); /** @var CatalogCategoryEntity $category */ - $this->data = [ - [ - 'id' => $category->getId(), - 'name' => $category->getName(), - ], + $this->data[] = [ + 'id' => $category->getId(), + 'name' => $category->getName(), ]; $this->category[] = $category; } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php index 7aead4aac117620523c674a96303668cd89d5ae5..b1aec4809ba0c59c7f3ea5d79b81aaec6c2cf571 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php @@ -185,13 +185,13 @@ class CustomOptions implements FixtureInterface 'options' => [ [ 'title' => 'Test1 %isolation%', - 'price' => 10.01, + 'price' => 110.01, 'price_type' => 'Percent', 'sku' => 'sku2_%isolation%' ], [ 'title' => 'Test2 %isolation%', - 'price' => 20.02, + 'price' => 210.02, 'price_type' => 'Fixed', 'sku' => 'sku3_%isolation%' ] diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php new file mode 100644 index 0000000000000000000000000000000000000000..2f6edb7309630cb34a0b291bde950b7681e746fa --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php @@ -0,0 +1,848 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Catalog\Test\Fixture; + +use Mtf\System\Config; +use Mtf\Handler\HandlerFactory; +use Mtf\Fixture\FixtureFactory; +use Mtf\Fixture\InjectableFixture; +use Mtf\Repository\RepositoryFactory; + +/** + * Class CatalogProductVirtual + */ +class CatalogProductVirtual extends InjectableFixture +{ + /** + * @var string + */ + protected $repositoryClass = 'Magento\Catalog\Test\Repository\CatalogProductVirtual'; + + /** + * @var string + */ + protected $handlerInterface = 'Magento\Catalog\Test\Handler\CatalogProductVirtual\CatalogProductVirtualInterface'; + + /** + * Constructor + * + * @constructor + * @param Config $configuration + * @param RepositoryFactory $repositoryFactory + * @param FixtureFactory $fixtureFactory + * @param HandlerFactory $handlerFactory + * @param array $data + * @param string $dataSet + * @param bool $persist + */ + public function __construct( + Config $configuration, + RepositoryFactory $repositoryFactory, + FixtureFactory $fixtureFactory, + HandlerFactory $handlerFactory, + array $data = [], + $dataSet = '', + $persist = false + ) { + parent::__construct( + $configuration, + $repositoryFactory, + $fixtureFactory, + $handlerFactory, + $data, + $dataSet, + $persist + ); + if (!isset($this->data['url_key']) && isset($this->data['name'])) { + $this->data['url_key'] = trim(strtolower(preg_replace('#[^0-9a-z%]+#i', '-', $this->data['name'])), '-'); + } + } + + protected $dataConfig = [ + 'create_url_params' => [ + 'type' => 'virtual', + 'set' => '4', + ], + 'input_prefix' => 'product', + ]; + + protected $defaultDataSet = [ + 'name' => 'Test simple product %isolation%', + 'sku' => 'test_simple_sku_%isolation%', + 'price' => ['value' => 100.00], + 'weight' => 12.0000, + 'qty' => 10 + ]; + + protected $category_ids = [ + 'attribute_code' => 'category_ids', + 'backend_type' => 'static', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + 'source' => 'Magento\Catalog\Test\Fixture\CatalogProductSimple\CategoryIds', + ]; + + protected $color = [ + 'attribute_code' => 'color', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'select', + ]; + + protected $country_of_manufacture = [ + 'attribute_code' => 'country_of_manufacture', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'select', + ]; + + protected $created_at = [ + 'attribute_code' => 'created_at', + 'backend_type' => 'static', + 'is_required' => '1', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $custom_design = [ + 'attribute_code' => 'custom_design', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'select', + ]; + + protected $custom_design_from = [ + 'attribute_code' => 'custom_design_from', + 'backend_type' => 'datetime', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'date', + ]; + + protected $custom_design_to = [ + 'attribute_code' => 'custom_design_to', + 'backend_type' => 'datetime', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'date', + ]; + + protected $custom_layout_update = [ + 'attribute_code' => 'custom_layout_update', + 'backend_type' => 'text', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'textarea', + ]; + + protected $description = [ + 'attribute_code' => 'description', + 'backend_type' => 'text', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'textarea', + 'group' => 'product-details', + ]; + + protected $gallery = [ + 'attribute_code' => 'gallery', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'gallery', + ]; + + protected $gift_message_available = [ + 'attribute_code' => 'gift_message_available', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'select', + ]; + + protected $group_price = [ + 'attribute_code' => 'group_price', + 'backend_type' => 'decimal', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + 'group' => 'advanced-pricing', + 'source' => 'Magento\Catalog\Test\Fixture\CatalogProductSimple\GroupPriceOptions', + ]; + + protected $has_options = [ + 'attribute_code' => 'has_options', + 'backend_type' => 'static', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $image = [ + 'attribute_code' => 'image', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'media_image', + ]; + + protected $image_label = [ + 'attribute_code' => 'image_label', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $is_recurring = [ + 'attribute_code' => 'is_recurring', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'select', + ]; + + protected $manufacturer = [ + 'attribute_code' => 'manufacturer', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'select', + ]; + + protected $media_gallery = [ + 'attribute_code' => 'media_gallery', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'gallery', + ]; + + protected $meta_description = [ + 'attribute_code' => 'meta_description', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'group' => 'search-optimization', + 'input' => 'textarea', + ]; + + protected $meta_keyword = [ + 'attribute_code' => 'meta_keyword', + 'backend_type' => 'text', + 'is_required' => '0', + 'default_value' => '', + 'group' => 'search-optimization', + 'input' => 'textarea', + ]; + + protected $meta_title = [ + 'attribute_code' => 'meta_title', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'group' => 'search-optimization', + 'input' => 'text', + ]; + + protected $minimal_price = [ + 'attribute_code' => 'minimal_price', + 'backend_type' => 'decimal', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'price', + ]; + + protected $msrp = [ + 'attribute_code' => 'msrp', + 'backend_type' => 'decimal', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'price', + ]; + + protected $msrp_display_actual_price_type = [ + 'attribute_code' => 'msrp_display_actual_price_type', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => 'Use config', + 'input' => 'select', + ]; + + protected $msrp_enabled = [ + 'attribute_code' => 'msrp_enabled', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => 'In Cart', + 'input' => 'select', + ]; + + protected $name = [ + 'attribute_code' => 'name', + 'backend_type' => 'varchar', + 'is_required' => '1', + 'default_value' => '', + 'input' => 'text', + 'group' => 'product-details', + ]; + + protected $news_from_date = [ + 'attribute_code' => 'news_from_date', + 'backend_type' => 'datetime', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'date', + ]; + + protected $news_to_date = [ + 'attribute_code' => 'news_to_date', + 'backend_type' => 'datetime', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'date', + ]; + + protected $old_id = [ + 'attribute_code' => 'old_id', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $options_container = [ + 'attribute_code' => 'options_container', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => 'Block after Info Column', + 'input' => 'select', + ]; + + protected $page_layout = [ + 'attribute_code' => 'page_layout', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'select', + ]; + + protected $price = [ + 'attribute_code' => 'price', + 'backend_type' => 'decimal', + 'is_required' => '1', + 'default_value' => '', + 'input' => 'price', + 'group' => 'product-details', + 'source' => 'Magento\Catalog\Test\Fixture\CatalogProductSimple\Price', + ]; + + protected $quantity_and_stock_status = [ + 'attribute_code' => 'quantity_and_stock_status', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => 'In Stock', + 'input' => 'select', + 'group' => 'product-details', + ]; + + protected $recurring_profile = [ + 'attribute_code' => 'recurring_profile', + 'backend_type' => 'text', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $required_options = [ + 'attribute_code' => 'required_options', + 'backend_type' => 'static', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $sku = [ + 'attribute_code' => 'sku', + 'backend_type' => 'static', + 'is_required' => '1', + 'default_value' => '', + 'input' => 'text', + 'group' => 'product-details', + ]; + + protected $small_image = [ + 'attribute_code' => 'small_image', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'media_image', + ]; + + protected $small_image_label = [ + 'attribute_code' => 'small_image_label', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $special_from_date = [ + 'attribute_code' => 'special_from_date', + 'backend_type' => 'datetime', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'date', + ]; + + protected $short_description = [ + 'attribute_code' => 'short_description', + 'backend_type' => 'text', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'textarea', + 'group' => 'autosettings', + ]; + + protected $special_price = [ + 'attribute_code' => 'special_price', + 'backend_type' => 'decimal', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'price', + 'group' => 'advanced-pricing', + ]; + + protected $special_to_date = [ + 'attribute_code' => 'special_to_date', + 'backend_type' => 'datetime', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'date', + ]; + + protected $status = [ + 'attribute_code' => 'status', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => 'Product online', + 'input' => 'checkbox', + 'group' => 'product-details', + ]; + + protected $tax_class_id = [ + 'attribute_code' => 'tax_class_id', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => 'Taxable Goods', + 'input' => 'select', + 'group' => 'product-details', + ]; + + protected $thumbnail = [ + 'attribute_code' => 'thumbnail', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'media_image', + ]; + + protected $thumbnail_label = [ + 'attribute_code' => 'thumbnail_label', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $tier_price = [ + 'attribute_code' => 'tier_price', + 'backend_type' => 'decimal', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + 'group' => 'advanced-pricing', + 'source' => 'Magento\Catalog\Test\Fixture\CatalogProductSimple\TierPriceOptions', + ]; + + protected $updated_at = [ + 'attribute_code' => 'updated_at', + 'backend_type' => 'static', + 'is_required' => '1', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $url_key = [ + 'attribute_code' => 'url_key', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $url_path = [ + 'attribute_code' => 'url_path', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'text', + ]; + + protected $visibility = [ + 'attribute_code' => 'visibility', + 'backend_type' => 'int', + 'is_required' => '0', + 'default_value' => 'Catalog, Search', + 'input' => 'select', + 'group' => 'autosettings', + ]; + + protected $weight = [ + 'attribute_code' => 'weight', + 'backend_type' => 'decimal', + 'is_required' => '0', + 'default_value' => '', + 'input' => 'weight', + 'group' => 'product-details', + ]; + + protected $id = [ + 'attribute_code' => 'id', + 'backend_type' => 'virtual', + ]; + + protected $type_id = [ + 'attribute_code' => 'type_id', + 'backend_type' => 'virtual', + ]; + + protected $attribute_set_id = [ + 'attribute_code' => 'attribute_set_id', + 'backend_type' => 'virtual', + ]; + + protected $qty = [ + 'attribute_code' => 'qty', + 'input' => 'input', + 'group' => 'product-details', + ]; + + protected $custom_options = [ + 'attribute_code' => 'custom_options', + 'backend_type' => 'virtual', + 'is_required' => '0', + 'group' => 'customer-options', + 'source' => 'Magento\Catalog\Test\Fixture\CatalogProductSimple\CustomOptions', + ]; + + public function getCategoryIds() + { + return $this->getData('category_ids'); + } + + public function getColor() + { + return $this->getData('color'); + } + + public function getCountryOfManufacture() + { + return $this->getData('country_of_manufacture'); + } + + public function getCreatedAt() + { + return $this->getData('created_at'); + } + + public function getCustomDesign() + { + return $this->getData('custom_design'); + } + + public function getCustomDesignFrom() + { + return $this->getData('custom_design_from'); + } + + public function getCustomDesignTo() + { + return $this->getData('custom_design_to'); + } + + public function getCustomLayoutUpdate() + { + return $this->getData('custom_layout_update'); + } + + public function getDescription() + { + return $this->getData('description'); + } + + public function getGallery() + { + return $this->getData('gallery'); + } + + public function getGiftMessageAvailable() + { + return $this->getData('gift_message_available'); + } + + public function getGroupPrice() + { + return $this->getData('group_price'); + } + + public function getHasOptions() + { + return $this->getData('has_options'); + } + + public function getImage() + { + return $this->getData('image'); + } + + public function getImageLabel() + { + return $this->getData('image_label'); + } + + public function getIsRecurring() + { + return $this->getData('is_recurring'); + } + + public function getManufacturer() + { + return $this->getData('manufacturer'); + } + + public function getMediaGallery() + { + return $this->getData('media_gallery'); + } + + public function getMetaDescription() + { + return $this->getData('meta_description'); + } + + public function getMetaKeyword() + { + return $this->getData('meta_keyword'); + } + + public function getMetaTitle() + { + return $this->getData('meta_title'); + } + + public function getMinimalPrice() + { + return $this->getData('minimal_price'); + } + + public function getMsrp() + { + return $this->getData('msrp'); + } + + public function getMsrpDisplayActualPriceType() + { + return $this->getData('msrp_display_actual_price_type'); + } + + public function getMsrpEnabled() + { + return $this->getData('msrp_enabled'); + } + + public function getName() + { + return $this->getData('name'); + } + + public function getNewsFromDate() + { + return $this->getData('news_from_date'); + } + + public function getNewsToDate() + { + return $this->getData('news_to_date'); + } + + public function getOldId() + { + return $this->getData('old_id'); + } + + public function getOptionsContainer() + { + return $this->getData('options_container'); + } + + public function getPageLayout() + { + return $this->getData('page_layout'); + } + + public function getPrice() + { + return $this->getData('price'); + } + + public function getQuantityAndStockStatus() + { + return $this->getData('quantity_and_stock_status'); + } + + public function getRecurringProfile() + { + return $this->getData('recurring_profile'); + } + + public function getRequiredOptions() + { + return $this->getData('required_options'); + } + + public function getSku() + { + return $this->getData('sku'); + } + + public function getSmallImage() + { + return $this->getData('small_image'); + } + + public function getSmallImageLabel() + { + return $this->getData('small_image_label'); + } + + public function getSpecialFromDate() + { + return $this->getData('special_from_date'); + } + + public function getShortDescription() + { + return $this->getData('short_description'); + } + + public function getSpecialPrice() + { + return $this->getData('special_price'); + } + + public function getSpecialToDate() + { + return $this->getData('special_to_date'); + } + + public function getStatus() + { + return $this->getData('status'); + } + + public function getTaxClassId() + { + return $this->getData('tax_class_id'); + } + + public function getThumbnail() + { + return $this->getData('thumbnail'); + } + + public function getThumbnailLabel() + { + return $this->getData('thumbnail_label'); + } + + public function getTierPrice() + { + return $this->getData('tier_price'); + } + + public function getUpdatedAt() + { + return $this->getData('updated_at'); + } + + public function getUrlKey() + { + return $this->getData('url_key'); + } + + public function getUrlPath() + { + return $this->getData('url_path'); + } + + public function getVisibility() + { + return $this->getData('visibility'); + } + + public function getWeight() + { + return $this->getData('weight'); + } + + public function getId() + { + return $this->getData('id'); + } + + public function getTypeId() + { + return $this->getData('type_id'); + } + + public function getAttributeSetId() + { + return $this->getData('attribute_set_id'); + } + + public function getQty() + { + return $this->getData('qty'); + } + + public function getCustomOptions() + { + return $this->getData('custom_options'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml new file mode 100644 index 0000000000000000000000000000000000000000..80a1d596ef4936c483d33e13fa2e65a20a3e5ba7 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml @@ -0,0 +1,460 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<fixture class="Magento\Catalog\Test\Fixture\CatalogProductVirtual"> + <module>Magento_Catalog</module> + <type>eav</type> + <entity_type>catalog_product</entity_type> + <product_type>virtual</product_type> + <collection>Magento\Catalog\Model\Resource\Product\Collection</collection> + <identifier>sku</identifier> + <fields> + <category_ids> + <attribute_code>category_ids</attribute_code> + <backend_type>static</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + <fixture>Magento\Catalog\Test\Fixture\CatalogProductSimple\CategoryIds</fixture> + </category_ids> + <color> + <attribute_code>color</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>select</input> + </color> + <country_of_manufacture> + <attribute_code>country_of_manufacture</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>select</input> + </country_of_manufacture> + <created_at> + <attribute_code>created_at</attribute_code> + <backend_type>static</backend_type> + <is_required>1</is_required> + <default_value></default_value> + <input>text</input> + </created_at> + <custom_design> + <attribute_code>custom_design</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>select</input> + </custom_design> + <custom_design_from> + <attribute_code>custom_design_from</attribute_code> + <backend_type>datetime</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>date</input> + </custom_design_from> + <custom_design_to> + <attribute_code>custom_design_to</attribute_code> + <backend_type>datetime</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>date</input> + </custom_design_to> + <custom_layout_update> + <attribute_code>custom_layout_update</attribute_code> + <backend_type>text</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>textarea</input> + </custom_layout_update> + <description> + <attribute_code>description</attribute_code> + <backend_type>text</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>textarea</input> + <group>product-details</group> + </description> + <gallery> + <attribute_code>gallery</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>gallery</input> + </gallery> + <gift_message_available> + <attribute_code>gift_message_available</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>select</input> + </gift_message_available> + <group_price> + <attribute_code>group_price</attribute_code> + <backend_type>decimal</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + <group>advanced-pricing</group> + <fixture>Magento\Catalog\Test\Fixture\CatalogProductSimple\GroupPriceOptions</fixture> + </group_price> + <has_options> + <attribute_code>has_options</attribute_code> + <backend_type>static</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </has_options> + <image> + <attribute_code>image</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>media_image</input> + </image> + <image_label> + <attribute_code>image_label</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </image_label> + <is_recurring> + <attribute_code>is_recurring</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>select</input> + </is_recurring> + <manufacturer> + <attribute_code>manufacturer</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>select</input> + </manufacturer> + <media_gallery> + <attribute_code>media_gallery</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>gallery</input> + </media_gallery> + <meta_description> + <attribute_code>meta_description</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <group>search-optimization</group> + <input>textarea</input> + </meta_description> + <meta_keyword> + <attribute_code>meta_keyword</attribute_code> + <backend_type>text</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <group>search-optimization</group> + <input>textarea</input> + </meta_keyword> + <meta_title> + <attribute_code>meta_title</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <group>search-optimization</group> + <input>text</input> + </meta_title> + <minimal_price> + <attribute_code>minimal_price</attribute_code> + <backend_type>decimal</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>price</input> + </minimal_price> + <msrp> + <attribute_code>msrp</attribute_code> + <backend_type>decimal</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>price</input> + </msrp> + <msrp_display_actual_price_type> + <attribute_code>msrp_display_actual_price_type</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value>Use config</default_value> + <input>select</input> + </msrp_display_actual_price_type> + <msrp_enabled> + <attribute_code>msrp_enabled</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value>In Cart</default_value> + <input>select</input> + </msrp_enabled> + <name> + <attribute_code>name</attribute_code> + <backend_type>varchar</backend_type> + <is_required>1</is_required> + <default_value></default_value> + <input>text</input> + <group>product-details</group> + </name> + <news_from_date> + <attribute_code>news_from_date</attribute_code> + <backend_type>datetime</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>date</input> + </news_from_date> + <news_to_date> + <attribute_code>news_to_date</attribute_code> + <backend_type>datetime</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>date</input> + </news_to_date> + <old_id> + <attribute_code>old_id</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </old_id> + <options_container> + <attribute_code>options_container</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value>Block after Info Column</default_value> + <input>select</input> + </options_container> + <page_layout> + <attribute_code>page_layout</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>select</input> + </page_layout> + <price> + <attribute_code>price</attribute_code> + <backend_type>decimal</backend_type> + <is_required>1</is_required> + <default_value></default_value> + <input>price</input> + <group>product-details</group> + <fixture>Magento\Catalog\Test\Fixture\CatalogProductSimple\Price</fixture> + </price> + <quantity_and_stock_status> + <attribute_code>quantity_and_stock_status</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value>In Stock</default_value> + <input>select</input> + <group>product-details</group> + </quantity_and_stock_status> + <recurring_profile> + <attribute_code>recurring_profile</attribute_code> + <backend_type>text</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </recurring_profile> + <required_options> + <attribute_code>required_options</attribute_code> + <backend_type>static</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </required_options> + <sku> + <attribute_code>sku</attribute_code> + <backend_type>static</backend_type> + <is_required>1</is_required> + <default_value></default_value> + <input>text</input> + <group>product-details</group> + </sku> + <small_image> + <attribute_code>small_image</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>media_image</input> + </small_image> + <small_image_label> + <attribute_code>small_image_label</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </small_image_label> + <special_from_date> + <attribute_code>special_from_date</attribute_code> + <backend_type>datetime</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>date</input> + </special_from_date> + <short_description> + <attribute_code>short_description</attribute_code> + <backend_type>text</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>textarea</input> + <group>autosettings</group> + </short_description> + <special_price> + <attribute_code>special_price</attribute_code> + <backend_type>decimal</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>price</input> + <group>advanced-pricing</group> + </special_price> + <special_to_date> + <attribute_code>special_to_date</attribute_code> + <backend_type>datetime</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>date</input> + </special_to_date> + <status> + <attribute_code>status</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value>Product online</default_value> + <input>checkbox</input> + <group>product-details</group> + </status> + <tax_class_id> + <attribute_code>tax_class_id</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value>Taxable Goods</default_value> + <input>select</input> + <group>product-details</group> + </tax_class_id> + <thumbnail> + <attribute_code>thumbnail</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>media_image</input> + </thumbnail> + <thumbnail_label> + <attribute_code>thumbnail_label</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </thumbnail_label> + <tier_price> + <attribute_code>tier_price</attribute_code> + <backend_type>decimal</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + <group>advanced-pricing</group> + <fixture>Magento\Catalog\Test\Fixture\CatalogProductSimple\TierPriceOptions</fixture> + </tier_price> + <updated_at> + <attribute_code>updated_at</attribute_code> + <backend_type>static</backend_type> + <is_required>1</is_required> + <default_value></default_value> + <input>text</input> + </updated_at> + <url_key> + <attribute_code>url_key</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </url_key> + <url_path> + <attribute_code>url_path</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>text</input> + </url_path> + <visibility> + <attribute_code>visibility</attribute_code> + <backend_type>int</backend_type> + <is_required>0</is_required> + <default_value>Catalog, Search</default_value> + <input>select</input> + <group>autosettings</group> + </visibility> + <weight> + <attribute_code>weight</attribute_code> + <backend_type>decimal</backend_type> + <is_required>0</is_required> + <default_value></default_value> + <input>weight</input> + <group>product-details</group> + </weight> + <id> + <attribute_code>id</attribute_code> + <backend_type>virtual</backend_type> + </id> + <type_id> + <attribute_code>type_id</attribute_code> + <backend_type>virtual</backend_type> + </type_id> + <attribute_set_id> + <attribute_code>attribute_set_id</attribute_code> + <backend_type>virtual</backend_type> + </attribute_set_id> + <qty> + <attribute_code>qty</attribute_code> + <input>input</input> + <group>product-details</group> + </qty> + <custom_options> + <attribute_code>custom_options</attribute_code> + <backend_type>virtual</backend_type> + <group>product_info_tabs_customer_options</group> + <is_required>0</is_required> + <group>customer-options</group> + <fixture>Magento\Catalog\Test\Fixture\CatalogProductSimple\CustomOptions</fixture> + </custom_options> + </fields> + <data_set> + <sku></sku> + <name></name> + <short_description></short_description> + <description></description> + <tax_class_id></tax_class_id> + </data_set> + <data_config> + <create_url_params> + <type>virtual</type> + <set>4</set> + </create_url_params> + <input_prefix>product</input_prefix> + </data_config> + <repository_class>Magento\Catalog\Test\Repository\CatalogProductVirtual</repository_class> + <handler_interface>Magento\Catalog\Test\Handler\CatalogProductVirtual\CatalogProductVirtualInterface</handler_interface> +</fixture> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php index f88ff3ff58e74699d16d81b44022e5529f608cb4..7bcaacf689eb8fde6dab8f8173162775432a8fc0 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php @@ -18,20 +18,19 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @spi * @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) */ namespace Magento\Catalog\Test\Handler\CatalogProductSimple; -use Mtf\Handler\Curl as AbstractCurl; +use Mtf\System\Config; use Mtf\Fixture\FixtureInterface; use Mtf\Fixture\InjectableFixture; use Mtf\Util\Protocol\CurlInterface; use Mtf\Util\Protocol\CurlTransport; +use Mtf\Handler\Curl as AbstractCurl; use Mtf\Util\Protocol\CurlTransport\BackendDecorator; -use Mtf\System\Config; /** * Class CreateProduct diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.php index 3ed4bb16f8448df85939b1771acd294207cbe178..0b047f6fae11bc458f9081f45d275385e4d460ac 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.php @@ -99,7 +99,13 @@ class CatalogProductView extends FrontendPage 'mapBlock' => [ 'name' => 'mapBlock', 'class' => 'Magento\Catalog\Test\Block\Product\Price', - 'locator' => '#map-popup', + 'locator' => '#map-popup-click-for-price', + 'strategy' => 'css selector', + ], + 'titleBlock' => [ + 'name' => 'titleBlock', + 'class' => 'Magento\Theme\Test\Block\Html\Title', + 'locator' => '.page.title h1.title', 'strategy' => 'css selector', ] ]; @@ -212,4 +218,12 @@ class CatalogProductView extends FrontendPage { return $this->getBlockInstance('mapBlock'); } + + /** + * @return \Magento\Theme\Test\Block\Html\Title + */ + public function getTitleBlock() + { + return $this->getBlockInstance('titleBlock'); + } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml index dc483885bca92c98f50f24239f29fc2ed76a41a4..e6301cff8ef22c11b40027dc40f3270fac1e79e7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml @@ -90,4 +90,10 @@ <locator>#review-form</locator> <strategy>css selector</strategy> </block> + <block> + <name>titleBlock</name> + <class>Magento\Theme\Test\Block\Html\Title</class> + <locator>.page.title h1.title</locator> + <strategy>css selector</strategy> + </block> </page> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php index c07b521f749c54a64eca45af2681f3b905c63160..5e506ad74a314c13325cfe29c49b6927dfa3692d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php @@ -34,26 +34,6 @@ class CatalogProductSimple extends AbstractRepository { public function __construct(array $defaultConfig = [], array $defaultData = []) { - $this->_data['SimpleProduct_sku_516169631'] = [ - 'sku' => 'SimpleProduct_sku_516169631', - 'name' => 'SimpleProduct 516169631', - 'type_id' => 'simple', - 'attribute_set_id' => '4', - 'price' => ['value' => 3, 'preset' => '-'], - 'id' => '1', - 'mtf_dataset_name' => 'SimpleProduct_sku_516169631' - ]; - - $this->_data['SimpleProduct_sku_1947585255'] = [ - 'sku' => 'SimpleProduct_sku_1947585255', - 'name' => 'SimpleProduct 1947585255', - 'type_id' => 'simple', - 'attribute_set_id' => '4', - 'price' => ['value' => 4, 'preset' => '-'], - 'id' => '2', - 'mtf_dataset_name' => 'SimpleProduct_sku_1947585255' - ]; - $this->_data['100_dollar_product'] = [ 'sku' => '100_dollar_product%isolation%', 'name' => '100_dollar_product%isolation%', @@ -91,5 +71,14 @@ class CatalogProductSimple extends AbstractRepository 'price' => ['value' => 100, 'preset' => ''], 'category_ids' => ['presets' => 'default_subcategory'] ]; + + $this->_data['product_without_category'] = [ + 'sku' => 'simple_product_without_category_%isolation%', + 'name' => 'Simple product without category %isolation%', + 'type_id' => 'simple', + 'attribute_set_id' => '4', + 'price' => ['value' => 100, 'preset' => '-'], + 'category_ids' => ['presets' => null] + ]; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3a1aa1f758437e582ca5163c19e6b27e5232571a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php @@ -0,0 +1,113 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Catalog\Test\TestCase\Product; + +use Mtf\TestCase\Injectable; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; +use Magento\Catalog\Test\Fixture\CatalogProductVirtual; +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; + +/** + * Test Creation for CreateVirtualProductEntity + * + * Test Flow: + * 1. Login as admin. + * 2. Navigate to the Products > Inventory > Catalog. + * 3. Click on "+" dropdown and select Virtual Product type. + * 4. Fill in all data according to data set. + * 5. Save product. + * 6. Verify created product. + * + * @group Virtual_Product_(CS) + * @ZephyrId MAGETWO-23417 + */ +class CreateVirtualProductEntityTest extends Injectable +{ + /** + * Category fixture + * + * @var CatalogCategoryEntity + */ + protected $category; + + /** + * Product page with a grid + * + * @var CatalogProductIndex + */ + protected $productGrid; + + /** + * Page to create a product + * + * @var CatalogProductNew + */ + protected $newProductPage; + + /** + * Prepare data + * + * @param CatalogCategoryEntity $category + * @return array + */ + public function __prepare(CatalogCategoryEntity $category) + { + $category->persist(); + return [ + 'category' => $category + ]; + } + + /** + * Injection data + * + * @param CatalogProductIndex $productGrid + * @param CatalogProductNew $newProductPage + * @return void + */ + public function __inject(CatalogProductIndex $productGrid, CatalogProductNew $newProductPage) + { + $this->productGrid = $productGrid; + $this->newProductPage = $newProductPage; + } + + /** + * Run create product virtual entity test + * + * @param CatalogProductVirtual $product + * @param CatalogCategoryEntity $category + * @return void + */ + public function testCreate(CatalogProductVirtual $product, CatalogCategoryEntity $category) + { + // Steps + $this->productGrid->open(); + $this->productGrid->getProductBlock()->addProduct('virtual'); + $productBlockForm = $this->newProductPage->getForm(); + $productBlockForm->fillProduct($product, $category); + $this->newProductPage->getFormAction()->save(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest/testCreate.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest/testCreate.csv new file mode 100644 index 0000000000000000000000000000000000000000..472cffe476abe66ec0a7f5b13705351c9876781b --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest/testCreate.csv @@ -0,0 +1,8 @@ +"product/data/name";"product/data/sku";"product/data/price/value";"product/data/tax_class_id";"product/data/qty";"product/data/is_virtual";"product/data/category";"product/data/group_price/preset";"product/data/price/preset";"product/data/tier_price/preset";"product/data/inventory_manage_stock";"product/data/quantity_and_stock_status";"product/data/custom_options/preset";"product/data/visibility";"constraint" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"-";"Yes";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"None";"999";"Yes";"category_%isolation%";"-";"-";"MAGETWO-23002";"Yes";"In Stock";"-";"Catalog, Search";"assertProductSaveMessage, assertProductVisibleInCategory, assertProductForm, assertProductSearchableBySku" +"VirtualProduct %isolation%";"-";"10";"Taxable Goods";"999";"Yes";"-";"-";"MAGETWO-23030";"-";"-";"Out of Stock";"-";"Search";"assertProductSaveMessage, assertProductForm, assertProductSkuAutoGenerated, assertProductSearchableBySku" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"-";"Yes";"category_%isolation%";"MAGETWO-23055";"-";"-";"-";"-";"-";"Catalog";"assertProductSaveMessage, assertProductForm, assertProductVisibleInCategory" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"9000";"-";"-";"Yes";"-";"MAGETWO-23055";"-";"-";"-";"-";"options-suite";"-";"assertProductSaveMessage, assertProductSearchableBySku, assertProductPage, assertGroupedPriceOnProductPage, assertCustomOptionsOnProductPage" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"999";"Yes";"-";"-";"MAGETWO-23030";"-";"No";"In Stock";"-";"-";"assertProductSaveMessage, assertProductPage, assertSpecialPriceOnProductPage, assertProductInStock" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"9000";"-";"999";"Yes";"-";"-";"-";"default";"-";"Out of Stock";"-";"-";"assertProductSaveMessage, assertProductPage, assertTierPriceOnProductPage, assertProductOutOfStock" diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateProductSimpleEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateProductSimpleEntityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b69d1115890bde211de8ee383a63b237bb290a3a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateProductSimpleEntityTest.php @@ -0,0 +1,143 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Catalog\Test\TestCase\Product; + +use Mtf\TestCase\Injectable; +use Mtf\Fixture\FixtureFactory; +use Magento\Catalog\Test\Fixture\CatalogProductSimple; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; + +/** + * Test Creation for UpdateProductSimpleEntity + * + * Test Flow: + * + * Precondition: + * Category is created. + * Product is created. + * + * Steps: + * 1. Login to backend. + * 2. Navigate to PRODUCTS -> Catalog. + * 3. Select a product in the grid. + * 4. Edit test value(s) according to dataset. + * 5. Click "Save". + * 6. Perform asserts + * + * @group Products_(CS) + * @ZephyrId MAGETWO-23544 + */ +class UpdateProductSimpleEntityTest extends Injectable +{ + /** + * Simple product fixture + * + * @var CatalogProductSimple + */ + protected $product; + + /** + * Product page with a grid + * + * @var CatalogProductIndex + */ + protected $productGrid; + + /** + * Page to update a product + * + * @var CatalogProductEdit + */ + protected $editProductPage; + + /** + * Category fixture + * + * @var CatalogCategoryEntity + */ + protected $category; + + /** + * Injection data + * + * @param CatalogProductIndex $productGrid + * @param CatalogProductEdit $editProductPage + * @param FixtureFactory $fixtureFactory + * @return array + */ + public function __inject( + CatalogProductIndex $productGrid, + CatalogProductEdit $editProductPage, + FixtureFactory $fixtureFactory + ) { + $this->product = $fixtureFactory->createByCode( + 'catalogProductSimple', + [ + 'dataSet' => 'product_without_category', + 'data' => [ + 'category_ids' => [ + 'category' => $this->category + ] + ] + ] + ); + $this->product->persist(); + + $this->productGrid = $productGrid; + $this->editProductPage = $editProductPage; + } + + /** + * Prepare data + * + * @param CatalogCategoryEntity $category + * @return array + */ + public function __prepare(CatalogCategoryEntity $category) + { + $category->persist(); + $this->category = $category; + return [ + 'category' => $category + ]; + } + + /** + * Run update product simple entity test + * + * @param CatalogProductSimple $product + * @return void + */ + public function testUpdate(CatalogProductSimple $product) + { + $filter = ['sku' => $this->product->getSku()]; + $this->productGrid->open()->getProductGrid()->searchAndOpen($filter); + $productBlockForm = $this->editProductPage->getForm(); + $productBlockForm->fillProduct($product); + $this->editProductPage->getFormAction()->save(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateProductSimpleEntityTest/testUpdate.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateProductSimpleEntityTest/testUpdate.csv new file mode 100644 index 0000000000000000000000000000000000000000..fb266402aac0072193f70fb807e64e181090b154 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateProductSimpleEntityTest/testUpdate.csv @@ -0,0 +1,7 @@ +"product/data/name";"product/data/sku";"product/data/price/value";"product/data/qty";"product/data/quantity_and_stock_status";"product/data/url_key";"product/data/weight";"product/data/visibility";"product/data/status";"constraint" +"Test simple product %isolation%";"test_simple_product_%isolation%";"245.00";"200.0000";"-";"test-simple-product-%isolation%";"120.0000";"Catalog, Search";"-";"assertProductSaveMessage, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage" +"Test simple product %isolation%";"test_simple_product_%isolation%";"325.00";"123.0000";"-";"test-simple-product-%isolation%";"129.0000";"Not Visible Individually";"-";"assertProductSaveMessage, assertProductForm, assertProductIsNotDisplayingOnFrontend" +"Test simple product %isolation%";"test_simple_product_%isolation%";"325.01";"125.0000";"-";"test-simple-product-%isolation%";"25.0000";"Catalog";"-";"assertProductSaveMessage, assertProductInStock, assertProductForm, assertProductSearchableBySku, assertProductVisibleInCategory, assertProductPage" +"Test simple product %isolation%";"test_simple_product_%isolation%";"325.02";"89.0000";"-";"test-simple-product-%isolation%";"89.0000";"Search";"-";"assertProductSaveMessage, assertProductInStock, assertProductForm, assertProductVisibleInCategory, assertProductPage, assertProductSearchableBySku, assertProductPage" +"Test simple product %isolation%";"test_simple_product_%isolation%";"325.03";"25.0000";"Out of Stock";"test-simple-product-%isolation%";"125.0000";"-";"-";"assertProductSaveMessage, assertProductForm, assertProductOutOfStock, assertProductPage, assertProductVisibleInCategory, assertProductSearchableBySku" +"Test simple product %isolation%";"test_simple_product_%isolation%";"74.00";"87.0000";"-";"test-simple-product-%isolation%";"333.0000";"-";"Product offline";"assertProductSaveMessage, assertProductForm, assertProductIsNotDisplayingOnFrontend" diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml index a9767c006017e0ebfa48a5bae0c0a6900638239a..6ae8871cff45a46f2f9d162da46a0fad0c0514c9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Catalog\Test\Handler\CatalogProductSimple\CatalogProductSimpleInterface" type="\Magento\Catalog\Test\Handler\CatalogProductSimple\Curl" /> <preference for="Magento\Catalog\Test\Handler\CatalogCategoryEntity\CatalogCategoryEntityInterface" type="\Magento\Catalog\Test\Handler\CatalogCategoryEntity\Curl" /> </config> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/constraint.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/constraint.xml index f2055f359c4d91101d82f6c6d9e998fd7a1c112d..58b83ca973f797e5200fd12b06e9122aba669a40 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/constraint.xml @@ -56,7 +56,7 @@ <require> <catalogCategoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> - <category class="Magento\Catalog\Test\Fixture\Category" /> + <category class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <product class="Mtf\Fixture\FixtureInterface" /> </require> </assertProductVisibleInCategory> @@ -74,16 +74,9 @@ <catalogCategoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> <product class="Mtf\Fixture\FixtureInterface" /> - <category class="Magento\Catalog\Test\Fixture\Category" /> + <category class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> </require> </assertProductInCategory> - <assertProductView module="Magento_Catalog"> - <severeness>low</severeness> - <require> - <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> - </require> - </assertProductView> <assertProductInCart module="Magento_Catalog"> <severeness>low</severeness> <require> @@ -94,42 +87,77 @@ </assertProductInCart> <assertProductPage module="Magento_Catalog"> <severeness>low</severeness> - <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <require> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> </assertProductPage> <assertGroupedPriceOnProductPage module="Magento_Catalog"> <severeness>low</severeness> - <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <require> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> </assertGroupedPriceOnProductPage> <assertSpecialPriceOnProductPage module="Magento_Catalog"> <severeness>low</severeness> - <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <require> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> </assertSpecialPriceOnProductPage> <assertTierPriceOnProductPage module="Magento_Catalog"> <severeness>low</severeness> - <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <require> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> </assertTierPriceOnProductPage> <assertCustomOptionsOnProductPage module="Magento_Catalog"> <severeness>low</severeness> - <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <require> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> </assertCustomOptionsOnProductPage> <assertProductForm module="Magento_Catalog"> <severeness>low</severeness> - <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> - <product class="Mtf\Fixture\FixtureInterface" /> + <require> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> </assertProductForm> <assertAddToCartButtonAbsent module="Magento_Catalog"> <severeness>low</severeness> - <require> - </require> + <require></require> </assertAddToCartButtonAbsent> <assertAddToCartButtonPresent module="Magento_Catalog"> + <severeness>low</severeness> + <require></require> + </assertAddToCartButtonPresent> + <assertProductIsNotDisplayingOnFrontend module="Magento_Catalog"> <severeness>low</severeness> <require> + <catalogCategoryView class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> + <cmsIndex class="Magento\Cms\Test\Page\CmsIndex" /> + <product class="Mtf\Fixture\FixtureInterface" /> + <category class="Magento\Catalog\Test\Page\Category\CatalogCategoryView" /> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <catalogSearchResult class="Magento\CatalogSearch\Test\Page\CatalogsearchResult" /> </require> - </assertAddToCartButtonPresent> + </assertProductIsNotDisplayingOnFrontend> + <assertProductSkuAutoGenerated module="Magento_Catalog"> + <severeness>low</severeness> + <require> + <productGrid class="Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> + </assertProductSkuAutoGenerated> + <assertGroupedPriceOnProductPage module="Magento_Catalog"> + <severeness>low</severeness> + <require> + <catalogProductView class="Magento\Catalog\Test\Page\Product\CatalogProductView" /> + <product class="Mtf\Fixture\FixtureInterface" /> + </require> + </assertGroupedPriceOnProductPage> </constraint> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/fixture.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/fixture.xml index 05f1ac8cb595d2caccbd54aa98472c2ec939d580..5b045a20921c9ad4105f59f68987dcc845122394 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/fixture.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/global/fixture.xml @@ -23,7 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - <fixture> <catalogProductSimple module="Magento_Catalog"> <type>eav</type> @@ -174,4 +173,43 @@ <entity_type>catalog_category_entity</entity_type> <collection>Magento\Catalog\Model\Resource\Category\Collection</collection> </catalogCategoryEntity> + <catalogProductVirtual module="Magento_Catalog"> + <type>eav</type> + <entity_type>catalog_product</entity_type> + <product_type>virtual</product_type> + <collection>Magento\Catalog\Model\Resource\Product\Collection</collection> + <identifier>sku</identifier> + <fields> + <id> + <attribute_code>id</attribute_code> + <backend_type>virtual</backend_type> + </id> + <type_id> + <attribute_code>type_id</attribute_code> + <backend_type>virtual</backend_type> + </type_id> + <attribute_set_id> + <attribute_code>attribute_set_id</attribute_code> + <backend_type>virtual</backend_type> + </attribute_set_id> + <qty> + <attribute_code>qty</attribute_code> + <input>input</input> + </qty> + </fields> + <data_set> + <sku /> + <name /> + <short_description /> + <description /> + <tax_class_id /> + </data_set> + <data_config> + <create_url_params> + <type>virtual</type> + <set>4</set> + </create_url_params> + <input_prefix>product</input_prefix> + </data_config> + </catalogProductVirtual> </fixture> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml index 78009aa73b1c7399c454c97d3e7ae7d6f508d03a..5f1490ede74a886281c04f574d143fb3d50f6977 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Catalog\Test\Handler\CatalogProductSimple\CatalogProductSimpleInterface" type="\Magento\Catalog\Test\Handler\CatalogProductSimple\Ui" /> </config> diff --git a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php index b1319eceb45a614a35d3289396bfe67d1f583f9c..21c7cbae76a94f70dbbeb84f4fcfcb5d362df391 100644 --- a/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php +++ b/dev/tests/functional/tests/app/Magento/Core/Test/Block/Messages.php @@ -143,4 +143,15 @@ class Messages extends Block { return $this->waitForElementVisible($this->noticeMessage, Locator::SELECTOR_CSS); } + + /** + * Get notice message which is present on the page + * + * @return string + */ + public function getNoticeMessages() + { + $this->waitForElementVisible($this->noticeMessage); + return $this->_rootElement->find($this->noticeMessage)->getText(); + } } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Actions.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Actions.php similarity index 96% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Actions.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Actions.php index 60c2ae28bc2208721e95092be4e4ba26ed8deadb..01ae4c2757b053b0b04ceede2f200266cc18e047 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Actions.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Actions.php @@ -23,7 +23,7 @@ * @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) */ -namespace Magento\Backend\Test\Block\Urlrewrite; +namespace Magento\UrlRewrite\Test\Block; use Mtf\Block\Block; diff --git a/lib/Magento/Framework/Code/Minifier/StrategyInterface.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Category/Grid.php similarity index 71% rename from lib/Magento/Framework/Code/Minifier/StrategyInterface.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Category/Grid.php index 221ad293a3ad5188737ae2efdb6e9adac045a6f1..499d5a6cc423856b2be7f3052b75debbd74a0d0f 100644 --- a/lib/Magento/Framework/Code/Minifier/StrategyInterface.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Category/Grid.php @@ -22,20 +22,24 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\UrlRewrite\Test\Block\Catalog\Category; + +use Magento\Backend\Test\Block\Widget\Grid as GridInterface; + /** - * Interface for minification strategies + * Class Grid + * URL Redirect grid */ -namespace Magento\Framework\Code\Minifier; - -interface StrategyInterface +class Grid extends GridInterface { /** - * Generates minified file - * - * @param string $originalFile path relative to pub/view_cache - * @param string $targetFile path relative to pub/view_cache + * Filters array mapping * - * @return void + * @var array $filters */ - public function minifyFile($originalFile, $targetFile); + protected $filters = [ + 'request_path' => [ + 'selector' => '#urlrewriteGrid_filter_request_path' + ] + ]; } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Category/Tree.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Category/Tree.php similarity index 95% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Category/Tree.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Category/Tree.php index 3b5bc91c780252389c1d2271707ab77bec47f8cd..d8f6a9338448f1bbabe46f32df3daeba2e0074b2 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Category/Tree.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Category/Tree.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Block\Urlrewrite\Catalog\Category; +namespace Magento\UrlRewrite\Test\Block\Catalog\Category; use Mtf\Block\Block; use Mtf\Client\Element\Locator; diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Edit/Form.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Edit/Form.php similarity index 94% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Edit/Form.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Edit/Form.php index 0c802674c356021fc34ee46236961f4e55e829ff..bb35b4366b92f29f0970dc2ed2da76e744ac601e 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Edit/Form.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Edit/Form.php @@ -22,14 +22,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Block\Urlrewrite\Catalog\Edit; +namespace Magento\UrlRewrite\Test\Block\Catalog\Edit; use Magento\Backend\Test\Block\Widget\Form as FormWidget; /** * Class Form * Catalog URL rewrite edit form - * */ class Form extends FormWidget { diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Edit/Form.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Edit/Form.xml similarity index 74% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Edit/Form.xml rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Edit/Form.xml index 1d9c6fbad7d1b6c44fdedc5217674882a59041ae..be3ef675c59066ed518b9f1dd495f5ce00b4d16c 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Edit/Form.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Edit/Form.xml @@ -28,17 +28,23 @@ <type> <selector>[name='is_system']</selector> </type> - <id_path /> - <store> + <id_path/> + <store_id> <selector>[name='store_id']</selector> - <input>select</input> - </store> - <request_path /> - <target_path /> - <redirect> + <input>selectstore</input> + </store_id> + <options> <selector>[name='options']</selector> <input>select</input> - </redirect> - <description /> + </options> + <request_path> + <selector>[name='request_path']</selector> + <input>text</input> + </request_path> + <description> + <selector>[name='description']</selector> + <input>text</input> + </description> + <redirect/> </fields> </mapping> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Product/Grid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Product/Grid.php similarity index 95% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Product/Grid.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Product/Grid.php index c499f17b7dd05456dc6c1c4ea3bf87a253412a9f..6ababae7f9a6ae7f008d271fa7989254765eb64d 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Catalog/Product/Grid.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Catalog/Product/Grid.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Block\Urlrewrite\Catalog\Product; +namespace Magento\UrlRewrite\Test\Block\Catalog\Product; use Magento\Backend\Test\Block\Widget\Grid as GridInterface; diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Selector.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Selector.php similarity index 96% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Selector.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Selector.php index 7ec29d9e881ba70ec43ce086d94a07f5e123dc2e..4d19b92fdefac88f05f20e6bd92f4ec479ffbe43 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Urlrewrite/Selector.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Selector.php @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Block\Urlrewrite; +namespace Magento\UrlRewrite\Test\Block; use Mtf\Block\Block; use Mtf\Client\Element\Locator; @@ -31,7 +31,6 @@ use Mtf\Client\Element\Locator; /** * Class Selector * URL rewrite type selector - * */ class Selector extends Block { diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryRedirect.php new file mode 100644 index 0000000000000000000000000000000000000000..3786499bc976515a102a10886086ed3e7fd47971 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryRedirect.php @@ -0,0 +1,78 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\UrlRewrite\Test\Constraint; + +use Mtf\Client\Browser; +use Mtf\Constraint\AbstractConstraint; +use Magento\UrlRewrite\Test\Fixture\UrlRewrite; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; + +/** + * Class AssertUrlRewriteCategoryRedirect + * Assert check URL rewrite category redirect + */ +class AssertUrlRewriteCategoryRedirect extends AbstractConstraint +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert check URL rewrite category redirect + * + * @param UrlRewrite $urlRewrite + * @param CatalogCategoryEntity $category + * @param Browser $browser + * @return void + */ + public function processAssert( + UrlRewrite $urlRewrite, + CatalogCategoryEntity $category, + Browser $browser + ) { + $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath()); + $url = strtolower($category->getName()); + \PHPUnit_Framework_Assert::assertEquals( + $browser->getUrl(), + $_ENV['app_frontend_url'] . $url . '.html', + 'URL rewrite category redirect false.' + . "\nExpected: " . $_ENV['app_frontend_url'] . $url . '.html' + . "\nActual: " . $browser->getUrl() + ); + } + + /** + * URL rewrite category redirect success + * + * @return string + */ + public function toString() + { + return 'URL rewrite category redirect success.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php new file mode 100644 index 0000000000000000000000000000000000000000..d6ceac89143d66bf3f01fc081cf391ff3e7ab50a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteInGrid.php @@ -0,0 +1,70 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\UrlRewrite\Test\Constraint; + +use Magento\UrlRewrite\Test\Fixture\UrlRewrite; +use Magento\UrlRewrite\Test\Page\Adminhtml\UrlrewriteIndex; +use Mtf\Constraint\AbstractConstraint; + +/** + * Class AssertUrlRewriteInGrid + * Assert that url rewrite category in grid + */ +class AssertUrlRewriteInGrid extends AbstractConstraint +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert that url rewrite category in grid + * + * @param UrlrewriteIndex $urlRewriteIndex + * @param UrlRewrite $urlRewrite + * @return void + */ + public function processAssert(UrlrewriteIndex $urlRewriteIndex, UrlRewrite $urlRewrite) + { + $urlRewriteIndex->open(); + $filter = ['request_path' => $urlRewrite->getRequestPath()]; + \PHPUnit_Framework_Assert::assertTrue( + $urlRewriteIndex->getUrlRedirectGrid()->isRowVisible($filter), + 'URL Redirect with request path \'' . $urlRewrite->getRequestPath() . '\' is absent in grid.' + ); + } + + /** + * URL rewrite category present in grid + * + * @return string + */ + public function toString() + { + return 'URL Redirect is present in grid.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSaveMessage.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSaveMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..3b0c0e083ae5d4a49bd692cb81134285060dcba2 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteSaveMessage.php @@ -0,0 +1,72 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\UrlRewrite\Test\Constraint; + +use Magento\UrlRewrite\Test\Page\Adminhtml\UrlrewriteIndex; +use Mtf\Constraint\AbstractConstraint; + +/** + * Class AssertUrlRewriteSaveMessage + * Assert that url rewrite success message is displayed + */ +class AssertUrlRewriteSaveMessage extends AbstractConstraint +{ + const SUCCESS_MESSAGE = 'The URL Rewrite has been saved.'; + + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert that url rewrite success message is displayed + * + * @param UrlrewriteIndex $index + * @return void + */ + public function processAssert(UrlrewriteIndex $index) + { + $actualMessage = $index->getMessagesBlock()->getSuccessMessages(); + \PHPUnit_Framework_Assert::assertEquals( + self::SUCCESS_MESSAGE, + $actualMessage, + 'Wrong success message is displayed.' + . "\nExpected: " . self::SUCCESS_MESSAGE + . "\nActual: " . $actualMessage + ); + } + + /** + * Url rewrite success message is displayed + * + * @return string + */ + public function toString() + { + return 'Url rewrite success message is displayed.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php new file mode 100644 index 0000000000000000000000000000000000000000..f62eab17ebcba10ab683964acf92eb0a83cbcf2e --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php @@ -0,0 +1,98 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\UrlRewrite\Test\Fixture; + +use Mtf\Fixture\InjectableFixture; + +/** + * Class UrlRewrite + */ +class UrlRewrite extends InjectableFixture +{ + protected $defaultDataSet = [ + 'store_id' => 'Default Store View', + 'request_path' => 'test_request%isolation%', + ]; + + protected $id = [ + 'attribute_code' => 'id', + 'backend_type' => 'virtual', + ]; + + protected $store_id = [ + 'attribute_code' => 'store_id', + 'backend_type' => 'varchar', + 'is_required' => '1', + 'default_value' => 'Default Store View', + 'input' => 'select', + ]; + + protected $options = [ + 'attribute_code' => 'options', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'input' => 'select', + ]; + + protected $request_path = [ + 'attribute_code' => 'request_path', + 'backend_type' => 'varchar', + 'is_required' => '1', + 'default_value' => 'request_path%isolation%', + 'input' => 'text', + ]; + + protected $description = [ + 'attribute_code' => 'description', + 'backend_type' => 'varchar', + 'is_required' => '0', + 'input' => 'text', + ]; + + public function getId() + { + return $this->getData('id'); + } + + public function getStoreId() + { + return $this->getData('store_id'); + } + + public function getOptions() + { + return $this->getData('options'); + } + + public function getRequestPath() + { + return $this->getData('request_path'); + } + + public function getDescription() + { + return $this->getData('description'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml new file mode 100644 index 0000000000000000000000000000000000000000..7f11744b1e78936bd03c0eaa985cfb5a65c4a43a --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<fixture class="Magento\UrlRewrite\Test\Fixture\UrlRewrite"> + <module>Magento_Backend</module> + <type>virtual</type> + <entity_type>core_url_rewrite</entity_type> + <collection>Magento\UrlRewrite\Model\Resource\UrlRewrite\Collection</collection> + <identifier>request_path</identifier> + <fields> + <id> + <attribute_code>id</attribute_code> + <backend_type>virtual</backend_type> + </id> + <store_id> + <attribute_code>store_id</attribute_code> + <backend_type>varchar</backend_type> + <is_required>1</is_required> + <default_value>Default Store View</default_value> + <input>select</input> + </store_id> + <options> + <attribute_code>options</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <input>select</input> + </options> + <request_path> + <attribute_code>request_path</attribute_code> + <backend_type>varchar</backend_type> + <is_required>1</is_required> + <default_value>request_path%isolation%</default_value> + <input>text</input> + </request_path> + <description> + <attribute_code>description</attribute_code> + <backend_type>varchar</backend_type> + <is_required>0</is_required> + <input>text</input> + </description> + </fields> +</fixture> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Urlrewrite/Category.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteCategory.php similarity index 92% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Urlrewrite/Category.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteCategory.php index 07937048eb74abff5da7fadd0a80e6dfea1b6656..00bc895001f45174c83878b197822ed143f7da1d 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Urlrewrite/Category.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteCategory.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Fixture\Urlrewrite; +namespace Magento\UrlRewrite\Test\Fixture; use Mtf\System\Config; use Mtf\Factory\Factory; @@ -30,11 +30,10 @@ use Mtf\Fixture\DataFixture; use Magento\Catalog\Test\Fixture\Category as CategoryFixture; /** - * Class Category + * Class UrlRewriteCategory * URL rewrite category fixture - * */ -class Category extends DataFixture +class UrlRewriteCategory extends DataFixture { /** * Category for which URL rewrite is created @@ -52,7 +51,7 @@ class Category extends DataFixture parent::__construct($configuration, $placeholders); $this->_placeholders['rewritten_category_request_path'] = array($this, 'getRewrittenRequestPath'); $this->_repository = Factory::getRepositoryFactory() - ->getMagentoBackendUrlrewriteCategory($this->_dataConfig, $this->_data); + ->getMagentoUrlRewriteUrlRewriteCategory($this->_dataConfig, $this->_data); $this->category = Factory::getFixtureFactory()->getMagentoCatalogCategory(); $this->category->persist(); diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Urlrewrite/Product.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteProduct.php similarity index 93% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Urlrewrite/Product.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteProduct.php index 21da97a9e121f9a19b17b5bef10a7949fb1ac09f..cdb1686d6f4dbe2a6632607bdcebd63ac38b0fa6 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Urlrewrite/Product.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewriteProduct.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Fixture\Urlrewrite; +namespace Magento\UrlRewrite\Test\Fixture; use Mtf\System\Config; use Mtf\Factory\Factory; @@ -30,11 +30,10 @@ use Mtf\Fixture\DataFixture; use Magento\Catalog\Test\Fixture\Product as ProductFixture; /** - * Class Product + * Class UrlRewriteProduct * URL rewrite product fixture - * */ -class Product extends DataFixture +class UrlRewriteProduct extends DataFixture { /** * Product for which URL rewrite is created @@ -53,7 +52,7 @@ class Product extends DataFixture $this->_placeholders['rewritten_product_request_path'] = array($this, 'getRewrittenRequestPath'); $this->_repository = Factory::getRepositoryFactory() - ->getMagentoBackendUrlrewriteProduct($this->_dataConfig, $this->_data); + ->getMagentoUrlRewriteUrlRewriteProduct($this->_dataConfig, $this->_data); $this->product = Factory::getFixtureFactory()->getMagentoCatalogSimpleProduct(); $this->product->switchData('simple'); diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteEdit.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteEdit.php new file mode 100644 index 0000000000000000000000000000000000000000..3ace1a1a09fe16ea16327791ded01a5c905f694c --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteEdit.php @@ -0,0 +1,136 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\UrlRewrite\Test\Page\Adminhtml; + +use Mtf\Page\BackendPage; + +/** + * Class UrlrewriteEdit + */ +class UrlrewriteEdit extends BackendPage +{ + const MCA = 'admin/urlrewrite/edit'; + + protected $_blocks = [ + 'treeBlock' => [ + 'name' => 'treeBlock', + 'class' => 'Magento\UrlRewrite\Test\Block\Catalog\Category\Tree', + 'locator' => '[data-ui-id="category-selector"]', + 'strategy' => 'css selector', + ], + 'formBlock' => [ + 'name' => 'formBlock', + 'class' => 'Magento\UrlRewrite\Test\Block\Catalog\Edit\Form', + 'locator' => '#edit_form', + 'strategy' => 'css selector', + ], + 'messagesBlock' => [ + 'name' => 'messagesBlock', + 'class' => 'Magento\Core\Test\Block\Messages', + 'locator' => '#messages .messages', + 'strategy' => 'css selector', + ], + 'buttonBlock' => [ + 'name' => 'buttonBlock', + 'class' => 'Magento\Backend\Test\Block\Widget\Form', + 'locator' => '#messages .messages', + 'strategy' => 'css selector', + ], + 'pageMainActions' => [ + 'name' => 'pageMainActions', + 'class' => 'Magento\Backend\Test\Block\FormPageActions', + 'locator' => '.page-main-actions', + 'strategy' => 'css selector', + ], + 'productGridBlock' => [ + 'name' => 'productGridBlock', + 'class' => 'Magento\UrlRewrite\Test\Block\Catalog\Product\Grid', + 'locator' => '[id="productGrid"]', + 'strategy' => 'css selector', + ], + 'urlRewriteTypeSelectorBlock' => [ + 'name' => 'urlRewriteTypeSelectorBlock', + 'class' => 'Magento\UrlRewrite\Test\Block\Selector', + 'locator' => '[data-ui-id="urlrewrite-type-selector"]', + 'strategy' => 'css selector', + ], + ]; + + /** + * @return \Magento\UrlRewrite\Test\Block\Catalog\Category\Tree + */ + public function getTreeBlock() + { + return $this->getBlockInstance('treeBlock'); + } + + /** + * @return \Magento\UrlRewrite\Test\Block\Catalog\Edit\Form + */ + public function getFormBlock() + { + return $this->getBlockInstance('formBlock'); + } + + /** + * @return \Magento\Core\Test\Block\Messages + */ + public function getMessagesBlock() + { + return $this->getBlockInstance('messagesBlock'); + } + + /** + * @return \Magento\Backend\Test\Block\Widget\Form + */ + public function getButtonBlock() + { + return $this->getBlockInstance('buttonBlock'); + } + + /** + * @return \Magento\Backend\Test\Block\FormPageActions + */ + public function getPageMainActions() + { + return $this->getBlockInstance('pageMainActions'); + } + + /** + * @return \Magento\UrlRewrite\Test\Block\Catalog\Product\Grid + */ + public function getProductGridBlock() + { + return $this->getBlockInstance('productGridBlock'); + } + + /** + * @return \Magento\UrlRewrite\Test\Block\Selector + */ + public function getUrlRewriteTypeSelectorBlock() + { + return $this->getBlockInstance('urlRewriteTypeSelectorBlock'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteEdit.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteEdit.xml new file mode 100644 index 0000000000000000000000000000000000000000..0eea42abf335b411125876ff5cd1d8dabd47fdad --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteEdit.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<page mca="admin/urlrewrite/edit"> + <block> + <name>treeBlock</name> + <class>Magento\UrlRewrite\Test\Block\Catalog\Category\Tree</class> + <locator>[data-ui-id="category-selector"]</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>formBlock</name> + <class>Magento\UrlRewrite\Test\Block\Catalog\Edit\Form</class> + <locator>#edit_form</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>messagesBlock</name> + <class>Magento\Core\Test\Block\Messages</class> + <locator>#messages .messages</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>buttonBlock</name> + <class>Magento\Backend\Test\Block\Widget\Form</class> + <locator>#messages .messages</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>pageMainActions</name> + <class>Magento\Backend\Test\Block\FormPageActions</class> + <locator>.page-main-actions</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>productGridBlock</name> + <class>Magento\UrlRewrite\Test\Block\Catalog\Product\Grid</class> + <locator>[id="productGrid"]</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>urlRewriteTypeSelectorBlock</name> + <class>Magento\UrlRewrite\Test\Block\Selector</class> + <locator>[data-ui-id="urlrewrite-type-selector"]</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>urlRewriteTypeSelectorBlock</name> + <class>Magento\UrlRewrite\Test\Block\Selector</class> + <locator>[data-ui-id="urlrewrite-type-selector"]</locator> + <strategy>css selector</strategy> + </block> +</page> diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteIndex.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteIndex.php new file mode 100644 index 0000000000000000000000000000000000000000..452fbb6c4263c711828a24c0f36ddc2b995bb2af --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteIndex.php @@ -0,0 +1,80 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\UrlRewrite\Test\Page\Adminhtml; + +use Mtf\Page\BackendPage; + +/** + * Class UrlRewriteIndex + */ +class UrlrewriteIndex extends BackendPage +{ + const MCA = 'admin/urlrewrite/index'; + + protected $_blocks = [ + 'pageActionsBlock' => [ + 'name' => 'pageActionsBlock', + 'class' => 'Magento\Backend\Test\Block\GridPageActions', + 'locator' => '.page-main-actions', + 'strategy' => 'css selector', + ], + 'urlRedirectGrid' => [ + 'name' => 'urlRedirectGrid', + 'class' => 'Magento\UrlRewrite\Test\Block\Catalog\Category\Grid', + 'locator' => '#urlrewriteGrid', + 'strategy' => 'css selector', + ], + 'messagesBlock' => [ + 'name' => 'messagesBlock', + 'class' => 'Magento\Core\Test\Block\Messages', + 'locator' => '.messages .messages', + 'strategy' => 'css selector', + ], + ]; + + /** + * @return \Magento\Backend\Test\Block\GridPageActions + */ + public function getPageActionsBlock() + { + return $this->getBlockInstance('pageActionsBlock'); + } + + /** + * @return \Magento\UrlRewrite\Test\Block\Catalog\Category\Grid + */ + public function getUrlRedirectGrid() + { + return $this->getBlockInstance('urlRedirectGrid'); + } + + /** + * @return \Magento\Core\Test\Block\Messages + */ + public function getMessagesBlock() + { + return $this->getBlockInstance('messagesBlock'); + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteIndex.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteIndex.xml new file mode 100644 index 0000000000000000000000000000000000000000..65cd2bcee95453c4b761d8241c47e6463a26562b --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlrewriteIndex.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<page mca="admin/urlrewrite/index"> + <block> + <name>pageActionsBlock</name> + <class>Magento\Backend\Test\Block\GridPageActions</class> + <locator>.page-main-actions</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>urlRedirectGrid</name> + <class>Magento\UrlRewrite\Test\Block\Catalog\Category\Grid</class> + <locator>#urlrewriteGrid</locator> + <strategy>css selector</strategy> + </block> + <block> + <name>messagesBlock</name> + <class>Magento\Core\Test\Block\Messages</class> + <locator>.messages .messages</locator> + <strategy>css selector</strategy> + </block> +</page> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Repository/Urlrewrite/Category.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewriteCategory.php similarity index 92% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Repository/Urlrewrite/Category.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewriteCategory.php index 27c390cea243abb7b3e599cc3f25784e69fe895c..94b4f0097592e9468d8fe83941ad8cc2c2ed2580 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Repository/Urlrewrite/Category.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewriteCategory.php @@ -22,16 +22,16 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Repository\Urlrewrite; +namespace Magento\UrlRewrite\Test\Repository; use Mtf\Repository\AbstractRepository; /** - * Class Category + * Class UrlRewriteCategory * URL Rewrite Category Repository * */ -class Category extends AbstractRepository +class UrlRewriteCategory extends AbstractRepository { /** * @param array $defaultConfig @@ -53,7 +53,7 @@ class Category extends AbstractRepository ), ); $this->_data['category_with_permanent_redirect'] = $this->_data['default']; - $this->_data['category_with_permanent_redirect']['data']['fields']['redirect'] = array( + $this->_data['category_with_permanent_redirect']['data']['fields']['options'] = array( 'value' => 'Permanent (301)', ); } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Repository/Urlrewrite/Product.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewriteProduct.php similarity index 92% rename from dev/tests/functional/tests/app/Magento/Backend/Test/Repository/Urlrewrite/Product.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewriteProduct.php index 94327b6c2481f381162c72f5e4bd77ab598eae7f..bb08f2cb0da79b4a6034b32c0a64b92c73b6913b 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Repository/Urlrewrite/Product.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewriteProduct.php @@ -22,16 +22,16 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\Repository\Urlrewrite; +namespace Magento\UrlRewrite\Test\Repository; use Mtf\Repository\AbstractRepository; /** - * Class Product + * Class UrlRewriteProduct * URL Rewrite Product Repository * */ -class Product extends AbstractRepository +class UrlRewriteProduct extends AbstractRepository { /** * @param array $defaultConfig @@ -54,7 +54,7 @@ class Product extends AbstractRepository ), ); $this->_data['product_with_temporary_redirect'] = $this->_data['default']; - $this->_data['product_with_temporary_redirect']['data']['fields']['redirect'] = array( + $this->_data['product_with_temporary_redirect']['data']['fields']['options'] = array( 'value' => 'Temporary (302)', ); } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/Urlrewrite/CategoryTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CategoryTest.php similarity index 74% rename from dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/Urlrewrite/CategoryTest.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CategoryTest.php index 8f1e9df3db1328b97f37b4adf3495be4f9bbb3b5..84299120bd528abc0298dac74fa639fe3aa7053d 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/Urlrewrite/CategoryTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CategoryTest.php @@ -22,17 +22,15 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\TestCase\Urlrewrite; +namespace Magento\UrlRewrite\Test\TestCase; use Mtf\Factory\Factory; -use Mtf\TestCase\Functional; -use Magento\Backend\Test\Fixture\Urlrewrite\Category; +use Magento\UrlRewrite\Test\Fixture\UrlRewriteCategory; use Mtf\TestCase\Injectable; /** * Class UrlrewriteTest * Category URL rewrite creation test - * */ class CategoryTest extends Injectable { @@ -45,29 +43,29 @@ class CategoryTest extends Injectable * Adding permanent redirect for category * * @ZephyrId MAGETWO-12407 - * @param Category $urlRewriteCategory + * @param UrlRewriteCategory $urlRewriteCategory */ - public function test(\Magento\Backend\Test\Fixture\Urlrewrite\Category $urlRewriteCategory) + public function test(\Magento\UrlRewrite\Test\Fixture\UrlRewriteCategory $urlRewriteCategory) { $urlRewriteCategory->switchData('category_with_permanent_redirect'); //Pages & Blocks - $urlRewriteGridPage = Factory::getPageFactory()->getAdminUrlrewriteIndex(); - $pageActionsBlock = $urlRewriteGridPage->getPageActionsBlock(); + $urlRewriteIndexPage = Factory::getPageFactory()->getAdminUrlrewriteIndex(); + $pageActionsBlock = $urlRewriteIndexPage->getPageActionsBlock(); $urlRewriteEditPage = Factory::getPageFactory()->getAdminUrlrewriteEdit(); - $categoryTreeBlock = $urlRewriteEditPage->getCategoryTreeBlock(); - $urlRewriteInfoForm = $urlRewriteEditPage->getUrlRewriteInformationForm(); + $categoryTreeBlock = $urlRewriteEditPage->getTreeBlock(); + $urlRewriteInfoForm = $urlRewriteEditPage->getFormBlock(); //Steps Factory::getApp()->magentoBackendLoginUser(); - $urlRewriteGridPage->open(); - $pageActionsBlock->addNewUrlRewrite(); + $urlRewriteIndexPage->open(); + $pageActionsBlock->addNew(); $categoryTreeBlock->selectCategory($urlRewriteCategory->getCategoryName()); $urlRewriteInfoForm->fill($urlRewriteCategory); - $urlRewriteEditPage->getActionsBlock()->save(); + $urlRewriteEditPage->getPageMainActions()->save(); $this->assertContains( 'The URL Rewrite has been saved.', - $urlRewriteGridPage->getMessagesBlock()->getSuccessMessages() + $urlRewriteIndexPage->getMessagesBlock()->getSuccessMessages() ); $this->assertUrlRedirect( @@ -79,6 +77,7 @@ class CategoryTest extends Injectable /** * Assert that request URL redirects to target URL * + * * @param string $requestUrl * @param string $targetUrl * @param string $message diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewritesEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewritesEntityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0fdc0cffdd494ca6da936f61fd932aa7f6d08f26 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewritesEntityTest.php @@ -0,0 +1,108 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\UrlRewrite\Test\TestCase; + +use Magento\UrlRewrite\Test\Fixture\UrlRewrite; +use Magento\UrlRewrite\Test\Page\Adminhtml\UrlrewriteEdit; +use Magento\UrlRewrite\Test\Page\Adminhtml\UrlrewriteIndex; +use Mtf\Fixture\FixtureFactory; +use Magento\Catalog\Test\Fixture\CatalogCategoryEntity; +use Mtf\TestCase\Injectable; + +/** + * Test Creation for Create Category Rewrites Entity + * + * Precondition: + * 1. Create Sub-category + * + * Test Flow: + * 1. Login to backend as Admin + * 2. Go to the Marketing-> SEO & Search->URL Redirects + * 3. Click "+" button + * 4. Select "For Category" in Create URL Rewrite dropdown + * 5. Select Category in "Category tree" + * 6. Fill data according to data set + * 7. Save Rewrite + * 8. Verify created rewrite + * + * @group URL_Rewrites_(MX) + * @ZephyrId MAGETWO-24280 + */ +class CreateCategoryRewritesEntityTest extends Injectable +{ + /** + * Page of url rewrite edit category + * + * @var UrlrewriteEdit + */ + protected $urlRewriteEdit; + + /** + * Main page of url rewrite + * + * @var UrlrewriteIndex + */ + protected $urlRewriteIndex; + + /** + * Inject page + * + * @param UrlrewriteEdit $urlRewriteEdit + * @param UrlrewriteIndex $urlRewriteIndex + * @param FixtureFactory $fixtureFactory + * @return array + */ + public function __inject( + UrlrewriteEdit $urlRewriteEdit, + UrlRewriteIndex $urlRewriteIndex, + FixtureFactory $fixtureFactory + ) { + $this->urlRewriteEdit = $urlRewriteEdit; + $this->urlRewriteIndex = $urlRewriteIndex; + $category = $fixtureFactory->createByCode( + 'catalogCategoryEntity', + ['dataSet' => 'default_subcategory'] + ); + $category->persist(); + return ['category' => $category]; + } + + /** + * Test check create category rewrites + * + * @param UrlRewrite $urlRewrite + * @param CatalogCategoryEntity $category + * @return void + */ + public function testCreateCategoryRewrites(UrlRewrite $urlRewrite, CatalogCategoryEntity $category) + { + //Steps + $this->urlRewriteIndex->open(); + $this->urlRewriteIndex->getPageActionsBlock()->addNew(); + $this->urlRewriteEdit->getTreeBlock()->selectCategory($category->getName()); + $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite); + $this->urlRewriteEdit->getPageMainActions()->save(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewritesEntityTest/testCreateCategoryRewrites.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewritesEntityTest/testCreateCategoryRewrites.csv new file mode 100644 index 0000000000000000000000000000000000000000..ac49d009b06ea2a546b38d4c38534ab6faa222e0 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewritesEntityTest/testCreateCategoryRewrites.csv @@ -0,0 +1,4 @@ +"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/options";"urlRewrite/data/description";"constraint" +"Main Website/Main Website Store/Default Store View";"test_request%isolation%";"No";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid" +"Main Website/Main Website Store/Default Store View";"request_path%isolation%";"Temporary (302)";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCategoryRedirect" +"Main Website/Main Website Store/Default Store View";"request_path%isolation%";"Permanent (301)";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCategoryRedirect" diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/Urlrewrite/ProductTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/ProductTest.php similarity index 87% rename from dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/Urlrewrite/ProductTest.php rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/ProductTest.php index 99fec8fd232c849937eae07c0c84c2d4f8888e55..936f8235afe2a5931c306ad77c1e72d6e94c5b8f 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/Urlrewrite/ProductTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/ProductTest.php @@ -22,16 +22,15 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backend\Test\TestCase\Urlrewrite; +namespace Magento\UrlRewrite\Test\TestCase; use Mtf\Factory\Factory; use Mtf\TestCase\Functional; -use Magento\Backend\Test\Fixture\Urlrewrite\Product; +use Magento\UrlRewrite\Test\Fixture\UrlRewriteProduct; /** * Class UrlrewriteTest * Product URL rewrite creation test - * */ class ProductTest extends Functional { @@ -42,28 +41,28 @@ class ProductTest extends Functional */ public function testUrlRewriteCreation() { - /** @var Product $urlRewriteProduct */ - $urlRewriteProduct = Factory::getFixtureFactory()->getMagentoBackendUrlrewriteProduct(); + /** @var UrlRewriteProduct $urlRewriteProduct */ + $urlRewriteProduct = Factory::getFixtureFactory()->getMagentoUrlRewriteUrlRewriteProduct(); $urlRewriteProduct->switchData('product_with_temporary_redirect'); //Pages & Blocks $urlRewriteGridPage = Factory::getPageFactory()->getAdminUrlrewriteIndex(); $pageActionsBlock = $urlRewriteGridPage->getPageActionsBlock(); $urlRewriteEditPage = Factory::getPageFactory()->getAdminUrlrewriteEdit(); - $categoryTreeBlock = $urlRewriteEditPage->getCategoryTreeBlock(); + $categoryTreeBlock = $urlRewriteEditPage->getTreeBlock(); $productGridBlock = $urlRewriteEditPage->getProductGridBlock(); $typeSelectorBlock = $urlRewriteEditPage->getUrlRewriteTypeSelectorBlock(); - $urlRewriteInfoForm = $urlRewriteEditPage->getUrlRewriteInformationForm(); + $urlRewriteInfoForm = $urlRewriteEditPage->getFormBlock(); //Steps Factory::getApp()->magentoBackendLoginUser(); $urlRewriteGridPage->open(); - $pageActionsBlock->addNewUrlRewrite(); + $pageActionsBlock->addNew(); $typeSelectorBlock->selectType($urlRewriteProduct->getUrlRewriteType()); $productGridBlock->searchAndSelect(array('sku' => $urlRewriteProduct->getProductSku())); $categoryTreeBlock->selectCategory($urlRewriteProduct->getCategoryName()); $urlRewriteInfoForm->fill($urlRewriteProduct); - $urlRewriteEditPage->getActionsBlock()->save(); + $urlRewriteEditPage->getPageMainActions()->save(); $this->assertContains( 'The URL Rewrite has been saved.', $urlRewriteGridPage->getMessagesBlock()->getSuccessMessages() diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/constraint.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/constraint.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ca992fbdc011809ae1cb06bc49192d5f078d377 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/constraint.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<constraint> + <assertUrlRewriteInGrid module="Magento_UrlRewrite"> + <severeness>low</severeness> + <require> + <urlRewriteIndex class="Magento\UrlRewrite\Test\Fixture\UrlRewriteCategory"/> + <urlRewriteCategory class="Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex"/> + </require> + </assertUrlRewriteInGrid> + <assertUrlRewriteSaveMessage module="Magento_UrlRewrite"> + <severeness>low</severeness> + </assertUrlRewriteSaveMessage> + <assertUrlRewriteCategoryRedirect module="Magento_UrlRewrite"> + <severeness>low</severeness> + </assertUrlRewriteCategoryRedirect> +</constraint> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/etc/global/fixture.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/fixture.xml similarity index 64% rename from dev/tests/functional/tests/app/Magento/Backend/Test/etc/global/fixture.xml rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/fixture.xml index b1039e6ccd9c1a232a16a6bda51c419e30e0713f..e88ee8df4bd7ce8edf7061e05eb0c209f009c55f 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/etc/global/fixture.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/fixture.xml @@ -24,27 +24,7 @@ */ --> <fixture> - <adminSuperUser module="Magento_Backend"> - <type>flat</type> - <entity_type>admin_user</entity_type> - <collection>Magento\User\Model\Resource\User\Collection</collection> - <identifier>username</identifier> - <fields> - <id> - <attribute_code>id</attribute_code> - <backend_type>virtual</backend_type> - </id> - </fields> - <data_set> - <firstname /> - <lastname /> - <email /> - <username /> - <password /> - </data_set> - <data_config /> - </adminSuperUser> - <UrlRewriteCategory module="Magento_Backend"> + <urlRewrite module="Magento_UrlRewrite"> <type>virtual</type> <entity_type>core_url_rewrite</entity_type> <collection>Magento\UrlRewrite\Model\Resource\UrlRewrite\Collection</collection> @@ -55,7 +35,7 @@ <backend_type>virtual</backend_type> </id> </fields> - <data_set /> - <data_config /> - </UrlRewriteCategory> + <data_set/> + <data_config/> + </urlRewrite> </fixture> diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/page.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/page.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e1e33bb730f44a15a9209cbd00d91b71bf7999b --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/global/page.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<page> + <urlrewriteIndex> + <mca>admin/urlrewrite/index</mca> + <area>adminhtml</area> + <class>Magento\UrlRewrite\Test\Page\Adminhtml\UrlrewriteIndex</class> + </urlrewriteIndex> + <urlrewriteEdit> + <mca>admin/urlrewrite/edit</mca> + <area>adminhtml</area> + <class>Magento\UrlRewrite\Test\Page\Adminhtml\UrlrewriteEdit</class> + </urlrewriteEdit> +</page> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Edit.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Edit.php index bd33825f2dced0795f9b00c66573c043ac138944..46e6b55a578c2b3b33c23defd30b884516245235 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Edit.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/Edit.php @@ -29,8 +29,6 @@ use Magento\Backend\Test\Block\Widget\FormTabs; /** * Class Edit * Role edit form page - * - * @package Magento\User\Test\Block\Adminhtml\Role */ class Edit extends FormTabs { diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/PageActions.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/PageActions.php index 40fea7be4f42fc1f66977166969a57c43a10bc5b..87745d5ed3aec7d3f59ddeffe54f16cd54660fee 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/PageActions.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/Role/PageActions.php @@ -29,8 +29,6 @@ use Magento\Backend\Test\Block\FormPageActions; /** * Class PageActions * PageActions for the role edit page - * - * @package Magento\User\Test\Block\Adminhtml\Role */ class PageActions extends FormPageActions { @@ -39,5 +37,12 @@ class PageActions extends FormPageActions * * @var string */ - protected $saveButton = '.save-role'; + protected $saveButton = '[data-ui-id="page-actions-toolbar-savebutton"]'; + + /** + * "Delete" button + * + * @var string + */ + protected $deleteButton = '[data-ui-id="page-actions-toolbar-deletebutton"]'; } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/RoleGrid.php b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/RoleGrid.php index 62e9fb9d2be0b14ad14e8864ec446ff09b2fa7e0..42199dc858d21687b35d36cd785dd617617f75e9 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/RoleGrid.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Block/Adminhtml/RoleGrid.php @@ -47,4 +47,11 @@ class RoleGrid extends Grid 'selector' => '#roleGrid_filter_role_name' ] ]; + + /** + * Locator value for link in action column + * + * @var string + */ + protected $editLink = '[data-column="role_name"]'; } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnRole.php new file mode 100644 index 0000000000000000000000000000000000000000..b595ec336ceb07ff5715270ec0d1e0ee462c849f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertImpossibleDeleteYourOwnRole.php @@ -0,0 +1,71 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\Constraint; + +use Mtf\Constraint\AbstractConstraint; +use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; + +/** + * Class AssertRoleSuccessSaveMessage + */ +class AssertImpossibleDeleteYourOwnRole extends AbstractConstraint +{ + const ERROR_MESSAGE = 'You cannot delete self-assigned roles.'; + + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Asserts that error message equals to expected message. + * + * @param UserRoleEditRole $rolePage + * @return void + */ + public function processAssert(UserRoleEditRole $rolePage) + { + $errorMessage = $rolePage->getMessagesBlock()->getErrorMessages(); + \PHPUnit_Framework_Assert::assertEquals( + self::ERROR_MESSAGE, + $errorMessage, + 'Wrong success message is displayed.' + . "\nExpected: " . self::ERROR_MESSAGE + . "\nActual: " . $errorMessage + ); + } + + /** + * Returns message if equals to expected message. + * + * @return string + */ + public function toString() + { + return '"You cannot delete self-assigned roles." message on EditRole page is correct.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php index ec96db7014d596ff5708b0a3f61477a1996393df..57a571c9e2867255d1b5700a2c2e50b611bfe356 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleInGrid.php @@ -30,8 +30,6 @@ use Magento\User\Test\Fixture\AdminUserRole; /** * Class AssertRoleInGrid - * - * @package Magento\User\Test\Constraint */ class AssertRoleInGrid extends AbstractConstraint { @@ -45,6 +43,8 @@ class AssertRoleInGrid extends AbstractConstraint /** * Asserts that saved role is present in Role Grid. * + * @param UserRoleIndex $rolePage + * @param AdminUserRole $role * @return void */ public function processAssert( diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleNotInGrid.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleNotInGrid.php new file mode 100644 index 0000000000000000000000000000000000000000..dd026340820c86fd4d59890decd9f88433cfd8a8 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleNotInGrid.php @@ -0,0 +1,71 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\Constraint; + +use Mtf\Constraint\AbstractConstraint; +use Magento\User\Test\Page\Adminhtml\UserRoleIndex; +use Magento\User\Test\Fixture\AdminUserRole; + +/** + * Class AssertRoleNotInGrid + */ +class AssertRoleNotInGrid extends AbstractConstraint +{ + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Asserts that role is not present in Role Grid. + * + * @param UserRoleIndex $rolePage + * @param AdminUserRole $role + * @return void + */ + public function processAssert( + UserRoleIndex $rolePage, + AdminUserRole $role + ) { + $filter = ['role_name' => $role->getRoleName()]; + $rolePage->open(); + \PHPUnit_Framework_Assert::assertFalse( + $rolePage->getRoleGrid()->isRowVisible($filter), + 'Role with name \'' . $role->getRoleName() . '\' is present in Roles grid.' + ); + } + + /** + * Returns success message if assert true. + * + * @return string + */ + public function toString() + { + return 'Role is absent in Roles grid.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessDeleteMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..47fe88ce8dbff9d1c38f7f16825648c8f0ca436e --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessDeleteMessage.php @@ -0,0 +1,71 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\Constraint; + +use Mtf\Constraint\AbstractConstraint; +use Magento\User\Test\Page\Adminhtml\UserRoleIndex; + +/** + * Class AssertRoleSuccessDeleteMessage + */ +class AssertRoleSuccessDeleteMessage extends AbstractConstraint +{ + const SUCCESS_MESSAGE = 'You deleted the role.'; + + /** + * Constraint severeness + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Asserts that success delete message equals to expected message. + * + * @param UserRoleIndex $rolePage + * @return void + */ + public function processAssert(UserRoleIndex $rolePage) + { + $successMessage = $rolePage->getMessagesBlock()->getSuccessMessages(); + \PHPUnit_Framework_Assert::assertEquals( + self::SUCCESS_MESSAGE, + $successMessage, + 'Wrong success message is displayed.' + . "\nExpected: " . self::SUCCESS_MESSAGE + . "\nActual: " . $successMessage + ); + } + + /** + * Returns success delete message if equals to expected message. + * + * @return string + */ + public function toString() + { + return 'Success delete message on roles page is correct.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php index ff1a4a3042f1245b97799a850474f685a49fbd24..da9a66a9453e13d6745447f6d974f1a324421df2 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertRoleSuccessSaveMessage.php @@ -29,8 +29,6 @@ use Magento\User\Test\Page\Adminhtml\UserRoleIndex; /** * Class AssertRoleSuccessSaveMessage - * - * @package Magento\User\Test\Constraint */ class AssertRoleSuccessSaveMessage extends AbstractConstraint { @@ -47,6 +45,7 @@ class AssertRoleSuccessSaveMessage extends AbstractConstraint /** * Asserts that success message equals to expected message. * + * @param UserRoleIndex $rolePage * @return void */ public function processAssert(UserRoleIndex $rolePage) diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/InvalidCredentials.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/InvalidCredentials.php index c2bd372c77626feedd45a205cee649ee85272bc3..4edd7c34e3f0267d034b3d53b711d1365f7a5598 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/InvalidCredentials.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/InvalidCredentials.php @@ -29,7 +29,6 @@ use Magento\Backend\Test\Page\AdminAuthLogin; /** * Class InvalidCredentials - * */ class InvalidCredentials extends AbstractConstraint { diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/LoginSuccess.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/LoginSuccess.php index b2ba8af1f6215df06d94d0ae370fc2dd90765e29..e0f73c3b6fce3aaa3c22e568b6c28a874c7de7b3 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/LoginSuccess.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/LoginSuccess.php @@ -30,7 +30,6 @@ use Magento\User\Test\Fixture\AdminUserInjectable; /** * Class LoginSuccess - * */ class LoginSuccess extends AbstractConstraint { diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.php index 17caca0f617efb81682783c52612348bc76fda5e..c45c17571bddf6ab4a405a1fb59f7c5f80be3ec8 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.php @@ -28,7 +28,6 @@ use Mtf\Fixture\InjectableFixture; /** * Class AdminUserInjectable - * */ class AdminUserInjectable extends InjectableFixture { @@ -43,11 +42,12 @@ class AdminUserInjectable extends InjectableFixture protected $handlerInterface = 'Magento\User\Test\Handler\AdminUser\AdminUserInterface'; protected $defaultDataSet = [ - 'username' => 'admin', + 'username' => 'customAdmin%isolation%', + 'firstname' => 'FirstName%isolation%', + 'lastname' => 'LastName%isolation%', + 'email' => 'email%isolation%@example.com', 'password' => '123123q', - 'created' => null, - 'is_active' => null, - 'interface_locale' => null, + 'password_confirmation' => '123123q', ]; protected $user_id = [ @@ -178,6 +178,11 @@ class AdminUserInjectable extends InjectableFixture 'input' => '', ]; + protected $role_id = [ + 'attribute_code' => 'role_id', + 'backend_type' => 'virtual', + ]; + public function getUserId() { return $this->getData('user_id'); @@ -257,4 +262,9 @@ class AdminUserInjectable extends InjectableFixture { return $this->getData('interface_locale'); } + + public function getRoleId() + { + return $this->getData('role_id'); + } } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.xml b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.xml index c8a07cb73014afac6a3580deb0f56c8d62a3e462..3f24c9313fd522d0dd3d65bc66650bf1dcf870cb 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserInjectable.xml @@ -141,6 +141,10 @@ <default_value>en_US</default_value> <input></input> </interface_locale> + <role_id> + <attribute_code>role_id</attribute_code> + <backend_type>virtual</backend_type> + </role_id> </fields> <repository_class>Magento\User\Test\Repository\AdminUserInjectable</repository_class> <handler_interface>Magento\User\Test\Handler\AdminUser\AdminUserInterface</handler_interface> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php index e19d3c80dd79dc5fba42acae0eabf2b5e3dc34fa..b011fa3eeb68b4f65cea9bebb7a0583bd640a785 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php @@ -28,8 +28,6 @@ use Mtf\Fixture\InjectableFixture; /** * Class AdminUserRole - * - * @package Magento\User\Test\Fixture */ class AdminUserRole extends InjectableFixture { diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/forbidden_without_php.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUser/AdminUserInterface.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/forbidden_without_php.php rename to dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUser/AdminUserInterface.php index c2d5c6f8af57e25e12a2389e1c7114cd53fdffd0..efc58626423be2a58201b3673ab5b60194c5f533 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/forbidden_without_php.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUser/AdminUserInterface.php @@ -22,4 +22,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -return array('', 'txt'); +namespace Magento\User\Test\Handler\AdminUser; + +use Mtf\Handler\HandlerInterface; + +/** + * Interface AdminUserInterface + */ +interface AdminUserInterface extends HandlerInterface +{ + // +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUser/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUser/Curl.php new file mode 100644 index 0000000000000000000000000000000000000000..33deba9d62617c63b0fea07dc5a2cb9569c8554b --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUser/Curl.php @@ -0,0 +1,72 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\Handler\AdminUser; + +use Mtf\Fixture\FixtureInterface; +use Mtf\Handler\Curl as AbstractCurl; +use Mtf\Util\Protocol\CurlInterface; +use Mtf\Util\Protocol\CurlTransport; +use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Mtf\System\Config; +use Magento\Backend\Test\Handler\Pagination; + +/** + * Class Curl + * Creates Admin User Entity + */ +class Curl extends AbstractCurl implements AdminUserInterface +{ + /** + * Curl creation of Admin User + * + * @param FixtureInterface $fixture + * @return array|mixed + * @throws \Exception + */ + public function persist(FixtureInterface $fixture = null) + { + $data = $fixture->getData(); + $data['roles[]'] = $fixture->getRoleId(); + unset($data['role_id']); + + $url = $_ENV['app_backend_url'] . 'admin/user/save/active_tab/main_section/'; + $curl = new BackendDecorator(new CurlTransport(), new Config); + $curl->addOption(CURLOPT_HEADER, 1); + $curl->write(CurlInterface::POST, $url, '1.0', array(), $data); + $response = $curl->read(); + $curl->close(); + + if (!strpos($response, 'data-ui-id="messages-message-success"')) { + throw new \Exception("Admin user entity creating by curl handler was not successful! Response: $response"); + } + + $url = 'admin/user/roleGrid/sort/user_id/dir/desc'; + $regExpPattern = '/class=\"\scol\-id col\-user_id\W*>\W+(\d+)\W+<\/td>\W+<td[\w\s\"=\-]*?>\W+?' + . $data['username'] . '/siu'; + $pagination = new Pagination($url, $regExpPattern); + + return ['user_id' => $pagination->getId()]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/constructor_exception/forbidden.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/AdminUserRoleInterface.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/constructor_exception/forbidden.php rename to dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/AdminUserRoleInterface.php index 609634934fe2e931f6115ff0bebbedf5b9e886b1..76ce3e3152851bc00cf0d109163469face81cba6 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/constructor_exception/forbidden.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/AdminUserRoleInterface.php @@ -22,4 +22,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -return array('forbidden1', 'forbidden2', 'forbidden3', 'conflict1', 'conflict2'); +namespace Magento\User\Test\Handler\AdminUserRole; + +use Mtf\Handler\HandlerInterface; + +/** + * Interface AdminUserRoleInterface + */ +interface AdminUserRoleInterface extends HandlerInterface +{ + // +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php new file mode 100644 index 0000000000000000000000000000000000000000..4abace1c4c32175b04ab1e43c95932121041f1bb --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/AdminUserRole/Curl.php @@ -0,0 +1,77 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\Handler\AdminUserRole; + +use Magento\User\Test\Handler\AdminUserRole\AdminUserRoleInterface; +use Magento\Backend\Test\Handler\Pagination; +use Magento\User\Test\Page\Adminhtml\UserRoleIndex; +use Mtf\Fixture\FixtureInterface; +use Mtf\Handler\Curl as AbstractCurl; +use Mtf\Util\Protocol\CurlInterface; +use Mtf\Util\Protocol\CurlTransport; +use Mtf\Util\Protocol\CurlTransport\BackendDecorator; +use Mtf\System\Config; + +/** + * Class Curl + * Creates Admin User role + */ +class Curl extends AbstractCurl implements AdminUserRoleInterface +{ + /** + * Curl creation of Admin User Role + * + * @param FixtureInterface $fixture + * @return array|mixed + * @throws \Exception + */ + public function persist(FixtureInterface $fixture = null) + { + $data = $fixture->getData(); + $data['rolename'] = $data['role_name']; + unset($data['role_name']); + $data['all'] = ($data['resource_access'] == 'All') ? '1' : '0'; + unset($data['resource_access']); + $data['gws_is_all'] = (isset($data['gws_is_all'])) ? $data['gws_is_all'] : '1'; + $url = $_ENV['app_backend_url'] . 'admin/user_role/saverole/active_tab/info/'; + $curl = new BackendDecorator(new CurlTransport(), new Config); + $curl->addOption(CURLOPT_HEADER, 1); + $curl->write(CurlInterface::POST, $url, '1.0', array(), $data); + $response = $curl->read(); + $curl->close(); + + if (!strpos($response, 'data-ui-id="messages-message-success"')) { + throw new \Exception("Role creating by curl handler was not successful! Response: $response"); + } + + $url = 'admin/user_role/roleGrid/sort/role_id/dir/desc/'; + $regExpPattern = '/class=\"\scol\-id col\-role_id\W*>\W+(\d+)\W+<\/td>\W+<td[\w\s\"=\-]*?>\W+?' + . $data['rolename'] . '/siu'; + + $pagination = new Pagination($url, $regExpPattern); + + return ['role_id' => $pagination->getId()]; + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.php index f0700c395e8ae6b88b67e4a60c80399ccf4d26d3..bf2b2b958b92f807b1f60b1b937daa7985dc1602 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.php @@ -28,8 +28,6 @@ use Mtf\Page\BackendPage; /** * Class UserRoleEditRole - * - * @package Magento\User\Test\Page\Adminhtml */ class UserRoleEditRole extends BackendPage { @@ -48,6 +46,12 @@ class UserRoleEditRole extends BackendPage 'locator' => '[id="page:main-container"]', 'strategy' => 'css selector', ], + 'messagesBlock' => [ + 'name' => 'messagesBlock', + 'class' => 'Magento\Core\Test\Block\Messages', + 'locator' => '#messages', + 'strategy' => 'css selector', + ], ]; /** @@ -65,4 +69,12 @@ class UserRoleEditRole extends BackendPage { return $this->getBlockInstance('roleFormTabs'); } + + /** + * @return \Magento\Core\Test\Block\Messages + */ + public function getMessagesBlock() + { + return $this->getBlockInstance('messagesBlock'); + } } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.xml b/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.xml index 0f9ff486f6d61f93f141b4ec1d9f59cc828f67e5..a4c60f63b0d338a6998fa03aed77ae056b582c72 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleEditRole.xml @@ -36,4 +36,10 @@ <locator>[id="page:main-container"]</locator> <strategy>css selector</strategy> </block> + <block> + <name>messagesBlock</name> + <class>Magento\Core\Test\Block\Messages</class> + <locator>#messages</locator> + <strategy>css selector</strategy> + </block> </page> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleIndex.php b/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleIndex.php index b4a81e25238cf8f4a4a32165766853c02821086f..d8435f0fb8964c87c2bddad754dc1ec83f1110a1 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleIndex.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Page/Adminhtml/UserRoleIndex.php @@ -28,8 +28,6 @@ use Mtf\Page\BackendPage; /** * Class UserRoleIndex - * - * @package Magento\User\Test\Page\Adminhtml */ class UserRoleIndex extends BackendPage { @@ -51,7 +49,7 @@ class UserRoleIndex extends BackendPage 'messagesBlock' => [ 'name' => 'messagesBlock', 'class' => 'Magento\Core\Test\Block\Messages', - 'locator' => '.messages', + 'locator' => '#messages', 'strategy' => 'css selector', ], ]; diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserInjectable.php b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserInjectable.php new file mode 100644 index 0000000000000000000000000000000000000000..7dd1a130998232c6b3f974c82ddd3f6cf74a41dc --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserInjectable.php @@ -0,0 +1,63 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\Repository; + +use Mtf\Repository\AbstractRepository; + +/** + * Class Admin User Repository + * + */ +class AdminUserInjectable extends AbstractRepository +{ + /* + * @constructor + * @param array $defaultConfig + * @param array $defaultData + */ + public function __construct(array $defaultConfig = [], array $defaultData = []) + { + $this->_data['custom_admin'] = [ + 'username' => 'AdminUser%isolation%', + 'firstname' => 'FirstName%isolation%', + 'lastname' => 'LastName%isolation%', + 'email' => 'email%isolation%@example.com', + 'password' => '123123q', + 'password_confirmation' => '123123q', + 'user_role' => 'user_role%isolation%' + ]; + + $this->_data['default_admin'] = [ + 'username' => 'admin', + 'firstname' => 'FirstName%isolation%', + 'lastname' => 'LastName%isolation%', + 'email' => 'email%isolation%@example.com', + 'password' => '123123q', + 'password_confirmation' => '123123q', + 'user_role' => 'Administrators', + 'user_id' => '1' + ]; + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php new file mode 100644 index 0000000000000000000000000000000000000000..c162f8898a877f6d80c1a44bc405a8c4d3485195 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php @@ -0,0 +1,45 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\Repository; + +use Mtf\Repository\AbstractRepository; + +/** + * Class AdminUserRole + */ +class AdminUserRole extends AbstractRepository +{ + /** + * @param array $defaultConfig + * @param array $defaultData + */ + public function __construct(array $defaultConfig = [], array $defaultData = []) + { + $this->_data['default'] = [ + 'role_name' => 'RoleName%isolation%', + 'resource_access' => 'All' + ]; + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..292b155242f023231d0786d7bbcc45d284ee3c38 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php @@ -0,0 +1,153 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\User\Test\TestCase; + +use Magento\Backend\Test\Page\AdminAuthLogin; +use Magento\Backend\Test\Page\Dashboard; +use Magento\User\Test\Fixture\AdminUserInjectable; +use Magento\User\Test\Fixture\AdminUserRole; +use Magento\User\Test\Page\Adminhtml\UserRoleIndex; +use Magento\User\Test\Page\Adminhtml\UserRoleEditRole; +use Mtf\Fixture\FixtureFactory; +use Mtf\TestCase\Injectable; + +/** + * Test Creation for DeleteUserRoleEntity + * + * Test Flow: + * Preconditions: + * 1.Create new admin user and assign it to new role. + * Steps: + * 1. Log in as admin user from data set. + * 2. Go to System>Permissions>User Roles + * 3. Open role created in precondition + * 4. Click "Delete Role" button + * 5. Perform all assertions + * + * @group ACL_(MX) + * @ZephyrId MAGETWO-23926 + */ +class DeleteUserRoleEntityTest extends Injectable +{ + /** + * @var UserRoleIndex + */ + protected $userRoleIndex; + + /** + * @var UserRoleEditRole + */ + protected $userRoleEditRole; + + /** + * @var AdminAuthLogin + */ + protected $adminAuthLogin; + + /** + * @var Dashboard + */ + protected $dashboard; + + /** + * Preconditions for test + * @param FixtureFactory $fixtureFactory + * @return array + */ + public function __prepare(FixtureFactory $fixtureFactory) + { + $role = $fixtureFactory->createByCode('adminUserRole', ['dataSet' => 'default']); + $role->persist(); + $role_id = $role->getData('role_id'); + $adminUser = $fixtureFactory->createByCode( + 'adminUserInjectable', + [ + 'dataSet' => 'custom_admin', + 'data' => ['role_id' => $role_id] + ] + ); + $adminUser->persist(); + + return [ + 'role' => $role, + 'adminUser' => $adminUser + ]; + } + + /** + * @param UserRoleIndex $userRoleIndex + * @param UserRoleEditRole $userRoleEditRole + * @param AdminAuthLogin $adminAuthLogin + * @param Dashboard $dashboard + */ + public function __inject( + UserRoleIndex $userRoleIndex, + UserRoleEditRole $userRoleEditRole, + AdminAuthLogin $adminAuthLogin, + Dashboard $dashboard + ) { + $this->userRoleIndex = $userRoleIndex; + $this->userRoleEditRole = $userRoleEditRole; + $this->adminAuthLogin = $adminAuthLogin; + $this->dashboard = $dashboard; + } + + /** + * Runs Delete User Role Entity test. + * + * @param AdminUserRole $role + * @param AdminUserInjectable $adminUser + * @param string $isDefaultUser + * @return void + */ + public function testDeleteAdminUserRole( + AdminUserRole $role, + AdminUserInjectable $adminUser, + $isDefaultUser + ) { + $filter = [ + 'role_name' => $role->getRoleName() + ]; + //Steps + if ($isDefaultUser == 0) { + $this->adminAuthLogin->open(); + $this->adminAuthLogin->getLoginBlock()->fill($adminUser); + $this->adminAuthLogin->getLoginBlock()->submit(); + } + $this->userRoleIndex->open(); + $this->userRoleIndex->getRoleGrid()->searchAndOpen($filter); + $this->userRoleEditRole->getPageActions()->delete(); + } + + /** + * Logout Admin User from account + * + * return void + */ + public function tearDown() + { + $this->dashboard->getAdminPanelHeader()->logOut(); + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest/testDeleteAdminUserRole.csv b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest/testDeleteAdminUserRole.csv new file mode 100644 index 0000000000000000000000000000000000000000..3780cca09eda9b11460c2c9cacde6364e549e767 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest/testDeleteAdminUserRole.csv @@ -0,0 +1,3 @@ +"isDefaultUser";"constraint" +"0";"assertImpossibleDeleteYourOwnRole, assertRoleInGrid" +"1";"assertRoleSuccessDeleteMessage, assertRoleNotInGrid" diff --git a/dev/tests/functional/tests/app/Magento/User/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/User/Test/etc/curl/di.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b731bc10bd55fec01cec726aeabe0dcb29be6c4 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/etc/curl/di.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" ?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/ObjectManager/etc/config.xsd"> + <preference for="Magento\User\Test\Handler\AdminUserRole\AdminUserRoleInterface" type="\Magento\User\Test\Handler\AdminUserRole\Curl" /> + <preference for="Magento\User\Test\Handler\AdminUser\AdminUserInterface" type="\Magento\User\Test\Handler\AdminUser\Curl" /> +</config> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/etc/global/constraint.xml b/dev/tests/functional/tests/app/Magento/User/Test/etc/global/constraint.xml index f11707ddacb4c2625533f9f2b5046522797c860f..d35518ac3c7f1cb133dc7bdd6eab66d4bbfef729 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/etc/global/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/etc/global/constraint.xml @@ -42,10 +42,28 @@ <rolePage class="Magento\User\Test\Page\Adminhtml\UserRoleIndex" /> </require> </assertRoleSuccessSaveMessage> + <assertRoleSuccessDeleteMessage module="Magento_User"> + <severeness>low</severeness> + <require> + <rolePage class="Magento\User\Test\Page\Adminhtml\UserRoleIndex" /> + </require> + </assertRoleSuccessDeleteMessage> <assertRoleInGrid module="Magento_User"> <severeness>low</severeness> <require> <rolePage class="Magento\User\Test\Page\Adminhtml\UserRoleIndex" /> </require> </assertRoleInGrid> + <assertRoleNotInGrid module="Magento_User"> + <severeness>low</severeness> + <require> + <rolePage class="Magento\User\Test\Page\Adminhtml\UserRoleIndex" /> + </require> + </assertRoleNotInGrid> + <assertImpossibleDeleteYourOwnRole module="Magento_User"> + <severeness>low</severeness> + <require> + <rolePage class="Magento\User\Test\Page\Adminhtml\UserRoleEditRole" /> + </require> + </assertImpossibleDeleteYourOwnRole> </constraint> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/etc/global/fixture.xml b/dev/tests/functional/tests/app/Magento/User/Test/etc/global/fixture.xml index 7358eadc454d19864b0879f53b6e54fdd5934ba3..529ab99fd95c9f8e82188f1a346c7240667a9e7c 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/etc/global/fixture.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/etc/global/fixture.xml @@ -29,6 +29,11 @@ <entity_type>admin_user</entity_type> <collection>Magento\User\Model\Resource\User\Collection</collection> </adminUser> + <adminUserInjectable module="Magento_User"> + <type>flat</type> + <entity_type>admin_user</entity_type> + <collection>Magento\User\Model\Resource\User\Collection</collection> + </adminUserInjectable> <adminUserRole module="Magento_User"> <type>flat</type> <entity_type>admin_role</entity_type> diff --git a/dev/tests/functional/tests/app/Magento/User/Test/etc/global/page.xml b/dev/tests/functional/tests/app/Magento/User/Test/etc/global/page.xml index 6a38cc6d0b0f7b8404fdbbf2a2e9e2054ef9e427..e5a2ec81677b21ebc2986adcda30b298c95ec1a3 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/etc/global/page.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/etc/global/page.xml @@ -34,4 +34,8 @@ <area>adminhtml</area> <class>Magento\User\Test\Page\Adminhtml\UserRoleEditRole</class> </adminUserRoleNew> + <adminAuthLogin> + <mca>admin/auth/login</mca> + <class>Magento\User\Test\Page\Adminhtml\AdminAuthLogin</class> + </adminAuthLogin> </page> \ No newline at end of file diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php index e1fa69567bb53be2feb42dd4e6badbf13b3da009..a0d14965a78e149e07e5291a6ebd2d066dcb2ab6 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Application.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php @@ -147,10 +147,10 @@ class Application Filesystem::VAR_DIR => array('path' => $installDir), Filesystem::MEDIA_DIR => array('path' => "{$installDir}/media"), Filesystem::STATIC_VIEW_DIR => array('path' => "{$installDir}/pub_static"), - Filesystem::PUB_VIEW_CACHE_DIR => array('path' => "{$installDir}/pub_cache"), Filesystem::GENERATION_DIR => array('path' => $generationDir), Filesystem::CACHE_DIR => array('path' => $installDir . '/cache'), Filesystem::LOG_DIR => array('path' => $installDir . '/log'), + Filesystem::THEMES_DIR => array('path' => BP . '/app/design'), ), \Magento\Framework\App\State::PARAM_MODE => $appMode ); diff --git a/dev/tests/integration/framework/Magento/TestFramework/Entity.php b/dev/tests/integration/framework/Magento/TestFramework/Entity.php index ac1f6d0462b4db7d22ff2bd7a88f47961e5c02bc..f463807af47623c06ded9175af510b64fb1c9822 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Entity.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Entity.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Class that implements CRUP tests for \Magento\Framework\Model\AbstractModel based objects - */ namespace Magento\TestFramework; +/** + * Class that implements CRUD tests for \Magento\Core\Model\AbstractModel based objects + */ class Entity { /** @@ -34,14 +34,39 @@ class Entity */ protected $_model; + /** + * @var array + */ protected $_updateData; - public function __construct(\Magento\Framework\Model\AbstractModel $model, array $updateData) + /** + * @var string + */ + protected $_modelClass; + + /** + * @param \Magento\Framework\Model\AbstractModel $model + * @param array $updateData + * @param string|null $modelClass Class of a model to use when creating new instances, or NULL for auto-detection + * @throws \InvalidArgumentException + */ + public function __construct(\Magento\Framework\Model\AbstractModel $model, array $updateData, $modelClass = null) { - $this->_model = $model; - $this->_updateData = $updateData; + $this->_model = $model; + $this->_updateData = $updateData; + if ($modelClass) { + if (!$model instanceof $modelClass) { + throw new \InvalidArgumentException("Class '$modelClass' is irrelevant to the tested model."); + } + $this->_modelClass = $modelClass; + } else { + $this->_modelClass = get_class($this->_model); + } } + /** + * Test Create -> Read -> Update -> Delete operations + */ public function testCrud() { $this->_testCreate(); @@ -56,12 +81,13 @@ class Entity } /** + * Retrieve new instance of not yet loaded model + * * @return \Magento\Framework\Model\AbstractModel */ protected function _getEmptyModel() { - $modelClass = get_class($this->_model); - return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($modelClass); + return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($this->_modelClass); } protected function _testCreate() diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php index 26594a3536e09d6778f3fb94513eb25509e00936..318fd9f7419cdb131726536571d0dff63e21b813 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php +++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php @@ -129,11 +129,6 @@ class ObjectManagerFactory extends \Magento\Framework\App\ObjectManagerFactory $this->_primaryConfigData = array_replace( parent::_loadPrimaryConfig($directoryList, $argumentMapper, $appMode), array( - 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy' => array( - 'arguments' => array( - 'canSaveMap' => false - ) - ), 'default_setup' => array('type' => 'Magento\TestFramework\Db\ConnectionAdapter') ) ); diff --git a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php index 34de549f0db3aab0b65ee76a24eab6dc31c42379..eea29a646afd327b9f92a69f5bb000a531f52fc2 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php @@ -34,7 +34,7 @@ class StaticProperties * * @var array */ - protected static $_cleanableFolders = array('/app/code/', '/dev/tests/', '/lib/'); + protected static $_cleanableFolders = array('/app/code/', '/dev/tests/', '/lib/internal/'); /** * Classes to exclude from static variables cleaning diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/EntityTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/EntityTest.php index 512406fa4f9acc092549053a61a15ade1b07c412..45f54541a4ffe63b584d9d7b2c5b593d44ac521f 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/EntityTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/EntityTest.php @@ -30,6 +30,17 @@ class EntityTest extends \PHPUnit_Framework_TestCase */ protected $_model; + protected function setUp() + { + $this->_model = $this->getMock( + 'Magento\Framework\Model\AbstractModel', + array('load', 'save', 'delete', 'getIdFieldName', '__wakeup'), + array(), + '', + false + ); + } + /** * Callback for save method in mocked model */ @@ -60,6 +71,15 @@ class EntityTest extends \PHPUnit_Framework_TestCase $this->_model->setId(null); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Class 'stdClass' is irrelevant to the tested model + */ + public function testConstructorIrrelevantModelClass() + { + new \Magento\TestFramework\Entity($this->_model, array(), 'stdClass'); + } + public function crudDataProvider() { return array( @@ -75,22 +95,11 @@ class EntityTest extends \PHPUnit_Framework_TestCase { $this->setExpectedException($expectedException); - $this->_model = $this->getMock( - 'Magento\Framework\Model\AbstractModel', - array('load', 'save', 'delete', 'getIdFieldName', '__wakeup'), - array(), - '', - false - ); - - $this->_model->expects($this->atLeastOnce())->method('load'); - $this->_model->expects( - $this->atLeastOnce() - )->method( - 'save' - )->will( - $this->returnCallback(array($this, $saveCallback)) - ); + $this->_model->expects($this->atLeastOnce()) + ->method('load'); + $this->_model->expects($this->atLeastOnce()) + ->method('save') + ->will($this->returnCallback(array($this, $saveCallback))); /* It's important that 'delete' should be always called to guarantee the cleanup */ $this->_model->expects( $this->atLeastOnce() diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php index a9c11391e8580ce4d2de556cb403bd2b7afe3697..a1fa99936ff8e3fe9d5cdb4d81a859ba75d954ac 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php @@ -27,7 +27,4 @@ ->load(\Magento\Framework\App\Area::PART_CONFIG); $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Core\Model\Theme\Registration'); -$registration->register( - __DIR__ . '/design', - '*/*/theme.xml' -); +$registration->register('*/*/theme.xml'); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_sort_asc.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_sort_asc.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_sort_asc.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_sort_asc.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_sort_desc.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_sort_desc.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_sort_desc.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_sort_desc.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_th_bg.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_th_bg.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_th_bg.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_th_bg.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_th_onclick_bg.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_th_onclick_bg.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/grid_th_onclick_bg.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/grid_th_onclick_bg.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_left.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_left.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_left.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_left.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_left_off.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_left_off.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_left_off.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_left_off.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_right.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_right.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_right.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_right.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_right_off.gif b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_right_off.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/images/pager_arrow_right_off.gif rename to dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/web/images/pager_arrow_right_off.gif diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php index 458986b09bdb9a57ca4eb6b499ea6e39a4d1d071..75873312feb2af21f2e17c12443975a0d14dc807 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php @@ -64,45 +64,27 @@ class BaseurlTest extends \PHPUnit_Framework_TestCase array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_STATIC_URL, ''), array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_STATIC_URL, $unsecurePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_STATIC_URL, $unsecureSuffix), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_CACHE_URL, ''), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_CACHE_URL, $unsecurePlaceholder), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_CACHE_URL, $unsecureSuffix), array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_MEDIA_URL, ''), array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_MEDIA_URL, $unsecurePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_MEDIA_URL, $unsecureSuffix), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_LIB_URL, ''), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_LIB_URL, $unsecurePlaceholder), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_LIB_URL, $unsecureSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, $basePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LINK_URL, $securePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LINK_URL, $secureSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL, ''), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL, $securePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL, $secureSuffix), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL, ''), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL, $securePlaceholder), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL, $secureSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL, ''), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL, $securePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL, $secureSuffix), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL, ''), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL, $securePlaceholder), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL, $secureSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, $unsecurePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LINK_URL, $unsecurePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LINK_URL, $unsecureSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL, ''), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL, $unsecurePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL, $unsecureSuffix), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL, ''), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL, $unsecurePlaceholder), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL, $unsecureSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL, ''), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL, $unsecurePlaceholder), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL, $unsecureSuffix), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL, ''), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL, $unsecurePlaceholder), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL, $unsecureSuffix) ); } @@ -149,8 +131,6 @@ class BaseurlTest extends \PHPUnit_Framework_TestCase array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_LINK_URL, $unsecureWrongSuffix), array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_MEDIA_URL, $unsecureWrongSuffix), array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_STATIC_URL, $unsecureWrongSuffix), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_CACHE_URL, $unsecureWrongSuffix), - array(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_LIB_URL, $unsecureWrongSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, ''), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, $baseSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, $secureSuffix), @@ -160,8 +140,6 @@ class BaseurlTest extends \PHPUnit_Framework_TestCase array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LINK_URL, $secureWrongSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_MEDIA_URL, $secureWrongSuffix), array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_STATIC_URL, $secureWrongSuffix), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_CACHE_URL, $secureWrongSuffix), - array(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_LIB_URL, $secureWrongSuffix) ); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php index 05f270fc87c3e617425ad6122d4cec47d44b4020..0140d858da3d44f817639a8132438458351caf56 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php @@ -65,4 +65,33 @@ class ImageTest extends \PHPUnit_Framework_TestCase $model->getUrl() ); } + + public function testSetWatermark() + { + $inputFile = 'watermark.png'; + $expectedFile = '/somewhere/watermark.png'; + + /** @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject $viewFilesystem */ + $viewFileSystem = $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false); + $viewFileSystem->expects($this->once()) + ->method('getStaticFileName') + ->with($inputFile) + ->will($this->returnValue($expectedFile)); + + /** @var $model \Magento\Catalog\Model\Product\Image */ + $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Catalog\Model\Product\Image', ['viewFileSystem' => $viewFileSystem]); + $processor = $this->getMock( + 'Magento\Framework\Image', + ['save', 'keepAspectRatio', 'keepFrame', 'keepTransparency', 'constrainOnly', 'backgroundColor', 'quality', + 'setWatermarkPosition', 'setWatermarkImageOpacity', 'setWatermarkWidth', 'setWatermarkHeight', + 'watermark'], + array(), '', false); + $processor->expects($this->once()) + ->method('watermark') + ->with($expectedFile); + $model->setImageProcessor($processor); + + $model->setWatermark('watermark.png'); + } } diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php index dac190fb317de50585d727b619a9bb769ec9d9c8..097f30bb7ab1857210d2dc7e0368ef1c163ca234 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php @@ -55,13 +55,14 @@ class ConfigTest extends \PHPUnit_Framework_TestCase } /** - * Tests that config returns right urls going to static js library + * Tests that config returns right urls going to the published library path */ - public function testGetConfigJsUrls() + public function testGetConfigCssUrls() { $config = $this->_model->getConfig(); - $this->assertStringMatchesFormat('http://localhost/pub/lib/%s', $config->getPopupCss()); - $this->assertStringMatchesFormat('http://localhost/pub/lib/%s', $config->getContentCss()); + $publicPathPattern = 'http://localhost/pub/static/adminhtml/Magento/backend/en_US/mage/%s'; + $this->assertStringMatchesFormat($publicPathPattern, $config->getPopupCss()); + $this->assertStringMatchesFormat($publicPathPattern, $config->getContentCss()); } /** diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php index d3bc5cc7523386ad027acb70ec96941f60508b58..e725dd5f6b1eec76c6a4a888d8ec8b3ac3a7983f 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php @@ -90,7 +90,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase $session = $objectManager->get('Magento\Backend\Model\Session'); $backendUrl = $objectManager->get('Magento\Backend\Model\UrlInterface'); $imageFactory = $objectManager->get('Magento\Framework\Image\AdapterFactory'); - $viewUrl = $objectManager->get('Magento\Framework\View\Url'); + $assetRepo = $objectManager->get('Magento\Framework\View\Asset\Repository'); $imageHelper = $objectManager->get('Magento\Cms\Helper\Wysiwyg\Images'); $coreFileStorageDb = $objectManager->get('Magento\Core\Helper\File\Storage\Database'); $storageCollectionFactory = $objectManager->get('Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory'); @@ -106,7 +106,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase $coreFileStorageDb, $filesystem, $imageFactory, - $viewUrl, + $assetRepo, $storageCollectionFactory, $storageFileFactory, $storageDatabaseFactory, diff --git a/dev/tests/integration/testsuite/Magento/Contact/Controller/IndexTest.php b/dev/tests/integration/testsuite/Magento/Contact/Controller/IndexTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8c0833d11972a4fcaebe7b171b16ee55a9e27f62 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Contact/Controller/IndexTest.php @@ -0,0 +1,91 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Contact\Controller; + +/** + * Contact index controller test + */ +class IndexTest extends \Magento\TestFramework\TestCase\AbstractController +{ + public function testPostAction() + { + $params = [ + 'name' => 'customer name', + 'comment' => 'comment', + 'email' => 'user@example.com', + 'hideit' => '' + ]; + $this->getRequest()->setPost($params); + $transportBuilderMock = $this->getMock('Magento\Framework\Mail\Template\TransportBuilder', [], [], '', false); + $transportBuilderMock->expects($this->once()) + ->method('setTemplateIdentifier') + ->with($this->equalTo('contact_email_email_template')) + ->will($this->returnSelf()); + $transportBuilderMock->expects($this->once()) + ->method('setTemplateOptions') + ->with( + $this->equalTo( + [ + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, + 'store' => 1 + ] + ) + ) + ->will($this->returnSelf()); + $transportBuilderMock->expects($this->once()) + ->method('setTemplateVars') + ->will($this->returnSelf()); + $transportBuilderMock->expects($this->once()) + ->method('setFrom') + ->with($this->equalTo('custom2')) + ->will($this->returnSelf()); + $transportBuilderMock->expects($this->once()) + ->method('addTo') + ->with($this->equalTo('hello@example.com')) + ->will($this->returnSelf()); + $transportBuilderMock->expects($this->once()) + ->method('setReplyTo') + ->with($this->equalTo($params['email'])) + ->will($this->returnSelf()); + + $transportMock = $this->getMock('Magento\Framework\Mail\TransportInterface'); + $transportMock->expects($this->once())->method('sendMessage')->will($this->returnSelf()); + + $transportBuilderMock->expects($this->once()) + ->method('getTransport') + ->will($this->returnValue($transportMock)); + + $this->_objectManager->addSharedInstance( + $transportBuilderMock, + 'Magento\Framework\Mail\Template\TransportBuilder' + ); + $this->dispatch('contact/index/post'); + $this->assertSessionMessages( + $this->contains( + "Thanks for contacting us with your comments and questions. We'll respond to you very soon." + ), + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS + ); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php deleted file mode 100644 index 8b8cefbb5903db9efd885504bd982eddc1465fe9..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Core\Model; - -class TemplateTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider setDesignConfigExceptionDataProvider - * @expectedException \Magento\Framework\Exception - */ - public function testSetDesignConfigException($config) - { - // \Magento\Core\Model\Template is an abstract class - $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Email\Model\Template'); - $model->setDesignConfig($config); - } - - public function setDesignConfigExceptionDataProvider() - { - $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Store\Model\StoreManagerInterface' - )->getStore()->getId(); - return array(array(array()), array(array('area' => 'frontend')), array(array('store' => $storeId))); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml index 7658f21367dbe9a682a69bf8a18eee324214ec9d..a923d4504c1007f71259b0e7e5e7b7f3c3a13926 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Theme D</title> <version>0.0.0.1</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml index fec049e6c7d66437085ec7366d02f876c770bae1..f4a79c34c4bcd07cffc8e6c21b63fbbe3f4e5569 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Theme E</title> <version>0.0.0.1</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml index c380f6967ed7e71d94a00e9d4f10570d2cb0a809..25947ce158f5e57784e31b761069c3b071352c5e 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>0.0.0.1</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml index a894c4549ff17ec2162be76f5f80182ffa6c69e1..4b2c0cfa97e839df4a67646cd50c3394085cc4c3 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Theme G</title> <version>0.0.0.1</version> <parent>magento_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php index 4a42cf4062ad92cd9ccb361b1f2f780263fd1dbd..dfafd3b37437b9531f434d5e2c91676aa94c6534 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Variable/ConfigTest.php @@ -43,7 +43,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase public function testGetWysiwygJsPluginSrc() { $src = $this->_model->getWysiwygJsPluginSrc(); - $this->assertStringStartsWith('http://localhost/pub/lib/', $src); + $this->assertStringStartsWith('http://localhost/pub/static/adminhtml/Magento/backend/en_US/mage/adminhtml/', + $src); $this->assertStringEndsWith('editor_plugin.js', $src); } } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php index b88348a286e49ecba94afc60d9babeccb985bd7a..2e1ffc286c3135a1b43a54ad60bc800dc3afb7fa 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php @@ -43,11 +43,6 @@ class DesignTest extends \PHPUnit_Framework_TestCase */ protected $_viewConfig; - /** - * @var \Magento\Framework\View\Url - */ - protected $_viewUrl; - public static function setUpBeforeClass() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -57,8 +52,8 @@ class DesignTest extends \PHPUnit_Framework_TestCase $themeDir->delete('theme/frontend'); $themeDir->delete('theme/_merged'); - $pubLibPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::PUB_LIB_DIR); - copy($pubLibPath . '/prototype/prototype.js', $pubLibPath . '/prototype/prototype.min.js'); + $libPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::LIB_WEB); + copy($libPath . '/prototype/prototype.js', $libPath . '/prototype/prototype.min.js'); } public static function tearDownAfterClass() @@ -66,17 +61,16 @@ class DesignTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\App\Filesystem $filesystem */ $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Framework\App\Filesystem'); - $pubLibPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::PUB_LIB_DIR); - unlink($pubLibPath . '/prototype/prototype.min.js'); + $libPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::LIB_WEB); + unlink($libPath . '/prototype/prototype.min.js'); } protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_model = $objectManager->create('Magento\Framework\View\DesignInterface'); + $this->_model = $objectManager->create('Magento\\Framework\View\DesignInterface'); $this->_viewFileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); $this->_viewConfig = $objectManager->create('Magento\Framework\View\ConfigInterface'); - $this->_viewUrl = $objectManager->create('Magento\Framework\View\Url'); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); } @@ -102,7 +96,6 @@ class DesignTest extends \PHPUnit_Framework_TestCase $this->_viewFileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); $this->_viewConfig = $objectManager->create('Magento\Framework\View\ConfigInterface'); - $this->_viewUrl = $objectManager->create('Magento\Framework\View\Url'); } public function testSetGetArea() @@ -115,11 +108,8 @@ class DesignTest extends \PHPUnit_Framework_TestCase public function testSetDesignTheme() { - $this->_model->setDesignTheme('test_test'); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') - ->setAreaCode('test'); - $this->assertEquals('test', $this->_model->getArea()); - $this->assertEquals(null, $this->_model->getDesignTheme()->getThemePath()); + $this->_model->setDesignTheme('Magento/blank', 'frontend'); + $this->assertEquals('Magento/blank', $this->_model->getDesignTheme()->getThemePath()); } public function testGetDesignTheme() @@ -193,21 +183,6 @@ class DesignTest extends \PHPUnit_Framework_TestCase ); } - /** - * @param string $file - * @expectedException \Magento\Framework\Exception - * @dataProvider extractScopeExceptionDataProvider - */ - public function testExtractScopeException($file) - { - $this->_viewFileSystem->getFilename($file, array()); - } - - public function extractScopeExceptionDataProvider() - { - return array(array('::no_scope.ext'), array('../file.ext')); - } - /** * @magentoAppIsolation enabled */ @@ -251,118 +226,4 @@ class DesignTest extends \PHPUnit_Framework_TestCase } $directory->delete($relativePath); } - - /** - * @param string $appMode - * @param string $file - * @param string $result - * - * @dataProvider getViewUrlDataProvider - * - * @magentoConfigFixture current_store dev/static/sign 0 - * @magentoAppIsolation enabled - */ - public function testGetViewUrl($appMode, $file, $result) - { - $currentAppMode = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\State' - )->getMode(); - if ($currentAppMode != $appMode) { - $this->markTestSkipped("Implemented to be run in {$appMode} mode"); - } - $this->_emulateFixtureTheme(); - $this->assertEquals($result, $this->_viewUrl->getViewFileUrl($file)); - } - - /** - * @param string $appMode - * @param string $file - * @param string $result - * - * @dataProvider getViewUrlDataProvider - * - * @magentoConfigFixture current_store dev/static/sign 1 - * @magentoAppIsolation enabled - */ - public function testGetViewUrlSigned($appMode, $file, $result) - { - $currentAppMode = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\State' - )->getMode(); - if ($currentAppMode != $appMode) { - $this->markTestSkipped("Implemented to be run in {$appMode} mode"); - } - $url = $this->_viewUrl->getViewFileUrl($file); - $this->assertEquals(strpos($url, $result), 0); - $lastModified = array(); - preg_match('/.*\?(.*)$/i', $url, $lastModified); - $this->assertArrayHasKey(1, $lastModified); - $this->assertEquals(10, strlen($lastModified[1])); - $this->assertLessThanOrEqual(time(), $lastModified[1]); - $this->assertGreaterThan(1970, date('Y', $lastModified[1])); - } - - /** - * @return array - */ - public function getViewUrlDataProvider() - { - return array( - array( - \Magento\Framework\App\State::MODE_DEFAULT, - 'Magento_Theme::favicon.ico', - 'http://localhost/pub/static/frontend/test_default/en_US/Magento_Theme/favicon.ico' - ), - array( - \Magento\Framework\App\State::MODE_DEFAULT, - 'prototype/prototype.js', - 'http://localhost/pub/lib/prototype/prototype.js' - ), - array( - \Magento\Framework\App\State::MODE_DEVELOPER, - 'Magento_Theme::menu.js', - 'http://localhost/pub/static/frontend/test_default/en_US/Magento_Theme/menu.js' - ), - array( - \Magento\Framework\App\State::MODE_DEFAULT, - 'Magento_Theme::menu.js', - 'http://localhost/pub/static/frontend/test_default/en_US/Magento_Theme/menu.js' - ), - array( - \Magento\Framework\App\State::MODE_DEFAULT, - 'Magento_Catalog::widgets.css', - 'http://localhost/pub/static/frontend/test_default/en_US/Magento_Catalog/widgets.css' - ), - array( - \Magento\Framework\App\State::MODE_DEVELOPER, - 'Magento_Catalog::widgets.css', - 'http://localhost/pub/static/frontend/test_default/en_US/Magento_Catalog/widgets.css' - ) - ); - } - - public function testGetPublicFileUrl() - { - $pubLibFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\Filesystem' - )->getPath( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR - ) . '/jquery/jquery.js'; - $actualResult = $this->_viewUrl->getPublicFileUrl($pubLibFile); - $this->assertStringEndsWith('/jquery/jquery.js', $actualResult); - } - - /** - * @magentoConfigFixture current_store dev/static/sign 1 - */ - public function testGetPublicFileUrlSigned() - { - $pubLibFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\Filesystem' - )->getPath( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR - ) . '/jquery/jquery.js'; - $actualResult = $this->_viewUrl->getPublicFileUrl($pubLibFile); - $this->assertStringMatchesFormat('%a/jquery/jquery.js?%d', $actualResult); - } } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml index a3a7dd87caa6f6b4fb85a6e69bb34c5c190938a2..3b4844f8a800c8fb5e2bf4ba333e8392f9402157 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Theme One</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/file b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/web/file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/file rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/web/file diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml index a3a7dd87caa6f6b4fb85a6e69bb34c5c190938a2..3b4844f8a800c8fb5e2bf4ba333e8392f9402157 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Theme One</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/file b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/web/file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/file rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/web/file diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml index f3fa6b408496b0a1fc618e85e6fc2caff53d963e..354d902229ad8295985c2703dd7eb486d2c3fda5 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Iphone</title> <version>2.0.0.0</version> <parent>magento_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml index f9765e3a4deabf86b233b54ec947355bd697b2f0..283b844eac50ae8f512f46816da08f8b3696c207 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Cache Test Theme</title> <version>2.0.0.0</version> <parent>test_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Catalog/templates/theme_template.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Catalog/templates/theme_template.phtml diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Namespace_Module/favicon.ico b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Namespace_Module/web/favicon.ico similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Namespace_Module/favicon.ico rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Namespace_Module/web/favicon.ico diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/view.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/etc/view.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/view.xml rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/etc/view.xml index f42f6a5c8e7c265681df79486b8c26142d9d8aca..98d454efb5f5c89b58590e643a54f1631830074e 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/view.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/etc/view.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Magento_Core"> <var name="var1">Core Value1</var> </vars> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/css/styles.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/css/styles.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/css/styles.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/css/styles.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/i18n/fr_FR/logo.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/i18n/fr_FR/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/i18n/fr_FR/logo.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/i18n/fr_FR/logo.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/images/logo.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/images/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/images/logo.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/images/logo.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/images/logo_email.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/images/logo_email.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/images/logo_email.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/images/logo_email.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/js/tabs.js b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/js/tabs.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/js/tabs.js rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/js/tabs.js diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/result_source.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/result_source.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/result_source.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/result_source.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/result_source_dev.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/result_source_dev.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/result_source_dev.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/result_source_dev.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/source.less b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/source.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/source.less rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/web/source.less diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/images/rectangle.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/images/rectangle.gif deleted file mode 100644 index 893bda02b6f087c94548e93e1a41f2981eb5a151..0000000000000000000000000000000000000000 Binary files a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/images/rectangle.gif and /dev/null differ diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/images/square.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/images/square.gif deleted file mode 100644 index 86d02651b33492c67c822721830486de406e8233..0000000000000000000000000000000000000000 Binary files a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/images/square.gif and /dev/null differ diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml index 64b5a44a01eebfc52b826c93cc4442ec47c6da6c..7ed143778265bf87173ab1b3ade0f8dd25d19232 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Test Theme</title> <version>2.0.0.0</version> <parent>test_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/Fixture_Module/web/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/Fixture_Module/web/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml index fa2e08da9908322798be5dd70188d2cdbe924376..7d000c2185fd384f46b554a297b6f552b69b3324 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Custom Theme</title> <version>2.0.0.0</version> <parent>vendor_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/Namespace_Module/web/absolute_valid_module.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/Namespace_Module/web/absolute_valid_module.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/1.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/1.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/1.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/1.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/base64.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/base64.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/base64.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/base64.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/body.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/body.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/body.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/body.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/deep/recursive.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/deep/recursive.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/deep/recursive.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/deep/recursive.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/exception.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/exception.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/exception.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/exception.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/file.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/file.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/css/file.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/css/file.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/h1.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/h1.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/h1.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/h1.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/images/h2.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/images/h2.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/images/h2.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/images/h2.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/recursive.css b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/recursive.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/recursive.css rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/recursive.css diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/recursive.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/recursive.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/recursive.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/recursive.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/recursive2.gif b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/recursive2.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/recursive2.gif rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/recursive2.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/scripts.js b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/scripts.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/scripts.js rename to dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/web/scripts.js diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml b/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml index 88662378c056e6a15728cc68ebbc18392d80abdf..d8d9626360f4e9e58454e34e956ab5a474d3ad88 100644 --- a/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Core" version="1.6.0.2" /> </config> diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php deleted file mode 100644 index 8f976800c31af3a98bf6b5fdce8e780ee35da3fd..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') - ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Framework\App\Area::PART_CONFIG); -$designDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir() . '/media_for_change'; -$themeDir = $designDir . '/frontend/test_default'; -$sourcePath = dirname(__DIR__) . '/Model/_files/design/frontend/test_publication/'; - -@mkdir($themeDir . '/images', 0777, true); - -// Copy all files to fixture location -$mTime = time() - 10; -// To ensure that all files, changed later in test, will be recognized for publication -$files = array('theme.xml', 'style.css', 'sub.css', 'images/square.gif', 'images/rectangle.gif'); -foreach ($files as $file) { - copy($sourcePath . $file, $themeDir . '/' . $file); - touch($themeDir . '/' . $file, $mTime); -} - - -$appInstallDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir(); -\Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => "{$appInstallDir}/media_for_change") - ) - ) -); - -/** @var $registration \Magento\Core\Model\Theme\Registration */ -$registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Core\Model\Theme\Registration' -); -$registration->register('*/*/theme.xml'); diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php deleted file mode 100644 index 90ecef5c6a278a9facf013e9a6beed3631bcfe48..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - - -$themeDirectory = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir() . '/media_for_change'; - -\Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::VAR_DIR => array('path' => $themeDirectory) - ) - ) -); -/** @var $objectManager \Magento\Framework\ObjectManager */ -$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -/** @var $directoryWrite \Magento\Framework\Filesystem\Directory\Write */ -$directoryWrite = $objectManager->create( - 'Magento\Framework\App\Filesystem' -)->getDirectoryWrite( - \Magento\Framework\App\Filesystem::VAR_DIR -); -$directoryWrite->delete(); diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php index e7773d3602eba9fe6c85c117d71c260f5625cbf8..e9d0b37bc126967e0b16e7408931bdd8918f6242 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php @@ -35,11 +35,6 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase */ protected $_design; - /** - * @var \Magento\Framework\View\FileSystem - */ - protected $_viewFileSystem; - /** * Initialize dependencies */ @@ -54,8 +49,9 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\Framework\App\State') ->setAreaCode(\Magento\Framework\View\DesignInterface::DEFAULT_AREA); $this->_design->setDesignTheme('vendor_test'); - $this->_viewFileSystem = $objectManager->get('Magento\Framework\View\FileSystem'); - $quickStylesPath = $this->_viewFileSystem->getFilename('Magento_DesignEditor::controls/quick_styles.xml'); + /** @var \Magento\Framework\View\Asset\Repository $assetRepo */ + $assetRepo = $objectManager->get('Magento\Framework\View\Asset\Repository'); + $quickStylesPath = $assetRepo->createAsset('Magento_DesignEditor::controls/quick_styles.xml')->getSourceFile(); $this->assertFileExists($quickStylesPath); $this->_model = $objectManager->create( 'Magento\DesignEditor\Model\Config\Control\QuickStyles', diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php index 9cd1187dd2979d045aaa83713c8aab1ec7a6ffc1..fe03dd16521b5f4a45d0156bab1251027a40a5b1 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php @@ -48,44 +48,25 @@ class ObserverTest extends \PHPUnit_Framework_TestCase $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + /** @var \Magento\Framework\View\Asset\Repository $assetRepo */ + $assetRepo = $objectManager->create('Magento\Framework\View\Asset\Repository'); + /** @var $pageAssets \Magento\Framework\View\Asset\GroupedCollection */ $pageAssets = $objectManager->get('Magento\Framework\View\Asset\GroupedCollection'); $fixtureAssets = array( - array( - 'name' => 'test_css', - 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, - 'params' => array() - ), - array( - 'name' => 'test_css_vde', - 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, - 'params' => array('flag_name' => 'vde_design_mode') - ), - array( - 'name' => 'test_js', - 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, - 'params' => array() - ), - array( - 'name' => 'test_js_vde', - 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, - 'params' => array('flag_name' => 'vde_design_mode') - ) + array('file' => 'test.css', 'params' => array()), + array('file' => 'test_vde.css', 'params' => array('flag_name' => 'vde_design_mode')), + array('file' => 'test.js', 'params' => array()), + array('file' => 'test_vde.js', 'params' => array('flag_name' => 'vde_design_mode')), ); foreach ($fixtureAssets as $asset) { $pageAssets->add( - $asset['name'], - $objectManager->create( - 'Magento\Framework\View\Asset\ViewFile', - array('file' => 'some_file', 'contentType' => $asset['type']) - ), - $asset['params'] + $asset['file'], $assetRepo->createAsset($asset['file']), $asset['params'] ); } - /** @var \Magento\Framework\Config\Scope $configScope */ $configScope = $objectManager->get('Magento\Framework\Config\ScopeInterface'); $configScope->setCurrentScope($area); @@ -104,22 +85,13 @@ class ObserverTest extends \PHPUnit_Framework_TestCase public function cleanJsDataProvider() { return array( - 'vde area - design mode' => array('vde', '1', array('test_css', 'test_css_vde', 'test_js_vde')), - 'vde area - non design mode' => array( - 'vde', - '0', - array('test_css', 'test_css_vde', 'test_js', 'test_js_vde') - ), - 'default area - design mode' => array( - 'default', - '1', - array('test_css', 'test_css_vde', 'test_js', 'test_js_vde') - ), - 'default area - non design mode' => array( - 'default', - '0', - array('test_css', 'test_css_vde', 'test_js', 'test_js_vde') - ) + 'vde area - design mode' => array('vde', '1', array('test.css', 'test_vde.css', 'test_vde.js')), + 'vde area - non design mode' => array('vde', '0', + array('test.css', 'test_vde.css', 'test.js', 'test_vde.js')), + 'default area - design mode' => array('default', '1', + array('test.css', 'test_vde.css', 'test.js', 'test_vde.js')), + 'default area - non design mode' => array('default', '0', + array('test.css', 'test_vde.css', 'test.js', 'test_vde.js')), ); } } diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/controls/image_sizing.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/web/controls/image_sizing.xml similarity index 100% rename from dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/controls/image_sizing.xml rename to dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/web/controls/image_sizing.xml diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/controls/quick_styles.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/web/controls/quick_styles.xml similarity index 100% rename from dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/controls/quick_styles.xml rename to dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/Magento_DesignEditor/web/controls/quick_styles.xml diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/view.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/etc/view.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/view.xml rename to dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/etc/view.xml index 26f85e2d7274919ebcfbbf4818ffa4e6cbf72e5e..be42a6a36c6a50e6bf3f49cb3aed03ba9a0bdbc8 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/view.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/etc/view.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Magento_DesignEditor"> <var name="test_var_key1">test_value1</var> <var name="test_var_key2">test_value2</var> diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/view.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/etc/view.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/view.xml rename to dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/etc/view.xml index 92265ed40319458063f173136d8a15004bc9431f..24945efa75c38152f9fa7a364192a39f27eaceba 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/view.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/etc/view.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Magento_DesignEditor"> <var name="test_var_key1">test_child_value1</var> <var name="test_var_key2">test_child_value2</var> diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml index a43ed7f53772599f8daa3655098725bb2a3cfb6f..bb1b22e35918baae877cf8291bc06077e1f4c947 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default Child</title> <version>2.0.0.0</version> <parent>vendor_test</parent> diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php index 71d4bec72d582f2f7aa92c38e20383ff8f41ff81..ba9abad609030e8ba0ba835c6c963ec87414bf17 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php @@ -55,7 +55,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\Core\Model\App\Emulation'), $objectManager->get('Magento\Store\Model\StoreManager'), $objectManager->create('Magento\Framework\App\Filesystem'), - $objectManager->create('Magento\Framework\View\Url'), + $objectManager->create('Magento\Framework\View\Asset\Repository'), $objectManager->create('Magento\Framework\View\FileSystem'), $objectManager->create('Magento\Framework\App\Config\ScopeConfigInterface'), $objectManager->get('Magento\Email\Model\Template\FilterFactory'), @@ -214,4 +214,27 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $this->_model->getDefaultEmailLogo() ); } + + /** + * @dataProvider setDesignConfigExceptionDataProvider + * @expectedException \Magento\Framework\Exception + */ + public function testSetDesignConfigException($config) + { + // \Magento\Core\Model\Template is an abstract class + $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Email\Model\Template'); + $model->setDesignConfig($config); + } + + public function setDesignConfigExceptionDataProvider() + { + $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Store\Model\StoreManagerInterface')->getStore()->getId(); + return array( + array(array()), + array(array('area' => 'frontend')), + array(array('store' => $storeId)), + ); + } } diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/sample_email_content.phtml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/templates/sample_email_content.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/sample_email_content.phtml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/Magento_Core/templates/sample_email_content.phtml diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml index f876019ee781d1618b17b512da340479e4cabd37..873b3a7461001b607369e026697da9a320afca36 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content.phtml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/templates/sample_email_content.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content.phtml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/templates/sample_email_content.phtml diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content_custom.phtml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/templates/sample_email_content_custom.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/sample_email_content_custom.phtml rename to dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/templates/sample_email_content_custom.phtml diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml index f876019ee781d1618b17b512da340479e4cabd37..873b3a7461001b607369e026697da9a320afca36 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php index 35df4c7d3c4fadc1765f8d1e0b113735d58e30e7..8134a59d48e5e65004ff3b7012c8135061aae084 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php @@ -40,4 +40,4 @@ $objectManger->configure(array( )); /** @var $registration \Magento\Core\Model\Theme\Registration */ $registration = $objectManger->create('Magento\Core\Model\Theme\Registration'); -$registration->register(implode('/', array('*', '*', 'theme.xml'))); +$registration->register('*/*/theme.xml'); diff --git a/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/CacheTest.php b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/CacheTest.php deleted file mode 100644 index 6c3e5d25c31d3fa69f46970a2c67d8b7115959cf..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/CacheTest.php +++ /dev/null @@ -1,123 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor; - -use Magento\Framework\Css\PreProcessor\Cache\Import\Cache; -use Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage; - -class CacheTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * @var \Magento\Framework\Css\PreProcessor\Less - */ - protected $preProcessorLess; - - /** - * @var \Magento\Framework\Filesystem - */ - protected $filesystem; - - public function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->preProcessorLess = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Less'); - $this->filesystem = $this->objectManager->get('Magento\Framework\Filesystem'); - - \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR => array('path' => __DIR__ . '/_files/cache/lib') - ) - ) - ); - - $this->clearCache(); - } - - protected function tearDown() - { - $this->clearCache(); - } - - public function testLessCache() - { - $file = $this->objectManager->create( - 'Magento\Framework\View\Publisher\CssFile', - array('filePath' => 'oyejorge.css', 'allowDuplication' => false, 'viewParams' => $this->getDesignParams()) - ); - - $targetDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::TMP_DIR); - - /** - * cache was not initialize yet and return empty value - * - * @var \Magento\Framework\Css\PreProcessor\Cache\CacheManager $cacheManagerEmpty - */ - $emptyCache = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Cache\CacheManager'); - $emptyCache->initializeCacheByType(Cache::IMPORT_CACHE, $file); - $this->assertEmpty($emptyCache->getCachedFile(Cache::IMPORT_CACHE)); - - $this->preProcessorLess->process($file, $targetDirectory); - - /** - * cache initialized and return cached file - * - * @var \Magento\Framework\Css\PreProcessor\Cache\CacheManager $cacheManagerGenerated - */ - $generatedCache = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Cache\CacheManager'); - $generatedCache->initializeCacheByType(Cache::IMPORT_CACHE, $file); - $this->assertNotEmpty($generatedCache->getCachedFile(Cache::IMPORT_CACHE)); - } - - /** - * @return array - */ - protected function getDesignParams() - { - $designParams = array('area' => 'frontend'); - $viewService = $this->objectManager->get('Magento\Framework\View\Service'); - $viewService->updateDesignParams($designParams); - - return $designParams; - } - - /** - * @return $this - */ - protected function clearCache() - { - /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mapsDirectory */ - $mapsDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); - - if ($mapsDirectory->isDirectory(Storage::MAPS_DIR)) { - $mapsDirectory->delete(Storage::MAPS_DIR); - } - return $this; - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php b/dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php index 96b8b14c4290490d8eef4fd97ac00265766899ae..8a4ff8dd277cae2110fdbdcaa8ddc6edbd951278 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php @@ -25,7 +25,6 @@ namespace Magento\Framework\Exception; class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase { - public function testConstructor() { $exception = new NoSuchEntityException(); diff --git a/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php index f103982e5c8267fd198dbd5cabd7ef3efb60b170..26c1d13ef20cd7eb9f50dc118371f0c3a0e5d201 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php @@ -564,7 +564,7 @@ class InterfaceTest extends \PHPUnit_Framework_TestCase 'Magento\Framework\App\Filesystem' )->getPath( \Magento\Framework\App\Filesystem::ROOT_DIR - ) . '/lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf'; + ) . '/lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf'; $adapter->createPngFromString('T', $path); $adapter->refreshImageDimensions(); diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/File/Source/AggregatedTest.php b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php similarity index 62% rename from dev/tests/integration/testsuite/Magento/Framework/Less/File/Source/AggregatedTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php index 90487e1ad10b7be5682d89505c22634b32d135fb..b1521038be9e706e2a2116135240981420a08523 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/File/Source/AggregatedTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php @@ -21,12 +21,12 @@ * @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) */ -namespace Magento\Framework\Less\File\Source; +namespace Magento\Framework\Less\File\Collector; class AggregatedTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\Less\File\Source\Aggregated + * @var \Magento\Framework\Less\File\Collector\Aggregated */ protected $model; @@ -40,8 +40,8 @@ class AggregatedTest extends \PHPUnit_Framework_TestCase \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( array( \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR => array( - 'path' => dirname(dirname(__DIR__)) . '/_files/lib' + \Magento\Framework\App\Filesystem::LIB_WEB => array( + 'path' => dirname(dirname(__DIR__)) . '/_files/lib/web' ), \Magento\Framework\App\Filesystem::THEMES_DIR => array( 'path' => dirname(dirname(__DIR__)) . '/_files/design' @@ -63,21 +63,27 @@ class AggregatedTest extends \PHPUnit_Framework_TestCase 'directories' => array( \Magento\Framework\App\Filesystem::MODULES_DIR => array( 'path' => dirname(dirname(__DIR__)) . '/_files/code' - ) + ), + \Magento\Framework\App\Filesystem::THEMES_DIR => array( + 'path' => dirname(dirname(__DIR__)) . '/_files/design' + ), ) ) ) ) ); - /** @var \Magento\Framework\Less\File\Source\Base $sourceBase */ + /** @var \Magento\Framework\View\File\Collector\Base $sourceBase */ $sourceBase = $this->objectManager->create( - 'Magento\Framework\Less\File\Source\Base', - array('filesystem' => $filesystem) + 'Magento\Framework\View\File\Collector\Base', array('filesystem' => $filesystem, 'subDir' => 'web') + ); + /** @var \Magento\Framework\View\File\Collector\Base $sourceBase */ + $overriddenBaseFiles = $this->objectManager->create( + 'Magento\Framework\View\File\Collector\Override\Base', array('filesystem' => $filesystem, 'subDir' => 'web') ); $this->model = $this->objectManager->create( - 'Magento\Framework\Less\File\Source\Aggregated', - array('baseFiles' => $sourceBase) + 'Magento\Framework\Less\File\Collector\Aggregated', + array('baseFiles' => $sourceBase, 'overriddenBaseFiles' => $overriddenBaseFiles) ); } @@ -90,7 +96,7 @@ class AggregatedTest extends \PHPUnit_Framework_TestCase * @param string[] $expectedFiles * @dataProvider getFilesDataProvider */ - public function testGetFiles($path, $themeName, $expectedFiles) + public function testGetFiles($path, $themeName, array $expectedFiles) { /** @var \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory */ $themeFactory = $this->objectManager->get('Magento\Framework\View\Design\Theme\FlyweightFactory'); @@ -99,9 +105,13 @@ class AggregatedTest extends \PHPUnit_Framework_TestCase $this->setExpectedException('LogicException', 'magento_import returns empty result by path doesNotExist'); } $files = $this->model->getFiles($theme, $path); - $this->assertCount(count($expectedFiles), $files, 'Files number doesn\'t match'); + $actualFiles = []; + foreach ($files as $file) { + $actualFiles[] = $file->getFilename(); + } + $this->assertEquals($expectedFiles, $actualFiles); - /** @var $file \Magento\Framework\View\Layout\File */ + /** @var $file \Magento\Framework\View\File */ foreach ($files as $file) { if (!in_array($file->getFilename(), $expectedFiles)) { $this->fail(sprintf('File "%s" is not expected but found', $file->getFilename())); @@ -114,47 +124,66 @@ class AggregatedTest extends \PHPUnit_Framework_TestCase */ public function getFilesDataProvider() { + $fixtureDir = dirname(dirname(__DIR__)); return array( - array( + 'file in theme and parent theme' => array( '1.file', 'test_default', array( - str_replace('\\', '/', dirname(dirname(__DIR__)) . '/_files/design/frontend/test_default/1.file'), str_replace( '\\', '/', - dirname(dirname(__DIR__)) . '/_files/design/frontend/test_default/Magento_Module/1.file' + "$fixtureDir/_files/design/frontend/test_default/web/1.file" ), str_replace( '\\', '/', - dirname(dirname(__DIR__)) . '/_files/design/frontend/test_parent/Magento_Second/1.file' - ) + "$fixtureDir/_files/design/frontend/test_parent/Magento_Second/web/1.file" + ), + str_replace( + '\\', + '/', + "$fixtureDir/_files/design/frontend/test_default/Magento_Module/web/1.file" + ), ) ), - array( + 'file in library' => array( '2.file', 'test_default', - array(str_replace('\\', '/', dirname(dirname(__DIR__)) . '/_files/lib/2.file')) + array( + str_replace( + '\\', + '/', + "$fixtureDir/_files/lib/web/2.file" + ) + ) + ), + 'non-existing file' => array( + 'doesNotExist', + 'test_default', + array() ), - array('doesNotExist', 'test_default', array()), - array( - '3', + 'file in library, module, and theme' => array( + '3.less', 'test_default', array( - str_replace('\\', '/', dirname(dirname(__DIR__)) . '/_files/lib/3.less'), str_replace( '\\', '/', - dirname(dirname(__DIR__)) . '/_files/code/Magento/Other/view/frontend/3.less' + "$fixtureDir/_files/lib/web/3.less" ), str_replace( '\\', '/', - dirname(dirname(__DIR__)) . '/_files/design/frontend/test_default/Magento_Third/3.less' + "$fixtureDir/_files/code/Magento/Other/view/frontend/web/3.less" + ), + str_replace( + '\\', + '/', + "$fixtureDir/_files/design/frontend/test_default/Magento_Third/web/3.less" ) ) - ) + ), ); } } diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/PreProcessorTest.php b/dev/tests/integration/testsuite/Magento/Framework/Less/PreProcessorTest.php deleted file mode 100644 index 28f5a4c0b520056aaebb33ef11679193197c2901..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/PreProcessorTest.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less; - -use Magento\Framework\App\State; - -class PreProcessorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * @var \Magento\Framework\App\State - */ - protected $state; - - protected function setUp() - { - \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR => array('path' => __DIR__ . '/_files/lib'), - \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/_files/design') - ) - ) - ); - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - $this->state = $this->objectManager->get('Magento\Framework\App\State'); - } - - /** - * @magentoDataFixture Magento/Framework/Less/_files/themes.php - * @magentoAppIsolation enabled - * @magentoAppArea frontend - */ - public function testProcess() - { - /** @var $lessPreProcessor \Magento\Framework\Css\PreProcessor\Less */ - $lessPreProcessor = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Less'); - /** @var $filesystem \Magento\Framework\Filesystem */ - $filesystem = $this->objectManager->get('Magento\Framework\Filesystem'); - $targetDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::TMP_DIR); - $designParams = array('area' => 'frontend', 'theme' => 'test_pre_process'); - /** @var \Magento\Framework\View\Service $viewService */ - $viewService = $this->objectManager->get('Magento\Framework\View\Service'); - $viewService->updateDesignParams($designParams); - /** @var $file \Magento\Framework\View\Publisher\CssFile */ - $cssFile = $this->objectManager->create( - 'Magento\Framework\View\Publisher\CssFile', - array('filePath' => 'source/source.css', 'allowDuplication' => true, 'viewParams' => $designParams) - ); - $cssTargetFile = $lessPreProcessor->process($cssFile, $targetDirectory); - /** @var $viewFilesystem \Magento\Framework\View\FileSystem */ - $viewFilesystem = $this->objectManager->get('Magento\Framework\View\FileSystem'); - - $expectedCssFileName = ($this->state->getMode() === State::MODE_DEVELOPER) ? 'source_dev.css' : 'source.css'; - $this->assertFileEquals( - $viewFilesystem->getViewFile($expectedCssFileName, $designParams), - $cssTargetFile->getSourcePath() - ); - } - - /** - * @magentoDataFixture Magento/Framework/Less/_files/themes.php - * @magentoAppIsolation enabled - * @magentoAppArea frontend - */ - public function testCircularDependency() - { - $designParams = array('area' => 'frontend', 'theme' => 'test_pre_process'); - /** @var \Magento\Framework\View\Service $viewService */ - $viewService = $this->objectManager->get('Magento\Framework\View\Service'); - $viewService->updateDesignParams($designParams); - /** @var $preProcessor \Magento\Framework\Less\PreProcessor */ - $preProcessor = $this->objectManager->create('Magento\Framework\Less\PreProcessor'); - $fileList = $preProcessor->processLessInstructions('circular_dependency/import1.less', $designParams); - $files = array(); - /** @var $lessFile \Magento\Framework\Less\PreProcessor\File\Less */ - foreach ($fileList as $lessFile) { - $this->assertFileExists($lessFile->getPublicationPath()); - $files[] = $lessFile; - } - $this->assertNotEmpty($files); - $files[] = array_shift($files); - $importedFile = reset($files); - foreach ($fileList as $lessFile) { - $importedFilePath = preg_quote($importedFile->getPublicationPath()); - $this->assertRegExp("#{$importedFilePath}#", file_get_contents($lessFile->getPublicationPath())); - $importedFile = next($files); - } - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Other/view/frontend/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Other/view/frontend/web/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Other/view/frontend/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Other/view/frontend/web/3.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Third/view/frontend/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Third/view/frontend/web/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Third/view/frontend/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Third/view/frontend/web/3.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Module/web/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Module/web/1.file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Third/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Third/web/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Third/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Third/web/3.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/theme.xml index 6c2c2dd47851f159bc8457b64188ab7b7c6be1e4..70c1293536533423905454c76f06ae3d2c20d62c 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Test Default</title> <version>2.0.0.0</version> <parent>test_parent</parent> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Module/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/web/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Module/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/web/1.file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Module/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Module/web/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Module/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Module/web/1.file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Second/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Second/web/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Second/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Second/web/1.file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/theme.xml index 641c462e84395dd42a20c1abe3f7e47c92e1e54f..59e678505be1bc1226acad36cf2bceb1cc6d36a6 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Test Parent</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less deleted file mode 100644 index 1315c25625e973589b5a42ae8f54033265599e2c..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less +++ /dev/null @@ -1,3 +0,0 @@ -div.import_in_magento_import_module { - color: white; -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less deleted file mode 100644 index 0dd781fb1fdd295d832be0015fb653aa568c152b..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less +++ /dev/null @@ -1,4 +0,0 @@ -@import "import_dir/import_in_magento_import"; -div.test { - color: white; -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less deleted file mode 100644 index 6a3e9e2b391910b12b03be85a7868345cc1254b6..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less +++ /dev/null @@ -1,3 +0,0 @@ -div.test2 { - color: black; -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less deleted file mode 100644 index f3aa4e7b32d5dc31c11824e61bec1a91399af090..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less +++ /dev/null @@ -1,3 +0,0 @@ -div.module_test { - color: red; -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less deleted file mode 100644 index 165a45a6cd81edb736cb765c2f8395efefc2fdd6..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less +++ /dev/null @@ -1 +0,0 @@ -@import 'import2'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less deleted file mode 100644 index d4f067f7669ca137a817710cea5993b5b289195a..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less +++ /dev/null @@ -1 +0,0 @@ -@import 'import3'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less deleted file mode 100644 index 629d39cdb9c010694aaf3f4f13a2e982cb1c7ffc..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less +++ /dev/null @@ -1 +0,0 @@ -@import 'import1'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1.less deleted file mode 100644 index 819a64f26dbe3dbfac18ba5bd5eaea4ae0cae687..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1.less +++ /dev/null @@ -1,4 +0,0 @@ -@import "import1/source/import1-1"; -.class { - font-size: @importedSize; // use imported variable -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less deleted file mode 100644 index 175ff8d6aba0c296e4cd29b81ff1c419cfd50833..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less +++ /dev/null @@ -1,3 +0,0 @@ -@importedSize: 12pt; -h1 { color: green; } - diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less deleted file mode 100644 index 29199434e7fd89f03914d7d9ee271a3999950e7b..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less +++ /dev/null @@ -1 +0,0 @@ -@import "../import1-1"; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import2.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import2.less deleted file mode 100644 index 22c610b26f033399f8f58422220575f96d270d6d..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import2.less +++ /dev/null @@ -1 +0,0 @@ -// empty less file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less deleted file mode 100644 index 505f320eed4a9e703e7d322c5683996bbead0f5c..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less +++ /dev/null @@ -1,3 +0,0 @@ -div.import_in_magento_import_theme { - color: white; -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source.css b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source.css deleted file mode 100644 index 5282ee9befe40d25be723651e320379170b6cdf0..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source.css +++ /dev/null @@ -1 +0,0 @@ -h1{color: green}.class{font-size: 12pt}div.module_test{color: red}div.import_in_magento_import_theme{color: white}div.magento_import_lib{color: green}div.import_in_magento_import_module{color: white}div.test{color: white}div.test2{color: black}.end_class{color: white} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source/source.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source/source.less deleted file mode 100644 index fdbc50b090d62dff434987de58dc2283ade8da1e..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source/source.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../less/import1"; -@import (less) "../less/import2"; -@import "Magento_Test3::import"; -@import "../less/not_existed_file.less"; -//@magento_import "../some_dir/magento_import.less"; -//@magento_import "../not_existed_magento_import.less"; - -.end_class { - color: white; -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source_dev.css b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source_dev.css deleted file mode 100644 index 054ee5ecee91845e8f34c2353cecdcfff82e2883..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source_dev.css +++ /dev/null @@ -1,27 +0,0 @@ -h1 { - color: green; -} -.class { - font-size: 12pt; -} -div.module_test { - color: red; -} -div.import_in_magento_import_theme { - color: white; -} -div.magento_import_lib { - color: green; -} -div.import_in_magento_import_module { - color: white; -} -div.test { - color: white; -} -div.test2 { - color: black; -} -.end_class { - color: white; -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/theme.xml deleted file mode 100644 index 30b727b759f4fdadbb402a99aa01f281ae8c30f2..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/theme.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> - <title>Test Pre-Processor</title> - <version>2.0.0.0</version> -</theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/1.file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/2.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/2.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/2.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/2.file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/3.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/import_dir/import_in_magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/some_dir/import_dir/import_in_magento_import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/import_dir/import_in_magento_import.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/some_dir/import_dir/import_in_magento_import.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/some_dir/magento_import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/magento_import.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/web/some_dir/magento_import.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml index 003827ec81b5d3bdd38bf5f9742dfc331d62f300..67a9cc2eaf954a4e98be8fccfb248509cf9d59b7 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_address"> <field name="company"> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/module.xml index 5c66db22206b6943b37f7a5999b544663e56bb81..63aa7da0ace2e4c021fcdb5647dfe780d0a81068 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Test" version="1.11.0.1" active="true" /> </config> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetFirst.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetFirst.xml index 168a185d80e421d4fb5713a6ebc8dc3bad492c78..deecc5417cffcbf4f5ef8e31b86073539ab3842c 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetFirst.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetFirst.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_item"> <field name="event_id"> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetSecond.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetSecond.xml index c358d32c54d5cd08a17a36bbff45460d46b014d4..0861ca101fb22a8bc98364e6f122a85c12191424 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetSecond.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetSecond.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset_file.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_item"> <field name="event_id"> diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_merged.xml b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_merged.xml index ea07a0a89edc00ee7e1a860123a57203b9a2534a..e3a7e38e9d5c10a3c4679f171be78f5d79933213 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_merged.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_merged.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Module\UpdaterInterface" type="Magento\Framework\Module\UpdaterOne" /> <preference for="Magento\Framework\Module\UpdaterInterfaceTwo" type="Magento\Framework\Module\UpdaterTwo"/> <type name="Magento\Framework\App\Arguments\Loader" shared="false"> diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_one.xml b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_one.xml index b184a41c11da1d99b24e0abf17e3d42e6adec7e7..a838cf287834b78d9394fe8cdd6a6005f7e192ac 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_one.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_one.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Module\UpdaterInterface" type="Magento\Framework\Module\Updater" /> <type name="Magento\Framework\App\Arguments\Loader"> <arguments> diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_two.xml b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_two.xml index 4630c3432a9b25603e8c0dfd671f189562840697..ce4dd60f27287276895b436fa30512d4fe8e8fc1 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_two.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Module\UpdaterInterfaceTwo" type="Magento\Framework\Module\UpdaterTwo" /> <preference for="Magento\Framework\Module\UpdaterInterface" type="Magento\Framework\Module\UpdaterOne" /> <type name="Magento\Framework\App\Arguments\Loader" shared="false"> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Translate/_files/_inline_page_expected.html b/dev/tests/integration/testsuite/Magento/Framework/Translate/_files/_inline_page_expected.html index a031b1ee3228e89612857f8faf0512f014b79afd..0e16d642de1fa9637713a3b9f23f6af58bef73d2 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Translate/_files/_inline_page_expected.html +++ b/dev/tests/integration/testsuite/Magento/Framework/Translate/_files/_inline_page_expected.html @@ -32,12 +32,12 @@ <div data-translate="[{"shown":"shown_1","translated":"translated_1","original":"original_1","location":"Tag attribute (ALT, TITLE, etc.)","scope":"scope_1"}]"title="some_title_shown_1_in_div"> some_text_<span data-translate="[{"shown":"shown_2","translated":"translated_2","original":"original_2","location":"Text","scope":"scope_2"}]">shown_2</span>_in_div </div> -<script type="text/javascript" src="http://localhost/pub/lib/prototype/window.js"></script> -<link rel="stylesheet" type="text/css" href="http://localhost/pub/lib/prototype/windows/themes/default.css"/> +<script type="text/javascript" src="http://localhost/pub/static/frontend/Magento/plushe/en_US/prototype/window.js"></script> +<link rel="stylesheet" type="text/css" href="http://localhost/pub/static/frontend/Magento/plushe/en_US/prototype/windows/themes/default.css"/> <link rel="stylesheet" type="text/css" href="http://localhost/pub/media/theme/static/frontend/{{design_package}}/default/en_US/Magento_Core/prototype/magento.css"/> -<script type="text/javascript" src="http://localhost/pub/lib/mage/edit-trigger.js"></script> -<script type="text/javascript" src="http://localhost/pub/lib/mage/translate-inline.js"></script> -<link rel="stylesheet" type="text/css" href="http://localhost/pub/lib/mage/translate-inline.css"/> +<script type="text/javascript" src="http://localhost/pub/static/frontend/Magento/plushe/en_US/mage/edit-trigger.js"></script> +<script type="text/javascript" src="http://localhost/pub/static/frontend/Magento/plushe/en_US/mage/translate-inline.js"></script> +<link rel="stylesheet" type="text/css" href="http://localhost/pub/static/frontend/Magento/plushe/en_US/mage/translate-inline.css"/> <script type="text/javascript"> (function($){ diff --git a/dev/tests/integration/testsuite/Magento/Framework/TranslateTest.php b/dev/tests/integration/testsuite/Magento/Framework/TranslateTest.php index 93bf3565be3bbd58c5a3e3f9ec75deb40ba11478..f22f6966426a6c11ebf70a55527eb2293f37bc18 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/TranslateTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/TranslateTest.php @@ -47,7 +47,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase { $this->_viewFileSystem = $this->getMock( 'Magento\Framework\View\FileSystem', - array('getFilename', 'getDesignTheme'), + array('getLocaleFileName', 'getDesignTheme'), array(), '', false @@ -55,7 +55,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase $this->_viewFileSystem->expects($this->any()) ->method( - 'getFilename' + 'getLocaleFileName' )->will( $this->returnValue(dirname(__DIR__) . '/Core/Model/_files/design/frontend/test_default/i18n/en_US.csv') ); @@ -96,8 +96,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase $objectManager->addSharedInstance($this->_designModel, 'Magento\Core\Model\View\Design\Proxy'); - $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Framework\Translate'); + $this->_model = $objectManager->create('Magento\Framework\Translate'); $objectManager->addSharedInstance($this->_model, 'Magento\Framework\Translate'); $objectManager->removeSharedInstance('Magento\Framework\Phrase\Renderer\Composite'); $objectManager->removeSharedInstance('Magento\Framework\Phrase\Renderer\Translate'); diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Asset/MergedTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Asset/MergedTest.php deleted file mode 100644 index 614d2d0cfeb5336b44595572bd8cdb4dbc0ad628..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Asset/MergedTest.php +++ /dev/null @@ -1,196 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset; - -/** - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - */ -class MergedTest extends \PHPUnit_Framework_TestCase -{ - /** - * Path to the public directory for view files - * - * @var \Magento\Framework\Filesystem\Directory\WriteInterface - */ - protected static $_themePublicDir; - - /** - * Path to the public directory for merged view files - * - * @var \Magento\Framework\Filesystem\Directory\WriteInterface - */ - protected static $_viewPublicMergedDir; - - public static function setUpBeforeClass() - { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Framework\App\Filesystem $filesystem */ - $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); - self::$_themePublicDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); - self::$_viewPublicMergedDir = $filesystem->getDirectoryWrite( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - ); - } - - protected function setUp() - { - \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::THEMES_DIR => array( - 'path' => dirname(dirname(__DIR__)) . '/_files/design' - ), - \Magento\Framework\App\Filesystem::PUB_DIR => array('path' => BP) - ) - ) - ); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') - ->setAreaCode('frontend'); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\View\DesignInterface' - )->setDesignTheme( - 'vendor_default' - ); - } - - protected function tearDown() - { - self::$_themePublicDir->delete('frontend'); - self::$_viewPublicMergedDir->delete(\Magento\Framework\View\Asset\Merged::PUBLIC_MERGE_DIR); - } - - /** - * Build model, containing the provided assets - * - * @param array $files - * @param string $contentType - * @return \Magento\Framework\View\Asset\Merged - */ - protected function _buildModel(array $files, $contentType) - { - $assets = array(); - foreach ($files as $file) { - $assets[] = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Asset\ViewFile', - array('file' => $file, 'contentType' => $contentType) - ); - } - $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Asset\Merged', - array('assets' => $assets) - ); - return $model; - } - - /** - * @param string $contentType - * @param array $files - * @param string $expectedFilename - * @param array $related - * @dataProvider getUrlDataProvider - * @magentoConfigFixture current_store dev/css/merge_css_files 1 - * @magentoConfigFixture current_store dev/js/merge_files 1 - * @magentoConfigFixture current_store dev/static/sign 0 - */ - public function testMerging($contentType, $files, $expectedFilename, $related = array()) - { - $this->markTestSkipped('Task: MAGETWO-18162'); - $resultingFile = self::$_viewPublicMergedDir->getAbsolutePath( - \Magento\Framework\View\Asset\Merged::PUBLIC_MERGE_DIR . '/' . $expectedFilename - ); - $this->assertFileNotExists($resultingFile); - - $model = $this->_buildModel($files, $contentType); - - $this->assertCount(1, $model); - - $model->rewind(); - $asset = $model->current(); - $mergedUrl = $asset->getUrl(); - $this->assertEquals($expectedFilename, basename($mergedUrl)); - - $this->assertFileExists($resultingFile); - foreach ($related as $file) { - $this->assertFileExists(self::$_themePublicDir->getAbsolutePath('frontend/vendor_default/en_US/' . $file)); - } - } - - /** - * @param string $contentType - * @param array $files - * @param string $expectedFilename - * @param array $related - * @dataProvider getUrlDataProvider - * @magentoConfigFixture current_store dev/css/merge_css_files 1 - * @magentoConfigFixture current_store dev/js/merge_files 1 - * @magentoConfigFixture current_store dev/static/sign 1 - */ - public function testMergingAndSigning($contentType, $files, $expectedFilename, $related = array()) - { - $this->markTestSkipped('Task: MAGETWO-18162'); - $model = $this->_buildModel($files, $contentType); - - $asset = $model->current(); - $mergedUrl = $asset->getUrl(); - $mergedFileName = basename($mergedUrl); - $mergedFileName = preg_replace('/\?.*$/i', '', $mergedFileName); - $this->assertEquals($expectedFilename, $mergedFileName); - - foreach ($related as $file) { - $this->assertFileExists(self::$_themePublicDir->getAbsolutePath('frontend/vendor_default/en_US/' . $file)); - } - } - - /** - * @return array - */ - public static function getUrlDataProvider() - { - return array( - array( - \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, - array('mage/calendar.css', 'css/file.css'), - 'e6ae894165d22b7d57a0f5644b6ef160.css', - array( - 'css/file.css', - 'recursive.css', - 'recursive.gif', - 'css/deep/recursive.css', - 'recursive2.gif', - 'css/body.gif', - 'css/1.gif', - 'h1.gif', - 'images/h2.gif', - 'Namespace_Module/absolute_valid_module.gif', - 'Magento_Theme/favicon.ico', // non-fixture file from real module - ) - ), - array( - \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, - array('mage/calendar.js', 'scripts.js'), - 'e81061cbad0d8b6fe328225d0df7dace.js' - ) - ); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/FallbackTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/FallbackTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0d333666c75b3930d8d9f38a2883c7be5c49e65c --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/FallbackTest.php @@ -0,0 +1,256 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution; + +use Magento\TestFramework\Helper\Bootstrap; + +/** + * Fallback Test + * + * @package Magento\View + * @magentoDataFixture Magento/Framework/View/_files/fallback/themes_registration.php + */ +class FallbackTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Design\Theme\FlyweightFactory + */ + private $themeFactory; + + protected function setUp() + { + Bootstrap::getInstance()->reinitialize(array( + \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( + \Magento\Framework\App\Filesystem::THEMES_DIR => array( + 'path' => __DIR__ . '/../../_files/fallback/design' + ), + \Magento\Framework\App\Filesystem::LIB_WEB => array( + 'path' => __DIR__ . '/../../_files/fallback/lib/web' + ), + ) + )); + /** @var \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory */ + $this->themeFactory = Bootstrap::getObjectManager() + ->get('Magento\Framework\View\Design\Theme\FlyweightFactory'); + } + + /** + * @param string $file + * @param string $themePath + * @param string|null $module + * @param string|null $expectedFilename + * + * @dataProvider getTemplateFileDataProvider + */ + public function testGetTemplateFile($file, $themePath, $module, $expectedFilename) + { + /** @var \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile $model */ + $model = Bootstrap::getObjectManager() + ->create('Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile'); + $themeModel = $this->themeFactory->create($themePath); + + $actualFilename = $model->getFile('frontend', $themeModel, $file, $module); + if ($expectedFilename) { + $this->assertInternalType('string', $actualFilename); + $this->assertStringMatchesFormat($expectedFilename, $actualFilename); + $this->assertFileExists($actualFilename); + } else { + $this->assertFalse($actualFilename); + } + } + + /** + * @return array + */ + public function getTemplateFileDataProvider() + { + return array( + 'non-modular: no default inheritance' => array( + 'fixture_template.phtml', 'vendor_standalone_theme', null, + null, + ), + 'non-modular: inherit parent theme' => array( + 'fixture_template.phtml', 'vendor_custom_theme', null, + '%s/frontend/vendor_default/templates/fixture_template.phtml', + ), + 'non-modular: inherit grandparent theme' => array( + 'fixture_template.phtml', 'vendor_custom_theme2', null, + '%s/frontend/vendor_default/templates/fixture_template.phtml', + ), + 'modular: no default inheritance' => array( + 'fixture_template.phtml', 'vendor_standalone_theme', 'Fixture_Module', + null, + ), + 'modular: no fallback to non-modular file' => array( + 'fixture_template.phtml', 'vendor_default', 'NonExisting_Module', + null, + ), + 'modular: inherit parent theme' => array( + 'fixture_template.phtml', 'vendor_custom_theme', 'Fixture_Module', + '%s/frontend/vendor_default/Fixture_Module/templates/fixture_template.phtml', + ), + 'modular: inherit grandparent theme' => array( + 'fixture_template.phtml', 'vendor_custom_theme2', 'Fixture_Module', + '%s/frontend/vendor_default/Fixture_Module/templates/fixture_template.phtml', + ), + ); + } + + /** + * @param string $themePath + * @param string $locale + * @param string|null $expectedFilename + * + * @dataProvider getLocaleFileDataProvider + */ + public function testGetI18nCsvFile($themePath, $locale, $expectedFilename) + { + /** @var \Magento\Framework\View\Design\FileResolution\Fallback\File $model */ + $model = Bootstrap::getObjectManager()->create('Magento\Framework\View\Design\FileResolution\Fallback\File'); + $themeModel = $this->themeFactory->create($themePath); + + $actualFilename = $model->getFile('frontend', $themeModel, 'i18n/' . $locale . '.csv'); + + if ($expectedFilename) { + $this->assertInternalType('string', $actualFilename); + $this->assertStringMatchesFormat($expectedFilename, $actualFilename); + $this->assertFileExists($actualFilename); + } else { + $this->assertFalse($actualFilename); + } + } + + public function getLocaleFileDataProvider() + { + return array( + 'no default inheritance' => array( + 'vendor_standalone_theme', 'en_US', + null, + ), + 'inherit parent theme' => array( + 'vendor_custom_theme', 'en_US', + '%s/frontend/vendor_custom_theme/i18n/en_US.csv', + ), + 'inherit grandparent theme' => array( + 'vendor_custom_theme2', 'en_US', + '%s/frontend/vendor_custom_theme/i18n/en_US.csv', + ), + ); + } + + /** + * Test for the static files fallback according to the themes inheritance + * + * @param string $file + * @param string $themePath + * @param string $locale + * @param string $module + * @param string|null $expectedFilename + * + * @dataProvider getViewFileDataProvider + */ + public function testGetViewFile($file, $themePath, $locale, $module, $expectedFilename) + { + /** @var \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $model */ + $model = Bootstrap::getObjectManager() + ->create('Magento\Framework\View\Design\FileResolution\Fallback\StaticFile'); + $themeModel = $this->themeFactory->create($themePath); + + $actualFilename = $model->getFile('frontend', $themeModel, $locale, $file, $module); + if ($expectedFilename) { + $this->assertInternalType('string', $actualFilename); + $this->assertStringMatchesFormat($expectedFilename, $actualFilename); + $this->assertFileExists($actualFilename); + } else { + $this->assertFalse($actualFilename); + } + } + + public function getViewFileDataProvider() + { + return array( + 'non-modular: no default inheritance' => array( + 'fixture_script.js', 'vendor_standalone_theme', null, null, + null, + ), + 'non-modular: inherit same package & parent theme' => array( + 'fixture_script.js', 'vendor_custom_theme', null, null, + '%s/frontend/vendor_default/web/fixture_script.js', + ), + 'non-modular: inherit same package & grandparent theme' => array( + 'fixture_script.js', 'vendor_custom_theme2', null, null, + '%s/frontend/vendor_default/web/fixture_script.js', + ), + 'non-modular: fallback to non-localized file' => array( + 'fixture_script.js', 'vendor_default', 'en_US', null, + '%s/frontend/vendor_default/web/fixture_script.js', + ), + 'non-modular: localized file' => array( + 'fixture_script.js', 'vendor_default', 'ru_RU', null, + '%s/frontend/vendor_default/web/i18n/ru_RU/fixture_script.js', + ), + 'non-modular: override js lib file' => array( + 'mage/script.js', 'vendor_custom_theme', null, null, + '%s/frontend/vendor_custom_theme/web/mage/script.js', + ), + 'non-modular: inherit js lib file' => array( + 'mage/script.js', 'vendor_default', null, null, + '%s/lib/web/mage/script.js', + ), + 'modular: no default inheritance' => array( + 'fixture_script.js', 'vendor_standalone_theme', null, 'Fixture_Module', + null, + ), + 'modular: no fallback to non-modular file' => array( + 'fixture_script.js', 'vendor_default', null, 'NonExisting_Module', + null, + ), + 'modular: no fallback to js lib file' => array( + 'mage/script.js', 'vendor_default', null, 'Fixture_Module', + null, + ), + 'modular: no fallback to non-modular localized file' => array( + 'fixture_script.js', 'vendor_default', 'ru_RU', 'NonExisting_Module', + null, + ), + 'modular: inherit same package & parent theme' => array( + 'fixture_script.js', 'vendor_custom_theme', null, 'Fixture_Module', + '%s/frontend/vendor_default/Fixture_Module/web/fixture_script.js', + ), + 'modular: inherit same package & grandparent theme' => array( + 'fixture_script.js', 'vendor_custom_theme2', null, 'Fixture_Module', + '%s/frontend/vendor_default/Fixture_Module/web/fixture_script.js', + ), + 'modular: fallback to non-localized file' => array( + 'fixture_script.js', 'vendor_default', 'en_US', 'Fixture_Module', + '%s/frontend/vendor_default/Fixture_Module/web/fixture_script.js', + ), + 'modular: localized file' => array( + 'fixture_script.js', 'vendor_custom_theme2', 'ru_RU', 'Fixture_Module', + '%s/frontend/vendor_default/Fixture_Module/web/i18n/ru_RU/fixture_script.js', + ), + ); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/FallbackTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/FallbackTest.php deleted file mode 100644 index 87229be013f2388ee088ce524f624b96fc6198b5..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/FallbackTest.php +++ /dev/null @@ -1,383 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\FileResolution\Strategy; - -use Magento\TestFramework\Helper\Bootstrap; -use Magento\Framework\View\Design\Fallback\Factory; - -/** - * Fallback Test - * - */ -class FallbackTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var string - */ - protected $_baseDir; - - /** - * @var string - */ - protected $_viewDir; - - protected function setUp() - { - $this->markTestSkipped('Task: MAGETWO-18162'); - $this->_baseDir = realpath(__DIR__ . '/../../../_files/fallback'); - $this->_viewDir = $this->_baseDir . '/design'; - } - - /** - * Build a model to test - * - * @return \Magento\Framework\View\Design\FileResolution\Strategy\Fallback - */ - protected function _buildModel() - { - // Prepare config with directories - $filesystem = Bootstrap::getObjectManager()->create( - 'Magento\Framework\App\Filesystem', - array( - 'directoryList' => Bootstrap::getObjectManager()->create( - 'Magento\Framework\App\Filesystem\DirectoryList', - array( - 'root' => $this->_baseDir, - 'directories' => array( - \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => $this->_viewDir) - ) - ) - ) - ) - ); - - return Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback', - array('fallbackFactory' => new Factory($filesystem)) - ); - } - - /** - * Compose custom theme model with designated path - * - * @param string $area - * @param string $themePath - * @return \Magento\Core\Model\Theme - */ - protected function _getThemeModel($area, $themePath) - { - /** @var $collection \Magento\Core\Model\Theme\Collection */ - $collection = Bootstrap::getObjectManager()->create('Magento\Core\Model\Theme\Collection'); - $themeModel = $collection->addDefaultPattern()->addFilter( - 'theme_path', - $themePath - )->addFilter( - 'area', - $area - )->getFirstItem(); - return $themeModel; - } - - /** - * @param string $file - * @param string $area - * @param string $themePath - * @param string|null $module - * @param string|null $expectedFilename - * - * @dataProvider getFileDataProvider - */ - public function testGetFile($file, $area, $themePath, $module, $expectedFilename) - { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') - ->setAreaCode($area); - $model = $this->_buildModel($area, $themePath, null); - $themeModel = $this->_getThemeModel($area, $themePath); - - $actualFilename = $model->getFile($area, $themeModel, $file, $module); - if ($expectedFilename) { - $this->assertStringMatchesFormat($expectedFilename, $actualFilename); - $this->assertFileExists($actualFilename); - } else { - $this->assertFileNotExists($actualFilename); - } - } - - public function getFileDataProvider() - { - return array( - 'non-modular: no default inheritance' => array( - 'fixture_template.phtml', - 'frontend', - 'vendor_standalone_theme', - null, - null - ), - 'non-modular: inherit same package & parent theme' => array( - 'fixture_template.phtml', - 'frontend', - 'vendor_custom_theme', - null, - '%s/frontend/vendor_default/fixture_template.phtml' - ), - 'non-modular: inherit same package & grandparent theme' => array( - 'fixture_template.phtml', - 'frontend', - 'vendor_custom_theme2', - null, - '%s/frontend/vendor_default/fixture_template.phtml' - ), - 'modular: no default inheritance' => array( - 'fixture_template.phtml', - 'frontend', - 'vendor_standalone_theme', - 'Fixture_Module', - null - ), - 'modular: no fallback to non-modular file' => array( - 'fixture_template.phtml', - 'frontend', - 'vendor_default', - 'NonExisting_Module', - null - ), - 'modular: inherit same package & parent theme' => array( - 'fixture_template.phtml', - 'frontend', - 'vendor_custom_theme', - 'Fixture_Module', - '%s/frontend/vendor_default/Fixture_Module/fixture_template.phtml' - ), - 'modular: inherit same package & grandparent theme' => array( - 'fixture_template.phtml', - 'frontend', - 'vendor_custom_theme2', - 'Fixture_Module', - '%s/frontend/vendor_default/Fixture_Module/fixture_template.phtml' - ) - ); - } - - /** - * @param string $area - * @param string $themePath - * @param string $locale - * @param string|null $expectedFilename - * - * @dataProvider getLocaleFileDataProvider - */ - public function testGetI18nCsvFile($area, $themePath, $locale, $expectedFilename) - { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') - ->setAreaCode($area); - $model = $this->_buildModel($area, $themePath, $locale); - $themeModel = $this->_getThemeModel($area, $themePath); - - $actualFilename = $model->getFile($area, $themeModel, 'i18n/' . $locale . '.csv'); - - if ($expectedFilename) { - $this->assertStringMatchesFormat($expectedFilename, $actualFilename); - $this->assertFileExists($actualFilename); - } else { - $this->assertFileNotExists($actualFilename); - } - } - - public function getLocaleFileDataProvider() - { - return array( - 'no default inheritance' => array('frontend', 'vendor_standalone_theme', 'en_US', null), - 'inherit parent theme' => array( - 'frontend', - 'vendor_custom_theme', - 'en_US', - '%s/frontend/vendor_custom_theme/i18n/en_US.csv' - ), - 'inherit grandparent theme' => array( - 'frontend', - 'vendor_custom_theme2', - 'en_US', - '%s/frontend/vendor_custom_theme/i18n/en_US.csv' - ) - ); - } - - /** - * Test for the skin files fallback according to the themes inheritance - * - * @param string $file - * @param string $area - * @param string $themePath - * @param string $locale - * @param string $module - * @param string|null $expectedFilename - * - * @dataProvider getViewFileDataProvider - */ - public function testGetViewFile($file, $area, $themePath, $locale, $module, $expectedFilename) - { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') - ->setAreaCode($area); - $model = $this->_buildModel(); - $themeModel = $this->_getThemeModel($area, $themePath); - - $actualFilename = $model->getViewFile($area, $themeModel, $locale, $file, $module); - if ($expectedFilename) { - $this->assertStringMatchesFormat($expectedFilename, $actualFilename); - $this->assertFileExists($actualFilename); - } else { - $this->assertFileNotExists($actualFilename); - } - } - - /** - * @return array - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function getViewFileDataProvider() - { - return array( - 'non-modular: no default inheritance' => array( - 'fixture_script.js', - 'frontend', - 'vendor_standalone_theme', - null, - null, - null - ), - 'non-modular: inherit same package & parent theme' => array( - 'fixture_script.js', - 'frontend', - 'vendor_custom_theme', - null, - null, - '%s/frontend/vendor_default/fixture_script.js' - ), - 'non-modular: inherit same package & grandparent theme' => array( - 'fixture_script.js', - 'frontend', - 'vendor_custom_theme2', - null, - null, - '%s/frontend/vendor_default/fixture_script.js' - ), - 'non-modular: fallback to non-localized file' => array( - 'fixture_script.js', - 'frontend', - 'vendor_default', - 'en_US', - null, - '%s/frontend/vendor_default/fixture_script.js' - ), - 'non-modular: localized file' => array( - 'fixture_script.js', - 'frontend', - 'vendor_default', - 'ru_RU', - null, - '%s/frontend/vendor_default/i18n/ru_RU/fixture_script.js' - ), - 'non-modular: override js lib file' => array( - 'mage/script.js', - 'frontend', - 'vendor_custom_theme', - null, - null, - '%s/frontend/vendor_custom_theme/mage/script.js' - ), - 'non-modular: inherit js lib file' => array( - 'mage/script.js', - 'frontend', - 'vendor_default', - null, - null, - '%s/pub/lib/mage/script.js' - ), - 'modular: no default inheritance' => array( - 'fixture_script.js', - 'frontend', - 'vendor_standalone_theme', - null, - 'Fixture_Module', - null - ), - 'modular: no fallback to non-modular file' => array( - 'fixture_script.js', - 'frontend', - 'vendor_default', - null, - 'NonExisting_Module', - null - ), - 'modular: no fallback to js lib file' => array( - 'mage/script.js', - 'frontend', - 'vendor_default', - null, - 'Fixture_Module', - null - ), - 'modular: no fallback to non-modular localized file' => array( - 'fixture_script.js', - 'frontend', - 'vendor_default', - 'ru_RU', - 'NonExisting_Module', - null - ), - 'modular: inherit same package & parent theme' => array( - 'fixture_script.js', - 'frontend', - 'vendor_custom_theme', - null, - 'Fixture_Module', - '%s/frontend/vendor_default/Fixture_Module/fixture_script.js' - ), - 'modular: inherit same package & grandparent theme' => array( - 'fixture_script.js', - 'frontend', - 'vendor_custom_theme2', - null, - 'Fixture_Module', - '%s/frontend/vendor_default/Fixture_Module/fixture_script.js' - ), - 'modular: fallback to non-localized file' => array( - 'fixture_script.js', - 'frontend', - 'vendor_default', - 'en_US', - 'Fixture_Module', - '%s/frontend/vendor_default/Fixture_Module/fixture_script.js' - ), - 'modular: localized file' => array( - 'fixture_script.js', - 'frontend', - 'vendor_custom_theme2', - 'ru_RU', - 'Fixture_Module', - '%s/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js' - ) - ); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php index 64e584fc6fb7396662af565745fd4c39e6a01f39..af52dd526e2802b4be38527649bc18fb6dbd1fda 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php @@ -508,23 +508,10 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase $this->assertEquals($withRoute, $this->_block->getUrl('catalog/product/view', array('id' => 10))); } - /** - * Isolation level has been raised in order to flush themes configuration in-memory cache - * - * @magentoAppIsolation enabled - */ public function testGetViewFileUrl() { - $this->assertStringStartsWith('http://localhost/pub/static/frontend/', $this->_block->getViewFileUrl()); - $this->assertStringEndsWith('css/styles.css', $this->_block->getViewFileUrl('css/styles.css')); - - /** - * File is not exist - */ - $this->assertStringEndsWith( - '/core/index/notfound', - $this->_block->getViewFileUrl('not_exist_folder/wrong_bad_file.xyz') - ); + $actualResult = $this->_block->getViewFileUrl('css/styles.css'); + $this->assertStringMatchesFormat('http://localhost/pub/static/frontend/%s/en_US/css/styles.css', $actualResult); } public function testFormatDate() diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php index e92a5469615085eff0c80bff88c5568b35b75034..396e7cd58307fae77efc2b0fa79a452e0135eb10 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php @@ -57,25 +57,25 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase ); } - public function testGetFilename() + public function testGetTemplateFileName() { - $expected = '%s/frontend/test_default/Magento_Catalog/theme_template.phtml'; - $actual = $this->_model->getFilename('Magento_Catalog::theme_template.phtml', array()); + $expected = '%s/frontend/test_default/Magento_Catalog/templates/theme_template.phtml'; + $actual = $this->_model->getTemplateFileName('Magento_Catalog::theme_template.phtml', array()); $this->_testExpectedVersusActualFilename($expected, $actual); } public function testGetFileNameAccordingToLocale() { - $expected = '%s/frontend/test_default/i18n/fr_FR/logo.gif'; - $actual = $this->_model->getLocaleFileName('logo.gif', array('locale' => 'fr_FR')); + $expected = '%s/frontend/test_default/web/i18n/fr_FR/logo.gif'; + $actual = $this->_model->getStaticFileName('logo.gif', array('locale' => 'fr_FR')); $this->_testExpectedVersusActualFilename($expected, $actual); } public function testGetViewFile() { - $expected = '%s/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js'; + $expected = '%s/frontend/vendor_custom_theme/Fixture_Module/web/fixture_script.js'; $params = array('theme' => 'vendor_custom_theme'); - $actual = $this->_model->getViewFile('Fixture_Module::fixture_script.js', $params); + $actual = $this->_model->getStaticFileName('Fixture_Module::fixture_script.js', $params); $this->_testExpectedVersusActualFilename($expected, $actual); } diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/PublicationTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/PublicationTest.php deleted file mode 100644 index c4d912fd1fb0a099cdab32a9f0f2dbfd94adc981..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/View/PublicationTest.php +++ /dev/null @@ -1,736 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -use Magento\Framework\App\State; - -class PublicationTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\View\DesignInterface - */ - protected $model; - - /** - * @var \Magento\Framework\View\Service - */ - protected $viewService; - - /** - * @var \Magento\Framework\View\FileSystem - */ - protected $fileSystem; - - /** - * @var \Magento\Framework\View\Url - */ - protected $viewUrl; - - /** - * @var \Magento\Framework\App\State - */ - protected $state; - - protected function setUp() - { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - $this->viewService = $objectManager->create('Magento\Framework\View\Service'); - $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); - $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); - $this->state = $objectManager->get('Magento\Framework\App\State'); - } - - protected function tearDown() - { - /** @var Filesystem $filesystem */ - $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Framework\App\Filesystem'); - $publicDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); - $publicDir->delete('adminhtml'); - $publicDir->delete('frontend'); - $this->model = null; - } - - /** - * @magentoAppIsolation enabled - */ - public function testGetPublicDir() - { - /** @var $filesystem Filesystem */ - $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\App\Filesystem'); - $expectedPublicDir = $filesystem->getPath(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); - $this->assertEquals($expectedPublicDir, $this->viewService->getPublicDir()); - } - - /** - * Test that URL for a view file meets expectations - * - * @param string $file - * @param string $expectedUrl - * @param string|null $locale - * @param bool|null $allowDuplication - */ - protected function _testGetViewUrl($file, $expectedUrl, $locale = null, $allowDuplication = null) - { - $this->_initTestTheme($allowDuplication); - - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\Locale\ResolverInterface' - )->setLocale( - $locale - ); - $url = $this->viewUrl->getViewFileUrl($file); - $this->assertStringEndsWith($expectedUrl, $url); - $viewFile = $this->fileSystem->getViewFile($file); - $this->assertFileExists($viewFile); - } - - /** - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - * @magentoAppIsolation enabled - * @dataProvider getViewUrlFilesDuplicationDataProvider - */ - public function testGetViewUrlFilesDuplication($file, $expectedUrl, $locale = null) - { - $this->_testGetViewUrl($file, $expectedUrl, $locale, true); - } - - /** - * @return array - */ - public function getViewUrlFilesDuplicationDataProvider() - { - return array( - 'theme file' => array('css/styles.css', 'static/frontend/test_default/en_US/css/styles.css'), - 'theme localized file' => array('logo.gif', 'static/frontend/test_default/fr_FR/logo.gif', 'fr_FR'), - 'modular file' => array( - 'Namespace_Module::favicon.ico', - 'static/frontend/test_default/en_US/Namespace_Module/favicon.ico' - ), - 'lib folder' => array('varien', 'http://localhost/pub/lib/varien') - ); - } - - /** - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - * @magentoAppIsolation enabled - * @dataProvider testGetViewUrlNoFilesDuplicationDataProvider - */ - public function testGetViewUrlNoFilesDuplication($file, $expectedUrl, $locale = null) - { - $this->_testGetViewUrl($file, $expectedUrl, $locale, false); - } - - /** - * @return array - */ - public function testGetViewUrlNoFilesDuplicationDataProvider() - { - return array( - 'theme css file' => array('css/styles.css', 'static/frontend/test_default/en_US/css/styles.css'), - 'theme file' => array('images/logo.gif', 'static/frontend/test_default/images/logo.gif'), - 'theme localized file' => array('logo.gif', 'static/frontend/test_default/i18n/fr_FR/logo.gif', 'fr_FR') - ); - } - - /** - * @expectedException \Magento\Framework\Exception - * @dataProvider getViewUrlExceptionDataProvider - */ - public function testGetViewUrlException($file) - { - $this->viewUrl->getViewFileUrl($file); - } - - /** - * @return array - */ - public function getViewUrlExceptionDataProvider() - { - return array( - 'non-existing theme file' => array('path/to/non-existing-file.ext'), - 'non-existing module file' => array('Some_Module::path/to/non-existing-file.ext') - ); - } - - /** - * Test on vulnerability for protected files - * - * @expectedException \Magento\Framework\Exception - * @expectedExceptionMessage because it does not reside in a public directory - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - * @magentoAppIsolation enabled - * @dataProvider getProtectedFiles - * @param array $designParams - * @param string $filePath - */ - public function testTemplatePublicationVulnerability($designParams, $filePath) - { - $this->_initTestTheme(); - $this->viewUrl->getViewFileUrl($filePath, $designParams); - } - - /** - * Return files, which are not published - * - * @return array - */ - public function getProtectedFiles() - { - return array( - array(array('area' => 'frontend', 'theme' => 'vendor_default'), 'access_violation.php'), - array(array('area' => 'frontend', 'theme' => 'vendor_default'), 'theme.xml'), - array( - array('area' => 'frontend', 'theme' => 'test_default', 'module' => 'Magento_Catalog'), - 'catalog_category_view.xml' - ), - array(array('area' => 'frontend', 'theme' => 'test_default', 'module' => 'Magento_Core'), 'test.phtml') - ); - } - - /** - * Publication of view files in development mode - * - * @param string $file - * @param $designParams - * @param string $expectedFile - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - * @magentoAppIsolation enabled - * @dataProvider getPublicFilePathDataProvider - */ - public function testGetPublicFilePath($file, $designParams, $expectedFile) - { - $this->_initTestTheme(); - - $expectedFile = $this->viewService->getPublicDir() . '/' . $expectedFile; - - // test doesn't make sense if the original file doesn't exist or the target file already exists - $originalFile = $this->fileSystem->getViewFile($file, $designParams); - $this->assertFileExists($originalFile); - - // getViewUrl() will trigger publication in development mode - $this->assertFileNotExists($expectedFile, 'Please verify isolation from previous test(s).'); - $this->viewUrl->getViewFileUrl($file, $designParams); - $this->assertFileExists($expectedFile); - - // as soon as the files are published, they must have the same mtime as originals - $this->assertEquals( - filemtime($originalFile), - filemtime($expectedFile), - "These files mtime must be equal: {$originalFile} / {$expectedFile}" - ); - } - - /** - * @return array - */ - public function getPublicFilePathDataProvider() - { - $designParams = array('area' => 'frontend', 'theme' => 'test_default', 'locale' => 'en_US'); - return array( - 'view file' => array( - 'images/logo_email.gif', - $designParams, - 'frontend/test_default/en_US/images/logo_email.gif' - ), - 'view modular file' => array( - 'Magento_Theme::favicon.ico', - $designParams, - 'frontend/test_default/en_US/Magento_Theme/favicon.ico' - ) - ); - } - - /** - * @param string $file - * @param array $designParams - * @param string $resultFile - * @param string $contentFile - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - * @magentoAppIsolation enabled - * @dataProvider getPublicFilePathLessDataProvider - */ - public function testGetPublicFilePathLess($file, $designParams, $resultFile, $contentFile) - { - $this->_initTestTheme(); - - $resultFile = $this->viewService->getPublicDir() . '/' . $resultFile; - - // test doesn't make sense if the original file doesn't exist or the target file already exists - $originalFile = $this->fileSystem->getViewFile($file, $designParams); - $this->assertFileNotExists($originalFile); - - // getViewUrl() will trigger publication in development mode - $this->assertFileNotExists($resultFile, 'Please verify isolation from previous test(s).'); - $this->viewUrl->getViewFileUrl($file, $designParams); - $this->assertFileExists($resultFile); - - $this->assertFileEquals($this->fileSystem->getViewFile($contentFile, $designParams), $resultFile); - } - - public function getPublicFilePathLessDataProvider() - { - $designParams = array('area' => 'frontend', 'theme' => 'test_default', 'locale' => 'en_US'); - $this->setUp(); - $resultCssFileName = ($this->state->getMode() === State::MODE_DEVELOPER) - ? 'result_source_dev.css' - : $resultCssFileName = 'result_source.css'; - - return array( - 'view file' => array( - 'source.css', - $designParams, - 'frontend/test_default/en_US/source.css', - $resultCssFileName - ) - ); - } - - /** - * Publication of CSS files located in the theme (development mode) - * @magentoAppIsolation enabled - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - */ - public function testPublishCssFileFromTheme() - { - $this->_initTestTheme(); - $expectedFiles = array( - 'css/file.css', - 'recursive.css', - 'recursive.gif', - 'css/deep/recursive.css', - 'recursive2.gif', - 'css/body.gif', - 'css/1.gif', - 'h1.gif', - 'images/h2.gif', - 'Namespace_Module/absolute_valid_module.gif', - 'Magento_Theme/favicon.ico', // non-fixture file from real module - ); - $publishedDir = $this->viewService->getPublicDir() . '/frontend/vendor_default/en_US'; - $this->assertFileNotExists($publishedDir, 'Please verify isolation from previous test(s).'); - $this->viewUrl->getViewFileUrl('css/file.css', array('theme' => 'vendor_default', 'locale' => 'en_US')); - foreach ($expectedFiles as $file) { - $this->assertFileExists("{$publishedDir}/{$file}"); - } - $this->assertFileNotExists("{$publishedDir}/absolute.gif"); - } - - /** - * Publication of CSS files located in the module - * - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - * @dataProvider publishCssFileFromModuleDataProvider - */ - public function testPublishCssFileFromModule( - $cssViewFile, - $designParams, - $expectedCssFile, - $expectedCssContent, - $expectedRelatedFiles - ) { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - - $objectManager->configure( - array( - 'Magento\Framework\View\Design\Fallback\Factory' => array( - 'arguments' => array( - 'filesystem' => array( - 'instance' => 'Magento\Framework\View\MockedFilesystem', - ) - ) - ) - ) - ); - - \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); - - $this->viewUrl->getViewFileUrl($cssViewFile, $designParams); - - $expectedCssFile = $this->viewService->getPublicDir() . '/' . $expectedCssFile; - $this->assertFileExists($expectedCssFile); - $actualCssContent = file_get_contents($expectedCssFile); - - $this->assertNotRegExp( - '/url\(.*?' . \Magento\Framework\View\Service::SCOPE_SEPARATOR . '.*?\)/', - $actualCssContent, - 'Published CSS file must not contain scope separators in URLs.' - ); - - foreach ($expectedCssContent as $expectedCssSubstring) { - $this->assertContains($expectedCssSubstring, $actualCssContent); - } - - foreach ($expectedRelatedFiles as $expectedFile) { - $expectedFile = $this->viewService->getPublicDir() . '/' . $expectedFile; - $this->assertFileExists($expectedFile); - } - } - - /** - * @return array - */ - public function publishCssFileFromModuleDataProvider() - { - return array( - 'frontend' => array( - 'product/product.css', - array( - 'area' => 'adminhtml', - 'theme' => 'Magento/backend', - 'locale' => 'en_US', - 'module' => 'Magento_ModuleA' - ), - 'adminhtml/Magento/backend/en_US/Magento_ModuleA/product/product.css', - array('url(../../Magento_ModuleB/images/gallery-image-base-label.png)'), - array('adminhtml/Magento/backend/en_US/Magento_ModuleB/images/gallery-image-base-label.png') - ), - 'adminhtml' => array( - 'Magento_ModuleC::styles.css', - array('area' => 'adminhtml', 'theme' => 'vendor_test', 'locale' => 'en_US', 'module' => false), - 'adminhtml/vendor_test/en_US/Magento_ModuleC/styles.css', - array('url(images/logo.png)', 'url(images/allinone.png)'), - array( - 'adminhtml/vendor_test/en_US/Magento_ModuleC/images/logo.png', - 'adminhtml/vendor_test/en_US/Magento_ModuleC/images/allinone.png' - ) - ) - ); - } - - /** - * Test that modified CSS file and changed resources are re-published in developer mode - * - * @magentoAppIsolation enabled - * @magentoDataFixture Magento/Core/_files/media_for_change.php - */ - public function testPublishResourcesAndCssWhenChangedCssDevMode() - { - $mode = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\App\State') - ->getMode(); - if ($mode != \Magento\Framework\App\State::MODE_DEVELOPER) { - $this->markTestSkipped('Valid in developer mode only'); - } - $this->_testPublishResourcesAndCssWhenChangedCss(true); - } - - /** - * Test that modified CSS file and changed resources are not re-published in usual mode - * - * @magentoAppIsolation enabled - * @magentoDataFixture Magento/Core/_files/media_for_change.php - */ - public function testNotPublishResourcesAndCssWhenChangedCssUsualMode() - { - $mode = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\App\State') - ->getMode(); - if ($mode == \Magento\Framework\App\State::MODE_DEVELOPER) { - $this->markTestSkipped('Valid in non-developer mode only'); - } - $this->_testPublishResourcesAndCssWhenChangedCss(false); - } - - /** - * Tests what happens when CSS file and its resources are changed - whether they are re-published or not - * - * @param bool $expectedPublished - */ - protected function _testPublishResourcesAndCssWhenChangedCss($expectedPublished) - { - $appInstallDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir(); - - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - - $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); - $this->model->setDesignTheme('test_default'); - - $this->viewService = $objectManager->create('Magento\Framework\View\Service'); - $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); - - $themePath = $this->model->getDesignTheme()->getFullPath(); - - $fixtureViewPath = "{$appInstallDir}/media_for_change/{$themePath}/"; - $publishedPath = $this->viewService->getPublicDir() . "/{$themePath}/en_US/"; - - $this->viewUrl->getViewFileUrl('style.css', array('locale' => 'en_US')); - - //It's added to make 'mtime' really different for source and origin files - sleep(1); - - // Change main file and referenced files - everything changed and referenced must appear - file_put_contents($fixtureViewPath . 'style.css', 'div {background: url(images/rectangle.gif);}', FILE_APPEND); - file_put_contents($fixtureViewPath . 'sub.css', '.sub2 {border: 1px solid magenta}', FILE_APPEND); - $this->viewUrl->getViewFileUrl('style.css', array('locale' => 'en_US')); - - $assertFileComparison = $expectedPublished ? 'assertFileEquals' : 'assertFileNotEquals'; - $this->{$assertFileComparison}($fixtureViewPath . 'style.css', $publishedPath . 'style.css'); - $this->{$assertFileComparison}($fixtureViewPath . 'sub.css', $publishedPath . 'sub.css'); - if ($expectedPublished) { - $this->assertFileEquals( - $fixtureViewPath . 'images/rectangle.gif', - $publishedPath . 'images/rectangle.gif' - ); - } else { - $this->assertFileNotExists($publishedPath . 'images/rectangle.gif'); - } - } - - /** - * Test changed resources, referenced in non-modified CSS file, are re-published - * - * @magentoDataFixture Magento/Core/_files/media_for_change.php - * @magentoAppIsolation enabled - */ - public function testPublishChangedResourcesWhenUnchangedCssDevMode() - { - $mode = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\App\State') - ->getMode(); - if ($mode != \Magento\Framework\App\State::MODE_DEVELOPER) { - $this->markTestSkipped('Valid in developer mode only'); - } - - $this->_testPublishChangedResourcesWhenUnchangedCss(true); - } - - /** - * Test changed resources, referenced in non-modified CSS file, are re-published - * - * @magentoDataFixture Magento/Core/_files/media_for_change.php - * @magentoAppIsolation enabled - */ - public function testNotPublishChangedResourcesWhenUnchangedCssUsualMode() - { - $mode = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\App\State') - ->getMode(); - if ($mode == \Magento\Framework\App\State::MODE_DEVELOPER) { - $this->markTestSkipped('Valid in non-developer mode only'); - } - - $this->_testPublishChangedResourcesWhenUnchangedCss(false); - } - - /** - * Tests what happens when CSS file and its resources are changed - whether they are re-published or not - * - * @param bool $expectedPublished - */ - protected function _testPublishChangedResourcesWhenUnchangedCss($expectedPublished) - { - $appInstallDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir(); - \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::THEMES_DIR => array( - 'path' => "{$appInstallDir}/media_for_change" - ) - ) - ) - ); - - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - - $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); - $this->model->setDesignTheme('test_default'); - - $this->viewService = $objectManager->create('Magento\Framework\View\Service'); - $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); - - $themePath = $this->model->getDesignTheme()->getFullPath(); - $fixtureViewPath = "{$appInstallDir}/media_for_change/{$themePath}/"; - $publishedPath = $this->viewService->getPublicDir() . "/{$themePath}/en_US/"; - - $this->viewUrl->getViewFileUrl('style.css', array('locale' => 'en_US')); - - //It's added to make 'mtime' really different for source and origin files - sleep(1); - - // Change referenced files - copy($fixtureViewPath . 'images/rectangle.gif', $fixtureViewPath . 'images/square.gif'); - touch($fixtureViewPath . 'images/square.gif'); - file_put_contents($fixtureViewPath . 'sub.css', '.sub2 {border: 1px solid magenta}', FILE_APPEND); - - $this->viewUrl->getViewFileUrl('style.css', array('locale' => 'en_US')); - - $assertFileComparison = $expectedPublished ? 'assertFileEquals' : 'assertFileNotEquals'; - $this->{$assertFileComparison}($fixtureViewPath . 'sub.css', $publishedPath . 'sub.css'); - $this->{$assertFileComparison}( - $fixtureViewPath . 'images/rectangle.gif', - $publishedPath . 'images/square.gif' - ); - } - - /** - * Init the model with a test theme from fixture themes dir - * Init application with custom view dir, @magentoAppIsolation required - * - * @param bool|null $allowDuplication - */ - protected function _initTestTheme($allowDuplication = null) - { - \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::THEMES_DIR => array( - 'path' => dirname(dirname(__DIR__)) . '/Core/Model/_files/design' - ) - ) - ) - ); - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - - if ($allowDuplication !== null) { - $objectManager->configure( - array( - 'Magento\Framework\View\Publisher\CssFile' => array( - 'arguments' => array( - 'allowDuplication' => $allowDuplication - ) - ), - 'Magento\Framework\View\Publisher\File' => array( - 'arguments' => array( - 'allowDuplication' => $allowDuplication - ) - ) - ) - ); - } - - // Reinit model with new directories - $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); - $this->model->setDesignTheme('test_default'); - - $this->viewService = $objectManager->create('Magento\Framework\View\Service'); - $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); - } - - /** - * Check that the mechanism of publication not affected data content on css files - * - * @magentoAppIsolation enabled - * @magentoDbIsolation enabled - */ - public function testCssWithBase64Data() - { - \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( - array( - \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( - \Magento\Framework\App\Filesystem::THEMES_DIR => array( - 'path' => dirname(dirname(__DIR__)) . '/Core/Model/_files/design/' - ) - ) - ) - ); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') - ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Framework\App\Area::PART_CONFIG); - - /** @var $themeCollection \Magento\Core\Model\Theme\Collection */ - $themeCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Core\Model\Theme\Collection' - ); - $theme = $themeCollection->addTargetPattern('frontend/vendor_default/theme.xml')->getFirstItem()->save(); - - $publishedPath = $this->viewService->getPublicDir() . '/frontend/vendor_default/en_US'; - $params = array( - 'area' => 'frontend', - 'theme' => 'vendor_default', - 'locale' => 'en_US', - 'themeModel' => $theme - ); - $filePath = $this->fileSystem->getViewFile('css/base64.css', $params); - - // publish static content - $this->viewUrl->getViewFileUrl('css/base64.css', $params); - $this->assertFileEquals($filePath, "{$publishedPath}/css/base64.css"); - - $this->model->setDesignTheme( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Design\ThemeInterface' - ) - ); - } - - /** - * Publication of view files in development mode - * - * @param string $file - * @param $designParams - * @param string $expectedFile - * @magentoDataFixture Magento/Core/Model/_files/design/themes.php - * @magentoAppIsolation enabled - * @dataProvider getPublicFilePathDataProvider - */ - public function testGetViewFilePublicPath($file, $designParams, $expectedFile) - { - $this->_initTestTheme(); - - $expectedFile = $this->viewService->getPublicDir() . '/' . $expectedFile; - - $this->assertFileNotExists($expectedFile, 'Please verify isolation from previous test(s).'); - $this->viewUrl->getViewFilePublicPath($file, $designParams); - $this->assertFileExists($expectedFile); - } - - public function testGetViewFilePublicPathExistingFile() - { - $filePath = 'mage/mage.js'; - $expectedFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\Filesystem' - )->getPath( - \Magento\Framework\App\Filesystem::PUB_LIB_DIR - ) . '/' . $filePath; - $this->assertFileExists($expectedFile, 'Please verify existence of public library file'); - - $actualFile = $this->viewUrl->getViewFilePublicPath($filePath); - $this->assertFileEquals($expectedFile, $actualFile); - } -} - -class MockedFilesystem extends \Magento\Framework\App\Filesystem -{ - /** - * Re-write modules directory - * - * @param string $code - * @return string - */ - public function getPath($code = self::ROOT_DIR) - { - return $code == \Magento\Framework\App\Filesystem::MODULES_DIR ? __DIR__ . '/_files' : parent::getPath($code); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/RelatedFileTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/RelatedFileTest.php deleted file mode 100644 index ee0db5902101c96ec9e05cd2d93edba78eb2eff1..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/View/RelatedFileTest.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -class RelatedFileTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var RelatedFile - */ - protected $model; - - public function setUp() - { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->model = $objectManager->get('Magento\Framework\View\RelatedFile'); - } - - /** - * @dataProvider buildPathDataProvider - */ - public function testBuildPath($arguments, $expected) - { - $path = $this->model->buildPath( - $arguments['relatedFilePath'], - $arguments['parentRelativePath'], - $arguments['params'] - ); - $this->assertEquals($expected['path'], $path); - $this->assertEquals($expected['params'], $arguments['params']); - } - - /** - * @return array - */ - public function buildPathDataProvider() - { - return array( - array( - 'arguments' => array( - 'relatedFilePath' => '../directory/file.css', - 'parentRelativePath' => 'css/source.css', - 'params' => array('module' => false) - ), - 'expected' => array('path' => 'directory/file.css', 'params' => array('module' => false)) - ), - array( - 'arguments' => array( - 'relatedFilePath' => '../some_dir/file.css', - 'parentRelativePath' => 'css/source.css', - 'params' => array('module' => 'Magento_Theme') - ), - 'expected' => array('path' => 'some_dir/file.css', 'params' => array('module' => 'Magento_Theme')) - ), - array( - 'arguments' => array( - 'relatedFilePath' => 'Magento_Theme::some_dir/file.css', - 'parentRelativePath' => 'css/source.css', - 'params' => array('module' => false) - ), - 'expected' => array('path' => 'some_dir/file.css', 'params' => array('module' => 'Magento_Theme')) - ) - ); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php index f448bd3594c82e7cc100b2e34d0c75bc8bb32069..0573aefe25170ea5059e9be79954a81a4ad79c55 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php @@ -48,13 +48,13 @@ class Layout public function getLayoutUpdateFromFixture($layoutUpdatesFile) { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Framework\View\Layout\File\Factory $fileFactory */ - $fileFactory = $objectManager->get('Magento\Framework\View\Layout\File\Factory'); + /** @var \Magento\Framework\View\File\Factory $fileFactory */ + $fileFactory = $objectManager->get('Magento\Framework\View\File\Factory'); $files = array(); foreach ((array)$layoutUpdatesFile as $filename) { $files[] = $fileFactory->create($filename, 'Magento_View'); } - $fileSource = $this->_testCase->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); + $fileSource = $this->_testCase->getMockForAbstractClass('Magento\Framework\View\File\CollectorInterface'); $fileSource->expects( \PHPUnit_Framework_TestCase::any() )->method( diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/adminhtml/vendor_test/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/adminhtml/vendor_test/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/adminhtml/vendor_test/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/adminhtml/vendor_test/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/theme.xml index a3a7dd87caa6f6b4fb85a6e69bb34c5c190938a2..3b4844f8a800c8fb5e2bf4ba333e8392f9402157 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Theme One</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/theme.xml index a3a7dd87caa6f6b4fb85a6e69bb34c5c190938a2..3b4844f8a800c8fb5e2bf4ba333e8392f9402157 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Theme One</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/access_violation.php b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/access_violation.php deleted file mode 100644 index 9b677ee90e22c725589114cff590cc230194f6cf..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/access_violation.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default_iphone/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default_iphone/theme.xml index f8c5935c13013bec3e57187e253baa1c38bb16ba..97412435086a8a359f8ccf03b5258a0ce97ee31e 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default_iphone/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default_iphone/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Iphone</title> <version>2.0.0.0</version> <parent>magento_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/theme.xml index f9765e3a4deabf86b233b54ec947355bd697b2f0..283b844eac50ae8f512f46816da08f8b3696c207 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Cache Test Theme</title> <version>2.0.0.0</version> <parent>test_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Namespace_Module/web/favicon.ico similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Namespace_Module/web/favicon.ico diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/view.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/view.xml index f42f6a5c8e7c265681df79486b8c26142d9d8aca..98d454efb5f5c89b58590e643a54f1631830074e 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/view.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/view.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Magento_Core"> <var name="var1">Core Value1</var> </vars> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/web/i18n/fr_FR/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/web/i18n/fr_FR/logo.gif diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/web/images/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/web/images/logo.gif diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo_email.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/web/images/logo_email.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo_email.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/web/images/logo_email.gif diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/theme.xml index 64b5a44a01eebfc52b826c93cc4442ec47c6da6c..7ed143778265bf87173ab1b3ade0f8dd25d19232 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Test Theme</title> <version>2.0.0.0</version> <parent>test_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/theme.xml index fa2e08da9908322798be5dd70188d2cdbe924376..7d000c2185fd384f46b554a297b6f552b69b3324 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Custom Theme</title> <version>2.0.0.0</version> <parent>vendor_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/access_violation.php b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/access_violation.php deleted file mode 100644 index 9b677ee90e22c725589114cff590cc230194f6cf..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/access_violation.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/theme.xml index 28452b30853c7a6037bd7f4784f057e0bf71ce44..06911a7ecd378351e6481d1dea557721d26a6300 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_template_two.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/templates/fixture_template_two.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_template_two.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/templates/fixture_template_two.phtml diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script_two.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/web/fixture_script_two.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script_two.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/web/fixture_script_two.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_template_two.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/templates/fixture_template_two.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_template_two.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/templates/fixture_template_two.phtml diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml index d0ac2bc677c99fa6b05483723ceab91e9f78dc8f..3553148941d303c1a553d2409ea50f6c0efcdf88 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Custom Theme</title> <version>2.0.0.0</version> <parent>vendor_default</parent> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_script_two.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/web/fixture_script_two.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_script_two.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/web/fixture_script_two.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/mage/script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/web/mage/script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/mage/script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/web/mage/script.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml index a222a4726129696d1e8f0aa6dfd3ffdaec57549c..27f9932a5342dda88f35e6d9f0390025be198199 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Custom Theme 2</title> <version>2.0.0.0</version> <parent>vendor_custom_theme</parent> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_template.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/templates/fixture_template.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_template.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/templates/fixture_template.phtml diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/web/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/web/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/web/i18n/ru_RU/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/web/i18n/ru_RU/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_template.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/templates/fixture_template.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_template.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/templates/fixture_template.phtml diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml index ad8be9553111d213fdacf11c997421b5331664a1..b42c20a345e2a02cf04ebcf832a0f228a469e47a 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/web/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/web/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/web/i18n/ru_RU/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/web/i18n/ru_RU/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml index e661fbbf2f332af819293b5b452b27d201c2cfc6..64b19f7016bfbfc6eb548ee82630e90eed15feba 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Standalone Theme</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/pub/lib/mage/script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/lib/web/mage/script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/pub/lib/mage/script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/lib/web/mage/script.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/themes_registration.php b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/themes_registration.php new file mode 100644 index 0000000000000000000000000000000000000000..f430c0d241fdce6fc53c3da5e418f039f6b17825 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/themes_registration.php @@ -0,0 +1,33 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +\Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array( + \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( + \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/design') + ) +)); +$objectManger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + +/** @var $registration \Magento\Core\Model\Theme\Registration */ +$registration = $objectManger->create('Magento\Core\Model\Theme\Registration'); +$registration->register('*/*/theme.xml'); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php index 2b7bfcbd2ed3145cb53164fb3cf5c183184b4d8e..00654ac07f69db1a711125580a2f16cdb544e956 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php @@ -55,8 +55,14 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase $objectManager->get('Magento\ImportExport\Model\ImportFactory'), $objectManager->get('Magento\ImportExport\Model\Resource\Helper'), $objectManager->get('Magento\Framework\App\Resource') - ) + ), + '', + true, + false, + true, + ['getMasterAttributeCode', 'validateRow', 'getEntityTypeCode'] ); + $model->expects($this->any())->method('getMasterAttributeCode')->will($this->returnValue("email")); $model->expects($this->any())->method('validateRow')->will($this->returnValue(true)); $model->expects($this->any())->method('getEntityTypeCode')->will($this->returnValue('customer')); diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php index bab9fcac4056775efcce30ae13279056562eb643..381cac90271e05e65a0db0684d184cb3436d2a83 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php @@ -220,7 +220,6 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $pathsForCheck = $model->getWritableFullPathsForCheck(); $this->assertArrayHasKey('etc', $pathsForCheck); $this->assertArrayHasKey('media', $pathsForCheck); - $this->assertArrayHasKey('lib', $pathsForCheck); $this->assertEquals('1', $pathsForCheck['etc']['recursive']); } } diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml index 4ef157295695be87486fbaed9a0ed61ba2fe5c6e..b0d1f35534f61c94e45715aa70ad9c9cd899a3c0 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Test" version="1.11.0.1" active="true" /> </config> diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_partial.xml b/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_partial.xml index 5dbfe409b2a2ecefe2ae7c95687257d44facf163..ae2fca3a49252838e2580b09c8aa72604138bf60 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_partial.xml +++ b/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_partial.xml @@ -36,6 +36,5 @@ <filesystem_prerequisites> <directory alias="etc" recursive="true" /> <directory alias="media" recursive="false" existence="true" writable="true" /> - <directory alias="lib" recursive="true" existence="true" writable="true" /> </filesystem_prerequisites> </install_wizard> diff --git a/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/OrderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/OrderTest.php index a77c0d4ce6a49c05a11c1c16d78c0839ea6f2493..57fd3bbb0e46976076f7f377ce161c0803d4729f 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/OrderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/OrderTest.php @@ -113,7 +113,7 @@ class OrderTest extends \Magento\Backend\Utility\Controller return array( array('status' => 'pending', 'comment' => 'Test comment', 'response' => 'Test comment'), array( - 'status' => '', + 'status' => 'processing', 'comment' => '', 'response' => '{"error":true,"message":"Comment text cannot be empty."}' ) diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order.php index 280bed62f93f143fb2bab1f87da2c84de8e4c220..35528f933142acb12e4d35a9889878b2a286dbb1 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/order.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order.php @@ -46,7 +46,7 @@ $order = $objectManager->create('Magento\Sales\Model\Order'); $order->setIncrementId( '100000001' )->setState( - \Magento\Sales\Model\Order::STATE_PROCESSING + \Magento\Sales\Model\Order::STATE_PROCESSING, true )->setSubtotal( 100 )->setBaseSubtotal( diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php index 5c6cabb369713f4255cfff76958889dbefc42c0f..292e40f8f4303cb8d87e15b63260334b5b42b179 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_fixture_store.php @@ -49,7 +49,7 @@ $order = $objectManager->create('Magento\Sales\Model\Order'); $order->setIncrementId( '100000004' )->setState( - \Magento\Sales\Model\Order::STATE_PROCESSING + \Magento\Sales\Model\Order::STATE_PROCESSING, true )->setSubtotal( 100 )->setBaseSubtotal( diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php index f9389b013c46a2fbf9e22dc2b29d269e4b00f649..cff8fecfced1789f29423357190257d8d0cda851 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php @@ -168,14 +168,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase array(\Magento\Framework\UrlInterface::URL_TYPE_STATIC, false, true, 'http://localhost/pub/static/'), array(\Magento\Framework\UrlInterface::URL_TYPE_STATIC, true, false, 'http://localhost/pub/static/'), array(\Magento\Framework\UrlInterface::URL_TYPE_STATIC, true, true, 'http://localhost/pub/static/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, false, false, 'http://localhost/pub/cache/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, false, true, 'http://localhost/pub/cache/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, true, false, 'http://localhost/pub/cache/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, true, true, 'http://localhost/pub/cache/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, false, false, 'http://localhost/pub/lib/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, false, true, 'http://localhost/pub/lib/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, true, false, 'http://localhost/pub/lib/'), - array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, true, true, 'http://localhost/pub/lib/'), array(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA, false, false, 'http://localhost/pub/media/'), array(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA, false, true, 'http://localhost/pub/media/'), array(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA, true, false, 'http://localhost/pub/media/'), @@ -202,10 +194,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase 'http://localhost/pub/static/', $this->_model->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_STATIC) ); - $this->assertEquals( - 'http://localhost/pub/lib/', - $this->_model->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LIB) - ); $this->assertEquals( 'http://localhost/pub/media/', $this->_model->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) @@ -320,6 +308,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase /** * @magentoAppIsolation enabled * @magentoAppArea adminhtml + * @magentoDbIsolation enabled */ public function testCRUD() { @@ -333,9 +322,9 @@ class StoreTest extends \PHPUnit_Framework_TestCase 'is_active' => 1 ) ); - - /* emulate admin store */ - $crud = new \Magento\TestFramework\Entity($this->_model, array('name' => 'new name')); + $crud = new \Magento\TestFramework\Entity( + $this->_model, array('name' => 'new name'), 'Magento\Store\Model\Store' + ); $crud->testCrud(); } @@ -344,6 +333,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase * * @dataProvider saveValidationDataProvider * @magentoAppIsolation enabled + * @magentoAppArea adminhtml * @magentoDbIsolation enabled * @expectedException \Magento\Framework\Model\Exception */ @@ -358,10 +348,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase 'is_active' => 1 ); $data = array_merge($normalStoreData, $badStoreData); - $this->_model->setData($data); - - /* emulate admin store */ $this->_model->save(); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php index 4a5e247e53dacdac631debd8189e14ec0bdedd21..cc97ae4ea17c41f14170f3b07653332a3adbdd27 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php @@ -107,7 +107,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase )->getCollection(); /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { - $result[] = array($theme); + $result[$theme->getFullPath() . ' ['. $theme->getId() .']'] = array($theme); } return $result; } @@ -153,7 +153,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase /** * Check whether page types are declared only in layout update files allowed for it - base ones */ - function (\Magento\Framework\View\Layout\File $layout) { + function (\Magento\Framework\View\File $layout) { $content = simplexml_load_file($layout->getFilename()); $this->assertEmpty( $content->xpath(\Magento\Core\Model\Layout\Merge::XPATH_HANDLE_DECLARATION), @@ -167,33 +167,34 @@ class LayoutTest extends \PHPUnit_Framework_TestCase /** * Get theme layout updates * - * @return \Magento\Framework\View\Layout\File[] + * @return \Magento\Framework\View\File[] */ public function pageTypesDeclarationDataProvider() { - /** @var $themeUpdates \Magento\Framework\View\Layout\File\Source\Theme */ - $themeUpdates = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Layout\File\Source\Theme' - ); - /** @var $themeUpdatesOverride \Magento\Framework\View\Layout\File\Source\Override\Theme */ - $themeUpdatesOverride = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Layout\File\Source\Override\Theme' - ); + /** @var $themeUpdates \Magento\Framework\View\File\Collector\ThemeModular */ + $themeUpdates = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\View\File\Collector\ThemeModular', array('subDir' => 'layout')); + /** @var $themeUpdatesOverride \Magento\Framework\View\File\Collector\Override\ThemeModular */ + $themeUpdatesOverride = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create( + 'Magento\Framework\View\File\Collector\Override\ThemeModular', + array('subDir' => 'layout/override/theme') + ); /** @var $themeCollection \Magento\Core\Model\Theme\Collection */ $themeCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Core\Model\Theme\Collection' ); $themeCollection->addDefaultPattern('*'); - /** @var $themeLayouts \Magento\Framework\View\Layout\File[] */ + /** @var $themeLayouts \Magento\Framework\View\File[] */ $themeLayouts = array(); /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { - $themeLayouts = array_merge($themeLayouts, $themeUpdates->getFiles($theme)); - $themeLayouts = array_merge($themeLayouts, $themeUpdatesOverride->getFiles($theme)); + $themeLayouts = array_merge($themeLayouts, $themeUpdates->getFiles($theme, '*.xml')); + $themeLayouts = array_merge($themeLayouts, $themeUpdatesOverride->getFiles($theme, '*.xml')); } $result = array(); foreach ($themeLayouts as $layout) { - $result[] = array($layout); + $result[$layout->getFileIdentifier()] = array($layout); } return $result; } @@ -205,13 +206,13 @@ class LayoutTest extends \PHPUnit_Framework_TestCase /** * Check, that for an overriding file ($themeFile) in a theme ($theme), there is a corresponding base file * - * @param \Magento\Framework\View\Layout\File $themeFile + * @param \Magento\Framework\View\File $themeFile * @param \Magento\Framework\View\Design\ThemeInterface $theme */ function ($themeFile, $theme) { $baseFiles = self::_getCachedFiles( $theme->getArea(), - 'Magento\Framework\View\Layout\File\Source\Base', + 'Magento\Framework\View\File\Collector\Base', $theme ); $fileKey = $themeFile->getModule() . '/' . $themeFile->getName(); @@ -233,7 +234,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase * Check, that for an ancestor-overriding file ($themeFile) in a theme ($theme), * there is a corresponding file in that ancestor theme * - * @param \Magento\Framework\View\Layout\File $themeFile + * @param \Magento\Framework\View\File $themeFile * @param \Magento\Framework\View\Design\ThemeInterface $theme */ function ($themeFile, $theme) { @@ -255,11 +256,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase ); // Search for the overridden file in the ancestor theme - $ancestorFiles = self::_getCachedFiles( - $ancestorTheme->getFullPath(), - 'Magento\Framework\View\Layout\File\Source\Theme', - $ancestorTheme - ); + $ancestorFiles = self::_getCachedFiles($ancestorTheme->getFullPath(), + 'Magento\Framework\View\File\Collector\ThemeModular', $ancestorTheme); $fileKey = $themeFile->getModule() . '/' . $themeFile->getName(); $this->assertArrayHasKey( $fileKey, @@ -281,7 +279,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase * @param string $cacheKey * @param string $sourceClass * @param \Magento\Framework\View\Design\ThemeInterface $theme - * @return \Magento\Framework\View\Layout\File[] + * @return \Magento\Framework\View\File[] */ protected static function _getCachedFiles( $cacheKey, @@ -289,12 +287,9 @@ class LayoutTest extends \PHPUnit_Framework_TestCase \Magento\Framework\View\Design\ThemeInterface $theme ) { if (!isset(self::$_cachedFiles[$cacheKey])) { - /* @var $fileList \Magento\Framework\View\Layout\File[] */ - $fileList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - $sourceClass - )->getFiles( - $theme - ); + /* @var $fileList \Magento\Framework\View\File[] */ + $fileList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create($sourceClass, array('subDir' => 'layout'))->getFiles($theme, '*.xml'); $files = array(); foreach ($fileList as $file) { $files[$file->getModule() . '/' . $file->getName()] = true; @@ -310,9 +305,11 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function overrideBaseFilesDataProvider() { return $this->_retrieveFilesForEveryTheme( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Layout\File\Source\Override\Base' - ) + \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create( + 'Magento\Framework\View\File\Collector\Override\Base', + array('subDir' => 'layout/override/base') + ) ); } @@ -322,9 +319,11 @@ class LayoutTest extends \PHPUnit_Framework_TestCase public function overrideThemeFilesDataProvider() { return $this->_retrieveFilesForEveryTheme( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\View\Layout\File\Source\Override\Theme' - ) + \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create( + 'Magento\Framework\View\File\Collector\Override\ThemeModular', + array('subDir' => 'layout/override/theme') + ) ); } @@ -332,10 +331,10 @@ class LayoutTest extends \PHPUnit_Framework_TestCase * Scan all the themes in the system, for each theme retrieve list of files via $filesRetriever, * and return them as array of pairs [file, theme]. * - * @param \Magento\Framework\View\Layout\File\SourceInterface $filesRetriever + * @param \Magento\Framework\View\File\CollectorInterface $filesRetriever * @return array */ - protected function _retrieveFilesForEveryTheme(\Magento\Framework\View\Layout\File\SourceInterface $filesRetriever) + protected function _retrieveFilesForEveryTheme(\Magento\Framework\View\File\CollectorInterface $filesRetriever) { $result = array(); /** @var $themeCollection \Magento\Core\Model\Theme\Collection */ @@ -345,8 +344,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase $themeCollection->addDefaultPattern('*'); /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { - foreach ($filesRetriever->getFiles($theme) as $file) { - $result[] = array($file, $theme); + foreach ($filesRetriever->getFiles($theme, '*.xml') as $file) { + $result['theme: ' . $theme->getFullPath() . ', ' . $file->getFilename()] = array($file, $theme); } } return $result; diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php index d17236bb0ce6b3697bbd28ada5cb53d5ffb8940a..fced559f35d110844f0821b0d0ac157bceef74f5 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php @@ -30,13 +30,11 @@ class SkinFilesTest extends \PHPUnit_Framework_TestCase */ public function testWidgetPlaceholderImages($skinImage) { + /** @var \Magento\Framework\View\Asset\Repository $assetRepo */ + $assetRepo = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager() + ->get('Magento\Framework\View\Asset\Repository'); $this->assertFileExists( - \Magento\TestFramework\Helper\Bootstrap::getObjectmanager()->get( - 'Magento\Framework\View\FileSystem' - )->getViewFile( - $skinImage, - array('area' => 'adminhtml') - ) + $assetRepo->createAsset($skinImage, array('area' => 'adminhtml'))->getSourceFile() ); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php index c0726001822a3badfccc5c2bd93efb39e27bbb0a..3ce2d348603fe17ce9ed5fc4024e0dba32d39c17 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php @@ -44,7 +44,7 @@ class AclConfigFilesTest extends \PHPUnit_Framework_TestCase $this->_schemeFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getPath( - \Magento\Framework\App\Filesystem::LIB_DIR + \Magento\Framework\App\Filesystem::LIB_INTERNAL ) . '/Magento/Framework/Acl/etc/acl.xsd'; } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php index af6eeafc0b9ba9b4ac724eed02fd1de57c9cf010..c98d7165970be4a6e21701dd820bd340da14a424 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php @@ -56,6 +56,6 @@ class FieldsetConfigFilesTest extends \Magento\TestFramework\TestCase\AbstractCo */ protected function _getXsdPath() { - return '/../../lib/Magento/Framework/Object/etc/fieldset_file.xsd'; + return '/../../lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd'; } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php index 9a77163ebd4d63d4bcbf9ac4f24c3efb4d9c8f8a..3d897e069f8f20697f5771dc62c1b69df513bfda 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php @@ -44,7 +44,7 @@ class MviewConfigFilesTest extends \PHPUnit_Framework_TestCase $this->schemeFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getPath( - \Magento\Framework\App\Filesystem::LIB_DIR + \Magento\Framework\App\Filesystem::LIB_INTERNAL ) . '/Magento/Framework/Mview/etc/mview.xsd'; } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php index 3eae10182e23a9c912cff517abecf8b714557e37..bde42490d285939a380e11547ce37e40165ebcb8 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php @@ -54,8 +54,8 @@ class RouteConfigFilesTest extends \PHPUnit_Framework_TestCase { global $magentoBaseDir; - $this->_schemaFile = $magentoBaseDir . '/lib/Magento/Framework/App/etc/routes.xsd'; - $this->_mergedSchemaFile = $magentoBaseDir . '/lib/Magento/Framework/App/etc/routes_merged.xsd'; + $this->_schemaFile = $magentoBaseDir . '/lib/internal/Magento/Framework/App/etc/routes.xsd'; + $this->_mergedSchemaFile = $magentoBaseDir . '/lib/internal/Magento/Framework/App/etc/routes_merged.xsd'; } public function testRouteConfigsValidation() diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php index 72ac6dbe83099c4db0b562d303a8ee034a46f3fc..0030df52d92b0564e9eb266d53d00b739ff1f6c2 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php @@ -46,7 +46,7 @@ class TemplateFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrit ); $file = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager()->get( 'Magento\Framework\View\FileSystem' - )->getFilename( + )->getTemplateFileName( $template, $params ); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php index ef47a54c19a75845ec803544bd393fbe618f7025..54a8d2ccd12576c5cdb10e7b114ec59d402a6495 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php @@ -36,7 +36,7 @@ class ViewConfigFilesTest extends \PHPUnit_Framework_TestCase \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getPath( - \Magento\Framework\App\Filesystem::LIB_DIR + \Magento\Framework\App\Filesystem::LIB_INTERNAL ) . '/Magento/Framework/Config/etc/view.xsd', $errors ); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php deleted file mode 100644 index ec198cc517458dc5f44ec721b3c8baaa67042316..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php +++ /dev/null @@ -1,204 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Test\Integrity\Modular; - -class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity -{ - public function testViewFilesFromModulesView() - { - $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); - $invoker( - /** - * @param string $application - * @param string $file - */ - function ($application, $file) { - if ($application != 'base') { - \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea($application); - } - \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\View\DesignInterface') - ->setDefaultDesignTheme(); - $result = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\View\FileSystem') - ->getViewFile($file); - - $fileInfo = pathinfo($result); - if ($fileInfo['extension'] === 'css') { - if (!file_exists($result)) { - $file = str_replace('.css', '.less', $file); - $result = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Framework\View\FileSystem') - ->getViewFile($file); - }; - } - - $this->assertFileExists($result); - }, - $this->viewFilesFromModulesViewDataProvider() - ); - } - - /** - * Collect getViewUrl() calls from base templates - * - * @return array - */ - public function viewFilesFromModulesViewDataProvider() - { - $files = array(); - /** @var $configModelReader \Magento\Framework\Module\Dir\Reader */ - $configModelReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\Module\Dir\Reader' - ); - foreach ($this->_getEnabledModules() as $moduleName) { - $moduleViewDir = $configModelReader->getModuleDir('view', $moduleName); - if (!is_dir($moduleViewDir)) { - continue; - } - $this->_findViewFilesInViewFolder($moduleViewDir, $files); - } - $result = array(); - foreach ($files as $area => $references) { - foreach ($references as $file) { - $result[] = array($area, $file); - } - } - return $result; - } - - /** - * Find view file references per area in declared modules. - * - * @param string $moduleViewDir - * @param array $files - * @return null - */ - protected function _findViewFilesInViewFolder($moduleViewDir, &$files) - { - foreach (new \DirectoryIterator($moduleViewDir) as $viewAppDir) { - $area = $viewAppDir->getFilename(); - if (0 === strpos($area, '.') || !$viewAppDir->isDir()) { - continue; - } - foreach (new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($viewAppDir->getRealPath()) - ) as $fileInfo) { - $references = $this->_findReferencesToViewFile($fileInfo); - if (!isset($files[$area])) { - $files[$area] = $references; - } else { - $files[$area] = array_merge($files[$area], $references); - } - $files[$area] = array_unique($files[$area]); - } - } - } - - /** - * Scan specified file for getViewUrl() pattern - * - * @param \SplFileInfo $fileInfo - * @return array - */ - protected function _findReferencesToViewFile(\SplFileInfo $fileInfo) - { - if (!$fileInfo->isFile() || !preg_match('/\.phtml$/', $fileInfo->getFilename())) { - return array(); - } - - $result = array(); - $content = file_get_contents($fileInfo->getRealPath()); - if (preg_match_all('/\$this->getViewFileUrl\(\'([^\']+?)\'\)/', $content, $matches)) { - foreach ($matches[1] as $value) { - if ($this->_isFileForDisabledModule($value)) { - continue; - } - $result[] = $value; - } - } - return $result; - } - - public function testViewFilesFromModulesCode() - { - $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); - $invoker( - /** - * getViewUrl() hard-coded in the php-files - * - * @param string $application - * @param string $file - */ - function ($application, $file) { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\State' - )->setAreaCode( - $application - ); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\View\DesignInterface' - )->setDefaultDesignTheme(); - $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\View\FileSystem' - ); - $this->assertFileExists($filesystem->getViewFile($file)); - }, - $this->viewFilesFromModulesCodeDataProvider() - ); - } - - /** - * @return array - */ - public function viewFilesFromModulesCodeDataProvider() - { - $allFiles = array(); - foreach (glob(__DIR__ . '/_files/view_files*.php') as $file) { - $allFiles = array_merge($allFiles, include $file); - } - return $this->_removeDisabledModulesFiles($allFiles); - } - - /** - * Scans array of file information and removes files, that belong to disabled modules. - * Thus we won't test them. - * - * @param array $allFiles - * @return array - */ - protected function _removeDisabledModulesFiles($allFiles) - { - $result = array(); - foreach ($allFiles as $fileInfo) { - $fileName = $fileInfo[1]; - if ($this->_isFileForDisabledModule($fileName)) { - continue; - } - $result[] = $fileInfo; - } - return $result; - } -} diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/view_files_ce.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/view_files_ce.php deleted file mode 100644 index 65be92ce8787da41a672e798ce2aaa5819909635..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/_files/view_files_ce.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * View files - * - * Format: array(<application>[, <file>]) - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -return array( - array('adminhtml', 'images/ajax-loader.gif'), - array('adminhtml', 'images/fam_bullet_disk.gif'), - array('adminhtml', 'images/fam_link.gif'), - array('adminhtml', 'images/grid-cal.gif'), - array('adminhtml', 'images/rule_chooser_trigger.gif'), - array('adminhtml', 'images/rule_component_add.gif'), - array('adminhtml', 'images/rule_component_apply.gif'), - array('adminhtml', 'images/rule_component_remove.gif'), - array('adminhtml', 'Magento_Cms::images/placeholder_thumbnail.jpg'), - array('adminhtml', 'Magento_Cms::images/wysiwyg_skin_image.png'), - array('adminhtml', 'Magento_Core::fam_book_open.png'), - array('adminhtml', 'Magento_Theme::favicon.ico'), - array('frontend', 'Magento_Cms::images/about_us_img.jpg'), - array('frontend', 'Magento_Core::calendar.gif'), - array('frontend', 'Magento_Core::fam_book_open.png'), - array('frontend', 'Magento_Theme::favicon.ico'), - array('frontend', 'Magento_Catalog::images/product/placeholder/image.jpg'), - array('frontend', 'Magento_Catalog::images/product/placeholder/small_image.jpg'), - array('install', 'Magento_Theme::favicon.ico') -); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/StaticFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/StaticFilesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b81f07eba9023942433fa43c227a1452840d2167 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/StaticFilesTest.php @@ -0,0 +1,316 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Test\Integrity; + +/** + * An integrity test that searches for references to static files and asserts that they are resolved via fallback + */ +class StaticFilesTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile + */ + private $fallback; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple + */ + private $explicitFallback; + + /** + * @var \Magento\Framework\View\Design\Theme\FlyweightFactory + */ + private $themeRepo; + + /** + * @var \Magento\Framework\View\DesignInterface + */ + private $design; + + protected function setUp() + { + $om = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager(); + $this->fallback = $om->get('Magento\Framework\View\Design\FileResolution\Fallback\StaticFile'); + $this->explicitFallback = $om->get('Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple'); + $this->themeRepo = $om->get('Magento\Framework\View\Design\Theme\FlyweightFactory'); + $this->design = $om->get('Magento\Framework\View\DesignInterface'); + } + + /** + * Scan references to files from other static files and assert they are correct + * + * The CSS or LESS files may refer to other resources using @import or url() notation + * We want to check integrity of all these references + * Note that the references may have syntax specific to the Magento preprocessing subsystem + * + * @param string $file + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @param string $filePath + * @dataProvider referencesFromStaticFilesDataProvider + */ + public function testReferencesFromStaticFiles($file, $area, $themePath, $locale, $module, $filePath) + { + $contents = file_get_contents($file); + preg_match_all( + \Magento\Framework\View\Url\CssResolver::REGEX_CSS_RELATIVE_URLS, + $contents, + $matches + ); + foreach ($matches[1] as $relatedResource) { + if (false !== strpos($relatedResource, '@')) { // unable to parse paths with LESS variables/mixins + continue; + } + list($relatedModule, $relatedPath) = + \Magento\Framework\View\Asset\Repository::extractModule($relatedResource); + if ($relatedModule) { + $fallbackModule = $relatedModule; + } else { + if ('less' == pathinfo($filePath, PATHINFO_EXTENSION)) { + /** + * The LESS library treats the related resources with relative links not in the same way as CSS: + * when another LESS file is included, it is embedded directly into the resulting document, but the + * relative paths of related resources are not adjusted accordingly to the new root file. + * Probably it is a bug of the LESS library. + */ + $this->markTestSkipped("Due to LESS library specifics, the '{$relatedResource}' cannot be tested."); + } + $fallbackModule = $module; + $relatedPath = \Magento\Framework\View\FileSystem::getRelatedPath($filePath, $relatedResource); + + } + // the $relatedPath will be suitable for feeding to the fallback system + $this->assertNotEmpty( + $this->getStaticFile($area, $themePath, $locale, $relatedPath, $fallbackModule), + "The related resource cannot be resolved through fallback: '{$relatedResource}'" + ); + } + } + + /** + * Get a default theme path for specified area + * + * @param string $area + * @return string + * @throws \LogicException + */ + private function getDefaultThemePath($area) + { + switch ($area) { + case 'frontend': + return $this->design->getConfigurationDesignTheme($area); + case 'adminhtml': + return 'Magento/backend'; + case 'install': + return 'Magento/basic'; + default: + throw new \LogicException('Unable to determine theme path'); + } + } + + /** + * Get static file through fallback system using specified params + * + * @param string $area + * @param string|\Magento\Framework\View\Design\ThemeInterface $theme - either theme path (string) or theme object + * @param string $locale + * @param string $filePath + * @param string $module + * @param bool $isExplicit + * @return bool|string + */ + private function getStaticFile($area, $theme, $locale, $filePath, $module, $isExplicit = false) + { + if (!is_object($theme)) { + $themePath = $theme ?: $this->getDefaultThemePath($area); + $theme = $this->themeRepo->create($themePath, $area); + } + if ($isExplicit) { + $type = \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE; + return $this->explicitFallback->resolve($type, $filePath, $area, $theme, $locale, $module); + } + return $this->fallback->getFile($area, $theme, $locale, $filePath, $module); + } + + /** + * @return array + */ + public function referencesFromStaticFilesDataProvider() + { + $result = array(); + $files = \Magento\TestFramework\Utility\Files::init()->getStaticPreProcessingFiles('*.{less,css}'); + foreach ($files as $file => $data) { + $result[$file] = array_merge(array($file), $data); + } + return $result; + } + + /** + * There must be either .css or .less file, because if there are both, then .less will not be found by fallback + * + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @param string $filePath + * @dataProvider lessNotConfusedWithCssDataProvider + */ + public function testLessNotConfusedWithCss($area, $themePath, $locale, $module, $filePath) + { + if (false !== strpos($filePath, 'widgets.css')) { + $filePath .= ''; + } + $fileName = pathinfo($filePath, PATHINFO_FILENAME); + $dirName = dirname($filePath); + if ('.' == $dirName) { + $dirName = ''; + } else { + $dirName .= '/'; + } + $cssPath = $dirName . $fileName . '.css'; + $lessPath = $dirName . $fileName . '.less'; + $cssFile = $this->getStaticFile($area, $themePath, $locale, $cssPath, $module, true); + $lessFile = $this->getStaticFile($area, $themePath, $locale, $lessPath, $module, true); + $this->assertFalse( + $cssFile && $lessFile, + "A resource file of only one type must exist. Both found: '$cssFile' and '$lessFile'" + ); + } + + /** + * @return array + */ + public function lessNotConfusedWithCssDataProvider() + { + return \Magento\TestFramework\Utility\Files::init()->getStaticPreProcessingFiles('*.{less,css}'); + } + + /** + * Test if references $this->getViewFileUrl() in .phtml-files are correct + * + * @param string $phtmlFile + * @param string $area + * @param string $themePath + * @param string $fileId + * @dataProvider referencesFromPhtmlFilesDataProvider + */ + public function testReferencesFromPhtmlFiles($phtmlFile, $area, $themePath, $fileId) + { + list($module, $filePath) = \Magento\Framework\View\Asset\Repository::extractModule($fileId); + $this->assertNotEmpty( + $this->getStaticFile($area, $themePath, 'en_US', $filePath, $module), + "Unable to locate '{$fileId}' reference from {$phtmlFile}" + ); + } + + /** + * @return array + */ + public function referencesFromPhtmlFilesDataProvider() + { + $result = array(); + foreach (\Magento\TestFramework\Utility\Files::init()->getPhtmlFiles(true, false) as $file => $info) { + list($area, $themePath) = $info; + foreach ($this->collectGetViewFileUrl($file) as $fileId) { + $result[] = array($file, $area, $themePath, $fileId); + } + } + return $result; + } + + /** + * Find invocations of $this->getViewFileUrl() and extract the first argument value + * + * @param string $file + * @return array + */ + private function collectGetViewFileUrl($file) + { + $result = array(); + if (preg_match_all('/\$this->getViewFileUrl\(\'([^\']+?)\'\)/', file_get_contents($file), $matches)) { + foreach ($matches[1] as $fileId) { + $result[] = $fileId; + } + } + return $result; + } + + /** + * @param string $layoutFile + * @param string $area + * @param string $themePath + * @param string $fileId + * @dataProvider referencesFromLayoutFilesDataProvider + */ + public function testReferencesFromLayoutFiles($layoutFile, $area, $themePath, $fileId) + { + list($module, $filePath) = \Magento\Framework\View\Asset\Repository::extractModule($fileId); + $this->assertNotEmpty( + $this->getStaticFile($area, $themePath, 'en_US', $filePath, $module), + "Unable to locate '{$fileId}' reference from layout XML in {$layoutFile}" + ); + } + + /** + * @return array + */ + public function referencesFromLayoutFilesDataProvider() + { + $result = array(); + $files = \Magento\TestFramework\Utility\Files::init()->getLayoutFiles(array('with_metainfo' => true), false); + foreach ($files as $file => $metaInfo) { + list($area, $themePath) = $metaInfo; + foreach ($this->collectFileIdsFromLayout($file) as $fileId) { + $result[] = array($file, $area, $themePath, $fileId); + } + } + return $result; + } + + /** + * Collect view file declarations in layout XML-files + * + * @param string $file + * @return array + */ + private function collectFileIdsFromLayout($file) + { + $xml = simplexml_load_file($file); + // Collect "addCss" and "addJs" from theme layout + $elements = $xml->xpath( + '//block[@class="Magento\Theme\Block\Html\Head\Css" or @class="Magento\Theme\Block\Html\Head\Script"]' . + '/arguments/argument[@name="file"]' + ); + $result = array(); + if ($elements) { + foreach ($elements as $node) { + $result[] = (string)$node; + } + } + return $result; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php index f4f73cb3a93406986fdc70d478f2a9d3b8f3fb63..7f27f901c9a36d2b074c47f7029d6fd7d2571655 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php @@ -48,12 +48,9 @@ class TemplateFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrit $params = array('area' => $area, 'themeId' => $themeId, 'module' => $module); try { - $templateFilename = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager()->get( - 'Magento\Framework\View\FileSystem' - )->getFilename( - $file, - $params - ); + $templateFilename = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager() + ->get('Magento\Framework\View\FileSystem') + ->getTemplateFileName($file, $params); $this->assertFileExists($templateFilename); } catch (\PHPUnit_Framework_ExpectationFailedException $e) { $invalidTemplates[] = "File \"{$templateFilename}\" does not exist." . diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php deleted file mode 100644 index 9dd2299f371013fba1306d2b8956ea18896c736b..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php +++ /dev/null @@ -1,337 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Test\Integrity\Theme; - -class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity -{ - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected $objectManager; - - /** - * @var \Magento\Framework\View\FileSystem - */ - protected $viewFileSystem; - - /** - * @var \Magento\Framework\App\Filesystem - */ - protected $filesystem; - - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager(); - $this->viewFileSystem = $this->objectManager->get('Magento\Framework\View\FileSystem'); - $this->filesystem = $this->objectManager->get('Magento\Framework\App\Filesystem'); - $this->objectManager->configure( - array('preferences' => array('Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data')) - ); - } - - /** - * @magentoAppIsolation enabled - */ - public function testViewLessFilesPreProcessing() - { - $errorHandlerMock = $this->getMock( - 'Magento\Framework\Less\PreProcessor\ErrorHandlerInterface', - array('processException') - ); - $this->objectManager->addSharedInstance($errorHandlerMock, 'Magento\Framework\Less\PreProcessor\ErrorHandler'); - $errorHandlerMock->expects($this->any())->method('processException')->will( - $this->returnCallback( - function ($exception) { - /** @var $exception \Exception */ - $this->fail($exception->getMessage()); - } - ) - ); - /** @var $lessPreProcessor \Magento\Framework\Less\PreProcessor */ - $lessPreProcessor = $this->objectManager->create('Magento\Framework\Less\PreProcessor'); - $directoryRead = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - /** - * Solution for \Magento\Framework\View\Layout\File\Source\Base aggregator, it depends on theme and area - */ - $theme = $this->objectManager->create('Magento\Framework\View\Design\ThemeInterface'); - $theme->setArea('frontend'); - $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); - $invoker( - /** - * @param string $file - * @param string $area - */ - function ($file, $area) use ($lessPreProcessor, $directoryRead, $theme) { - $fileInfo = pathinfo($file); - if ($fileInfo['extension'] == 'css') { - $lessFile = "{$fileInfo['dirname']}/{$fileInfo['filename']}.less"; - $params = array('area' => $area, 'themeModel' => $theme); - $cssSourceFile = $this->viewFileSystem->getViewFile($file, $params); - $lessSourceFile = $this->viewFileSystem->getViewFile($lessFile, $params); - if ($directoryRead->isExist( - $directoryRead->getRelativePath($cssSourceFile) - ) && $directoryRead->isExist( - $directoryRead->getRelativePath($lessSourceFile) - ) - ) { - $this->fail("Duplicate files: '{$lessSourceFile}', '{$cssSourceFile}'"); - } elseif ($directoryRead->isExist($directoryRead->getRelativePath($lessSourceFile))) { - $fileList = $lessPreProcessor->processLessInstructions($lessFile, $params); - $this->assertFileExists($fileList->getPublicationPath()); - } - } - }, - $this->viewFilesFromThemesDataProvider(array($theme)) - ); - } - - /** - * @magentoAppIsolation enabled - */ - public function testViewFilesFromThemes() - { - $directoryRead = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - /** @var $viewService \Magento\Framework\View\Service */ - $viewService = $this->objectManager->get('Magento\Framework\View\Service'); - $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); - $invoker( - /** - * @param string $file - * @param string $area - * @param string $themeId - */ - function ($file, $area, $themeId) use ($directoryRead, $viewService) { - $params = array('area' => $area, 'themeId' => $themeId); - $file = $viewService->extractScope($file, $params); - $viewFile = $this->viewFileSystem->getViewFile($file, $params); - $fileInfo = pathinfo($file); - - $relativePath = $directoryRead->getRelativePath($viewFile); - if ($fileInfo['extension'] === 'css' && !$directoryRead->isExist($relativePath)) { - $viewFile = $this->viewFileSystem->getViewFile( - "{$fileInfo['dirname']}/{$fileInfo['filename']}.less", - $params - ); - $fileInfo['extension'] = 'less'; - } - - if ($fileInfo['extension'] === 'css') { - $this->checkCssRelatedFiles($file, $viewFile, $params); - } else { - $this->assertFileExists($viewFile); - } - }, - $this->viewFilesFromThemesDataProvider($this->_getDesignThemes()) - ); - } - - /** - * Checks a css content and all related files - * - * @param string $file - * @param string $viewFile - * @param array $params - */ - protected function checkCssRelatedFiles($file, $viewFile, $params) - { - $files = array(); - $content = file_get_contents($viewFile); - preg_match_all(\Magento\Framework\View\Url\CssResolver::REGEX_CSS_RELATIVE_URLS, $content, $matches); - foreach ($matches[1] as $relativePath) { - $path = $this->_addCssDirectory($relativePath, $file); - $pathFile = $this->viewFileSystem->getViewFile($path, $params); - if (!is_file($pathFile)) { - $files[] = $relativePath; - } - } - if (!empty($files)) { - $this->fail('Cannot find file(s): ' . implode(', ', $files)); - } - } - - /** - * Analyze path to a file in CSS url() directive and add the original CSS-file relative path to it - * - * @param string $relativePath - * @param string $sourceFile - * @return string - * @throws \Exception if the specified relative path cannot be apparently resolved - */ - protected function _addCssDirectory($relativePath, $sourceFile) - { - if (strpos($relativePath, '::') > 0) { - return $relativePath; - } - $file = dirname($sourceFile) . '/' . $relativePath; - $parts = explode('/', $file); - $result = array(); - foreach ($parts as $part) { - if ('..' === $part) { - if (null === array_pop($result)) { - throw new \Exception('Invalid file: ' . $file); - } - } elseif ('.' !== $part) { - $result[] = $part; - } - } - return implode('/', $result); - } - - /** - * Collect getViewUrl() and similar calls from themes - * - * @param \Magento\Core\Model\Theme[] $themes - * @return array - */ - public function viewFilesFromThemesDataProvider($themes) - { - // Find files, declared in views - $files = array(); - foreach ($themes as $theme) { - $this->_collectViewUrlInvokes($theme, $files); - $this->_collectViewLayoutDeclarations($theme, $files); - } - - // Populate data provider in correspondence of themes to view files - $result = array(); - foreach ($themes as $theme) { - if (!isset($files[$theme->getId()])) { - continue; - } - foreach (array_unique($files[$theme->getId()]) as $file) { - $result["{$theme->getId()}/{$file}"] = array( - 'file' => $file, - 'area' => $theme->getArea(), - 'theme' => $theme->getId() - ); - } - } - return array_values($result); - } - - /** - * Collect getViewFileUrl() from theme templates - * - * @param \Magento\Core\Model\Theme $theme - * @param array &$files - */ - protected function _collectViewUrlInvokes($theme, &$files) - { - $searchDir = $theme->getCustomization()->getThemeFilesPath(); - if (empty($searchDir)) { - return; - } - $dirLength = strlen($searchDir); - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($searchDir)) as $fileInfo) { - // Check that file path is valid - $relativePath = substr($fileInfo->getPath(), $dirLength); - if ($this->_validateTemplatePath($relativePath)) { - // Scan file for references to other files - foreach ($this->_findReferencesToViewFile($fileInfo) as $file) { - $files[$theme->getId()][] = $file; - } - } - } - } - - /** - * Collect view files declarations into layout - * - * @param \Magento\Core\Model\Theme $theme - * @param array &$files - */ - protected function _collectViewLayoutDeclarations($theme, &$files) - { - // Collect "addCss" and "addJs" from theme layout - /** @var \Magento\Framework\View\Layout\ProcessorInterface $layoutUpdate */ - $layoutUpdate = $this->objectManager->create( - 'Magento\Framework\View\Layout\ProcessorInterface', - array('theme' => $theme) - ); - $fileLayoutUpdates = $layoutUpdate->getFileLayoutUpdatesXml(); - $elements = $fileLayoutUpdates->xpath( - '//block[@class="Magento\Theme\Block\Html\Head\Css" or @class="Magento\Theme\Block\Html\Head\Script"]' . - '/arguments/argument[@name="file"]' - ); - if ($elements) { - foreach ($elements as $filenameNode) { - $viewFile = (string)$filenameNode; - if ($this->_isFileForDisabledModule($viewFile)) { - continue; - } - $files[$theme->getId()][] = $viewFile; - } - } - } - - /** - * Checks file path - whether there are mentions of disabled modules - * - * @param string $relativePath - * @return bool - */ - protected function _validateTemplatePath($relativePath) - { - if (!preg_match('/\.phtml$/', $relativePath)) { - return false; - } - $relativePath = trim($relativePath, '/\\'); - $parts = explode('/', $relativePath); - $enabledModules = $this->_getEnabledModules(); - foreach ($parts as $part) { - if (!preg_match('/^[A-Z][[:alnum:]]*_[A-Z][[:alnum:]]*$/', $part)) { - continue; - } - if (!isset($enabledModules[$part])) { - return false; - } - } - return true; - } - - /** - * Scan specified file for getViewUrl() pattern - * - * @param \SplFileInfo $fileInfo - * @return array - */ - protected function _findReferencesToViewFile(\SplFileInfo $fileInfo) - { - $result = array(); - if (preg_match_all( - '/\$this->getViewFileUrl\(\'([^\']+?)\'\)/', - file_get_contents($fileInfo->getRealPath()), - $matches - ) - ) { - foreach ($matches[1] as $viewFile) { - if ($this->_isFileForDisabledModule($viewFile)) { - continue; - } - $result[] = $viewFile; - } - } - return $result; - } -} diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php index b68523e31c322dc19c12d6c66f493a2f517e48aa..1eeace25b73699bcd2594cd7831a33c074ffb1b6 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php @@ -38,7 +38,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase } $this->_validateConfigFile( $file, - $this->getPath(\Magento\Framework\App\Filesystem::LIB_DIR) . '/Magento/Framework/Config/etc/view.xsd' + $this->getPath(\Magento\Framework\App\Filesystem::LIB_INTERNAL) . '/Magento/Framework/Config/etc/view.xsd' ); } @@ -85,7 +85,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase { $this->_validateConfigFile( $file, - $this->getPath(\Magento\Framework\App\Filesystem::LIB_DIR) . '/Magento/Framework/Config/etc/theme.xsd' + $this->getPath(\Magento\Framework\App\Filesystem::LIB_INTERNAL) . '/Magento/Framework/Config/etc/theme.xsd' ); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php index dda3f84c7a3c7d6ec40c3a14a96aeaa1afbc16d9..606d80d968ecb82fab9d18c85678244791d717a6 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php @@ -46,9 +46,14 @@ class ViewFileReferenceTest extends \PHPUnit_Framework_TestCase protected static $_fallbackRule; /** - * @var \Magento\Framework\View\Design\FileResolution\Strategy\Fallback + * @var \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile */ - protected static $_fallback; + protected static $_viewFilesFallback; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\File + */ + static protected $_filesFallback; /** * @var array @@ -67,11 +72,16 @@ class ViewFileReferenceTest extends \PHPUnit_Framework_TestCase array('preferences' => array('Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data')) ); - /** @var $fallbackFactory \Magento\Framework\View\Design\Fallback\Factory */ - $fallbackFactory = $objectManager->get('Magento\Framework\View\Design\Fallback\Factory'); - self::$_fallbackRule = $fallbackFactory->createViewFileRule(); + /** @var $fallbackPool \Magento\Framework\View\Design\Fallback\RulePool */ + $fallbackPool = $objectManager->get('Magento\Framework\View\Design\Fallback\RulePool'); + self::$_fallbackRule = $fallbackPool->getRule( + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE + ); - self::$_fallback = $objectManager->get('Magento\Framework\View\Design\FileResolution\Strategy\Fallback'); + self::$_viewFilesFallback = $objectManager->get( + 'Magento\Framework\View\Design\FileResolution\Fallback\StaticFile' + ); + self::$_filesFallback = $objectManager->get('Magento\Framework\View\Design\FileResolution\Fallback\File'); // Themes to be checked self::$_themeCollection = $objectManager->get('Magento\Core\Model\Theme\Collection'); @@ -139,7 +149,7 @@ class ViewFileReferenceTest extends \PHPUnit_Framework_TestCase */ public function testModularFallback($modularCall, array $usages, $area) { - list(, $file) = explode(\Magento\Framework\View\Service::SCOPE_SEPARATOR, $modularCall); + list(, $file) = explode(\Magento\Framework\View\Asset\Repository::FILE_ID_SEPARATOR, $modularCall); $wrongResolutions = array(); foreach (self::$_themeCollection as $theme) { @@ -173,13 +183,13 @@ class ViewFileReferenceTest extends \PHPUnit_Framework_TestCase protected function _getFileResolutions(\Magento\Framework\View\Design\ThemeInterface $theme, $file) { $found = array(); - $fileResolved = self::$_fallback->getFile($theme->getArea(), $theme, $file); + $fileResolved = self::$_filesFallback->getFile($theme->getArea(), $theme, $file); if (file_exists($fileResolved)) { $found[$fileResolved] = $fileResolved; } foreach (self::$_checkThemeLocales[$theme->getFullPath()] as $locale) { - $fileResolved = self::$_fallback->getViewFile($theme->getArea(), $theme, $locale, $file); + $fileResolved = self::$_viewFilesFallback->getFile($theme->getArea(), $theme, $locale, $file); if (file_exists($fileResolved)) { $found[$fileResolved] = $fileResolved; } @@ -198,7 +208,8 @@ class ViewFileReferenceTest extends \PHPUnit_Framework_TestCase $modulePattern = '[A-Z][a-z]+_[A-Z][a-z]+'; $filePattern = '[[:alnum:]_/-]+\\.[[:alnum:]_./-]+'; - $pattern = '#' . $modulePattern . preg_quote(\Magento\Framework\View\Service::SCOPE_SEPARATOR) + $pattern = '#' . $modulePattern + . preg_quote(\Magento\Framework\View\Asset\Repository::FILE_ID_SEPARATOR) . $filePattern . '#S'; if (!preg_match_all($pattern, file_get_contents($file), $matches)) { continue; diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml index 1c0f650f56424ac5f1b9dd8643cabb6a6ef8fb65..7c0e99e0b899020d438032801c37ac4bd3d2027c 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_FirstModule"/> </config> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml index 789ef9761a9f90a14a97b8de15870ff7cff6be9f..adc00b7f6061432da6329fc5f8a3eba15a3b81af 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module1"> <depends> <module name="Magento_Core"/> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml index 5a0c62d73af34c59666b73d9234a5838d26c032a..6cc97e23113e299f1d4819c4b7407417ae5c4a5b 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module2"> <depends> <module name="Magento_Core"/> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml index 45dc90668ee6601f7b0a288ff634c8f6264c9cd0..80c877fb23e51bbb14d8bf6df746095d9bea29bb 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module1"> </module> </config> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml index 63c10ddf340821265abe48455b804d6a2d350950..25e8b929b537722f8797172efaa0f56641b45971 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module1"> <depends> <module name="Module2"/> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml index bf40c4cf49092e21f13619ef2a5a4a19790c11c3..2a72d765ac5f6500c4a667fc472000dd214afa6b 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module2"> <depends> <module name="Module1"/> diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/GeneratorTest.php index 78161df579626f0d189b121a2f3c86a7de6af16d..6aabca2d2db8baf00c8bab1347a1de8d1eebf2bc 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/GeneratorTest.php @@ -73,8 +73,8 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase 'paths' => array( $this->_source . '/app/code/', $this->_source . '/app/design/', - $this->_source . '/pub/lib/mage/', - $this->_source . '/pub/lib/varien/' + $this->_source . '/lib/web/mage/', + $this->_source . '/lib/web/varien/' ), 'fileMask' => '/\.(js|phtml)$/' ), diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/expected/with_context.csv b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/expected/with_context.csv index 605a1789c8efef458632c7e8ad03744e023a2e31..c8effa0f0540cd896056d3c80bf21a0c0710308f 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/expected/with_context.csv +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/expected/with_context.csv @@ -3,7 +3,7 @@ Model,Model,module,"Magento_FirstModule,Magento_SecondModule" "Module template","Module template",module,Magento_FirstModule "Theme template","Theme template",theme,adminhtml/default "Module js","Module js",module,Magento_FirstModule -"Lib js","Lib js",pub,"pub/lib/mage/file.js,pub/lib/varien/file.js" +"Lib js","Lib js",lib,"lib/web/mage/file.js,lib/web/varien/file.js" "Module layout label","Module layout label",module,Magento_FirstModule "Module layout title","Module layout title",module,Magento_FirstModule "Theme layout label","Theme layout label",theme,adminhtml/default diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/pub/lib/mage/file.js b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/lib/web/mage/file.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/pub/lib/mage/file.js rename to dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/lib/web/mage/file.js diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/pub/lib/varien/file.js b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/lib/web/varien/file.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/pub/lib/varien/file.js rename to dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/lib/web/varien/file.js diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php index 27e59b6fa4f97f425e01106239c78524fd78edba..2b6288106c6ea8dc12a34755f88b2d436db7c7d1 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php @@ -45,7 +45,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase /** * @var string */ - protected $_pathPath; + protected $_packPath; /** * @var string @@ -67,28 +67,33 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase $this->_testDir = realpath(__DIR__ . '/_files'); $this->_expectedDir = $this->_testDir . '/expected'; $this->_dictionaryPath = $this->_testDir . '/source.csv'; - $this->_pathPath = $this->_testDir . '/pack'; + $this->_packPath = $this->_testDir . '/pack'; $this->_locale = 'de_DE'; $this->_expectedFiles = array( "/app/code/Magento/FirstModule/i18n/{$this->_locale}.csv", "/app/code/Magento/SecondModule/i18n/{$this->_locale}.csv", - "/app/design/adminhtml/default/i18n/{$this->_locale}.csv" + "/app/design/adminhtml/default/i18n/{$this->_locale}.csv", + "/lib/web/i18n/{$this->_locale}.csv", ); $this->_generator = ServiceLocator::getPackGenerator(); + + \Magento\Framework\System\Dirs::rm($this->_packPath); } protected function tearDown() { - \Magento\Framework\System\Dirs::rm($this->_pathPath); + \Magento\Framework\System\Dirs::rm($this->_packPath); } public function testGeneration() { - $this->_generator->generate($this->_dictionaryPath, $this->_pathPath, $this->_locale); + $this->assertFileNotExists($this->_packPath); + + $this->_generator->generate($this->_dictionaryPath, $this->_packPath, $this->_locale); foreach ($this->_expectedFiles as $file) { - $this->assertFileEquals($this->_expectedDir . $file, $this->_pathPath . $file); + $this->assertFileEquals($this->_expectedDir . $file, $this->_packPath . $file); } } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/expected/pub/lib/i18n/de_DE.csv b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/expected/lib/web/i18n/de_DE.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/expected/pub/lib/i18n/de_DE.csv rename to dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/expected/lib/web/i18n/de_DE.csv diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/source.csv b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/source.csv index 605a1789c8efef458632c7e8ad03744e023a2e31..c8effa0f0540cd896056d3c80bf21a0c0710308f 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/source.csv +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/_files/source.csv @@ -3,7 +3,7 @@ Model,Model,module,"Magento_FirstModule,Magento_SecondModule" "Module template","Module template",module,Magento_FirstModule "Theme template","Theme template",theme,adminhtml/default "Module js","Module js",module,Magento_FirstModule -"Lib js","Lib js",pub,"pub/lib/mage/file.js,pub/lib/varien/file.js" +"Lib js","Lib js",lib,"lib/web/mage/file.js,lib/web/varien/file.js" "Module layout label","Module layout label",module,Magento_FirstModule "Module layout title","Module layout title",module,Magento_FirstModule "Theme layout label","Theme layout label",theme,adminhtml/default diff --git a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php index dc8340c6e55b7731a82b0c7d9b0a22a3ed5ba23f..64b0fe1772e98e8b20ffba80d5623e6f5ffa52a9 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php @@ -95,112 +95,24 @@ class HeadTest extends \PHPUnit_Framework_TestCase array('file' => 'varien/form.js', 'properties' => array('ie_condition' => 'lt IE 7')) ); $this->assertEquals( - '<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://example.com/feed.xml" />' . - "\n" . - '<script type="text/javascript" src="http://localhost/pub/lib/varien/js.js"></script>' . - "\n" . - '<script type="text/javascript" ' . - 'src="http://localhost/pub/static/frontend/Magento/blank/en_US/Magento_Bundle/bundle.js">' . - '</script>' . - "\n" . - '<link rel="stylesheet" type="text/css" media="all"' . - ' href="http://localhost/pub/lib/tiny_mce/themes/advanced/skins/default/ui.css" />' . - "\n" . - '<link rel="stylesheet" type="text/css" media="print" ' . - 'href="http://localhost/pub/static/frontend/Magento/blank/en_US/css/styles.css" />' . - "\n" . - '<link rel="next" href="http://localhost/index.php/category.html" />' . - "\n" . - '<!--[if lt IE 7]>' . - "\n" . - '<script type="text/javascript" src="http://localhost/pub/lib/varien/form.js"></script>' . - "\n" . - '<![endif]-->' . - "\n", - $this->_block->getCssJsHtml() - ); - } - - /** - * @magentoAppIsolation enabled - */ - public function testGetCssJsHtmlBadLink() - { - - $this->_block->addChild( - 'ui.css', - 'Magento\Theme\Block\Html\Head\Css', - array('file' => 'not_exist_folder/wrong_bad_file2.xyz') - ); - $this->_block->addChild( - 'jjs', - 'Magento\Theme\Block\Html\Head\Script', - array('file' => 'not_exist_folder/wrong_bad_file.xyz') - ); - $this->assertEquals( - '<link rel="stylesheet" type="text/css" media="all"' . - ' href="http://localhost/index.php/core/index/notfound" />' . - "\n" . - '<script type="text/javascript" src="http://localhost/index.php/core/index/notfound"></script>' . - "\n", - $this->_block->getCssJsHtml() - ); - } - - /** - * Both existing and non-existent JS and CSS links are specified - * @magentoAppIsolation enabled - * @magentoConfigFixture current_store dev/js/merge_files 0 - * @magentoConfigFixture current_store dev/js/minify_files 0 - */ - public function testGetCssJsHtmlMixedLinks() - { - $this->_block->addChild( - 'varien/js.js', - 'Magento\Theme\Block\Html\Head\Script', - array('file' => 'varien/js.js') - ); - $this->_block->addChild( - 'jjs', - 'Magento\Theme\Block\Html\Head\Script', - array('file' => 'not_exist_folder/wrong_bad_file.xyz') - ); - $this->_block->addChild( - 'wrong_bad_file2.xyz', - 'Magento\Theme\Block\Html\Head\Script', - array('file' => 'not_exist_folder/wrong_bad_file2.xyz', 'properties' => array('ie_condition' => 'lt IE 7')) - ); - $this->_block->addChild( - 'sdsdsd.css', - 'Magento\Theme\Block\Html\Head\Css', - array('file' => 'not_exist_folder/wrong_bad_file2.xyz') - ); - - $this->_block->addChild( - 'css/styles.css', - 'Magento\Theme\Block\Html\Head\Css', - array('file' => 'css/styles.css', 'properties' => array('attributes' => 'media="print"')) - ); - - - - $this->assertEquals( - '<script type="text/javascript" src="http://localhost/pub/lib/varien/js.js"></script>' . - "\n" . - '<script type="text/javascript" src="http://localhost/index.php/core/index/notfound"></script>' . - "\n" . - '<!--[if lt IE 7]>' . - "\n" . - '<script type="text/javascript" src="http://localhost/index.php/core/index/notfound"></script>' . - "\n" . - '<![endif]-->' . - "\n" . - '<link rel="stylesheet" type="text/css" media="all"' . - ' href="http://localhost/index.php/core/index/notfound" />' . - "\n" . - '<link rel="stylesheet" type="text/css" media="print"' . - ' href="http://localhost/pub/static/frontend/Magento/blank/en_US/css/styles.css" />' . - "\n", + '<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://example.com/feed.xml" />' + . "\n" + . '<script type="text/javascript"' + . ' src="http://localhost/pub/static/frontend/Magento/blank/en_US/varien/js.js"></script>' . "\n" + . '<script type="text/javascript"' + . ' src="http://localhost/pub/static/frontend/Magento/blank/en_US/Magento_Bundle/bundle.js">' + . '</script>' . "\n" + . '<link rel="stylesheet" type="text/css" media="all"' + . ' href="http://localhost/pub/static/frontend/Magento/blank/en_US/' + . 'tiny_mce/themes/advanced/skins/default/ui.css" />' . "\n" + . '<link rel="stylesheet" type="text/css" media="print" ' + . 'href="http://localhost/pub/static/frontend/Magento/blank/en_US/css/styles.css" />' + . "\n" + . '<link rel="next" href="http://localhost/index.php/category.html" />' . "\n" + . '<!--[if lt IE 7]>' . "\n" + . '<script type="text/javascript"' + . ' src="http://localhost/pub/static/frontend/Magento/blank/en_US/varien/form.js"></script>' . "\n" + . '<![endif]-->' . "\n", $this->_block->getCssJsHtml() ); } @@ -213,7 +125,7 @@ class HeadTest extends \PHPUnit_Framework_TestCase { $this->_block->addChild('jjs', 'Magento\Theme\Block\Html\Head\Script', array('file' => 'varien/js.js')); $this->assertStringMatchesFormat( - '<script type="text/javascript" src="http://localhost/pub/cache/minify/%s_js.min.js"></script>', + '<script type="text/javascript" src="http://localhost/pub/static/_cache/minified/%s_js.min.js"></script>', $this->_block->getCssJsHtml() ); } @@ -226,7 +138,8 @@ class HeadTest extends \PHPUnit_Framework_TestCase { $this->_block->addChild('jjs', 'Magento\Theme\Block\Html\Head\Script', array('file' => 'varien/js.js')); $this->assertSame( - '<script type="text/javascript" src="http://localhost/pub/lib/varien/js.js"></script>' . "\n", + '<script type="text/javascript"' + . ' src="http://localhost/pub/static/frontend/Magento/blank/en_US/varien/js.js"></script>' . "\n", $this->_block->getCssJsHtml() ); } diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php index 91491c449cd7a2ef85c7fd4a85472736dbef0d21..1f5ce7dd72f797767977e3583b8926529d4b0112 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php @@ -57,7 +57,7 @@ class ThemeControllerTest extends \Magento\Backend\Utility\Controller 'Magento\Framework\App\Filesystem\DirectoryList' ); /** @var $directoryList \Magento\Framework\App\Filesystem\DirectoryList */ - $directoryList->addDirectory(\Magento\Framework\App\Filesystem::SYS_TMP_DIR, array('path' => '/')); + $directoryList->addDirectory(\Magento\Framework\App\Filesystem::SYS_TMP_DIR, array('path' => '')); $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface') ->getCollection() diff --git a/dev/tests/integration/testsuite/Magento/Tools/View/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Tools/View/GeneratorTest.php deleted file mode 100644 index f5350f812a12d2d55de0dd3b1147c555b281cd38..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Tools/View/GeneratorTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Tools\View; - -class GeneratorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\Shell - */ - protected $shell; - - /** - * @var \Magento\Framework\Filesystem\Driver\File - */ - protected $filesystem; - - /** - * Temporary destination directory - * - * @var string - */ - protected $tmpDir; - - protected function setUp() - { - $this->tmpDir = BP . '/var/static'; - $this->shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer()); - $this->filesystem = new \Magento\Framework\Filesystem\Driver\File(); - if (!$this->filesystem->isExists($this->tmpDir)) { - $this->filesystem->createDirectory($this->tmpDir, 0777); - } - } - - protected function tearDown() - { - if ($this->filesystem->isExists($this->tmpDir)) { - $this->filesystem->deleteDirectory($this->tmpDir); - } - } - - /** - * Test view generator - */ - public function testViewGenerator() - { - try { - $this->shell->execute( - 'php -f %s -- --source %s --destination %s', - array(BP . '/dev/tools/Magento/Tools/View/generator.php', BP . '/app/design', $this->tmpDir) - ); - } catch (\Magento\Framework\Exception $exception) { - $this->fail($exception->getPrevious()->getMessage()); - } - } -} diff --git a/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php b/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php index c01aa816295adb7410c642ec3f2162cfb860bfcf..a37e0df01ef15c375866d693025811fb84b11ec2 100644 --- a/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php +++ b/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php @@ -33,15 +33,6 @@ class InlineParserTest extends \PHPUnit_Framework_TestCase /** @var string */ protected $_storeId = 'default'; - public static function setUpBeforeClass() - { - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\View\DesignInterface' - )->setDesignTheme( - 'Magento/blank' - ); - } - protected function setUp() { /** @var $inline \Magento\Framework\Translate\Inline */ diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php index 99a2e04985c4a2301bfda529d7cdcb7400637c2c..206bbda0696bff58ea6c4bf6bfa23bc87b157cdb 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php @@ -95,7 +95,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase public function testGetDesign() { $widgetConfigs = $this->_object->get('widget.xml', 'design'); - $expected = realpath(__DIR__ . '/_files/design/frontend/Test/etc/widget.xml'); + $expected = str_replace('\\', '/', realpath(__DIR__ . '/_files/design/frontend/Test/etc/widget.xml')); $actual = $widgetConfigs->key(); $this->assertCount(1, $widgetConfigs); $this->assertStringEndsWith($actual, $expected); @@ -104,7 +104,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase public function testGetGlobal() { $widgetConfigs = $this->_object->get('widget.xml', 'global'); - $expected = realpath(__DIR__ . '/_files/code/Magento/Test/etc/widget.xml'); + $expected = str_replace('\\', '/', realpath(__DIR__ . '/_files/code/Magento/Test/etc/widget.xml')); $actual = $widgetConfigs->key(); $this->assertCount(1, $widgetConfigs); $this->assertStringEndsWith($actual, $expected); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml index 5c66db22206b6943b37f7a5999b544663e56bb81..63aa7da0ace2e4c021fcdb5647dfe780d0a81068 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Magento_Test" version="1.11.0.1" active="true" /> </config> diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php index dc4eda99a86c763e791d181e253a73e8d7bd9bcb..d3c27397774f129d1512e46ff2457f8b1f6703e9 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php @@ -61,7 +61,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $this->assertArrayHasKey('widget_window_url', $settings); $jsFilename = $settings['widget_plugin_src']; - $this->assertStringStartsWith('http://localhost/pub/lib/', $jsFilename); + $this->assertStringStartsWith('http://localhost/pub/static/adminhtml/Magento/backend/en_US/', $jsFilename); $this->assertStringEndsWith('editor_plugin.js', $jsFilename); $this->assertInternalType('array', $settings['widget_placeholders']); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php index d88eaab7e54a0e07eb6a2db5a860b53100ed130c..c5b4d41fd53d7f4cc4f02ff0fb3da256433af3c5 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php @@ -124,7 +124,7 @@ class WidgetTest extends \PHPUnit_Framework_TestCase $expectedFile = dirname( __DIR__ - ) . '/_files/design/adminhtml/Magento/backend/Magento_Catalog/images/product_widget_new.gif'; + ) . '/_files/design/adminhtml/Magento/backend/Magento_Catalog/web/images/product_widget_new.gif'; $this->assertFileEquals($expectedFile, $actualFile); } } diff --git a/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/Magento_Catalog/images/product_widget_new.gif b/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/Magento_Catalog/web/images/product_widget_new.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/Magento_Catalog/images/product_widget_new.gif rename to dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/Magento_Catalog/web/images/product_widget_new.gif diff --git a/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml b/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml index ed52b91893016ba6c678dbbeea468a5d2a67c7db..80b272c2dc3b6da695eac118bab1b3674a0825f8 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Basic</title> <version>2.0.0.0</version> </theme> diff --git a/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php b/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php index 66f399df75659618b8ded11f5294b6eef79fb694..c89104025486db21e0585ecc1118ae0de2e499cb 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php +++ b/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php @@ -21,6 +21,13 @@ * @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) */ + +\Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array( + \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( + \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/design') + ) +)); + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ->load(\Magento\Framework\App\Area::PART_CONFIG); @@ -28,4 +35,4 @@ $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Core\Model\Theme\Registration' ); -$registration->register(__DIR__ . '/design', '*/*/theme.xml'); +$registration->register('*/*/theme.xml'); diff --git a/dev/tests/js/framework/requirejs-util.js b/dev/tests/js/framework/requirejs-util.js new file mode 100644 index 0000000000000000000000000000000000000000..b0aeac43a83ae4589eb8402f8753acd7b0bc0dd7 --- /dev/null +++ b/dev/tests/js/framework/requirejs-util.js @@ -0,0 +1,67 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +(function ($, window) { + "use strict"; + + // List of define() calls with arguments and call stack + var defineCalls = []; + + // Get current call stack, including script path information + var getFileStack = function() { + try { + throw new Error(); + } catch (e) { + if (!e.stack) { + throw new Error('The browser needs to support Error.stack property'); + } + return e.stack; + } + }; + + // Intercept RequireJS define() calls, which are performed by AMD scripts upon loading + window.define = function () { + var stack = getFileStack(); + defineCalls.push({ + stack: stack, + args: arguments + }); + }; + + // Exposed interface + var requirejsUtil = { + getDefineArgsInScript: function (scriptPath) { + var result; + for (var i = 0; i < defineCalls.length; i++) { + if (defineCalls[i].stack.indexOf(scriptPath) >= 0) { + result = defineCalls[i].args; + break; + } + } + return result; + } + }; + + window.jsunit = window.jsunit || {}; + $.extend(window.jsunit, {requirejsUtil: requirejsUtil}); +})(jQuery, window); diff --git a/dev/tests/js/framework/stub.js b/dev/tests/js/framework/stub.js index 48a3b471c6d1df5120a5db00b1b43ad31d566983..6c20d9d3b881f2220ed75ec78fb055141f4cefcd 100644 --- a/dev/tests/js/framework/stub.js +++ b/dev/tests/js/framework/stub.js @@ -21,9 +21,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -"use strict"; - (function ($, window) { + "use strict"; function wrapMethod(object, property, method, copyProperties) { if (!object) { @@ -77,7 +76,7 @@ if (!Object.prototype.hasOwnProperty.call(method, prop)) { method[prop] = wrappedMethod[prop]; } - }; + } } return method; @@ -148,4 +147,4 @@ $.extend(window.jsunit, { stub: stub }); -})(jQuery, window); \ No newline at end of file +})(jQuery, window); diff --git a/dev/tests/js/jsTestDriver.php.dist b/dev/tests/js/jsTestDriver.php.dist index bb32ac0ab58d15dfebd4dce05a54c87daf2cb24f..701571acf86c7f3e985181ab0d0b785fe9d22758 100644 --- a/dev/tests/js/jsTestDriver.php.dist +++ b/dev/tests/js/jsTestDriver.php.dist @@ -29,37 +29,40 @@ return array( 'server' => 'http://localhost:9876', 'load' => array( - '/pub/lib/mage/translate.js', - '/pub/lib/mage/webapi.js', - '/pub/lib/jquery/jquery-ui-timepicker-addon-1.0.1.js', - '/pub/lib/jquery/jquery.tmpl.min.js', - '/dev/tests/js/framework/stub.js', - '/app/code/Magento/DesignEditor/view/adminhtml/js/base.js', - '/app/code/Magento/DesignEditor/view/adminhtml/js/design_editor.js', - '/app/code/Magento/DesignEditor/view/frontend/js/change/layout.js', - '/app/code/Magento/DesignEditor/view/frontend/js/design_editor.js', - '/app/code/Magento/DesignEditor/view/frontend/js/form_deactivation.js', - '/app/code/Magento/DesignEditor/view/adminhtml/js/infinitescroll.js', - '/pub/lib/jquery/jstree/jquery.jstree.js', - '/pub/lib/jquery/slimScroll/slimScroll.min.js', - '/app/code/Magento/DesignEditor/view/frontend/css/styles.css', - '/pub/lib/mage/cookies.js', - '/pub/lib/mage/calendar.js', - '/pub/lib/mage/loader_old.js', - '/pub/lib/mage/edit-trigger.js', - '/pub/lib/mage/translate-inline.js', - '/pub/lib/mage/translate-inline-vde.js', - '/pub/lib/mage/backend/form.js', - '/pub/lib/mage/backend/button.js', - '/pub/lib/mage/backend/tabs.js', - '/pub/lib/mage/validation.js', - '/pub/lib/mage/validation/validation.js', - '/pub/lib/mage/backend/menu.js', - '/pub/lib/mage/backend/suggest.js', - '/pub/lib/mage/backend/tree-suggest.js', - '/pub/lib/mage/gallery.js', - '/pub/lib/mage/gallery-fullscreen.js', - '/pub/lib/mage/zoom.js' + '/dev/tests/js/framework', + '/lib/web/mage/translate.js', + '/lib/web/mage/webapi.js', + '/lib/web/jquery/jquery-ui-timepicker-addon-1.0.1.js', + '/lib/web/jquery/jquery.tmpl.min.js', + '/dev/tests/js/framework', + '/app/code/Magento/DesignEditor/view/adminhtml/web/js/base.js', + '/app/code/Magento/DesignEditor/view/adminhtml/web/js/design_editor.js', + '/app/code/Magento/DesignEditor/view/frontend/web/js/change/layout.js', + '/app/code/Magento/DesignEditor/view/frontend/web/js/design_editor.js', + '/app/code/Magento/DesignEditor/view/frontend/web/js/form_deactivation.js', + '/app/code/Magento/DesignEditor/view/adminhtml/web/js/infinitescroll.js', + '/lib/web/jquery/jstree/jquery.jstree.js', + '/lib/web/jquery/slimScroll/slimScroll.min.js', + '/app/code/Magento/DesignEditor/view/frontend/web/css/styles.css', + '/lib/web/mage/cookies.js', + '/lib/web/mage/calendar.js', + '/lib/web/mage/loader_old.js', + '/lib/web/mage/edit-trigger.js', + '/lib/web/mage/translate-inline.js', + '/lib/web/mage/translate-inline-vde.js', + '/lib/web/mage/backend/form.js', + '/lib/web/mage/backend/button.js', + '/lib/web/mage/backend/tabs.js', + '/lib/web/mage/validation.js', + '/lib/web/mage/validation/validation.js', + '/lib/web/mage/backend/menu.js', + '/lib/web/mage/backend/suggest.js', + '/lib/web/mage/backend/tree-suggest.js', + '/lib/web/mage/gallery.js', + '/lib/web/mage/gallery-fullscreen.js', + '/lib/web/mage/zoom.js', + '/lib/web/mage/requirejs', + '/lib/internal/Magento/Framework/RequireJs/paths-updater.js', ), 'test' => array('/dev/tests/js/testsuite'), 'JsTestDriver' => '{{path_to_jstestdriver_jar}}' diff --git a/dev/tests/js/jsTestDriverOrder.php b/dev/tests/js/jsTestDriverOrder.php index 78643ba3a5137aecdd7ba8c0e676aff4c9d4611b..afe5055617f37b73e4244821fc57c4a1320a4b1e 100644 --- a/dev/tests/js/jsTestDriverOrder.php +++ b/dev/tests/js/jsTestDriverOrder.php @@ -27,12 +27,13 @@ * @return array */ return array( - '/pub/lib/jquery/jquery-1.8.2.js', - '/pub/lib/jquery/jquery-ui-1.9.2.js', - '/pub/lib/jquery/jquery.cookie.js', - '/pub/lib/headjs/head.min.js', - '/pub/lib/mage/mage.js', - '/pub/lib/mage/decorate.js', - '/pub/lib/jquery/jquery.validate.js', - '/pub/lib/jquery/jquery.metadata.js' + '/lib/web/jquery/jquery-1.8.2.js', + '/lib/web/jquery/jquery-ui-1.9.2.js', + '/dev/tests/js/framework/requirejs-util.js', + '/lib/web/jquery/jquery.cookie.js', + '/lib/web/headjs/head.min.js', + '/lib/web/mage/mage.js', + '/lib/web/mage/decorate.js', + '/lib/web/jquery/jquery.validate.js', + '/lib/web/jquery/jquery.metadata.js' ); diff --git a/dev/tests/js/run_js_tests.php b/dev/tests/js/run_js_tests.php index 22f5470330ad4c09c9384dcc1a69d57cd1b85b88..e79ee6ce04b0635bd2b7aa7ca36628ef453c5d87 100644 --- a/dev/tests/js/run_js_tests.php +++ b/dev/tests/js/run_js_tests.php @@ -26,7 +26,7 @@ define('RELATIVE_APP_ROOT', '../../..'); require __DIR__ . '/../../../app/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(realpath(RELATIVE_APP_ROOT . '/lib')); +(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(realpath(RELATIVE_APP_ROOT . '/lib/internal')); $userConfig = normalize('jsTestDriver.php'); $defaultConfig = normalize('jsTestDriver.php.dist'); diff --git a/dev/tests/js/testsuite/lib/storage/index.html b/dev/tests/js/testsuite/lib/storage/index.html new file mode 100644 index 0000000000000000000000000000000000000000..1427e9ee96c1c2b12d2e7836ca14f6649841001b --- /dev/null +++ b/dev/tests/js/testsuite/lib/storage/index.html @@ -0,0 +1,48 @@ +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category storage + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> + +<!DOCTYPE html> +<html> +<head> + <title>Unit test</title> + <base href="../../../"/> + <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> + <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> + <script src="../../../pub/lib/jquery/jquery.js"></script> + <script src="../../../pub/lib/jquery/jquery-ui.js"></script> + <script src="../../../pub/lib/jquery/jquery.cookie.js"></script> + <script src="../../../pub/lib/lib/storage.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> + <script type="text/javascript" src="testsuite/lib/storage/test-storage.js"></script> +</head> +<body> +<div id="qunit"></div> +<div id="qunit-fixture"> +</div> +</body> +</html> + diff --git a/dev/tests/js/testsuite/lib/storage/test-storage.js b/dev/tests/js/testsuite/lib/storage/test-storage.js new file mode 100644 index 0000000000000000000000000000000000000000..1754650cbb2afccfb3fcff45642ee9bdb57ba417 --- /dev/null +++ b/dev/tests/js/testsuite/lib/storage/test-storage.js @@ -0,0 +1,41 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.collapsible + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +test('Storage', function() { + expect(2); + var key = 'test-storage'; + var storage = $.localStorage; + if(window.localStorage !== null) { + localStorage.setItem(key,'false'); + storage.set(key,'true'); + equal(localStorage.getItem(key),"true"); + equal(localStorage.getItem(key),storage.get(key)); + } else { + $.cookie(key,'false'); + storage.set(key,'true'); + equal($.cookie(key),"true"); + equal($.cookie(key),storage.get(key)); + } +}); \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/accordion/accordion.js b/dev/tests/js/testsuite/mage/accordion/accordion.js new file mode 100644 index 0000000000000000000000000000000000000000..ca1afce75a1b244c459db72e88b01467ed58f5fd --- /dev/null +++ b/dev/tests/js/testsuite/mage/accordion/accordion.js @@ -0,0 +1,75 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.js + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* + + */ +test( "Initialization", function() { + expect(2); + var accordion = $("<div></div>"); + accordion.accordion(); + ok( accordion.is(':mage-accordion'), "widget instantiated" ); + accordion.accordion('destroy'); + ok( !accordion.is(':mage-accordion'), "widget destroyed" ); +}); + + + +test( "One-collapsible element", function() { + expect(4); + var accordion = $('<div></div>'); + var title1 = $('<div data-role="collapsible"></div>').appendTo(accordion); + var content1 = $('<div data-role="content"></div>').appendTo(accordion); + var title2 = $('<div data-role="collapsible"></div>').appendTo(accordion); + var content2 = $('<div data-role="content"></div>').appendTo(accordion); + accordion.appendTo("body"); + + accordion.accordion(); + ok( content1.is(':visible'), "content visible" ); + ok( content2.is(':hidden'), "content hidden" ); + title2.trigger('click'); + ok( content1.is(':hidden'), "content hidden" ); + ok( content2.is(':visible'), "content visible" ); + accordion.accordion('destroy'); + +}); + +test( "Multi-collapsible elements", function() { + expect(4); + var accordion = $('<div></div>'); + var title1 = $('<div data-role="collapsible"></div>').appendTo(accordion); + var content1 = $('<div data-role="content"></div>').appendTo(accordion); + var title2 = $('<div data-role="collapsible"></div>').appendTo(accordion); + var content2 = $('<div data-role="content"></div>').appendTo(accordion); + accordion.appendTo("body"); + + accordion.accordion({multipleCollapsible:true}); + ok( content1.is(':visible'), "content visible" ); + ok( content2.is(':hidden'), "content hidden" ); + title2.trigger('click'); + ok( content1.is(':visible'), "content visible" ); + ok( content2.is(':visible'), "content visible" ); + accordion.accordion('destroy'); +}); diff --git a/dev/tests/js/testsuite/mage/accordion/index.html b/dev/tests/js/testsuite/mage/accordion/index.html new file mode 100644 index 0000000000000000000000000000000000000000..8ca9e813b4c6377de29ba301d2aebbea4dc1be77 --- /dev/null +++ b/dev/tests/js/testsuite/mage/accordion/index.html @@ -0,0 +1,49 @@ +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.accordion + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> + +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <title>Accordion Widget: QUnit Tests </title> + <base href="../../../"/> + <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> + <script type="text/javascript" src="../../../pub/lib/jquery/jquery.js"></script> + <script type="text/javascript" src="../../../pub/lib/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/tabs.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/accordion.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/collapsible.js"></script> + <script type="text/javascript" src="testsuite/mage/accordion/accordion.js"></script> +</head> +<body> +<div id="qunit"></div> +<div id="qunit-fixture"> +</div> +</body> +</html> \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/calendar/calendar-qunit.js b/dev/tests/js/testsuite/mage/calendar/calendar-qunit.js index 3d9cd4140078d519585eec57a280e48a9c03212c..d411f3787704dea6becd9d0d88eb723b3ba37e5d 100644 --- a/dev/tests/js/testsuite/mage/calendar/calendar-qunit.js +++ b/dev/tests/js/testsuite/mage/calendar/calendar-qunit.js @@ -66,14 +66,14 @@ test( "omitting AM/PM in timeformat option changes AMPM option to false", functi test( "with server timezone offset", function(){ var serverTimezoneSeconds = 1346122095, calendar = $('#calendar').calendar({serverTimezoneSeconds: serverTimezoneSeconds}), - currentDate = new Date(); + currentDate = new Date(); currentDate.setTime((serverTimezoneSeconds + currentDate.getTimezoneOffset() * 60) * 1000); ok(currentDate.toString() === calendar.calendar('getTimezoneDate').toString()); calendar.calendar('destroy'); }); test( "without sever timezone offset", function() { var calendar = $('#calendar').calendar(), - currentDate = new Date(); + currentDate = new Date(); ok(currentDate.toString() === calendar.calendar('getTimezoneDate').toString()); calendar.calendar('destroy'); }); diff --git a/dev/tests/js/testsuite/mage/calendar/calendar-test.js b/dev/tests/js/testsuite/mage/calendar/calendar-test.js index a15b7da293a57e32751ee29228e4f77d05ac5971..fc9872bf6511375f40e1426b3aef91c46df50c87 100644 --- a/dev/tests/js/testsuite/mage/calendar/calendar-test.js +++ b/dev/tests/js/testsuite/mage/calendar/calendar-test.js @@ -64,7 +64,7 @@ CalendarTest.prototype.testEnableAMPM = function() { CalendarTest.prototype.testDisableAMPM = function() { /*:DOC += <input type="text" id="calendar" /> */ var calendar = $('#calendar').calendar({timeFormat: 'hh:mm'}); - assertEquals(true, calendar.calendar('option', 'ampm') != true); + assertTrue(!calendar.calendar('option', 'ampm')); calendar.calendar('destroy'); }; CalendarTest.prototype.testWithServerTimezoneOffset = function() { @@ -75,20 +75,20 @@ CalendarTest.prototype.testWithServerTimezoneOffset = function() { currentDate.setTime((serverTimezoneSeconds + currentDate.getTimezoneOffset() * 60) * 1000); assertEquals(true, currentDate.toString() === calendar.calendar('getTimezoneDate').toString()); calendar.calendar('destroy'); -} +}; CalendarTest.prototype.testWithoutServerTimezoneOffset = function() { /*:DOC += <input type="text" id="calendar" /> */ var calendar = $('#calendar').calendar(), currentDate = new Date(); assertEquals(true, currentDate.toString() === calendar.calendar('getTimezoneDate').toString()); calendar.calendar('destroy'); -} +}; CalendarTest.prototype.testInitDateTimePicker = function() { /*:DOC += <input type="text" id="calendar" /> */ var calendar = $('#calendar').calendar(); assertEquals(true, calendar.hasClass('hasDatepicker')); calendar.calendar('destroy'); -} +}; CalendarTest.prototype.testDateTimeMapping = function() { /*:DOC += <input type="text" id="calendar" /> */ var calendar = $('#calendar').calendar({dateFormat: 'M/d/yy', timeFormat: 'h:mm a'}); @@ -99,11 +99,11 @@ CalendarTest.prototype.testDateTimeMapping = function() { assertEquals('MM/DD/yy', calendar.calendar('option', 'dateFormat')); assertEquals('hh:mm', calendar.calendar('option', 'timeFormat')); calendar.calendar('destroy'); -} +}; CalendarTest.prototype.testDestroy = function() { /*:DOC += <input type="text" id="calendar" /> */ var calendar = $('#calendar').calendar(), calendarExist = calendar.is(':mage-calendar'); calendar.calendar('destroy'); assertEquals(true, calendarExist != calendar.is(':mage-calendar')); -} +}; diff --git a/dev/tests/js/testsuite/mage/calendar/calendar.html b/dev/tests/js/testsuite/mage/calendar/calendar.html index d8e938f70770ff13f3007340176a3a7a452299f7..52b7978c1a3044b9972e1259bf27a2817caefe1e 100644 --- a/dev/tests/js/testsuite/mage/calendar/calendar.html +++ b/dev/tests/js/testsuite/mage/calendar/calendar.html @@ -32,12 +32,12 @@ <title>Calendar Widget: QUnit Tests </title> <base href="../../../"/> <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> - <script type="text/javascript" src="../../../pub/lib/jquery/jquery.js"></script> - <script type="text/javascript" src="../../../pub/lib/jquery/jquery-ui.js"></script> - <script type="text/javascript" src="../../../pub/lib/jquery/jquery-ui-timepicker-addon.js"></script> + <script type="text/javascript" src="../../../lib/web/jquery/jquery.js"></script> + <script type="text/javascript" src="../../../lib/web/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="../../../lib/web/jquery/jquery-ui-timepicker-addon.js"></script> <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/calendar.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/mage.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/calendar.js"></script> <script type="text/javascript" src="testsuite/mage/calendar/calendar-qunit.js"></script> </head> <body> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/test.phtml b/dev/tests/js/testsuite/mage/collapsible/content.html similarity index 89% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/test.phtml rename to dev/tests/js/testsuite/mage/collapsible/content.html index 6f63b67433dea6b58e4a085e2caffd13f78b5a2e..b91806068de8218d6f17538a7b2ad0ad98176106 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/test.phtml +++ b/dev/tests/js/testsuite/mage/collapsible/content.html @@ -1,4 +1,4 @@ -<?php +<!-- /** * Magento * @@ -18,7 +18,15 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * + * @category mage.collapsible + * @package test * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -echo 'Content of this file is not asserted. Only its presence.'; +--> + +<HTML> +<body> + <p>Test text</p> +</body> +</HTML> \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/collapsible/index.html b/dev/tests/js/testsuite/mage/collapsible/index.html new file mode 100644 index 0000000000000000000000000000000000000000..13178a4fcd6daca8b9ff437802c4d08da913178f --- /dev/null +++ b/dev/tests/js/testsuite/mage/collapsible/index.html @@ -0,0 +1,49 @@ +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.collapsible + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> + + +<!DOCTYPE html> +<html> +<head> + <title>Unit test</title> + <base href="../../../"/> + <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> + <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> + <script src="../../../pub/lib/jquery/jquery.js"></script> + <script src="../../../pub/lib/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/collapsible.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/bootstrap.js"></script> + <script type="text/javascript" src="testsuite/mage/collapsible/test-collapsible.js"></script> +</head> +<body> +<div id="qunit"></div> +<div id="qunit-fixture"> +</div> +</body> +</html> + diff --git a/dev/tests/js/testsuite/mage/collapsible/test-collapsible.js b/dev/tests/js/testsuite/mage/collapsible/test-collapsible.js new file mode 100644 index 0000000000000000000000000000000000000000..8aa486f4b21aedfbb678e690268da279b0a71acc --- /dev/null +++ b/dev/tests/js/testsuite/mage/collapsible/test-collapsible.js @@ -0,0 +1,198 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.collapsible + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* + Test if the collapsible widget gets initialized when is called and destroy function works + */ +test('initialization & destroy', function() { + expect(2); + var group = $('<div id="1"></div>'); + group.collapsible(); + ok( group.is(':mage-collapsible'), "widget instantiated" ); + group.collapsible('destroy'); + ok( !group.is(':mage-collapsible'), "widget destroyed" ); +}); + +/* + Test enable, disable, activate, deactivate functions + */ +test('Enable, disable, activate, deactivate methods', function() { + expect(5); + var group = $('<div id="2"></div>'); + var title = $('<div data-role="title"></div>'); + var content = $('<div data-role="content"></div>'); + title.appendTo(group); + content.appendTo(group); + group.appendTo("body"); + group.collapsible(); + group.collapsible("deactivate"); + ok(content.is(':hidden'), "Content is collapsed"); + group.collapsible("activate"); + ok(content.is(':visible'), "Content is expanded"); + group.collapsible("disable"); + ok(content.is(':hidden'), "Content is collapsed"); + group.collapsible("activate"); + ok(content.is(':hidden'), "Content is collapsed"); + group.collapsible("enable"); + group.collapsible("activate"); + ok(content.is(':visible'), "Content is expanded"); + group.collapsible('destroy'); +}); + +/* + Test if the widget gets expanded/collapsed when the title is clicked + */ +test('Collapse and expand', function() { + expect(3); + var group = $('<div id="3"></div>'); + var title = $('<div data-role="title"></div>'); + var content = $('<div data-role="content"></div>'); + title.appendTo(group); + content.appendTo(group); + group.appendTo("body"); + group.collapsible(); + group.collapsible("deactivate"); + ok(content.is(':hidden'), "Content is collapsed"); + title.trigger("click"); + ok(content.is(':visible'), "Content gets expanded on click title"); + title.trigger("click"); + ok(content.is(':hidden'), "Content gets collapsed on click again"); + group.collapsible('destroy'); +}); + + +/* + Test state Classes + */ +test('State classes', function() { + expect(3); + var group = $('<div id="4"></div>'); + var title = $('<div data-role="title"></div>'); + var content = $('<div data-role="content"></div>'); + title.appendTo(group); + content.appendTo(group); + group.collapsible({openedState:"opened", closedState:"closed", disabledState:"disabled"}); + ok( group.hasClass("closed")); + title.trigger("click"); + ok( group.hasClass("opened")); + group.collapsible("disable"); + ok( group.hasClass("disabled")); + group.collapsible('destroy'); +}); + +/* + Test if icons are added to title when widget gets initialized and are removed when gets destroyed + */ +test('Create & destroy icons', function() { + expect(2); + var group = $('<div id="5"></div>'); + var title = $('<div data-role="title"></div>'); + var content = $('<div data-role="content"></div>'); + title.appendTo(group); + content.appendTo(group); + group.collapsible({icons: {header:"minus",activeHeader:"plus"}}); + ok(title.children("[data-role=icons]").length, "Icons added to title" ); + group.collapsible('destroy'); + ok(!title.children("[data-role=icons]").length, "Icons removed from title" ); +}); + +/* + Test if icon classes are changed when content gets expanded/collapsed + */ +test('Change icons when content gets expanded/collapsed', function() { + expect(2); + var group = $('<div id="6"></div>'); + var title = $('<div data-role="title"></div>'); + var content = $('<div data-role="content"></div>'); + title.appendTo(group); + content.appendTo(group); + group.collapsible({icons: {header:"minus",activeHeader:"plus"}}); + group.collapsible("deactivate"); + var icons = group.collapsible("option","icons"); + ok(title.children("[data-role=icons]").hasClass(icons.header), "When content is collapsed,header has the right class for icons" ); + title.trigger("click"); + ok(title.children("[data-role=icons]").hasClass(icons.activeHeader), "When content is expanded,header has the right class for icons" ); + group.collapsible('destroy'); +}); + + +/* + Test if content gets expanded/collapsed when certain keys are pressed + */ +asyncTest( "keyboard support", function() { + + expect( 5 ); + var group = $('<div id="7"></div>'); + var title = $('<div data-role="title"></div>'); + var content = $('<div data-role="content"></div>'); + title.appendTo(group); + content.appendTo(group); + group.appendTo("body"); + group.collapsible(); + group.collapsible("deactivate"); + + title.on("focus",function(ev){ + ok(content.is(':hidden'), "Content is collapsed"); + title.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.ENTER } )); + ok(content.is(':visible'), "Content is expanded"); + title.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.ENTER } )); + ok(content.is(':hidden'), "Content is collapsed"); + title.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.SPACE } )); + ok(content.is(':visible'), "Content is expanded"); + title.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.SPACE } )); + ok(content.is(':hidden'), "Content is collapsed"); + group.collapsible('destroy'); + start(); + } ); + + setTimeout(function(){ + title.focus(); + },10); + +}); + +/* + Test if content gets updated via Ajax when title is clicked + */ +test('Update content via ajax', function() { + expect(2); + var group = $('<div id="8"></div>'); + var title = $('<div data-role="title"></div>'); + var content = $('<div data-role="content"></div>'); + var ajax = $('<a data-ajax="true" href="testsuite/mage/collapsible/content.html"></a>'); + title.appendTo(group); + content.appendTo(group); + ajax.appendTo(content); + group.appendTo("body"); + group.collapsible({ajaxContent : true}); + group.collapsible("deactivate"); + ok(!content.children("p").length, "Content has no data"); + title.trigger("click"); + ok(content.children("p"), "Content gets data from content.html"); + group.collapsible('destroy'); +}); + + + diff --git a/dev/tests/js/testsuite/mage/dropdown/index.html b/dev/tests/js/testsuite/mage/dropdown/index.html index ecd3b48f08b7eeda12ecf9d04b64e5f83b985958..2094ce1da1b6b4dae1b40829038b5d01a695a325 100644 --- a/dev/tests/js/testsuite/mage/dropdown/index.html +++ b/dev/tests/js/testsuite/mage/dropdown/index.html @@ -32,11 +32,11 @@ <base href="../../../"/> <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> - <script src="../../../pub/lib/jquery/jquery.js"></script> - <script src="../../../pub/lib/jquery/jquery-ui.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/dropdown.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/bootstrap.js"></script> + <script src="../../../lib/web/jquery/jquery.js"></script> + <script src="../../../lib/web/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/mage.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/dropdown.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/bootstrap.js"></script> <script type="text/javascript" src="testsuite/mage/dropdown/test-dropdown.js"></script> </head> diff --git a/dev/tests/js/testsuite/mage/dropdown/test-dropdown.js b/dev/tests/js/testsuite/mage/dropdown/test-dropdown.js index 96952f8fbc20f3c2c73d790098916bc12de64957..f4e5b96a294a674e4c24eaaf076a5c3ce1f12ab0 100644 --- a/dev/tests/js/testsuite/mage/dropdown/test-dropdown.js +++ b/dev/tests/js/testsuite/mage/dropdown/test-dropdown.js @@ -57,7 +57,7 @@ test( "triggerClass", function() { dialog.dropdownDialog("open"); ok( !opener.hasClass("active"), "Class added to opener when dialog opens" ); dialog.dropdownDialog("close"); - dialog.dropdownDialog( "destroy" ) + dialog.dropdownDialog( "destroy" ); }); @@ -249,7 +249,7 @@ test( "createTitileBar", function() { dialog.dropdownDialog( "destroy" ); dialog.dropdownDialog({"createTitleBar":false}); - ok(!($(".ui-dialog").find(".ui-dialog-titlebar").length > 0), "Title bar isn't created"); + ok($(".ui-dialog").find(".ui-dialog-titlebar").length <= 0, "Title bar isn't created"); dialog.dropdownDialog( "destroy" ); }); @@ -283,6 +283,6 @@ test( "autoSize", function() { dialog.dropdownDialog({"autoSize":false, width:"300"}); dialog.dropdownDialog("open"); - ok(!($(".ui-dialog").css("width") === '300px'), "_size function disabled"); + ok($(".ui-dialog").css("width") !== '300px', "_size function disabled"); dialog.dropdownDialog( "destroy" ); }); diff --git a/dev/tests/js/testsuite/mage/edit_trigger/edit-trigger-test.js b/dev/tests/js/testsuite/mage/edit_trigger/edit-trigger-test.js index 828073d860adada815d4fa640b7b525d7fe4138d..336baffb9f657ed7306581326c284875c47eba8a 100644 --- a/dev/tests/js/testsuite/mage/edit_trigger/edit-trigger-test.js +++ b/dev/tests/js/testsuite/mage/edit_trigger/edit-trigger-test.js @@ -33,7 +33,7 @@ EditTriggerTest.prototype.testCreate = function() { */ var options = { img: 'img.gif', - alt: 'translate', + alt: 'translate' }, editTrigger = jQuery(document).editTrigger(options); var trigger = jQuery('.translate-edit-icon'); @@ -54,7 +54,7 @@ EditTriggerTest.prototype.testShowHideOnMouseMove = function() { */ var editTrigger = jQuery(document).editTrigger({ editSelector: '.edit', - delay: 0, + delay: 0 }), trigger = jQuery('.translate-edit-icon'), editElement = jQuery('.edit'), @@ -72,7 +72,7 @@ EditTriggerTest.prototype.testTriggerClick = function() { </script> */ var editTrigger = jQuery(document).editTrigger({ - editSelector: '.edit', + editSelector: '.edit' }), trigger = jQuery('.translate-edit-icon'), editElement = jQuery('.edit'), @@ -89,8 +89,8 @@ EditTriggerTest.prototype.testDestroy = function() { editProcessed = false, mousemoveProcessed = false; $(document) - .on('edit.editTrigger', function() {editProcessed = true}) - .on('mousemove.editTrigger', function() {mousemoveProcessed = true}); + .on('edit.editTrigger', function() {editProcessed = true;}) + .on('mousemove.editTrigger', function() {mousemoveProcessed = true;}); editTrigger.editTrigger('destroy'); assertEquals(false, editTriggerExist === editTrigger.is(':mage-editTrigger')); $(document).trigger('edit.editTrigger'); @@ -109,7 +109,7 @@ EditTriggerTestAsync.prototype.testHideEditTriggerWithDelay = function(queue) { */ var editTrigger = jQuery(document).editTrigger({ editSelector: '.edit', - delay: 1000, + delay: 1000 }), trigger = jQuery('.translate-edit-icon'), editElement = jQuery('.edit'), diff --git a/dev/tests/js/testsuite/mage/gallery/gallery-fullscreen-test.js b/dev/tests/js/testsuite/mage/gallery/gallery-fullscreen-test.js index 3fbd2ab9537e18f49bfdf42c2d7371bd8f950acf..b0e14c7ea0df155a481c2f52c5398e3db521b13c 100644 --- a/dev/tests/js/testsuite/mage/gallery/gallery-fullscreen-test.js +++ b/dev/tests/js/testsuite/mage/gallery/gallery-fullscreen-test.js @@ -39,7 +39,7 @@ GalleryFullscreenTest.prototype.galleryFullscreenDestroy = function() { } }; GalleryFullscreenTest.prototype.galleryFullscreenCreate = function(options, element) { - (element || this.galleryFullscreenElement)[this.widgetName](options || {} ) + (element || this.galleryFullscreenElement)[this.widgetName](options || {} ); return this.galleryFullscreenElement.data(this.widgetName) || this.galleryFullscreenElement.data(this.widgetName.toLowerCase()); }; @@ -68,4 +68,4 @@ GalleryFullscreenTest.prototype.testBind = function() { assertTrue(_fullScreen.callCount === 1); zoomTrack.trigger('click'); assertTrue(_fullScreen.callCount === 2); -}; \ No newline at end of file +}; diff --git a/dev/tests/js/testsuite/mage/gallery/gallery-test.js b/dev/tests/js/testsuite/mage/gallery/gallery-test.js index 0ffd7d076991fdfd1ccb66b67b3f343dfd7b56ae..192010e2beef27b029c07a373525401cf6578387 100644 --- a/dev/tests/js/testsuite/mage/gallery/gallery-test.js +++ b/dev/tests/js/testsuite/mage/gallery/gallery-test.js @@ -128,8 +128,8 @@ GalleryTest.prototype.resetImageSelection = function(images) { delete image.selected; } return true; - }) -} + }); +}; GalleryTest.prototype.testInit = function() { this.galleryElement.gallery(); @@ -389,13 +389,13 @@ GalleryTest.prototype.testFindSelected = function() { galleryInstance.options.images = this.resetImageSelection(galleryInstance.options.images); galleryInstance.options.images[1].selected = true; - var selected = galleryInstance._findSelected(); + selected = galleryInstance._findSelected(); assertTrue(selected === 1); galleryInstance.options.images = this.resetImageSelection(galleryInstance.options.images); galleryInstance.options.images[0].selected = true; galleryInstance.options.images[1].selected = true; - var selected = galleryInstance._findSelected(); + selected = galleryInstance._findSelected(); assertTrue(selected === 0); }; GalleryTest.prototype.testInitControl = function() { @@ -413,4 +413,4 @@ GalleryTest.prototype.testInitControl = function() { assertTrue(_renderControl.lastCallArgs[0] === 'test'); assertTrue(galleryInstance.element.find('[data-role=test-control]').length > 0); assertTrue(galleryInstance.element.find('[data-role=test-control]').is(renderedControl)); -}; \ No newline at end of file +}; diff --git a/dev/tests/js/testsuite/mage/list/index.html b/dev/tests/js/testsuite/mage/list/index.html new file mode 100644 index 0000000000000000000000000000000000000000..990582caa3b45fcc38c0f0a1d3776abfb0be88f8 --- /dev/null +++ b/dev/tests/js/testsuite/mage/list/index.html @@ -0,0 +1,47 @@ +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage._demo + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> + +<!DOCTYPE html> +<html> +<head> + <title>Unit test</title> + <base href="../../../"/> + <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> + <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> + <script src="../../../pub/lib/jquery/jquery.js"></script> + <script src="../../../pub/lib/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> + <script type="text/javascript" src="../../../pub/lib/jquery/handlebars/handlebars-v1.3.0.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/list.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/bootstrap.js"></script> + <script type="text/javascript" src="testsuite/mage/list/jquery-list-test.js"></script> +</head> +<body> + <div id="qunit"></div> + <div id="qunit-fixture"></div> +</body> +</html> \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/list/jquery-list-test.js b/dev/tests/js/testsuite/mage/list/jquery-list-test.js new file mode 100644 index 0000000000000000000000000000000000000000..387f91657b16a53917c5717d5b9bdb01bd973f38 --- /dev/null +++ b/dev/tests/js/testsuite/mage/list/jquery-list-test.js @@ -0,0 +1,64 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.loader + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +test('init & destroy', function() { + expect(2); + var element = $('<div></div>'); + element.list(); + ok(element.hasClass('list-widget'), "Class added" ); + element.list('destroy'); + ok(!element.hasClass('list-widget'), "Class removed" ); +}); + +test('add to list', function() { + expect(1); + var element = $('<div></div>'); + var button = $('<button data-button="add"></button>'); + button.appendTo(element); + element.appendTo('body'); + var destination = $('<div data-role="container"></div>'); + destination.appendTo('body'); + element.list({ + template : '<span>test</span>', + templateWrapper : '<fieldset data-role="item"></fieldset>', + templateClass : 'fieldset' + }); + button.trigger('click'); + ok(destination.children('[data-role="addedItem"]').length, "Content is added to list"); + element.list('destroy'); + element.remove(); + destination.remove(); +}); + +test('remove from list', function() { + expect(1); + var button = $('<button></button>'); + var removeButton = $('[data-button=remove]'); + var destination = $('<div id="test"></div>'); + button.list({template: '#template',destinationSelector: '#test',listLimit: 5}); + button.trigger('click'); + removeButton.trigger('click'); + ok(!destination.children('[data-role=item]').length, "Content is removed from the list"); + button.list('destroy'); +}); diff --git a/dev/tests/js/testsuite/mage/loader/jquery-loader-test.js b/dev/tests/js/testsuite/mage/loader/jquery-loader-test.js index 493c49887131f65fd11924d3ff3f6e1200981c25..01c1e1f6fedb3a39a318ce1705bb7c5edf910b93 100644 --- a/dev/tests/js/testsuite/mage/loader/jquery-loader-test.js +++ b/dev/tests/js/testsuite/mage/loader/jquery-loader-test.js @@ -23,18 +23,13 @@ TestCase('options', function() { expect(3); - var element = $("#loader").loader({ - icon: 'icon.gif', - texts: { - imgAlt: 'Image Text', - loaderText: 'Loader Text' - }, - template: '<div class="loading-mask" data-role="loader"><div class="loader"><img alt="{{imgAlt}}" src="{{icon}}"><p>{{loaderText}}</p></div></div>' - }); + var element = $('<div>'); + element.appendTo('body'); + element.loader(); element.loader('show'); - equal( element.find('p').text(), 'Loader Text', '.loader() text matches' ); + equal( element.find('p').text(), 'Please wait...', '.loader() text matches' ); equal( element.find('img').prop('src').split('/').pop(), 'icon.gif', '.loader() icons match' ); - equal( element.find('img').prop('alt'), 'Image Text', '.loader() image alt text matches' ); + equal( element.find('img').prop('alt'), 'Loading...', '.loader() image alt text matches' ); element.loader('destroy'); }); @@ -42,18 +37,12 @@ TestCase('options', function() { TestCase( 'element init', function() { expect(1); - //Initialize Loader on element - var element = $("#loader").loader({ - icon: 'icon.gif', - texts: { - imgAlt: 'Image Text', - loaderText: 'Loader Text' - }, - template: '<div class="loading-mask" data-role="loader"><div class="loader"><img alt="{{imgAlt}}" src="{{icon}}"><p>{{loaderText}}</p></div></div>' - }); + var element = $('<div>'); + element.appendTo('body'); + element.loader(); element.loader('show'); equal(element.is(':mage-loader'), true, '.loader() init on element'); - element.remove(); + element.loader('destroy'); }); @@ -63,15 +52,16 @@ TestCase( 'body init', function() { //Initialize Loader on Body var body = $('body').loader(); body.loader('show'); - equal(true, $('body div:first').is('.loading-mask')); - $('body').find('.loading-mask:first').remove(); - + equal(body.is(':mage-loader'), true, '.loader() init on body'); + body.loader('destroy'); }); TestCase( 'show/hide', function() { expect(3); - var element = $('body').loader(); + var element = $('<div>'); + element.appendTo('body'); + element.loader(); //Loader show element.loader('show'); @@ -79,28 +69,21 @@ TestCase( 'show/hide', function() { //Loader hide element.loader('hide'); - equal($('.loading-mask').is( ":hidden" ), false, '.loader() closed' ); + equal($('.loading-mask').is( ":hidden" ), true, '.loader() closed' ); //Loader hide on process complete element.loader('show'); element.trigger('processStop'); equal($('.loading-mask').is('visible'), false, '.loader() closed after process'); - element.find('.loading-mask').remove(); + element.loader('destroy'); }); TestCase( 'destroy', function() { expect(1); - var element = $("#loader").loader({ - icon: 'icon.gif', - texts: { - imgAlt: 'Image Text', - loaderText: 'Loader Text' - }, - template: '<div class="loading-mask" data-role="loader"><div class="loader"><img alt="{{imgAlt}}" src="{{icon}}"><p>{{loaderText}}</p></div></div>' - }); + var element = $("#loader").loader(); element.loader('show'); element.loader('destroy'); equal( $('.loading-mask').is(':visible'), false, '.loader() destroyed'); diff --git a/dev/tests/js/testsuite/mage/loader/loader.html b/dev/tests/js/testsuite/mage/loader/loader.html index 6191bf7693cacfddd165b22b131cbb0ba485b1d0..0fb12c549397e23913b9eb1afb46fd071aaf64bf 100644 --- a/dev/tests/js/testsuite/mage/loader/loader.html +++ b/dev/tests/js/testsuite/mage/loader/loader.html @@ -30,28 +30,17 @@ <title>Unit test</title> <base href="../../../"/> <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> - <script src="../../../pub/lib/jquery/jquery.js"></script> - <script src="../../../pub/lib/jquery/jquery-ui.js"></script> + <script src="../../../lib/web/jquery/jquery.js"></script> + <script src="../../../lib/web/jquery/jquery-ui.js"></script> <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> - <script src="../../../pub/lib/jquery/handlebars/handlebars-v1.3.0.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/loader.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/mage.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/bootstrap.js"></script> + <script src="../../../lib/web/jquery/handlebars/handlebars-v1.3.0.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/loader.js"></script> <script type="text/javascript" src="testsuite/mage/loader/jquery-loader-test.js"></script> </head> -<script id="loader-template" type="text/x-handlebars-template"> - <div class="loading-mask" data-role="loader"> - <div class="loader"> - <img alt="{{imgAlt}}" src="{{icon}}"> - <p>{{loaderText}}</p> - </div> - </div> -</script> -<body data-mage-init='{"loader": {"template":"#loader-template"}}'> +<body> <div id="qunit"></div> <div id="qunit-fixture"></div> - <div id="loader"></div> - <script type="text/javascript"> - $.mage.init(); - </script> </body> </html> \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/menu/index.html b/dev/tests/js/testsuite/mage/menu/index.html new file mode 100644 index 0000000000000000000000000000000000000000..b043a6c9ebc65f9543a916eeab065367f5fe51c0 --- /dev/null +++ b/dev/tests/js/testsuite/mage/menu/index.html @@ -0,0 +1,84 @@ +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.menu + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> + +<!DOCTYPE html> +<html> +<head> + <title>Unit test</title> + <base href="../../../"/> + <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> + <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> + <script src="../../../pub/lib/jquery/jquery.js"></script> + <script src="../../../pub/lib/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/menu.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/bootstrap.js"></script> + <script type="text/javascript" src="testsuite/mage/menu/test-menu.js"></script> + +</head> +<body> +<div id="qunit"></div> +<div id="qunit-fixture"> +<ul id="menu"> + <li class="foo">Aberdeen</li> + <li class="foo">Ada</li> + <li class="foo">Adamsville</li> + <li class="foo"><span class="ui-icon ui-icon-print"></span>Addyston</li> + <li>Delphi + <ul> + <li class="foo">Ada</li> + <li class="foo">Saarland</li> + <li class="foo">Salzburg</li> + </ul> + </li> + <li class="foo">Saarland</li> + <li>Salzburg + <ul> + <li>Delphi + <ul> + <li class="foo">Ada</li> + <li class="foo">Saarland</li> + <li class="foo">Salzburg</li> + </ul> + </li> + <li>Delphi + <ul> + <li class="foo">Ada</li> + <li> - </li> + <li class="foo">Saarland</li> + <li></li> + <li class="foo">Salzburg</li> + <li>–</li> + </ul> + </li> + <li class="foo">Perch</li> + </ul> + </li> +</ul> +</div> +</body> +</html> diff --git a/dev/tests/js/testsuite/mage/menu/test-menu.js b/dev/tests/js/testsuite/mage/menu/test-menu.js new file mode 100644 index 0000000000000000000000000000000000000000..3ea9a88d24f95d9e48c6fee50724557adc9928e3 --- /dev/null +++ b/dev/tests/js/testsuite/mage/menu/test-menu.js @@ -0,0 +1,130 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.js + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + + /* + Set key logger to check key press event + */ + function KeyLogger( target ) { + if ( !(this instanceof KeyLogger) ) { + return new KeyLogger( target ); + } + this.target = target; + this.log = []; + + var self = this; + + this.target.off( 'keydown' ).on( 'keydown', function( event ) { + self.log.push( event.keyCode ); + }); +} +/* + testing if menu get expanded class when option set to true + */ +test( 'Menu Expanded', function() { + expect(1); + var menu = $('#menu'); + var menuItems = menu.find('li'); + var submenu = menuItems.find('ul'); + menu.menu({ + expanded: true + }); + ok(submenu.hasClass('expanded'), 'Expanded Class added'); +}); +/* + testing if down arrow is pressed + */ +test( 'Down Arrow', function() { + expect(1); + var event, + menu = $('#menu'), + keys = KeyLogger(menu); + event = $.Event('keydown'); + event.keyCode = $.ui.keyCode.DOWN; + menu.trigger( event ); + equal( keys.log[ 0 ], 40, 'Down Arrow Was Pressed' ); +}); +/* + testing if up arrow is pressed + */ +test( 'Up Arrow', function() { + expect(1); + var event, + menu = $('#menu'), + keys = KeyLogger(menu); + event = $.Event('keydown'); + event.keyCode = $.ui.keyCode.UP; + menu.trigger( event ); + equal( keys.log[ 0 ], 38, 'Up Arrow Was Pressed' ); +}); +/* + testing if left arrow is pressed + */ +test( 'Left Arrow', function() { + expect(1); + var event, + menu = $('#menu'), + keys = KeyLogger(menu); + event = $.Event('keydown'); + event.keyCode = $.ui.keyCode.LEFT; + menu.trigger( event ); + equal( keys.log[ 0 ], 37, 'Left Arrow Was Pressed' ); +}); +/* + testing if right arrow is pressed + */ +test( 'Right Arrow', function() { + expect(1); + var event, + menu = $('#menu'), + keys = KeyLogger(menu); + event = $.Event('keydown'); + event.keyCode = $.ui.keyCode.RIGHT; + menu.trigger( event ); + equal( keys.log[ 0 ], 39, 'Right Arrow Was Pressed' ); +}); +/* + testing if max limit being set + */ +test( 'Max Limit', function() { + expect(1); + var menu = $('#menu'); + menu.navigation({ + maxItems: 3 + }); + var menuItems = menu.find('> li:visible'); + equal(menuItems.length, 4, 'Max Limit Reach'); +}); +/* + testing if responsive menu is set + */ +test( 'Responsive: More Menu', function() { + expect(1); + var menu = $('#menu'); + menu.navigation({ + responsive: 'onResize' + }); + ok($('body').find('.ui-menu.more'), 'More Menu Created'); +}); + diff --git a/dev/tests/js/testsuite/mage/requirejs/paths-updater-test.js b/dev/tests/js/testsuite/mage/requirejs/paths-updater-test.js new file mode 100644 index 0000000000000000000000000000000000000000..e0a05abc37e0500615905c07314429c393478f2a --- /dev/null +++ b/dev/tests/js/testsuite/mage/requirejs/paths-updater-test.js @@ -0,0 +1,41 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint globalstrict: true*/ + +"use strict"; + +/*jshint undef: false, newcap: false*/ +var PathsUpdaterTest = TestCase('PathsUpdaterTest'); + +PathsUpdaterTest.prototype.testUpdateConfigPaths = function() { + var config = {paths: { simplePath: "simple/path.js", relativePath: "./relative/path.js" }}; + var expected = {paths: { simplePath: "simple/path.js", relativePath: "relative/path.js" }}; + assertEquals(expected, mageUpdateConfigPaths(config, '')); +}; + +PathsUpdaterTest.prototype.testUpdateConfigPathsWithContext = function() { + var config = {paths: { simplePath: "simple/path.js", relativePath: "./relative/path.js" }}; + var context = 'context'; + var expectedWithContext = {paths: { simplePath: "simple/path.js", relativePath: "context/relative/path.js" }}; + assertEquals(expectedWithContext, mageUpdateConfigPaths(config, context)); +}; diff --git a/dev/tests/js/testsuite/mage/requirejs/plugin/id-normalizer-test.js b/dev/tests/js/testsuite/mage/requirejs/plugin/id-normalizer-test.js new file mode 100644 index 0000000000000000000000000000000000000000..fee598cdecaac6b6c20173475fd336bbc99a9c18 --- /dev/null +++ b/dev/tests/js/testsuite/mage/requirejs/plugin/id-normalizer-test.js @@ -0,0 +1,60 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint globalstrict: true*/ + +"use strict"; + +/*jshint undef: false, newcap: false*/ +var IdNormalizerTest = TestCase('IdNormalizerTest'); + +IdNormalizerTest.prototype.setUp = function() { + var defineArgs = jsunit.requirejsUtil.getDefineArgsInScript('lib/web/mage/requirejs/plugin/id-normalizer.js'); + assertNotUndefined('There expected to be a define() call', defineArgs); + assertEquals('Wrong number of arguments in the define() call', 1, defineArgs.length); + + this.normalizer = defineArgs[0]; + assertObject(this.normalizer); + assertFunction(this.normalizer.normalize); + assertFunction(this.normalizer.load); +}; + +IdNormalizerTest.prototype.testNormalize = function () { + var actual = this.normalizer.normalize('Magento_Catalog::foo/bar.js'); + assertEquals('Magento_Catalog/foo/bar.js', actual); +}; + +IdNormalizerTest.prototype.testLoad = function () { + // Check that load() is just a proxy + var modulePassed, onloadPassed; + var parentRequire = function (moduleIn, onloadIn) { + modulePassed = moduleIn; + onloadPassed = onloadIn; + }; + var onload = function (){}; + + this.normalizer.load('module', parentRequire, onload); + + assertEquals('module', modulePassed); + assertSame(onload, onloadPassed); +}; + diff --git a/dev/tests/js/testsuite/mage/suggest/suggest-test.js b/dev/tests/js/testsuite/mage/suggest/suggest-test.js index c3de154b5b199d237751ecdefd23f14e6a8627cf..a5fd552fc54cfae025ce5658bd14e4d1d4a374ee 100644 --- a/dev/tests/js/testsuite/mage/suggest/suggest-test.js +++ b/dev/tests/js/testsuite/mage/suggest/suggest-test.js @@ -98,7 +98,7 @@ SuggestTest.prototype.testRender = function() { dropdownWrapper: '<div class="wrapper-test"></div>', className: 'test-suggest', inputWrapper: '<div class="test-input-wrapper"></div>' - } + }; var suggestInstance = this.suggestCreate(suggestOptions); suggestInstance._render(); @@ -247,14 +247,14 @@ SuggestTest.prototype.testBindDropdown = function() { selectTriggered; suggestInstance._onSelectItem = function() { - selectTriggered = true - } + selectTriggered = true; + }; suggestInstance._focusItem = function() { - focusTriggered = true - } + focusTriggered = true; + }; suggestInstance._blurItem = function() { - blurTriggered = true - } + blurTriggered = true; + }; suggestInstance._bindDropdown(); suggestInstance.dropdown.trigger('testFocus'); @@ -272,10 +272,10 @@ SuggestTest.prototype.testTrigger = function() { this.suggestElement .on('suggesttestevent', function() { return false; - }) + }); this.suggestElement.parent().on('suggesttestevent', function() { propogationStopped = false; - }) + }); suggestInstance._trigger('testevent'); assertTrue(propogationStopped); @@ -415,7 +415,7 @@ SuggestTest.prototype.testSelectItem = function() { suggestOptions = { showRecent: true, storageKey: 'jsTestDriver-test-suggest-recent' - } + }; suggestInstance = this.suggestCreate(suggestOptions); suggestInstance._focused = this.uiHash.item; @@ -808,11 +808,11 @@ SuggestTest.prototype.testShowAll = function() { suggestInstance = this.suggestCreate(); suggestInstance._abortSearch = function() { searchAborted = true; - } + }; suggestInstance._search = function(e, term, context) { showAllTerm = term; showAllContext = context; - } + }; suggestInstance._showAll(jQuery.Event('showAll')); diff --git a/dev/tests/js/testsuite/mage/suggest/tree-suggest-test.js b/dev/tests/js/testsuite/mage/suggest/tree-suggest-test.js index 38d9f36b33bbce2bb2317e11f0f52a3301fe2b1e..15d4acdaf6142d087e458e4e5eeba439ecf586bc 100644 --- a/dev/tests/js/testsuite/mage/suggest/tree-suggest-test.js +++ b/dev/tests/js/testsuite/mage/suggest/tree-suggest-test.js @@ -51,7 +51,7 @@ TreeSuggestTest.prototype.stub = function(instance, methodName, retVal) { if(retVal) { return retVal; } - } + }; } return d.promise(); }; diff --git a/dev/tests/js/testsuite/mage/tabs/index.html b/dev/tests/js/testsuite/mage/tabs/index.html new file mode 100644 index 0000000000000000000000000000000000000000..c731f3f30212e0389926832a72127955d5278552 --- /dev/null +++ b/dev/tests/js/testsuite/mage/tabs/index.html @@ -0,0 +1,48 @@ +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.tabs + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> + +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <title>Tabs Widget: QUnit Tests </title> + <base href="../../../"/> + <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> + <script type="text/javascript" src="../../../pub/lib/jquery/jquery.js"></script> + <script type="text/javascript" src="../../../pub/lib/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/tabs.js"></script> + <script type="text/javascript" src="../../../pub/lib/mage/collapsible.js"></script> + <script type="text/javascript" src="testsuite/mage/tabs/tabs.js"></script> +</head> +<body> +<div id="qunit"></div> +<div id="qunit-fixture"> +</div> +</body> +</html> diff --git a/dev/tests/js/testsuite/mage/tabs/tabs.js b/dev/tests/js/testsuite/mage/tabs/tabs.js new file mode 100644 index 0000000000000000000000000000000000000000..8449e7dac7c6c9247aa671109d0746cb40d80dca --- /dev/null +++ b/dev/tests/js/testsuite/mage/tabs/tabs.js @@ -0,0 +1,142 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category mage.js + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* + + */ +test( "Initialization", function() { + expect(2); + var tabs = $("<div></div>"); + tabs.tabs(); + ok( tabs.is(':mage-tabs'), "widget instantiated" ); + tabs.tabs('destroy'); + ok( !tabs.is(':mage-tabs'), "widget destroyed" ); +}); + +test( "Collapsible instantiation", function() { + expect(2); + var tabs = $("<div></div>"); + var title = $("<div></div>").attr("data-role","collapsible"); + title.appendTo(tabs); + tabs.tabs(); + ok( title.is(':mage-collapsible'), "widget instantiated" ); + tabs.tabs('destroy'); + ok( !title.is(':mage-collapsible'), "widget destroyed" ); +}); + +test( "Tabs behavior - closing others tabs when one gets activated", function() { + expect(4); + var tabs = $('<div></div>'); + var title1 = $('<div data-role="collapsible"></div>').appendTo(tabs); + var content1 = $('<div data-role="content"></div>').appendTo(tabs); + var title2 = $('<div data-role="collapsible"></div>').appendTo(tabs); + var content2 = $('<div data-role="content"></div>').appendTo(tabs); + tabs.appendTo("body"); + tabs.tabs(); + ok( content1.is(':visible'), "content visible" ); + ok( content2.is(':hidden'), "content hidden" ); + title2.trigger('click'); + ok( content1.is(':hidden'), "content hidden" ); + ok( content2.is(':visible'), "content visible" ); + tabs.tabs('destroy'); +}); + +test( "Testing enable,disable,activate,deactivate options", function() { + expect(6); + var tabs = $('<div></div>'); + var title = $('<div data-role="collapsible"></div>').appendTo(tabs); + var content = $('<div data-role="content"></div>').appendTo(tabs); + tabs.appendTo("body"); + tabs.tabs(); + ok( content.is(':visible'), "content visible" ); + tabs.tabs("deactivate",0); + ok( content.is(':hidden'), "content hidden" ); + tabs.tabs("activate",0); + ok( content.is(':visible'), "content visible" ); + tabs.tabs("disable",0); + ok( content.is(':hidden'), "content hidden" ); + title.trigger("click"); + ok( content.is(':hidden'), "content hidden" ); + tabs.tabs("enable",0); + title.trigger("click"); + ok( content.is(':visible'), "content visible" ); + tabs.tabs('destroy'); +}); + +asyncTest( "Keyboard support for tabs view", function() { + + expect( 5 ); + var tabs = $('<div></div>'); + var title1 = $('<div data-role="collapsible"></div>').appendTo(tabs); + var content1 = $('<div data-role="content"></div>').appendTo(tabs); + var title2 = $('<div data-role="collapsible"></div>').appendTo(tabs); + var content2 = $('<div data-role="content"></div>').appendTo(tabs); + tabs.appendTo("body"); + tabs.tabs(); + + title1.on("focus",function(ev){ + ok(content1.is(':visible'), "Content is expanded"); + title1.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.RIGHT } )); + ok(content2.is(':visible'), "Content is expanded"); + ok(content1.is(':hidden'), "Content is collapsed"); + title2.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.LEFT } )); + ok(content1.is(':visible'), "Content is expanded"); + ok(content2.is(':hidden'), "Content is collapsed"); + tabs.tabs('destroy'); + start(); + } ); + + setTimeout(function(){ + title1.focus(); + },10); +}); + +asyncTest( "Keyboard support for accordion view", function() { + + expect( 5 ); + var tabs = $('<div></div>'); + var title1 = $('<div data-role="collapsible"></div>').appendTo(tabs); + var content1 = $('<div data-role="content"></div>').appendTo(tabs); + var title2 = $('<div data-role="collapsible"></div>').appendTo(tabs); + var content2 = $('<div data-role="content"></div>').appendTo(tabs); + tabs.appendTo("body"); + tabs.tabs({openOnFocus:false}); + + title1.on("focus",function(ev){ + ok(content1.is(':visible'), "Content is expanded"); + title1.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.RIGHT } )); + ok(content1.is(':visible'), "Content is expanded"); + ok(content2.is(':hidden'), "Content is collapsed"); + title2.trigger($.Event( 'keydown', { keyCode: $.ui.keyCode.ENTER } )); + ok(content2.is(':visible'), "Content is expanded"); + ok(content1.is(':hidden'), "Content is collapsed"); + tabs.tabs('destroy'); + start(); + } ); + + setTimeout(function(){ + title1.focus(); + },10); +}); diff --git a/dev/tests/js/testsuite/mage/translate/translate-test.js b/dev/tests/js/testsuite/mage/translate/translate-test.js index 61f30a7f906c312619e04c84f64c2dd6f84aa88b..d6838fd7d2e708d889c255409a9cc4cb16a99ff6 100644 --- a/dev/tests/js/testsuite/mage/translate/translate-test.js +++ b/dev/tests/js/testsuite/mage/translate/translate-test.js @@ -22,7 +22,7 @@ */ TranslateTest = TestCase('TranslateTest'); TranslateTest.prototype.testTranslateExist = function() { - assertEquals(true, jQuery.mage.translate != undefined ? true : false); + assertNotUndefined(jQuery.mage.translate); }; TranslateTest.prototype.testTranslationParametersOneArgument = function() { jQuery.mage.translate.add('Hello World!'); diff --git a/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js b/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js index aa2c0535fd8b69d4d08e4b33963e57b3ba50e246..205915ca76720631af283ed7ac1941cc917ee004 100644 --- a/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js +++ b/dev/tests/js/testsuite/mage/translate_inline/translate-inline-test.js @@ -123,7 +123,7 @@ TranslateInlineTest.prototype.testDestroy = function() { data:{ id: 'translate-form-id' } - }, + } }, translateInline = jQuery('[data-role="translate-dialog"]').translateInline(options), editTrigger = jQuery('#edit-trigger-id').editTrigger(), diff --git a/dev/tests/js/testsuite/mage/validation/index.html b/dev/tests/js/testsuite/mage/validation/index.html index 84c2aaa739390628a38ce739fa908a1e177dbff8..5fc972717a0e025cbc6f1d01256b10909cd23c43 100644 --- a/dev/tests/js/testsuite/mage/validation/index.html +++ b/dev/tests/js/testsuite/mage/validation/index.html @@ -32,15 +32,15 @@ <base href="../../../"/> <link type="text/css" rel="stylesheet" href="framework/qunit/qunit-1.14.0.css"/> <script type="text/javascript" src="framework/qunit/qunit-1.14.0.js"></script> - <script src="../../../pub/lib/jquery/jquery.js"></script> + <script src="../../../lib/web/jquery/jquery.js"></script> - <script src="../../../pub/lib/jquery/jquery-ui.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/mage.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/translate.js"></script> - <script src="../../../pub/lib/jquery/jquery.validate.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/validation.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/validation/validation.js"></script> - <script type="text/javascript" src="../../../pub/lib/mage/bootstrap.js"></script> + <script src="../../../lib/web/jquery/jquery-ui.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/mage.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/translate.js"></script> + <script src="../../../lib/web/jquery/jquery.validate.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/validation.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/validation/validation.js"></script> + <script type="text/javascript" src="../../../lib/web/mage/bootstrap.js"></script> <script type="text/javascript" src="testsuite/mage/validation/test-validation.js"></script> diff --git a/dev/tests/js/testsuite/mage/webapi-test.js b/dev/tests/js/testsuite/mage/webapi-test.js index 061c757b20a218297ffae294f67db30f6961b1fa..3b848787c818ad81f4f513ddb8d821d841a5e663 100644 --- a/dev/tests/js/testsuite/mage/webapi-test.js +++ b/dev/tests/js/testsuite/mage/webapi-test.js @@ -25,11 +25,11 @@ WebapiTest = TestCase('WebapiTest'); WebapiTest.prototype.testConstructorSuccess = function() { var successCallback = function(){}; new $.mage.Webapi('baseUrl', {'timeout': 100, 'success': successCallback}); -} +}; WebapiTest.prototype.testConstructorSuccessEmptyArgs = function() { new $.mage.Webapi('baseUrl'); -} +}; WebapiTest.prototype.testConstructorInvalidBaseUrl = function() { expectAsserts(1); @@ -40,7 +40,7 @@ WebapiTest.prototype.testConstructorInvalidBaseUrl = function() { var expectedException = "String baseUrl parameter required"; assertEquals("Invalid exception was thrown.", expectedException, e); } -} +}; WebapiTest.prototype.testCallInvalidMethod = function() { var Webapi = new $.mage.Webapi('baseUrl'); @@ -51,33 +51,33 @@ WebapiTest.prototype.testCallInvalidMethod = function() { var expectedException = "Method name is not valid: INVALID_HTTP_METHOD"; assertEquals("Invalid exception was thrown.", expectedException, e); } -} +}; WebapiTest.prototype.testCallSuccessCallback = function() { // ensure that custom successCallback was executed expectAsserts(1); var successCallback = function(response) { assertObject("Response is expected to be an object", response); - } + }; var Webapi = new $.mage.Webapi('baseUrl', {'success': successCallback}); $.ajax = function(settings) { settings.success({}); }; Webapi.call('products', 'GET'); -} +}; WebapiTest.prototype.testCallErrorCallback = function() { // ensure that custom successCallback was executed expectAsserts(1); var errorCallback = function(response) { assertObject("Response is expected to be an object", response); - } + }; var Webapi = new $.mage.Webapi('baseUrl', {'error': errorCallback}); $.ajax = function(settings) { settings.error({}); }; Webapi.call('products', 'GET'); -} +}; WebapiTest.prototype.testCallProductGet = function() { var baseUri = 'baseUrl'; diff --git a/dev/tests/js/testsuite/mage/zoom/zoom-test.js b/dev/tests/js/testsuite/mage/zoom/zoom-test.js index 28448c403101294b270c0b8202fbdac0074a6027..4a9010ff45ee589c9c6b9cfa278fcc8292522c7b 100644 --- a/dev/tests/js/testsuite/mage/zoom/zoom-test.js +++ b/dev/tests/js/testsuite/mage/zoom/zoom-test.js @@ -337,14 +337,14 @@ ZoomTest.prototype.testLargeImageLoaded = function() { _getWhiteBordersOffset.returnValue = 1; zoomInstance.element.append(image); zoomInstance.options.selectors.image = '[data-role=test-image]'; - zoomInstance.image = image + zoomInstance.image = image; _getAspectRatio.returnCallback = function(image) { if (image.is(zoomInstance.image)) { return 0; } else { return 1; } - } + }; jQuery(zoomInstance.options.selectors.image).on('processStop', function() { processStopTriggered = true; @@ -407,4 +407,4 @@ ZoomTest.prototype.testGetAspectRatio = function() { assertNull(aspectRatio); aspectRatio = zoomInstance._getAspectRatio(jQuery('<div />', size)); assertEquals((Math.round((size.width / size.height) * 100) / 100), aspectRatio); -}; \ No newline at end of file +}; diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/AggregateInvoker.php b/dev/tests/static/framework/Magento/TestFramework/Utility/AggregateInvoker.php index 20660aa1a9afc3b604241c112499d2069758fd0c..9f86ea43a643c7bb73e40002899a3368b3a7b546 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/AggregateInvoker.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/AggregateInvoker.php @@ -62,39 +62,54 @@ class AggregateInvoker */ public function __invoke(callable $callback, array $dataSource) { - $exceptionDumper = function (\Exception $exception, $dataSet) { - $dataSet = $exception instanceof \PHPUnit_Framework_AssertionFailedError && - !$exception instanceof \PHPUnit_Framework_IncompleteTestError && - !$exception instanceof \PHPUnit_Framework_SkippedTestError || - $this->_options['verbose'] ? 'Data set: ' . var_export( - $dataSet, - true - ) . PHP_EOL : ''; - return $dataSet . $exception->getMessage() . PHP_EOL . \PHPUnit_Util_Filter::getFilteredStacktrace( - $exception - ); - }; - $results = array( - 'PHPUnit_Framework_IncompleteTestError' => array(), - 'PHPUnit_Framework_SkippedTestError' => array(), - 'PHPUnit_Framework_AssertionFailedError' => array() - ); + $results = [ + 'PHPUnit_Framework_IncompleteTestError' => [], + 'PHPUnit_Framework_SkippedTestError' => [], + 'PHPUnit_Framework_AssertionFailedError' => [], + ]; $passed = 0; - foreach ($dataSource as $dataSet) { + foreach ($dataSource as $dataSetName => $dataSet) { try { call_user_func_array($callback, $dataSet); $passed++; } catch (\PHPUnit_Framework_IncompleteTestError $exception) { - $results[get_class($exception)][] = $exceptionDumper($exception, $dataSet); + $results[get_class($exception)][] = $this->prepareMessage($exception, $dataSetName, $dataSet); } catch (\PHPUnit_Framework_SkippedTestError $exception) { - $results[get_class($exception)][] = $exceptionDumper($exception, $dataSet); + $results[get_class($exception)][] = $this->prepareMessage($exception, $dataSetName, $dataSet); } catch (\PHPUnit_Framework_AssertionFailedError $exception) { - $results['PHPUnit_Framework_AssertionFailedError'][] = $exceptionDumper($exception, $dataSet); + $results['PHPUnit_Framework_AssertionFailedError'][] = $this->prepareMessage( + $exception, + $dataSetName, + $dataSet + ); } } $this->processResults($results, $passed); } + /** + * @param \Exception $exception + * @param string $dataSetName + * @param mixed $dataSet + * @return string + */ + protected function prepareMessage(\Exception $exception, $dataSetName, $dataSet) + { + if (!is_string($dataSetName)) { + $dataSetName = var_export($dataSet, true); + } + if ($exception instanceof \PHPUnit_Framework_AssertionFailedError + && !$exception instanceof \PHPUnit_Framework_IncompleteTestError + && !$exception instanceof \PHPUnit_Framework_SkippedTestError + || $this->_options['verbose']) { + $dataSetName = 'Data set: ' . $dataSetName . PHP_EOL; + } else { + $dataSetName = ''; + } + return $dataSetName . $exception->getMessage() . PHP_EOL + . \PHPUnit_Util_Filter::getFilteredStacktrace($exception); + } + /** * Analyze results of aggregated tests execution and complete test case appropriately * diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php index 4b1a4418fc1167eeee0ddb69d4f42b3b4537cc0b..4b3ca23fce0a85951ad4f6ad5bf25bf7b65f5d6c 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php @@ -1,7 +1,5 @@ <?php /** - * A helper to gather specific kind of files in Magento application - * * Magento * * NOTICE OF LICENSE @@ -23,8 +21,15 @@ * @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) */ + namespace Magento\TestFramework\Utility; +/** + * A helper to gather specific kind of files in Magento application + * + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ class Files { /** @@ -119,9 +124,8 @@ class Files { $key = __METHOD__ . "/{$this->_path}/{$appCode}/{$otherCode}/{$templates}"; if (!isset(self::$_cache[$key])) { - $namespace = $module = $area = '*'; - $themePath = '*/*'; - + $namespace = '*'; + $module = '*'; $files = array(); if ($appCode) { $files = array_merge( @@ -135,18 +139,11 @@ class Files glob($this->_path . '/*.php', GLOB_NOSORT), glob($this->_path . '/pub/*.php', GLOB_NOSORT), self::getFiles(array("{$this->_path}/downloader"), '*.php'), - self::getFiles(array("{$this->_path}/lib/Magento"), '*.php') + self::getFiles(array("{$this->_path}/lib/internal/Magento"), '*.php') ); } if ($templates) { - $files = array_merge( - $files, - self::getFiles(array("{$this->_path}/app/code/{$namespace}/{$module}"), '*.phtml'), - self::getFiles( - array("{$this->_path}/app/design/{$area}/{$themePath}/{$namespace}_{$module}"), - '*.phtml' - ) - ); + $files = array_merge($files, $this->getPhtmlFiles(false, false)); } self::$_cache[$key] = $files; } @@ -198,7 +195,7 @@ class Files $files = array_merge($files, self::getFiles(array("{$this->_path}/downloader/lib/Magento"), '*.php')); } if ($lib) { - $files = array_merge($files, self::getFiles(array("{$this->_path}/lib/Magento"), '*.php')); + $files = array_merge($files, self::getFiles(array("{$this->_path}/lib/internal/Magento"), '*.php')); } self::$_cache[$key] = $files; } @@ -313,6 +310,7 @@ class Files * 'theme' => 'theme_name', * 'include_code' => true|false, * 'include_design' => true|false, + * 'with_metainfo' => true|false, * ) * * @param array $incomingParams @@ -327,7 +325,8 @@ class Files 'area' => '*', 'theme_path' => '*/*', 'include_code' => true, - 'include_design' => true + 'include_design' => true, + 'with_metainfo' => false ); foreach (array_keys($params) as $key) { if (isset($incomingParams[$key])) { @@ -338,24 +337,24 @@ class Files if (!isset(self::$_cache[__METHOD__][$cacheKey])) { $files = array(); + $area = $params['area']; + $namespace = $params['namespace']; + $module = $params['module']; if ($params['include_code']) { - $files = self::getFiles( - array( - "{$this->_path}/app/code/{$params['namespace']}/{$params['module']}" . - "/view/{$params['area']}/layout" - ), - '*.xml' + $this->_accumulateFilesByPatterns( + array("{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}/layout"), + '*.xml', + $files, + $params['with_metainfo'] ? '_parseModuleLayout' : false ); } if ($params['include_design']) { - $themeLayoutDir = "{$this->_path}/app/design/{$params['area']}/{$params['theme_path']}" . - "/{$params['namespace']}_{$params['module']}/layout"; - $dirPatterns = array( - $themeLayoutDir, - $themeLayoutDir . '/override', - $themeLayoutDir . '/override/*/*' + $this->_accumulateFilesByPatterns( + array("{$this->_path}/app/design/{$area}/{$params['theme_path']}/{$namespace}_{$module}/layout"), + '*.xml', + $files, + $params['with_metainfo'] ? '_parseThemeLayout' : false ); - $files = array_merge($files, self::getFiles($dirPatterns, '*.xml')); } self::$_cache[__METHOD__][$cacheKey] = $files; } @@ -366,6 +365,48 @@ class Files return self::$_cache[__METHOD__][$cacheKey]; } + /** + * Parse meta-info of a layout file in module + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseModuleLayout($file, $path) + { + preg_match( + '/^' . preg_quote("{$path}/app/code/", '/') . '([a-z\d]+)\/([a-z\d]+)\/view\/([a-z]+)\/layout\/(.+)$/i', + $file, + $matches + ); + list(, $namespace, $module, $area, $filePath) = $matches; + return array($area, '', $namespace . '_' . $module, $filePath); + } + + /** + * Parse meta-info of a layout file in theme + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseThemeLayout($file, $path) + { + $appDesign = preg_quote("{$path}/app/design/", '/'); + $invariant = '/^' . $appDesign . '([a-z\d]+)\/([a-z\d]+)\/([a-z\d_]+)\/([a-z\d]+_[a-z\d]+)\/layout\/'; + if (preg_match($invariant . 'override\/base\/(.+)$/i', $file, $matches)) { + list(, $area, $themeNS, $themeCode, $module, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, $module, $filePath); + } + if (preg_match($invariant . 'override\/theme\/[a-z\d_]+\/[a-z\d_]+\/(.+)$/i', $file, $matches)) { + list(, $area, $themeNS, $themeCode, $module, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, $module, $filePath); + } + preg_match($invariant . '(.+)$/i', $file, $matches); + list(, $area, $themeNS, $themeCode, $module, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, $module, $filePath); + } + /** * Returns list of page_type files, used by Magento application modules * @@ -418,13 +459,16 @@ class Files if (isset(self::$_cache[$key])) { return self::$_cache[$key]; } - $namespace = $module = $area = $skin = '*'; + $namespace = '*'; + $module = '*'; + $area = '*'; $themePath = '*/*'; $files = self::getFiles( array( - "{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}", - "{$this->_path}/app/design/{$area}/{$themePath}/skin/{$skin}", - "{$this->_path}/pub/lib/{mage,varien}" + "{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}/web", + "{$this->_path}/app/design/{$area}/{$themePath}/web", + "{$this->_path}/app/design/{$area}/{$themePath}/{$module}/web", + "{$this->_path}/lib/web/{mage,varien}" ), '*.js' ); @@ -433,6 +477,197 @@ class Files return $result; } + /** + * Get list of static view files that are subject of Magento static view files preprocessing system + * + * @param string $filePattern + * @return array + */ + public function getStaticPreProcessingFiles($filePattern = '*') + { + $key = __METHOD__ . $this->_path . '|' . $filePattern; + if (isset(self::$_cache[$key])) { + return self::$_cache[$key]; + } + $namespace = '*'; + $module = '*'; + $area = '*'; + $themePath = '*/*'; + $locale = '*'; + $result = array(); + $this->_accumulateFilesByPatterns( + array("{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}/web"), + $filePattern, + $result, + '_parseModuleStatic' + ); + $this->_accumulateFilesByPatterns( + array("{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}/web/i18n/{$locale}"), + $filePattern, + $result, + '_parseModuleLocaleStatic' + ); + $this->_accumulateFilesByPatterns( + array( + "{$this->_path}/app/design/{$area}/{$themePath}/web", + "{$this->_path}/app/design/{$area}/{$themePath}/{$module}/web", + ), + $filePattern, + $result, + '_parseThemeStatic' + ); + $this->_accumulateFilesByPatterns( + array( + "{$this->_path}/app/design/{$area}/{$themePath}/web/i18n/{$locale}", + "{$this->_path}/app/design/{$area}/{$themePath}/{$module}/web/i18n/{$locale}", + ), + $filePattern, + $result, + '_parseThemeLocaleStatic' + ); + self::$_cache[$key] = $result; + return $result; + } + + /** + * Get all files from static library directory + * + * @return array + */ + public function getStaticLibraryFiles() + { + $result = array(); + $this->_accumulateFilesByPatterns(array("{$this->_path}/lib/web"), '*', $result, '_parseLibStatic'); + return $result; + } + + /** + * Parse file path from the absolute path of static library + * + * @param string $file + * @param string $path + * @return string + */ + protected function _parseLibStatic($file, $path) + { + preg_match('/^' . preg_quote("{$path}/lib/web/", '/') . '(.+)$/i', $file, $matches); + return $matches[1]; + } + + /** + * Search files by the specified patterns and accumulate them, applying a callback to each found row + * + * @param array $patterns + * @param string $filePattern + * @param array $result + * @param bool $subroutine + */ + protected function _accumulateFilesByPatterns(array $patterns, $filePattern, array &$result, $subroutine = false) + { + $path = str_replace(DIRECTORY_SEPARATOR, '/', $this->_path); + foreach (self::getFiles($patterns, $filePattern) as $file) { + $file = str_replace(DIRECTORY_SEPARATOR, '/', $file); + if ($subroutine) { + $result[$file] = $this->$subroutine($file, $path); + } else { + $result[] = $file; + } + } + } + + /** + * Parse meta-info of a static file in module + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseModuleStatic($file, $path) + { + preg_match( + '/^' . preg_quote("{$path}/app/code/", '/') . '([a-z\d]+)\/([a-z\d]+)\/view\/([a-z]+)\/web\/(.+)$/i', + $file, + $matches + ); + list(, $namespace, $module, $area, $filePath) = $matches; + return array($area, '', '', $namespace . '_' . $module, $filePath); + } + + /** + * Parse meta-info of a localized (translated) static file in module + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseModuleLocaleStatic($file, $path) + { + $appCode = preg_quote("{$path}/app/code/", '/'); + preg_match( + '/^' . $appCode . '([a-z\d]+)\/([a-z\d]+)\/view\/([a-z]+)\/web\/i18n\/([a-z_]+)\/(.+)$/i', + $file, + $matches + ); + list(, $namespace, $module, $area, $locale, $filePath) = $matches; + return array($area, '', $locale, $namespace . '_' . $module, $filePath); + } + + /** + * Parse meta-info of a static file in theme + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseThemeStatic($file, $path) + { + $appDesign = preg_quote("{$path}/app/design/", '/'); + if (preg_match( + '/^' . $appDesign . '([a-z\d]+)\/([a-z\d]+)\/([a-z\d_]+)\/([a-z\d]+_[a-z\d]+)\/web\/(.+)$/i', + $file, + $matches + )) { + list(, $area, $themeNS, $themeCode, $module, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, '', $module, $filePath); + } + + preg_match( + '/^' . $appDesign . '([a-z\d]+)\/([a-z\d]+)\/([a-z\d_]+)\/web\/(.+)$/i', + $file, + $matches + ); + list(, $area, $themeNS, $themeCode, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, '', '', $filePath); + } + + /** + * Parse meta-info of a localized (translated) static file in theme + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseThemeLocaleStatic($file, $path) + { + $design = preg_quote("{$path}/app/design/", '/'); + if (preg_match( + '/^' . $design. '([a-z\d]+)\/([a-z\d]+)\/([a-z\d_]+)\/([a-z\d]+_[a-z\d]+)\/web\/i18n\/([a-z_]+)\/(.+)$/i', + $file, + $matches + )) { + list(, $area, $themeNS, $themeCode, $module, $locale, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, $locale, $module, $filePath); + } + + preg_match( + '/^' . $design . '([a-z\d]+)\/([a-z\d]+)\/([a-z\d_]+)\/web\/i18n\/([a-z_]+)\/(.+)$/i', + $file, + $matches + ); + list(, $area, $themeNS, $themeCode, $locale, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, $locale, '', $filePath); + } + /** * Returns list of Javascript files in Magento by certain area * @@ -449,16 +684,16 @@ class Files $paths = array( "{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}", "{$this->_path}/app/design/{$area}/{$themePath}", - "{$this->_path}/pub/lib/varien" + "{$this->_path}/lib/web/varien" ); $files = self::getFiles($paths, '*.js'); if ($area == 'adminhtml') { - $adminhtmlPaths = array("{$this->_path}/pub/lib/mage/{adminhtml,backend}"); + $adminhtmlPaths = array("{$this->_path}/lib/web/mage/{adminhtml,backend}"); $files = array_merge($files, self::getFiles($adminhtmlPaths, '*.js')); } else { - $frontendPaths = array("{$this->_path}/pub/lib/mage"); - /* current structure of /pub/lib/mage directory contains frontend javascript in the root, + $frontendPaths = array("{$this->_path}/lib/web/mage"); + /* current structure of /lib/web/mage directory contains frontend javascript in the root, backend javascript in subdirectories. That's why script shouldn't go recursive throught subdirectories to get js files for frontend */ $files = array_merge($files, self::getFiles($frontendPaths, '*.js', false)); @@ -471,11 +706,74 @@ class Files /** * Returns list of Phtml files in Magento app directory. * + * @param bool $withMetaInfo + * @param bool $asDataSet * @return array */ - public function getPhtmlFiles() + public function getPhtmlFiles($withMetaInfo = false, $asDataSet = true) { - return $this->getPhpFiles(false, false, true, true); + $key = __METHOD__ . $this->_path . '|' . (int)$withMetaInfo; + if (!isset(self::$_cache[$key])) { + $namespace = '*'; + $module = '*'; + $area = '*'; + $themePath = '*/*'; + $result = array(); + $this->_accumulateFilesByPatterns( + array("{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}/templates"), + '*.phtml', + $result, + $withMetaInfo ? '_parseModuleTemplate' : false + ); + $this->_accumulateFilesByPatterns( + array("{$this->_path}/app/design/{$area}/{$themePath}/{$namespace}_{$module}/templates"), + '*.phtml', + $result, + $withMetaInfo ? '_parseThemeTemplate' : false + ); + self::$_cache[$key] = $result; + } + if ($asDataSet) { + return self::composeDataSets(self::$_cache[$key]); + } + return self::$_cache[$key]; + } + + /** + * Parse meta-information from a modular template file + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseModuleTemplate($file, $path) + { + preg_match( + '/^' . preg_quote("{$path}/app/code/", '/') . '([a-z\d]+)\/([a-z\d]+)\/view\/([a-z]+)\/templates\/(.+)$/i', + $file, + $matches + ); + list(, $namespace, $module, $area, $filePath) = $matches; + return array($area, '', $namespace . '_' . $module, $filePath); + } + + /** + * Parse meta-information from a theme template file + * + * @param string $file + * @param string $path + * @return array + */ + protected function _parseThemeTemplate($file, $path) + { + $appDesign = preg_quote("{$path}/app/design/", '/'); + preg_match( + '/^' . $appDesign . '([a-z\d]+)\/([a-z\d]+)\/([a-z\d_]+)\/([a-z\d]+_[a-z\d]+)\/templates\/(.+)$/i', + $file, + $matches + ); + list(, $area, $themeNS, $themeCode, $module, $filePath) = $matches; + return array($area, $themeNS . '/' . $themeCode, $module, $filePath); } /** @@ -596,7 +894,7 @@ class Files $path = implode('/', explode('\\', $class)) . '.php'; $directories = array( '/app/code/', - '/lib/', + '/lib/internal/', '/downloader/app/', '/downloader/lib/', '/dev/tools/', diff --git a/dev/tests/static/framework/bootstrap.php b/dev/tests/static/framework/bootstrap.php index e3731800e393e03bde1a8b577fdced1abd931e00..f4e680ce2286f9a610ce27c8c43e8a3d3b5853f7 100644 --- a/dev/tests/static/framework/bootstrap.php +++ b/dev/tests/static/framework/bootstrap.php @@ -22,10 +22,10 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -define('BP', realpath(__DIR__ . '/../../../../')); +define('BP', str_replace('\\', '/', realpath(__DIR__ . '/../../../../'))); require BP . '/app/autoload.php'; (new \Magento\Framework\Autoload\IncludePath())->addIncludePath( - array(__DIR__, dirname(__DIR__) . '/testsuite', BP . '/lib') + array(__DIR__, dirname(__DIR__) . '/testsuite', BP . '/lib/internal') ); \Magento\TestFramework\Utility\Files::setInstance(new \Magento\TestFramework\Utility\Files(BP)); diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php index f0b157d619d6e20e6a22f6601a269087964ec57c..441961d6108c250fa0d3d34df409188c74ddcdf2 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php @@ -486,7 +486,7 @@ class ClassesTest extends \PHPUnit_Framework_TestCase // Remove usage of classes that do NOT using fully-qualified class names (possibly under same namespace) $directories = array( '/app/code/', - '/lib/', + '/lib/internal/', '/downloader/app/', '/downloader/lib/', '/dev/tools/', diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php index b5a6bb53af64afc19b644d2b051eaf8a4b4c109d..181f59a67f9c97396fc95603128adb717abfb08b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php @@ -83,7 +83,7 @@ class CompilerTest extends \PHPUnit_Framework_TestCase $this->_compilationDir = $this->_tmpDir . '/di'; (new \Magento\Framework\Autoload\IncludePath())->addIncludePath( - array($basePath . '/app/code', $basePath . '/lib', $this->_generationDir) + array($basePath . '/app/code', $basePath . '/lib/internal', $this->_generationDir) ); $this->_command = 'php ' . $basePath . '/dev/tools/Magento/Tools/Di/compiler.php --generation=%s --di=%s'; @@ -204,7 +204,7 @@ class CompilerTest extends \PHPUnit_Framework_TestCase $basePath = \Magento\TestFramework\Utility\Files::init()->getPathToSource(); $basePath = str_replace('/', '\\', $basePath); - $libPath = $basePath . '\\lib'; + $libPath = $basePath . '\\lib\\internal'; $appPath = $basePath . '\\app\\code'; $generationPathPath = str_replace('/', '\\', $this->_generationDir); diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php index 166245d2095dbb62ae44aaf9ade9b9449b8aabab..5777d5534eb8b99b9630478216aa250c9199f6cd 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php @@ -71,7 +71,7 @@ class DependencyTest extends \PHPUnit_Framework_TestCase '#^(\\\\|)' . implode('|', $this->getForbiddenNamespaces()) . '\\\\#', $dependency ) && !file_exists( - BP . '/lib/' . str_replace('\\', '/', $dependency) . '.php' + BP . '/lib/internal/' . str_replace('\\', '/', $dependency) . '.php' ) ) { $this->errors[$fileReflection->getFileName()][] = $dependency; @@ -127,7 +127,7 @@ class DependencyTest extends \PHPUnit_Framework_TestCase public function libraryDataProvider() { // @TODO: remove this code when class Magento\Framework\Data\Collection will fixed - include_once BP . '/lib/Magento/Framework/Option/ArrayInterface.php'; + include_once BP . '/lib/internal/Magento/Framework/Option/ArrayInterface.php'; $blackList = file(__DIR__ . '/_files/blacklist.txt', FILE_IGNORE_NEW_LINES); $dataProvider = Files::init()->getClassFiles(false, false, false, false, false, true, true); diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt index 7a02e85f56662a828dabfa19f95fab935ee2b40b..1f5fbbaec501a560ad831904aa36acf3a8e91246 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt @@ -1,73 +1,73 @@ -lib/Magento/Framework/Data/Collection/Filesystem.php -lib/Magento/Framework/Data/Collection/Db.php -lib/Magento/Framework/Data/Form/Element/Radio.php -lib/Magento/Framework/Data/Form/Element/Label.php -lib/Magento/Framework/Data/Form/Element/AbstractElement.php -lib/Magento/Framework/Data/Form/Element/File.php -lib/Magento/Framework/Data/Form/Element/Checkbox.php -lib/Magento/Framework/Data/Form/Element/Checkboxes.php -lib/Magento/Framework/Data/Form/Element/Password.php -lib/Magento/Framework/Data/Form/Element/Column.php -lib/Magento/Framework/Data/Form/Element/Gallery.php -lib/Magento/Framework/Data/Form/Element/Obscure.php -lib/Magento/Framework/Data/Form/Element/Data.php -lib/Magento/Framework/Data/Form/Element/Multiline.php -lib/Magento/Framework/Data/Form/Element/Radios.php -lib/Magento/Framework/Data/Form/Element/Submit.php -lib/Magento/Framework/Data/Form/Element/Note.php -lib/Magento/Framework/Data/Form/Element/Image.php -lib/Magento/Framework/Data/Form/Element/Text.php -lib/Magento/Framework/Data/Form/Element/Time.php -lib/Magento/Framework/Data/Form/Element/Button.php -lib/Magento/Framework/Data/Form/Element/Editor.php -lib/Magento/Framework/Data/Form/Element/Hidden.php -lib/Magento/Framework/Data/Form/Element/Reset.php -lib/Magento/Framework/Data/Form/Element/Link.php -lib/Magento/Framework/Data/Form/Element/Editablemultiselect.php -lib/Magento/Framework/Data/Form/Element/Multiselect.php -lib/Magento/Framework/Data/Form/Element/Fieldset.php -lib/Magento/Framework/Data/Form/Element/Select.php -lib/Magento/Framework/Data/Form/Element/Textarea.php -lib/Magento/Framework/Data/Form/Element/Imagefile.php -lib/Magento/Framework/Data/Form/Element/Imagefile.php -lib/Magento/Framework/Data/Form/Element/Date.php -lib/Magento/Framework/Data/Form/AbstractForm.php -lib/Magento/Framework/Data/Form/Factory.php -lib/Magento/Framework/Data/Collection.php -lib/Magento/Framework/Data/Form.php -lib/Magento/Framework/Data/Form/FormKey.php +lib/internal/Magento/Framework/Data/Collection/Filesystem.php +lib/internal/Magento/Framework/Data/Collection/Db.php +lib/internal/Magento/Framework/Data/Form/Element/Radio.php +lib/internal/Magento/Framework/Data/Form/Element/Label.php +lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php +lib/internal/Magento/Framework/Data/Form/Element/File.php +lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php +lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php +lib/internal/Magento/Framework/Data/Form/Element/Password.php +lib/internal/Magento/Framework/Data/Form/Element/Column.php +lib/internal/Magento/Framework/Data/Form/Element/Gallery.php +lib/internal/Magento/Framework/Data/Form/Element/Obscure.php +lib/internal/Magento/Framework/Data/Form/Element/Data.php +lib/internal/Magento/Framework/Data/Form/Element/Multiline.php +lib/internal/Magento/Framework/Data/Form/Element/Radios.php +lib/internal/Magento/Framework/Data/Form/Element/Submit.php +lib/internal/Magento/Framework/Data/Form/Element/Note.php +lib/internal/Magento/Framework/Data/Form/Element/Image.php +lib/internal/Magento/Framework/Data/Form/Element/Text.php +lib/internal/Magento/Framework/Data/Form/Element/Time.php +lib/internal/Magento/Framework/Data/Form/Element/Button.php +lib/internal/Magento/Framework/Data/Form/Element/Editor.php +lib/internal/Magento/Framework/Data/Form/Element/Hidden.php +lib/internal/Magento/Framework/Data/Form/Element/Reset.php +lib/internal/Magento/Framework/Data/Form/Element/Link.php +lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php +lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php +lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php +lib/internal/Magento/Framework/Data/Form/Element/Select.php +lib/internal/Magento/Framework/Data/Form/Element/Textarea.php +lib/internal/Magento/Framework/Data/Form/Element/Imagefile.php +lib/internal/Magento/Framework/Data/Form/Element/Imagefile.php +lib/internal/Magento/Framework/Data/Form/Element/Date.php +lib/internal/Magento/Framework/Data/Form/AbstractForm.php +lib/internal/Magento/Framework/Data/Form/Factory.php +lib/internal/Magento/Framework/Data/Collection.php +lib/internal/Magento/Framework/Data/Form.php +lib/internal/Magento/Framework/Data/Form/FormKey.php -lib/Magento/Framework/Exception/AuthenticationException.php -lib/Magento/Framework/Exception/AuthorizationException.php -lib/Magento/Framework/Exception/Exception.php -lib/Magento/Framework/Exception/InputException.php -lib/Magento/Framework/Exception/NoSuchEntityException.php +lib/internal/Magento/Framework/Exception/AuthenticationException.php +lib/internal/Magento/Framework/Exception/AuthorizationException.php +lib/internal/Magento/Framework/Exception/Exception.php +lib/internal/Magento/Framework/Exception/InputException.php +lib/internal/Magento/Framework/Exception/NoSuchEntityException.php -lib/Magento/Framework/Filter/Object/Grid.php -lib/Magento/Framework/Filter/Object.php +lib/internal/Magento/Framework/Filter/Object/Grid.php +lib/internal/Magento/Framework/Filter/Object.php -lib/Magento/Framework/View/Context.php -lib/Magento/Framework/View/Element/Js/Cookie.php -lib/Magento/Framework/View/Element/Html/Calendar.php -lib/Magento/Framework/View/Element/Html/Link/Current.php -lib/Magento/Framework/View/Element/Messages.php -lib/Magento/Framework/View/Element/AbstractBlock.php -lib/Magento/Framework/View/Element/Template.php -lib/Magento/Framework/View/Element/Context.php -lib/Magento/Framework/View/Element/Template/Context.php -lib/Magento/Framework/View/Element/Redirect.php +lib/internal/Magento/Framework/View/Context.php +lib/internal/Magento/Framework/View/Element/Js/Cookie.php +lib/internal/Magento/Framework/View/Element/Html/Calendar.php +lib/internal/Magento/Framework/View/Element/Html/Link/Current.php +lib/internal/Magento/Framework/View/Element/Messages.php +lib/internal/Magento/Framework/View/Element/AbstractBlock.php +lib/internal/Magento/Framework/View/Element/Template.php +lib/internal/Magento/Framework/View/Element/Context.php +lib/internal/Magento/Framework/View/Element/Template/Context.php +lib/internal/Magento/Framework/View/Element/Redirect.php -lib/Magento/Framework/App/Module/ResourceResolver.php -lib/Magento/Framework/Event/Invoker/InvokerDefault.php -lib/Magento/Framework/Phrase/Renderer/Translate.php -lib/Magento/Framework/Backup/Snapshot.php -lib/Magento/Framework/Oauth/Exception.php +lib/internal/Magento/Framework/App/Module/ResourceResolver.php +lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php +lib/internal/Magento/Framework/Phrase/Renderer/Translate.php +lib/internal/Magento/Framework/Backup/Snapshot.php +lib/internal/Magento/Framework/Oauth/Exception.php -lib/Magento/Framework/App/Helper/AbstractHelper.php -lib/Magento/Framework/App/Helper/Context.php +lib/internal/Magento/Framework/App/Helper/AbstractHelper.php +lib/internal/Magento/Framework/App/Helper/Context.php -lib/Magento/Framework/View/DesignLoader.php -lib/Magento/Framework/Session/SidResolverInterface.php +lib/internal/Magento/Framework/View/DesignLoader.php +lib/internal/Magento/Framework/Session/SidResolverInterface.php -lib/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php -lib/Magento/Framework/Filesystem/Driver/Http.php +lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php +lib/internal/Magento/Framework/Filesystem/Driver/Http.php diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php index 13d02bb07f0af65691598982e5639945330775a2..8f38d24b76cbedb312f03689e893ed7ec69e459f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php @@ -38,7 +38,7 @@ class FieldsetConfigTest extends \PHPUnit_Framework_TestCase $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($configFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Framework/Object/etc/fieldset_file.xsd'; + '/lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd'; $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if ($errors) { $this->fail( @@ -59,7 +59,7 @@ class FieldsetConfigTest extends \PHPUnit_Framework_TestCase $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Framework/Object/etc/fieldset.xsd'; + '/lib/internal/Magento/Framework/Object/etc/fieldset.xsd'; $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if ($errors) { $this->fail( @@ -77,7 +77,7 @@ class FieldsetConfigTest extends \PHPUnit_Framework_TestCase $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Framework/Object/etc/fieldset.xsd'; + '/lib/internal/Magento/Framework/Object/etc/fieldset.xsd'; $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if (!$errors) { $this->fail('There is a problem with the schema. A known bad XML file passed validation'); @@ -90,7 +90,7 @@ class FieldsetConfigTest extends \PHPUnit_Framework_TestCase $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Framework/Object/etc/fieldset_file.xsd'; + '/lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd'; $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if ($errors) { $this->fail( @@ -108,7 +108,7 @@ class FieldsetConfigTest extends \PHPUnit_Framework_TestCase $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Framework/Object/etc/fieldset_file.xsd'; + '/lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd'; $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if (!$errors) { $this->fail('There is a problem with the schema. A known bad XML file passed validation'); diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml index 271c8bfef7fcd1f3ea698dbec47f9ba1104687b2..8b49b3759fc431942a8b53c1e94527b86bc78587 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_copy_order"> <field name="customer_email"> diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml index 4bbbda0012136a16bcd334ef4a542bde28d598ba..357f074d36b1892927b2937df2768310e9c90daf 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset_file.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd"> <scope id="global"> <fieldset id="sales_copy_order"> <field name="customer_email"> diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml index abb3f007b0989ec9fa0aeb060719364fe86bfa45..8bf518e00a586e98d92b24fb3f919fd29fe18344 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset_file.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd"> <global> <fieldsets> <sales_copy_order> diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php index 503f3d6c78edd518e3195f05c39cd98a7da767f1..5fde03ebc31362a2a9b66d17812516eba8d780a2 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Xml/SchemaTest.php @@ -45,7 +45,7 @@ class SchemaTest extends \PHPUnit_Framework_TestCase count($schemaLocations), 'The XML file at ' . $filename . ' does not have a schema properly defined. It should have a xsi:noNamespaceSchemaLocation attribute defined with a relative path. E.g. -xsi:noNamespaceSchemaLocation="../../../lib/Magento/Framework/etc/something.xsd" +xsi:noNamespaceSchemaLocation="../../../lib/internal/Magento/Framework/etc/something.xsd" ' ); diff --git a/dev/tests/static/testsuite/Magento/Test/Js/Exemplar/JsHintTest.php b/dev/tests/static/testsuite/Magento/Test/Js/Exemplar/JsHintTest.php index a59605f913ce11a05184725258208043ebe12656..e1e6e5ff3fd25d6b137e4789ee9c71d486bc83a4 100644 --- a/dev/tests/static/testsuite/Magento/Test/Js/Exemplar/JsHintTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Js/Exemplar/JsHintTest.php @@ -39,7 +39,7 @@ class JsHintTest extends \PHPUnit_Framework_TestCase public static function setUpBeforeClass() { $reportFile = __DIR__ . '/../../../tmp/js_report.txt'; - $fileName = BP . '/pub/lib/mage/mage.js'; + $fileName = BP . '/lib/web/mage/mage.js'; self::$_cmd = new \Magento\TestFramework\Inspection\JsHint\Command($fileName, $reportFile); } diff --git a/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt b/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt index fc49bd3a9e879e2b5da6a695a41cb076ef71eb7c..ce70c8d4b4817ecd14637bafb3660ed360668ee5 100644 --- a/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt +++ b/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt @@ -1,20 +1,22 @@ -app/code/Magento/Authorizenet/view/adminhtml/js/direct-post.js -app/code/Magento/Backend/view/adminhtml/variables.js -app/code/Magento/Captcha/view/frontend/onepage.js -app/code/Magento/Catalog/view/adminhtml/catalog/category/edit.js -app/code/Magento/Catalog/view/adminhtml/catalog/product.js -app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/configure.js -app/code/Magento/Checkout/view/frontend/js/accordion.js -app/code/Magento/Checkout/view/frontend/js/opcheckout.js -app/code/Magento/Checkout/view/frontend/js/payment.js -app/code/Magento/Rule/view/adminhtml/rules.js -app/code/Magento/Sales/view/adminhtml/order/create/giftmessage.js -app/code/Magento/Sales/view/adminhtml/order/create/scripts.js -app/code/Magento/Sales/view/adminhtml/order/giftoptions_tooltip.js -app/code/Magento/Shipping/view/adminhtml/order/packaging.js -app/code/Magento/Theme/view/frontend/menu.js -pub/lib/mage/adminhtml -pub/lib/mage/backend/editablemultiselect.js -pub/lib/mage/captcha.js -pub/lib/mage/flex.js -pub/lib/mage/jquery-no-conflict.js +app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js +app/code/Magento/Backend/view/adminhtml/web/variables.js +app/code/Magento/Captcha/view/frontend/web/onepage.js +app/code/Magento/Catalog/view/adminhtml/web/catalog/category/edit.js +app/code/Magento/Catalog/view/adminhtml/web/catalog/product.js +app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js +app/code/Magento/Checkout/view/frontend/web/js/accordion.js +app/code/Magento/Checkout/view/frontend/web/js/opcheckout.js +app/code/Magento/Checkout/view/frontend/web/js/payment.js +app/code/Magento/Rule/view/adminhtml/web/rules.js +app/code/Magento/Sales/view/adminhtml/web/order/create/giftmessage.js +app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js +app/code/Magento/Sales/view/adminhtml/web/order/giftoptions_tooltip.js +app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js +app/code/Magento/Theme/view/frontend/web/menu.js +dev/tests/js/testsuite/mage/translate_inline_vde/translate-inline-vde-test.js +dev/tests/js/framework/qunit +lib/web/mage/adminhtml +lib/web/mage/backend/editablemultiselect.js +lib/web/mage/captcha.js +lib/web/mage/flex.js +lib/web/mage/jquery-no-conflict.js diff --git a/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt b/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt index f779ea7b6f96a849216d13236ec3efef350fa021..1ce27bbb8f4da891ca0e8ee24767b6c0fc3ae783 100644 --- a/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt +++ b/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt @@ -16,4 +16,6 @@ app/code/Magento/Persistent app/code/Magento/Sales app/code/Magento/Theme app/code/Magento/Wishlist -pub/lib/mage +dev/tests/js +lib/web/mage +lib/internal/Magento/Framework/RequireJs/paths-updater.js diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/LibraryLocationTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/LibraryLocationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2f464cd5900587f6792963a366c6a31c9a13bee5 --- /dev/null +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/LibraryLocationTest.php @@ -0,0 +1,81 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +/** + * Verify that there are no files in the old locations of web and php libraries + */ +namespace Magento\Test\Legacy; + +class LibraryLocationTest extends \PHPUnit_Framework_TestCase +{ + /** + * Root path of Magento + * + * @var string + */ + protected static $root; + + public static function setUpBeforeClass() + { + self::$root = \Magento\TestFramework\Utility\Files::init()->getPathToSource(); + } + + public function testOldWebLibrariesLocation() + { + $oldLocation = self::$root . '/pub/lib'; + $this->assertFileNotExists($oldLocation, "The web libraries have been moved from 'pub/lib' to 'lib/web'"); + } + + public function testOldPhpLibrariesLocation() + { + $libLocation = self::$root . '/lib'; + + $permittedEntries = array( + self::$root . '/lib/web', + self::$root . '/lib/internal', + self::$root . '/.htaccess' + ); + + $entries = glob("{$libLocation}/*"); + $excessiveEntries = array(); + foreach ($entries as $entry) { + $entry = str_replace('\\', '/', $entry); + $permitted = false; + foreach ($permittedEntries as $permittedEntry) { + if ($permittedEntry == $entry) { + $permitted = true; + break; + } + } + if (!$permitted) { + $excessiveEntries[] = $entry; + } + } + + $this->assertEmpty( + $excessiveEntries, + "All files and directories have been moved from 'lib' to 'lib/internal'" + ); + } +} diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/LicenseTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/LicenseTest.php index 0c36710af0b474b8e2d3aa217be43670a5e734e8..dc61a100b122d948c71a7cf76fe917603ff15c8f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/LicenseTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/LicenseTest.php @@ -67,7 +67,7 @@ class LicenseTest extends \PHPUnit_Framework_TestCase $rootFolderName . '/app/.+\.' . $extensions, $rootFolderName . '/dev/(?!tests/integration/tmp|tests/functional).+\.' . $extensions, $rootFolderName . '/downloader/.+\.' . $extensions, - $rootFolderName . '/lib/(Mage|Magento|Varien)/.+\.' . $extensions, + $rootFolderName . '/lib/internal/(Mage|Magento|Varien)/.+\.' . $extensions, $rootFolderName . '/pub/.+\.' . $extensions ); $regexIterator = new \RegexIterator($recursiveIterator, '#(' . implode(' | ', $paths) . ')$#x'); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index c1c76b0ba00fd39cd90956eff33bbad49be669cf..57923ed71f6145c776f106442798bef6c71587c8 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -1414,37 +1414,37 @@ return array( 'Magento\Framework\View\Design\Fallback\Rule\RuleInterface' ), array('Magento\Core\Model\Design\Fallback\Rule\Simple', 'Magento\Framework\View\Design\Fallback\Rule\Simple'), - array('Magento\Core\Model\Design\Fallback\Factory', 'Magento\Framework\View\Design\Fallback\Factory'), - array( - 'Magento\Core\Model\Design\FileResolution\Strategy\Fallback\CachingProxy', - 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy' - ), + array('Magento\Core\Model\Design\Fallback\Factory', 'Magento\Framework\View\Design\Fallback\RulePool'), + array('Magento\Core\Model\Design\FileResolution\Strategy\Fallback\CachingProxy'), + array('Magento\Framework\View\Design\FileResolution\Strategy\View\NotifiableInterface'), + array('Magento\Framework\View\Design\FileResolution\Strategy\View\FileInterface'), + array('Magento\Framework\View\Design\FileResolution\Strategy\View\LocaleInterface'), + array('Magento\Framework\View\Design\FileResolution\Strategy\View\ViewInterface'), + array('Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy'), array( 'Magento\Core\Model\Design\FileResolution\Strategy\Fallback', - 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback' + 'Magento\Framework\View\Design\FileResolution\Fallback\{File,ViewFile,LocaleFile,TemplateFile}' ), - array( - 'Magento\Core\Model\Design\FileResolution\StrategyPool', - 'Magento\Framework\View\Design\FileResolution\StrategyPool' - ), - array('Magento\Core\Model\Layout\File', 'Magento\Framework\View\Layout\File'), - array('Magento\Core\Model\Layout\File\Factory', 'Magento\Framework\View\Layout\File\Factory'), - array('Magento\Core\Model\Layout\File\FileList\Factory', 'Magento\Framework\View\Layout\File\FileList\Factory'), - array('Magento\Core\Model\Layout\File\ListFile', 'Magento\Framework\View\Layout\File\FileList'), - array('Magento\Core\Model\Layout\File\Source\Aggregated', 'Magento\Framework\View\Layout\File\Source\Aggregated'), - array('Magento\Core\Model\Layout\File\Source\Base', 'Magento\Framework\View\Layout\File\Source\Base'), + array('Magento\Core\Model\Design\FileResolution\StrategyPool'), + array('Magento\Framework\View\Design\FileResolution\StrategyPool'), + array('Magento\Core\Model\Layout\File','Magento\Framework\View\File'), + array('Magento\Core\Model\Layout\File\Factory','Magento\Framework\View\File\Factory'), + array('Magento\Core\Model\Layout\File\FileList\Factory','Magento\Framework\View\File\FileList\Factory'), + array('Magento\Core\Model\Layout\File\ListFile','Magento\Framework\View\File\FileList'), + array('Magento\Core\Model\Layout\File\Source\Aggregated','Magento\Framework\View\Layout\File\Collector\Aggregated'), + array('Magento\Core\Model\Layout\File\Source\Base','Magento\Framework\View\Layout\File\Source\Base'), array( 'Magento\Core\Model\Layout\File\Source\Decorator\ModuleDependency', - 'Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency' + 'Magento\Framework\View\File\Collector\Decorator\ModuleDependency' ), array( 'Magento\Core\Model\Layout\File\Source\Decorator\ModuleOutput', - 'Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput' + 'Magento\Framework\View\File\Collector\Decorator\ModuleOutput' ), array('Magento\Core\Model\Layout\File\Source\Override\Base', 'Magento\Framework\View\Layout\File\Override\Base'), array('Magento\Core\Model\Layout\File\Source\Override\Theme', 'Magento\Framework\View\Layout\File\Override\Theme'), array('Magento\Core\Model\Layout\File\Source\Theme', 'Magento\Framework\View\Layout\File\Source\Theme'), - array('Magento\Core\Model\Layout\File\SourceInterface', 'Magento\Framework\View\Layout\File\SourceInterface'), + array('Magento\Core\Model\Layout\File\SourceInterface', 'Magento\Framework\View\File\CollectorInterface'), array('Magento\Core\Model\LayoutFactory', 'Magento\Framework\View\LayoutFactory'), array('Magento\Core\Model\TemplateEngine\EngineInterface', 'Magento\Framework\View\TemplateEngineInterface'), array('Magento\Core\Model\TemplateEngine\Factory', 'Magento\Framework\View\TemplateEngineFactory'), @@ -1604,12 +1604,13 @@ return array( ), array('Magento\Adminhtml\Block\Checkout\Agreement', 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement'), array('Magento\Adminhtml\Controller\Checkout\Agreement', 'Magento\Checkout\Controller\Adminhtml\Agreement'), - array('Magento\Core\Model\View\PublicFilesManagerInterface', 'Magento\Framework\View\PublicFilesManagerInterface'), - array('Magento\Core\Model\View\DeployedFilesManager', 'Magento\Framework\View\DeployedFilesManager'), + array('Magento\Core\Model\View\PublicFilesManagerInterface', 'Magento\Framework\View\Asset\SourceFileInterface'), + array('Magento\Core\Model\View\DeployedFilesManager', 'Magento\Framework\View\AssetInterface'), + array('Magento\Framework\View\DeployedFilesManager', 'Magento\Framework\View\AssetInterface'), array('Magento\Core\Model\View\Publisher', 'Magento\Framework\View\Publisher'), array('Magento\Core\Model\View\FileSystem', 'Magento\Framework\View\FileSystem'), - array('Magento\Core\Model\View\Service', 'Magento\Framework\View\Service'), - array('Magento\Core\Model\View\Url', 'Magento\Framework\View\Url'), + array('Magento\Core\Model\View\Service', 'Magento\Framework\View\Asset\Repository'), + array('Magento\Core\Model\View\Url', 'Magento\Framework\View\Asset\Repository'), array('Magento\Core\Model\View\Config', 'Magento\Framework\View\Config'), array('Magento\Core\Model\Image\Factory', 'Magento\Framework\Image\Factory'), array('Magento\Core\Model\Theme\Image', 'Magento\Framework\View\Design\Theme\Image'), @@ -1814,7 +1815,7 @@ return array( array('Magento\Core\Model\Page\Asset\MinifyService', 'Magento\Framework\View\Asset\MinifyService'), array('Magento\Core\Model\Page\Asset\PublicFile', 'Magento\Framework\View\Asset\PublicFile'), array('Magento\Core\Model\Page\Asset\Remote', 'Magento\Framework\View\Asset\Remote'), - array('Magento\Core\Model\Page\Asset\ViewFile', 'Magento\Framework\View\Asset\ViewFile'), + array('Magento\Core\Model\Page\Asset\ViewFile', 'Magento\Framework\View\Asset\File'), array('Magento\Page\Block\Html\Head\AssetBlock', 'Magento\Theme\Block\Html\Head\AssetBlockInterface'), array('Magento\Page\Block\Html\Head\Css', 'Magento\Theme\Block\Html\Head\Css'), array('Magento\Page\Block\Html\Head\Link', 'Magento\Theme\Block\Html\Head\Link'), @@ -2511,5 +2512,71 @@ return array( [ 'Magento\Customer\Service\V1\CustomerAddressCurrentServiceInterface', 'Magento\Customer\Helper\Session\CurrentCustomerAddress' - ] + ], + [ + 'Magento\SalesArchive\Block\Adminhtml\Sales\Order\Grid\Button', + 'Magento\SalesArchive\Block\Adminhtml\Sales\Order\Grid' + ], + ['Magento\Framework\View\Url', 'Magento\Framework\View\Asset\Repository'], + ['Magento\Less\File\Source\Base', 'Magento\Framework\View\File\Collector\Base'], + ['Magento\Less\File\Source\Theme', 'Magento\Framework\View\File\Collector\ThemeModular'], + ['Magento\Framework\View\Layout\File\FileList\CollateInterface', 'Magento\Framework\View\File\FileList\CollateInterface'], + ['Magento\Framework\View\Layout\File\FileList\Collator', 'Magento\Framework\View\File\FileList\Collator'], + ['Magento\Framework\View\Layout\File\FileList\Factory', 'Magento\Framework\View\File\FileList\Factory'], + [ + 'Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency', + 'Magento\Framework\View\File\Collector\Decorator\ModuleDependency' + ], + [ + 'Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput', + 'Magento\Framework\View\File\Collector\Decorator\ModuleOutput' + ], + ['Magento\Framework\View\Layout\File\Source\Override\Base', 'Magento\Framework\View\File\Collector\Override\Base'], + [ + 'Magento\Framework\View\Layout\File\Source\Override\Theme', + 'Magento\Framework\View\File\Collector\Override\ThemeModular' + ], + ['Magento\Framework\View\Layout\File\Source\Base', 'Magento\Framework\View\File\Collector\Base'], + ['Magento\Framework\View\Layout\File\Source\Theme', 'Magento\Framework\View\File\Collector\ThemeModular'], + ['Magento\Framework\View\Layout\File\Factory', 'Magento\Framework\View\File\Factory'], + ['Magento\Framework\View\Layout\File\FileList', 'Magento\Framework\View\File\FileList'], + ['Magento\Framework\View\Layout\File\SourceInterface', 'Magento\Framework\View\File\CollectorInterface'], + ['Magento\Framework\View\Layout\File', 'Magento\Framework\View\File'], + ['Magento\Framework\View\Url\Resolver', 'Magento\Framework\View\Asset\Repository'], + [ + 'Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css\Group', + 'Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css' + ], + ['Magento\Css\PreProcessor\Composite'], + ['Magento\Css\PreProcessor\UrlResolver', 'Magento\Framework\View\Asset\PreProcessor\ModuleNotation'], + ['Magento\Less\PreProcessor\File\FileList'], + ['Magento\Less\PreProcessor\File\FileListFactory'], + ['Magento\Less\PreProcessor\File\Less', 'Magento\Framework\View\Asset\File'], + ['Magento\Less\PreProcessor\File\LessFactory'], + ['Magento\Less\PreProcessor\InstructionFactory'], + ['Magento\Less\PreProcessor', 'Magento\Framework\Less\FileGenerator'], + ['Magento\Less\PreProcessorInterface', 'Magento\Framework\View\Asset\PreProcessorInterface'], + ['Magento\Framework\View\Asset\PreProcessorFactory'], + ['Magento\Framework\View\Asset\PreProcessor\Composite'], + [ + 'Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface', + 'Magento\Framework\View\Asset\PreProcessorInterface' + ], + ['Magento\Framework\View\Publisher', '\Magento\Framework\App\View\Asset\Publisher'], + ['Magento\Framework\View\Publisher\FileAbstract'], + ['Magento\Framework\View\Publisher\File'], + ['Magento\Framework\View\Publisher\FileFactory'], + ['Magento\Framework\View\Publisher\CssFile'], + ['Magento\Framework\View\RelatedFile'], + ['Magento\Css\PreProcessor\Cache\Plugin\Less', 'Magento\Framework\View\Asset\PreProcessing\Cache'], + ['Magento\Css\PreProcessor\Cache\Import\Cache'], + ['Magento\Css\PreProcessor\Cache\Plugin\ImportCleaner'], + ['Magento\Css\PreProcessor\Cache\Import\Map\Storage', 'Magento\Framework\View\Asset\PreProcessing\Cache'], + ['Magento\Css\PreProcessor\Cache\Import\ImportEntity'], + ['Magento\Css\PreProcessor\Cache\Import\ImportEntityFactory'], + ['Magento\Css\PreProcessor\Cache\Import\ImportEntityInterface'], + ['Magento\Css\PreProcessor\Cache\CacheFactory'], + ['Magento\Css\PreProcessor\Cache\CacheInterface'], + ['Magento\Css\PreProcessor\Cache\CacheManager'], + ['Magento\Framework\View\Design\FileResolution\Strategy\ViewInterface'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php index 7eafbe46646401c48ea0e5221fbcae9b5445c46b..ff0aea14ebba5283900d509edcb823e0db732578 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php @@ -89,8 +89,9 @@ return array( '/config//observers/*/args' => 'This was an undocumented and unused feature in event subscribers', '/config/default/design/theme' => 'Relocated to /config/<area>/design/theme', '/config/global/theme' => 'Configuration moved to DI file settings', - '/config/default/web/*/base_js_url' => '/config/default/web/*/base_lib_url', + '/config/default/web/*/base_js_url' => '', '/config/default/web/*/base_skin_url' => '/config/default/web/*/base_static_url', + '/config/default/web/*/base_cache_url' => '/config/default/web/*/base_static_url', '/config/global/cache/types/*/tags' => 'use /config/global/cache/types/*/class node instead', '/config/global/disable_local_modules' => '', '/config/global/newsletter/tempate_filter' => 'Use DI configs to setup model for template processing', diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php index 6a82ceaa1929bdb1c583a2f1fc510c3c630cc5ca..d709e0ff8ccc5fe1f6e1289b16b2110623656d8f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php @@ -149,6 +149,7 @@ return array( array('TYPE_TINYINT', null, 'Magento_DB_Ddl_Table::TYPE_SMALLINT'), array('TYPE_VARCHAR', null, 'Magento_DB_Ddl_Table::TYPE_TEXT'), array('URL_TYPE_SKIN'), + array('URL_TYPE_CACHE'), array('XML_NODE_PAGE_TEMPLATE_FILTER', 'Magento\Cms\Helper\Data'), array('XML_NODE_BLOCK_TEMPLATE_FILTER', 'Magento\Cms\Helper\Data'), array('XML_NODE_RELATED_CACHE', 'Magento\Widget\Model\Widget\Instance'), @@ -541,13 +542,15 @@ return array( array('MODULES', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::MODULES_DIR'), array('THEMES', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::THEMES_DIR'), array('CONFIG', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::CONFIG_DIR'), - array('LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LIB_DIR'), + array('LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LIB_INTERNAL'), array('LOCALE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LOCALE_DIR'), array('PUB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::PUB_DIR'), - array('PUB_LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::PUB_LIB_DIR'), + array('PUB_LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LIB_WEB'), + array('PUB_LIB_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem::LIB_WEB'), array('MEDIA', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::MEDIA_DIR'), array('STATIC_VIEW', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'), - array('PUB_VIEW_CACHE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR'), + array('PUB_VIEW_CACHE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'), + array('PUB_VIEW_CACHE_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'), array('VAR_DIR', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem'), array('TMP', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::TMP_DIR'), array('CACHE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::CACHE_DIR'), @@ -563,6 +566,7 @@ return array( '\Magento\Catalog\Model\Product\Type', '\Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE' ), + array('LIB_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem::LIB_INTERNAL'), array( 'PERIOD_UNIT_DAY', '\Magento\Payment\Model\Recurring\Profile', @@ -614,4 +618,15 @@ return array( 'Magento\Catalog\Model\Product', 'Magento\Catalog\Model\Product::CACHE_PRODUCT_CATEGORY_TAG' ), + array('XML_PATH_UNSECURE_BASE_LIB_URL'), + array('XML_PATH_SECURE_BASE_LIB_URL'), + array('XML_PATH_SECURE_BASE_CACHE_URL'), + array('XML_PATH_UNSECURE_BASE_CACHE_URL'), + array('PUBLIC_MERGE_DIR', '', '\Magento\Framework\View\Asset\Merged::getRelativeDir'), + array('PUBLIC_MINIFY_DIR', '', '\Magento\Framework\View\Asset\MinifyService::getRelativeDir'), + ['CONTENT_TYPE_CSS', 'Magento\Framework\View\Publisher'], + ['CONTENT_TYPE_JS', 'Magento\Framework\View\Publisher'], + ['CONTENT_TYPE_PHP', 'Magento\Framework\View\Publisher'], + ['CONTENT_TYPE_PHTML', 'Magento\Framework\View\Publisher'], + ['CONTENT_TYPE_XML', 'Magento\Framework\View\Publisher'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php index 21f633cb716b44eb464c014346a492408e296080..06439ab61e2cacb599dd05643a3ec35ef6ce4745 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php @@ -103,7 +103,7 @@ return array( array('_getPriceFilter', 'Magento\LayeredNavigation\Block\Navigation'), array('_getProcessor', 'Magento\Framework\App\Cache'), array('_getProductQtyForCheck', 'Magento\CatalogInventory\Model\Observer'), - array('_getPublicFileUrl', 'Magento\Core\Model\Design\Package', 'Magento_Core_Model_View_Url::getPublicFileUrl'), + array('getPublicFileUrl', 'Magento\Framework\View\Url', 'Magento\Framework\Url::getBaseUrl'), array('_getRangeByType', 'Magento\Log\Model\Resource\Visitor\Collection'), array('_getRecentProductsCollection'), array('_getRequestModel', 'Magento\Authorizenet\Model\Directpost'), @@ -1365,7 +1365,6 @@ return array( array('getUpdateUrl', 'Magento\Wishlist\Helper\Data'), array('getItemRemoveUrl', 'Magento\Wishlist\Block\AbstractBlock'), array('_getUrlParams', 'Magento\Catalog\Helper\Product\Compare'), - array('getFileIdentifier', 'Magento\Framework\View\Layout\File\FileList', 'Magento\Framework\View\Layout\File'), array('_getInitialXml', 'Magento\Framework\Config\Theme'), array('_getIdAttributes', 'Magento\Framework\Config\Theme'), array( @@ -1459,6 +1458,11 @@ return array( 'Magento\Catalog\Model\Resource\Attribute', 'Magento\ConfigurableProduct\Model\Attribute\LockValidator::validate' ), + ['_detectMimeType', 'Magento\Framework\File\Transfer\Adapter\Http', '\Magento\Framework\File\Mime::getMimeType()'], + ['getPublishedFilePath', 'Magento\Framework\View\Publisher'], + ['getPublicFilePath', 'Magento\Framework\View\PublicFilesManagerInterface', 'Magento\Framework\View\AssetInterface'], + ['getPublicFilePath', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\AssetInterface'], + ['getPublicViewFile', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\AssetInterface'], array('_getVatRequiredCustomerAddress', 'Magento\Sales\Model\Observer'), array( 'canGetRecurringProfileDetails', @@ -1690,4 +1694,25 @@ return array( ['_getCategoryProductIdentities', 'Magento\Catalog\Model\Product'], ['_getCategoryIdentities', 'Magento\Catalog\Model\Product'], ['_isDataChanged', 'Magento\Catalog\Model\Product'], + ['getVisibleOnFrontStates', 'Magento\Sales\Model\Order\Config', 'getVisibleOnFrontStatuses'], + ['getInvisibleOnFrontStates', 'Magento\Sales\Model\Order\Config', 'getInvisibleOnFrontStatuses'], + ['getViewFileUrl', 'Magento\Framework\View\Url', 'Magento\Framework\View\Asset\Repository::getUrl'], + ['getCssFiles', 'Magento\Core\Helper\Theme', 'Magento\Core\Helper\Theme::getCssAssets'], + ['getGroupedCssFiles', 'Magento\Core\Helper\Theme'], + ['_detectTheme', 'Magento\Core\Helper\Theme'], + ['_detectGroup', 'Magento\Core\Helper\Theme'], + ['_sortThemesByHierarchy', 'Magento\Core\Helper\Theme'], + ['_sortArrayByArray', 'Magento\Core\Helper\Theme'], + ['_getGroupLabels', 'Magento\Core\Helper\Theme'], + ['_sortGroupFilesCallback', 'Magento\Core\Helper\Theme'], + ['_sortThemesByHierarchyCallback', 'Magento\Core\Helper\Theme'], + ['getFileGroups', 'Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Css'], + ['_convertFileData', 'Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Css'], + ['notifyViewFileLocationChanged', 'Magento\Framework\View\FileSystem'], + [ + 'convertModuleNotationToPath', + 'Magento\Framework\View\Asset\PreProcessor\ModuleNotation', + 'Magento\Framework\View\Asset\ModuleNotation\Resolver::convertModuleNotationToPath' + ], + ['getViewFile', 'Magento\Framework\View\FileSystem', 'Magento\Framework\View\Asset\File::getSourceFile()'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php index cfde7648766ff6d748ecd3cad967d1468860e635..631212db1a799ca9b15f72fb115752c1e67d655b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php @@ -268,15 +268,9 @@ return array( array('_dirs', 'Magento\Framework\View\Asset\MinifyService', 'dirs'), array('_appState', 'Magento\Framework\View\Asset\MinifyService', 'appState'), array('_properties', 'Magento\Framework\View\Asset\PropertyGroup', 'properties'), - array('_viewUrl', 'Magento\Framework\View\Asset\PublicFile', 'viewUrl'), array('_productThumbnail', 'Magento\Checkout\Block\Cart\Item\Renderer'), - array('_file', 'Magento\Framework\View\Asset\PublicFile', 'file'), - array('_contentType', 'Magento\Framework\View\Asset\PublicFile', 'contentType'), array('_url', 'Magento\Framework\View\Asset\Remote', 'url'), array('_contentType', 'Magento\Framework\View\Asset\Remote', 'contentType'), - array('_viewUrl', 'Magento\Framework\View\Asset\ViewFile', 'viewUrl'), - array('_file', 'Magento\Framework\View\Asset\ViewFile', 'file'), - array('_contentType', 'Magento\Framework\View\Asset\ViewFile', 'contentType'), array('_frameOpenTag', 'Magento\Framework\View\Element\AbstractBlock'), array('_frameCloseTag', 'Magento\Framework\View\Element\AbstractBlock'), array('_messagesBlock', 'Magento\Framework\View\Element\AbstractBlock'), @@ -340,4 +334,6 @@ return array( ['_area', 'Magento\Framework\View\Layout'], ['_coreData', '\Magento\Rss\Block\Catalog\Special', 'priceCurrency'], ['_tierPriceDefaultTemplate', 'Magento\Catalog\Block\Product\AbstractProduct'], + ['_mimeTypes', 'Magento\Framework\File\Transfer\Adapter\Http', '\Magento\Framework\File\Mime::$mimeTypes'], + ['_viewFileResolution', 'Magento\Framework\View\FileSystem', '_fileResolution, _localeFileResolution'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml index bf36d2a2ff2966a0328e71f38c34953feec4e12e..201c697328587895c65baf019c3ab622689bea82 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml @@ -74,22 +74,22 @@ <word>dataflow</word> </item> <item> - <path>lib/Zend</path> + <path>lib/internal/Zend</path> </item> <item> <path>dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php</path> <word>overriden</word> </item> <item> - <path>app/code/Magento/Paypal/view/frontend/express/shortcut.phtml</path> + <path>app/code/Magento/Paypal/view/frontend/templates/express/shortcut.phtml</path> <word>head.js</word> </item> <item> - <path>app/code/Magento/Bundle/view/adminhtml/product/edit/bundle.phtml</path> + <path>app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml</path> <word>head.js</word> </item> <item> - <path>app/code/Magento/Webapi/view/adminhtml/integration/activate/permissions/tab/webapi.phtml</path> + <path>app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml</path> <word>head.js</word> </item> <item> @@ -97,19 +97,19 @@ <word>head.js</word> </item> <item> - <path>app/code/Magento/GiftCard/view/adminhtml/catalog/product/composite/fieldset/giftcard.phtml</path> + <path>app/code/Magento/GiftCard/view/adminhtml/templates/catalog/product/composite/fieldset/giftcard.phtml</path> <word>head.js</word> </item> <item> - <path>app/code/Magento/GiftRegistry/view/adminhtml/edit/attributes.phtml</path> + <path>app/code/Magento/GiftRegistry/view/adminhtml/templates/edit/attributes.phtml</path> <word>head.js</word> </item> <item> - <path>app/code/Magento/GiftRegistry/view/adminhtml/edit/type/select.phtml</path> + <path>app/code/Magento/GiftRegistry/view/adminhtml/templates/edit/type/select.phtml</path> <word>head.js</word> </item> <item> - <path>pub/lib/mage/mage.js</path> + <path>lib/web/mage/mage.js</path> <word>head.js</word> </item> </whitelist> diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt index cff3d675e6653a7e42339b6a36d16e036671448e..f9f4ce6856d861ab56e36b7485d0142190b534c2 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt @@ -36,86 +36,86 @@ dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files dev/tools/Magento/Tools/I18n/Zend -lib/Magento/Framework/App/Config/Element.php -lib/Magento/Framework/Archive -lib/Magento/Framework/Autoload/Simple.php -lib/Magento/Framework/Backup -lib/Magento/Framework/Cache/Backend/Database.php -lib/Magento/Framework/Cache/Backend/Eaccelerator.php -lib/Magento/Framework/Cache/Backend/Memcached.php -lib/Magento/Framework/Cache/Core.php -lib/Magento/Framework/Connect -lib/Magento/Framework/Data/Collection.php -lib/Magento/Framework/Data/Collection/Db.php -lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php -lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php -lib/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php -lib/Magento/Framework/Data/Collection/Filesystem.php -lib/Magento/Framework/Data/Form.php -lib/Magento/Framework/Data/Form/AbstractForm.php -lib/Magento/Framework/Data/Form/Element/AbstractElement.php -lib/Magento/Framework/Data/Form/Element/Button.php -lib/Magento/Framework/Data/Form/Element/Checkbox.php -lib/Magento/Framework/Data/Form/Element/Checkboxes.php -lib/Magento/Framework/Data/Form/Element/Collection.php -lib/Magento/Framework/Data/Form/Element/Column.php -lib/Magento/Framework/Data/Form/Element/Date.php -lib/Magento/Framework/Data/Form/Element/Editablemultiselect.php -lib/Magento/Framework/Data/Form/Element/Editor.php -lib/Magento/Framework/Data/Form/Element/Fieldset.php -lib/Magento/Framework/Data/Form/Element/File.php -lib/Magento/Framework/Data/Form/Element/Gallery.php -lib/Magento/Framework/Data/Form/Element/Hidden.php -lib/Magento/Framework/Data/Form/Element/Image.php -lib/Magento/Framework/Data/Form/Element/Imagefile.php -lib/Magento/Framework/Data/Form/Element/Label.php -lib/Magento/Framework/Data/Form/Element/Link.php -lib/Magento/Framework/Data/Form/Element/Multiline.php -lib/Magento/Framework/Data/Form/Element/Multiselect.php -lib/Magento/Framework/Data/Form/Element/Note.php -lib/Magento/Framework/Data/Form/Element/Obscure.php -lib/Magento/Framework/Data/Form/Element/Password.php -lib/Magento/Framework/Data/Form/Element/Radio.php -lib/Magento/Framework/Data/Form/Element/Radios.php -lib/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php -lib/Magento/Framework/Data/Form/Element/Reset.php -lib/Magento/Framework/Data/Form/Element/Select.php -lib/Magento/Framework/Data/Form/Element/Submit.php -lib/Magento/Framework/Data/Form/Element/Text.php -lib/Magento/Framework/Data/Form/Element/Textarea.php -lib/Magento/Framework/Data/Form/Element/Time.php -lib/Magento/Framework/Data/Form/Filter/Date.php -lib/Magento/Framework/Data/Form/Filter/Escapehtml.php -lib/Magento/Framework/Data/Form/Filter/FilterInterface.php -lib/Magento/Framework/Data/Form/Filter/Striptags.php -lib/Magento/Framework/Data/Tree.php -lib/Magento/Framework/Data/Tree/Db.php -lib/Magento/Framework/Data/Tree/Dbp.php -lib/Magento/Framework/Data/Tree/Node.php -lib/Magento/Framework/Data/Tree/Node/Collection.php -lib/Magento/Framework/DB -lib/Magento/Framework/Stdlib/DateTime.php -lib/Magento/Framework/Debug.php -lib/Magento/Framework/Event.php -lib/Magento/Framework/Event -lib/Magento/Framework/File/Csv.php -lib/Magento/Framework/File/CsvMulty.php -lib/Magento/Framework/File/Transfer/Adapter/Http.php -lib/Magento/Framework/File/Uploader.php -lib/Magento/Framework/Gdata -lib/Magento/Framework/HTTP/Adapter/Curl.php -lib/Magento/Framework/HTTP/Client.php -lib/Magento/Framework/HTTP/Client/Curl.php -lib/Magento/Framework/HTTP/Client/Socket.php -lib/Magento/Framework/HTTP/IClient.php -lib/Magento/Framework/Image -lib/Magento/Framework/Image.php -lib/Magento/Framework/Io -lib/Magento/Framework/Object -lib/Magento/Framework/Object.php -lib/Magento/Framework/Pear -lib/Magento/Framework/Pear.php -lib/Magento/Framework/Simplexml -lib/Magento/Framework/System -lib/Magento/Framework/Util.php -lib/Magento/Framework/Xml +lib/internal/Magento/Framework/App/Config/Element.php +lib/internal/Magento/Framework/Archive +lib/internal/Magento/Framework/Autoload/Simple.php +lib/internal/Magento/Framework/Backup +lib/internal/Magento/Framework/Cache/Backend/Database.php +lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php +lib/internal/Magento/Framework/Cache/Backend/Memcached.php +lib/internal/Magento/Framework/Cache/Core.php +lib/internal/Magento/Framework/Connect +lib/internal/Magento/Framework/Data/Collection.php +lib/internal/Magento/Framework/Data/Collection/Db.php +lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php +lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php +lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php +lib/internal/Magento/Framework/Data/Collection/Filesystem.php +lib/internal/Magento/Framework/Data/Form.php +lib/internal/Magento/Framework/Data/Form/AbstractForm.php +lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php +lib/internal/Magento/Framework/Data/Form/Element/Button.php +lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php +lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php +lib/internal/Magento/Framework/Data/Form/Element/Collection.php +lib/internal/Magento/Framework/Data/Form/Element/Column.php +lib/internal/Magento/Framework/Data/Form/Element/Date.php +lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php +lib/internal/Magento/Framework/Data/Form/Element/Editor.php +lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php +lib/internal/Magento/Framework/Data/Form/Element/File.php +lib/internal/Magento/Framework/Data/Form/Element/Gallery.php +lib/internal/Magento/Framework/Data/Form/Element/Hidden.php +lib/internal/Magento/Framework/Data/Form/Element/Image.php +lib/internal/Magento/Framework/Data/Form/Element/Imagefile.php +lib/internal/Magento/Framework/Data/Form/Element/Label.php +lib/internal/Magento/Framework/Data/Form/Element/Link.php +lib/internal/Magento/Framework/Data/Form/Element/Multiline.php +lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php +lib/internal/Magento/Framework/Data/Form/Element/Note.php +lib/internal/Magento/Framework/Data/Form/Element/Obscure.php +lib/internal/Magento/Framework/Data/Form/Element/Password.php +lib/internal/Magento/Framework/Data/Form/Element/Radio.php +lib/internal/Magento/Framework/Data/Form/Element/Radios.php +lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php +lib/internal/Magento/Framework/Data/Form/Element/Reset.php +lib/internal/Magento/Framework/Data/Form/Element/Select.php +lib/internal/Magento/Framework/Data/Form/Element/Submit.php +lib/internal/Magento/Framework/Data/Form/Element/Text.php +lib/internal/Magento/Framework/Data/Form/Element/Textarea.php +lib/internal/Magento/Framework/Data/Form/Element/Time.php +lib/internal/Magento/Framework/Data/Form/Filter/Date.php +lib/internal/Magento/Framework/Data/Form/Filter/Escapehtml.php +lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php +lib/internal/Magento/Framework/Data/Form/Filter/Striptags.php +lib/internal/Magento/Framework/Data/Tree.php +lib/internal/Magento/Framework/Data/Tree/Db.php +lib/internal/Magento/Framework/Data/Tree/Dbp.php +lib/internal/Magento/Framework/Data/Tree/Node.php +lib/internal/Magento/Framework/Data/Tree/Node/Collection.php +lib/internal/Magento/Framework/DB +lib/internal/Magento/Framework/Stdlib/DateTime.php +lib/internal/Magento/Framework/Debug.php +lib/internal/Magento/Framework/Event.php +lib/internal/Magento/Framework/Event +lib/internal/Magento/Framework/File/Csv.php +lib/internal/Magento/Framework/File/CsvMulty.php +lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php +lib/internal/Magento/Framework/File/Uploader.php +lib/internal/Magento/Framework/Gdata +lib/internal/Magento/Framework/HTTP/Adapter/Curl.php +lib/internal/Magento/Framework/HTTP/Client.php +lib/internal/Magento/Framework/HTTP/Client/Curl.php +lib/internal/Magento/Framework/HTTP/Client/Socket.php +lib/internal/Magento/Framework/HTTP/IClient.php +lib/internal/Magento/Framework/Image +lib/internal/Magento/Framework/Image.php +lib/internal/Magento/Framework/Io +lib/internal/Magento/Framework/Object +lib/internal/Magento/Framework/Object.php +lib/internal/Magento/Framework/Pear +lib/internal/Magento/Framework/Pear.php +lib/internal/Magento/Framework/Simplexml +lib/internal/Magento/Framework/System +lib/internal/Magento/Framework/Util.php +lib/internal/Magento/Framework/Xml diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt index d9488feaba321cc0dd0fe0550a7eda7d38624b27..a9236dc526290951e6c320536e7997927789804a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt @@ -12,7 +12,7 @@ Zend downloader dev Mysql -lib/Magento/Framework/DB +lib/internal/Magento/Framework/DB sql data Magento/Paypal @@ -97,14 +97,14 @@ Magento/Webapi/Model Magento/Widget/Model/Widget/Instance Magento/Wishlist/Block Magento/Wishlist/Model -lib/Magento/Framework/Archive -lib/Magento/Framework/Connect/Channel -lib/Magento/Framework/HTTP/Client -lib/Magento/Framework/Acl -lib/PEAR -lib/phpseclib -lib/Magento/Framework/Convert -lib/Magento/Framework/App/Config +lib/internal/Magento/Framework/Archive +lib/internal/Magento/Framework/Connect/Channel +lib/internal/Magento/Framework/HTTP/Client +lib/internal/Magento/Framework/Acl +lib/internal/PEAR +lib/internal/phpseclib +lib/internal/Magento/Framework/Convert +lib/internal/Magento/Framework/App/Config Magento/Cron/Model Magento/SalesRule/Model/Resource/Report/Rule Magento/SalesRule/Model/Resource/Rule @@ -118,7 +118,7 @@ Magento/Newsletter/Block/Adminhtml/Template/Grid/Renderer Magento/Newsletter/Model/Template/Filter Magento/Newsletter/Model/Resource/Subscriber Magento/CatalogInventory/Model/Resource/Stock/Item -lib/Magento/Framework/Filesystem/Driver +lib/internal/Magento/Framework/Filesystem/Driver Magento/OfflineShipping/Model/Carrier Magento/Usps/Model/Carrier Magento/Dhl/Model diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt index 8e47c335af43314a22cf48212a50214fa75f3b40..19a211773de814d4603880303730a732b5fdf4a9 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt @@ -35,11 +35,11 @@ dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input # Example files that are expected to fail code mess detector dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input # __ method for Translate cannot be in camelCase -lib/Magento/Framework/Translate/Adapter.php +lib/internal/Magento/Framework/Translate/Adapter.php # __ method for Translate cannot be in camelCase -lib/Magento/Framework/Translate/AdapterInterface.php +lib/internal/Magento/Framework/Translate/AdapterInterface.php # WrapperInterface methods cannot be camelCase as they follow method naming convention from framework classes -lib/Magento/Framework/Filesystem/WrapperInterface.php +lib/internal/Magento/Framework/Filesystem/WrapperInterface.php # PSR-1 not applied to dev/tests/integration/testsuite/Magento # PSR-1 not applied to diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt index 7ec547860ac647cd29a66c6dcd1793d91880b58c..28df010a7c21092a9211204402c59aef10cae5b6 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/whitelist/common.txt @@ -6,5 +6,5 @@ dev downloader/app/Magento downloader/lib/Magento index.php -lib/Magento +lib/internal/Magento pub diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 5f416545b492f5ba38ed486f5577ed0ec0bbc75f..def5917a24f6aff3593b6ec479b5f117d99ce56e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -122,19 +122,19 @@ dev/tests/performance dev/tests/static dev/tests/unit dev/tools -lib/Magento/Framework/Backup/Db -lib/Magento/Framework/Backup/Factory.php -lib/Magento/Framework/Cache/Core.php -lib/Magento/Framework/Convert -lib/Magento/Framework/Exception -lib/Magento/Framework/Stdlib/DateTime.php -lib/Magento/Framework/Object.php -lib/Magento/Framework/App -lib/Magento/Framework/Data/Argument -lib/Magento/Framework/ObjectManager -lib/Magento/Framework/Service -lib/Magento/Framework/Url/SecurityInfoInterface.php -lib/Magento/Framework/View -lib/Magento/Framework/App/AbstractShell.php -lib/Magento/Framework/Locale/Validator.php -lib/Magento/Framework/App/Config +lib/internal/Magento/Framework/Backup/Db +lib/internal/Magento/Framework/Backup/Factory.php +lib/internal/Magento/Framework/Cache/Core.php +lib/internal/Magento/Framework/Convert +lib/internal/Magento/Framework/Exception +lib/internal/Magento/Framework/Stdlib/DateTime.php +lib/internal/Magento/Framework/Object.php +lib/internal/Magento/Framework/App +lib/internal/Magento/Framework/Data/Argument +lib/internal/Magento/Framework/ObjectManager +lib/internal/Magento/Framework/Service +lib/internal/Magento/Framework/Url/SecurityInfoInterface.php +lib/internal/Magento/Framework/View +lib/internal/Magento/Framework/App/AbstractShell.php +lib/internal/Magento/Framework/Locale/Validator.php +lib/internal/Magento/Framework/App/Config diff --git a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php index 2235e1e2d1283b58fe53bf37ea986f61b14a2528..219eeed89590281d84810932b986fb40044e5d17 100644 --- a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php +++ b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php @@ -106,7 +106,7 @@ class Adminhtml extends \PHPUnit_Framework_TestCase $this->_cacheMock = $this->_makeMock('Magento\Framework\App\CacheInterface'); $this->_scopeConfigMock = $this->_makeMock('Magento\Framework\App\Config\ScopeConfigInterface'); $this->_storeManagerMock = $this->_makeMock('Magento\Store\Model\StoreManager'); - $viewUrlMock = $this->_makeMock('Magento\Framework\View\Url'); + $assetRepoMock = $this->_makeMock('Magento\Framework\View\Asset\Repository'); $viewConfigMock = $this->_makeMock('Magento\Framework\View\ConfigInterface'); $viewFileSystemMock = $this->_makeMock('Magento\Framework\View\FileSystem'); $templatePoolMock = $this->_makeMock('Magento\Framework\View\TemplateEnginePool'); @@ -141,7 +141,7 @@ class Adminhtml extends \PHPUnit_Framework_TestCase $this->_sidResolver, $this->_scopeConfigMock, $this->_controllerMock, - $viewUrlMock, + $assetRepoMock, $viewConfigMock, $cacheStateMock, $this->_loggerMock, diff --git a/dev/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/bootstrap.php old mode 100644 new mode 100755 index 3cf244db157085d9ddc5680e8450099b6fbc8ab8..0c1c92c6fb547445a03e65d8b216b8f546e3933d --- a/dev/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/bootstrap.php @@ -35,7 +35,7 @@ require BP . '/app/autoload.php'; realpath(__DIR__ . '/../testsuite'), realpath(BP . '/app'), realpath(BP . '/app/code'), - realpath(BP . '/lib') + realpath(BP . '/lib/internal') ) ); if (is_dir(TESTS_TEMP_DIR)) { diff --git a/dev/tests/unit/framework/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/tests/unit/framework/bootstrap.php index 37c05534a2cbf247219776c41ca2e8c69a445ecd..e020e90969b4c573ea808e3dbaae8e1c416eb686 100644 --- a/dev/tests/unit/framework/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/tests/unit/framework/bootstrap.php @@ -25,5 +25,10 @@ $rootDir = realpath(__DIR__ . '/../../../../../../..'); require __DIR__ . '/../../../../../../../app/autoload.php'; (new \Magento\Framework\Autoload\IncludePath())->addIncludePath( - array($rootDir . '/lib/', $rootDir . '/dev/tests/unit/framework/', $rootDir . '/app/code/', $rootDir . '/app') + array( + $rootDir . '/lib/internal', + $rootDir . '/dev/tests/unit/framework', + $rootDir . '/app/code', + $rootDir . '/app', + ) ); diff --git a/dev/tests/unit/phpunit.xml.dist b/dev/tests/unit/phpunit.xml.dist index 8d5504d0630defd36189508c102a110b86fc5afb..14e25a73567a3087e26d626012ffce656b8bdcd8 100644 --- a/dev/tests/unit/phpunit.xml.dist +++ b/dev/tests/unit/phpunit.xml.dist @@ -36,7 +36,7 @@ <filter> <whitelist addUncoveredFilesFromWhiteList="true"> <directory suffix=".php">../../../app/code/Magento</directory> - <directory suffix=".php">../../../lib/Magento</directory> + <directory suffix=".php">../../../lib/internal/Magento</directory> <exclude> <directory suffix=".php">../../../app/code/Magento/*/sql</directory> <directory suffix=".php">../../../app/code/Magento/*/data</directory> diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml index df0a8df04092b9ed21b64c5e0e156a0e66243b3d..1238d5fe6389116a3455f717eab04bb9b0c79351 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Adminhtml::all" title="Allow everything" /> diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml index 07061770679f671133cfa2fb869889a0de47d63a..d5844a91c1a3f02b45bad9e8b6124e53d237ec99 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Backend_Dummy1::all" title="Allow everything"/> diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml index 7600e9e6d5ba799402c9b8936413cd3c4e6e81ce..658976e17966c80033a45bd57dfc1c71a0f56a83 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Backend_Dummy1::parent"> diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml index 0829dba0c87a9c0b6cc8d343a7836ba73bdcd430..56ff7354b1578effeb0598f135661583bcc6f866 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Backend_Dummy1::all" title="Allow everything" /> diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php index 8f12739dee617db360881c5f7dad5eb6cf6d578e..1387a7b54fb540a486b8aadc3c4c3f7ebe693cee 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php @@ -117,7 +117,7 @@ class DataTest extends \PHPUnit_Framework_TestCase )->method( 'getPath' )->with( - \Magento\Framework\App\Filesystem::LIB_DIR + \Magento\Framework\App\Filesystem::LIB_INTERNAL )->will( $this->returnValue(TESTS_TEMP_DIR . '/lib') ); diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php index 0c68ae224a809ba207a8e4bad20c33047cb4edc2..0ce3edbf151826ca606694528259d0243c3affae 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php @@ -61,7 +61,10 @@ class DefaultTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_fontPath = array( - 'LinLibertine' => array('label' => 'LinLibertine', 'path' => 'lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf') + 'LinLibertine' => array( + 'label' => 'LinLibertine', + 'path' => 'lib/internal/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf' + ) ); /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php index 174538a55f77398b8bbf5216779533a74446eaf0..473d8b947a683293bf99d974d63b5d3f1cbd96f4 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php @@ -60,6 +60,16 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase */ protected $productListHelper; + /** + * @var \Magento\Framework\View\Layout|\PHPUnit_Framework_MockObject_MockObject + */ + protected $layout; + + /** + * @var \Magento\Theme\Block\Html\Pager|\PHPUnit_Framework_MockObject_MockObject + */ + protected $pagerBlock; + protected function setUp() { $this->model = $this->getMock( @@ -75,7 +85,23 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase '', false ); - $this->urlBuilder = $this->getMock('Magento\Framework\Url', array('getUrl'), array(), '', false); + $this->layout = $this->getMock('Magento\Framework\View\Layout', ['getChildName', 'getBlock'], [], '', false); + $this->pagerBlock = $this->getMock( + 'Magento\Theme\Block\Html\Pager', + [ + 'setUseContainer', + 'setShowPerPage', + 'setShowAmounts', + 'setFrameLength', + 'setJump', + 'setLimit', + 'setCollection', + 'toHtml' + ], + [], + '', + false); + $this->urlBuilder = $this->getMock('Magento\Framework\Url', ['getUrl'], [], '', false); $this->scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $scopeConfig = array( @@ -103,7 +129,7 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase $context = $this->getMock( 'Magento\Framework\View\Element\Template\Context', - array('getUrlBuilder', 'getStoreConfig'), + array('getUrlBuilder', 'getScopeConfig', 'getLayout'), array(), '', false @@ -112,9 +138,11 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase ->method('getUrlBuilder') ->will($this->returnValue($this->urlBuilder)); $context->expects($this->any()) - ->method('getStoreConfig') + ->method('getScopeConfig') ->will($this->returnValue($this->scopeConfig)); - + $context->expects($this->any()) + ->method('getlayout') + ->will($this->returnValue($this->layout)); $this->productListHelper = $this->getMock('Magento\Catalog\Helper\Product\ProductList', array(), array(), @@ -223,4 +251,49 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase $this->assertEquals($limit, $this->block->getLimit()); } + + public function testGetPagerHtml() + { + $limit = 10; + + $this->layout->expects($this->once()) + ->method('getChildName') + ->will($this->returnValue('product_list_toolbar_pager')); + $this->layout->expects($this->once()) + ->method('getBlock') + ->will($this->returnValue($this->pagerBlock)); + $this->productListHelper->expects($this->exactly(2)) + ->method('getAvailableLimit') + ->will($this->returnValue(array(10 => 10, 20 => 20))); + $this->model->expects($this->once()) + ->method('getLimit') + ->will($this->returnValue($limit)); + $this->pagerBlock->expects($this->once()) + ->method('setUseContainer') + ->will($this->returnValue($this->pagerBlock)); + $this->pagerBlock->expects($this->once()) + ->method('setShowPerPage') + ->will($this->returnValue($this->pagerBlock)); + $this->pagerBlock->expects($this->once()) + ->method('setShowAmounts') + ->will($this->returnValue($this->pagerBlock)); + $this->pagerBlock->expects($this->once()) + ->method('setFrameLength') + ->will($this->returnValue($this->pagerBlock)); + $this->pagerBlock->expects($this->once()) + ->method('setJump') + ->will($this->returnValue($this->pagerBlock)); + $this->pagerBlock->expects($this->once()) + ->method('setLimit') + ->with($limit) + ->will($this->returnValue($this->pagerBlock)); + $this->pagerBlock->expects($this->once()) + ->method('setCollection') + ->will($this->returnValue($this->pagerBlock)); + $this->pagerBlock->expects($this->once()) + ->method('toHtml') + ->will($this->returnValue(true)); + + $this->assertTrue($this->block->getPagerHtml()); + } } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/ConfiguredPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/ConfiguredPriceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8ad8599043886e8d502fd5bedb13c9d2099cc2a5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/ConfiguredPriceTest.php @@ -0,0 +1,149 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Catalog\Pricing\Price; + +/** + * Test for \Magento\Catalog\Pricing\Price\ConfiguredPrice + */ +class ConfiguredPriceTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var float + */ + protected $basePriceValue = 800.; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $item; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $product; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $calculator; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $priceInfo; + + /** + * @var ConfiguredPrice + */ + protected $model; + + /** + * Initialize base dependencies + */ + protected function setUp() + { + $basePrice = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface', [], [], '', false); + $basePrice->expects($this->any())->method('getValue')->will($this->returnValue($this->basePriceValue)); + + $this->priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface', [], [], '', false); + $this->priceInfo->expects($this->any())->method('getPrice')->will($this->returnValue($basePrice)); + + $this->product = $this->getMockBuilder('Magento\Catalog\Model\Product') + ->setMethods(['getPriceInfo', 'getOptionById', 'getResource', '__wakeup']) + ->disableOriginalConstructor() + ->getMock(); + $this->product->expects($this->once())->method('getPriceInfo')->will($this->returnValue($this->priceInfo)); + + $this->item = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\ItemInterface') + ->getMock(); + $this->item->expects($this->any())->method('getProduct')->will($this->returnValue($this->product)); + + $this->calculator = $this->getMock('Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', false); + + $this->model = new ConfiguredPrice($this->product, 1, $this->calculator); + $this->model->setItem($this->item); + } + + /** + * Test of value getter + */ + public function testOptionsValueGetter() + { + $optionCollection = $this->getMock('Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface'); + $optionCollection->expects($this->any())->method('getValue')->will($this->returnValue('1,2,3')); + + $optionCallback = $this->returnCallback(function ($optionId) { + return $this->createProductOptionStub($optionId); + }); + $this->product->expects($this->any())->method('getOptionById')->will($optionCallback); + + $itemOption = $this->getMock('Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface'); + $optionsList = [ + 'option_1' => $itemOption, + 'option_2' => $itemOption, + 'option_3' => $itemOption, + 'option_ids' => $optionCollection + ]; + $optionsGetterByCode = $this->returnCallback(function ($code) use ($optionsList) { + return $optionsList[$code]; + }); + $this->item->expects($this->atLeastOnce())->method('getOptionByCode')->will($optionsGetterByCode); + + $this->assertEquals(830., $this->model->getValue()); + } + + /** + * @param int $optionId + * @return \PHPUnit_Framework_MockObject_MockObject + */ + protected function createProductOptionStub($optionId) + { + $option = $this->getMock('Magento\Catalog\Model\Product\Option', [], [], '', false); + $option->expects($this->any())->method('getId')->will($this->returnValue($optionId)); + $option->expects($this->atLeastOnce())->method('groupFactory')->will( + $this->returnValue($this->createOptionTypeStub($option)) + ); + return $option; + } + + /** + * @param \Magento\Catalog\Model\Product\Option $option + * @return \PHPUnit_Framework_MockObject_MockObject + */ + protected function createOptionTypeStub(\Magento\Catalog\Model\Product\Option $option) + { + $optionType = $this->getMockBuilder('Magento\Catalog\Model\Product\Option\Type\DefaultType') + ->setMethods(['setOption', 'setConfigurationItem', 'setConfigurationItemOption', 'getOptionPrice']) + ->disableOriginalConstructor() + ->getMock(); + $optionType->expects($this->atLeastOnce())->method('setOption')->with($option)->will($this->returnSelf()); + $optionType->expects($this->atLeastOnce())->method('setConfigurationItem')->will($this->returnSelf()); + $optionType->expects($this->atLeastOnce())->method('setConfigurationItemOption')->will($this->returnSelf()); + $optionType->expects($this->atLeastOnce())->method('getOptionPrice') + ->with($this->anything(), $this->basePriceValue) + ->will($this->returnValue(10.)); + return $optionType; + } +} diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php index 0f16a19be3cb588144d2ec91438421d75401d89f..e3cdd5ccd77a98415f3389cbcb09fcc597f27d0a 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php @@ -79,7 +79,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase '', false ); - $methods = array('getQtyToAdd', '__wakeup', 'getId', 'updateQtyOption', 'setData'); + $methods = array('getQtyToAdd', '__wakeup', 'getId', 'updateQtyOption', 'setData', 'getQuoteId'); $this->quoteMock = $this->getMock('Magento\Sales\Model\Quote\Item', $methods, array(), '', false); $stockItemMethods = array( 'setIsChildItem', @@ -138,13 +138,15 @@ class OptionTest extends \PHPUnit_Framework_TestCase $this->stockItemMock->expects($this->once())->method('setIsChildItem')->with(true); $this->stockItemMock->expects($this->once())->method('setSuppressCheckQtyIncrements')->with(true); $this->productMock->expects($this->once())->method('getId')->will($this->returnValue('product_id')); - $this->quoteMock->expects($this->once())->method('getId')->will($this->returnValue('quote_id')); + $this->quoteMock->expects($this->once())->method('getId')->will($this->returnValue('quote_item_id')); + $this->quoteMock->expects($this->once())->method('getQuoteId')->will($this->returnValue('quote_id')); $this->qtyItemListMock->expects( $this->once() )->method( 'getQty' )->with( 'product_id', + 'quote_item_id', 'quote_id', $qtyToAdd * $optionValue )->will( @@ -208,13 +210,15 @@ class OptionTest extends \PHPUnit_Framework_TestCase $this->stockItemMock->expects($this->once())->method('setIsChildItem')->with(true); $this->stockItemMock->expects($this->once())->method('setSuppressCheckQtyIncrements')->with(true); $this->productMock->expects($this->once())->method('getId')->will($this->returnValue('product_id')); - $this->quoteMock->expects($this->once())->method('getId')->will($this->returnValue('quote_id')); + $this->quoteMock->expects($this->once())->method('getId')->will($this->returnValue('quote_item_id')); + $this->quoteMock->expects($this->once())->method('getQuoteId')->will($this->returnValue('quote_id')); $this->qtyItemListMock->expects( $this->once() )->method( 'getQty' )->with( 'product_id', + 'quote_item_id', 'quote_id', $qty * $optionValue )->will( diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php index 803546b47aa083f95cb8d2abc33eccad134068e2..8cdd8fe39f99d44bfa35ed0fca5cdafca5804aee 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php @@ -23,23 +23,53 @@ */ namespace Magento\Checkout\Block\Onepage; +/** + * Class SuccessTest + * @package Magento\Checkout\Block\Onepage + */ class SuccessTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\TestFramework\Helper\ObjectManager + * @var \Magento\Checkout\Block\Onepage\Success */ - protected $objectManager; + protected $block; + + /** + * @var \Magento\Sales\Model\Order\Config | \PHPUnit_Framework_MockObject_MockObject + */ + protected $orderConfig; + + /** + * @var \Magento\Sales\Model\OrderFactory | \PHPUnit_Framework_MockObject_MockObject + */ + protected $orderFactory; + + /** + * @var \Magento\Checkout\Model\Session | \PHPUnit_Framework_MockObject_MockObject + */ + protected $checkoutSession; protected function setUp() { - $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + + $this->orderConfig = $this->getMock('Magento\Sales\Model\Order\Config', [], [], '', false); + $this->orderFactory = $this->getMock('Magento\Sales\Model\OrderFactory', ['create'], [], '', false); + $this->checkoutSession = $this->getMock('Magento\Checkout\Model\Session', ['getLastOrderId'], [], '', false); + + $this->block = $objectManager->getObject( + 'Magento\Checkout\Block\Onepage\Success', + [ + 'orderConfig' => $this->orderConfig, + 'orderFactory' => $this->orderFactory, + 'checkoutSession' => $this->checkoutSession + ] + ); } public function testGetAdditionalInfoHtml() { - /** @var \Magento\Checkout\Block\Onepage\Success $block */ - $block = $this->objectManager->getObject('Magento\Checkout\Block\Onepage\Success'); - $layout = $this->getMock('Magento\Framework\View\LayoutInterface', array(), array(), '', false); + $layout = $this->getMock('Magento\Framework\View\LayoutInterface', [], [], '', false); $layout->expects( $this->once() )->method( @@ -49,7 +79,52 @@ class SuccessTest extends \PHPUnit_Framework_TestCase )->will( $this->returnValue('AdditionalInfoHtml') ); - $block->setLayout($layout); - $this->assertEquals('AdditionalInfoHtml', $block->getAdditionalInfoHtml()); + $this->block->setLayout($layout); + $this->assertEquals('AdditionalInfoHtml', $this->block->getAdditionalInfoHtml()); + } + + /** + * @dataProvider invisibleStatusesProvider + * @param array $invisibleStatuses + * @param string $orderStatus + * @param bool $expectedResult + */ + public function testToHtmlOrderVisibleOnFront(array $invisibleStatuses, $orderStatus, $expectedResult) + { + $orderId = 5; + $order = $this->getMock('Magento\Sales\Model\Order', ['getId', '__wakeup', 'load', 'getStatus'], [], '', false); + + $order->expects($this->any()) + ->method('load') + ->with($orderId) + ->will($this->returnValue($order)); + $order->expects($this->any()) + ->method('getId') + ->will($this->returnValue($orderId)); + $order->expects($this->any()) + ->method('getStatus') + ->will($this->returnValue($orderStatus)); + + $this->checkoutSession->expects($this->once()) + ->method('getLastOrderId') + ->will($this->returnValue($orderId)); + $this->orderConfig->expects($this->any()) + ->method('getInvisibleOnFrontStatuses') + ->will($this->returnValue($invisibleStatuses)); + $this->orderFactory->expects($this->once()) + ->method('create') + ->will($this->returnValue($order)); + + $this->block->toHtml(); + + $this->assertEquals($expectedResult, $this->block->getIsOrderVisible()); + } + + public function invisibleStatusesProvider() + { + return [ + [['status1', 'status2'], 'status1', false], + [['status1', 'status2'], 'status3', true] + ]; } } diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php index 433d3e6f584a4482345e3cc3e976670b358b50dd..0f4a85d6b0ee8d240ee7291eff910daf47addd38 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php @@ -45,11 +45,6 @@ class StorageTest extends \PHPUnit_Framework_TestCase */ protected $_filesystemMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_viewUrlMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -167,7 +162,6 @@ class StorageTest extends \PHPUnit_Framework_TestCase '', false ); - $this->_viewUrlMock = $this->getMock('Magento\Framework\View\Url', array(), array(), '', false); $this->_imageHelperMock = $this->getMock( 'Magento\Cms\Helper\Wysiwyg\Images', array('getStorageRoot'), @@ -213,7 +207,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase ), 'filesystem' => $this->_filesystemMock, 'imageFactory' => $this->_adapterFactoryMock, - 'viewUrl' => $this->_viewUrlMock, + 'assetRepo' => $this->getMock('Magento\Framework\View\Asset\Repository', array(), array(), '', false), 'storageCollectionFactory' => $this->_storageCollectionFactoryMock, 'storageFileFactory' => $this->_storageFileFactoryMock, 'storageDatabaseFactory' => $this->_storageDatabaseFactoryMock, diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php index c748fc5dc26a5cf51286a1e2f024d631a183fe52..761aa79d8459c9006decbc4c7cf61301fa27c1ec 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php @@ -84,22 +84,18 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase $expectedArray = array('key' => 'value', 'key_one' => 'value_one'); $attributes = array('key' => 'value'); $postValue = 'postValue'; - $valueMap = array( + $postValueMap = array( array('new-variations-attribute-set-id', null, $postValue), array('associated_product_ids', array(), $associatedProductIds), - array('variations-matrix', array(), $postValue), array('affect_configurable_product_attributes', null, $postValue) ); - $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($valueMap)); - $this->requestMock->expects( - $this->once() - )->method( - 'getParam' - )->with( - 'attributes' - )->will( - $this->returnValue($attributes) + $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($postValueMap)); + + $paramValueMap = array( + array('variations-matrix', array(), $postValue), + array('attributes', null, $attributes) ); + $this->requestMock->expects($this->any())->method('getParam')->will($this->returnValueMap($paramValueMap)); $this->productTypeMock->expects( $this->once() )->method( @@ -109,7 +105,6 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase $this->productMock ); $this->productMock->expects($this->once())->method('setNewVariationsAttributeSetId')->with($postValue); - $this->requestMock->expects($this->once())->method('getActionName')->will($this->returnValue('action_name')); $this->productTypeMock->expects( $this->once() )->method( @@ -133,19 +128,14 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase $valueMap = array( array('new-variations-attribute-set-id', null, $postValue), array('associated_product_ids', array(), $associatedProductIds), - array('variations-matrix', array(), $postValue), array('affect_configurable_product_attributes', null, $postValue) ); $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($valueMap)); - $this->requestMock->expects( - $this->once() - )->method( - 'getParam' - )->with( - 'attributes' - )->will( - $this->returnValue($attributes) + $paramValueMap = array( + array('variations-matrix', array(), array()), + array('attributes', null, $attributes) ); + $this->requestMock->expects($this->any())->method('getParam')->will($this->returnValueMap($paramValueMap)); $this->productTypeMock->expects( $this->once() )->method( @@ -155,13 +145,6 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase $this->productMock ); $this->productMock->expects($this->once())->method('setNewVariationsAttributeSetId')->with($postValue); - $this->requestMock->expects( - $this->once() - )->method( - 'getActionName' - )->will( - $this->returnValue('generateVariations') - ); $this->productTypeMock->expects($this->never())->method('generateSimpleProducts'); $this->productMock->expects($this->once())->method('setAssociatedProductIds')->with($associatedProductIds); $this->productMock->expects($this->once())->method('setCanSaveConfigurableAttributes')->with(true); diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php index e3fafb7401ca9496ee21e69ead74fcd75ab91501..f998f83e0f11c17210bbfe8baaeb76884f8467eb 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php @@ -25,105 +25,37 @@ namespace Magento\Core\Helper; class ThemeTest extends \PHPUnit_Framework_TestCase { - const ROOT_DIR = '/zzz'; - - const APP_DIR = '/zzz/qqq'; - - const MODULES_DIR = '/zzz/qqq/code00'; - - const THEMES_DIR = '/zzz/qqq/design00'; - - const PUB_LIB_DIR = '/zzz/qqq/js00'; - /** - * @dataProvider getCssFilesDataProvider + * @dataProvider getCssAssetsDataProvider * @param string $layoutStr * @param array $expectedResult */ - public function testGetCssFiles($layoutStr, $expectedResult) + public function testGetCssAssets($layoutStr, $expectedResult) { - // 1. Set data - $themeId = 123; - $themeArea = 'area123'; - - // 2. Get theme model - $theme = $this->_getTheme($themeId, $themeArea); - - // 3. Get filesystem model - $filesystem = $this->_getFilesystem(); - - $directory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Read', - array('getRelativePath'), - array(), - '', - false - ); - $directory->expects( - $this->any() - )->method( - 'getRelativePath' - )->will( - $this->returnValueMap( - array( - array('/zzz/qqq/test1.css', 'qqq/test1.css'), - array('/zzz/qqq/test2.css', 'qqq/test2.css'), - array('/zzz/qqq/test3.css', 'qqq/test3.css'), - array('/zzz/qqq/test4.css', 'qqq/test4.css'), - array('/zzz/qqq/test21.css', 'qqq/test21.css'), - array('/zzz/qqq/test22.css', 'qqq/test22.css'), - array('/zzz/qqq/test23.css', 'qqq/test23.css'), - array('/zzz/qqq/test24.css', 'qqq/test24.css') - ) - ) - ); - - $filesystem->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($directory)); - - - // 4. Get layout merge model and factory - $layoutMergeFactory = $this->_getLayoutMergeFactory($layoutStr); - - // 5. - /** @var $themeCollection \Magento\Core\Model\Resource\Theme\Collection */ - $themeCollection = $this->getMock('Magento\Core\Model\Resource\Theme\Collection', array(), array(), '', false); - - // 6. - /** @var $context \Magento\Framework\App\Helper\Context */ - $context = $this->getMock('Magento\Framework\App\Helper\Context', array(), array(), '', false); - - // 7. Get view file system model mock - $params = array('area' => $themeArea, 'themeModel' => $theme, 'skipProxy' => true); - $map = array( - array('test1.css', $params, '/zzz/qqq/test1.css'), - array('test2.css', $params, '/zzz/qqq/test2.css'), - array('Magento_Core::test3.css', $params, '/zzz/qqq/test3.css'), - array('test4.css', $params, '/zzz/qqq/test4.css'), - array('test21.css', $params, '/zzz/qqq/test21.css'), - array('test22.css', $params, '/zzz/qqq/test22.css'), - array('Magento_Core::test23.css', $params, '/zzz/qqq/test23.css'), - array('test24.css', $params, '/zzz/qqq/test24.css') - ); - $fileSystemView = $this->_getFileSystemView($map); - - // 8. Run tested method + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $theme->expects($this->once())->method('getArea')->will($this->returnValue('area')); + $layoutMergeFactory = $this->_getLayoutMergeFactory($theme, $layoutStr); + $assetRepo = $this->getMock( + 'Magento\Framework\View\Asset\Repository', array('createAsset'), array(), '', false + ); + $assetRepo->expects($this->any()) + ->method('createAsset') + ->will($this->returnArgument(0)) + ; $helper = new \Magento\Core\Helper\Theme( - $context, - $filesystem, + $this->getMock('Magento\Framework\App\Helper\Context', array(), array(), '', false), $layoutMergeFactory, - $themeCollection, - $fileSystemView + $assetRepo ); - $result = $helper->getCssFiles($theme); - // 9. Compare actual result with expected data - $this->assertEquals($expectedResult, $result); + $result = $helper->getCssAssets($theme); + $this->assertSame($expectedResult, $result); } /** * @return array * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function getCssFilesDataProvider() + public function getCssAssetsDataProvider() { return array( array( @@ -132,13 +64,7 @@ class ThemeTest extends \PHPUnit_Framework_TestCase <arguments><argument name="file" xsi:type="string">test1.css</argument></arguments> </block> </block>', - array( - 'test1.css' => array( - 'id' => 'test1.css', - 'path' => '/zzz/qqq/test1.css', - 'safePath' => 'qqq/test1.css' - ) - ) + array('test1.css' => 'test1.css') ), array( '<block class="Magento\Theme\Block\Html\Head" name="head"> @@ -148,81 +74,7 @@ class ThemeTest extends \PHPUnit_Framework_TestCase </arguments> </block> </block>', - array( - 'Magento_Core::test3.css' => array( - 'id' => 'Magento_Core::test3.css', - 'path' => '/zzz/qqq/test3.css', - 'safePath' => 'qqq/test3.css' - ) - ) - ), - array( - '<referenceBlock name="head"> - <block class="Magento\Theme\Block\Html\Head\Css" name="magento-loader-js"> - <arguments><argument name="file" xsi:type="string">test21.css</argument></arguments> - </block> - </referenceBlock>', - array( - 'test21.css' => array( - 'id' => 'test21.css', - 'path' => '/zzz/qqq/test21.css', - 'safePath' => 'qqq/test21.css' - ) - ) - ), - array( - '<referenceBlock name="head"> - <block class="Magento\Theme\Block\Html\Head\Css" name="magento-loader-js"> - <arguments> - <argument name="file" xsi:type="string">Magento_Core::test23.css</argument> - </arguments> - </block> - </referenceBlock>', - array( - 'Magento_Core::test23.css' => array( - 'id' => 'Magento_Core::test23.css', - 'path' => '/zzz/qqq/test23.css', - 'safePath' => 'qqq/test23.css' - ) - ) - ), - array( - '<block type="Some_Block_Class"> - <block class="Magento\Theme\Block\Html\Head\Css" name="magento-loader-js"> - <arguments> - <argument name="file" xsi:type="string">Magento_Core::test23.css</argument> - </arguments> - </block> - </block>', - array() - ), - array( - '<block type="Some_Block_Class"> - <block class="Magento\Theme\Block\Html\Head\Css" name="magento-loader-js"> - <arguments> - <argument name="file" xsi:type="string">Magento_Core::test23.css</argument> - </arguments> - </block> - </block>', - array() - ), - array( - '<referenceBlock name="some_block_name"> - <block class="Magento\Theme\Block\Html\Head\Css" name="magento-loader-js"> - <arguments><argument name="file" xsi:type="string">test23.css</argument></arguments> - </block> - </referenceBlock>', - array() - ), - array( - '<referenceBlock name="some_block_name"> - <block class="Magento\Theme\Block\Html\Head\Css" name="magento-loader-js"> - <arguments> - <argument name="file" xsi:type="string">Magento_Core::test23.css</argument> - </arguments> - </block> - </referenceBlock>', - array() + array('Magento_Core::test3.css' => 'Magento_Core::test3.css'), ), array( '<block class="Magento\Theme\Block\Html\Head" name="head"> @@ -264,183 +116,20 @@ class ThemeTest extends \PHPUnit_Framework_TestCase </block> </referenceBlock>', array( - 'testh.css' => array('id' => 'testh.css', 'path' => '', 'safePath' => ''), - 'Magento_Core::test.css' => array( - 'id' => 'Magento_Core::test.css', - 'path' => '', - 'safePath' => '' - ), - 'test.css' => array('id' => 'test.css', 'path' => '', 'safePath' => '') - ) - ) - ); - } - - /** - * depends testGetCssFiles - * @dataProvider getGroupedCssFilesDataProvider - * @param array $files - * @param array $expectedResult - */ - public function testGetGroupedCssFiles($files, $expectedResult) - { - $helper = $this->_getHelper($files); - - $theme = 'anything'; - $result = $helper->getGroupedCssFiles($theme); - - $this->assertEquals($expectedResult, $result); - } - - /** - * @return array - */ - public function getGroupedCssFilesDataProvider() - { - $item11 = array( - 'path' => '/zzz/qqq/design00/area11/vendor11_theme11/test11.test', - 'safePath' => 'design00/area11/vendor11_theme11/test11.test' - ); - $item12 = array( - 'path' => '/zzz/qqq/design00/area12/vendor12_theme12/test12.test', - 'safePath' => 'design00/area12/vendor12_theme12/test12.test' - ); - $item13 = array( - 'path' => '/zzz/qqq/design00/area13/vendor13_theme13/test13.test', - 'safePath' => 'design00/area13/vendor13_theme13/test13.test' - ); - - $item21 = array( - 'path' => '/zzz/qqq/code00/Magento_Core00/test21.test', - 'safePath' => 'code00/Magento_Core00/test21.test' - ); - $item31 = array('path' => '/zzz/qqq/js00/some_path/test31.test', 'safePath' => 'js00/some_path/test31.test'); - $groups11 = array( - '"11" Theme files' => array( - array( - 'path' => '/zzz/qqq/design00/area11/vendor11_theme11/test11.test', - 'safePath' => 'design00/area11/vendor11_theme11/test11.test' - ) - ) - ); - $groups12 = array( - '"12" Theme files' => array( - array( - 'path' => '/zzz/qqq/design00/area12/vendor12_theme12/test12.test', - 'safePath' => 'design00/area12/vendor12_theme12/test12.test' - ) - ) - ); - $groups13 = array( - '"13" Theme files' => array( - array( - 'path' => '/zzz/qqq/design00/area13/vendor13_theme13/test13.test', - 'safePath' => 'design00/area13/vendor13_theme13/test13.test' - ) - ) - ); - $groups1 = array( - '"11" Theme files' => array( - array( - 'path' => '/zzz/qqq/design00/area11/vendor11_theme11/test11.test', - 'safePath' => 'design00/area11/vendor11_theme11/test11.test' - ) - ), - '"12" Theme files' => array( - array( - 'path' => '/zzz/qqq/design00/area12/vendor12_theme12/test12.test', - 'safePath' => 'design00/area12/vendor12_theme12/test12.test' - ) + 'Magento_Core::test.css' => 'Magento_Core::test.css', + 'test.css' => 'test.css', + 'testh.css' => 'testh.css', + ), ), - '"13" Theme files' => array( - array( - 'path' => '/zzz/qqq/design00/area13/vendor13_theme13/test13.test', - 'safePath' => 'design00/area13/vendor13_theme13/test13.test' - ) - ) - ); - $groups21 = array( - 'Framework files' => array( - array( - 'path' => '/zzz/qqq/code00/Magento_Core00/test21.test', - 'safePath' => 'code00/Magento_Core00/test21.test' - ) - ) - ); - $groups31 = array( - 'Library files' => array( - array('path' => '/zzz/qqq/js00/some_path/test31.test', 'safePath' => 'js00/some_path/test31.test') - ) - ); - return array( - array(array($item11), $groups11), - array(array($item12), $groups12), - array(array($item13), $groups13), - array(array($item11, $item12, $item13), $groups1), - array(array($item21), $groups21), - array(array($item31), $groups31), - array(array($item11, $item12, $item13, $item21, $item31), array_merge($groups1, $groups21, $groups31)) - ); - } - - /** - * depends testGetCssFiles - * @expectedException \LogicException - * @expectedExceptionMessage Invalid view file directory "some_path/test.test" - */ - public function testGetGroupedCssFilesException() - { - $files = array(array('path' => '/zzz/some_path/test.test', 'safePath' => 'some_path/test.test')); - - $helper = $this->_getHelper($files); - - $theme = 'anything'; - $helper->getGroupedCssFiles($theme); - } - - /** - * @param int $themeId - * @param string $themeArea - * @return \Magento\Core\Model\Theme|\PHPUnit_Framework_MockObject_MockObject - */ - protected function _getTheme($themeId, $themeArea) - { - /** @var $theme \Magento\Core\Model\Theme|\PHPUnit_Framework_MockObject_MockObject */ - $theme = $this->getMock( - 'Magento\Core\Model\Theme', - array('getThemeId', 'getArea', 'getThemeTitle', '__wakeup'), - array(), - '', - false ); - $theme->expects($this->any())->method('getThemeId')->will($this->returnValue($themeId)); - $theme->expects($this->any())->method('getArea')->will($this->returnValue($themeArea)); - $theme->expects($this->any())->method('getThemeTitle')->will($this->returnValue($themeId)); - - return $theme; - } - - /** - * @param array $map - * @return \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject - */ - protected function _getFileSystemView($map) - { - /** @var $fileSystem \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ - $fileSystem = $this->getMockBuilder( - 'Magento\Framework\View\FileSystem', - array() - )->disableOriginalConstructor()->getMock(); - $fileSystem->expects($this->any())->method('getViewFile')->will($this->returnValueMap($map)); - - return $fileSystem; } /** + * @param \PHPUnit_Framework_MockObject_MockObject $theme * @param string $layoutStr * @return \Magento\Framework\View\Layout\ProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ - protected function _getLayoutMergeFactory($layoutStr) + protected function _getLayoutMergeFactory($theme, $layoutStr) { /** @var $layoutProcessor \Magento\Framework\View\Layout\ProcessorInterface */ $layoutProcessor = $this->getMockBuilder('Magento\Framework\View\Layout\ProcessorInterface') @@ -457,125 +146,13 @@ class ThemeTest extends \PHPUnit_Framework_TestCase /** @var $processorFactory \Magento\Framework\View\Layout\ProcessorFactory */ $processorFactory = $this->getMock( - 'Magento\Framework\View\Layout\ProcessorFactory', - array('create'), - array(), - '', - false + 'Magento\Framework\View\Layout\ProcessorFactory', array('create'), array(), '', false ); - $processorFactory->expects($this->any())->method('create')->will($this->returnValue($layoutProcessor)); + $processorFactory->expects($this->any()) + ->method('create') + ->with(array('theme' => $theme)) + ->will($this->returnValue($layoutProcessor)); return $processorFactory; } - - /** - * @return \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject - */ - protected function _getFilesystem() - { - /** @var $filesystem \Magento\Framework\App\Filesystem */ - $filesystem = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getPath', '__wakeup', 'getDirectoryRead'), - array(), - '', - false - ); - $filesystem->expects( - $this->any() - )->method( - 'getPath' - )->will( - $this->returnValueMap( - array( - array(\Magento\Framework\App\Filesystem::ROOT_DIR, self::ROOT_DIR), - array(\Magento\Framework\App\Filesystem::APP_DIR, self::APP_DIR), - array(\Magento\Framework\App\Filesystem::MODULES_DIR, self::MODULES_DIR), - array(\Magento\Framework\App\Filesystem::THEMES_DIR, self::THEMES_DIR), - array(\Magento\Framework\App\Filesystem::PUB_LIB_DIR, self::PUB_LIB_DIR) - ) - ) - ); - - return $filesystem; - } - - /** - * @return \Magento\Core\Model\Resource\Theme\Collection|\PHPUnit_Framework_MockObject_MockObject - */ - protected function _getThemeCollection() - { - $theme11 = $this->_getTheme('11', 'area11'); - $theme12 = $this->_getTheme('12', 'area12'); - $theme13 = $this->_getTheme('13', 'area13'); - - /** @var $themeCollection \Magento\Core\Model\Resource\Theme\Collection */ - $themeCollection = $this->getMock( - 'Magento\Core\Model\Resource\Theme\Collection', - array('getThemeByFullPath'), - array(), - '', - false - ); - $themeCollection->expects( - $this->any() - )->method( - 'getThemeByFullPath' - )->will( - $this->returnValueMap( - array( - array('area11/vendor11_theme11', $theme11), - array('area12/vendor12_theme12', $theme12), - array('area13/vendor13_theme13', $theme13) - ) - ) - ); - - return $themeCollection; - } - - /** - * @param array $files - * @return \Magento\Core\Helper\Theme|\PHPUnit_Framework_MockObject_MockObject - */ - protected function _getHelper($files) - { - // Get theme collection - $themeCollection = $this->_getThemeCollection(); - - // 3. Get Design Package model - - // 4. Get dirs model - $dirs = $this->_getFileSystem(); - - // 5. Get layout merge model and factory - /** @var $processorFactory \Magento\Framework\View\Layout\ProcessorFactory - * |\PHPUnit_Framework_MockObject_MockObject */ - $processorFactory = $this->getMock( - 'Magento\Framework\View\Layout\ProcessorFactory', - array('create'), - array(), - '', - false - ); - - /** @var $context \Magento\Framework\App\Helper\Context */ - $context = $this->getMock('Magento\Framework\App\Helper\Context', null, array(), '', false); - - /** @var $fileSystem \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ - $fileSystem = $this->getMockBuilder( - 'Magento\Framework\View\FileSystem', - array() - )->disableOriginalConstructor()->getMock(); - - /** @var $helper \Magento\Core\Helper\Theme|\PHPUnit_Framework_MockObject_MockObject */ - $helper = $this->getMock( - 'Magento\Core\Helper\Theme', - array('getCssFiles'), - array($context, $dirs, $processorFactory, $themeCollection, $fileSystem) - ); - $helper->expects($this->once())->method('getCssFiles')->will($this->returnValue($files)); - - return $helper; - } } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php index eab618b95c7eb3d35376ae27b20f74345cb4281f..fdb57745f49d4bf0376289a9d2211e325b4a68a2 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php @@ -74,9 +74,9 @@ class MergeTest extends \PHPUnit_Framework_TestCase { $files = array(); foreach (glob(__DIR__ . '/_files/layout/*.xml') as $filename) { - $files[] = new \Magento\Framework\View\Layout\File($filename, 'Magento_Core'); + $files[] = new \Magento\Framework\View\File($filename, 'Magento_Core'); } - $fileSource = $this->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); + $fileSource = $this->getMockForAbstractClass('Magento\Framework\View\File\CollectorInterface'); $fileSource->expects($this->any())->method('getFiles')->will($this->returnValue($files)); $design = $this->getMockForAbstractClass('Magento\Framework\View\DesignInterface'); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php index 2db5964ef72b2873bca7926daddee82cb695a64f..2076b629267fc7ac9688bcf6d3403a36b822f6fb 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php @@ -43,7 +43,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_assetFactory; + protected $_assetRepo; /** * @var \PHPUnit_Framework_MockObject_MockObject @@ -117,13 +117,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase false ); - $this->_assetFactory = $this->getMock( - 'Magento\Framework\View\Asset\PublicFileFactory', - array('create'), - array(), - '', - false - ); + $this->_assetRepo = $this->getMock('Magento\Framework\View\Asset\Repository', array(), array(), '', false); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_model = $objectManagerHelper->getObject( @@ -132,7 +126,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase 'cacheFrontendPool' => $this->_frontendPoolMock, 'design' => $designMock, 'assets' => $this->_assetsMock, - 'assetFileFactory' => $this->_assetFactory + 'assetRepo' => $this->_assetRepo, ) ); } @@ -163,33 +157,18 @@ class ObserverTest extends \PHPUnit_Framework_TestCase public function testApplyThemeCustomization() { - $asset = new \Magento\Framework\View\Asset\Remote('http://127.0.0.1/test.css'); + $asset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); $file = $this->getMock('Magento\Core\Model\Theme\File', array(), array(), '', false); - $fileService = $this->getMock( - 'Magento\Framework\View\Design\Theme\Customization\File\Css', - array(), - array(), - '', - false + $fileService = $this->getMockForAbstractClass( + '\Magento\Framework\View\Design\Theme\Customization\FileAssetInterface' ); - - $fileService->expects($this->atLeastOnce())->method('getContentType')->will($this->returnValue('css')); - $file->expects($this->any())->method('getCustomizationService')->will($this->returnValue($fileService)); - $file->expects($this->atLeastOnce())->method('getFullPath')->will($this->returnValue('test.css')); - $this->_assetFactory->expects( - $this->any() - )->method( - 'create' - )->with( - array('file' => 'test.css', 'contentType' => 'css') - )->will( - $this->returnValue($asset) - ); + $this->_assetRepo->expects($this->once()) + ->method('createArbitrary') + ->will($this->returnValue($asset)); $this->_themeCustomization->expects($this->once())->method('getFiles')->will($this->returnValue(array($file))); - $this->_assetsMock->expects($this->once())->method('add')->with($this->anything(), $asset); $observer = new \Magento\Framework\Event\Observer(); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php index 36192ed57373aac5955df24f55d82665c41c1e02..ed51bee30b81ea339cc54a62227473ea15f30297 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php @@ -32,60 +32,109 @@ class PathTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\Core\Model\Theme\Image\Path|\PHPUnit_Framework_MockObject_MockObject */ - protected $_model; + protected $model; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_filesystem; + protected $filesystem; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Url + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Asset\Repository */ - protected $_viewUrlMock; + protected $_assetRepo; /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Store\Model\StoreManager */ - protected $_storeManagerMock; + protected $_storeManager; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem\Directory\ReadInterface + */ + protected $mediaDirectory; protected function setUp() { - $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_viewUrlMock = $this->getMock('Magento\Framework\View\Url', array(), array(), '', false); - $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false); - - $this->_filesystem->expects( - $this->any() - )->method( - 'getPath' - )->with( - \Magento\Framework\App\Filesystem::MEDIA_DIR - )->will( - $this->returnValue('/media') + $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); + $this->mediaDirectory = $this->getMock( + 'Magento\Framework\Filesystem\Directory\ReadInterface', array(), array(), '', false + ); + $this->_assetRepo = $this->getMock('Magento\Framework\View\Asset\Repository', array(), array(), '', false); + $this->_storeManager = $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false); + + + $this->mediaDirectory->expects($this->any()) + ->method('getAbsolutePath') + ->with(\Magento\Framework\View\Design\Theme\Image\PathInterface::PREVIEW_DIRECTORY_PATH) + ->will($this->returnValue('/theme/preview')); + + $this->mediaDirectory->expects($this->any()) + ->method('getRelativePath') + ->with('/theme/origin') + ->will($this->returnValue('/theme/origin')); + + $this->filesystem->expects($this->any())->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR) + ->will($this->returnValue($this->mediaDirectory)); + + $this->model = new Path( + $this->filesystem, + $this->_assetRepo, + $this->_storeManager ); - $this->_model = new Path($this->_filesystem, $this->_viewUrlMock, $this->_storeManagerMock); + $this->_model = new Path($this->filesystem, $this->_assetRepo, $this->_storeManager); } - protected function tearDown() + public function testGetPreviewImageUrlPhysicalTheme() { - $this->_model = null; - $this->_filesystem = null; - $this->_viewUrlMock = null; - $this->_storeManagerMock = null; + $theme = $this->getGetTheme(true); + + $this->_assetRepo->expects($this->any()) + ->method('getUrlWithParams') + ->with($theme->getPreviewImage(), ['area' => $theme->getData('area'), 'themeModel' => $theme]) + ->will($this->returnValue('http://localhost/theme/preview/image.png')); + + $this->assertEquals('http://localhost/theme/preview/image.png', $this->model->getPreviewImageUrl($theme)); } - /** - * @covers \Magento\Core\Model\Theme\Image\Path::__construct - * @covers \Magento\Core\Model\Theme\Image\Path::getPreviewImageDirectoryUrl - */ - public function testPreviewImageDirectoryUrlGetter() + public function testGetPreviewImageUrlVirtualTheme() { + $theme = $this->getGetTheme(false); + $store = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false); $store->expects($this->any())->method('getBaseUrl')->will($this->returnValue('http://localhost/')); - $this->_storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($store)); - $this->assertEquals('http://localhost/theme/preview/', $this->_model->getPreviewImageDirectoryUrl()); + $this->_storeManager->expects($this->any())->method('getStore')->will($this->returnValue($store)); + $this->assertEquals('http://localhost/theme/preview/image.png', $this->model->getPreviewImageUrl($theme)); + } + + /** + * @param bool $isPhysical + * @return \Magento\Core\Model\Theme|\PHPUnit_Framework_MockObject_MockObject + */ + protected function getGetTheme($isPhysical) + { + /** @var $theme \Magento\Core\Model\Theme|\PHPUnit_Framework_MockObject_MockObject */ + $theme = $this->getMock( + 'Magento\Core\Model\Theme', + array('getPreviewImage', 'isPhysical','__wakeup'), + array(), + '', + false + ); + + $theme->setData('area', 'frontend'); + + $theme->expects($this->any()) + ->method('isPhysical') + ->will($this->returnValue($isPhysical)); + + $theme->expects($this->any()) + ->method('getPreviewImage') + ->will($this->returnValue('image.png')); + + return $theme; } /** @@ -93,14 +142,9 @@ class PathTest extends \PHPUnit_Framework_TestCase */ public function testDefaultPreviewImageUrlGetter() { - $this->_viewUrlMock->expects( - $this->once() - )->method( - 'getViewFileUrl' - )->with( - \Magento\Core\Model\Theme\Image\Path::DEFAULT_PREVIEW_IMAGE - ); - $this->_model->getPreviewImageDefaultUrl(); + $this->_assetRepo->expects($this->once())->method('getUrl') + ->with(\Magento\Core\Model\Theme\Image\Path::DEFAULT_PREVIEW_IMAGE); + $this->model->getPreviewImageDefaultUrl(); } /** @@ -108,7 +152,10 @@ class PathTest extends \PHPUnit_Framework_TestCase */ public function testImagePreviewDirectoryGetter() { - $this->assertEquals('/media/theme/preview', $this->_model->getImagePreviewDirectory()); + $this->assertEquals( + '/theme/preview', + $this->model->getImagePreviewDirectory() + ); } /** @@ -116,6 +163,9 @@ class PathTest extends \PHPUnit_Framework_TestCase */ public function testTemporaryDirectoryGetter() { - $this->assertEquals('/media/theme/origin', $this->_model->getTemporaryDirectory()); + $this->assertEquals( + '/theme/origin', + $this->model->getTemporaryDirectory() + ); } } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1f08bd9f014e94707851935aa72ae15a800fe7b2 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Core/Model/View/DesignTest.php @@ -0,0 +1,92 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Core + * @subpackage unit_tests + * @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) + */ +namespace Magento\Core\Model\View; + +class DesignTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Locale\ResolverInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $locale; + + /** + * @var \Magento\Core\Model\View\Design::__construct + */ + private $model; + + protected function setUp() + { + $storeManager = $this->getMockForAbstractClass('\Magento\Store\Model\StoreManagerInterface'); + $flyweightThemeFactory = $this->getMock( + '\Magento\Framework\View\Design\Theme\FlyweightFactory', array(), array(), '', false + ); + $config = $this->getMockForAbstractClass('\Magento\Framework\App\Config\ScopeConfigInterface'); + $themeFactory = $this->getMock('\Magento\Core\Model\ThemeFactory'); + $this->locale = $this->getMockForAbstractClass('\Magento\Framework\Locale\ResolverInterface'); + $state = $this->getMock('\Magento\Framework\App\State', array(), array(), '', false); + $themes = array(); + $this->model = new \Magento\Core\Model\View\Design( + $storeManager, $flyweightThemeFactory, $config, $themeFactory, $this->locale, $state, $themes + ); + } + + public function testGetLocale() + { + $expected = 'locale'; + $this->locale->expects($this->once()) + ->method('getLocaleCode') + ->will($this->returnValue($expected)); + $actual = $this->model->getLocale(); + $this->assertSame($expected, $actual); + } + + /** + * @param string $themePath + * @param string $themeId + * @param string $expectedResult + * @dataProvider getThemePathDataProvider + */ + public function testGetThemePath($themePath, $themeId, $expectedResult) + { + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $theme->expects($this->once())->method('getThemePath')->will($this->returnValue($themePath)); + $theme->expects($this->any())->method('getId')->will($this->returnValue($themeId)); + $this->assertEquals($expectedResult, $this->model->getThemePath($theme)); + } + + /** + * @return array + */ + public function getThemePathDataProvider() + { + return array( + array('some_path', '', 'some_path'), + array('', '2', \Magento\Framework\View\DesignInterface::PUBLIC_THEME_DIR . '2'), + array('', '', \Magento\Framework\View\DesignInterface::PUBLIC_VIEW_DIR), + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml index b50e40f4d75352c04bdb1db7b1ce87acc1e528c9..889ccda11a877a9a3ce86e2195bda35229226e69 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Iphone</title> <version>2.0.0.1</version> <media> diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml index 9a84fae8d323accd84f28ff010b2fbbb4ed2951e..6ae7bbe899bd9f59ee5cad37b0ebbd481bf25741 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <package code="default"> <title>Default</title> <theme version="2.0.0.1" code="iphone"> diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php index bc54ef61e80a7ccff49831e907504de547feb39e..fa3934ef73b5ff40bc2ee2c31f85236375b72602 100755 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php @@ -132,7 +132,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase private $_encryptorMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\UrlInterface + * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\UrlInterface */ private $_urlMock; diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php index 91186c7585756390bea7bc9bf32b29f424c93a69..e41128aaaa9044a92c64d0227a6e11c656f505be 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php @@ -33,7 +33,7 @@ class TypeTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false); $downloadableFile = $this->getMockBuilder( 'Magento\Downloadable\Helper\File' )->disableOriginalConstructor()->getMock(); @@ -44,34 +44,69 @@ class TypeTest extends \PHPUnit_Framework_TestCase $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem') ->disableOriginalConstructor() ->getMock(); - $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); - $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); - $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false); - $sampleResFactory = $this->getMock( - 'Magento\Downloadable\Model\Resource\SampleFactory', - array(), - array(), + $coreRegistry = $this->getMock('Magento\Framework\Registry', [], [], '', false); + $logger = $this->getMock('Magento\Framework\Logger', [], [], '', false); + $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', [], [], '', false); + $sampleResFactory = $this->getMock('Magento\Downloadable\Model\Resource\SampleFactory', [], [], '', false); + $linkResource = $this->getMock('Magento\Downloadable\Model\Resource\Link', [], [], '', false); + $linksFactory = $this->getMock('Magento\Downloadable\Model\Resource\Link\CollectionFactory', [], [], '', false); + $samplesFactory = $this->getMock( + 'Magento\Downloadable\Model\Resource\Sample\CollectionFactory', + [], + [], '', false ); - $linkResource = $this->getMock('Magento\Downloadable\Model\Resource\Link', array(), array(), '', false); - $linksFactory = $this->getMock( - 'Magento\Downloadable\Model\Resource\Link\CollectionFactory', - array(), - array(), + $sampleFactory = $this->getMock('Magento\Downloadable\Model\SampleFactory', [], [], '', false); + $linkFactory = $this->getMock('Magento\Downloadable\Model\LinkFactory', [], [], '', false); + + $entityTypeMock = $this->getMock('Magento\Eav\Model\Entity\Type', [], [], '', false); + $resourceProductMock = $this->getMock( + 'Magento\Catalog\Model\Resource\Product', + ['getEntityType'], + [], '', false ); - $samplesFactory = $this->getMock( - 'Magento\Downloadable\Model\Resource\Sample\CollectionFactory', - array(), - array(), + $resourceProductMock->expects($this->any())->method('getEntityType')->will($this->returnValue($entityTypeMock)); + + $productMock = $this->getMock( + 'Magento\Catalog\Model\Product', + [ + 'getResource', + 'canAffectOptions', + 'getLinksPurchasedSeparately', + 'setTypeHasRequiredOptions', + 'setRequiredOptions', + 'getDownloadableData', + 'setTypeHasOptions', + 'setLinksExist', + '__wakeup' + ], + [], '', false ); - $sampleFactory = $this->getMock('Magento\Downloadable\Model\SampleFactory', array(), array(), '', false); - $linkFactory = $this->getMock('Magento\Downloadable\Model\LinkFactory', array(), array(), '', false); + $productMock->expects($this->any())->method('getResource')->will($this->returnValue($resourceProductMock)); + $productMock->expects($this->any())->method('setTypeHasRequiredOptions')->with($this->equalTo(true))->will( + $this->returnSelf() + ); + $productMock->expects($this->any())->method('setRequiredOptions')->with($this->equalTo(true))->will( + $this->returnSelf() + ); + $productMock->expects($this->any())->method('getDownloadableData')->will($this->returnValue(array())); + $productMock->expects($this->any())->method('setTypeHasOptions')->with($this->equalTo(false)); + $productMock->expects($this->any())->method('setLinksExist')->with($this->equalTo(false)); + $productMock->expects($this->any())->method('canAffectOptions')->with($this->equalTo(true)); + $productMock->expects($this->any())->method('getLinksPurchasedSeparately')->will($this->returnValue(true)); + $productMock->expects($this->any())->method('getLinksPurchasedSeparately')->will($this->returnValue(true)); + $this->_productMock = $productMock; + $eavConfigMock = $this->getMock('\Magento\Eav\Model\Config', ['getEntityAttributeCodes'], [], '', false); + $eavConfigMock->expects($this->any()) + ->method('getEntityAttributeCodes') + ->with($this->equalTo($entityTypeMock), $this->equalTo($productMock)) + ->will($this->returnValue(array())); $this->_model = $objectHelper->getObject( 'Magento\Downloadable\Model\Product\Type', array( @@ -88,7 +123,8 @@ class TypeTest extends \PHPUnit_Framework_TestCase 'linksFactory' => $linksFactory, 'samplesFactory' => $samplesFactory, 'sampleFactory' => $sampleFactory, - 'linkFactory' => $linkFactory + 'linkFactory' => $linkFactory, + 'eavConfig' => $eavConfigMock ) ); } @@ -97,4 +133,9 @@ class TypeTest extends \PHPUnit_Framework_TestCase { $this->assertFalse($this->_model->hasWeight(), 'This product has weight, but it should not'); } + + public function testBeforeSave() + { + $this->_model->beforeSave($this->_productMock); + } } diff --git a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php index 3258be6b76407cd8da1d7fe5db6f3d9129e315a5..f9147a0e48aebcdb87af42ad01c2a8158d86470b 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php @@ -94,7 +94,7 @@ class EditTest extends \PHPUnit_Framework_TestCase $viewFilesystem = $this->getMock( '\Magento\Framework\View\Filesystem', - array('getFilename'), + array('getTemplateFileName'), array(), '', false @@ -102,7 +102,7 @@ class EditTest extends \PHPUnit_Framework_TestCase $viewFilesystem->expects( $this->any() )->method( - 'getFilename' + 'getTemplateFileName' )->will( $this->returnValue('var/www/magento\rootdir/app\custom/filename.phtml') ); @@ -283,27 +283,19 @@ class EditTest extends \PHPUnit_Framework_TestCase ); $this->filesystemMock->expects($this->any())->method('getPath')->will($this->returnValueMap($dirValueMap)); - $this->_emailConfigMock->expects( - $this->once() - )->method( - 'getAvailableTemplates' - )->will( - $this->returnValue(array('template_b2', 'template_a', 'template_b1')) - ); - $this->_emailConfigMock->expects( - $this->exactly(3) - )->method( - 'getTemplateModule' - )->will( - $this->onConsecutiveCalls('Fixture_ModuleB', 'Fixture_ModuleA', 'Fixture_ModuleB') - ); - $this->_emailConfigMock->expects( - $this->exactly(3) - )->method( - 'getTemplateLabel' - )->will( - $this->onConsecutiveCalls('Template B2', 'Template A', 'Template B1') - ); + $this->_emailConfigMock + ->expects($this->once()) + ->method('getAvailableTemplates') + ->will($this->returnValue(array('template_b2', 'template_a', 'template_b1'))); + $this->_emailConfigMock + ->expects($this->exactly(3)) + ->method('getTemplateModule') + ->will($this->onConsecutiveCalls('Fixture_ModuleB', 'Fixture_ModuleA', 'Fixture_ModuleB')); + $this->_emailConfigMock + ->expects($this->exactly(3)) + ->method('getTemplateLabel') + ->will($this->onConsecutiveCalls('Template B2', 'Template A', 'Template B1')); + $this->assertEmpty($this->_block->getData('template_options')); $this->_block->setTemplate('my/custom\template.phtml'); $this->_block->toHtml(); diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php index 04871684fc27eba1e86ec43916506180cf5a9883..24194c974bbbde6689a4afe68bb20a7b93e2295e 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php @@ -51,7 +51,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase $this->getMock('Magento\Core\Model\App\Emulation', array(), array(), '', false), $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false), $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false), - $this->getMock('Magento\Framework\View\Url', array(), array(), '', false), + $this->getMock('Magento\Framework\View\Asset\Repository', array(), array(), '', false), $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false), $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'), $this->getMock('Magento\Email\Model\Template\FilterFactory', array(), array(), '', false), diff --git a/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/valid_acl.xml b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/valid_acl.xml index c340b32e4bd0f15b4d3efd7592424f2f8d5824ad..1a1be25086ac21ae37040a64d8779c88ffba1d60 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/valid_acl.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/valid_acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <!-- commented text --> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/valid_acl.xml b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/valid_acl.xml index bd25fd6980b038e730dd9c1e7f2d8c924009af65..e861d50eee71547561c4c0a94e23195068c05ca7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/valid_acl.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/valid_acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Test_Value::show_toolbar" title="Lorem ipsum" sortOrder="12"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/XsdTest.php index 3d6fb29b3b8fa0fcd45a720adf5ea98dc5dfc849..901dc0452876a4b3b7f071acb36a599a3d8662a1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/XsdTest.php @@ -38,7 +38,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_xsdSchema = BP . '/lib/Magento/Framework/App/etc/routes.xsd'; + $this->_xsdSchema = BP . '/lib/internal/Magento/Framework/App/etc/routes.xsd'; $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml index e6d50c1f20cdaba3fc8444e519588663db520f55..2791c4429eab52687533a716be086cee74a84f4b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="first"> <route id="test"> <module name="Some_ModuleName" before="Some_BeforeModuleName" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/SchemaLocatorTest.php index 77cd4ffbd106202d760ee07a3204b4f43db5562a..7c380f0de131774c816fd62f419f5a3dc2085f9f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/SchemaLocatorTest.php @@ -37,7 +37,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_expected = str_replace('\\', '/', BP) . '/lib/Magento/Framework/App/etc/resources.xsd'; + $this->_expected = str_replace('\\', '/', BP) . '/lib/internal/Magento/Framework/App/etc/resources.xsd'; $this->_model = new \Magento\Framework\App\Resource\Config\SchemaLocator(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/XsdTest.php index 7bb9aa3dcc31b22ce36f10b381eee3e08547c919..8c3197079424a13697ad2947531d89e01e1ef8db 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/XsdTest.php @@ -38,7 +38,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_xsdSchema = BP . '/lib/Magento/Framework/App/etc/resources.xsd'; + $this->_xsdSchema = BP . '/lib/internal/Magento/Framework/App/etc/resources.xsd'; $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml index dd21e17c5b5ed17835ae036dab175b22830066b2..cea9bb35188d50bb41dfef1c07394d296dc6c7cc 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/App/etc/resources.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/App/etc/resources.xsd"> <resource name="resourceName" extends="anotherResourceName" /> <resource name="otherResourceName" connection="connectionName" /> <resource name="defaultSetup" connection="customConnection" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml index 2235259d7dd419d0f090c50718e924c8b0caacf5..7e9685d1e850cd4785f24f76b16aa39d03787518 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/App/etc/resources.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/App/etc/resources.xsd"> <resource name="test_name" extends="test_extends" connection="test_connection" /> <resource name="test_name_two" /> </config> diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml index 09eccfdd040ee7157e2fe89e7a933155c7229d48..2be7858498a72d765eef4f7cdacddf773364a875 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/App/etc/routes.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> <router id="backend"> <route id="adminhtml" frontName="admin"> <module name="Magento_ModuleD" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0a281b70b90ffb4d352d05682f5ff8df7567a4f4 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php @@ -0,0 +1,205 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\App; + +class StaticResourceTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject + */ + private $state; + + /** + * @var \Magento\Framework\App\Response\FileInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $response; + + /** + * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + */ + private $request; + + /** + * @var \Magento\Framework\App\View\Asset\Publisher|\PHPUnit_Framework_MockObject_MockObject + */ + private $publisher; + + /** + * @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject + */ + private $assetRepo; + + /** + * @var \Magento\Framework\Module\ModuleList|\PHPUnit_Framework_MockObject_MockObject + */ + private $moduleList; + + /** + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + */ + private $objectManager; + + /** + * @var \Magento\Framework\App\ObjectManager\ConfigLoader|\PHPUnit_Framework_MockObject_MockObject + */ + private $configLoader; + + /** + * @var \Magento\Framework\App\StaticResource + */ + private $object; + + protected function setUp() + { + $this->state = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); + $this->response = $this->getMockForAbstractClass('Magento\Framework\App\Response\FileInterface'); + $this->request = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); + $this->publisher = $this->getMock('Magento\Framework\App\View\Asset\Publisher', array(), array(), '', false); + $this->assetRepo = $this->getMock('Magento\Framework\View\Asset\Repository', array(), array(), '', false); + $this->moduleList = $this->getMock('Magento\Framework\Module\ModuleList', array(), array(), '', false); + $this->objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManager'); + $this->configLoader = $this->getMock( + 'Magento\Framework\App\ObjectManager\ConfigLoader', array(), array(), '', false + ); + $this->object = new \Magento\Framework\App\StaticResource( + $this->state, + $this->response, + $this->request, + $this->publisher, + $this->assetRepo, + $this->moduleList, + $this->objectManager, + $this->configLoader, + $this->getMockForAbstractClass('\Magento\Framework\View\DesignInterface') + ); + } + + public function testLaunchProductionMode() + { + $this->state->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_PRODUCTION)); + $this->response->expects($this->once()) + ->method('setHttpResponseCode') + ->with(404); + $this->response->expects($this->never()) + ->method('setFilePath'); + $this->object->launch(); + } + + /** + * @param string $mode + * @param string $requestedPath + * @param string $expectedModule + * @param bool $moduleExists + * @param string $expectedFile + * @param array $expectedParams + * + * @dataProvider launchDataProvider + */ + public function testLaunch( + $mode, + $requestedPath, + $expectedModule, + $moduleExists, + $expectedFile, + array $expectedParams + ) { + $this->state->expects($this->once()) + ->method('getMode') + ->will($this->returnValue($mode)); + $this->state->expects($this->once()) + ->method('setAreaCode') + ->with('area'); + $this->configLoader->expects($this->once()) + ->method('load') + ->with('area') + ->will($this->returnValue(array('config'))); + $this->objectManager->expects($this->once()) + ->method('configure') + ->with(array('config')); + $this->request->expects($this->once()) + ->method('get') + ->with('resource') + ->will($this->returnValue($requestedPath)); + $this->moduleList->expects($this->any()) + ->method('getModule') + ->with($expectedModule) + ->will($this->returnValue($moduleExists)); + $asset = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); + $asset->expects($this->once())->method('getSourceFile')->will($this->returnValue('resource/file.css')); + $this->assetRepo->expects($this->once()) + ->method('createAsset') + ->with($expectedFile, $expectedParams) + ->will($this->returnValue($asset)); + $this->publisher->expects($this->once())->method('publish')->with($asset); + $this->response->expects($this->once()) + ->method('setFilePath') + ->with('resource/file.css'); + $this->object->launch(); + } + + /** + * @return array + */ + public function launchDataProvider() + { + return array( + 'developer mode with non-modular resource' => array( + \Magento\Framework\App\State::MODE_DEVELOPER, + 'area/Magento/theme/locale/dir/file.js', + 'dir', + null, + 'dir/file.js', + array('area' => 'area', 'locale' => 'locale', 'module' => '', 'theme' => 'Magento/theme'), + ), + 'default mode with modular resource' => array( + \Magento\Framework\App\State::MODE_DEFAULT, + 'area/Magento/theme/locale/Namespace_Module/dir/file.js', + 'Namespace_Module', + array('some data'), + 'dir/file.js', + array( + 'area' => 'area', 'locale' => 'locale', 'module' => 'Namespace_Module', 'theme' => 'Magento/theme' + ), + ), + ); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Requested path 'short/path.js' is wrong + */ + public function testLaunchWrongPath() + { + $this->state->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_DEVELOPER)); + $this->request->expects($this->once()) + ->method('get') + ->with('resource') + ->will($this->returnValue('short/path.js')); + $this->object->launch(); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2e4d1b7375891833adcfbb2cb48d429edd2ed8c5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php @@ -0,0 +1,140 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\App\View\Asset; + +use Magento\Framework\App\View\Asset\Publisher; + +class PublisherTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject + */ + private $appState; + + /** + * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject + */ + private $filesystem; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $rootDirWrite; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $staticDirRead; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $staticDirWrite; + + /** + * @var \Magento\Framework\App\View\Asset\Publisher + */ + private $object; + + protected function setUp() + { + $this->appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); + $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); + $this->object = new Publisher($this->appState, $this->filesystem); + + $this->rootDirWrite = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface'); + $this->staticDirRead = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\ReadInterface'); + $this->staticDirWrite = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface'); + $this->filesystem->expects($this->any()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) + ->will($this->returnValue($this->staticDirRead)); + $this->filesystem->expects($this->any()) + ->method('getDirectoryWrite') + ->will($this->returnValueMap([ + [\Magento\Framework\App\Filesystem::ROOT_DIR, $this->rootDirWrite], + [\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->staticDirWrite], + ])); + } + + public function testPublishNotAllowed() + { + $this->appState->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_DEVELOPER)); + $this->assertFalse($this->object->publish($this->getAsset())); + } + + public function testPublishExistsBefore() + { + $this->appState->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_PRODUCTION)); + $this->staticDirRead->expects($this->once()) + ->method('isExist') + ->with('some/file.ext') + ->will($this->returnValue(true)); + $this->assertTrue($this->object->publish($this->getAsset())); + } + + public function testPublish() + { + $this->appState->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_PRODUCTION)); + $this->staticDirRead->expects($this->once()) + ->method('isExist') + ->with('some/file.ext') + ->will($this->returnValue(false)); + + $this->rootDirWrite->expects($this->once()) + ->method('getRelativePath') + ->with('/root/some/file.ext') + ->will($this->returnValue('some/file.ext')); + $this->rootDirWrite->expects($this->once()) + ->method('copyFile') + ->with('some/file.ext', 'some/file.ext', $this->staticDirWrite) + ->will($this->returnValue(true)); + + $this->assertTrue($this->object->publish($this->getAsset())); + } + + /** + * Create an asset mock + * + * @return \Magento\Framework\View\Asset\File|\PHPUnit_Framework_MockObject_MockObject + */ + protected function getAsset() + { + $asset = $this->getMock('Magento\Framework\View\Asset\File', array(), array(), '', false); + $asset->expects($this->any()) + ->method('getPath') + ->will($this->returnValue('some/file.ext')); + $asset->expects($this->any()) + ->method('getSourceFile') + ->will($this->returnValue('/root/some/file.ext')); + return $asset; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Generator/TimestampTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Generator/TimestampTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5f981048d3ed8e2672cc76000b9418de6c9173f4 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Generator/TimestampTest.php @@ -0,0 +1,47 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\App\View\Deployment\Version\Generator; + +class TimestampTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Timestamp + */ + private $object; + + protected function setUp() + { + $this->object = new Timestamp(); + } + + public function testGenerate() + { + $result = $this->object->generate(); + $this->assertNotEmpty($result); + $this->assertInternalType('string', $result); + sleep(1); + $this->assertNotEquals($result, $this->object->generate(), 'Unique value is expected'); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Storage/FileTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Storage/FileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a43ffa83b78a6e14b6289ac9ac55bd972f5bd6c5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Storage/FileTest.php @@ -0,0 +1,108 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\App\View\Deployment\Version\Storage; + +class FileTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var File + */ + private $object; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $directory; + + protected function setUp() + { + $this->directory = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface'); + $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); + $filesystem + ->expects($this->once()) + ->method('getDirectoryWrite') + ->with('fixture_dir') + ->will($this->returnValue($this->directory)) + ; + $this->object = new File($filesystem, 'fixture_dir', 'fixture_file.txt'); + } + + public function testLoad() + { + $this->directory + ->expects($this->once()) + ->method('readFile') + ->with('fixture_file.txt') + ->will($this->returnValue('123')) + ; + $this->assertEquals('123', $this->object->load()); + } + + /** + * @expectedException \Exception + * @expectedExceptionMessage Exception to be propagated + */ + public function testLoadExceptionPropagation() + { + $this->directory + ->expects($this->once()) + ->method('readFile') + ->with('fixture_file.txt') + ->will($this->throwException(new \Exception('Exception to be propagated'))) + ; + $this->object->load(); + } + + /** + * @expectedException \UnexpectedValueException + * @expectedExceptionMessage Unable to retrieve deployment version of static files from the file system + */ + public function testLoadExceptionWrapping() + { + $filesystemException = new \Magento\Framework\Filesystem\FilesystemException('File does not exist'); + $this->directory + ->expects($this->once()) + ->method('readFile') + ->with('fixture_file.txt') + ->will($this->throwException($filesystemException)) + ; + try { + $this->object->load(); + } catch (\Exception $e) { + $this->assertSame($filesystemException, $e->getPrevious(), 'Wrapping of original exception is expected'); + throw $e; + } + } + + public function testSave() + { + $this->directory + ->expects($this->once()) + ->method('writeFile') + ->with('fixture_file.txt', 'input_data', 'w') + ; + $this->object->save('input_data'); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/VersionTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/VersionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2cf42e36ab5611c0d504a33bb539a1e99e789b0c --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/VersionTest.php @@ -0,0 +1,117 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\App\View\Deployment; + +use Magento\Framework\App\View\Deployment\Version; + +class VersionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Version + */ + private $object; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $appState; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $versionStorage; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $versionGenerator; + + protected function setUp() + { + $this->appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); + $this->versionStorage = $this->getMock('Magento\Framework\App\View\Deployment\Version\StorageInterface'); + $this->versionGenerator = $this->getMock('Magento\Framework\App\View\Deployment\Version\GeneratorInterface'); + $this->object = new Version($this->appState, $this->versionStorage, $this->versionGenerator); + } + + public function testGetValueDeveloperMode() + { + $this->appState + ->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_DEVELOPER)) + ; + $this->versionStorage->expects($this->never())->method($this->anything()); + $this->versionGenerator->expects($this->once())->method('generate')->will($this->returnValue('123')); + $this->assertEquals('123', $this->object->getValue()); + $this->object->getValue(); // Ensure computation occurs only once and result is cached in memory + } + + /** + * @param string $appMode + * @dataProvider getValueFromStorageDataProvider + */ + public function testGetValueFromStorage($appMode) + { + $this->appState + ->expects($this->once()) + ->method('getMode') + ->will($this->returnValue($appMode)) + ; + $this->versionStorage->expects($this->once())->method('load')->will($this->returnValue('123')); + $this->versionStorage->expects($this->never())->method('save'); + $this->versionGenerator->expects($this->never())->method('generate'); + $this->assertEquals('123', $this->object->getValue()); + $this->object->getValue(); // Ensure caching in memory + } + + public function getValueFromStorageDataProvider() + { + return array( + 'default mode' => array(\Magento\Framework\App\State::MODE_DEFAULT), + 'production mode' => array(\Magento\Framework\App\State::MODE_PRODUCTION), + 'arbitrary mode' => array('test'), + ); + } + + public function testGetValueDefaultModeSaving() + { + $this->appState + ->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_DEFAULT)) + ; + $storageException = new \UnexpectedValueException('Does not exist in the storage'); + $this->versionStorage + ->expects($this->once()) + ->method('load') + ->will($this->throwException($storageException)) + ; + $this->versionGenerator->expects($this->once())->method('generate')->will($this->returnValue('123')); + $this->versionStorage->expects($this->once())->method('save')->with('123'); + $this->assertEquals('123', $this->object->getValue()); + $this->object->getValue(); // Ensure caching in memory + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.xml index bdca9d6e724ab84c04a6a6a511e87f3f66b1bf12..e30d8466d5abd78d2a3b2ab923da97a30ecd0b65 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Cache/etc/cache.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Cache/etc/cache.xsd"> <type name="config" translate="label,description" instance="Magento\Framework\App\Cache\Type\Config"> <label>Configuration</label> <description>System(config.xml, local.xml) and modules configuration files(config.xml).</description> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/GenerateTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/GenerateTest.php deleted file mode 100644 index d190038ec5a856c5554c54e8f378ca9871c2d05d..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/GenerateTest.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Code\Minifier\Strategy; - -use Magento\Framework\App\Filesystem; -use Magento\Framework\Filesystem\Directory\Write; -use Magento\Framework\Filesystem\Directory\Read; - -class GenerateTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var Filesystem | \PHPUnit_Framework_MockObject_MockObject - */ - protected $filesystem; - - /** - * @var Read | \PHPUnit_Framework_MockObject_MockObject - */ - protected $rootDirectory; - - /** - * @var Write | \PHPUnit_Framework_MockObject_MockObject - */ - protected $pubViewCacheDir; - - /** - * @var \Magento\Framework\Code\Minifier\AdapterInterface | \PHPUnit_Framework_MockObject_MockObject - */ - protected $adapter; - - /** - * Set up before each test - */ - public function setUp() - { - $this->rootDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Read', - array(), - array(), - '', - false - ); - $this->pubViewCacheDir = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Write', - array(), - array(), - '', - false - ); - $this->filesystem = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getDirectoryWrite', 'getDirectoryRead', '__wakeup'), - array(), - '', - false - ); - $this->filesystem->expects( - $this->once() - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::ROOT_DIR - )->will( - $this->returnValue($this->rootDirectory) - ); - $this->filesystem->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - )->will( - $this->returnValue($this->pubViewCacheDir) - ); - $this->adapter = $this->getMockForAbstractClass( - 'Magento\Framework\Code\Minifier\AdapterInterface', - array(), - '', - false - ); - } - - /** - * Test for minifyFile if case update is needed - */ - public function testGetMinifiedFile() - { - $originalFile = __DIR__ . '/original/some.js'; - $minifiedFile = __DIR__ . '/minified/some.min.js'; - $content = 'content'; - $minifiedContent = 'minified content'; - - $this->rootDirectory->expects( - $this->once() - )->method( - 'readFile' - )->with( - $originalFile - )->will( - $this->returnValue($content) - ); - $this->pubViewCacheDir->expects($this->once())->method('getRelativePath')->will($this->returnArgument(0)); - $this->pubViewCacheDir->expects($this->once())->method('writeFile')->with($minifiedFile, $minifiedContent); - - $this->adapter->expects( - $this->once() - )->method( - 'minify' - )->with( - $content - )->will( - $this->returnValue($minifiedContent) - ); - - $strategy = new Generate($this->adapter, $this->filesystem); - $strategy->minifyFile($originalFile, $minifiedFile); - } - - /** - * Test for minifyFile if case update is NOT needed - */ - public function testGetMinifiedFileNoUpdateNeeded() - { - $originalFile = __DIR__ . '/original/some.js'; - $minifiedFile = __DIR__ . '/some.min.js'; - - $mTimeMap = array( - array($originalFile, null, array('mtime' => 1)), - array($minifiedFile, null, array('mtime' => 1)) - ); - - $this->pubViewCacheDir->expects( - $this->once() - )->method( - 'isExist' - )->with( - $minifiedFile - )->will( - $this->returnValue(true) - ); - $this->rootDirectory->expects($this->once())->method('stat')->will($this->returnValueMap($mTimeMap)); - $this->pubViewCacheDir->expects($this->once())->method('stat')->will($this->returnValueMap($mTimeMap)); - - $this->rootDirectory->expects($this->never())->method('readFile'); - $this->pubViewCacheDir->expects($this->never())->method('writeFile'); - - $this->adapter->expects($this->never())->method('minify'); - - $strategy = new Generate($this->adapter, $this->filesystem); - $strategy->minifyFile($originalFile, $minifiedFile); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/LiteTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/LiteTest.php deleted file mode 100644 index e1e313c559e76f6c7c3ee3a686d6aa7957ba31de..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/LiteTest.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Code\Minifier\Strategy; - -use Magento\Framework\App\Filesystem; -use Magento\Framework\Filesystem\Directory\Read; -use Magento\Framework\Filesystem\Directory\Write; - -class LiteTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var Filesystem | \PHPUnit_Framework_MockObject_MockObject - */ - protected $filesystem; - - /** - * @var Read | \PHPUnit_Framework_MockObject_MockObject - */ - protected $rootDirectory; - - /** - * @var Write | \PHPUnit_Framework_MockObject_MockObject - */ - protected $pubViewCacheDir; - - /** - * @var \Magento\Framework\Code\Minifier\AdapterInterface | \PHPUnit_Framework_MockObject_MockObject - */ - protected $adapter; - - /** - * Set up before each test - */ - public function setUp() - { - $this->rootDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Read', - array(), - array(), - '', - false - ); - $this->pubViewCacheDir = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Write', - array(), - array(), - '', - false - ); - $this->filesystem = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getDirectoryWrite', 'getDirectoryRead', '__wakeup'), - array(), - '', - false - ); - $this->filesystem->expects( - $this->once() - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::ROOT_DIR - )->will( - $this->returnValue($this->rootDirectory) - ); - $this->filesystem->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - )->will( - $this->returnValue($this->pubViewCacheDir) - ); - $this->adapter = $this->getMockForAbstractClass( - 'Magento\Framework\Code\Minifier\AdapterInterface', - array(), - '', - false - ); - } - - /** - * Test for minifyFile if case update is needed - */ - public function testGetMinifiedFile() - { - $originalFile = __DIR__ . '/original/some.js'; - $minifiedFile = __DIR__ . '/minified/some.min.js'; - $content = 'content'; - $minifiedContent = 'minified content'; - - $this->rootDirectory->expects( - $this->once() - )->method( - 'readFile' - )->with( - $originalFile - )->will( - $this->returnValue($content) - ); - $this->pubViewCacheDir->expects($this->once())->method('writeFile')->with($minifiedFile, $minifiedContent); - - $this->adapter->expects( - $this->once() - )->method( - 'minify' - )->with( - $content - )->will( - $this->returnValue($minifiedContent) - ); - - $strategy = new Lite($this->adapter, $this->filesystem); - $strategy->minifyFile($originalFile, $minifiedFile); - } - - /** - * Test for minifyFile if case update is NOT needed - */ - public function testGetMinifiedFileNoUpdateNeeded() - { - $originalFile = __DIR__ . '/original/some.js'; - $minifiedFile = __DIR__ . '/some.min.js'; - - $this->pubViewCacheDir->expects( - $this->once() - )->method( - 'isExist' - )->with( - $minifiedFile - )->will( - $this->returnValue(true) - ); - - $this->rootDirectory->expects($this->never())->method('readFile'); - $this->pubViewCacheDir->expects($this->never())->method('writeFile'); - - $this->adapter->expects($this->never())->method('minify'); - - $strategy = new Lite($this->adapter, $this->filesystem); - $strategy->minifyFile($originalFile, $minifiedFile); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/MinifierTest.php deleted file mode 100644 index 836fe2ced746cebb21b2a79ade565878125e3802..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/MinifierTest.php +++ /dev/null @@ -1,201 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Code; - -class MinifierTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\Code\Minifier\StrategyInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $strategy; - - /** - * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject - */ - protected $filesystem; - - /** - * @var Minifier - */ - protected $minifier; - - /** - * @var string - */ - protected $minifyDir = 'pub/cache/minify'; - - /** - * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject - */ - protected $rootDirectory; - - /** - * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject - */ - protected $pubViewCacheDir; - - /** - * Creat test mocks - */ - protected function setUp() - { - $this->strategy = $this->getMockForAbstractClass('Magento\Framework\Code\Minifier\StrategyInterface'); - $this->filesystem = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getDirectoryRead', '__wakeup'), - array(), - '', - false - ); - $this->rootDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Read', - array('getRelativePath', 'isExist', 'getAbsolutePath'), - array(), - '', - false - ); - $this->pubViewCacheDir = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Read', - array('getAbsolutePath', 'getRelativePath'), - array(), - '', - false - ); - $this->filesystem->expects( - $this->at(0) - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::ROOT_DIR - )->will( - $this->returnValue($this->rootDirectory) - ); - $this->filesystem->expects( - $this->at(1) - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - )->will( - $this->returnValue($this->pubViewCacheDir) - ); - $this->minifier = new Minifier($this->strategy, $this->filesystem, $this->minifyDir); - } - - /** - * Test for getMinifiedFile - */ - public function testGetMinifiedFile() - { - $originalFile = 'basedir/pub/lib/original/some.js'; - $originalFileRelative = 'pub/lib/original/some.js'; - $originalMinifiedFileRelative = 'pub/lib/original/some.min.js'; - $minifiedFileGeneratedPattern = $this->minifyDir . '%ssome.min.js'; - - $this->rootDirectory->expects( - $this->at(0) - )->method( - 'getRelativePath' - )->with( - $originalFile - )->will( - $this->returnValue($originalFileRelative) - ); - - $this->rootDirectory->expects( - $this->at(1) - )->method( - 'isExist' - )->with( - $originalMinifiedFileRelative - )->will( - $this->returnValue(false) - ); - - $this->strategy->expects( - $this->once() - )->method( - 'minifyFile' - )->with( - $originalFileRelative, - $this->matches($minifiedFileGeneratedPattern) - ); - $minifiedFile = $this->minifier->getMinifiedFile($originalFile); - $this->assertStringMatchesFormat($this->minifyDir . '%ssome.min.js', $minifiedFile); - } - - /** - * Test for getMinifiedFile (in case when minified file is passed) - */ - public function testGetMinifiedFileOriginalMinified() - { - $originalFile = 'file.min.js'; - $this->strategy->expects($this->never())->method('minifyFile'); - $minifiedFile = $this->minifier->getMinifiedFile($originalFile); - $this->assertSame($originalFile, $minifiedFile); - } - - /** - * Test for getMinifiedFile (in case when minified file exists) - */ - public function testGetMinifiedFileExistsMinified() - { - $originalAbsolutePath = 'basedir/pub/lib/original/some.js'; - $originalRelativePath = 'pub/lib/original/some.js'; - $originalMinifiedRelativePath = 'pub/lib/original/some.min.js'; - $originalMinifiedAbsolutePath = 'basedir/pub/lib/original/some.min.js'; - - $this->rootDirectory->expects( - $this->at(0) - )->method( - 'getRelativePath' - )->with( - $originalAbsolutePath - )->will( - $this->returnValue($originalRelativePath) - ); - - $this->rootDirectory->expects( - $this->at(1) - )->method( - 'isExist' - )->with( - $originalMinifiedRelativePath - )->will( - $this->returnValue(true) - ); - - $this->rootDirectory->expects( - $this->at(2) - )->method( - 'getAbsolutePath' - )->with( - $originalMinifiedRelativePath - )->will( - $this->returnValue($originalMinifiedAbsolutePath) - ); - - $this->assertEquals($originalMinifiedAbsolutePath, $this->minifier->getMinifiedFile($originalAbsolutePath)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/XsdTest.php index 1cc7a8fb4245899878103b5e7cfa55060463af52..a67f1f4179f9eddf3758f7cd1d579190d9821b4c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/XsdTest.php @@ -36,7 +36,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase $dom = new \DOMDocument(); $dom->load(__DIR__ . "/_files/{$invalidXmlFile}"); libxml_use_internal_errors(true); - $result = $dom->schemaValidate(__DIR__ . "/../../../../../../../lib/Magento/Framework/Config/etc/{$xsdFile}"); + $result = $dom->schemaValidate(BP . "/lib/internal/Magento/Framework/Config/etc/{$xsdFile}"); $errorsQty = count(libxml_get_errors()); libxml_use_internal_errors(false); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_default/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_default/theme.xml index 4350671967d7ec3d66b9f466a30875a8e82577f1..e58d5ab9ed52b038b867d121633e165f4dcf3979 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_default/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_default/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.9</version> <media> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test/theme.xml index b9b4311a1e238722e1f57e071c0494b02cff8533..7da52cfa616e6914796838e24b1f3a15044ab75d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Test</title> <version>2.1.0.0</version> <parent>default_default</parent> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test2/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test2/theme.xml index a3e075bd6c06521b8669112bb1d61c9efec132c3..26e805a5b1055a2501f99d4f3b27af8c99b9d202 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test2/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test2/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Test2</title> <version>2.0.0.0</version> <parent>default_test</parent> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_default/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_default/theme.xml index 4bd7efdb07cc4cb519030adf21e58cd7476941b0..ed07c07be39c4ba094cb851e72c8d68b5d6ddbf9 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_default/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_default/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.1.0</version> <media> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_external_package_descendant/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_external_package_descendant/theme.xml index dd0070378cf3d82fe828e49edc381613288b64f5..677eca6885bf076457d49a1efebfeb8c5d9c1c07 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_external_package_descendant/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_external_package_descendant/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> <parent>default_test2</parent> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/theme_invalid.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/theme_invalid.xml index 037e07ad8e1f1aa6f4bd7fd1dc355a845a326122..17cfdbc14a9d42e12e827b1b741d3ea40fb6b6cc 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/theme_invalid.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/theme_invalid.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Config/etc/theme.xsd"> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Default</title> <version>2.0.0.0</version> <parent>some_theme</parent> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_invalid.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_invalid.xml index 3b4dc980465daa7622b4ad20ebd7519c37cfc747..93b6add93332c8a1383a7101772c1ec4963a8524 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_invalid.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_invalid.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="Namespace_Module1"> <var name="var1">Value1</var> <var name="var1">Value1</var><!-- duplicate var name --> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_one.xml index 16d4f2e5ad5afb7844bc5ae0ab2e849f0d91ac04..40dddb64f464f66ed6c6a276c964b5ee20f8ab66 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_one.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_one.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="One"> <var name="one">Value One</var> </vars> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_two.xml index 847dca86cef7fff0587cb96399950eb26401102f..b9a0ae2f8683d283ecf2d56f712aac6d027f75d4 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_two.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Config/etc/view.xsd"> +<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Config/etc/view.xsd"> <vars module="One"> <var name="one">Value One Another</var> </vars> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/CacheTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/CacheTest.php deleted file mode 100644 index 0c923faa9613f1836884335fa13a9c352ded6877..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/CacheTest.php +++ /dev/null @@ -1,405 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class CacheTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\Cache */ - protected $cache; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage|\PHPUnit_Framework_MockObject_MockObject */ - protected $storageMock; - - /** @var ImportEntityFactory|\PHPUnit_Framework_MockObject_MockObject */ - protected $importEntityFactoryMock; - - /** @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $rootDirectory; - - protected function setUp() - { - $this->storageMock = $this->getMock( - 'Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage', - array(), - array(), - '', - false - ); - $this->rootDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\ReadInterface', - array(), - array(), - '', - false - ); - $this->importEntityFactoryMock = $this->getMock( - 'Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntityFactory', - array(), - array(), - '', - false - ); - - $cssFile = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $cssFile->expects($this->once())->method('getFilePath')->will($this->returnValue('Magento_Core::style.css')); - $cssFile->expects( - $this->once() - )->method( - 'getViewParams' - )->will( - $this->returnValue(array('theme' => 'some_theme', 'area' => 'frontend', 'locale' => 'en_US')) - ); - - $fileFactory = $this->getMock('Magento\Framework\View\Publisher\FileFactory', array(), array(), '', false); - $fileFactory->expects($this->any())->method('create')->will($this->returnValue($cssFile)); - - $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $filesystem->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($this->rootDirectory)); - - $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->cache = $this->objectManagerHelper->getObject( - 'Magento\Framework\Css\PreProcessor\Cache\Import\Cache', - array( - 'storage' => $this->storageMock, - 'importEntityFactory' => $this->importEntityFactoryMock, - 'filesystem' => $filesystem, - 'fileFactory' => $fileFactory, - 'publisherFile' => $cssFile - ) - ); - } - - public function testClearCache() - { - $expectedKey = 'Magento_Core::style.css|frontend|en_US|some_theme'; - - $fileKeyProperty = new \ReflectionProperty($this->cache, 'uniqueFileKey'); - $fileKeyProperty->setAccessible(true); - $this->assertEquals($expectedKey, $fileKeyProperty->getValue($this->cache)); - - $cachedFileProperty = new \ReflectionProperty($this->cache, 'cachedFile'); - $cachedFileProperty->setAccessible(true); - $cachedFileProperty->setValue($this->cache, 'some_cachedFile'); - - $importEntitiesProperty = new \ReflectionProperty($this->cache, 'importEntities'); - $importEntitiesProperty->setAccessible(true); - $this->assertEquals(array(), $importEntitiesProperty->getValue($this->cache)); - $importEntitiesProperty->setValue($this->cache, array('some_import_1', 'some_import_2')); - - $this->storageMock->expects( - $this->once() - )->method( - 'delete' - )->with( - $this->equalTo($expectedKey) - )->will( - $this->returnSelf() - ); - - $this->assertEquals($this->cache, $this->cache->clear()); - $this->assertEmpty($cachedFileProperty->getValue($this->cache)); - $this->assertEquals(array(), $importEntitiesProperty->getValue($this->cache)); - } - - public function testGetCachedFile() - { - $property = new \ReflectionProperty($this->cache, 'cachedFile'); - $property->setAccessible(true); - $this->assertEmpty($property->getValue($this->cache)); - $property->setValue( - $this->cache, - $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false) - ); - $this->assertInstanceOf('\Magento\Framework\View\Publisher\CssFile', $this->cache->get()); - } - - /** - * @param array $params - * @param array $expectedResult - * @dataProvider addEntityToCacheDataProvider - */ - public function testAddEntityToCache($params, $expectedResult) - { - $importEntitiesProperty = new \ReflectionProperty($this->cache, 'importEntities'); - $importEntitiesProperty->setAccessible(true); - $this->assertEquals(array(), $importEntitiesProperty->getValue($this->cache)); - - $this->importEntityFactoryMock->expects( - $this->any() - )->method( - 'create' - )->with( - $this->isInstanceOf('Magento\Framework\Less\PreProcessor\File\Less') - )->will( - $this->returnValue('entity_object_here') - ); - - foreach ($params as $value) { - $this->assertEquals($this->cache, $this->cache->add($value)); - } - $this->assertEquals($expectedResult, $importEntitiesProperty->getValue($this->cache)); - } - - /** - * @return array - */ - public function addEntityToCacheDataProvider() - { - $themeModelMockId = $this->getMock('Magento\Core\Model\Theme', array(), array(), '', false); - $themeModelMockId->expects($this->once())->method('getId')->will($this->returnValue('1')); - - $themeModelMockPath = $this->getMock('Magento\Core\Model\Theme', array(), array(), '', false); - $themeModelMockPath->expects($this->once())->method('getThemePath')->will($this->returnValue('mocked_path')); - return array( - 'one import' => array( - 'params' => $this->getLessFile( - array( - array( - 'filePath' => 'css\some_file.css', - 'viewParams' => array('theme' => 'other_theme', 'area' => 'backend', 'locale' => 'fr_FR') - ) - ) - ), - 'expectedResult' => array('file_id_1' => 'entity_object_here') - ), - 'one import with theme id' => array( - 'params' => $this->getLessFile( - array( - array( - 'filePath' => 'css\theme_id\some_file.css', - 'viewParams' => array('themeModel' => $themeModelMockId, 'locale' => 'en_En') - ) - ) - ), - 'expectedResult' => array('file_id_1' => 'entity_object_here') - ), - 'one import with theme path' => array( - 'params' => $this->getLessFile( - array( - array( - 'filePath' => 'css\some_file.css', - 'viewParams' => array('themeModel' => $themeModelMockPath, 'area' => 'frontend') - ) - ) - ), - 'expectedResult' => array('file_id_1' => 'entity_object_here') - ), - 'list of imports' => array( - 'params' => $this->getLessFile( - array( - array( - 'filePath' => 'Magento_Core::folder\file.css', - 'viewParams' => array('theme' => 'theme_path', 'area' => 'backend') - ), - array( - 'filePath' => 'calendar\button.css', - 'viewParams' => array('theme' => 'theme_path', 'area' => 'backend', 'locale' => 'en_US') - ) - ) - ), - 'expectedResult' => array('file_id_1' => 'entity_object_here', 'file_id_2' => 'entity_object_here') - ) - ); - } - - /** - * @param array $filesData - * @return \Magento\Framework\Less\PreProcessor\File\Less|\PHPUnit_Framework_MockObject_MockObject - */ - protected function getLessFile($filesData) - { - $lessFiles = array(); - $fileCounter = 0; - $fileCounterCallback = $this->returnCallback( - function () use (&$fileCounter) { - return 'file_id_' . ++$fileCounter; - } - ); - foreach ($filesData as $fileData) { - $readDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\ReadInterface', - array(), - array(), - '', - false - ); - $readDirectory->expects( - $this->any() - )->method( - 'stat' - )->with( - 'file_path' - )->will( - $this->returnValue(isset($fileData['mtime']) ? $fileData['mtime'] : null) - ); - $lessFile = $this->getMock('Magento\Framework\Less\PreProcessor\File\Less', array(), array(), '', false); - $lessFile->expects($this->any())->method('getFilePath')->will($this->returnValue($fileData['filePath'])); - $lessFile->expects( - $this->any() - )->method( - 'getViewParams' - )->will( - $this->returnValue($fileData['viewParams']) - ); - $lessFile->expects($this->any())->method('getFileIdentifier')->will($fileCounterCallback); - $lessFile->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($readDirectory)); - $lessFiles[] = $lessFile; - } - return $lessFiles; - } - - /** - * @param \Magento\Framework\View\Publisher\CssFile $cssFile - * @param string $uniqueFileKey - * @param array $expected - * @dataProvider saveCacheDataProvider - */ - public function testSaveCache($cssFile, $uniqueFileKey, $expected) - { - $importEntitiesProperty = new \ReflectionProperty($this->cache, 'importEntities'); - $importEntitiesProperty->setAccessible(true); - $this->assertEquals(array(), $importEntitiesProperty->getValue($this->cache)); - $importEntitiesProperty->setValue($this->cache, $expected['imports']); - - $this->storageMock->expects( - $this->once() - )->method( - 'save' - )->with( - $this->equalTo($uniqueFileKey), - $this->equalTo(serialize($expected)) - )->will( - $this->returnSelf() - ); - $this->assertEquals($this->cache, $this->cache->save($cssFile)); - } - - /** - * @return array - */ - public function saveCacheDataProvider() - { - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $arguments = $objectManager->getConstructArguments( - 'Magento\Framework\View\Publisher\CssFile', - array('viewParams' => array('area' => 'frontend')) - ); - - $cssFile = $objectManager->getObject('Magento\Framework\View\Publisher\CssFile', $arguments); - - return array( - array( - $cssFile, - 'Magento_Core::style.css|frontend|en_US|some_theme', - array('cached_file' => $cssFile, 'imports' => array('import1', 'import2', 'import3')) - ) - ); - } - - /** - * @param array $filesData - * @param int $baseTime - * @param bool $expected - * @dataProvider isValidDataProvider - */ - public function testIsValid($filesData, $baseTime, $expected) - { - $factoryCallback = $this->returnCallback( - function ($lessFile) { - /** @var $lessFile \Magento\Framework\Less\PreProcessor\File\Less */ - $importEntity = $this->getMock( - 'Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity', - array(), - array(), - '', - false - ); - $changeTime = $lessFile->getDirectoryRead()->stat('file_path'); - $importEntity->expects( - $this->atLeastOnce() - )->method( - 'getOriginalMtime' - )->will( - $this->returnValue($changeTime) - ); - return $importEntity; - } - ); - $this->importEntityFactoryMock->expects($this->any())->method('create')->will($factoryCallback); - $files = $this->getLessFile($filesData); - foreach ($files as $file) { - $this->cache->add($file); - } - $this->rootDirectory->expects( - $this->any() - )->method( - 'stat' - )->will( - $this->returnValue(array('mtime' => $baseTime)) - ); - $this->assertEquals($expected, $this->cache->isValid()); - } - - /** - * @return array - */ - public function isValidDataProvider() - { - return array( - array( - 'filesData' => array( - array( - 'filePath' => 'Magento_Core::folder\file.css', - 'viewParams' => array('theme' => 'theme_path', 'area' => 'backend'), - 'mtime' => 12345 - ), - array( - 'filePath' => 'calendar\button.css', - 'viewParams' => array('theme' => 'theme_path', 'area' => 'backend', 'locale' => 'en_US'), - 'mtime' => 12345 - ) - ), - 'baseTime' => 12345, - 'expected' => true - ), - array( - 'filesData' => array( - array( - 'filePath' => 'Magento_Core::folder\file.css', - 'viewParams' => array('theme' => 'theme_path', 'area' => 'backend'), - 'mtime' => 12345 - ) - ), - 'baseTime' => 54321, - 'expected' => false - ), - array('filesData' => array(), 'baseTime' => 12345, 'expected' => false) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityTest.php deleted file mode 100644 index 88e399f7f70be91613d1b2bdea9a5be16633f7ec..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityTest.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class ImportEntityTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity */ - protected $importEntity; - - /** - * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $rootDirectory; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $filesystemMock; - - /** @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $fileSystemMock; - - /** - * @var string - */ - protected $absolutePath; - - /** - * @var string - */ - protected $absoluteFilePath; - - /** - * @param string $relativePath - * @param int $originalMtime - */ - protected function createMock($relativePath, $originalMtime) - { - $filePath = 'someFile'; - $this->absoluteFilePath = 'some_absolute_path'; - - $this->rootDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\ReadInterface', - array(), - array(), - '', - false - ); - $this->rootDirectory->expects( - $this->once() - )->method( - 'getRelativePath' - )->with( - $this->equalTo($this->absoluteFilePath) - )->will( - $this->returnValue($relativePath) - ); - - $this->rootDirectory->expects( - $this->atLeastOnce() - )->method( - 'stat' - )->with( - $this->equalTo($relativePath) - )->will( - $this->returnValue(array('mtime' => $originalMtime)) - ); - - $this->objectManagerHelper = new ObjectManagerHelper($this); - - $lessFile = $this->getMock('Magento\Framework\Less\PreProcessor\File\Less', array(), array(), '', false); - $lessFile->expects($this->any())->method('getFilePath')->will($this->returnValue($filePath)); - $lessFile->expects($this->any())->method('getSourcePath')->will($this->returnValue($this->absoluteFilePath)); - $lessFile->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($this->rootDirectory)); - - /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity importEntity */ - $this->importEntity = $this->objectManagerHelper->getObject( - 'Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity', - array('lessFile' => $lessFile) - ); - } - - public function testGetOriginalFile() - { - $mtime = rand(); - $relativePath = '/some/relative/path/to/file.less'; - $this->createMock($relativePath, $mtime); - $this->assertEquals($relativePath, $this->importEntity->getOriginalFile()); - } - - public function testGetOriginalMtime() - { - $mtime = rand(); - $relativePath = '/some/relative/path/to/file2.less'; - $this->createMock($relativePath, $mtime); - $this->assertEquals($mtime, $this->importEntity->getOriginalMtime()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/Map/StorageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/Map/StorageTest.php deleted file mode 100644 index 93b5018759ca1f1448ab04236a30a206e29a341a..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/Map/StorageTest.php +++ /dev/null @@ -1,205 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import\Map; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class StorageTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage */ - protected $storage; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $filesystemMock; - - /** @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $mapsDirectoryMock; - - protected function setUp() - { - $this->mapsDirectoryMock = $this->getMock( - 'Magento\Framework\Filesystem\Directory\WriteInterface', - array(), - array(), - '', - false - ); - $this->mapsDirectoryMock->expects( - $this->once() - )->method( - 'isDirectory' - )->with( - $this->equalTo(\Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) - )->will( - $this->returnValue(false) - ); - $this->mapsDirectoryMock->expects( - $this->once() - )->method( - 'create' - )->with( - $this->equalTo(\Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) - )->will( - $this->returnSelf() - ); - - - $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->filesystemMock->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::VAR_DIR) - )->will( - $this->returnValue($this->mapsDirectoryMock) - ); - - $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->storage = $this->objectManagerHelper->getObject( - 'Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage', - array('filesystem' => $this->filesystemMock) - ); - } - - /** - * @param string $key - * @param bool $isFile - * @param string $mapFileName - * @param bool|string $expected - * @dataProvider loadDataProvider - */ - public function testLoad($key, $isFile, $mapFileName, $expected) - { - $this->mapsDirectoryMock->expects( - $this->once() - )->method( - 'isFile' - )->with( - $this->equalTo($mapFileName) - )->will( - $this->returnValue($isFile) - ); - if ($isFile) { - $this->mapsDirectoryMock->expects( - $this->once() - )->method( - 'readFile' - )->with( - $this->equalTo($mapFileName) - )->will( - $this->returnValue($expected) - ); - } - $this->assertEquals($expected, $this->storage->load($key)); - } - - /** - * @return array - */ - public function loadDataProvider() - { - return array( - array('some_key', false, 'maps/less/3d70412c7e9ea2d96fa23d4f1f1f0a1c.ser', false), - array('some_other_key', true, 'maps/less/26df19b852b11fb4b4b845134d13f6fa.ser', 'file_found') - ); - } - - /** - * @param string $key - * @param string $mapFileName - * @param array $data - * @dataProvider saveDataProvider - */ - public function testSave($key, $mapFileName, $data) - { - $this->mapsDirectoryMock->expects( - $this->once() - )->method( - 'writeFile' - )->with( - $this->equalTo($mapFileName), - $this->equalTo($data) - )->will( - $this->returnSelf() - ); - $this->assertEquals($this->storage, $this->storage->save($key, $data)); - } - - /** - * @return array - */ - public function saveDataProvider() - { - return array( - array('some-key-to-save', 'maps/less/96760c434adbc683b503ca866784a17e.ser', array('data1', 'data2')) - ); - } - - /** - * @param string $key - * @param string $mapFileName - * @dataProvider deleteDataProvider - */ - public function testDelete($key, $mapFileName) - { - $this->mapsDirectoryMock->expects( - $this->once() - )->method( - 'writeFile' - )->with( - $this->equalTo($mapFileName), - $this->equalTo('') - )->will( - $this->returnSelf() - ); - $this->assertEquals($this->storage, $this->storage->delete($key)); - } - - /** - * @return array - */ - public function deleteDataProvider() - { - return array(array('some-key-to-delete', 'maps/less/bf8aef83aab96deb7dbd66579b389794.ser')); - } - - public function testClearMaps() - { - $this->mapsDirectoryMock->expects( - $this->once() - )->method( - 'delete' - )->with( - $this->equalTo(\Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) - )->will( - $this->returnSelf() - ); - - $this->assertEquals($this->storage, $this->storage->clearMaps()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Plugin/LessTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Plugin/LessTest.php deleted file mode 100644 index add592d7fe96cf94490125bd98cab140e3e821df..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Plugin/LessTest.php +++ /dev/null @@ -1,232 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Plugin; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class LessTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\Css\PreProcessor\Cache\Plugin\Less - */ - protected $plugin; - - /** - * @var ObjectManagerHelper - */ - protected $objectManagerHelper; - - /** - * @var \Magento\Framework\Css\PreProcessor\Cache\CacheManager - */ - protected $cacheManagerMock; - - /** - * @var \Magento\Framework\Logger - */ - protected $loggerMock; - - protected function setUp() - { - $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->cacheManagerMock = $this->getMock( - 'Magento\Framework\Css\PreProcessor\Cache\CacheManager', - array(), - array(), - '', - false - ); - $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); - $this->plugin = $this->objectManagerHelper->getObject( - 'Magento\Framework\Css\PreProcessor\Cache\Plugin\Less', - array('cacheManager' => $this->cacheManagerMock, 'logger' => $this->loggerMock) - ); - } - - /** - * @param \Closure $proceed - * @param $publisherFile - * @param $targetDirectory - * @param $cacheManagerData - * - * @dataProvider aroundProcessDataProvider - */ - public function testAroundProcess(\Closure $proceed, $publisherFile, $targetDirectory, $cacheManagerData) - { - if (!empty($cacheManagerData)) { - foreach ($cacheManagerData as $method => $info) { - if ($method === 'getCachedFile') { - $this->cacheManagerMock->expects( - $this->once() - )->method( - $method - )->will( - $this->returnValue($info['result']) - ); - } else { - $this->cacheManagerMock->expects( - $this->once() - )->method( - $method - )->will( - $this->returnValue($info['result']) - ); - } - } - } - $this->assertInstanceOf( - 'Magento\Framework\View\Publisher\CssFile', - $this->plugin->aroundProcess( - $this->getMock('\Magento\Framework\Css\PreProcessor\Less', array(), array(), '', false), - $proceed, - $publisherFile, - $targetDirectory - ) - ); - } - - /** - * @return array - */ - public function aroundProcessDataProvider() - { - $dir = 'targetDirectory'; - /** - * Prepare first item - */ - $cssFileFirst = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $cssFileFirst->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); - - $expectedFirst = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $cssFileFirst->expects($this->once())->method('buildUniquePath')->will($this->returnValue('expectedFirst')); - - $invChainFirst = function ( - \Magento\Framework\View\Publisher\CssFile $subject, - $directory - ) use ( - $cssFileFirst, - $dir, - $expectedFirst - ) { - $this->assertEquals($subject, $cssFileFirst); - $this->assertEquals($directory, $dir); - return $expectedFirst; - }; - - /** - * Prepare second item - */ - $cssFileSecond = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $cssFileSecond->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); - - $invChainSecond = function () { - $this->fail('Incorrect call of procced method'); - }; - - /** - * Prepare third item - */ - $cssFileThird = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $cssFileThird->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); - - $expectedThird = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - - $invChainThird = function ( - \Magento\Framework\View\Publisher\CssFile $subject, - $directory - ) use ( - $cssFileThird, - $dir, - $expectedThird - ) { - $this->assertEquals($subject, $cssFileThird); - $this->assertEquals($directory, $dir); - return $expectedThird; - }; - - return array( - 'source path already exist' => array( - 'procced' => $invChainFirst, - 'publisherFile' => $cssFileFirst, - 'targetDirectory' => $dir, - 'cacheManagerData' => array(), - 'expected' => $expectedFirst - ), - 'cached value exists' => array( - 'procced' => $invChainSecond, - 'publisherFile' => $cssFileSecond, - 'targetDirectory' => $dir, - 'cacheManagerData' => array('getCachedFile' => array('result' => $cssFileSecond)), - 'expected' => 'cached-value' - ), - 'cached value does not exist' => array( - 'procced' => $invChainThird, - 'publisherFile' => $cssFileThird, - 'targetDirectory' => $dir, - 'cacheManagerData' => array( - 'getCachedFile' => array('result' => null), - 'saveCache' => array('result' => 'self') - ), - 'expected' => $expectedThird - ) - ); - } - - public function testAroundProcessException() - { - $dir = 'targetDirectory'; - $cssFile = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $cssFile->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); - - $this->cacheManagerMock->expects($this->once())->method('getCachedFile')->will($this->returnValue(null)); - - $exception = new \Magento\Framework\Filesystem\FilesystemException('Test Message'); - $proceed = function ( - \Magento\Framework\View\Publisher\CssFile $subject, $directory - ) use ($cssFile, $dir, $exception) { - $this->assertEquals($subject, $cssFile); - $this->assertEquals($directory, $dir); - throw $exception; - }; - - $this->loggerMock->expects( - $this->once() - )->method( - 'logException' - )->with( - $this->equalTo($exception) - )->will( - $this->returnSelf() - ); - - $this->assertNull( - $this->plugin->aroundProcess( - $this->getMock('\Magento\Framework\Css\PreProcessor\Less', array(), array(), '', false), - $proceed, - $cssFile, - $dir - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/CompositeTest.php deleted file mode 100644 index 77981ca4d817e4ef2a694b3c44fd42efdb5c7ed5..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/CompositeTest.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class CompositeTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\Css\PreProcessor\Composite */ - protected $composite; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\View\Asset\PreProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ - protected $preProcessorFactoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject[] - */ - protected $callMap = array(); - - protected function setUp() - { - $this->preProcessorFactoryMock = $this->getMock( - 'Magento\Framework\View\Asset\PreProcessorFactory', - array(), - array(), - '', - false - ); - $this->objectManagerHelper = new ObjectManagerHelper($this); - } - - /** - * @param array $preProcessors - * @param array $createMap - * @dataProvider processDataProvider - */ - public function testProcess($preProcessors, $createMap) - { - $publisherFile = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $targetDir = $this->getMock( - 'Magento\Framework\Filesystem\Directory\WriteInterface', - array(), - array(), - '', - false - ); - - foreach ($createMap as $className) { - $this->callMap[$className] = $this->getMock($className, array(), array(), '', false); - $this->callMap[$className]->expects( - $this->once() - )->method( - 'process' - )->with( - $this->equalTo($publisherFile), - $this->equalTo($targetDir) - )->will( - $this->returnValue($publisherFile) - ); - } - - $this->preProcessorFactoryMock->expects( - $this->any() - )->method( - 'create' - )->will( - $this->returnCallback(array($this, 'createProcessor')) - ); - - $this->composite = $this->objectManagerHelper->getObject( - 'Magento\Framework\Css\PreProcessor\Composite', - array('preProcessorFactory' => $this->preProcessorFactoryMock, 'preProcessors' => $preProcessors) - ); - - $this->assertEquals($publisherFile, $this->composite->process($publisherFile, $targetDir)); - } - - /** - * Create pre-processor callback - * - * @param string $className - * @return \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface[] - */ - public function createProcessor($className) - { - return $this->callMap[$className]; - } - - /** - * @return array - */ - public function processDataProvider() - { - return array( - 'one processor - LESS' => array( - 'preProcessors' => array('css_source_processor' => 'Magento\Framework\Css\PreProcessor\Less'), - 'createMap' => array('Magento\Framework\Css\PreProcessor\Less') - ), - 'list of pre-processors' => array( - 'preProcessors' => array( - 'css_source_processor' => 'Magento\Framework\Css\PreProcessor\Less', - 'css_url_processor' => 'Magento\Framework\Css\PreProcessor\UrlResolver' - ), - 'createMap' => array( - 'Magento\Framework\Css\PreProcessor\Less', - 'Magento\Framework\Css\PreProcessor\UrlResolver' - ) - ), - 'no processors' => array('preProcessors' => array(), 'createMap' => array()) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/LessTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/LessTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ec81d3b4574968000094ba457699cbf204760e78 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/LessTest.php @@ -0,0 +1,74 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\Css\PreProcessor; + +class LessTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Less\FileGenerator|\PHPUnit_Framework_MockObject_MockObject + */ + private $fileGenerator; + + /** + * @var \Magento\Framework\Css\PreProcessor\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $adapter; + + /** + * @var \Magento\Framework\View\Asset\PreProcessor\Chain + */ + private $chain; + + /** + * @var \Magento\Framework\Css\PreProcessor\Less + */ + private $object; + + protected function setUp() + { + $this->fileGenerator = $this->getMock('\Magento\Framework\Less\FileGenerator', array(), array(), '', false); + $this->adapter = $this->getMockForAbstractClass('\Magento\Framework\Css\PreProcessor\AdapterInterface'); + $asset = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); + $asset->expects($this->once())->method('getContentType')->will($this->returnValue('origType')); + $this->chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($asset, 'original content', 'origType'); + $this->object = new \Magento\Framework\Css\PreProcessor\Less($this->fileGenerator, $this->adapter); + } + + public function testProcess() + { + $expectedContent = 'updated content'; + $tmpFile = 'tmp/file.ext'; + $this->fileGenerator->expects($this->once()) + ->method('generateLessFileTree') + ->with($this->chain) + ->will($this->returnValue($tmpFile)); + $this->adapter->expects($this->once()) + ->method('process') + ->with($tmpFile) + ->will($this->returnValue($expectedContent)); + $this->object->process($this->chain); + $this->assertEquals($expectedContent, $this->chain->getContent()); + $this->assertEquals('css', $this->chain->getContentType()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php index 880c4e2ff999bce0cc06d62fba7c8656f9876e59..fd8544aaec17c49b1fe1f3f9e168f4496095dc75 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php @@ -484,4 +484,49 @@ class MysqlTest extends \PHPUnit_Framework_TestCase $result[3] ); } + + /** + * @param array $options + * @param string $expectedQuery + * + * @dataProvider addColumnDataProvider + * @covers \Magento\Framework\DB\Adapter\Pdo\Mysql::addColumn + * @covers \Magento\Framework\DB\Adapter\Pdo\Mysql::_getColumnDefinition + */ + public function testAddColumn($options, $expectedQuery) + { + $adapter = $this->getMock( + '\Magento\Framework\DB\Adapter\Pdo\Mysql', + array('tableColumnExists', '_getTableName', 'rawQuery', 'resetDdlCache', 'quote'), array(), '', false + ); + + $adapter->expects($this->any())->method('_getTableName')->will($this->returnArgument(0)); + $adapter->expects($this->any())->method('quote')->will($this->returnArgument(0)); + $adapter->expects($this->once())->method('rawQuery')->with($expectedQuery); + $adapter->addColumn('tableName', 'columnName', $options); + } + + /** + * @return array + */ + public function addColumnDataProvider() + { + return array( + array( + 'columnData' => array( + 'TYPE' => 'integer', + 'IDENTITY' => true, + 'UNSIGNED' => true, + 'NULLABLE' => false, + 'DEFAULT' => null, + 'COLUMN_NAME' => 'Some field', + 'COMMENT' => 'Some field', + 'AFTER' => 'Previous field' + ), + 'expectedQuery' => + 'ALTER TABLE `tableName` ADD COLUMN `columnName` int UNSIGNED ' + . 'NOT NULL default auto_increment COMMENT Some field AFTER `Previous field` ', + ) + ); + } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_schema.xsd b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_schema.xsd index f2c595ca5f6e498f01ce9768037547e80490b0ab..9259015650bbeedcf4c9e7f94007c41298284924 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_schema.xsd +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_schema.xsd @@ -27,6 +27,6 @@ */ --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:include schemaLocation="../../../../../../../../../lib/Magento/Framework/Data/etc/argument/types.xsd"/> + <xs:include schemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Data/etc/argument/types.xsd"/> <xs:element name="arguments" type="argumentsType"/> </xs:schema> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/CollectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..109c8ea0edd93f6512beb0eb85de8ec2d4b01861 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/CollectionTest.php @@ -0,0 +1,130 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Event + * @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) + */ + +namespace Magento\Framework\Event; + +use Magento\Framework\Event; + +/** + * Class CollectionTest + * + * @package Magento\Framework\Event + */ +class CollectionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Event\Collection + */ + protected $collection; + + /* + * Array of events in the collection + * + * @var array + */ + protected $events; + + /** + * @var \Magento\Framework\Event\Observer\Collection|\PHPUnit_Framework_MockObject_MockObject + */ + protected $observers; + + public function setUp() + { + $this->events = [ + 'eventName1' => 'someEvent1', + 'eventName2' => 'someEvent2', + 'eventName3' => 'some_event_3' + ]; + $this->observers = new \Magento\Framework\Event\Observer\Collection(); + $this->collection = new Collection($this->events, $this->observers); + } + + public function testGetAllEvents() + { + $this->assertEquals($this->events, $this->collection->getAllEvents()); + } + + public function testGetGlobalObservers() + { + $this->assertEquals($this->observers, $this->collection->getGlobalObservers()); + } + + public function testGetEventByName() + { + $eventName = 'eventName1'; + $this->assertEquals($this->events[$eventName], $this->collection->getEventByName($eventName)); + } + + public function testGetEventByNameNotSet() + { + $eventName = 'eventName'; + $eventMock = $this->getMock('\Magento\Framework\Event', ['getName'], [], '', false, false); + $eventMock->setData('name', $eventName); + $eventObj = $this->collection->getEventByName($eventName); + $this->assertEquals($eventMock->getData('name'), $eventObj->getName()); + } + + public function testAddEvent() + { + $eventName = 'eventName'; + $eventMock = $this->getMock('\Magento\Framework\Event', ['getName'], [], '', false, false); + $eventMock->expects($this->once()) + ->method('getName') + ->will($this->returnValue($eventName)); + $this->collection->addEvent($eventMock); + } + + public function testAddObserver() + { + $testEvent = 'testEvent'; + $observer = new \Magento\Framework\Event\Observer; + $observer->setData('event_name', $testEvent); + + $eventName = 'eventName'; + $eventMock = $this->getMock('\Magento\Framework\Event', ['getName'], [], '', false, false); + $eventMock->setData('name', $eventName); + + $this->collection->addObserver($observer); + $this->assertNotEmpty($this->collection->getEventByName($testEvent)->getObservers()); + } + + public function testAddObserverNoEventName() + { + $observer = new \Magento\Framework\Event\Observer; + $this->collection->addObserver($observer); + $this->assertNotEmpty($this->collection->getGlobalObservers()); + } + + public function testDispatch() + { + $data = ['someData']; + $eventName = 'eventName'; + $event = new \Magento\Framework\Event($data); + $event->setData('name', $eventName); + $this->collection->dispatch($eventName, $data); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/SchemaLocatorTest.php index 0eebc952ccffdc29c5d0b0fbbf562ec2fc362bca..2136bfc8c899c12143b0e77ae17b561ec1cda58c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/SchemaLocatorTest.php @@ -42,7 +42,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase public function testGetSchema() { - $expected = str_replace('\\', '/', BP . '/lib/Magento/Framework/Event/etc/events.xsd'); + $expected = str_replace('\\', '/', BP . '/lib/internal/Magento/Framework/Event/etc/events.xsd'); $actual = str_replace('\\', '/', $this->_model->getSchema()); $this->assertEquals($expected, $actual); } @@ -50,7 +50,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase public function testGetPerFileSchema() { $actual = str_replace('\\', '/', $this->_model->getPerFileSchema()); - $expected = str_replace('\\', '/', BP . '/lib/Magento/Framework/Event/etc/events.xsd'); + $expected = str_replace('\\', '/', BP . '/lib/internal/Magento/Framework/Event/etc/events.xsd'); $this->assertEquals($expected, $actual); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/XsdTest.php index 4550264b9593a14bc0fbcfebcd0e6f369e727653..b6ba8fd54be07d83f440103afdd9e7b4ed992878 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/XsdTest.php @@ -38,7 +38,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_xsdSchema = BP . '/lib/Magento/Framework/Event/etc/events.xsd'; + $this->_xsdSchema = BP . '/lib/internal/Magento/Framework/Event/etc/events.xsd'; $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.xml index 54462574c4da8ab87ce9acd860a061b8b74a7932..713b7b89b096a18ca233f16e50e05a07ef9a42e1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="event_1"> <observer name="observer_1" instance="instance_1" method="method_name_1" /> <observer name="observer_5" instance="instance_5" method="method_name_5" disabled="false" shared="true" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_invalid_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_invalid_config.xml index 2409e1fc934787c48d9fe584b447f85c953a4612..660379c49582ba86b0ede9d77538364c59891dfe 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_invalid_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_invalid_config.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="event_1"> <observer instance="instance_1" method="method_name_1" /> </event> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/valid_events.xml b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/valid_events.xml index a5a5b64139bac58bea4d6a8b780da13cdbd10498..b5f4d134f8bbbd8f542f97a44f0ebec2b0e85f2b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/valid_events.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/valid_events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> <event name="admin_roles_load_after"> <observer name="observer_name" instance="Some_Test_Value" method="addDataAfterRoleLoad" disabled="false" shared="true"/> </event> diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntity.php b/dev/tests/unit/testsuite/Magento/Framework/Event/ConfigTest.php similarity index 50% rename from lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntity.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/ConfigTest.php index cf36e278718060e7ceecf2854b47af7bc1e10e36..55b2bb11e274ac6c2ffbefa3c27ecf0b3346ba3c 100644 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntity.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/ConfigTest.php @@ -21,47 +21,44 @@ * @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) */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import; -use Magento\Framework\Less\PreProcessor\File\Less; +namespace Magento\Framework\Event; + +use Magento\Framework\Event\Config\Data; /** - * Import entity + * Class ConfigTest + * + * @package Magento\Framework\Event */ -class ImportEntity implements ImportEntityInterface +class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var string + * @var Data|\PHPUnit_Framework_MockObject_MockObject */ - protected $originalFile; + protected $dataContainerMock; /** - * @var int + * @var Config */ - protected $originalMtime; + protected $config; - /** - * @param Less $lessFile - */ - public function __construct(Less $lessFile) + public function setUp() { - $this->originalFile = $lessFile->getDirectoryRead()->getRelativePath($lessFile->getSourcePath()); - $this->originalMtime = $lessFile->getDirectoryRead()->stat($this->originalFile)['mtime']; + $this->dataContainerMock = $this->getMock('Magento\Framework\Event\Config\Data', ['get'], [], '', false, false); + $this->config = new Config($this->dataContainerMock); } - /** - * {@inheritdoc} - */ - public function getOriginalFile() + public function testGetObservers() { - return $this->originalFile; - } + $eventName = 'some_event'; + $observers = ['observer1', 'observer3']; + $this->dataContainerMock->expects($this->once()) + ->method('get') + ->with($eventName, $this->equalTo(array())) + ->will($this->returnValue($observers)); - /** - * {@inheritdoc} - */ - public function getOriginalMtime() - { - return $this->originalMtime; + $result = $this->config->getObservers($eventName); + $this->assertEquals($observers, $result); } -} +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerTest.php index 4802fb90ce85515113424f95dbf3a9914d6b179e..f177181fa2ecaeb458ddaed3bcd70d3b076ca33f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerTest.php @@ -23,6 +23,11 @@ */ namespace Magento\Framework\Event; +/** + * Class ManagerTest + * + * @package Magento\Framework\Event + */ class ManagerTest extends \PHPUnit_Framework_TestCase { /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/ObserverFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/ObserverFactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..434cad2597807dd010bfe44446084b0a0e4aaacc --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/ObserverFactoryTest.php @@ -0,0 +1,84 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Event; + +/** + * Class ConfigTest + * + * @package Magento\Framework\Event + */ +class ObserverFactoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + */ + protected $objectManagerMock; + + /** + * @var ObserverFactory + */ + protected $observerFactory; + + public function setUp() + { + $this->objectManagerMock = $this->getMock( + 'Magento\Framework\ObjectManager\ObjectManager', + ['get', 'create'], + [], + '', + false, + false + ); + $this->observerFactory = new ObserverFactory($this->objectManagerMock); + } + + public function testGet() + { + $className = 'Magento\Class'; + $observerMock = $this->getMock('Magento\Observer', [], [], '', false, false); + $this->objectManagerMock->expects($this->once()) + ->method('get') + ->with($className) + ->will($this->returnValue($observerMock)); + + $result = $this->observerFactory->get($className); + $this->assertEquals($observerMock, $result); + } + + public function testCreate() + { + $className = 'Magento\Class'; + $observerMock = $this->getMock('Magento\Observer', [], [], '', false, false); + $arguments = ['arg1', 'arg2']; + + $this->objectManagerMock->expects($this->once()) + ->method('create') + ->with($className, $this->equalTo($arguments)) + ->will($this->returnValue($observerMock)); + + $result = $this->observerFactory->create($className, $arguments); + $this->assertEquals($observerMock, $result); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/ObserverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..857aa484fead2705c5e60f54cc46f4b96131f75e --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/ObserverTest.php @@ -0,0 +1,147 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Event; + +use Magento\Framework\Event; + +/** + * Class ConfigTest + * + * @package Magento\Framework\Event + */ +class ObserverTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Observer + */ + protected $observer; + + public function setUp() + { + $this->observer = new Observer(); + } + + public function testIsValidFor() + { + $eventName = 'eventName'; + $eventMock = $this->getMock('Magento\Framework\Event', ['getName']); + $eventMock->expects($this->once()) + ->method('getName') + ->will($this->returnValue($eventName)); + $this->observer->setData('event_name', $eventName); + $this->assertTrue($this->observer->isValidFor($eventMock)); + } + + public function testGetName() + { + $name = 'some_name'; + $this->observer->setData('name', $name); + $this->assertEquals($name, $this->observer->getName()); + } + + public function testSetName() + { + $name = 'some_name'; + $this->observer->setName($name); + $result = $this->observer->getData('name'); + $this->assertEquals($result, $this->observer->getName($name)); + } + + public function testGetEventName() + { + $name = 'eventName'; + $this->observer->setData('event_name', $name); + $this->assertEquals($name, $this->observer->getEventName()); + } + + public function testSetEventName() + { + $name = 'eventName'; + $this->observer->setEventName($name); + $result = $this->observer->getData('event_name'); + $this->assertEquals($result, $this->observer->getEventName($name)); + } + + public function testGetCallback() + { + $callback = 'callbackName'; + $this->observer->setData('callback', $callback); + $this->assertEquals($callback, $this->observer->getCallback()); + } + + public function testSetCallback() + { + $callback = 'callbackName'; + $this->observer->setCallback($callback); + $result = $this->observer->getData('callback'); + $this->assertEquals($result, $this->observer->getCallback($callback)); + } + + public function testGetEvent() + { + $event = 'someEvent'; + $this->observer->setData('event', $event); + $this->assertEquals($event, $this->observer->getEvent()); + } + + public function testSetEvent() + { + $event = 'someEvent'; + $this->observer->setEvent($event); + $result = $this->observer->getData('event'); + $this->assertEquals($result, $this->observer->getEvent($event)); + } + + public function testDispatch() + { + $eventName = 'eventName'; + $callbackName = 'testCallback'; + $callbackMock = [$this->getMock('stdClass', [$callbackName]), $callbackName]; + $callbackMock[0]->expects($this->once()) + ->method('testCallback') + ->will($this->returnValue(true)); + $eventMock = $this->getMock('Magento\Framework\Event', ['getName']); + $eventMock->expects($this->once()) + ->method('getName') + ->will($this->returnValue($eventName)); + $this->observer->setData('event_name', $eventName); + $this->observer->setData('callback', $callbackMock); + + $this->observer->dispatch($eventMock); + } + + public function testDispatchNotValidEvent() + { + $eventName = 'eventName'; + $notValidName = 'event_name_2'; + $eventMock = $this->getMock('Magento\Framework\Event', ['getName']); + $eventMock->expects($this->once()) + ->method('getName') + ->will($this->returnValue($eventName)); + $this->observer->setData('event_name', $notValidName); + + $this->observer->dispatch($eventMock); + } +} diff --git a/dev/tools/Magento/Tools/View/config/permitted.php b/dev/tests/unit/testsuite/Magento/Framework/Event/WrapperFactoryTest.php similarity index 50% rename from dev/tools/Magento/Tools/View/config/permitted.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/WrapperFactoryTest.php index 0c3e023951c5e7df166c0b7d9de63985f009236b..2149136608bf9e6d94da33f3c9b68c4c86d7d80a 100644 --- a/dev/tools/Magento/Tools/View/config/permitted.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/WrapperFactoryTest.php @@ -18,31 +18,36 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * + * @category Magento + * @package Magento_Event * @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) */ +namespace Magento\Framework\Event; + /** - * These are extensions of files that are permitted to be deployed to a public directory + * Class WrapperFactoryTest + * + * @package Magento\Framework\Event */ -return array( - 'js', - 'css', - 'gif', - 'png', - 'jpg', - 'jpeg', - 'svg', - 'ico', - 'swf', - 'html', - 'txt', - 'jbf', - 'htc', - 'LICENSE', - 'htm', - 'ttf', - 'eot', - 'woff', - 'less' -); +class WrapperFactoryTest extends \PHPUnit_Framework_TestCase +{ + public function testCreate() + { + $expectedInstance = 'Magento\Framework\Event\Observer'; + $objectManagerMock = $this->getMock('\Magento\Framework\ObjectManager', [], [], '', false, false); + + $wrapperFactory = new WrapperFactory($objectManagerMock); + $arguments = ['argument' => 'value', 'data' => 'data']; + $observerInstanceMock = $this->getMock($expectedInstance); + + $objectManagerMock->expects($this->once()) + ->method('create') + ->with($expectedInstance, $arguments) + ->will($this->returnValue($observerInstanceMock)); + + $this->assertInstanceOf($expectedInstance, $wrapperFactory->create($arguments)); + } + +} diff --git a/lib/Magento/Framework/View/Design/FileResolution/Strategy/LocaleInterface.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/AuthenticationExceptionTest.php similarity index 63% rename from lib/Magento/Framework/View/Design/FileResolution/Strategy/LocaleInterface.php rename to dev/tests/unit/testsuite/Magento/Framework/Exception/AuthenticationExceptionTest.php index b6da0af4c40082061143e71ab47de7eedee03f51..9dc1bb6f2c9345c604e85f0745792cb1fe7660ee 100644 --- a/lib/Magento/Framework/View/Design/FileResolution/Strategy/LocaleInterface.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/AuthenticationExceptionTest.php @@ -21,25 +21,22 @@ * @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) */ -namespace Magento\Framework\View\Design\FileResolution\Strategy; -use Magento\Framework\View\Design\ThemeInterface; +namespace Magento\Framework\Exception; /** - * Locale Interface + * Class AuthenticationExceptionTest * - * Interface for 'locale' file resolution strategy + * @package Magento\Framework\Exception */ -interface LocaleInterface +class AuthenticationExceptionTest extends \PHPUnit_Framework_TestCase { - /** - * Get locale file name (e.g. file with translations) - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $locale - * @param string $file - * @return string - */ - public function getLocaleFile($area, ThemeInterface $themeModel, $locale, $file); -} + public function testConstructor() + { + $authenticationException = new AuthenticationException( + AuthenticationException::AUTHENTICATION_ERROR, + ['consumer_id' => 1, 'resources' => 'record2'] + ); + $this->assertSame('An authentication error occurred.', $authenticationException->getMessage()); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/EmailNotConfirmedExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/EmailNotConfirmedExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ec01d07d247ec7da7d53cadfc3823014a61dbc30 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/EmailNotConfirmedExceptionTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Exception; + +/** + * Class EmailNotConfirmedExceptionTest + * + * @package Magento\Framework\Exception + */ +class EmailNotConfirmedExceptionTest extends \PHPUnit_Framework_TestCase +{ + public function testConstructor() + { + $emailNotConfirmedException = new EmailNotConfirmedException( + EmailNotConfirmedException::EMAIL_NOT_CONFIRMED, + ['consumer_id' => 1, 'resources' => 'record2'] + ); + $this->assertSame('Email not confirmed', $emailNotConfirmedException->getMessage()); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/InvalidEmailOrPasswordExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/InvalidEmailOrPasswordExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..97f2078fd0231a69f3fe5afcf5ab64505ce95c6d --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/InvalidEmailOrPasswordExceptionTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Exception; + +/** + * Class InvalidEmailOrPasswordExceptionTest + * + * @package Magento\Framework\Exception + */ +class InvalidEmailOrPasswordExceptionTest extends \PHPUnit_Framework_TestCase +{ + public function testConstructor() + { + $exception = new InvalidEmailOrPasswordException( + InvalidEmailOrPasswordException::INVALID_EMAIL_OR_PASSWORD, + ['consumer_id' => 1, 'resources' => 'record2'] + ); + $this->assertSame('Invalid email or password', $exception->getMessage()); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php index 30368d7cee800d9627f64c813f0e67f1f03dea5b..e709617d79ef688391f424a89fc874208b2668d8 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php @@ -23,6 +23,11 @@ */ namespace Magento\Framework\Exception; +/** + * Class LocalizedExceptionTest + * + * @package Magento\Framework\Exception + */ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase { /** @var \Magento\Framework\Phrase\RendererInterface */ @@ -91,4 +96,55 @@ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase ], ]; } + + public function testGetRawMessage() + { + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $cause = new \Exception(); + $localizeException = new LocalizedException( + $message, + $params, + $cause + ); + $this->assertEquals($message, $localizeException->getRawMessage()); + } + + public function testGetParameters() + { + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $cause = new \Exception(); + $localizeException = new LocalizedException( + $message, + $params, + $cause + ); + + $this->assertEquals($params, $localizeException->getParameters()); + } + + public function testGetLogMessage() + { + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $cause = new \Exception(); + + $localizeException = new LocalizedException( + $message, + $params, + $cause + ); + $expectedLogMessage = 'message parameter1 parameter2'; + $this->assertEquals($expectedLogMessage, $localizeException->getLogMessage()); + } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..39e6156daa4567eb12f4b9df6a2d54215178edc7 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php @@ -0,0 +1,143 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\Exception; + +/** + * Class NoSuchEntityExceptionTest + * + * @package Magento\Framework\Exception + */ +class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Framework\Phrase\RendererInterface */ + private $defaultRenderer; + + /** @var string */ + private $renderedMessage; + + /** + * @var \Magento\Framework\Phrase\Renderer\Placeholder|\PHPUnit_Framework_MockObject_MockObject + */ + protected $rendererMock; + + public function setUp() + { + $this->defaultRenderer = \Magento\Framework\Phrase::getRenderer(); + $this->rendererMock = $this->getMockBuilder('Magento\Framework\Phrase\Renderer\Placeholder') + ->setMethods(['render']) + ->disableOriginalConstructor() + ->getMock(); + } + + public function tearDown() + { + \Magento\Framework\Phrase::setRenderer($this->defaultRenderer); + } + + public function testConstructor() + { + $this->renderedMessage = 'rendered message'; + $this->rendererMock->expects($this->once()) + ->method('render') + ->will($this->returnValue($this->renderedMessage)); + \Magento\Framework\Phrase::setRenderer($this->rendererMock); + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $expectedLogMessage = 'message parameter1 parameter2'; + $cause = new \Exception(); + $localizeException = new NoSuchEntityException( + $message, + $params, + $cause + ); + + $this->assertEquals(0, $localizeException->getCode()); + + $this->assertEquals($message, $localizeException->getRawMessage()); + $this->assertEquals($this->renderedMessage, $localizeException->getMessage()); + $this->assertEquals($expectedLogMessage, $localizeException->getLogMessage()); + + $this->assertSame($cause, $localizeException->getPrevious()); + } + + /** + * @param $message + * @param $expectedMessage + * @dataProvider constantsDataProvider + */ + public function testConstants($message, $expectedMessage) + { + $this->renderedMessage = $message; + $this->rendererMock->expects($this->once()) + ->method('render') + ->will($this->returnValue($this->renderedMessage)); + \Magento\Framework\Phrase::setRenderer($this->rendererMock); + + $exception = new NoSuchEntityException( + $message, + ['consumer_id' => 1, 'resources' => 'record2'] + ); + $this->assertSame($expectedMessage, $exception->getMessage()); + } + + public function constantsDataProvider() + { + return [ + 'singleFields' => [ + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + 'No such entity with %fieldName = %fieldValue' + ], + 'doubleFields' => [ + NoSuchEntityException::MESSAGE_DOUBLE_FIELDS, + 'No such entity with %fieldName = %fieldValue, %field2Name = %field2Value' + ] + ]; + } + + public function testSingleField() + { + $fieldName = 'storeId'; + $fieldValue = 15; + $this->assertSame( + "No such entity with $fieldName = $fieldValue", + NoSuchEntityException::singleField($fieldName, $fieldValue)->getMessage() + ); + } + + public function testDoubleField() + { + $website = 'website'; + $websiteValue = 15; + $email = 'email'; + $emailValue = 'example@magento.com'; + NoSuchEntityException::doubleField($website, $websiteValue, $email, $emailValue); + $this->assertSame( + "No such entity with $website = $websiteValue, $email = $emailValue", + NoSuchEntityException::doubleField($website, $websiteValue, $email, $emailValue)->getMessage() + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/State/ExpiredExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/State/ExpiredExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a0b950d922e0e90a3108e2d849a74f2aeaeab1cd --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/State/ExpiredExceptionTest.php @@ -0,0 +1,47 @@ +<?php +/** + * Expired exception + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\Exception\State; + +/** + * Class ExpiredException + * + * @package Magento\Framework\Exception\State + */ +class ExpiredExceptionTest extends \PHPUnit_Framework_TestCase +{ + public function testConstructor() + { + $instanceClass = 'Magento\Framework\Exception\State\ExpiredException'; + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $cause = new \Exception(); + $stateException = new ExpiredException($message, $params, $cause); + $this->assertInstanceOf($instanceClass, $stateException); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/State/InputMismatchExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/State/InputMismatchExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fd741370111d8a094bbc4cab028b5641cac2046f --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/State/InputMismatchExceptionTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Input mismatch exception + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\Exception\State; + +class InputMismatchExceptionTest extends \PHPUnit_Framework_TestCase +{ + public function testConstructor() + { + $instanceClass = 'Magento\Framework\Exception\State\InputMismatchException'; + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $cause = new \Exception(); + $stateException = new InputMismatchException($message, $params, $cause); + $this->assertInstanceOf($instanceClass, $stateException); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/State/InvalidTransitionExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/State/InvalidTransitionExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7d4a1a8f0b4b69cd8bd792d8374f770fa0999a81 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/State/InvalidTransitionExceptionTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Invalid state exception + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\Exception\State; + +class InvalidTransitionExceptionTest extends \PHPUnit_Framework_TestCase +{ + public function testConstructor() + { + $instanceClass = 'Magento\Framework\Exception\State\InvalidTransitionException'; + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $cause = new \Exception(); + $stateException = new InvalidTransitionException($message, $params, $cause); + $this->assertInstanceOf($instanceClass, $stateException); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/StateExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/StateExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..33bb9021b57dc4e1cf97d6700e223fb60f4a4a88 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/StateExceptionTest.php @@ -0,0 +1,46 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Exception; + +/** + * Class StateExceptionTest + * + * @package Magento\Framework\Exception + */ +class StateExceptionTest extends \PHPUnit_Framework_TestCase +{ + public function testStateExceptionInstance() + { + $instanceClass = 'Magento\Framework\Exception\StateException'; + $message = 'message %1 %2'; + $params = [ + 'parameter1', + 'parameter2' + ]; + $cause = new \Exception(); + $stateException = new StateException($message, $params, $cause); + $this->assertInstanceOf($instanceClass, $stateException); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/DeployedFilesManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/File/MimeTest.php similarity index 50% rename from dev/tests/unit/testsuite/Magento/Framework/View/DeployedFilesManagerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/File/MimeTest.php index 54f4ccdfe18eb1fa8c3fc0dd8e22b821330cecc4..bff33af3c884a7b0ac721af50adcfbf43ae8069c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/DeployedFilesManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/File/MimeTest.php @@ -21,38 +21,50 @@ * @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) */ -namespace Magento\Framework\View; +namespace Magento\Framework\File; -class DeployedFilesManagerTest extends \PHPUnit_Framework_TestCase +class MimeTest extends \PHPUnit_Framework_TestCase { /** - * @param string $area - * @param string $themePath + * @var \Magento\Framework\File\Mime + */ + private $object; + + protected function setUp() + { + $this->object = new \Magento\Framework\File\Mime; + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage File 'nonexistent.file' doesn't exist + */ + public function testGetMimeTypeNonexistentFileException() + { + $file = 'nonexistent.file'; + $this->object->getMimeType($file); + } + + /** * @param string $file - * @param string $module - * @param string $expected - * @dataProvider buildDeployedFilePathDataProvider + * @param string $expectedType + * + * @dataProvider getMimeTypeDataProvider */ - public function testBuildDeployedFilePath($area, $themePath, $file, $module, $expected) + public function testGetMimeType($file, $expectedType) { - $actual = \Magento\Framework\View\DeployedFilesManager::buildDeployedFilePath( - $area, - $themePath, - $file, - $module, - $expected - ); - $this->assertEquals($expected, $actual); + $actualType = $this->object->getMimeType($file); + $this->assertSame($expectedType, $actualType); } /** * @return array */ - public static function buildDeployedFilePathDataProvider() + public function getMimeTypeDataProvider() { return array( - 'no module' => array('a', 't', 'f', null, 'a/t/f'), - 'with module' => array('a', 't', 'f', 'm', 'a/t/m/f') + 'javascript' => array(__DIR__ . '/_files/javascript.js', 'application/javascript'), + 'weird extension' => array(__DIR__ . '/_files/file.weird', 'application/octet-stream'), ); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/File/Transfer/Adapter/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/File/Transfer/Adapter/HttpTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d09e66c38e4d3a098e8af52b1b9e2cdc1996fffd --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/File/Transfer/Adapter/HttpTest.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\File\Transfer\Adapter; + +class HttpTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Controller\Response\Http|\PHPUnit_Framework_MockObject_MockObject + */ + private $response; + + /** + * @var Http|\PHPUnit_Framework_MockObject_MockObject + */ + private $object; + + /** + * @var \Magento\Framework\File\Mime|\PHPUnit_Framework_MockObject_MockObject + */ + private $mime; + + protected function setUp() + { + $this->response = $this->getMock('\Magento\Framework\Controller\Response\Http'); + $this->mime = $this->getMock('Magento\Framework\File\Mime'); + $this->object = new Http($this->response, $this->mime); + } + + public function testSend() + { + $file = __DIR__ . '/../../_files/javascript.js'; + $contentType = 'content/type'; + + $this->response->expects($this->at(0)) + ->method('setHeader') + ->with('Content-length', filesize($file)); + $this->response->expects($this->at(1)) + ->method('setHeader') + ->with('Content-Type', $contentType); + $this->response->expects($this->once()) + ->method('sendHeaders'); + $this->mime->expects($this->once()) + ->method('getMimeType') + ->with($file) + ->will($this->returnValue($contentType)); + $this->expectOutputString(file_get_contents($file)); + + $this->object->send($file); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Filename is not set + */ + public function testSendNoFileSpecifiedException() + { + $this->object->send(array()); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage File 'nonexistent.file' does not exists + */ + public function testSendNoFileExistException() + { + $this->object->send('nonexistent.file'); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/Some_Module/theme41_file.css b/dev/tests/unit/testsuite/Magento/Framework/File/_files/file.weird similarity index 100% rename from dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/Some_Module/theme41_file.css rename to dev/tests/unit/testsuite/Magento/Framework/File/_files/file.weird diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml b/dev/tests/unit/testsuite/Magento/Framework/File/_files/javascript.js similarity index 98% rename from dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml rename to dev/tests/unit/testsuite/Magento/Framework/File/_files/javascript.js index 3b9a16f3e4f141bd21d9a1ec08bcf94800f5bde8..cc53d0803ff2e741c3ece1e28c2a88e6a0713088 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml +++ b/dev/tests/unit/testsuite/Magento/Framework/File/_files/javascript.js @@ -1,4 +1,3 @@ -<?php /** * Magento * @@ -21,3 +20,4 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ +var test = 10; diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php index 61db15b422305000a6f662fd9294048fb782a9ec..a7c9b1efc03400d423250572224ac58ebb298812 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php @@ -31,7 +31,7 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase /** * Test for add directory and getConfig methods * - * @dataProvider providerConfig + * @dataProvider addDirectoryGetConfigDataProvider * @param string $root * @param array $directories * @param array $configs @@ -46,47 +46,44 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase } } - /** - * @expectedException \Magento\Framework\Filesystem\FilesystemException - */ - public function testAddDefinedDirectory() - { - $directories = array(AppFilesystem::PUB_LIB_DIR => array('path' => '')); - $directoryList = new DirectoryList(__DIR__, $directories); - $directoryList->addDirectory(AppFilesystem::PUB_LIB_DIR, array('path' => '')); - } - - /** - * Data provider for testAddDirectoryGetConfig - */ - public function providerConfig() + public function addDirectoryGetConfigDataProvider() { return array( - 'pub_lib' => array( + 'static_view' => array( __DIR__, - array('custom1_' . AppFilesystem::PUB_LIB_DIR => array('path' => 'pub/lib_basic')), + array(), array( - 'custom2_' . AppFilesystem::PUB_LIB_DIR => array( - 'path' => 'pub/lib', - 'uri' => 'pub/lib', + 'custom2_' . AppFilesystem::STATIC_VIEW_DIR => array( + 'path' => 'some/static', + 'uri' => 'some/static', 'permissions' => 0777, 'read_only' => true, 'allow_create_dirs' => true ) ), array( - 'custom2_' . AppFilesystem::PUB_LIB_DIR => array( - 'path' => str_replace('\\', '/', __DIR__ . '/pub/lib'), - 'uri' => 'pub/lib', + 'custom2_' . AppFilesystem::STATIC_VIEW_DIR => array( + 'path' => str_replace('\\', '/', __DIR__ . '/some/static'), + 'uri' => 'some/static', 'permissions' => 0777, 'read_only' => true, 'allow_create_dirs' => true ) - ) + ), ) ); } + /** + * @expectedException \Magento\Framework\Filesystem\FilesystemException + */ + public function testAddDefinedDirectory() + { + $directories = array(AppFilesystem::STATIC_VIEW_DIR => array('path' => '')); + $directoryList = new DirectoryList(__DIR__, $directories); + $directoryList->addDirectory(AppFilesystem::STATIC_VIEW_DIR, array('path' => '')); + } + /** * Test for creating DirectoryList with invalid URI * diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/File/FileList/CollatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/File/FileList/CollatorTest.php index 916312e46480494d0b1c0bd10d36a91cb1c0aff8..337d273b63c7fa9a3fd533b521f1e06f821c492a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Less/File/FileList/CollatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/File/FileList/CollatorTest.php @@ -31,17 +31,17 @@ class CollatorTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Framework\View\Layout\File[] + * @var \Magento\Framework\View\File[] */ protected $originFiles; /** - * @var \Magento\Framework\View\Layout\File + * @var \Magento\Framework\View\File */ protected $baseFile; /** - * @var \Magento\Framework\View\Layout\File + * @var \Magento\Framework\View\File */ protected $themeFile; @@ -62,7 +62,7 @@ class CollatorTest extends \PHPUnit_Framework_TestCase * @param string $filename * @param string $module * @param string|null $themeFullPath - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Layout\File + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\File */ protected function createLayoutFile($filename, $module, $themeFullPath = null) { @@ -71,7 +71,7 @@ class CollatorTest extends \PHPUnit_Framework_TestCase $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); $theme->expects($this->any())->method('getFullPath')->will($this->returnValue($themeFullPath)); } - return new \Magento\Framework\View\Layout\File($filename, $module, $theme); + return new \Magento\Framework\View\File($filename, $module, $theme); } public function testCollate() diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4bfb1ce61acc1ea55f866a4b856c1d32b6319ae1 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php @@ -0,0 +1,164 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Less; + +class FileGeneratorTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Less\PreProcessor\Instruction\Import|\PHPUnit_Framework_MockObject_MockObject + */ + private $import; + + /** + * @var \Magento\Framework\Less\PreProcessor\Instruction\MagentoImport|\PHPUnit_Framework_MockObject_MockObject + */ + private $magentoImport; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $tmpDirectory; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $rootDirectory; + + /** + * @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject + */ + private $assetRepo; + + /** + * @var \Magento\Framework\Less\FileGenerator + */ + private $object; + + protected function setUp() + { + $this->tmpDirectory = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface'); + $this->rootDirectory = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface'); + $this->rootDirectory->expects($this->any()) + ->method('getRelativePath') + ->will($this->returnArgument(0)); + $this->rootDirectory->expects($this->any()) + ->method('readFile') + ->will($this->returnCallback(function ($file) { + return "content of '$file'"; + })); + $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $filesystem->expects($this->once()) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::VAR_DIR) + ->will($this->returnValue($this->tmpDirectory)); + $this->assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false); + $this->magentoImport = $this->getMock( + '\Magento\Framework\Less\PreProcessor\Instruction\MagentoImport', array(), array(), '', false + ); + $this->import = $this->getMock( + '\Magento\Framework\Less\PreProcessor\Instruction\Import', array(), array(), '', false + ); + $this->object = new \Magento\Framework\Less\FileGenerator( + $filesystem, $this->assetRepo, $this->magentoImport, $this->import + ); + } + + public function testGenerateLessFileTree() + { + $originalContent = 'original content'; + $expectedContent = 'updated content'; + $expectedRelativePath = 'view_preprocessed/less/some/file.less'; + $expectedPath = '/var/view_preprocessed/less/some/file.less'; + + $asset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $asset->expects($this->once()) + ->method('getPath') + ->will($this->returnValue('some/file.css')); + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($asset, $originalContent, 'less'); + + $this->magentoImport->expects($this->once()) + ->method('process') + ->with($chain) + ; + $this->import->expects($this->once()) + ->method('process') + ->with($chain) + ; + + $relatedAssetOne = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $relatedAssetOne->expects($this->any()) + ->method('getPath') + ->will($this->returnValue('related/file_one.css')); + $relatedAssetOne->expects($this->any()) + ->method('getContent') + ->will($this->returnValue("content of 'related/file_one.css'")); + $relatedAssetTwo = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $relatedAssetTwo->expects($this->any()) + ->method('getPath') + ->will($this->returnValue('related/file_two.css')); + $relatedAssetTwo->expects($this->any()) + ->method('getContent') + ->will($this->returnValue("content of 'related/file_two.css'")); + $assetsMap = [ + ['related/file_one.css', $asset, $relatedAssetOne], + ['related/file_two.css', $asset, $relatedAssetTwo], + ]; + $this->assetRepo->expects($this->any()) + ->method('createRelated') + ->will($this->returnValueMap($assetsMap)); + + $relatedFilesOne = [['related/file_one.css', $asset]]; + $this->import->expects($this->at(1)) + ->method('getRelatedFiles') + ->will($this->returnValue($relatedFilesOne)); + $relatedFilesTwo = [['related/file_two.css', $asset]]; + $this->import->expects($this->at(3)) + ->method('getRelatedFiles') + ->will($this->returnValue($relatedFilesTwo)); + $this->import->expects($this->at(5)) + ->method('getRelatedFiles') + ->will($this->returnValue([])); + + $writeMap = [ + [$expectedRelativePath, $expectedContent], + ['related/file_one.css', "content of 'related/file_one.css'"], + ['related/file_two.css', "content of 'related/file_two.css'"], + ]; + $pathsMap = [ + [$expectedRelativePath, $expectedPath], + ['related/file_one.css', '/var/view_preprocessed/less/related/file_one.css'], + ['related/file_two.css', '/var/view_preprocessed/less/related/file_two.css'], + ]; + $this->tmpDirectory->expects($this->any()) + ->method('writeFile') + ->will($this->returnValueMap($writeMap)); + $this->tmpDirectory->expects($this->any()) + ->method('getAbsolutePath') + ->will($this->returnValueMap($pathsMap)); + + $actual = $this->object->generateLessFileTree($chain); + $this->assertSame($expectedPath, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php new file mode 100644 index 0000000000000000000000000000000000000000..be53920108c6fd6ad86e7b31e3f5951cb29b3345 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php @@ -0,0 +1,152 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Less\PreProcessor\Instruction; + +class ImportTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Asset\ModuleNotation\Resolver|\PHPUnit_Framework_MockObject_MockObject + */ + private $notationResolver; + + /** + * @var \Magento\Framework\View\Asset\File|\PHPUnit_Framework_MockObject_MockObject + */ + private $asset; + + /** + * @var \Magento\Framework\Less\PreProcessor\Instruction\Import + */ + private $object; + + protected function setUp() + { + $this->notationResolver = $this->getMock( + '\Magento\Framework\View\Asset\ModuleNotation\Resolver', [], [], '', false + ); + $this->asset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $this->asset->expects($this->any())->method('getContentType')->will($this->returnValue('css')); + $this->object = new \Magento\Framework\Less\PreProcessor\Instruction\Import($this->notationResolver); + } + + /** + * @param string $originalContent + * @param string $foundPath + * @param string $resolvedPath + * @param string $expectedContent + * + * @dataProvider processDataProvider + */ + public function testProcess($originalContent, $foundPath, $resolvedPath, $expectedContent) + { + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, $originalContent, 'css'); + $this->notationResolver->expects($this->once()) + ->method('convertModuleNotationToPath') + ->with($this->asset, $foundPath) + ->will($this->returnValue($resolvedPath)); + $this->object->process($chain); + $this->assertEquals($expectedContent, $chain->getContent()); + $this->assertEquals('css', $chain->getContentType()); + } + + /** + * @return array + */ + public function processDataProvider() + { + return [ + 'non-modular notation' => [ + '@import (type) "some/file.css" media;', + 'some/file.css', + 'some/file.css', + "@import (type) 'some/file.css' media;", + ], + 'modular, with extension' => [ + '@import (type) "Magento_Module::something.css" media;', + 'Magento_Module::something.css', + 'Magento_Module/something.css', + "@import (type) 'Magento_Module/something.css' media;", + ], + 'modular, no extension' => [ + '@import (type) "Magento_Module::something" media;', + 'Magento_Module::something.less', + 'Magento_Module/something.less', + "@import (type) 'Magento_Module/something.less' media;", + ], + 'no type' => [ + '@import "Magento_Module::something.css" media;', + 'Magento_Module::something.css', + 'Magento_Module/something.css', + "@import 'Magento_Module/something.css' media;", + ], + 'no media' => [ + '@import (type) "Magento_Module::something.css";', + 'Magento_Module::something.css', + 'Magento_Module/something.css', + "@import (type) 'Magento_Module/something.css';", + ], + ]; + } + + public function testProcessNoImport() + { + $originalContent = 'color: #000000;'; + $expectedContent = 'color: #000000;'; + + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, $originalContent, 'css'); + $this->notationResolver->expects($this->never()) + ->method('convertModuleNotationToPath'); + $this->object->process($chain); + $this->assertEquals($expectedContent, $chain->getContent()); + $this->assertEquals('css', $chain->getContentType()); + } + + /** + * @covers resetRelatedFiles + */ + public function testGetRelatedFiles() + { + $this->assertSame([], $this->object->getRelatedFiles()); + + $this->notationResolver->expects($this->once()) + ->method('convertModuleNotationToPath') + ->with($this->asset, 'Magento_Module::something.css') + ->will($this->returnValue('Magento_Module/something.css')); + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain( + $this->asset, + '@import (type) "Magento_Module::something.css" media;', + 'css' + ); + $this->object->process($chain); + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, 'color: #000000;', 'css'); + $this->object->process($chain); + + $expected = [['Magento_Module::something.css', $this->asset]]; + $this->assertSame($expected, $this->object->getRelatedFiles()); + + $this->object->resetRelatedFiles(); + $this->assertSame([], $this->object->getRelatedFiles()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/MagentoImportTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/MagentoImportTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7361d84815a7749525bcf2c99baca69a1c86514b --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/MagentoImportTest.php @@ -0,0 +1,185 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Less\PreProcessor\Instruction; + +class MagentoImportTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\DesignInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $design; + + /** + * @var \Magento\Framework\View\File\CollectorInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $fileSource; + + /** + * @var \Magento\Framework\Less\PreProcessor\ErrorHandlerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $errorHandler; + + /** + * @var \Magento\Framework\View\Asset\File|\PHPUnit_Framework_MockObject_MockObject + */ + private $asset; + + /** + * @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject + */ + private $assetRepo; + + /** + * @var \Magento\Framework\View\Design\Theme\Provider|\PHPUnit_Framework_MockObject_MockObject + */ + private $themeProvider; + + /** + * @var \Magento\Framework\Less\PreProcessor\Instruction\Import + */ + private $object; + + protected function setUp() + { + $this->design = $this->getMockForAbstractClass('\Magento\Framework\View\DesignInterface'); + $this->fileSource = $this->getMockForAbstractClass('\Magento\Framework\View\File\CollectorInterface'); + $this->errorHandler = $this->getMockForAbstractClass( + '\Magento\Framework\Less\PreProcessor\ErrorHandlerInterface' + ); + $this->asset = $this->getMock('\Magento\Framework\View\Asset\File', [], [], '', false); + $this->asset->expects($this->any())->method('getContentType')->will($this->returnValue('css')); + $this->assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', [], [], '', false); + $this->themeProvider = $this->getMock('\Magento\Framework\View\Design\Theme\Provider', [], [], '', false); + $this->object = new \Magento\Framework\Less\PreProcessor\Instruction\MagentoImport( + $this->design, + $this->fileSource, + $this->errorHandler, + $this->assetRepo, + $this->themeProvider + ); + } + + /** + * @param string $originalContent + * @param string $foundPath + * @param string $resolvedPath + * @param array $foundFiles + * @param string $expectedContent + * + * @dataProvider processDataProvider + */ + public function testProcess($originalContent, $foundPath, $resolvedPath, $foundFiles, $expectedContent) + { + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, $originalContent, 'css'); + $relatedAsset = $this->getMock('\Magento\Framework\View\Asset\File', [], [], '', false); + $relatedAsset->expects($this->once()) + ->method('getFilePath') + ->will($this->returnValue($resolvedPath)); + $context = $this->getMock('\Magento\Framework\View\Asset\File\FallbackContext', [], [], '', false); + $this->assetRepo->expects($this->once()) + ->method('createRelated') + ->with($foundPath, $this->asset) + ->will($this->returnValue($relatedAsset)); + $relatedAsset->expects($this->once())->method('getContext')->will($this->returnValue($context)); + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $this->themeProvider->expects($this->once())->method('getThemeModel')->will($this->returnValue($theme)); + $files = []; + foreach ($foundFiles as $file) { + $fileObject = $this->getMock('Magento\Framework\View\File', [], [], '', false); + $fileObject->expects($this->any()) + ->method('getModule') + ->will($this->returnValue($file['module'])); + $fileObject->expects($this->any()) + ->method('getFilename') + ->will($this->returnValue($file['filename'])); + $files[] = $fileObject; + } + $this->fileSource->expects($this->once()) + ->method('getFiles') + ->with($theme, $resolvedPath) + ->will($this->returnValue($files)); + $this->object->process($chain); + $this->assertEquals($expectedContent, $chain->getContent()); + $this->assertEquals('css', $chain->getContentType()); + } + + /** + * @return array + */ + public function processDataProvider() + { + return [ + 'non-modular notation' => [ + '//@magento_import "some/file.css";', + 'some/file.css', + 'some/file.css', + [ + ['module' => null, 'filename' => 'some/file.css'], + ['module' => null, 'filename' => 'theme/some/file.css'], + ], + "@import 'some/file.css';\n@import 'some/file.css';\n", + ], + 'modular' => [ + '//@magento_import "Magento_Module::some/file.css";', + 'Magento_Module::some/file.css', + 'some/file.css', + [ + ['module' => 'Magento_Module', 'filename' => 'some/file.css'], + ['module' => 'Magento_Two', 'filename' => 'some/file.css'], + ], + "@import 'Magento_Module::some/file.css';\n@import 'Magento_Two::some/file.css';\n", + ], + ]; + } + + public function testProcessNoImport() + { + $originalContent = 'color: #000000;'; + $expectedContent = 'color: #000000;'; + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->asset, $originalContent, 'css'); + $this->assetRepo->expects($this->never()) + ->method('createRelated'); + $this->object->process($chain); + $this->assertEquals($expectedContent, $chain->getContent()); + $this->assertEquals('css', $chain->getContentType()); + } + + public function testProcessException() + { + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain( + $this->asset, '//@magento_import "some/file.css";', 'css' + ); + $exception = new \LogicException('Error happened'); + $this->assetRepo->expects($this->once()) + ->method('createRelated') + ->will($this->throwException($exception)); + $this->errorHandler->expects($this->once()) + ->method('processException') + ->with($exception); + $this->object->process($chain); + $this->assertEquals('', $chain->getContent()); + $this->assertEquals('css', $chain->getContentType()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php b/dev/tests/unit/testsuite/Magento/Framework/LoggerTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Log/LoggerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/LoggerTest.php index aa2bd5471c30a9863df7216c40205d61934a2710..ec47ad479369015a045fc93d391d77b9667c09f8 100644 --- a/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/LoggerTest.php @@ -21,7 +21,7 @@ * @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) */ -namespace Magento\Log; +namespace Magento\Framework; use Magento\Framework\Filesystem\Directory\Write; @@ -55,12 +55,12 @@ class LoggerTest extends \PHPUnit_Framework_TestCase $this->_filesystemMock->expects( $this->any() )->method( - 'getDirectoryWrite' - )->with( - \Magento\Framework\App\Filesystem::LOG_DIR - )->will( - $this->returnValue($this->_directory) - ); + 'getDirectoryWrite' + )->with( + \Magento\Framework\App\Filesystem::LOG_DIR + )->will( + $this->returnValue($this->_directory) + ); $this->_directory->expects($this->any())->method('create')->will($this->returnValue(true)); $this->_directory->expects($this->any())->method('getAbsolutePath')->will( $this->returnCallback( @@ -161,12 +161,12 @@ class LoggerTest extends \PHPUnit_Framework_TestCase $model->expects( $this->at(1) )->method( - 'log' - )->with( - $message, - \Zend_Log::DEBUG, - \Magento\Framework\Logger::LOGGER_EXCEPTION - ); + 'log' + )->with( + $message, + \Zend_Log::DEBUG, + \Magento\Framework\Logger::LOGGER_EXCEPTION + ); $model->logDebug($message); $model->logDebug($message, \Magento\Framework\Logger::LOGGER_EXCEPTION); } @@ -180,12 +180,12 @@ class LoggerTest extends \PHPUnit_Framework_TestCase $model->expects( $this->at(0) )->method( - 'log' - )->with( - $expected, - \Zend_Log::ERR, - \Magento\Framework\Logger::LOGGER_EXCEPTION - ); + 'log' + )->with( + $expected, + \Zend_Log::ERR, + \Magento\Framework\Logger::LOGGER_EXCEPTION + ); $model->logException($exception); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/valid_module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/valid_module.xml index e85882661943b537d2e28787c4a1ed2e1dbee531..b0628d9abae7262e2b58db03676bda9e3f97b974 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/valid_module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/valid_module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <!-- commented text --> <module name="Module_One" version="1.0.0.0" active="true"> <depends> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml index f94d8e4a569de358deadfb339096c158b5247cc3..a3d326edefb74516808e491dc960453868ec9a7f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module_Four" version="1.0.0.0" active="true"> <sequence> <module name="Module_One" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml index b1fb42ab5656275b1b0e2c81c1ea84f5142ee22c..6c852b57fc7582b4ef8710ac453106114c686087 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module_One" version="1.0.0.0" active="true"> <depends> <choice> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml index edbce17fee9d5ab6e05fd9a67f0929af51e2874c..15ca36f67b58a83b4df2321c6487c67b4dd3157f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module_Three" version="1.0.0.0" active="true"> <sequence> <module name="Module_Four" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml index 365a0fe51d03aed303eb8357f78113db597f4e8c..b9feb6d62fa8184898ca26cd7c9b4bca04a1b09b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module_Two" version="1.0.0.0" active="true"> <sequence> <module name="Module_One" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml index 2b451757f4102f18a9f4b95b39726bbc39afe17d..6905561e865bef928c17c33223403cdc200a416d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Module/etc/module.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Module_One" active="true" /> <module name="Module_Two" active="false" /> </config> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/ManagerTest.php index 02a5f3035cbb5e88f4fb894b53083ffe191efa6e..2af2740373d5766fcb3a120b81e5affcba3e02c1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/ManagerTest.php @@ -53,8 +53,7 @@ class ManagerTest extends \PHPUnit_Framework_TestCase $this->_outputConfig, $this->_moduleList, array( - 'Module_DisabledOutputOne' => self::XML_PATH_OUTPUT_ENABLED, - 'Module_DisabledOutputTwo' => 'Magento\Framework\Module\ManagerTest::XML_PATH_OUTPUT_ENABLED' + 'Fixture_Module' => self::XML_PATH_OUTPUT_ENABLED, ) ); } @@ -144,10 +143,8 @@ class ManagerTest extends \PHPUnit_Framework_TestCase public function isOutputEnabledCustomConfigPathDataProvider() { return array( - 'path literal, output disabled' => array(false, 'Module_DisabledOutputOne', false), - 'path literal, output enabled' => array(true, 'Module_DisabledOutputOne', true), - 'path constant, output disabled' => array(false, 'Module_DisabledOutputTwo', false), - 'path constant, output enabled' => array(true, 'Module_DisabledOutputTwo', true) + 'path literal, output disabled' => array(false, 'Fixture_Module', false), + 'path literal, output enabled' => array(true, 'Fixture_Module', true), ); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php index 44dcef645fa12aeee5e87b5187f80c8512381bfa..8bd2585e948f9571aec314855ba2a9f13cea8fe2 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php @@ -17,7 +17,7 @@ * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. - * + * * @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) */ @@ -58,7 +58,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase )->method( 'getDir' )->with( - \Magento\Framework\App\Filesystem::LIB_DIR + \Magento\Framework\App\Filesystem::LIB_INTERNAL )->will( $this->returnValue('stub') ); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/XsdTest.php index 4c05df5ec8e6a917dd5a603fa7ed916909987287..f4b99c14642b849d6120fa641d35759a1b14c132 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/XsdTest.php @@ -38,7 +38,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_xsdSchema = BP . '/lib/Magento/Framework/Mview/etc/mview.xsd'; + $this->_xsdSchema = BP . '/lib/internal/Magento/Framework/Mview/etc/mview.xsd'; $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_one.xml index df6e750643afcf14c602b0fcfd9bcafdbe194128..555a9d5ad314afdf4e0718f85402896ec9ea860e 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_one.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_one.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/Mview/etc/mview.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Mview/etc/mview.xsd"> <view id="view_one" class="Ogogo\Class\One" group="default"> <subscriptions> <table name="some_entity" entity_column="entity_id" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_two.xml index e666684c46ec9ffbe7abca260c76a9cab45e3d98..9d1993df8bde07f4800ea80c0c4cc2741ec598a6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_two.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/Mview/etc/mview.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Mview/etc/mview.xsd"> <view id="view_one" class="Ogogo\Class\Two" group="default"> <subscriptions> <table name="some_entity" entity_column="entity_id" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_one.xml index ef6b2d860f8e31483ab9f98b85e195d8544cdf83..5f8d9d4a97c4d25798a29d99491499decf29dd7d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_one.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_one.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/Mview/etc/mview.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Mview/etc/mview.xsd"> <view id="view_one" class="Ogogo\Class\One" group="default"> <subscriptions> <table name="some_entity" entity_column="entity_id" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_three.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_three.xml index 6630c2b1130342ea66d9ecd3df6c7d83e7bf2257..d94c937584a29e0ad7a3eb9341758cc7dcdefd6a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_three.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_three.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/Mview/etc/mview.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Mview/etc/mview.xsd"> <view id="view_one" class="Ogogo\Class\Two" group="default"> <subscriptions> <table name="some_product_relation" entity_column="entity_id" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_two.xml index 18bcf367ac9bd7ab49ff24c039f352faddb09ed3..c597a7a9ac65be4c65b93b1d3d4714ead87b5a28 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_two.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/Mview/etc/mview.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Mview/etc/mview.xsd"> <view id="view_two" class="Ogogo\Class\Two" group="default"> <subscriptions> <table name="some_entity" entity_column="entity_id" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/valid_mview.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/valid_mview.xml index 9f0c8a07bb9e0ba35e0b6dc276e2c93ee06943a2..ae3c6c9225ced9db84a2a0fee89f89b4925c3870 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/valid_mview.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/valid_mview.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/Magento/Framework/Mview/etc/mview.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Mview/etc/mview.xsd"> <view id="view_one" class="Ogogo\Class\One" group="index"> <subscriptions> <table name="some_entity" entity_column="entity_id" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset.xml b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset.xml index 42a22fe8491063003234e99b0f705c879ffced79..9e4165b8139ff8572a4702c00fea051d1149b239 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd"> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_address"> <field name="company"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/simple_di_config.xml b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/simple_di_config.xml index 4d6a56f971cfac19f68e979d6d3bf74f575f5dfc..0b7ea68ae8f5aaa8482dd42a7218a1ae97be69a0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/simple_di_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/simple_di_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <!-- Comment within root node --> <preference for="Magento\Framework\Module\UpdaterInterface" type="Magento\Framework\Module\Updaterter" /> <preference for="Magento\Framework\App\RequestInterface" type="Magento\Framework\App\Request\Http\Proxy" /> diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/valid_config.xml b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/valid_config.xml index e24752eb95ebe5017224be648094577220d1a4f6..a2de786967be92bace34f349cd286ce8c38bfc05 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/valid_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/valid_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Some_For_Name" type="Some_Type_Name" /> <virtualType name="" type="" shared="true"> <arguments> diff --git a/dev/tests/unit/testsuite/Magento/Framework/RequireJs/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/RequireJs/ConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..92b49789943639969c39b83f551e5026bc0ffa22 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/RequireJs/ConfigTest.php @@ -0,0 +1,150 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\RequireJs; + +class ConfigTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\RequireJs\Config\File\Collector\Aggregated|\PHPUnit_Framework_MockObject_MockObject + */ + private $fileSource; + + /** + * @var \Magento\Framework\View\DesignInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $design; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $baseDir; + + /** + * @var \Magento\Framework\View\Asset\ContextInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $context; + + /** + * @var Config + */ + private $object; + + protected function setUp() + { + $this->fileSource = $this->getMock( + '\Magento\Framework\RequireJs\Config\File\Collector\Aggregated', array(), array(), '', false + ); + $this->design = $this->getMockForAbstractClass('\Magento\Framework\View\DesignInterface'); + $this->baseDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface'); + $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::ROOT_DIR) + ->will($this->returnValue($this->baseDir)); + $repo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false); + $this->context = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\ContextInterface'); + $repo->expects($this->once())->method('getStaticViewFileContext')->will($this->returnValue($this->context)); + $this->object = new \Magento\Framework\RequireJs\Config($this->fileSource, $this->design, $filesystem, $repo); + } + + public function testGetConfig() + { + $this->baseDir->expects($this->any()) + ->method('getRelativePath') + ->will($this->returnCallback(function ($path) { + return 'relative/' . $path; + })); + $this->baseDir->expects($this->any()) + ->method('readFile') + ->will($this->returnCallback(function ($file) { + return $file . ' content'; + })); + $fileOne = $this->getMock('\Magento\Framework\View\File', array(), array(), '', false); + $fileOne->expects($this->once()) + ->method('getFilename') + ->will($this->returnValue('file_one.js')); + $fileOne->expects($this->once()) + ->method('getModule') + ->will($this->returnValue('Module_One')); + $fileTwo = $this->getMock('\Magento\Framework\View\File', array(), array(), '', false); + $fileTwo->expects($this->once()) + ->method('getFilename') + ->will($this->returnValue('file_two.js')); + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $this->design->expects($this->once()) + ->method('getDesignTheme') + ->will($this->returnValue($theme)); + $this->fileSource->expects($this->once()) + ->method('getFiles') + ->with($theme, Config::CONFIG_FILE_NAME) + ->will($this->returnValue(array($fileOne, $fileTwo))); + + $expected = <<<expected +(function(require){ +relative/%s/paths-updater.js content + +(function() { +relative/file_one.js content +require.config(mageUpdateConfigPaths(config, 'Module_One')) +})(); +(function() { +relative/file_two.js content +require.config(mageUpdateConfigPaths(config, '')) +})(); + +})(require); +expected; + + $actual = $this->object->getConfig(); + $this->assertStringMatchesFormat($expected, $actual); + } + + public function testGetConfigFileRelativePath() + { + $this->context->expects($this->once())->method('getPath')->will($this->returnValue('path')); + $actual = $this->object->getConfigFileRelativePath(); + $this->assertSame('_requirejs/path/requirejs-config.js', $actual); + } + + public function testGetBaseConfig() + { + $this->context->expects($this->once())->method('getPath')->will($this->returnValue('area/theme/locale')); + $this->context->expects($this->once()) + ->method('getBaseUrl') + ->will($this->returnValue('http://base.url/')); + $expected = <<<expected +require.config({ + "baseUrl": "http://base.url/area/theme/locale", + "paths": { + "magento": "mage/requirejs/plugin/id-normalizer" + }, + "waitSeconds": 0 +}); + +expected; + $actual = $this->object->getBaseConfig(); + $this->assertSame($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php b/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php index 96989be488e6733823ce660f1a531284da04e9a2..cc5ddf0d7c0ea8e2bb727f526e4d9e14ed2e30cf 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php @@ -146,7 +146,8 @@ class TranslateTest extends \PHPUnit_Framework_TestCase // _loadThemeTranslation() $themeData = ['theme original' => 'theme translated']; - $this->_viewFileSystem->expects($this->once())->method('getFilename')->will($this->returnValue('/theme.csv')); + $this->_viewFileSystem->expects($this->once())->method('getLocaleFileName') + ->will($this->returnValue('/theme.csv')); $this->_csvParser->expects(new MethodInvokedAtIndex(1)) ->method('getDataPairs') ->with('/theme.csv') diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_class.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_class.xml index 778a82fcf24f15aa7c2a62a5121ba4eb0ef29f2b..5d25d8af12661d0255250a8e98127b167b5c1779 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_class.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_class.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_instance.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_instance.xml index 0a27ed024cd52a336034d78583cd8d8a4999ac46..b5d14d1ceb11b9a1a6b693933f482aa430d66e55 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_instance.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_instance.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_child_for_option.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_child_for_option.xml index 36223049b7cf57e62c9d2a25cf7d0cb746358727..b5c2be4cf2833f57bcfcf14435516eea0a16d6a4 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_child_for_option.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_child_for_option.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_constraint.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_constraint.xml index 48c913885513e76d6cd50a72925c40b4f2c3f068..56ceb69bb113b5e9c8dceb6e90bb55b657b16685 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_constraint.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_constraint.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity"> <rules> <rule name="test_rule"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_content_for_callback.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_content_for_callback.xml index 2cfc2365c0b6eee9a3837a3eaab67294cb4d21b3..f822ef70a74859ba77aeb9ab3db051f532f3d80f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_content_for_callback.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_content_for_callback.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_entity_callback.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_entity_callback.xml index 913fafe2f83d99ef789fc669cc900465338bf89b..90d1c5021920b4a0670e2e619ad3e4ffdd95de1a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_entity_callback.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_entity_callback.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method.xml index 2638c0fd55c8aa6546d55bd6af68b83c60a66be3..fcd78013395ebdb48a15cce5c59eecd8236e0313 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method_callback.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method_callback.xml index b877eb78a81ff9876422dc3966282d65902958ac..72fa6a1d05049ecaa98e0e9de9b0b713cf54db05 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method_callback.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_method_callback.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/multiple_callback_in_argument.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/multiple_callback_in_argument.xml index 107b986934027b400ae6c9fefd66dee1704ae574..381a2dbf6b3798c6d53ec2379eb2b229efb50f8b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/multiple_callback_in_argument.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/multiple_callback_in_argument.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="catalog_product"> <rules> <rule name="name_sku_and_price"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_class_for_constraint.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_class_for_constraint.xml index 63f9c5a0335f34ec421b883da27a1e00c9dc7ec8..54e8c25bd8d618e6f79a70ca269a03b9b09964f2 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_class_for_constraint.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_class_for_constraint.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity"> <rules> <rule name="test_rule_constraint"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_constraint.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_constraint.xml index a7775b198d2917cafa016a86bc2aeb6b66b48b70..4b5a7fe2446db63737eb9b565c45b8d7f0f6f295 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_constraint.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_constraint.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity"> <rules> <rule name="test_rule_a"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_entity.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_entity.xml index 04bf5f1b058de5206d125fcf393801e21e89e1fc..b5c391cd787cfb60b6811538784d15a457f4d232 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_entity.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_entity.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity> <rules> <rule name="test_rule_b"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_group.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_group.xml index dfbd99b9750187c0e67429946fe7ad65d0717d14..fc5e8425515a844b159aee620c137a8fb57b9fb9 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_group.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_group.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity"> <rules> <rule name="test_rule_entity"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_rule.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_rule.xml index 625ec2de27b6783294590f20d71e5e94d708e5bb..2f6eb8674497f9a55037e6cc50b9c9d74072fac5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_rule.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_name_for_rule.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity"> <rules> <!-- attribute name is required for rule element --> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_rule_for_reference.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_rule_for_reference.xml index 90a0d1c49c69ad3242489b3abdb8ffc02a9e5579..f41844ecee56370fb7f7b1be3b67620fad480337 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_rule_for_reference.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/no_rule_for_reference.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity"> <rules> <rule name="test_rule_sku_and_name"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/not_unique_use.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/not_unique_use.xml index 97eb66129aac3df094b4f60767ed9e3c8584f08c..dc1ef411c23f22b323ebd0c524210f8da94794df 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/not_unique_use.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/not_unique_use.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity"> <rules> <rule name="test_rule_sku"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/builder/validation.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/builder/validation.xml index f8899c2200ca21f97218b066f070dea99cda0a22..4a68cd539c27ee66a27d89b0c054d4d2e3d9efeb 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/builder/validation.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/builder/validation.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity_a"> <rules> <rule name="rules_for_builder"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_a/validation.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_a/validation.xml index 3189d2fdd3ab37b01f64bab07b49d5851189ff3e..d443166f4784f471785e23591c55cd79ecdf1d04 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_a/validation.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_a/validation.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity_a"> <rules> <rule name="check_alnum_and_int_not_empty_and_have_valid_value"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_b/validation.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_b/validation.xml index da9454c12bf31cfeab5b1f4b0bd186c054bb33d9..87ba69eb8fb1c882ec0fe3388124a54627445c8f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_b/validation.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/positive/module_b/validation.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Validator/etc/validation.xsd"> +<validation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Validator/etc/validation.xsd"> <entity name="test_entity_a"> <rules> <rule name="check_alnum_and_int_not_empty_and_have_valid_value"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/FileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/FileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f86eec93a7cce0accde4289787dca0d5373e8bba --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/FileTest.php @@ -0,0 +1,133 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset; + +class FileTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Source|\PHPUnit_Framework_MockObject_MockObject + */ + private $source; + + /** + * @var \Magento\Framework\View\Asset\ContextInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $context; + + /** + * @var File + */ + private $object; + + public function setUp() + { + $this->source = $this->getMock('Magento\Framework\View\Asset\Source', [], [], '', false); + $this->context = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\ContextInterface'); + $this->object = new File($this->source, $this->context, 'dir/file.css', 'Magento_Module', 'css'); + } + + public function testGetUrl() + { + $this->context->expects($this->once())->method('getBaseUrl')->will($this->returnValue('http://example.com/')); + $this->context->expects($this->once())->method('getPath')->will($this->returnValue('static')); + $this->assertEquals('http://example.com/static/Magento_Module/dir/file.css', $this->object->getUrl()); + } + + public function testGetContentType() + { + $this->assertEquals('css', $this->object->getContentType()); + $object = new File($this->source, $this->context, '', '', 'type'); + $this->assertEquals('type', $object->getContentType()); + } + + /** + * @param string $contextPath + * @param string $module + * @param string $filePath + * @param string $expected + * @dataProvider getPathDataProvider + */ + public function testGetPath($contextPath, $module, $filePath, $expected) + { + $this->context->expects($this->once())->method('getPath')->will($this->returnValue($contextPath)); + $object = new File($this->source, $this->context, $filePath, $module, ''); + $this->assertEquals($expected, $object->getPath()); + } + + /** + * @return array + */ + public function getPathDataProvider() + { + return [ + ['', '', '', ''], + ['', '', 'c/d', 'c/d'], + ['', 'b', '', 'b'], + ['', 'b', 'c/d', 'b/c/d'], + ['a', '', '', 'a'], + ['a', '', 'c/d', 'a/c/d'], + ['a', 'b', '', 'a/b'], + ['a', 'b', 'c/d', 'a/b/c/d'], + ]; + } + + public function testGetSourceFile() + { + $this->source->expects($this->once()) + ->method('getFile') + ->with($this->object) + ->will($this->returnValue('result')); + $this->assertEquals('result', $this->object->getSourceFile()); + $this->assertEquals('result', $this->object->getSourceFile()); // second time to assert in-memory caching + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Unable to resolve the source file for 'context/Magento_Module/dir/file.css' + */ + public function testGetSourceFileMissing() + { + $this->context->expects($this->once())->method('getPath')->will($this->returnValue('context')); + $this->source->expects($this->once())->method('getFile')->will($this->returnValue(false)); + $this->object->getSourceFile(); + } + + public function testGetContent() + { + $this->source->expects($this->exactly(2)) + ->method('getContent') + ->with($this->object) + ->will($this->returnValue('content')); + $this->assertEquals('content', $this->object->getContent()); + $this->assertEquals('content', $this->object->getContent()); // no in-memory caching for content + } + + public function testSimpleGetters() + { + $this->assertEquals('dir/file.css', $this->object->getFilePath()); + $this->assertSame($this->context, $this->object->getContext()); + $this->assertEquals('Magento_Module', $this->object->getModule()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php index 4d23edec607084e07ed3fba47b1ef453df165bcf..a32ac508192121577dacd6c46d88be0be9d7fb22 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php @@ -145,37 +145,37 @@ class MergeServiceTest extends \PHPUnit_Framework_TestCase return array( 'js production mode' => array( $jsAssets, - \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, + 'js', \Magento\Framework\App\State::MODE_PRODUCTION, 'Magento\Framework\View\Asset\MergeStrategy\FileExists' ), 'css production mode' => array( $cssAssets, - \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, + 'css', \Magento\Framework\App\State::MODE_PRODUCTION, 'Magento\Framework\View\Asset\MergeStrategy\FileExists' ), 'js default mode' => array( $jsAssets, - \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, + 'js', \Magento\Framework\App\State::MODE_DEFAULT, 'Magento\Framework\View\Asset\MergeStrategy\Checksum' ), 'css default mode' => array( $cssAssets, - \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, + 'js', \Magento\Framework\App\State::MODE_DEFAULT, 'Magento\Framework\View\Asset\MergeStrategy\Checksum' ), 'js developer mode' => array( $jsAssets, - \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, + 'js', \Magento\Framework\App\State::MODE_DEVELOPER, 'Magento\Framework\View\Asset\MergeStrategy\Checksum' ), 'css developer mode' => array( $cssAssets, - \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, + 'css', \Magento\Framework\App\State::MODE_DEVELOPER, 'Magento\Framework\View\Asset\MergeStrategy\Checksum' ) @@ -184,7 +184,7 @@ class MergeServiceTest extends \PHPUnit_Framework_TestCase public function testCleanMergedJsCss() { - $mergedDir = \Magento\Framework\View\Asset\Merged::PUBLIC_MERGE_DIR; + $mergedDir = \Magento\Framework\View\Asset\Merged::getRelativeDir(); $this->_directory->expects($this->once())->method('delete')->with($mergedDir); $this->_object->cleanMergedJsCss(); diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php index 2fc063be682a5ae9d15f0e560062799eb08f1352..007cc337fb8e64127e8d826a4b95203c0bdc0787 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php @@ -26,179 +26,125 @@ namespace Magento\Framework\View\Asset\MergeStrategy; class ChecksumTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Asset\MergeStrategy\Checksum - */ - protected $_object; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_filesystem; - - /** - * @var \Magento\Framework\Filesystem\Directory\Write | \PHPUnit_Framework_MockObject_MockObject - */ - protected $_directory; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Asset\MergeStrategyInterface */ - protected $_strategy; + private $mergerMock; /** - * @var string + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem\Directory\ReadInterface */ - protected $_mergedFileAbs = 'absolutePath/destination_file.js'; + private $sourceDir; /** - * @var string + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem\Directory\WriteInterface */ - protected $_mergedFile = 'destination_file.js'; + private $targetDir; /** - * @var string + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Asset\File */ - protected $_mergedMetaFileAbs = 'absolutePath/destination_file.js.dat'; + private $resultAsset; /** - * @var string - */ - protected $_mergedMetaFile = 'destination_file.js.dat'; - - /** - * @var array + * @var \Magento\Framework\View\Asset\MergeStrategy\Checksum */ - protected $_filesArray = array('absolutePath/file1.js', 'absolutePath/file2.js'); + private $checksum; protected function setUp() { - $this->_filesystem = - $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryWrite'), array(), '', false); - $this->_directory = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false); - $this->_filesystem->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->will( - $this->returnValue($this->_directory) - ); - $this->_directory->expects( - $this->exactly(2) - )->method( - 'stat' - )->will( - $this->returnValueMap( - array(array('file1.js', array('mtime' => '123')), array('file2.js', array('mtime' => '456'))) - ) - ); - $this->_directory->expects($this->any())->method('getRelativePath')->will( - $this->returnCallback( - function ($path) { - $parts = explode('/', $path); - return end($parts); - } - ) - ); - - $this->_strategy = $this->getMock('Magento\Framework\View\Asset\MergeStrategyInterface'); - - $this->_object = new \Magento\Framework\View\Asset\MergeStrategy\Checksum($this->_strategy, $this->_filesystem); + $this->mergerMock = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\MergeStrategyInterface'); + $this->sourceDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface'); + $this->targetDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface'); + $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::ROOT_DIR) + ->will($this->returnValue($this->sourceDir)) + ; + $filesystem->expects($this->any()) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) + ->will($this->returnValue($this->targetDir)) + ; + $this->checksum = new Checksum($this->mergerMock, $filesystem); + $this->resultAsset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); } - /** - * Test when everything is valid, no merging required - */ - public function testMergeFilesNoMergeRequired() + public function testMergeNoAssets() { - $this->_directory->expects($this->exactly(2))->method('isExist')->will($this->returnValue(true)); - - $this->_directory->expects( - $this->once() - )->method( - 'readFile' - )->with( - $this->_mergedMetaFile - )->will( - $this->returnValue('123456') - ); - - $this->_directory->expects($this->never())->method('writeFile'); - - $this->_strategy->expects($this->never())->method('mergeFiles'); - - $this->_object->mergeFiles($this->_filesArray, $this->_mergedFileAbs, 'contentType'); + $this->mergerMock->expects($this->never())->method('merge'); + $this->checksum->merge(array(), $this->resultAsset); } - /** - * Test whether merged file or meta file does not exist - * - * @dataProvider mergeFilesFilesDoNotExistDataProvider - */ - public function testMergeFilesFilesDoNotExist($isFileExists, $isMetaFileExists) + public function testMergeNoDatFile() { - $this->_directory->expects( - $this->any() - )->method( - 'isExist' - )->will( - $this->returnValueMap( - array(array($this->_mergedFile, $isFileExists), array($this->_mergedMetaFile, $isMetaFileExists)) - ) - ); - - - $this->_strategy->expects( - $this->once() - )->method( - 'mergeFiles' - )->with( - $this->_filesArray, - $this->_mergedFileAbs, - 'contentType' - ); - - $this->_directory->expects($this->once())->method('writeFile')->with($this->_mergedMetaFile, '123456'); + $this->targetDir->expects($this->once()) + ->method('isExist') + ->with('merged/result.txt.dat') + ->will($this->returnValue(false)) + ; + $assets = $this->getAssetsToMerge(); + $this->mergerMock->expects($this->once())->method('merge')->with($assets, $this->resultAsset); + $this->targetDir->expects($this->once())->method('writeFile')->with('merged/result.txt.dat', '11'); + $this->checksum->merge($assets, $this->resultAsset); + } - $this->_object->mergeFiles($this->_filesArray, $this->_mergedFileAbs, 'contentType'); + public function testMergeMtimeChanged() + { + $this->targetDir->expects($this->once()) + ->method('isExist') + ->with('merged/result.txt.dat') + ->will($this->returnValue(true)) + ; + $this->targetDir->expects($this->once()) + ->method('readFile') + ->with('merged/result.txt.dat') + ->will($this->returnValue('10')) + ; + $assets = $this->getAssetsToMerge(); + $this->mergerMock->expects($this->once())->method('merge')->with($assets, $this->resultAsset); + $this->targetDir->expects($this->once())->method('writeFile')->with('merged/result.txt.dat', '11'); + $this->checksum->merge($assets, $this->resultAsset); } - /** - * @return array - */ - public function mergeFilesFilesDoNotExistDataProvider() + public function testMergeMtimeUnchanged() { - return array('no file' => array(false, true), 'no meta file' => array(true, false)); + $this->targetDir->expects($this->once()) + ->method('isExist') + ->with('merged/result.txt.dat') + ->will($this->returnValue(true)) + ; + $this->targetDir->expects($this->once()) + ->method('readFile') + ->with('merged/result.txt.dat') + ->will($this->returnValue('11')) + ; + $assets = $this->getAssetsToMerge(); + $this->mergerMock->expects($this->never())->method('merge'); + $this->targetDir->expects($this->never())->method('writeFile'); + $this->checksum->merge($assets, $this->resultAsset); } /** - * Test whether merged file and meta-file exist, though checksum is wrong (files were updated) + * Create mocks of assets to merge, as well as a few related necessary mocks + * + * @return array */ - public function testMergeFilesExistWrongChecksum() + private function getAssetsToMerge() { - $this->_directory->expects($this->exactly(2))->method('isExist')->will($this->returnValue(true)); - - $this->_directory->expects( - $this->once() - )->method( - 'readFile' - )->with( - $this->_mergedMetaFile - )->will( - $this->returnValue('000000') - ); - - $this->_strategy->expects( - $this->once() - )->method( - 'mergeFiles' - )->with( - $this->_filesArray, - $this->_mergedFile, - 'contentType' - ); - - $this->_directory->expects($this->once())->method('writeFile')->with($this->_mergedMetaFile, '123456'); - - $this->_object->mergeFiles($this->_filesArray, $this->_mergedFile, 'contentType'); + $one = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $one->expects($this->once())->method('getSourceFile')->will($this->returnValue('/dir/file/one.txt')); + $two = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $two->expects($this->once())->method('getSourceFile')->will($this->returnValue('/dir/file/two.txt')); + $this->sourceDir->expects($this->exactly(2)) + ->method('getRelativePath') + ->will($this->onConsecutiveCalls('file/one.txt', 'file/two.txt')) + ; + $this->sourceDir->expects($this->exactly(2))->method('stat')->will($this->returnValue(array('mtime' => '1'))); + $this->resultAsset->expects($this->once()) + ->method('getPath') + ->will($this->returnValue('merged/result.txt')) + ; + return array($one, $two); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php index 332ba74540dfd4dbe36cf6010d5715a1bd488912..38aa0f56f91e7ef1f9d1f97262a88efa9958a641 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php @@ -30,118 +30,87 @@ class DirectTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\Framework\View\Asset\MergeStrategy\Direct */ - protected $_object; + protected $object; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Url\CssResolver */ - protected $_filesystem; + protected $cssUrlResolver; /** - * @var Write | \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem\Directory\WriteInterface */ - protected $_directory; + protected $writeDir; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Asset\LocalInterface */ - protected $_cssUrlResolver; + protected $resultAsset; protected function setUp() { - $this->_cssUrlResolver = $this->getMock('Magento\Framework\View\Url\CssResolver', array(), array(), '', false); - $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_directory = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false); - $this->_filesystem->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - \Magento\Framework\App\Filesystem::PUB_DIR - )->will( - $this->returnValue($this->_directory) - ); - $this->_directory->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); - - $this->_object = new \Magento\Framework\View\Asset\MergeStrategy\Direct( - $this->_filesystem, - $this->_cssUrlResolver - ); + $this->cssUrlResolver = $this->getMock('\Magento\Framework\View\Url\CssResolver'); + $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $this->writeDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface'); + $filesystem->expects($this->any()) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) + ->will($this->returnValue($this->writeDir)) + ; + $this->resultAsset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $this->object = new Direct($filesystem, $this->cssUrlResolver); } - /** - * @expectedException \Magento\Framework\Exception - * @expectedExceptionMessage Unable to locate file 'no_file.js' for merging. - */ - public function testMergeFilesNoFilesException() + public function testMergeNoAssets() { - $this->_object->mergeFiles(array('no_file.js'), 'some_file.js', 'js'); + $this->resultAsset->expects($this->once())->method('getPath')->will($this->returnValue('foo/result')); + $this->writeDir->expects($this->once())->method('writeFile')->with('foo/result', ''); + $this->object->merge(array(), $this->resultAsset); } - /** - * Test mergeFiles() for css content type - */ - public function testMergeFilesCss() + public function testMergeGeneric() { - $this->_cssUrlResolver->expects( - $this->exactly(2) - )->method( - 'replaceCssRelativeUrls' - )->will( - $this->returnArgument(0) - ); - $this->_testMergeFiles('css'); + $this->resultAsset->expects($this->once())->method('getPath')->will($this->returnValue('foo/result')); + $assets = $this->prepareAssetsToMerge(array(' one', 'two')); // note leading space intentionally + $this->writeDir->expects($this->once())->method('writeFile')->with('foo/result', 'onetwo'); + $this->object->merge($assets, $this->resultAsset); } - /** - * Test mergeFiles() for js content type - */ - public function testMergeFilesJs() + public function testMergeCss() { - $this->_cssUrlResolver->expects($this->never())->method('replaceCssRelativeUrls'); - $this->_testMergeFiles('js'); + $this->resultAsset->expects($this->exactly(3)) + ->method('getPath') + ->will($this->returnValue('foo/result')) + ; + $this->resultAsset->expects($this->any())->method('getContentType')->will($this->returnValue('css')); + $assets = $this->prepareAssetsToMerge(array('one', 'two')); + $this->cssUrlResolver->expects($this->exactly(2)) + ->method('relocateRelativeUrls') + ->will($this->onConsecutiveCalls('1', '2')) + ; + $this->cssUrlResolver->expects($this->once()) + ->method('aggregateImportDirectives') + ->with('12') + ->will($this->returnValue('1020')) + ; + $this->writeDir->expects($this->once())->method('writeFile')->with('foo/result', '1020'); + $this->object->merge($assets, $this->resultAsset); } /** - * Test mergeFiles itself + * Prepare a few assets for merging with specified content * - * @param string $contentType + * @param array $data + * @return array */ - protected function _testMergeFiles($contentType) + private function prepareAssetsToMerge(array $data) { - $mergedFile = '/merged_file.js'; - - $this->_directory->expects($this->any())->method('isExist')->will($this->returnValue(true)); - - $this->_directory->expects( - $this->at(3) - )->method( - 'readFile' - )->with( - '/pub/script_one.js' - )->will( - $this->returnValue('script1') - ); - $this->_directory->expects( - $this->at(7) - )->method( - 'readFile' - )->with( - '/pub/script_two.js' - )->will( - $this->returnValue('script2') - ); - - $delimiter = $contentType == 'js' ? ';' : ''; - $this->_directory->expects( - $this->once() - )->method( - 'writeFile' - )->with( - $mergedFile, - 'script1' . $delimiter . 'script2' - ); - - $this->_object->mergeFiles(array('/pub/script_one.js', '/pub/script_two.js'), $mergedFile, $contentType); + $result = array(); + foreach ($data as $content) { + $asset = $this->getMockForAbstractClass('Magento\Framework\View\Asset\LocalInterface'); + $asset->expects($this->once())->method('getContent')->will($this->returnValue($content)); + $result[] = $asset; + } + return $result; } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php index d243bb2e95b1de5e081b29a866d8c3c0a18ac68d..c060df9ea210d89d2463a74e6076ef42fcf85fc0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php @@ -26,113 +26,51 @@ namespace Magento\Framework\View\Asset\MergeStrategy; class FileExistsTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Asset\MergeStrategy\FileExists + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Asset\MergeStrategyInterface */ - protected $_object; + private $mergerMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem\Directory\WriteInterface */ - protected $_filesystem; + private $dirMock; /** - * @var \Magento\Framework\Filesystem\Directory\Write | \PHPUnit_Framework_MockObject_MockObject + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Asset\File */ - protected $_directory; + private $resultAsset; /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_strategy; - - /** - * @var string - */ - protected $_mergedFileAbs = 'absolutePath/destination_file.js'; - - /** - * @var string - */ - protected $_mergedFile = 'destination_file.js'; - - /** - * @var array + * @var \Magento\Framework\View\Asset\MergeStrategy\FileExists */ - protected $_filesArray = array('file1.js', 'file2.js'); + private $fileExists; protected function setUp() { - $this->_filesystem = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getDirectoryWrite', 'getDirectoryRead'), - array(), - '', - false - ); - $this->_directory = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false); - $this->_filesystem->expects( - $this->any() - )->method( - 'getDirectoryRead' - )->will( - $this->returnValue($this->_directory) - ); - $this->_strategy = $this->getMock('Magento\Framework\View\Asset\MergeStrategyInterface'); - - $this->_directory->expects($this->any())->method('getRelativePath')->will( - $this->returnCallback( - function ($path) { - $parts = explode('/', $path); - return end($parts); - } - ) - ); - - $this->_object = new \Magento\Framework\View\Asset\MergeStrategy\FileExists( - $this->_strategy, - $this->_filesystem - ); + $this->mergerMock = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\MergeStrategyInterface'); + $this->dirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface'); + $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) + ->will($this->returnValue($this->dirMock)) + ; + $this->fileExists = new FileExists($this->mergerMock, $filesystem); + $this->resultAsset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $this->resultAsset->expects($this->once())->method('getPath')->will($this->returnValue('foo/file')); } - public function testMergeFilesFileExists() + public function testMergeExists() { - $this->_strategy->expects($this->never())->method('mergeFiles'); - - $this->_directory->expects( - $this->once() - )->method( - 'isExist' - )->with( - $this->equalTo($this->_mergedFile) - )->will( - $this->returnValue(true) - ); - - $this->_object->mergeFiles($this->_filesArray, $this->_mergedFileAbs, 'contentType'); + $this->dirMock->expects($this->once())->method('isExist')->with('foo/file')->will($this->returnValue(true)); + $this->mergerMock->expects($this->never())->method('merge'); + $this->fileExists->merge(array(), $this->resultAsset); } - public function testMergeFilesFileDoesNotExist() + public function testMergeNotExists() { - $this->_strategy->expects( - $this->once() - )->method( - 'mergeFiles' - )->with( - $this->_filesArray, - $this->_mergedFileAbs, - 'contentType' - ); - - $this->_directory->expects( - $this->once() - )->method( - 'isExist' - )->with( - $this->equalTo($this->_mergedFile) - )->will( - $this->returnValue(false) - ); - - $this->_object->mergeFiles($this->_filesArray, $this->_mergedFileAbs, 'contentType'); + $this->dirMock->expects($this->once())->method('isExist')->with('foo/file')->will($this->returnValue(false)); + $this->mergerMock->expects($this->once())->method('merge')->with(array(), $this->resultAsset); + $this->fileExists->merge(array(), $this->resultAsset); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php index 35cf56f43369bc8c32276122b57c7519c2428298..0a5204539a5e0c0592e150a17a20011b8c0a8ab7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergedTest.php @@ -25,11 +25,6 @@ namespace Magento\Framework\View\Asset; class MergedTest extends \PHPUnit_Framework_TestCase { - /** - * @var \Magento\Framework\View\Asset\Merged - */ - protected $_object; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -58,52 +53,26 @@ class MergedTest extends \PHPUnit_Framework_TestCase /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_filesystem; + protected $_assetRepo; protected function setUp() { $this->_assetJsOne = $this->getMockForAbstractClass('Magento\Framework\View\Asset\MergeableInterface'); $this->_assetJsOne->expects($this->any())->method('getContentType')->will($this->returnValue('js')); - $this->_assetJsOne->expects( - $this->any() - )->method( - 'getSourceFile' - )->will( - $this->returnValue('pub/lib/script_one.js') - ); + $this->_assetJsOne->expects($this->any())->method('getPath') + ->will($this->returnValue('script_one.js')); $this->_assetJsTwo = $this->getMockForAbstractClass('Magento\Framework\View\Asset\MergeableInterface'); $this->_assetJsTwo->expects($this->any())->method('getContentType')->will($this->returnValue('js')); - $this->_assetJsTwo->expects( - $this->any() - )->method( - 'getSourceFile' - )->will( - $this->returnValue('pub/static/script_two.js') - ); + $this->_assetJsTwo->expects($this->any())->method('getPath') + ->will($this->returnValue('script_two.js')); $this->_logger = $this->getMock('Magento\Framework\Logger', array('logException'), array(), '', false); $this->_mergeStrategy = $this->getMock('Magento\Framework\View\Asset\MergeStrategyInterface'); - $this->_objectManager = $this->getMockForAbstractClass( - 'Magento\Framework\ObjectManager', - array(), - '', - true, - true, - true, - array('create', 'get') - ); - - $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_objectManager->expects($this->any())->method('get')->will($this->returnValue($this->_filesystem)); - - $this->_object = new \Magento\Framework\View\Asset\Merged( - $this->_objectManager, - $this->_logger, - $this->_mergeStrategy, - array($this->_assetJsOne, $this->_assetJsTwo) + $this->_assetRepo = $this->getMock( + '\Magento\Framework\View\Asset\Repository', array(), array(), '', false ); } @@ -113,12 +82,7 @@ class MergedTest extends \PHPUnit_Framework_TestCase */ public function testConstructorNothingToMerge() { - $this->_object = new \Magento\Framework\View\Asset\Merged( - $this->_objectManager, - $this->_logger, - $this->_mergeStrategy, - array() - ); + new \Magento\Framework\View\Asset\Merged($this->_logger, $this->_mergeStrategy, $this->_assetRepo, array()); } /** @@ -128,10 +92,10 @@ class MergedTest extends \PHPUnit_Framework_TestCase public function testConstructorRequireMergeInterface() { $assetUrl = new \Magento\Framework\View\Asset\Remote('http://example.com/style.css', 'css'); - $this->_object = new \Magento\Framework\View\Asset\Merged( - $this->_objectManager, + new \Magento\Framework\View\Asset\Merged( $this->_logger, $this->_mergeStrategy, + $this->_assetRepo, array($this->_assetJsOne, $assetUrl) ); } @@ -144,98 +108,35 @@ class MergedTest extends \PHPUnit_Framework_TestCase { $assetCss = $this->getMockForAbstractClass('Magento\Framework\View\Asset\MergeableInterface'); $assetCss->expects($this->any())->method('getContentType')->will($this->returnValue('css')); - $assetCss->expects($this->any())->method('getSourceFile')->will($this->returnValue('style.css')); - - $this->_object = new \Magento\Framework\View\Asset\Merged( - $this->_objectManager, + new \Magento\Framework\View\Asset\Merged( $this->_logger, $this->_mergeStrategy, + $this->_assetRepo, array($this->_assetJsOne, $assetCss) ); } public function testIteratorInterfaceMerge() { - $hash = md5(implode('|', array('script_one.js', 'script_two.js'))); - $mergedFile = 'pub/cache/_merged/' . $hash . '.js'; - + $assets = array($this->_assetJsOne, $this->_assetJsTwo); $this->_logger->expects($this->never())->method('logException'); - - $publicFiles = array( - 'pub/lib/script_one.js' => 'pub/lib/script_one.js', - 'pub/static/script_two.js' => 'pub/static/script_two.js' - ); - - $this->_filesystem->expects( - $this->at(0) - )->method( - 'getPath' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::PUB_LIB_DIR) - )->will( - $this->returnValue('pub/lib') - ); - $this->_filesystem->expects( - $this->at(1) - )->method( - 'getPath' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) - )->will( - $this->returnValue('pub/static') - ); - $readDirectoryMock = $this->getMockBuilder( - '\Magento\Framework\Filesystem\Directory\Read' - )->disableOriginalConstructor()->getMock(); - $merged = $this->_object; - $readDirectoryMock->expects( - $this->once() - )->method( - 'getAbsolutePath' - )->with( - $this->equalTo($merged::PUBLIC_MERGE_DIR) - )->will( - $this->returnValue('pub/cache/_merged') - ); - - $this->_filesystem->expects( - $this->any() - )->method( - 'getDirectoryRead' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR) - )->will( - $this->returnValue($readDirectoryMock) - ); - - $this->_mergeStrategy->expects( - $this->once() - )->method( - 'mergeFiles' - )->with( - $publicFiles, - $mergedFile, - 'js' - )->will( - $this->returnValue(null) - ); - - $mergedAsset = $this->getMockForAbstractClass('Magento\Framework\View\Asset\MergeableInterface'); - $this->_objectManager->expects( - $this->once() - )->method( - 'create' - )->with( - 'Magento\Framework\View\Asset\PublicFile', - array('file' => $mergedFile, 'contentType' => 'js') - )->will( - $this->returnValue($mergedAsset) + $merged = new \Magento\Framework\View\Asset\Merged( + $this->_logger, + $this->_mergeStrategy, + $this->_assetRepo, + $assets ); - + $mergedAsset = $this->getMock('Magento\Framework\View\Asset\File', array(), array(), '', false); + $this->_mergeStrategy + ->expects($this->once()) + ->method('merge') + ->with($assets, $mergedAsset) + ->will($this->returnValue(null)); + $this->_assetRepo->expects($this->once())->method('createArbitrary')->will($this->returnValue($mergedAsset)); $expectedResult = array($mergedAsset); - $this->_assertIteratorEquals($expectedResult, $this->_object); - $this->_assertIteratorEquals($expectedResult, $this->_object); // ensure merging happens only once + $this->_assertIteratorEquals($expectedResult, $merged); + $this->_assertIteratorEquals($expectedResult, $merged); // ensure merging happens only once } public function testIteratorInterfaceMergeFailure() @@ -243,22 +144,21 @@ class MergedTest extends \PHPUnit_Framework_TestCase $mergeError = new \Exception('File not found'); $assetBroken = $this->getMockForAbstractClass('Magento\Framework\View\Asset\MergeableInterface'); $assetBroken->expects($this->any())->method('getContentType')->will($this->returnValue('js')); - $assetBroken->expects($this->any())->method('getSourceFile')->will($this->throwException($mergeError)); + $assetBroken->expects($this->any())->method('getPath') + ->will($this->throwException($mergeError)); - $this->_object = new \Magento\Framework\View\Asset\Merged( - $this->_objectManager, + $merged = new \Magento\Framework\View\Asset\Merged( $this->_logger, $this->_mergeStrategy, + $this->_assetRepo, array($this->_assetJsOne, $this->_assetJsTwo, $assetBroken) ); - - $this->_objectManager->expects($this->never())->method('create'); $this->_logger->expects($this->once())->method('logException')->with($this->identicalTo($mergeError)); $expectedResult = array($this->_assetJsOne, $this->_assetJsTwo, $assetBroken); - $this->_assertIteratorEquals($expectedResult, $this->_object); - $this->_assertIteratorEquals($expectedResult, $this->_object); // ensure merging attempt happens only once + $this->_assertIteratorEquals($expectedResult, $merged); + $this->_assertIteratorEquals($expectedResult, $merged); // ensure merging attempt happens only once } /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php index 67c39f8bef4b07f71232d22acf12f3f38aad9a68..d9f26b914003a1d8f840229f71c86efa9297973c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php @@ -25,33 +25,40 @@ namespace Magento\Framework\View\Asset; class MinifiedTest extends \PHPUnit_Framework_TestCase { - const ORIG_SOURCE_FILE = 'original.js'; - - const MINIFIED_SOURCE_FILE = 'original.min.js'; + /** + * @var \Magento\Framework\View\Asset\LocalInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_asset; - const MINIFIED_URL = 'http://localhost/original.min.js'; + /** + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_logger; - const ORIGINAL_URL = 'http://localhost/original.js'; + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_staticViewDir; /** - * @var \Magento\Framework\View\Asset\LocalInterface|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $_asset; + protected $_rootDir; /** - * @var \Magento\Framework\Code\Minifier|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Url|\PHPUnit_Framework_MockObject_MockObject */ - protected $_minifier; + protected $_baseUrl; /** - * @var \Magento\Framework\View\Url|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $_viewUrl; + protected $_filesystem; /** - * @var \Magento\Framework\Logger|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Minifier\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $_logger; + protected $_adapter; /** * @var \Magento\Framework\View\Asset\Minified @@ -60,113 +67,238 @@ class MinifiedTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_asset = $this->getMockForAbstractClass( - 'Magento\Framework\View\Asset\LocalInterface', - array(), - '', - false + $this->_asset = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); + $this->_logger = $this->getMock('\Magento\Framework\Logger', array(), array(), '', false); + $this->_baseUrl = $this->getMock('\Magento\Framework\Url', array(), array(), '', false); + $this->_staticViewDir = $this->getMockForAbstractClass( + '\Magento\Framework\Filesystem\Directory\WriteInterface' ); - $this->_minifier = $this->getMock( - 'Magento\Framework\Code\Minifier', - array('getMinifiedFile'), - array(), - '', - false - ); - $this->_viewUrl = $this->getMock('Magento\Framework\View\Url', array(), array(), '', false); - $this->_logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); - - $this->_model = new \Magento\Framework\View\Asset\Minified( + $this->_rootDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface'); + $this->_filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $this->_filesystem->expects($this->any()) + ->method('getDirectoryRead') + ->will($this->returnValueMap([ + [\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->_staticViewDir], + [\Magento\Framework\App\Filesystem::ROOT_DIR, $this->_rootDir], + ])); + $this->_filesystem->expects($this->any()) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) + ->will($this->returnValue($this->_staticViewDir)); + $this->_adapter = $this->getMockForAbstractClass('Magento\Framework\Code\Minifier\AdapterInterface'); + $this->_model = new Minified( $this->_asset, - $this->_minifier, - $this->_viewUrl, - $this->_logger + $this->_logger, + $this->_filesystem, + $this->_baseUrl, + $this->_adapter ); } - protected function tearDown() + /** + * @param string $method + * @param string $expected + * @dataProvider inMemoryDecoratorDataProvider + */ + public function testInMemoryDecorator($method, $expected) { - $this->_asset = null; - $this->_minifier = null; - $this->_viewUrl = null; - $this->_logger = null; - $this->_model = null; + $this->prepareRequestedAsMinifiedMock(); + $this->_adapter->expects($this->never())->method('minify'); + $this->assertSame($expected, $this->_model->$method()); + $this->assertSame($expected, $this->_model->$method()); // invoke second time to test in-memory caching } - public function testGetUrl() + /** + * Prepare case when an asset is requested explicitly with ".min" suffix + * + * In this case the minification is not supposed to occur + */ + private function prepareRequestedAsMinifiedMock() { - $this->_prepareProcessMock(); - $this->assertSame(self::MINIFIED_URL, $this->_model->getUrl()); - $this->assertSame(self::MINIFIED_URL, $this->_model->getUrl()); + $this->_asset->expects($this->exactly(2))->method('getPath')->will($this->returnValue('test/library.min.js')); + $this->_asset->expects($this->once())->method('getSourceFile')->will($this->returnValue('source_file')); + $this->_asset->expects($this->once())->method('getFilePath')->will($this->returnValue('file_path')); + $this->_asset->expects($this->once())->method('getContext')->will($this->returnValue('context')); + $this->_asset->expects($this->once())->method('getUrl')->will($this->returnValue('url')); } - public function testGetSourceFile() + /** + * @return array + */ + public function inMemoryDecoratorDataProvider() { - $this->_prepareProcessMock(); - $this->assertSame(self::MINIFIED_SOURCE_FILE, $this->_model->getSourceFile()); - $this->assertSame(self::MINIFIED_SOURCE_FILE, $this->_model->getSourceFile()); + return [ + ['getUrl', 'url'], + ['getSourceFile', 'source_file'], + ['getPath', 'test/library.min.js'], + ['getFilePath', 'file_path'], + ['getContext', 'context'], + ]; } - protected function _prepareProcessMock() + /** + * @param string $method + * @param string $expected + * @dataProvider assetDecoratorDataProvider + */ + public function testAssetDecorator($method, $expected) { - $this->_asset->expects( - $this->once() - )->method( - 'getSourceFile' - )->will( - $this->returnValue(self::ORIG_SOURCE_FILE) - ); - $this->_minifier->expects( - $this->once() - )->method( - 'getMinifiedFile' - )->with( - self::ORIG_SOURCE_FILE - )->will( - $this->returnValue(self::MINIFIED_SOURCE_FILE) - ); - $this->_viewUrl->expects( - $this->any() - )->method( - 'getPublicFileUrl' - )->with( - self::MINIFIED_SOURCE_FILE - )->will( - $this->returnValue(self::MINIFIED_URL) - ); + $this->_asset->expects($this->exactly(2))->method($method)->will($this->returnValue($expected)); + $this->assertSame($expected, $this->_model->$method()); + $this->assertSame($expected, $this->_model->$method()); // 2 times to ensure asset is invoked every time } - public function testProcessException() + /** + * @return array + */ + public function assetDecoratorDataProvider() { - $this->_asset->expects( - $this->once() - )->method( - 'getSourceFile' - )->will( - $this->returnValue(self::ORIG_SOURCE_FILE) - ); - $this->_asset->expects($this->once())->method('getUrl')->will($this->returnValue(self::ORIGINAL_URL)); - - $this->_minifier->expects( - $this->once() - )->method( - 'getMinifiedFile' - )->with( - self::ORIG_SOURCE_FILE - )->will( - $this->throwException(new \Exception('Error')) - ); + return [ + ['getContentType', 'content_type'], + ['getModule', 'module'], + ]; + } - $this->_viewUrl->expects($this->never())->method('getPublicFileUrl'); + public function testGetContent() + { + $this->prepareRequestedAsMinifiedMock(); + $this->_adapter->expects($this->never())->method('minify'); + $this->_staticViewDir->expects($this->exactly(2)) + ->method('readFile') + ->with('test/library.min.js') + ->will($this->returnValue('content')); + $this->assertEquals('content', $this->_model->getContent()); + $this->assertEquals('content', $this->_model->getContent()); + } - $this->assertSame(self::ORIGINAL_URL, $this->_model->getUrl()); - $this->assertSame(self::ORIG_SOURCE_FILE, $this->_model->getSourceFile()); + public function testHasPreminifiedFile() + { + $this->_asset->expects($this->exactly(2))->method('getPath')->will($this->returnValue('test/library.js')); + $this->_asset->expects($this->atLeastOnce()) + ->method('getSourceFile') + ->will($this->returnValue('/foo/bar/test/library.js')); + $this->_asset->expects($this->once())->method('getFilePath')->will($this->returnValue('file_path')); + $this->_asset->expects($this->once())->method('getContext')->will($this->returnValue('context')); + $this->_asset->expects($this->once())->method('getUrl')->will($this->returnValue('url')); + $this->_rootDir->expects($this->once()) + ->method('getRelativePath') + ->with('/foo/bar/test/library.min.js') + ->will($this->returnValue('test/library.min.js')); + $this->_rootDir->expects($this->once()) + ->method('isExist') + ->with('test/library.min.js') + ->will($this->returnValue(true)); + $this->_adapter->expects($this->never())->method('minify'); + $this->assertEquals('test/library.min.js', $this->_model->getPath()); } - public function testGetContent() + public function testMinify() + { + $this->prepareAttemptToMinifyMock(false); + $this->_asset->expects($this->once())->method('getContent')->will($this->returnValue('content')); + $this->_adapter->expects($this->once())->method('minify')->with('content')->will($this->returnValue('mini')); + $this->_staticViewDir->expects($this->once())->method('writeFile')->with($this->anything(), 'mini'); + $this->assertStringMatchesFormat('%s_library.min.js', $this->_model->getFilePath()); + } + + private function prepareAttemptToMinifyMock($fileExists, $rootDirExpectations = true) + { + $this->_asset->expects($this->atLeastOnce())->method('getPath')->will($this->returnValue('test/library.js')); + $this->_asset->expects($this->atLeastOnce()) + ->method('getSourceFile') + ->will($this->returnValue('/foo/bar/test/library.js')); + if ($rootDirExpectations) { + $this->_rootDir->expects($this->once()) + ->method('getRelativePath') + ->with('/foo/bar/test/library.min.js') + ->will($this->returnValue('test/library.min.js')); + $this->_rootDir->expects($this->once()) + ->method('isExist') + ->with('test/library.min.js') + ->will($this->returnValue(false)); + } + $this->_baseUrl->expects($this->once())->method('getBaseUrl')->will($this->returnValue('http://example.com/')); + $this->_staticViewDir->expects($this->once())->method('isExist')->will($this->returnValue($fileExists)); + } + + public function testMinificationFailed() + { + $this->prepareAttemptToMinifyMock(false); + $this->_asset->expects($this->once())->method('getContent')->will($this->returnValue('content')); + $e = new \Exception('test'); + $this->_adapter->expects($this->once())->method('minify')->with('content')->will($this->throwException($e)); + $this->_logger->expects($this->once())->method('logException'); + $this->_staticViewDir->expects($this->never())->method('writeFile'); + $this->_asset->expects($this->once())->method('getFilePath')->will($this->returnValue('file_path')); + $this->_asset->expects($this->once())->method('getContext')->will($this->returnValue('context')); + $this->_asset->expects($this->once())->method('getUrl')->will($this->returnValue('url')); + $this->assertEquals('test/library.js', $this->_model->getPath()); + } + + public function testShouldNotMinifyCozExists() + { + $this->prepareAttemptToMinifyMock(true); + // IS_EXISTS is assumed by default, so nothing to mock here + $this->_adapter->expects($this->never())->method('minify'); + $this->assertStringMatchesFormat('%s_library.min.js', $this->_model->getFilePath()); + } + + /** + * @param int $mtimeOrig + * @param int $mtimeMinified + * @param bool $isMinifyExpected + * @dataProvider minifyMtimeDataProvider + */ + public function testMinifyMtime($mtimeOrig, $mtimeMinified, $isMinifyExpected) + { + $this->prepareAttemptToMinifyMock(true, false); + $model = new Minified( + $this->_asset, + $this->_logger, + $this->_filesystem, + $this->_baseUrl, + $this->_adapter, + Minified::MTIME + ); + $this->_rootDir->expects($this->any()) + ->method('getRelativePath') + ->will($this->returnValueMap(array( + array('/foo/bar/test/library.min.js', 'test/library.min.js'), + array('/foo/bar/test/library.js', 'test/library.js'), + ))); + $this->_rootDir->expects($this->once()) + ->method('isExist') + ->with('test/library.min.js') + ->will($this->returnValue(false)); + $this->_rootDir->expects($this->once()) + ->method('stat') + ->with('test/library.js') + ->will($this->returnValue(array('mtime' => $mtimeOrig))); + $this->_staticViewDir->expects($this->once()) + ->method('stat') + ->with($this->anything()) + ->will($this->returnValue(array('mtime' => $mtimeMinified))); + if ($isMinifyExpected) { + $this->_asset->expects($this->once())->method('getContent')->will($this->returnValue('content')); + $this->_adapter->expects($this->once()) + ->method('minify') + ->with('content') + ->will($this->returnValue('mini')); + $this->_staticViewDir->expects($this->once())->method('writeFile')->with($this->anything(), 'mini'); + } else { + $this->_adapter->expects($this->never())->method('minify'); + } + $this->assertStringMatchesFormat('%s_library.min.js', $model->getFilePath()); + } + + /** + * @return array + */ + public function minifyMtimeDataProvider() { - $contentType = 'content_type'; - $this->_asset->expects($this->once())->method('getContentType')->will($this->returnValue($contentType)); - $this->assertSame($contentType, $this->_model->getContentType()); + return array( + array(1, 2, true), + array(3, 3, false), + ); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifyServiceTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifyServiceTest.php index e53f16d93f3cd57479dc10167baf7f91b95880d3..86f75e2f37ab912d6e1ae6be601f4cf87d481adc 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifyServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifyServiceTest.php @@ -40,85 +40,101 @@ class MinifyServiceTest extends \PHPUnit_Framework_TestCase */ protected $_model; - /** - * @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject - */ - protected $_appState; - protected function setUp() { $this->_config = $this->getMock('Magento\Framework\View\Asset\ConfigInterface', array(), array(), '', false); - $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); - $this->_appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $directory = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false); - $filesystem->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($directory)); - $directory->expects($this->any())->method('getAbsolutePath')->will($this->returnArgument(0)); - $this->_model = new \Magento\Framework\View\Asset\MinifyService( - $this->_config, - $this->_objectManager, - $this->_appState, - $filesystem - ); + $this->_objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManager'); + $this->_model = new MinifyService($this->_config, $this->_objectManager); } - public function testGetAssets() + /** + * @param $appMode + * @param $expectedStrategy + * @dataProvider getAssetsDataProvider + */ + public function testGetAssets($appMode, $expectedStrategy) { $assetOne = $this->getMockForAbstractClass('Magento\Framework\View\Asset\LocalInterface'); - $assetOne->expects($this->once())->method('getContentType')->will($this->returnValue('js')); + $assetOne->expects($this->once()) + ->method('getContentType') + ->will($this->returnValue('js')); + $resultOne = $this->getMock('Magento\Framework\View\Asset\Minified', array(), array(), '', false); $assetTwo = $this->getMockForAbstractClass('Magento\Framework\View\Asset\LocalInterface'); - $assetTwo->expects($this->once())->method('getContentType')->will($this->returnValue('js')); - - $this->_config->expects( - $this->once() - )->method( - 'isAssetMinification' - )->with( - 'js' - )->will( - $this->returnValue(true) - ); - $this->_config->expects( - $this->once() - )->method( - 'getAssetMinificationAdapter' - )->with( - 'js' - )->will( - $this->returnValue('Magento\Framework\Code\Minifier\AdapterInterface') - ); + $assetTwo->expects($this->once()) + ->method('getContentType') + ->will($this->returnValue('js')); + $resultTwo = $this->getMock('Magento\Framework\View\Asset\Minified', array(), array(), '', false); + $this->_config->expects($this->once()) + ->method('isAssetMinification') + ->with('js') + ->will($this->returnValue(true)); + $minifier = $this->getMockForAbstractClass('Magento\Framework\Code\Minifier\AdapterInterface'); + $this->_config->expects($this->once()) + ->method('getAssetMinificationAdapter') + ->with('js') + ->will($this->returnValue('Magento\Framework\Code\Minifier\AdapterInterface')); + $this->_objectManager->expects($this->once()) + ->method('get') + ->with('Magento\Framework\Code\Minifier\AdapterInterface') + ->will($this->returnValue($minifier)); + $this->_objectManager->expects($this->exactly(2)) + ->method('create') + ->will($this->returnValueMap( + array( + array( + 'Magento\Framework\View\Asset\Minified', + array('asset' => $assetOne, 'strategy' => $expectedStrategy, 'adapter' => $minifier), + $resultOne + ), + array( + 'Magento\Framework\View\Asset\Minified', + array('asset' => $assetTwo, 'strategy' => $expectedStrategy, 'adapter' => $minifier), + $resultTwo + ), + ) + )); + $model = new MinifyService($this->_config, $this->_objectManager, $appMode); + $result = $model->getAssets(array($assetOne, $assetTwo)); + $this->assertArrayHasKey(0, $result); + $this->assertSame($resultOne, $result[0]); + $this->assertArrayHasKey(1, $result); + $this->assertSame($resultTwo, $result[1]); + } - $self = $this; - $this->_objectManager->expects($this->any())->method('create')->will( - $this->returnCallback( - function ($className) use ($self) { - return $self->getMock($className, array(), array(), '', false); - } - ) + /** + * @return array + */ + public function getAssetsDataProvider() + { + return array( + 'production' => array( + \Magento\Framework\App\State::MODE_PRODUCTION, + Minified::FILE_EXISTS + ), + 'default' => array( + \Magento\Framework\App\State::MODE_DEFAULT, + Minified::MTIME + ), + 'developer' => array( + \Magento\Framework\App\State::MODE_DEVELOPER, + Minified::MTIME + ), ); - - $minifiedAssets = $this->_model->getAssets(array($assetOne, $assetTwo)); - $this->assertCount(2, $minifiedAssets); - $this->assertNotSame($minifiedAssets[0], $minifiedAssets[1]); - $this->assertInstanceOf('Magento\Framework\View\Asset\Minified', $minifiedAssets[0]); - $this->assertInstanceOf('Magento\Framework\View\Asset\Minified', $minifiedAssets[1]); } public function testGetAssetsDisabled() { $asset = $this->getMockForAbstractClass('Magento\Framework\View\Asset\LocalInterface'); - $asset->expects($this->once())->method('getContentType')->will($this->returnValue('js')); + $asset->expects($this->once()) + ->method('getContentType') + ->will($this->returnValue('js')); - $this->_config->expects( - $this->once() - )->method( - 'isAssetMinification' - )->with( - 'js' - )->will( - $this->returnValue(false) - ); - $this->_config->expects($this->never())->method('getAssetMinificationAdapter'); + $this->_config->expects($this->once()) + ->method('isAssetMinification') + ->with('js') + ->will($this->returnValue(false)); + $this->_config->expects($this->never()) + ->method('getAssetMinificationAdapter'); $minifiedAssets = $this->_model->getAssets(array($asset)); $this->assertCount(1, $minifiedAssets); @@ -132,76 +148,42 @@ class MinifyServiceTest extends \PHPUnit_Framework_TestCase public function testGetAssetsNoAdapterDefined() { $asset = $this->getMockForAbstractClass('Magento\Framework\View\Asset\LocalInterface'); - $asset->expects($this->once())->method('getContentType')->will($this->returnValue('js')); - - $this->_config->expects( - $this->once() - )->method( - 'isAssetMinification' - )->with( - 'js' - )->will( - $this->returnValue(true) - ); - $this->_config->expects($this->once())->method('getAssetMinificationAdapter')->with('js'); + $asset->expects($this->once()) + ->method('getContentType') + ->will($this->returnValue('js')); + + $this->_config->expects($this->once()) + ->method('isAssetMinification') + ->with('js') + ->will($this->returnValue(true)); + $this->_config->expects($this->once()) + ->method('getAssetMinificationAdapter') + ->with('js'); $this->_model->getAssets(array($asset)); } - /** - * @param string $mode - * @param string $expectedStrategy - * @dataProvider getAssetsAppModesDataProvider - */ - public function testGetAssetsAppModes($mode, $expectedStrategy) + public function testGetAssetsInvalidAdapter() { - $this->_appState->expects($this->once())->method('getMode')->will($this->returnValue($mode)); - - $asset = $this->getMockForAbstractClass('Magento\Framework\View\Asset\LocalInterface'); - $asset->expects($this->once())->method('getContentType')->will($this->returnValue('js')); - - $this->_config->expects( - $this->once() - )->method( - 'isAssetMinification' - )->with( - 'js' - )->will( - $this->returnValue(true) - ); - $this->_config->expects( - $this->once() - )->method( - 'getAssetMinificationAdapter' - )->with( - 'js' - )->will( - $this->returnValue('Magento\Framework\Code\Minifier\AdapterInterface') + $this->setExpectedException( + '\Magento\Framework\Exception', + 'Invalid adapter: \'stdClass\'. Expected: \Magento\Framework\Code\Minifier\AdapterInterface' ); - - $this->_objectManager->expects($this->at(1))->method('create')->with($expectedStrategy); + $asset = $this->getMockForAbstractClass('Magento\Framework\View\Asset\LocalInterface'); + $asset->expects($this->once()) + ->method('getContentType') + ->will($this->returnValue('js')); + $this->_config->expects($this->once()) + ->method('isAssetMinification') + ->with('js') + ->will($this->returnValue(true)); + $this->_config->expects($this->once()) + ->method('getAssetMinificationAdapter') + ->with('js') + ->will($this->returnValue('StdClass')); + $obj = new \StdClass; + $this->_objectManager->expects($this->once())->method('get')->with('StdClass')->will($this->returnValue($obj)); $this->_model->getAssets(array($asset)); } - - /** - * @return array - */ - public function getAssetsAppModesDataProvider() - { - return array( - 'production' => array( - \Magento\Framework\App\State::MODE_PRODUCTION, - 'Magento\Framework\Code\Minifier\Strategy\Lite' - ), - 'default' => array( - \Magento\Framework\App\State::MODE_DEFAULT, - 'Magento\Framework\Code\Minifier\Strategy\Generate' - ), - 'developer' => array( - \Magento\Framework\App\State::MODE_DEVELOPER, - 'Magento\Framework\Code\Minifier\Strategy\Generate' - ) - ); - } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ModuleNotation/ResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ModuleNotation/ResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4a5fc45821df16c3c5b73576bfbb63383d3d380d --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ModuleNotation/ResolverTest.php @@ -0,0 +1,115 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\ModuleNotation; + +class ResolverTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Asset\File|\PHPUnit_Framework_MockObject_MockObject + */ + private $asset; + + /** + * @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject + */ + private $assetRepo; + + /** + * @var \Magento\Framework\View\Asset\ModuleNotation\Resolver; + */ + private $object; + + protected function setUp() + { + $this->asset = $this->getMock('Magento\Framework\View\Asset\File', array(), array(), '', false); + $this->assetRepo = $this->getMock('Magento\Framework\View\Asset\Repository', array(), array(), '', false); + $this->object = new \Magento\Framework\View\Asset\ModuleNotation\Resolver($this->assetRepo); + } + + public function testConvertModuleNotationToPathNoModularSeparator() + { + $this->asset->expects($this->never())->method('getPath'); + $this->assetRepo->expects($this->never())->method('createUsingContext'); + $textNoSeparator = 'name_without_double_colon.ext'; + $this->assertEquals( + $textNoSeparator, + $this->object->convertModuleNotationToPath($this->asset, $textNoSeparator) + ); + } + + /** + * @param string $assetRelPath + * @param string $relatedFieldId + * @param string $similarRelPath + * @param string $expectedResult + * @dataProvider convertModuleNotationToPathModularSeparatorDataProvider + */ + public function testConvertModuleNotationToPathModularSeparator( + $assetRelPath, $relatedFieldId, $similarRelPath, $expectedResult + ) { + $similarAsset = $this->getMock('Magento\Framework\View\Asset\File', array(), array(), '', false); + $similarAsset->expects($this->any()) + ->method('getPath') + ->will($this->returnValue($similarRelPath)); + $this->asset->expects($this->once()) + ->method('getPath') + ->will($this->returnValue($assetRelPath)); + $this->assetRepo->expects($this->once()) + ->method('createSimilar') + ->with($relatedFieldId, $this->asset) + ->will($this->returnValue($similarAsset)); + $this->assertEquals( + $expectedResult, + $this->object->convertModuleNotationToPath($this->asset, $relatedFieldId) + ); + } + + /** + * @return array + */ + public function convertModuleNotationToPathModularSeparatorDataProvider() + { + return array( + 'same module' => array( + 'area/theme/locale/Foo_Bar/styles/style.css', + 'Foo_Bar::images/logo.gif', + 'area/theme/locale/Foo_Bar/images/logo.gif', + '../images/logo.gif' + ), + 'non-modular refers to modular' => array( + 'area/theme/locale/css/admin.css', + 'Bar_Baz::images/logo.gif', + 'area/theme/locale/Bar_Baz/images/logo.gif', + '../Bar_Baz/images/logo.gif' + ), + 'different modules' => array( + 'area/theme/locale/Foo_Bar/styles/style.css', + 'Bar_Baz::images/logo.gif', + 'area/theme/locale/Bar_Baz/images/logo.gif', + '../../Bar_Baz/images/logo.gif' + ) + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ChainTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ChainTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0b50f6af01cf66ffd62ef60ae4a1ee0b3508d2d5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ChainTest.php @@ -0,0 +1,104 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\PreProcessor; + +class ChainTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Asset\LocalInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $asset; + + /** + * @var Chain + */ + private $object; + + protected function setUp() + { + $this->asset = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); + $this->asset->expects($this->once())->method('getContentType')->will($this->returnValue('assetType')); + $this->object = new Chain($this->asset, 'origContent', 'origType'); + } + + public function testGetAsset() + { + $this->assertSame($this->asset, $this->object->getAsset()); + } + + public function testGettersAndSetters() + { + $this->assertEquals('origType', $this->object->getOrigContentType()); + $this->assertEquals('origType', $this->object->getContentType()); + $this->assertEquals('origContent', $this->object->getOrigContent()); + $this->assertEquals('origContent', $this->object->getContent()); + $this->assertEquals('assetType', $this->object->getTargetContentType()); + + $this->object->setContent('anotherContent'); + $this->object->setContentType('anotherType'); + + $this->assertEquals('origType', $this->object->getOrigContentType()); + $this->assertEquals('anotherType', $this->object->getContentType()); + $this->assertEquals('origContent', $this->object->getOrigContent()); + $this->assertEquals('anotherContent', $this->object->getContent()); + $this->assertEquals('assetType', $this->object->getTargetContentType()); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage The requested asset type was 'assetType', but ended up with 'type' + */ + public function testAssertValid() + { + $this->object->setContentType('type'); + $this->object->assertValid(); + } + + /** + * @param string $content + * @param string $type + * @param bool $expected + * @dataProvider isChangedDataProvider + */ + public function testIsChanged($content, $type, $expected) + { + $this->object->setContent($content); + $this->object->setContentType($type); + $this->assertEquals($expected, $this->object->isChanged()); + } + + /** + * @return array + */ + public function isChangedDataProvider() + { + return [ + ['origContent', 'origType', false], + ['anotherContent', 'origType', true], + ['origContent', 'anotherType', true], + ['anotherContent', 'anotherType', true], + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/CompositeTest.php deleted file mode 100644 index df8908d32f25bb7dded473df3b6a735dfdc66e62..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/CompositeTest.php +++ /dev/null @@ -1,172 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset\PreProcessor; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class CompositeTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\View\Asset\PreProcessor\Composite - */ - protected $composite; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\View\Asset\PreProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ - protected $preProcessorFactoryMock; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject[] - */ - protected $callMap = array(); - - protected function setUp() - { - $this->preProcessorFactoryMock = $this->getMock( - 'Magento\Framework\View\Asset\PreProcessorFactory', - array(), - array(), - '', - false - ); - $this->objectManagerHelper = new ObjectManagerHelper($this); - } - - /** - * @param array $extension - * @param array $preProcessorsConfig - * @param array $createMap - * @dataProvider processDataProvider - */ - public function testProcess($extension, $preProcessorsConfig, $createMap) - { - $this->composite = $this->objectManagerHelper->getObject( - 'Magento\Framework\View\Asset\PreProcessor\Composite', - array( - 'preProcessorFactory' => $this->preProcessorFactoryMock, - 'preProcessorsConfig' => $preProcessorsConfig - ) - ); - - $publisherFile = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); - $publisherFile->expects($this->once())->method('getExtension')->will($this->returnValue($extension)); - - $targetDir = $this->getMock( - 'Magento\Framework\Filesystem\Directory\WriteInterface', - array(), - array(), - '', - false - ); - - foreach ($createMap as $className => $isExpected) { - $this->callMap[$className] = $this->getMock($className, array('process'), array(), '', false); - - if ($isExpected === 'expected') { - $this->callMap[$className]->expects( - $this->once() - )->method( - 'process' - )->with( - $this->equalTo($publisherFile), - $this->equalTo($targetDir) - )->will( - $this->returnValue($publisherFile) - ); - } else { - $this->callMap[$className]->expects($this->never())->method('process'); - } - } - - $this->preProcessorFactoryMock->expects( - $this->any() - )->method( - 'create' - )->will( - $this->returnCallback(array($this, 'createProcessor')) - ); - - $this->assertEquals($publisherFile, $this->composite->process($publisherFile, $targetDir)); - } - - /** - * Create pre-processor callback - * - * @param string $className - * @return \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface[] - */ - public function createProcessor($className) - { - return $this->callMap[$className]; - } - - /** - * @return array - */ - public function processDataProvider() - { - return array( - 'list of processors for css' => array( - 'extension' => 'css', - 'preProcessorsConfig' => array( - 'css_preprocessor' => array( - 'class' => 'Magento\Framework\Css\PreProcessor\Composite', - 'asset_type' => 'css' - ), - 'css_preprocessor2' => array( - 'class' => 'Magento\Framework\Css\PreProcessor\Composite2', - 'asset_type' => 'css' - ) - ), - 'createMap' => array( - 'Magento\Framework\Css\PreProcessor\Composite' => 'expected', - 'Magento\Framework\Css\PreProcessor\Composite2' => 'expected' - ) - ), - 'one processor for css' => array( - 'extension' => 'css', - 'preProcessorsConfig' => array( - 'css_preprocessor' => array( - 'class' => 'Magento\Framework\Css\PreProcessor\Composite', - 'asset_type' => 'css' - ) - ), - 'createMap' => array('Magento\Framework\Css\PreProcessor\Composite' => 'expected') - ), - 'no processors' => array('extension' => 'css', 'preProcessorsConfig' => array(), 'createMap' => array()), - 'one processor for xyz' => array( - 'extension' => 'css', - 'preProcessorsConfig' => array( - 'css_preprocessor' => array( - 'class' => 'Magento\Framework\Css\PreProcessor\Composite', - 'asset_type' => 'xyz' - ) - ), - 'createMap' => array('Magento\Framework\Css\PreProcessor\Composite' => 'not expected') - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ModuleNotationTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ModuleNotationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5a24c77a20cf3396c83330b58c43e89367c74456 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/ModuleNotationTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\PreProcessor; + +class ModuleNotationTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Asset\PreProcessor\ModuleNotation + */ + protected $moduleNotation; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $cssResolverMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $assetMock; + + protected function setUp() + { + $this->assetMock = $this->getMock('Magento\Framework\View\Asset\File', array(), array(), '', false); + $this->cssResolverMock = $this->getMock('Magento\Framework\View\Url\CssResolver', array(), array(), '', false); + $notationResolver = $this->getMock( + '\Magento\Framework\View\Asset\ModuleNotation\Resolver', array(), array(), '', false + ); + $this->moduleNotation = new ModuleNotation( + $this->cssResolverMock, $notationResolver + ); + } + + public function testProcess() + { + $content = 'ol.favicon {background: url(Magento_Theme::favicon.ico)}'; + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain($this->assetMock, $content, 'css'); + $replacedContent = 'Foo_Bar/images/logo.gif'; + $this->cssResolverMock->expects($this->once()) + ->method('replaceRelativeUrls') + ->with($content, $this->isInstanceOf('Closure')) + ->will($this->returnValue($replacedContent)); + $this->assertSame($content, $chain->getContent()); + $this->moduleNotation->process($chain); + $this->assertSame($replacedContent, $chain->getContent()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/PoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/PoolTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f85983d21d61ac3f68bd89b75f3afd6822b8cf76 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PreProcessor/PoolTest.php @@ -0,0 +1,93 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\PreProcessor; + +class PoolTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Asset\PreProcessor\Pool + */ + protected $factory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $objectManager; + + protected function setUp() + { + $this->objectManager = $this->getMock('Magento\Framework\ObjectManager'); + $this->factory = new Pool($this->objectManager); + } + + /** + * @param string $sourceContentType + * @param string $targetContentType + * @param array $expectedResult + * + * @dataProvider getPreProcessorsDataProvider + */ + public function testGetPreProcessors($sourceContentType, $targetContentType, array $expectedResult) + { + // Make the object manager to return strings for simplicity of mocking + $this->objectManager->expects($this->any()) + ->method('get') + ->with($this->anything()) + ->will($this->returnArgument(0)); + $this->assertSame($expectedResult, $this->factory->getPreProcessors($sourceContentType, $targetContentType)); + } + + public function getPreProcessorsDataProvider() + { + return array( + 'css => css' => array( + 'css', 'css', + array('Magento\Framework\View\Asset\PreProcessor\ModuleNotation'), + ), + 'css => less (irrelevant)' => array( + 'css', 'less', + array(), + ), + 'less => css' => array( + 'less', 'css', + array( + 'Magento\Framework\Css\PreProcessor\Less', + 'Magento\Framework\View\Asset\PreProcessor\ModuleNotation', + ), + ), + 'less => less' => array( + 'less', 'less', + array( + 'Magento\Framework\Less\PreProcessor\Instruction\MagentoImport', + 'Magento\Framework\Less\PreProcessor\Instruction\Import', + ), + ), + 'txt => log (unsupported)' => array( + 'txt', 'log', + array(), + ), + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PublicFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PublicFileTest.php deleted file mode 100644 index 96b66608a5b214826615f4e05d214dcb75c91480..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/PublicFileTest.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset; - -class PublicFileTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\View\Asset\PublicFile - */ - protected $_object; - - /** - * @var \Magento\Framework\View\Url|PHPUnit_Framework_MockObject_MockObject - */ - protected $_viewUrl; - - protected function setUp() - { - $this->_viewUrl = $this->getMock('Magento\Framework\View\Url', array(), array(), '', false); - $this->_object = new \Magento\Framework\View\Asset\PublicFile($this->_viewUrl, 'test/style.css', 'css'); - } - - public function testGetUrl() - { - $url = 'http://127.0.0.1/magento/test/style.css'; - $this->_viewUrl->expects( - $this->once() - )->method( - 'getPublicFileUrl' - )->with( - 'test/style.css' - )->will( - $this->returnValue($url) - ); - $this->assertEquals($url, $this->_object->getUrl()); - } - - public function testGetContentType() - { - $this->assertEquals('css', $this->_object->getContentType()); - } - - public function testGetSourceFile() - { - $this->assertSame('test/style.css', $this->_object->getSourceFile()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5557fbb9a3423bde46c65ffa6437446df007ee70 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/RepositoryTest.php @@ -0,0 +1,328 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset; + +class RepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\UrlInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $baseUrl; + + /** + * @var \Magento\Framework\View\DesignInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $design; + + /** + * @var \Magento\Framework\View\Design\Theme\Provider|\PHPUnit_Framework_MockObject_MockObject + */ + private $themeProvider; + + /** + * @var \Magento\Framework\View\Asset\Source|\PHPUnit_Framework_MockObject_MockObject + */ + private $source; + + /** + * @var \Magento\Framework\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $theme; + + /** + * @var Repository + */ + private $object; + + protected function setUp() + { + $this->themeProvider = $this->getMock( + '\Magento\Framework\View\Design\Theme\Provider', array(), array(), '', false + ); + $this->source = $this->getMock( + 'Magento\Framework\View\Asset\Source', array('getFile', 'getContent'), array(), '', false + ); + $this->baseUrl = $this->getMockForAbstractClass('Magento\Framework\UrlInterface'); + $this->design = $this->getMockForAbstractClass('Magento\Framework\View\DesignInterface'); + $this->theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $this->object = new Repository($this->baseUrl, $this->design, $this->themeProvider, $this->source); + } + + /** + * @expectedException \UnexpectedValueException + * @expectedExceptionMessage Could not find theme 'nonexistent_theme' for area 'area' + */ + public function testUpdateDesignParamsWrongTheme() + { + $params = array('area' => 'area', 'theme' => 'nonexistent_theme'); + $this->themeProvider->expects($this->once()) + ->method('getThemeModel') + ->with('nonexistent_theme', 'area') + ->will($this->returnValue(null)); + $this->object->updateDesignParams($params); + } + + public function testCreateAsset() + { + $this->mockDesign(); + $this->baseUrl->expects($this->once()) + ->method('getBaseUrl') + ->will($this->returnValue('http://example.com/static/')); + $asset = $this->object->createAsset('test/file.js'); + $this->assertInstanceOf('\Magento\Framework\View\Asset\File', $asset); + $this->assertEquals('area/theme/locale/test/file.js', $asset->getPath()); + $this->assertEquals('test/file.js', $asset->getFilePath()); + $this->assertEquals('js', $asset->getContentType()); + $this->assertInstanceOf('\Magento\Framework\View\Asset\File\FallbackContext', $asset->getContext()); + $this->assertEquals('', $asset->getModule()); + $this->assertEquals('http://example.com/static/area/theme/locale/test/file.js', $asset->getUrl()); + + $this->source->expects($this->once())->method('getFile')->with($asset)->will($this->returnValue('source')); + $this->source->expects($this->once())->method('getContent')->with($asset)->will($this->returnValue('content')); + $this->assertEquals('source', $asset->getSourceFile()); + $this->assertEquals('content', $asset->getContent()); + + $anotherAsset = $this->object->createAsset('another/file.id'); + $this->assertSame($anotherAsset->getContext(), $asset->getContext()); + } + + public function testCreateAssetModular() + { + $this->mockDesign(); + $asset = $this->object->createAsset('Module_Name::test/file.js'); + $this->assertEquals('Module_Name', $asset->getModule()); + $this->assertEquals('test/file.js', $asset->getFilePath()); + } + + public function testGetStaticViewFileContext() + { + $this->mockDesign(); + $context = $this->object->getStaticViewFileContext(); + $this->assertInstanceOf('\Magento\Framework\View\Asset\ContextInterface', $context); + $this->assertSame($context, $this->object->getStaticViewFileContext()); // to ensure in-memory caching + $asset = $this->object->createAsset('test/file.js'); + $this->assertSame($context, $asset->getContext()); // and once again to ensure in-memory caching for real + } + + /** + * @param string $fileId + * @param string $similarToModule + * @param string $expectedPath + * @param string $expectedType + * @param string $expectedModule + * @dataProvider createSimilarDataProvider + */ + public function testCreateSimilar($fileId, $similarToModule, $expectedPath, $expectedType, $expectedModule) + { + $similarTo = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); + $context = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\ContextInterface'); + $similarTo->expects($this->once())->method('getContext')->will($this->returnValue($context)); + $similarTo->expects($this->any())->method('getModule')->will($this->returnValue($similarToModule)); + $asset = $this->object->createSimilar($fileId, $similarTo); + $this->assertInstanceOf('\Magento\Framework\View\Asset\File', $asset); + $this->assertSame($context, $asset->getContext()); + $this->assertEquals($expectedPath, $asset->getFilePath()); + $this->assertEquals($expectedType, $asset->getContentType()); + $this->assertEquals($expectedModule, $asset->getModule()); + } + + /** + * @return array + */ + public function createSimilarDataProvider() + { + return array( + array('test/file.css', '', 'test/file.css', 'css', ''), + array('test/file.js', '', 'test/file.js', 'js', ''), + array('test/file.css', 'Module_Name', 'test/file.css', 'css', 'Module_Name'), + array('Module_Name::test/file.css', 'Module_Two', 'test/file.css', 'css', 'Module_Name'), + ); + } + + /** + * @param string $filePath + * @param string $dirPath + * @param string $baseUrlType + * @param string $expectedType + * @param string $expectedUrl + * @dataProvider createArbitraryDataProvider + */ + public function testCreateArbitrary($filePath, $dirPath, $baseUrlType, $expectedType, $expectedUrl) + { + $this->baseUrl->expects($this->once()) + ->method('getBaseUrl') + ->will($this->returnValueMap(array( + array(array('_type' => 'static'), 'http://example.com/static/'), + array(array('_type' => 'media'), 'http://example.com/media/'), + ))); + $dirType = 'dirType'; + $asset = $this->object->createArbitrary($filePath, $dirPath, $dirType, $baseUrlType); + $this->assertInstanceOf('\Magento\Framework\View\Asset\File', $asset); + $this->assertEquals($expectedType, $asset->getContentType()); + $this->assertEquals($expectedUrl, $asset->getUrl()); + $this->assertEquals($dirType, $asset->getContext()->getBaseDirType()); + + $anotherAsset = $this->object->createArbitrary('another/path.js', $dirPath, $dirType, $baseUrlType); + $this->assertSame($anotherAsset->getContext(), $asset->getContext()); + } + + /** + * @return array + */ + public function createArbitraryDataProvider() + { + return array( + array('test/example.js', 'dir/path', 'static', 'js', 'http://example.com/static/dir/path/test/example.js'), + array('test/example.css', '', 'media', 'css', 'http://example.com/media/test/example.css'), + array('img/logo.gif', 'uploaded', 'media', 'gif', 'http://example.com/media/uploaded/img/logo.gif'), + ); + } + + /** + * @param string $fileId + * @param string $relFilePath + * @param string $relModule + * @param string $expFilePath + * @param string $expType + * @param string $expModule + * @dataProvider createRelatedDataProvider + */ + public function testCreateRelated($fileId, $relFilePath, $relModule, $expFilePath, $expType, $expModule) + { + $relativeTo = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); + $context = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\ContextInterface'); + $relativeTo->expects($this->once())->method('getContext')->will($this->returnValue($context)); + $relativeTo->expects($this->any())->method('getModule')->will($this->returnValue($relModule)); + $relativeTo->expects($this->any())->method('getFilePath')->will($this->returnValue($relFilePath)); + $asset = $this->object->createRelated($fileId, $relativeTo); + $this->assertInstanceOf('\Magento\Framework\View\Asset\File', $asset); + $this->assertSame($context, $asset->getContext()); + $this->assertEquals($expFilePath, $asset->getFilePath()); + $this->assertEquals($expType, $asset->getContentType()); + $this->assertEquals($expModule, $asset->getModule()); + } + + /** + * @return array + */ + public function createRelatedDataProvider() + { + return array( + array('test/file.ext', 'rel/file.ext2', '', 'rel/test/file.ext', 'ext', ''), + array('test/file.ext', 'rel/file.ext2', 'Module_Name', 'rel/test/file.ext', 'ext', 'Module_Name'), + array('Module_One::test/file.ext', 'rel/file.ext2', 'Module_Two', 'test/file.ext', 'ext', 'Module_One'), + array('Module_Name::test/file.ext', '', '', 'test/file.ext', 'ext', 'Module_Name'), + ); + } + + public function testCreateRemoteAsset() + { + $asset = $this->object->createRemoteAsset('url', 'type'); + $this->assertInstanceOf('\Magento\Framework\View\Asset\Remote', $asset); + $this->assertEquals('url', $asset->getUrl()); + $this->assertEquals('type', $asset->getContentType()); + } + + public function testGetUrl() + { + $this->mockDesign(); + $this->baseUrl->expects($this->once()) + ->method('getBaseUrl') + ->will($this->returnValue('http://example.com/static/')); + $result = $this->object->getUrl('Module_Name::img/product/placeholder.png'); + $this->assertEquals( + 'http://example.com/static/area/theme/locale/Module_Name/img/product/placeholder.png', + $result + ); + } + + public function testGetUrlWithParams() + { + $defaultTheme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $defaults = array( + 'area' => 'area', + 'themeModel' => $defaultTheme, + 'locale' => 'locale', + ); + $this->design->expects($this->once())->method('getDesignParams')->will($this->returnValue($defaults)); + $this->design->expects($this->once()) + ->method('getConfigurationDesignTheme') + ->with('custom_area') + ->will($this->returnValue(false)); + $this->design->expects($this->any()) + ->method('getThemePath') + ->with($this->theme) + ->will($this->returnValue('custom_theme')); + $this->baseUrl->expects($this->once()) + ->method('getBaseUrl') + ->will($this->returnValue('http://example.com/static/')); + $params = array( + 'area' => 'custom_area', + 'locale' => 'en_US', + 'module' => 'This_Shall_Not_Be_Used', + ); + $result = $this->object->getUrlWithParams('Module_Name::file.ext', $params); + $this->assertEquals('http://example.com/static/custom_area/custom_theme/en_US/Module_Name/file.ext', $result); + } + + private function mockDesign() + { + $params = array( + 'area' => 'area', + 'themeModel' => $this->theme, + 'locale' => 'locale', + ); + $this->design->expects($this->atLeastOnce())->method('getDesignParams')->will($this->returnValue($params)); + $this->design->expects($this->any()) + ->method('getConfigurationDesignTheme') + ->with('area') + ->will($this->returnValue($this->theme)); + $this->design->expects($this->any()) + ->method('getThemePath') + ->with($this->theme) + ->will($this->returnValue('theme')); + $this->themeProvider->expects($this->any())->method('getThemeModel')->will($this->returnValue($this->theme)); + + } + + /** + * @expectedException \Magento\Framework\Exception + * @expectedExceptionMessage Scope separator "::" cannot be used without scope identifier. + */ + public function testExtractModuleException() + { + Repository::extractModule('::no_scope.ext'); + } + + public function testExtractModule() + { + $this->assertEquals(array('Module_One', 'File'), Repository::extractModule('Module_One::File')); + $this->assertEquals(array('', 'File'), Repository::extractModule('File')); + $this->assertEquals( + array('Module_One', 'File::SomethingElse'), + Repository::extractModule('Module_One::File::SomethingElse') + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9de5079188ebed403f4029234c51f44c17548016 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php @@ -0,0 +1,320 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset; + +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class SourceTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject + */ + private $filesystem; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $rootDirRead; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $varDir; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $staticDirRead; + + /** + * @var \Magento\Framework\View\Asset\PreProcessor\Cache|\PHPUnit_Framework_MockObject_MockObject + */ + private $cache; + + /** + * @var \Magento\Framework\View\Asset\PreProcessor\Pool|\PHPUnit_Framework_MockObject_MockObject + */ + private $preProcessorPool; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile|\PHPUnit_Framework_MockObject_MockObject + */ + private $viewFileResolution; + + /** + * @var \Magento\Framework\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $theme; + + /** + * @var Source + */ + private $object; + + protected function setUp() + { + $this->cache = $this->getMock( + 'Magento\Framework\View\Asset\PreProcessor\Cache', array(), array(), '', false + ); + $this->preProcessorPool = $this->getMock( + 'Magento\Framework\View\Asset\PreProcessor\Pool', array(), array(), '', false + ); + $this->viewFileResolution = $this->getMock( + 'Magento\Framework\View\Design\FileResolution\Fallback\StaticFile', array(), array(), '', false + ); + $this->theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + + $themeProvider = $this->getMock('Magento\Framework\View\Design\Theme\Provider', array(), array(), '', false); + $themeProvider->expects($this->any()) + ->method('getThemeModel') + ->with('magento_theme', 'frontend') + ->will($this->returnValue($this->theme)); + + $this->initFilesystem(); + + $this->object = new Source( + $this->cache, + $this->filesystem, + $this->preProcessorPool, + $this->viewFileResolution, + $themeProvider + ); + } + + public function testGetFileNoOriginalFile() + { + $this->viewFileResolution->expects($this->once()) + ->method('getFile') + ->with('frontend', $this->theme, 'en_US', 'some/file.ext', 'Magento_Module') + ->will($this->returnValue(false)); + $this->assertFalse($this->object->getFile($this->getAsset())); + } + + public function testGetFileNoOriginalFileBasic() + { + $this->staticDirRead->expects($this->once()) + ->method('getAbsolutePath') + ->with('some/file.ext') + ->will($this->returnValue(false)); + $this->assertFalse($this->object->getFile($this->getAsset(false))); + } + + public function testGetFileCached() + { + $root = '/root/some/file.ext'; + $expected = '/var/some/file.ext'; + $filePath = 'some/file.ext'; + $this->viewFileResolution->expects($this->once()) + ->method('getFile') + ->with('frontend', $this->theme, 'en_US', $filePath, 'Magento_Module') + ->will($this->returnValue($root)); + $this->rootDirRead->expects($this->once()) + ->method('getRelativePath') + ->with($root) + ->will($this->returnValue($filePath)); + $this->cache->expects($this->once()) + ->method('load') + ->with("some/file.ext:{$filePath}") + ->will($this->returnValue(serialize(array(\Magento\Framework\App\Filesystem::VAR_DIR, $filePath)))); + + $this->varDir->expects($this->once())->method('getAbsolutePath') + ->with($filePath) + ->will($this->returnValue($expected)); + $this->assertSame($expected, $this->object->getFile($this->getAsset())); + } + + /** + * @param string $origFile + * @param string $origPath + * @param string $origContentType + * @param string $origContent + * @param string $isMaterialization + * @dataProvider getFileDataProvider + */ + public function testGetFile($origFile, $origPath, $origContentType, $origContent, $isMaterialization) + { + $filePath = 'some/file.ext'; + $cacheValue = "{$origPath}:{$filePath}"; + $this->viewFileResolution->expects($this->once()) + ->method('getFile') + ->with('frontend', $this->theme, 'en_US', $filePath, 'Magento_Module') + ->will($this->returnValue($origFile)); + $this->rootDirRead->expects($this->once()) + ->method('getRelativePath') + ->with($origFile) + ->will($this->returnValue($origPath)); + $this->cache->expects($this->once()) + ->method('load') + ->will($this->returnValue(false)); + $this->rootDirRead->expects($this->once()) + ->method('readFile') + ->with($origPath) + ->will($this->returnValue($origContent)); + $processor = $this->getMockForAbstractClass('Magento\Framework\View\Asset\PreProcessorInterface'); + $this->preProcessorPool->expects($this->once()) + ->method('getPreProcessors') + ->with($origContentType, 'ext') + ->will($this->returnValue([$processor])); + $processor->expects($this->once()) + ->method('process') + ->will($this->returnCallback(array($this, 'chainTestCallback'))); + if ($isMaterialization) { + $this->varDir->expects($this->once()) + ->method('writeFile') + ->with('view_preprocessed/source/some/file.ext', 'processed'); + $this->cache->expects($this->once()) + ->method('save') + ->with( + serialize([\Magento\Framework\App\Filesystem::VAR_DIR, 'view_preprocessed/source/some/file.ext']), + $cacheValue + ); + $this->varDir->expects($this->once()) + ->method('getAbsolutePath') + ->with('view_preprocessed/source/some/file.ext')->will($this->returnValue('result')); + } else { + $this->varDir->expects($this->never())->method('writeFile'); + $this->cache->expects($this->once()) + ->method('save') + ->with(serialize([\Magento\Framework\App\Filesystem::ROOT_DIR, 'source/some/file.ext']), $cacheValue); + $this->rootDirRead->expects($this->once()) + ->method('getAbsolutePath') + ->with('source/some/file.ext') + ->will($this->returnValue('result')); + } + $this->assertSame('result', $this->object->getFile($this->getAsset())); + } + + /** + * @param string $path + * @param string $expected + * @dataProvider getContentTypeDataProvider + */ + public function testGetContentType($path, $expected) + { + $this->assertEquals($expected, $this->object->getContentType($path)); + } + + /** + * @return array + */ + public function getContentTypeDataProvider() + { + return [ + ['', ''], + ['path/file', ''], + ['path/file.ext', 'ext'], + ]; + } + + /** + * A callback for affecting preprocessor chain in the test + * + * @param \Magento\Framework\View\Asset\PreProcessor\Chain $chain + */ + public function chainTestCallback(\Magento\Framework\View\Asset\PreProcessor\Chain $chain) + { + $chain->setContentType('ext'); + $chain->setContent('processed'); + } + + /** + * @return array + */ + public function getFileDataProvider() + { + return [ + ['/root/some/file.ext', 'source/some/file.ext', 'ext', 'processed', false], + ['/root/some/file.ext', 'source/some/file.ext', 'ext', 'not_processed', true], + ['/root/some/file.ext2', 'source/some/file.ext2', 'ext2', 'processed', true], + ['/root/some/file.ext2', 'source/some/file.ext2', 'ext2', 'not_processed', true], + ]; + } + + protected function initFilesystem() + { + $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); + $this->rootDirRead = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\ReadInterface'); + $this->staticDirRead = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\ReadInterface'); + $this->varDir = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface'); + + $readDirMap = [ + [\Magento\Framework\App\Filesystem::ROOT_DIR, $this->rootDirRead], + [\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->staticDirRead], + [\Magento\Framework\App\Filesystem::VAR_DIR, $this->varDir], + ]; + + $this->filesystem->expects($this->any()) + ->method('getDirectoryRead') + ->will($this->returnValueMap($readDirMap)); + $this->filesystem->expects($this->any()) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::VAR_DIR) + ->will($this->returnValue($this->varDir)); + } + + /** + * Create an asset mock + * + * @param bool $isFallback + * @return \Magento\Framework\View\Asset\File|\PHPUnit_Framework_MockObject_MockObject + */ + protected function getAsset($isFallback = true) + { + if ($isFallback) { + $context = new \Magento\Framework\View\Asset\File\FallbackContext( + 'http://example.com/static/', + 'frontend', + 'magento_theme', + 'en_US' + ); + } else { + $context = new \Magento\Framework\View\Asset\File\Context( + 'http://example.com/static/', + \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, + '' + ); + } + + $asset = $this->getMock('Magento\Framework\View\Asset\File', array(), array(), '', false); + $asset->expects($this->any()) + ->method('getContext') + ->will($this->returnValue($context)); + $asset->expects($this->any()) + ->method('getFilePath') + ->will($this->returnValue('some/file.ext')); + $asset->expects($this->any()) + ->method('getPath') + ->will($this->returnValue('some/file.ext')); + $asset->expects($this->any()) + ->method('getModule') + ->will($this->returnValue('Magento_Module')); + $asset->expects($this->any()) + ->method('getContentType') + ->will($this->returnValue('ext')); + + return $asset; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ViewFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ViewFileTest.php deleted file mode 100644 index cc8134a19c3c50afa8371e3200e6aab551d9e04c..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/ViewFileTest.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset; - -class ViewFileTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\View\Asset\ViewFile - */ - protected $_object; - - /** - * @var \Magento\Framework\View\Url|PHPUnit_Framework_MockObject_MockObject - */ - protected $_viewUrl; - - protected function setUp() - { - $this->_viewUrl = $this->getMock('Magento\Framework\View\Url', array(), array(), '', false); - $this->_object = new \Magento\Framework\View\Asset\ViewFile($this->_viewUrl, 'test/script.js', 'js'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Parameter 'file' must not be empty - */ - public function testConstructorException() - { - new \Magento\Framework\View\Asset\ViewFile($this->_viewUrl, '', 'unknown'); - } - - public function testGetUrl() - { - $url = 'http://127.0.0.1/magento/test/script.js'; - $this->_viewUrl->expects( - $this->once() - )->method( - 'getViewFileUrl' - )->with( - 'test/script.js' - )->will( - $this->returnValue($url) - ); - $this->assertEquals($url, $this->_object->getUrl()); - } - - public function testGetContentType() - { - $this->assertEquals('js', $this->_object->getContentType()); - } - - public function testGetSourceFile() - { - $sourcePath = '/source_dir/test/script.js'; - $this->_viewUrl->expects( - $this->once() - )->method( - 'getViewFilePublicPath' - )->with( - 'test/script.js' - )->will( - $this->returnValue($sourcePath) - ); - $this->assertEquals($sourcePath, $this->_object->getSourceFile()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/FactoryTest.php deleted file mode 100644 index 02d03e3d8e9910610390c09db17e77d432ad8f10..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/FactoryTest.php +++ /dev/null @@ -1,279 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\Fallback; - -/** - * Factory Test - * - */ -class FactoryTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var Factory - */ - protected $model; - - /** - * @var array - */ - protected $defaultParams; - - protected function setUp() - { - $filesystemMock = $this->getMock( - '\Magento\Framework\App\Filesystem', - array('getPath', 'getDirectoryRead', '__wakeup'), - array( - 'dir' => array( - \Magento\Framework\App\Filesystem::THEMES_DIR => 'themes', - \Magento\Framework\App\Filesystem::MODULES_DIR => 'modules', - \Magento\Framework\App\Filesystem::PUB_LIB_DIR => 'pub_lib' - ) - ), - '', - false - ); - $filesystemMock->expects( - $this->any() - )->method( - 'getPath' - )->will( - $this->returnValueMap( - array( - \Magento\Framework\App\Filesystem::THEMES_DIR => 'themes', - \Magento\Framework\App\Filesystem::MODULES_DIR => 'modules', - \Magento\Framework\App\Filesystem::PUB_LIB_DIR => 'pub_lib' - ) - ) - ); - - $this->model = new Factory($filesystemMock); - - $parentTheme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); - $parentTheme->expects($this->any())->method('getThemePath')->will($this->returnValue('parent_theme_path')); - - $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); - $theme->expects($this->any())->method('getThemePath')->will($this->returnValue('current_theme_path')); - $theme->expects($this->any())->method('getParentTheme')->will($this->returnValue($parentTheme)); - - $this->defaultParams = array( - 'area' => 'area', - 'theme' => $theme, - 'namespace' => 'namespace', - 'module' => 'module', - 'locale' => 'en_US' - ); - } - - protected function tearDown() - { - $this->model = null; - $this->defaultParams = array(); - } - - public function testCreateLocaleFileRule() - { - $actualResult = $this->model->createLocaleFileRule(); - $this->assertInstanceOf('\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', $actualResult); - $this->assertNotSame($actualResult, $this->model->createLocaleFileRule()); - } - - public function testCreateLocaleFileRuleGetPatternDirs() - { - $expectedResult = array('/area/current_theme_path/i18n/en_US', '/area/parent_theme_path/i18n/en_US'); - $this->assertSame($expectedResult, $this->model->createLocaleFileRule()->getPatternDirs($this->defaultParams)); - } - - /** - * @param array $overriddenParams - * @param string $expectedErrorMessage - * @dataProvider createLocaleFileRuleGetPatternDirsExceptionDataProvider - */ - public function testCreateLocaleFileRuleGetPatternDirsException(array $overriddenParams, $expectedErrorMessage) - { - $this->setExpectedException('InvalidArgumentException', $expectedErrorMessage); - $this->model->createLocaleFileRule()->getPatternDirs($overriddenParams + $this->defaultParams); - } - - /** - * @return array - */ - public function createLocaleFileRuleGetPatternDirsExceptionDataProvider() - { - return array( - 'no theme' => array( - array('theme' => null), - 'Parameter "theme" should be specified and should implement the theme interface' - ), - 'no area' => array(array('area' => null), "Required parameter 'area' was not passed"), - 'no locale' => array(array('locale' => null), "Required parameter 'locale' was not passed") - ); - } - - public function testCreateFileRule() - { - $actualResult = $this->model->createFileRule(); - $this->assertInstanceOf('\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', $actualResult); - $this->assertNotSame($actualResult, $this->model->createFileRule()); - } - - /** - * @param array $overriddenParams - * @param array $expectedResult - * @dataProvider createFileRuleGetPatternDirsDataProvider - */ - public function testCreateFileRuleGetPatternDirs(array $overriddenParams, array $expectedResult) - { - $actualResult = $this->model->createFileRule()->getPatternDirs($overriddenParams + $this->defaultParams); - $this->assertEquals($expectedResult, $actualResult); - } - - /** - * @return array - */ - public function createFileRuleGetPatternDirsDataProvider() - { - return array( - 'modular' => array( - array(), - array( - '/area/current_theme_path/namespace_module', - '/area/parent_theme_path/namespace_module', - '/namespace/module/view/area', - '/namespace/module/view/base' - ) - ), - 'non-modular' => array( - array('namespace' => null, 'module' => null), - array('/area/current_theme_path', '/area/parent_theme_path') - ) - ); - } - - /** - * @param array $overriddenParams - * @param $expectedErrorMessage - * @dataProvider createRuleGetPatternDirsExceptionDataProvider - */ - public function testCreateFileRuleGetPatternDirsException(array $overriddenParams, $expectedErrorMessage) - { - $this->setExpectedException('InvalidArgumentException', $expectedErrorMessage); - $this->model->createFileRule()->getPatternDirs($overriddenParams + $this->defaultParams); - } - - public function testCreateViewFileRule() - { - $actualResult = $this->model->createViewFileRule(); - $this->assertInstanceOf('\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', $actualResult); - $this->assertNotSame($actualResult, $this->model->createViewFileRule()); - } - - /** - * @param array $overriddenParams - * @param array $expectedResult - * @dataProvider createViewFileRuleGetPatternDirsDataProvider - */ - public function testCreateViewFileRuleGetPatternDirs(array $overriddenParams, array $expectedResult) - { - $actualResult = $this->model->createViewFileRule()->getPatternDirs($overriddenParams + $this->defaultParams); - $this->assertEquals($expectedResult, $actualResult); - } - - /** - * @return array - */ - public function createViewFileRuleGetPatternDirsDataProvider() - { - return array( - 'modular localized' => array( - array(), - array( - '/area/current_theme_path/i18n/en_US/namespace_module', - '/area/current_theme_path/namespace_module', - '/area/parent_theme_path/i18n/en_US/namespace_module', - '/area/parent_theme_path/namespace_module', - '/namespace/module/view/area/i18n/en_US', - '/namespace/module/view/area', - '/namespace/module/view/base' - ) - ), - 'modular non-localized' => array( - array('locale' => null), - array( - '/area/current_theme_path/namespace_module', - '/area/parent_theme_path/namespace_module', - '/namespace/module/view/area', - '/namespace/module/view/base' - ) - ), - 'non-modular localized' => array( - array('module' => null, 'namespace' => null), - array( - '/area/current_theme_path/i18n/en_US', - '/area/current_theme_path', - '/area/parent_theme_path/i18n/en_US', - '/area/parent_theme_path', - '' - ) - ), - 'non-modular non-localized' => array( - array('module' => null, 'namespace' => null, 'locale' => null), - array('/area/current_theme_path', '/area/parent_theme_path', '') - ) - ); - } - - /** - * @param array $overriddenParams - * @param $expectedErrorMessage - * @dataProvider createRuleGetPatternDirsExceptionDataProvider - */ - public function testCreateViewFileRuleGetPatternDirsException(array $overriddenParams, $expectedErrorMessage) - { - $this->setExpectedException('InvalidArgumentException', $expectedErrorMessage); - $this->model->createViewFileRule()->getPatternDirs($overriddenParams + $this->defaultParams); - } - - /** - * @return array - */ - public function createRuleGetPatternDirsExceptionDataProvider() - { - return array( - 'no theme' => array( - array('theme' => null), - 'Parameter "theme" should be specified and should implement the theme interface' - ), - 'no area' => array(array('area' => null), "Required parameter 'area' was not passed"), - 'no namespace' => array( - array('namespace' => null), - "Parameters 'namespace' and 'module' should either be both set or unset" - ), - 'no module' => array( - array('module' => null), - "Parameters 'namespace' and 'module' should either be both set or unset" - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/RulePoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/RulePoolTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f02f39d5e5fbf9fc34131a6f9cb1d92e0ad044ef --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/RulePoolTest.php @@ -0,0 +1,305 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\View\Design\Fallback; + +/** + * Factory Test + */ +class RulePoolTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var RulePool + */ + protected $model; + + /** + * @var array + */ + protected $defaultParams; + + protected function setUp() + { + $filesystemMock = $this->getMock( + '\Magento\Framework\App\Filesystem', + array('getPath', 'getDirectoryRead', '__wakeup'), + array( + 'dir' => array( + \Magento\Framework\App\Filesystem::THEMES_DIR => 'themes', + \Magento\Framework\App\Filesystem::MODULES_DIR => 'modules', + \Magento\Framework\App\Filesystem::LIB_WEB => 'lib_web', + ) + ), + '', + false + ); + $filesystemMock->expects( + $this->any() + )->method( + 'getPath' + )->will( + $this->returnValueMap( + array( + \Magento\Framework\App\Filesystem::THEMES_DIR => 'themes', + \Magento\Framework\App\Filesystem::MODULES_DIR => 'modules', + \Magento\Framework\App\Filesystem::LIB_WEB => 'lib_web', + ) + ) + ); + + $this->model = new RulePool($filesystemMock); + + $parentTheme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $parentTheme->expects($this->any())->method('getThemePath')->will($this->returnValue('parent_theme_path')); + + $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $theme->expects($this->any())->method('getThemePath')->will($this->returnValue('current_theme_path')); + $theme->expects($this->any())->method('getParentTheme')->will($this->returnValue($parentTheme)); + + $this->defaultParams = array( + 'area' => 'area', + 'theme' => $theme, + 'namespace' => 'namespace', + 'module' => 'module', + 'locale' => 'en_US' + ); + } + + protected function tearDown() + { + $this->model = null; + $this->defaultParams = array(); + } + + /** + * @param string $type + * + * @dataProvider getRuleDataProvider + */ + public function testGetRule($type) + { + $actualResult = $this->model->getRule($type); + $this->assertInstanceOf('\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', $actualResult); + $this->assertSame($actualResult, $this->model->getRule($type)); + } + + /** + * @return array + */ + public function getRuleDataProvider() + { + return [ + [\Magento\Framework\View\Design\Fallback\RulePool::TYPE_LOCALE_FILE], + [\Magento\Framework\View\Design\Fallback\RulePool::TYPE_FILE], + [\Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE], + [\Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE], + ]; + } + + /** + * @expectedException \InvalidArgumentException + * @expectedException Fallback rule 'unsupported_type' is not supported + */ + public function testGetRuleUnsupportedType() + { + $this->model->getRule('unsupported_type'); + } + + /** + * @param string $type + * @param array $overriddenParams + * @param string $expectedErrorMessage + * + * @dataProvider getPatternDirsExceptionDataProvider + */ + public function testGetPatternDirsException($type, array $overriddenParams, $expectedErrorMessage) + { + $this->setExpectedException('InvalidArgumentException', $expectedErrorMessage); + $this->model->getRule($type)->getPatternDirs($overriddenParams + $this->defaultParams); + } + + /** + * @return array + */ + public function getPatternDirsExceptionDataProvider() + { + $exceptions = [ + 'no theme' => [ + ['theme' => null], + 'Parameter "theme" should be specified and should implement the theme interface', + ], + 'no area' => [ + ['area' => null], + "Required parameter 'area' was not passed", + ], + 'no namespace' => [ + ['namespace' => null], + "Parameters 'namespace' and 'module' should either be both set or unset", + ], + 'no module' => [ + ['module' => null], + "Parameters 'namespace' and 'module' should either be both set or unset", + ], + ]; + $exceptionsPerTypes = [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_LOCALE_FILE => [ + 'no theme', 'no area' + ], + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_FILE => [ + 'no theme', 'no area', 'no namespace', 'no module' + ], + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE => [ + 'no theme', 'no area', 'no namespace', 'no module' + ], + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE => [ + 'no theme', 'no area', 'no namespace', 'no module' + ], + ]; + + $data = []; + foreach ($exceptionsPerTypes as $type => $exceptionKeys) { + foreach ($exceptionKeys as $key) { + $data[$type . ', ' . $key] = [$type, $exceptions[$key][0], $exceptions[$key][1]]; + } + } + + return $data; + } + + /** + * @param string $type + * @param array $overriddenParams + * @param array $expectedResult + * + * @dataProvider getPatternDirsDataProvider + */ + public function testGetPatternDirs($type, array $overriddenParams, array $expectedResult) + { + $actualResult = $this->model->getRule($type) + ->getPatternDirs($overriddenParams + $this->defaultParams); + $this->assertEquals($expectedResult, $actualResult); + } + + /** + * @return array + */ + public function getPatternDirsDataProvider() + { + return [ + 'locale' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_LOCALE_FILE, + [], + ['/area/current_theme_path', '/area/parent_theme_path'], + ], + 'file, modular' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_FILE, + [], + [ + '/area/current_theme_path/namespace_module', + '/area/parent_theme_path/namespace_module', + '/namespace/module/view/area', + '/namespace/module/view/base', + ], + ], + 'file, non-modular' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_FILE, + ['namespace' => null, 'module' => null], + ['/area/current_theme_path', '/area/parent_theme_path',], + ], + + 'template, modular' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE, + [], + [ + '/area/current_theme_path/namespace_module/templates', + '/area/parent_theme_path/namespace_module/templates', + '/namespace/module/view/area/templates', + '/namespace/module/view/base/templates', + ], + ], + 'template, non-modular' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE, + ['namespace' => null, 'module' => null], + [ + '/area/current_theme_path/templates', + '/area/parent_theme_path/templates', + ], + ], + 'template, non-modular-magento-core' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE, + ['namespace' => 'Magento', 'module' => 'Core'], + [ + '/area/current_theme_path/Magento_Core/templates', + '/area/parent_theme_path/Magento_Core/templates', + '/Magento/Core/view/area/templates', + '/Magento/Core/view/base/templates', + ], + ], + + 'view, modular localized' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE, + [], + [ + '/area/current_theme_path/namespace_module/web/i18n/en_US', + '/area/current_theme_path/namespace_module/web', + '/area/parent_theme_path/namespace_module/web/i18n/en_US', + '/area/parent_theme_path/namespace_module/web', + '/namespace/module/view/area/web/i18n/en_US', + '/namespace/module/view/base/web/i18n/en_US', + '/namespace/module/view/area/web', + '/namespace/module/view/base/web', + ], + ], + 'view, modular non-localized' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE, + ['locale' => null], + [ + '/area/current_theme_path/namespace_module/web', + '/area/parent_theme_path/namespace_module/web', + '/namespace/module/view/area/web', + '/namespace/module/view/base/web', + ], + ], + 'view, non-modular localized' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE, + ['module' => null, 'namespace' => null], + [ + '/area/current_theme_path/web/i18n/en_US', + '/area/current_theme_path/web', + '/area/parent_theme_path/web/i18n/en_US', + '/area/parent_theme_path/web', + '', + ], + ], + 'view, non-modular non-localized' => [ + \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE, + ['module' => null, 'namespace' => null, 'locale' => null], + [ + '/area/current_theme_path/web', + '/area/parent_theme_path/web', + '', + ], + ], + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/FlatTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/FlatTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4a011ee26943737649ce6645c5301b98f7cc3e56 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/FlatTest.php @@ -0,0 +1,150 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\CacheData; + +class FlatTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\Cache|\PHPUnit_Framework_MockObject_MockObject + */ + private $cache; + + /** + * @var \Magento\Framework\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $theme; + + /** + * @var Flat + */ + private $object; + + protected function setUp() + { + $this->cache = $this->getMock( + '\Magento\Framework\View\Design\FileResolution\Fallback\Cache', array(), array(), '', false + ); + + $this->theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + + $this->object = new \Magento\Framework\View\Design\FileResolution\Fallback\CacheData\Flat($this->cache); + } + + /** + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @param string $expectedId + * @param string $expectedValue + * + * @dataProvider cacheDataProvider + */ + public function testGetFromCache($area, $themePath, $locale, $module, $expectedId, $expectedValue) + { + if (isset($params['theme'])) { + $this->theme->expects($this->any()) + ->method('getThemePath') + ->will($this->returnValue($params['theme'])); + $params['theme'] = $this->theme; + } else { + $this->theme->expects($this->never()) + ->method('getThemePath'); + } + + $this->cache->expects($this->once()) + ->method('load') + ->with($expectedId) + ->will($this->returnValue($expectedValue)); + + $actual = $this->object->getFromCache('file', 'file.ext', $area, $themePath, $locale, $module); + $this->assertSame($expectedValue, $actual); + } + + /** + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @param string $expectedId + * @param string $savedValue + * + * @dataProvider cacheDataProvider + */ + public function testSaveToCache($area, $themePath, $locale, $module, $expectedId, $savedValue) + { + if (isset($params['theme'])) { + $this->theme->expects($this->any()) + ->method('getThemePath') + ->will($this->returnValue($params['theme'])); + $params['theme'] = $this->theme; + } else { + $this->theme->expects($this->never()) + ->method('getThemePath'); + } + + $this->cache->expects($this->once()) + ->method('save') + ->with($savedValue, $expectedId) + ->will($this->returnValue(true)); + + $actual = $this->object->saveToCache($savedValue, 'file', 'file.ext', $area, $themePath, $locale, $module); + $this->assertTrue($actual); + } + + /** + * @return array + */ + public function cacheDataProvider() + { + return [ + 'all params' => [ + 'frontend', 'magento_theme', 'en_US', 'Magento_Module', + 'type:file|area:frontend|theme:magento_theme|locale:en_US|module:Magento_Module|file:file.ext', + 'one/file.ext', + ], + 'no area' => [ + null, 'magento_theme', 'en_US', 'Magento_Module', + 'type:file|area:|theme:magento_theme|locale:en_US|module:Magento_Module|file:file.ext', + 'two/file.ext', + ], + 'no theme' => [ + 'frontend', null, 'en_US', 'Magento_Module', + 'type:file|area:frontend|theme:|locale:en_US|module:Magento_Module|file:file.ext', + 'three/file.ext', + ], + 'no locale' => [ + 'frontend', 'magento_theme', null, 'Magento_Module', + 'type:file|area:frontend|theme:magento_theme|locale:|module:Magento_Module|file:file.ext', + 'four/file.ext', + ], + 'no module' => [ + 'frontend', 'magento_theme', 'en_US', null, + 'type:file|area:frontend|theme:magento_theme|locale:en_US|module:|file:file.ext', + 'five/file.ext', + ], + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/GroupedTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/GroupedTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fc6c81310a141d4318d6ed6e87081eff80f212df --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/GroupedTest.php @@ -0,0 +1,214 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\CacheData; + +class GroupedTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\Cache|\PHPUnit_Framework_MockObject_MockObject + */ + private $cache; + + /** + * @var \Magento\Framework\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $theme; + + /** + * @var Grouped + */ + private $object; + + protected function setUp() + { + $this->cache = $this->getMock( + '\Magento\Framework\View\Design\FileResolution\Fallback\Cache', array(), array(), '', false + ); + + $this->theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + + $this->object = new \Magento\Framework\View\Design\FileResolution\Fallback\CacheData\Grouped($this->cache); + } + + /** + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @param array $files + * + * @dataProvider getFromCacheDataProvider + */ + public function testGetFromCache($area, $themePath, $locale, $module, array $files) + { + if (isset($params['theme'])) { + $this->theme->expects($this->any()) + ->method('getThemePath') + ->will($this->returnValue($params['theme'])); + $params['theme'] = $this->theme; + } else { + $this->theme->expects($this->never()) + ->method('getThemePath'); + } + + $cachedSections = [ + 'type:file|area:frontend|theme:magento_theme|locale:en_US' => [ + 'module:Magento_Module|file:file.ext' => 'one/file.ext', + 'module:Magento_Module|file:other_file.ext' => 'one/other_file.ext', + 'module:|file:file.ext' => 'two/file.ext', + 'module:|file:other_file.ext' => 'two/other_file.ext', + ], + 'type:file|area:frontend|theme:magento_theme|locale:' => [ + 'module:Magento_Module|file:file.ext' => 'three/file.ext', + 'module:Magento_Module|file:other_file.ext' => 'four/other_file.ext', + ], + 'type:file|area:frontend|theme:|locale:en_US' => [ + 'module:Magento_Module|file:file.ext' => 'five/file.ext', + 'module:Magento_Module|file:other_file.ext' => 'five/other_file.ext', + ], + 'type:file|area:|theme:magento_theme|locale:en_US' => [ + 'module:Magento_Module|file:file.ext' => 'seven/file.ext', + 'module:Magento_Module|file:other_file.ext' => 'other_file.ext', + ], + ]; + + $this->cache->expects($this->once()) + ->method('load') + ->will($this->returnCallback(function ($sectionId) use ($cachedSections) { + if (!isset($cachedSections[$sectionId])) { + return false; + } + return json_encode($cachedSections[$sectionId]); + })); + + foreach ($files as $requested => $expected) { + $actual = $this->object->getFromCache('file', $requested, $area, $themePath, $locale, $module); + $this->assertSame($expected, $actual); + } + } + + /** + * @return array + */ + public function getFromCacheDataProvider() + { + return [ + 'all params' => [ + 'frontend', 'magento_theme', 'en_US', 'Magento_Module', + ['file.ext' => 'one/file.ext', 'other_file.ext' => 'one/other_file.ext'], + ], + 'no area' => [ + null, 'magento_theme', 'en_US', 'Magento_Module', + ['file.ext' => 'seven/file.ext', 'other_file.ext' => 'other_file.ext'], + ], + 'no theme' => [ + 'frontend', null, 'en_US', 'Magento_Module', + ['file.ext' => 'five/file.ext', 'other_file.ext' => 'five/other_file.ext'], + ], + 'no locale' => [ + 'frontend', 'magento_theme', null, 'Magento_Module', + ['file.ext' => 'three/file.ext', 'other_file.ext' => 'four/other_file.ext'], + ], + 'no module' => [ + 'frontend', 'magento_theme', 'en_US', null, + ['file.ext' => 'two/file.ext', 'other_file.ext' => 'two/other_file.ext'], + ], + ]; + } + + /** + * Verify that one and only one attempt to load cache is done even in case of cache absence + */ + public function testGetFromCacheNothing() + { + $this->cache->expects($this->once()) + ->method('load'); + $this->assertFalse($this->object->getFromCache('type', 'file.ext', + 'frontend', 'magento_theme', 'en_US', 'Magento_Module')); + $this->assertFalse($this->object->getFromCache('type', 'file.ext', + 'frontend', 'magento_theme', 'en_US', 'Magento_Module')); + } + + /** + * Ensure that cache is saved once and only once per section + */ + public function testSaveToCache() + { + $this->cache->expects($this->exactly(2)) + ->method('save') + ->will($this->returnValueMap([ + [ + json_encode([ + 'module:Magento_Module|file:file.ext' => 'some/file.ext', + 'module:Magento_Module|file:other_file.ext' => 'some/other_file.ext', + ]), + 'type:file|area:frontend|theme:|locale:en_US', + true, + ], + [ + json_encode(['module:Magento_Module|file:file.ext' => 'some/other/file.ext']), + 'type:view|area:backend|theme:|locale:en_US', + true, + ], + ])); + + $this->object->saveToCache('some/file.ext', 'file', 'file.ext', + 'frontend', 'magento_theme', 'en_US', 'Magento_Module'); + $this->object->saveToCache('some/other_file.ext', 'file', 'other_file.ext', + 'frontend', 'magento_theme', 'en_US', 'Magento_Module'); + $this->object->saveToCache('some/other/file.ext', 'view', 'file.ext', + 'backend', 'magento_theme', 'en_US', 'Magento_Module'); + + $this->object = null; + } + + /** + * Verify that no attempt to save cache is done, when nothing is updated + */ + public function testSaveToCacheNothing() + { + $this->cache->expects($this->never()) + ->method('save'); + $this->object = null; + } + + /** + * Ensure that same data is not saved again + */ + public function testSaveToCacheNotDirty() + { + $this->cache->expects($this->never()) + ->method('save'); + $this->cache->expects($this->once()) + ->method('load') + ->with('type:file|area:frontend|theme:magento_theme|locale:en_US') + ->will($this->returnValue(json_encode(['module:Magento_Module|file:file.ext' => 'some/file.ext']))); + + $this->object->saveToCache('some/file.ext', 'file', 'file.ext', + 'frontend', 'magento_theme', 'en_US', 'Magento_Module'); + + $this->object = null; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/FileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/FileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6ea2002a37c741896b260f3f9f577da1ccedda06 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/FileTest.php @@ -0,0 +1,58 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +use Magento\Framework\View\Design\Fallback\RulePool; + +class FileTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $resolver; + + /** + * @var File + */ + protected $object; + + protected function setUp() + { + $this->resolver = $this->getMock('Magento\Framework\View\Design\FileResolution\Fallback\ResolverInterface'); + $this->object = new File($this->resolver); + } + + public function testGetFile() + { + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $expected = 'some/file.ext'; + $this->resolver->expects($this->once()) + ->method('resolve') + ->with(RulePool::TYPE_FILE, 'file.ext', 'frontend', $theme, null, 'Magento_Module') + ->will($this->returnValue($expected)); + $actual = $this->object->getFile('frontend', $theme, 'file.ext', 'Magento_Module'); + $this->assertSame($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/LocaleFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/LocaleFileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fab2ae74b1f642e4f22286cd3aebe2c93a0d62e7 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/LocaleFileTest.php @@ -0,0 +1,58 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +use \Magento\Framework\View\Design\Fallback\RulePool; + +class LocaleFileTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $resolver; + + /** + * @var LocaleFile + */ + protected $object; + + protected function setUp() + { + $this->resolver = $this->getMock('Magento\Framework\View\Design\FileResolution\Fallback\ResolverInterface'); + $this->object = new LocaleFile($this->resolver); + } + + public function testGetFile() + { + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $expected = 'some/file.ext'; + $this->resolver->expects($this->once()) + ->method('resolve') + ->with(RulePool::TYPE_LOCALE_FILE, 'file.ext', 'frontend', $theme, 'en_US', null) + ->will($this->returnValue($expected)); + $actual = $this->object->getFile('frontend', $theme, 'en_US', 'file.ext'); + $this->assertSame($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..49e394df6e270762476de1e99511cf7c8f614252 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php @@ -0,0 +1,125 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver; + +class AlternativeTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + */ + private $directory; + + /** + * @var \Magento\Framework\View\Design\Fallback\Rule\RuleInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $rule; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple + */ + private $object; + + protected function setUp() + { + $this->directory = $this->getMock('\Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false); + $this->directory->expects($this->any()) + ->method('getRelativePath') + ->will($this->returnArgument(0)); + $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::ROOT_DIR) + ->will($this->returnValue($this->directory)); + $this->rule = $this->getMock( + '\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', array(), array(), '', false + ); + $rulePool = $this->getMock('Magento\Framework\View\Design\Fallback\RulePool', array(), array(), '', false); + $rulePool->expects($this->any()) + ->method('getRule') + ->with('type') + ->will($this->returnValue($this->rule)); + $cache = $this->getMockForAbstractClass( + 'Magento\Framework\View\Design\FileResolution\Fallback\CacheDataInterface' + ); + $cache->expects($this->any()) + ->method('getFromCache') + ->will($this->returnValue(false)); + $this->object = new Alternative($filesystem, $rulePool, $cache, ['css' => ['less']]); + } + + /** + * @param array $alternativeExtensions + * + * @dataProvider constructorExceptionDataProvider + */ + public function testConstructorException(array $alternativeExtensions) + { + $this->setExpectedException('\InvalidArgumentException', "\$alternativeExtensions must be an array with format:" + . " array('ext1' => array('ext1', 'ext2'), 'ext3' => array(...)]"); + + $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); + $rulePool = $this->getMock('Magento\Framework\View\Design\Fallback\RulePool', array(), array(), '', false); + $cache = $this->getMockForAbstractClass( + 'Magento\Framework\View\Design\FileResolution\Fallback\CacheDataInterface' + ); + new Alternative($filesystem, $rulePool, $cache, $alternativeExtensions); + } + + /** + * @return array + */ + public function constructorExceptionDataProvider() + { + return [ + 'numerical keys' => [['css', 'less']], + 'non-array values' => [['css' => 'less']], + ]; + } + + public function testResolve() + { + $requestedFile = 'file.css'; + $expected = 'some/dir/file.less'; + + $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $theme->expects($this->any()) + ->method('getFullPath') + ->will($this->returnValue('magento_theme')); + $this->rule->expects($this->atLeastOnce()) + ->method('getPatternDirs') + ->will($this->returnValue(['some/dir'])); + + $fileExistsMap = [ + ['some/dir/file.css', false], + ['some/dir/file.less', true], + ]; + $this->directory->expects($this->any()) + ->method('isExist') + ->will($this->returnValueMap($fileExistsMap)); + + $actual = $this->object->resolve('type', $requestedFile, 'frontend', $theme, 'en_US', 'Magento_Module'); + $this->assertSame($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4a3ddeebb9fa385c33e15e4e8714d4cbf21e5eac --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php @@ -0,0 +1,254 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver; + +class SimpleTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + */ + private $directory; + + /** + * @var \Magento\Framework\View\Design\Fallback\Rule\RuleInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $rule; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $cache; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple + */ + private $object; + + protected function setUp() + { + $this->directory = $this->getMock('\Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false); + $this->directory->expects($this->any()) + ->method('getRelativePath') + ->will($this->returnArgument(0)); + $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false); + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::ROOT_DIR) + ->will($this->returnValue($this->directory)); + $this->rule = $this->getMock( + '\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', array(), array(), '', false + ); + $rulePool = $this->getMock('Magento\Framework\View\Design\Fallback\RulePool', array(), array(), '', false); + $rulePool->expects($this->any()) + ->method('getRule') + ->with('type') + ->will($this->returnValue($this->rule)); + $this->cache = $this->getMockForAbstractClass( + 'Magento\Framework\View\Design\FileResolution\Fallback\CacheDataInterface' + ); + $this->object = new Simple($filesystem, $rulePool, $this->cache); + } + + /** + * Cache is empty + * + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @param array $expectedParams + * + * @dataProvider resolveDataProvider + */ + public function testResolve($area, $themePath, $locale, $module, array $expectedParams) + { + $expectedPath = '/some/dir/file.ext'; + $theme = $themePath ? $this->getMockForTheme($themePath) : null; + if (!empty($expectedParams['theme'])) { + $expectedParams['theme'] = $this->getMockForTheme($expectedParams['theme']); + } + + $this->cache->expects($this->once()) + ->method('getFromCache') + ->with('type', 'file.ext', $area, $themePath, $locale, $module) + ->will($this->returnValue(false)); + $this->directory->expects($this->never()) + ->method('getAbsolutePath'); + $this->rule->expects($this->once()) + ->method('getPatternDirs') + ->with($expectedParams) + ->will($this->returnValue(['/some/dir'])); + $this->directory->expects($this->once()) + ->method('isExist') + ->with($expectedPath) + ->will($this->returnValue(true)); + $this->cache->expects($this->once()) + ->method('saveToCache') + ->with($expectedPath, 'type', 'file.ext', $area, $themePath, $locale, $module); + $actualPath = $this->object->resolve( + 'type', 'file.ext', $area, $theme, $locale, $module + ); + $this->assertSame($expectedPath, $actualPath); + } + + /** + * @return array + */ + public function resolveDataProvider() + { + return [ + 'no area' => [ + null, 'magento_theme', 'en_US', 'Magento_Module', + [ + 'theme' => 'magento_theme', + 'locale' => 'en_US', + 'namespace' => 'Magento', + 'module' => 'Module', + ] + ], + 'no theme' => [ + 'frontend', null, 'en_US', 'Magento_Module', + [ + 'area' => 'frontend', + 'locale' => 'en_US', + 'namespace' => 'Magento', + 'module' => 'Module', + ] + ], + 'no locale' => [ + 'frontend', 'magento_theme', null, 'Magento_Module', + [ + 'area' => 'frontend', + 'theme' => 'magento_theme', + 'namespace' => 'Magento', + 'module' => 'Module', + ] + ], + 'no module' => [ + 'frontend', 'magento_theme', 'en_US', null, + [ + 'area' => 'frontend', + 'theme' => 'magento_theme', + 'locale' => 'en_US', + ] + ], + 'all params' => [ + 'frontend', 'magento_theme', 'en_US', 'Magento_Module', + [ + 'area' => 'frontend', + 'theme' => 'magento_theme', + 'locale' => 'en_US', + 'namespace' => 'Magento', + 'module' => 'Module', + ] + ], + ]; + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage File path '../file.ext' is forbidden for security reasons. + */ + public function testResolveSecurityException() + { + $this->object->resolve('type', '../file.ext', '', null, '', ''); + } + + public function testResolveNoPatterns() + { + $this->cache->expects($this->once()) + ->method('getFromCache') + ->with('type', 'file.ext', 'frontend', 'magento_theme', 'en_US', 'Magento_Module') + ->will($this->returnValue(false)); + $this->rule->expects($this->once()) + ->method('getPatternDirs') + ->will($this->returnValue([])); + $this->cache->expects($this->once()) + ->method('saveToCache') + ->with('', 'type', 'file.ext', 'frontend', 'magento_theme', 'en_US', 'Magento_Module'); + $this->assertFalse( + $this->object->resolve( + 'type', 'file.ext', 'frontend', $this->getMockForTheme('magento_theme'), 'en_US', 'Magento_Module' + ) + ); + } + + public function testResolveNonexistentFile() + { + $this->cache->expects($this->once()) + ->method('getFromCache') + ->with('type', 'file.ext', 'frontend', 'magento_theme', 'en_US', 'Magento_Module') + ->will($this->returnValue(false)); + $this->rule->expects($this->once()) + ->method('getPatternDirs') + ->will($this->returnValue(['some/dir'])); + $this->directory->expects($this->once()) + ->method('isExist') + ->will($this->returnValue(false)); + $this->cache->expects($this->once()) + ->method('saveToCache') + ->with('', 'type', 'file.ext', 'frontend', 'magento_theme', 'en_US', 'Magento_Module'); + $this->assertFalse( + $this->object->resolve( + 'type', 'file.ext', 'frontend', $this->getMockForTheme('magento_theme'), 'en_US', 'Magento_Module' + ) + ); + } + + public function testResolveFromCache() + { + $expectedPath = '/some/dir/file.ext'; + + $this->cache->expects($this->once()) + ->method('getFromCache') + ->with('type', 'file.ext', 'frontend', 'magento_theme', 'en_US', 'Magento_Module') + ->will($this->returnValue($expectedPath)); + $this->directory->expects($this->once()) + ->method('getAbsolutePath') + ->with($expectedPath) + ->will($this->returnValue($expectedPath)); + $this->rule->expects($this->never()) + ->method('getPatternDirs'); + $this->cache->expects($this->never()) + ->method('saveToCache'); + $actualPath = $this->object->resolve( + 'type', 'file.ext', 'frontend', $this->getMockForTheme('magento_theme'), 'en_US', 'Magento_Module' + ); + $this->assertSame($expectedPath, $actualPath); + } + + /** + * @param string $themePath + * @return \Magento\Framework\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private function getMockForTheme($themePath) + { + $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $theme->expects($this->any()) + ->method('getThemePath') + ->will($this->returnValue($themePath)); + return $theme; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/StaticFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/StaticFileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..46da2de3e714819951a2bef8eb22fd5ccf51cf1c --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/StaticFileTest.php @@ -0,0 +1,58 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +use \Magento\Framework\View\Design\Fallback\RulePool; + +class StaticFileTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $resolver; + + /** + * @var StaticFile + */ + protected $object; + + protected function setUp() + { + $this->resolver = $this->getMock('Magento\Framework\View\Design\FileResolution\Fallback\ResolverInterface'); + $this->object = new StaticFile($this->resolver); + } + + public function testGetFile() + { + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $expected = 'some/file.ext'; + $this->resolver->expects($this->once()) + ->method('resolve') + ->with(RulePool::TYPE_STATIC_FILE, 'file.ext', 'frontend', $theme, 'en_US', 'Magento_Module') + ->will($this->returnValue($expected)); + $actual = $this->object->getFile('frontend', $theme, 'en_US', 'file.ext', 'Magento_Module'); + $this->assertSame($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6b0ff9f79b1df17661f4c4631af968c343850b5b --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFileTest.php @@ -0,0 +1,58 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +use Magento\Framework\View\Design\Fallback\RulePool; + +class TemplateFileTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var ResolverInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $resolver; + + /** + * @var TemplateFile + */ + protected $object; + + protected function setUp() + { + $this->resolver = $this->getMock('Magento\Framework\View\Design\FileResolution\Fallback\ResolverInterface'); + $this->object = new TemplateFile($this->resolver); + } + + public function testGetFile() + { + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $expected = 'some/file.ext'; + $this->resolver->expects($this->once()) + ->method('resolve') + ->with(RulePool::TYPE_TEMPLATE_FILE, 'file.ext', 'frontend', $theme, null, 'Magento_Module') + ->will($this->returnValue($expected)); + $actual = $this->object->getFile('frontend', $theme, 'file.ext', 'Magento_Module'); + $this->assertSame($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php deleted file mode 100644 index 2b0e309ea6d2d5fd2cb9e02f5f7c725828cc1886..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\FileResolution\Strategy\Fallback; - -use Magento\Framework\App\Filesystem; -use Magento\TestFramework\Helper\ProxyTesting; - -/** - * CachingProxy Test - * - */ -class CachingProxyTest extends \PHPUnit_Framework_TestCase -{ - /** - * Temp directory for the model to store maps - * - * @var string - */ - protected $tmpDir; - - /** - * Mock of the model to be tested. Operates the mocked fallback object. - * - * @var CachingProxy - */ - protected $model; - - /** - * Mocked fallback object, with file resolution methods ready to be substituted. - * - * @var \Magento\Framework\View\Design\FileResolution\Strategy\Fallback|\PHPUnit_Framework_MockObject_MockObject - */ - protected $fallback; - - /** - * Theme model, pre-created in setUp() for usage in tests - * - * @var \Magento\Framework\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $themeModel; - - /** - * Direcoty with write permissions - * - * @var \Magento\Framework\Filesystem\Directory\Write | \PHPUnit_Framework_MockObject_MockObject - */ - protected $directoryWrite; - - /** - * Set up - */ - protected function setUp() - { - $this->tmpDir = TESTS_TEMP_DIR . '/fallback'; - mkdir($this->tmpDir); - - $this->fallback = $this->getMock( - 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback', - array(), - array(), - '', - false - ); - - $this->themeModel = $this->getMock( - 'Magento\Core\Model\Theme', - array(), - array(), - '', - false, - false - ); - $this->themeModel->expects($this->any())->method('getId')->will($this->returnValue('t')); - - $this->model = new CachingProxy( - $this->fallback, - $this->getFilesystemMock(), - $this->tmpDir, - TESTS_TEMP_DIR, - true - ); - } - - /** - * Tear down - */ - protected function tearDown() - { - $filesystemDriver = new \Magento\Framework\Filesystem\Driver\File(); - $filesystemDriver->deleteDirectory($this->tmpDir); - } - - /** - * Construct CachingProxy passing not a directory - * - * @expectedException \InvalidArgumentException - */ - public function testConstructInvalidDir() - { - $this->model = new CachingProxy( - $this->fallback, - $this->getFilesystemMock(false), - $this->tmpDir, - TESTS_TEMP_DIR . 'invalid_dir' - ); - } - - /** - * Test for __destruct method - */ - public function testDestruct() - { - $this->fallback->expects( - $this->once() - )->method( - 'getFile' - )->will( - $this->returnValue(TESTS_TEMP_DIR . '/' . 'test.txt') - ); - - $expectedFile = $this->tmpDir . '/a_t_.ser'; - - $this->model->getFile('a', $this->themeModel, 'does not matter', 'Some_Module'); - $this->assertFileNotExists($expectedFile); - unset($this->model); - $this->directoryWrite->expects( - $this->any() - )->method( - 'writeFile' - )->with( - $expectedFile, - $this->contains('Some_Module') - ); - } - - /** - * Test for destruct method with canSaveMap = false - */ - public function testDestructNoMapSaved() - { - $this->fallback->expects( - $this->once() - )->method( - 'getFile' - )->will( - $this->returnValue(TESTS_TEMP_DIR . '/test.txt') - ); - $model = new CachingProxy($this->fallback, $this->getFilesystemMock(), $this->tmpDir, TESTS_TEMP_DIR, false); - - $model->getFile('a', $this->themeModel, 'does not matter', 'Some_Module'); - unset($model); - $this->directoryWrite->expects($this->never())->method('writeFile'); - } - - /** - * Test for all proxy methods - * - * @param string $method - * @param array $params - * @param string $expectedResult - * @dataProvider proxyMethodsDataProvider - * @covers \Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy::getFile - * @covers \Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy::getLocaleFile - * @covers \Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy::getViewFile - */ - public function testProxyMethods($method, $params, $expectedResult) - { - $helper = new ProxyTesting(); - $actualResult = $helper->invokeWithExpectations( - $this->model, - $this->fallback, - $method, - $params, - $expectedResult - ); - $this->assertEquals($expectedResult, $actualResult); - } - - /** - * Data provider for testProxyMethods - * - * @return array - */ - public function proxyMethodsDataProvider() - { - $themeModel = $this->getMock( - 'Magento\Core\Model\Theme', - array(), - array(), - '', - false, - false - ); - - return array( - 'getFile' => array( - 'getFile', - array('area51', $themeModel, 'file.txt', 'Some_Module'), - TESTS_TEMP_DIR . '/fallback/file.txt' - ), - 'getLocaleFile' => array( - 'getLocaleFile', - array('area51', $themeModel, 'sq_AL', 'file.txt'), - 'path/to/locale_file.txt' - ), - 'getViewFile' => array( - 'getViewFile', - array('area51', $themeModel, 'uk_UA', 'file.txt', 'Some_Module'), - 'path/to/view_file.txt' - ) - ); - } - - /** - * Test for setViewFilePathToMap method - */ - public function testSetViewFilePathToMap() - { - $materializedFilePath = TESTS_TEMP_DIR . '/path/file.txt'; - - $result = $this->model->setViewFilePathToMap( - 'area51', - $this->themeModel, - 'en_US', - 'Some_Module', - 'file.txt', - $materializedFilePath - ); - $this->assertEquals($this->model, $result); - - $this->fallback->expects($this->never())->method('getViewFile'); - $result = $this->model->getViewFile('area51', $this->themeModel, 'en_US', 'file.txt', 'Some_Module'); - $this->assertEquals($materializedFilePath, $result); - } - - /** - * Get Filesystem mock - * - * @param bool $isDirectory - * @return Filesystem - */ - protected function getFilesystemMock($isDirectory = true) - { - $directoryRead = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Read', - array('isDirectory', 'getRelativePath'), - array(), - '', - false - ); - $directoryRead->expects($this->once())->method('isDirectory')->will($this->returnValue($isDirectory)); - $directoryRead->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); - $this->directoryWrite = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Write', - array('getRelativePath', 'isFile', 'readFile', 'isDirectory', 'create', 'writeFile'), - array(), - '', - false - ); - $this->directoryWrite->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); - $methods = array('getDirectoryRead', 'getDirectoryWrite', '__wakeup'); - $filesystem = $this->getMock('Magento\Framework\App\Filesystem', $methods, array(), '', false); - $filesystem->expects( - $this->once() - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::ROOT_DIR - )->will( - $this->returnValue($directoryRead) - ); - $filesystem->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - \Magento\Framework\App\Filesystem::VAR_DIR - )->will( - $this->returnValue($this->directoryWrite) - ); - return $filesystem; - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/FallbackTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/FallbackTest.php deleted file mode 100644 index 41addaf9f29fcaf82058c3248dfa288a6b186db7..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Strategy/FallbackTest.php +++ /dev/null @@ -1,272 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -/** - * Test that Design Package delegates fallback resolution to a Fallback model - */ -namespace Magento\Framework\View\Design\FileResolution\Strategy; - -/** - * Fallback Test - * - */ -class FallbackTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Design\Fallback\Factory - */ - protected $fallbackFactory; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $fallbackFile; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $fallbackLocale; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $fallbackViewFile; - - /** - * @var \Magento\Framework\View\Design\ThemeInterface - */ - protected $theme; - - protected function setUp() - { - $this->fallbackFile = $this->getMockForAbstractClass( - 'Magento\Framework\View\Design\Fallback\Rule\RuleInterface' - ); - $this->fallbackLocale = $this->getMockForAbstractClass( - 'Magento\Framework\View\Design\Fallback\Rule\RuleInterface' - ); - $this->fallbackViewFile = $this->getMockForAbstractClass( - 'Magento\Framework\View\Design\Fallback\Rule\RuleInterface' - ); - - $this->fallbackFactory = $this->getMock( - 'Magento\Framework\View\Design\Fallback\Factory', - array('createLocaleFileRule', 'createFileRule', 'createViewFileRule'), - array($this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false)) - ); - $this->fallbackFactory->expects( - $this->any() - )->method( - 'createLocaleFileRule' - )->will( - $this->returnValue($this->fallbackLocale) - ); - $this->fallbackFactory->expects( - $this->any() - )->method( - 'createFileRule' - )->will( - $this->returnValue($this->fallbackFile) - ); - $this->fallbackFactory->expects( - $this->any() - )->method( - 'createViewFileRule' - )->will( - $this->returnValue($this->fallbackViewFile) - ); - - $this->theme = $this->getMock('Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false); - } - - protected function tearDown() - { - $this->fallbackFactory = null; - $this->fallbackFile = null; - $this->fallbackLocale = null; - $this->fallbackViewFile = null; - $this->theme = null; - } - - /** - * @dataProvider getFileDataProvider - */ - public function testGetFile($fullModuleName, $namespace, $module, $targetFile, $expectedFileName) - { - $filesystem = $this->getFileSystemMock($targetFile); - - $fallback = new Fallback($filesystem, $this->fallbackFactory); - - $params = array('area' => 'area', 'theme' => $this->theme, 'namespace' => $namespace, 'module' => $module); - - $this->fallbackFile->expects( - $this->once() - )->method( - 'getPatternDirs' - )->with( - $params - )->will( - $this->returnValue(array('found_folder', 'not_found_folder')) - ); - - $filename = $fallback->getFile('area', $this->theme, 'file.txt', $fullModuleName); - - $this->assertEquals($expectedFileName, $filename); - } - - /** - * @return array - */ - public function getFileDataProvider() - { - return array( - 'no module, file found' => array(null, null, null, 'found_folder/file.txt', 'found_folder/file.txt'), - 'module, file found' => array( - 'Namespace_Module', - 'Namespace', - 'Module', - 'found_folder/file.txt', - 'found_folder/file.txt' - ), - 'no module, file not found' => array(null, null, null, null, 'not_found_folder/file.txt'), - 'module, file not found' => array( - 'Namespace_Module', - 'Namespace', - 'Module', - null, - 'not_found_folder/file.txt' - ) - ); - } - - /** - * @dataProvider getLocaleFileDataProvider - */ - public function testGetLocaleFile($targetFile, $expectedFileName) - { - $filesystem = $this->getFileSystemMock($targetFile); - - $fallback = new Fallback($filesystem, $this->fallbackFactory); - - $params = array('area' => 'area', 'theme' => $this->theme, 'locale' => 'locale'); - - $this->fallbackLocale->expects( - $this->once() - )->method( - 'getPatternDirs' - )->with( - $params - )->will( - $this->returnValue(array('found_folder', 'not_found_folder')) - ); - - $filename = $fallback->getLocaleFile('area', $this->theme, 'locale', 'file.txt'); - - $this->assertEquals($expectedFileName, $filename); - } - - /** - * @return array - */ - public function getLocaleFileDataProvider() - { - return array( - 'file found' => array('found_folder/file.txt', 'found_folder/file.txt'), - 'file not found' => array(null, 'not_found_folder/file.txt') - ); - } - - /** - * @dataProvider getFileDataProvider - */ - public function testGetViewFile($fullModuleName, $namespace, $module, $targetFile, $expectedFileName) - { - $filesystem = $this->getFileSystemMock($targetFile); - - $fallback = new Fallback($filesystem, $this->fallbackFactory); - - $params = array( - 'area' => 'area', - 'theme' => $this->theme, - 'namespace' => $namespace, - 'module' => $module, - 'locale' => 'locale' - ); - - $this->fallbackViewFile->expects( - $this->once() - )->method( - 'getPatternDirs' - )->with( - $params - )->will( - $this->returnValue(array('found_folder', 'not_found_folder')) - ); - - $filename = $fallback->getViewFile('area', $this->theme, 'locale', 'file.txt', $fullModuleName); - - $this->assertEquals($expectedFileName, $filename); - } - - /** - * @param string $targetFile - * @return \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject - */ - protected function getFileSystemMock($targetFile) - { - $directoryMock = $this->getMock( - 'Magento\Framework\Filesystem\Directory\Read', - array('isExist', 'getRelativePath'), - array(), - '', - false - ); - $directoryMock->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); - $directoryMock->expects($this->any())->method('isExist')->will( - $this->returnCallback( - function ($tryFile) use ($targetFile) { - return $tryFile == $targetFile; - } - ) - ); - $filesystem = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getDirectoryRead', '__wakeup'), - array(), - '', - false - ); - $filesystem->expects( - $this->once() - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::ROOT_DIR - )->will( - $this->returnValue($directoryMock) - ); - - return $filesystem; - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/StrategyPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/StrategyPoolTest.php deleted file mode 100644 index 4a82126734a389814b9f0b84466eae536e75ea8f..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/StrategyPoolTest.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\FileResolution; - -use Magento\Framework\App\State; - -/** - * StrategyPool Test - * - */ -class StrategyPoolTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject - */ - protected $objectManager; - - /** - * @var State|\PHPUnit_Framework_MockObject_MockObject - */ - protected $appState; - - /** - * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject - */ - protected $filesystem; - - /** - * @var StrategyPool|\PHPUnit_Framework_MockObject_MockObject - */ - protected $model; - - protected function setUp() - { - $this->objectManager = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); - $this->appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getPath'), array(), '', false); - $pathMap = array( - array(\Magento\Framework\App\Filesystem::VAR_DIR, 'base_dir/var'), - array(\Magento\Framework\App\Filesystem::ROOT_DIR, 'base_dir') - ); - $this->filesystem->expects($this->any())->method('getPath')->will($this->returnValueMap($pathMap)); - - $this->model = new StrategyPool($this->objectManager, $this->appState, $this->filesystem); - } - - /** - * Test, that strategy creation works and a strategy is returned. - * - * Do not test exact strategy returned, as it depends on configuration, which can be changed any time. - * - * @param string $mode - * @dataProvider getStrategyDataProvider - */ - public function testGetStrategy($mode) - { - // 3 similar methods tested at once - $this->appState->expects($this->exactly(3))->method('getMode')->will($this->returnValue($mode)); - - $strategy = new \StdClass(); - $mapDir = 'base_dir/var/' . StrategyPool::FALLBACK_MAP_DIR; - $map = array( - array( - 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy', - array('mapDir' => $mapDir, 'baseDir' => 'base_dir'), - $strategy - ), - array('Magento\Framework\View\Design\FileResolution\Strategy\Fallback', array(), $strategy) - ); - $this->objectManager->expects($this->atLeastOnce())->method('create')->will($this->returnValueMap($map)); - - // Test - $this->assertSame($strategy, $this->model->getFileStrategy()); - $this->assertSame($strategy, $this->model->getLocaleStrategy()); - $this->assertSame($strategy, $this->model->getViewStrategy()); - } - - /** - * @return array - */ - public static function getStrategyDataProvider() - { - return array( - 'default mode' => array(State::MODE_DEFAULT), - 'production mode' => array(State::MODE_PRODUCTION), - 'developer mode' => array(State::MODE_DEVELOPER) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php index d57923d4faf9aab2d586ec16820b28250d058d95..6977d88a90b7e6750e708843f5c38d8d243b2dc4 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php @@ -107,7 +107,7 @@ class PathTest extends \PHPUnit_Framework_TestCase array( \Magento\Framework\View\Design\Theme\Customization\Path::DIR_NAME, '123', - \Magento\Core\Model\Theme::FILENAME_VIEW_CONFIG + \Magento\Framework\View\ConfigInterface::CONFIG_FILE_NAME ) ); $this->assertEquals($expectedPath, $this->_model->getCustomViewConfigPath($this->_theme->setId(123))); diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php index 64a6e147583e54bb575980f393d9835dda95946c..a9c1fd23bf2dbb7209f6847f52b3a53dc8208874 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php @@ -42,13 +42,15 @@ class FlyweightFactoryTest extends \PHPUnit_Framework_TestCase } /** + * @param string $path + * @param int $expectedId + * @dataProvider createByIdDataProvider * @covers \Magento\Framework\View\Design\Theme\FlyweightFactory::create */ - public function testCreateById() + public function testCreateById($path, $expectedId) { - $themeId = 5; $theme = $this->getMock('Magento\Core\Model\Theme', array(), array(), '', false); - $theme->expects($this->exactly(3))->method('getId')->will($this->returnValue($themeId)); + $theme->expects($this->exactly(3))->method('getId')->will($this->returnValue($expectedId)); $theme->expects($this->once())->method('getFullPath')->will($this->returnValue(null)); @@ -57,12 +59,23 @@ class FlyweightFactoryTest extends \PHPUnit_Framework_TestCase )->method( 'getThemeById' )->with( - $themeId + $expectedId )->will( $this->returnValue($theme) ); - $this->assertSame($theme, $this->factory->create($themeId)); + $this->assertSame($theme, $this->factory->create($path)); + } + + /** + * @return array + */ + public function createByIdDataProvider() + { + return array( + array(5, 5), + array('_theme10', 10), + ); } /** @@ -90,6 +103,10 @@ class FlyweightFactoryTest extends \PHPUnit_Framework_TestCase $this->assertSame($theme, $this->factory->create($path)); } + /** + * @expectedException \LogicException + * @expectedExceptionMessage Unable to load theme by specified key: '0' + */ public function testCreateDummy() { $themeId = 0; diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php index 61cae16a12c5947ebbeb81636007a0389cfb4a54..8fb588b01408db38b0c811fc3eaa2512db6ead90 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php @@ -57,11 +57,21 @@ class ImageTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\Framework\Filesystem\Directory\Write|\PHPUnit_Framework_MockObject_MockObject */ - protected $_directoryMock; + protected $_mediaDirectoryMock; + + /** + * @var \Magento\Framework\Filesystem\Directory\Write|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_rootDirectoryMock; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Core\Model\Theme\Image\Path + */ + protected $imagePathMock; protected function setUp() { - $this->_directoryMock = $this->getMock( + $this->_mediaDirectoryMock = $this->getMock( 'Magento\Framework\Filesystem\Directory\Write', array('isExist', 'copyFile', 'getRelativePath', 'delete'), array(), @@ -69,6 +79,10 @@ class ImageTest extends \PHPUnit_Framework_TestCase false, false ); + $this->_rootDirectoryMock = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Write', + array('isExist', 'copyFile', 'getRelativePath', 'delete'), array(), '', false, false + ); $this->_filesystemMock = $this->getMock( 'Magento\Framework\App\Filesystem', array('getDirectoryWrite', '__wakeup'), @@ -77,15 +91,14 @@ class ImageTest extends \PHPUnit_Framework_TestCase false, false ); - $this->_filesystemMock->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - \Magento\Framework\App\Filesystem::MEDIA_DIR - )->will( - $this->returnValue($this->_directoryMock) - ); + $this->_filesystemMock->expects($this->at(0)) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR) + ->will($this->returnValue($this->_mediaDirectoryMock)); + $this->_filesystemMock->expects($this->at(1)) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::ROOT_DIR) + ->will($this->returnValue($this->_rootDirectoryMock)); $imageFactory = $this->getMock('Magento\Framework\Image\Factory', array(), array(), '', false, false); $this->_imageMock = $this->getMock('Magento\Framework\Image', array(), array(), '', false, false); $imageFactory->expects($this->any())->method('create')->will($this->returnValue($this->_imageMock)); @@ -101,14 +114,17 @@ class ImageTest extends \PHPUnit_Framework_TestCase false ); - $this->_model = new Image( - $this->_filesystemMock, - $imageFactory, - $this->_uploaderMock, - $this->_getImagePathMock(), - $logger, - $this->_themeMock - ); + $this->imagePathMock = $this->_getImagePathMock(); + + $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_model = $objectManager->getObject('Magento\Framework\View\Design\Theme\Image', array( + 'filesystem' => $this->_filesystemMock, + 'imageFactory' => $imageFactory, + 'uploader' => $this->_uploaderMock, + 'themeImagePath' => $this->imagePathMock, + 'logger' => $logger, + 'theme' => $this->_themeMock + )); } protected function tearDown() @@ -127,20 +143,9 @@ class ImageTest extends \PHPUnit_Framework_TestCase { $imagePathMock = $this->getMock('Magento\Core\Model\Theme\Image\Path', array(), array(), '', false); $testBaseUrl = 'http://localhost/media_path/'; - $imagePathMock->expects( - $this->any() - )->method( - 'getPreviewImageDirectoryUrl' - )->will( - $this->returnValue($testBaseUrl) - ); - $imagePathMock->expects( - $this->any() - )->method( - 'getPreviewImageDefaultUrl' - )->will( - $this->returnValue($testBaseUrl . 'test_default_preview.png') - ); + + $imagePathMock->expects($this->any())->method('getPreviewImageDefaultUrl') + ->will($this->returnValue($testBaseUrl . 'test_default_preview.png')); $testBaseDir = '/media_path/'; $imagePathMock->expects( @@ -209,21 +214,44 @@ class ImageTest extends \PHPUnit_Framework_TestCase public function testCreatePreviewImageCopy() { $previewImage = 'test_preview.png'; + $relativePath = '/media_path/theme/preview/test_preview.png'; $this->_themeMock->setData($this->_getThemeSampleData()); $this->_themeMock->setData('preview_image', $previewImage); - $this->_directoryMock->expects($this->exactly(2))->method('getRelativePath')->will($this->returnArgument(0)); - $this->_directoryMock->expects( - $this->once() - )->method( - 'copyFile' - )->with( - '/media_path/theme/preview/test_preview.png', - $this->anything() - )->will( - $this->returnValue(true) - ); - $this->assertTrue($this->_model->createPreviewImageCopy($previewImage)); + $this->_mediaDirectoryMock->expects($this->once()) + ->method('getRelativePath') + ->will($this->returnArgument(0)); + + $this->_rootDirectoryMock->expects($this->once()) + ->method('getRelativePath') + ->with($previewImage) + ->will($this->returnValue($relativePath)); + + $this->_rootDirectoryMock->expects($this->once()) + ->method('copyFile') + ->with($relativePath, $this->anything()) + ->will($this->returnValue(true)); + + $themeImageMock = $this->getMockBuilder('Magento\Framework\View\Design\Theme\Image') + ->disableOriginalConstructor() + ->setMethods(['getPreviewImagePath']) + ->getMock(); + $themeImageMock->expects($this->atLeastOnce()) + ->method('getPreviewImagePath') + ->will($this->returnValue($previewImage)); + + $themeMock = $this->getMockBuilder('Magento\Core\Model\Theme') + ->disableOriginalConstructor() + ->setMethods(['getThemeImage', 'getPreviewImage', '__wakeup']) + ->getMock(); + $themeMock->expects($this->atLeastOnce()) + ->method('getPreviewImage') + ->will($this->returnValue($previewImage)); + $themeMock->expects($this->atLeastOnce()) + ->method('getThemeImage') + ->will($this->returnValue($themeImageMock)); + + $this->assertTrue($this->_model->createPreviewImageCopy($themeMock)); $this->assertEquals($previewImage, $this->_themeMock->getData('preview_image')); } @@ -234,7 +262,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase { $this->_themeMock->setData($this->_getThemeSampleData()); $this->_themeMock->setData('preview_image', 'test.png'); - $this->_directoryMock->expects($this->once())->method('delete'); + $this->_mediaDirectoryMock->expects($this->once())->method('delete'); $this->_model->removePreviewImage(); $this->assertNull($this->_themeMock->getData('preview_image')); } @@ -271,10 +299,10 @@ class ImageTest extends \PHPUnit_Framework_TestCase $this->returnValue($tmpFilePath) ); - $this->_directoryMock->expects($this->at(0))->method('getRelativePath')->will($this->returnArgument(0)); - $this->_directoryMock->expects($this->at(1))->method('delete')->with($this->stringContains('test.png')); + $this->_mediaDirectoryMock->expects($this->at(0))->method('getRelativePath')->will($this->returnArgument(0)); + $this->_mediaDirectoryMock->expects($this->at(1))->method('delete')->with($this->stringContains('test.png')); - $this->_directoryMock->expects($this->at(2))->method('delete')->with($tmpFilePath); + $this->_mediaDirectoryMock->expects($this->at(2))->method('delete')->with($tmpFilePath); $this->_model->uploadPreviewImage($scope); } @@ -285,7 +313,12 @@ class ImageTest extends \PHPUnit_Framework_TestCase public function testGetPreviewImageUrl() { $this->_themeMock->setData($this->_getThemeSampleData()); - $this->_themeMock->setData('preview_image', 'preview/image.png'); + + $this->imagePathMock->expects($this->any()) + ->method('getPreviewImageUrl') + ->with($this->_themeMock) + ->will($this->returnValue('http://localhost/media_path/preview/image.png')); + $this->assertEquals('http://localhost/media_path/preview/image.png', $this->_model->getPreviewImageUrl()); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php index 00c3f2e1f372b15e77d4609b03a76f13a6ced16f..2e293bd765059e12779319049d075bb03648e124 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php @@ -79,7 +79,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase public function testGetTemplateFile() { $params = array('module' => 'Fixture_Module', 'area' => 'frontend'); - $this->_viewFileSystem->expects($this->once())->method('getFilename')->with('template.phtml', $params); + $this->_viewFileSystem->expects($this->once())->method('getTemplateFileName')->with('template.phtml', $params); $this->_block->getTemplateFile(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/BaseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cd0c1929b6a2322fda9740044b4cc6914e75b6a6 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/BaseTest.php @@ -0,0 +1,85 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\File\Collector; + +class BaseTest extends \PHPUnit_Framework_TestCase +{ + public function testGetFiles() + { + $directory = $this->getMock('Magento\Framework\Filesystem\Directory\Read', [], [], '', false); + $filesystem = $this->getMock('Magento\Framework\App\Filesystem', ['getDirectoryRead'], [], '', false); + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::MODULES_DIR) + ->will($this->returnValue($directory)); + $globalFiles = [ + 'Namespace/One/view/base/layout/one.xml', + 'Namespace/Two/view/base/layout/two.xml', + ]; + $areaFiles = [ + 'Namespace/Two/view/frontend/layout/four.txt', + 'Namespace/Two/view/frontend/layout/three.xml', + ]; + $directory->expects($this->at(0)) + ->method('search') + ->with('*/*/view/base/layout/*.xml') + ->will($this->returnValue($globalFiles)); + $directory->expects($this->at(3)) + ->method('search') + ->with('*/*/view/frontend/layout/*.xml') + ->will($this->returnValue($areaFiles)); + $directory->expects($this->atLeastOnce())->method('getAbsolutePath')->will($this->returnArgument(0)); + $objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManager'); + $objectManager->expects($this->atLeastOnce()) + ->method('create') + ->with('Magento\Framework\View\File', $this->anything()) + ->will($this->returnCallback(array($this, 'createFileCallback'))); + $fileFactory = new \Magento\Framework\View\File\Factory($objectManager); + $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $theme->expects($this->once())->method('getArea')->will($this->returnValue('frontend')); + $model = new Base($filesystem, $fileFactory, 'layout'); + $result = $model->getFiles($theme, '*.xml'); + + for ($i = 0; $i <= 2; $i++) { + $this->assertArrayHasKey($i, $result); + $this->assertInstanceOf('\Magento\Framework\View\File', $result[$i]); + } + $this->assertEquals($globalFiles[0], $result[0]->getFilename()); + $this->assertEquals($globalFiles[1], $result[1]->getFilename()); + $this->assertEquals($areaFiles[1], $result[2]->getFilename()); + } + + /** + * A callback subroutine for testing creation of value objects + * + * @param string $class + * @param array $args + * @return object + */ + public function createFileCallback($class, $args) + { + return new $class($args['filename'], $args['module'], $args['theme'], $args['isBase']); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Decorator/ModuleDependencyTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleDependencyTest.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Decorator/ModuleDependencyTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleDependencyTest.php index a328d09a950518f5b67ec54de5559cf1dc5f6d90..69c9e37f9345e97fe59aa5c2172b55c4b26c2088 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Decorator/ModuleDependencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleDependencyTest.php @@ -21,12 +21,13 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Decorator; + +namespace Magento\Framework\View\File\Collector\Decorator; class ModuleDependencyTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency + * @var \Magento\Framework\View\File\Collector\Decorator\ModuleDependency */ private $_model; @@ -43,19 +44,22 @@ class ModuleDependencyTest extends \PHPUnit_Framework_TestCase protected function setUp() { $modulesConfig = array( - 'Fixture_ModuleB' => array('name' => 'Fixture_ModuleB'), + 'Fixture_ModuleB' => array( + 'name' => 'Fixture_ModuleB', + ), 'Fixture_ModuleA' => array( 'name' => 'Fixture_ModuleA', - 'depends' => array('module' => array('Fixture_ModuleB')) - ) + 'depends' => array( + 'module' => array('Fixture_ModuleB'), + ) + ), ); - $this->_fileSource = $this->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); + $this->_fileSource = $this->getMockForAbstractClass('Magento\Framework\View\File\CollectorInterface'); $this->_moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface'); $this->_moduleListMock->expects($this->any())->method('getModules')->will($this->returnValue($modulesConfig)); - $this->_model = new \Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency( - $this->_fileSource, - $this->_moduleListMock + $this->_model = new \Magento\Framework\View\File\Collector\Decorator\ModuleDependency( + $this->_fileSource, $this->_moduleListMock ); } @@ -68,47 +72,44 @@ class ModuleDependencyTest extends \PHPUnit_Framework_TestCase public function testGetFiles(array $fixtureFiles, array $expectedFiles, $message) { $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); - $this->_fileSource->expects( - $this->once() - )->method( - 'getFiles' - )->with( - $theme - )->will( - $this->returnValue($fixtureFiles) - ); - $this->assertSame($expectedFiles, $this->_model->getFiles($theme), $message); + $this->_fileSource + ->expects($this->once()) + ->method('getFiles') + ->with($theme, '*.xml') + ->will($this->returnValue($fixtureFiles)) + ; + $this->assertSame($expectedFiles, $this->_model->getFiles($theme, '*.xml'), $message); } public function getFilesDataProvider() { - $fileOne = new \Magento\Framework\View\Layout\File('b.xml', 'Fixture_ModuleB'); - $fileTwo = new \Magento\Framework\View\Layout\File('a.xml', 'Fixture_ModuleA'); - $fileThree = new \Magento\Framework\View\Layout\File('b.xml', 'Fixture_ModuleA'); + $fileOne = new \Magento\Framework\View\File('b.xml', 'Fixture_ModuleB'); + $fileTwo = new \Magento\Framework\View\File('a.xml', 'Fixture_ModuleA'); + $fileThree = new \Magento\Framework\View\File('b.xml', 'Fixture_ModuleA'); - $unknownFileOne = new \Magento\Framework\View\Layout\File('b.xml', 'Unknown_ModuleA'); - $unknownFileTwo = new \Magento\Framework\View\Layout\File('a.xml', 'Unknown_ModuleB'); + $unknownFileOne = new \Magento\Framework\View\File('b.xml', 'Unknown_ModuleA'); + $unknownFileTwo = new \Magento\Framework\View\File('a.xml', 'Unknown_ModuleB'); return array( 'same module' => array( array($fileThree, $fileTwo), array($fileTwo, $fileThree), - 'Files belonging to the same module are expected to be sorted by file names' + 'Files belonging to the same module are expected to be sorted by file names', ), 'different modules' => array( array($fileTwo, $fileOne), array($fileOne, $fileTwo), - 'Files belonging to different modules are expected to be sorted by module dependencies' + 'Files belonging to different modules are expected to be sorted by module dependencies', ), 'different unknown modules' => array( array($unknownFileTwo, $unknownFileOne), array($unknownFileOne, $unknownFileTwo), - 'Files belonging to different unknown modules are expected to be sorted by module names' + 'Files belonging to different unknown modules are expected to be sorted by module names', ), 'known and unknown modules' => array( array($fileTwo, $unknownFileOne), array($unknownFileOne, $fileTwo), - 'Files belonging to unknown modules are expected to go before ones of known modules' - ) + 'Files belonging to unknown modules are expected to go before ones of known modules', + ), ); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Decorator/ModuleOutputTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleOutputTest.php similarity index 58% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Decorator/ModuleOutputTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleOutputTest.php index b11db601369f3b525016d13af68f7a52b265140d..e9cf7628e3bbe5da944fca56f15665f6f220ef81 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Decorator/ModuleOutputTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Decorator/ModuleOutputTest.php @@ -21,12 +21,13 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Decorator; + +namespace Magento\Framework\View\File\Collector\Decorator; class ModuleOutputTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput + * @var \Magento\Framework\View\File\Collector\Decorator\ModuleOutput */ private $_model; @@ -42,36 +43,33 @@ class ModuleOutputTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_fileSource = $this->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); + $this->_fileSource = $this->getMockForAbstractClass('Magento\Framework\View\File\CollectorInterface'); $this->_moduleManager = $this->getMock('Magento\Framework\Module\Manager', array(), array(), '', false); - $this->_moduleManager->expects( - $this->any() - )->method( - 'isOutputEnabled' - )->will( - $this->returnValueMap(array(array('Module_OutputEnabled', true), array('Module_OutputDisabled', false))) - ); - $this->_model = new \Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput( - $this->_fileSource, - $this->_moduleManager + $this->_moduleManager + ->expects($this->any()) + ->method('isOutputEnabled') + ->will($this->returnValueMap(array( + array('Module_OutputEnabled', true), + array('Module_OutputDisabled', false), + ))) + ; + $this->_model = new \Magento\Framework\View\File\Collector\Decorator\ModuleOutput( + $this->_fileSource, $this->_moduleManager ); } public function testGetFiles() { $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); - $fileOne = new \Magento\Framework\View\Layout\File('1.xml', 'Module_OutputEnabled'); - $fileTwo = new \Magento\Framework\View\Layout\File('2.xml', 'Module_OutputDisabled'); - $fileThree = new \Magento\Framework\View\Layout\File('3.xml', 'Module_OutputEnabled', $theme); - $this->_fileSource->expects( - $this->once() - )->method( - 'getFiles' - )->with( - $theme - )->will( - $this->returnValue(array($fileOne, $fileTwo, $fileThree)) - ); - $this->assertSame(array($fileOne, $fileThree), $this->_model->getFiles($theme)); + $fileOne = new \Magento\Framework\View\File('1.xml', 'Module_OutputEnabled'); + $fileTwo = new \Magento\Framework\View\File('2.xml', 'Module_OutputDisabled'); + $fileThree = new \Magento\Framework\View\File('3.xml', 'Module_OutputEnabled', $theme); + $this->_fileSource + ->expects($this->once()) + ->method('getFiles') + ->with($theme, '*.xml') + ->will($this->returnValue(array($fileOne, $fileTwo, $fileThree))) + ; + $this->assertSame(array($fileOne, $fileThree), $this->_model->getFiles($theme, '*.xml')); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Override/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php similarity index 58% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Override/BaseTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php index f1bb3872e36106bb54057c082af7ba390cf83b67..ceb41484248b519a049316dadc08c2e04b198e06 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Override/BaseTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php @@ -21,10 +21,11 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Override; -use Magento\Framework\Filesystem\Directory\Read; -use Magento\Framework\View\Layout\File\Factory; +namespace Magento\Framework\View\File\Collector\Override; + +use Magento\Framework\Filesystem\Directory\Read, + Magento\Framework\View\File\Factory; class BaseTest extends \PHPUnit_Framework_TestCase { @@ -47,23 +48,19 @@ class BaseTest extends \PHPUnit_Framework_TestCase { $this->directory = $this->getMock( 'Magento\Framework\Filesystem\Directory\Read', - array('getAbsolutePath', 'search'), - array(), - '', - false + array('getAbsolutePath', 'search'), array(), '', false + ); + $filesystem = $this->getMock( + 'Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false ); - $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false); - $filesystem->expects( - $this->once() - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::THEMES_DIR - )->will( - $this->returnValue($this->directory) + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::THEMES_DIR) + ->will($this->returnValue($this->directory)); + $this->fileFactory = $this->getMock('Magento\Framework\View\File\Factory', array(), array(), '', false); + $this->model = new \Magento\Framework\View\File\Collector\Override\Base( + $filesystem, $this->fileFactory, 'override' ); - $this->fileFactory = $this->getMock('Magento\Framework\View\Layout\File\Factory', array(), array(), '', false); - $this->model = new \Magento\Framework\View\Layout\File\Source\Override\Base($filesystem, $this->fileFactory); } /** @@ -77,22 +74,28 @@ class BaseTest extends \PHPUnit_Framework_TestCase $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); $theme->expects($this->once())->method('getFullPath')->will($this->returnValue('area/theme/path')); - $handlePath = 'design/area/theme/path/%s/layout/override/base/%s.xml'; + $handlePath = 'design/area/theme/path/%s/override/%s'; $returnKeys = array(); foreach ($files as $file) { $returnKeys[] = sprintf($handlePath, $file['module'], $file['handle']); } - $this->directory->expects($this->once())->method('search')->will($this->returnValue($returnKeys)); - $this->directory->expects($this->any())->method('getAbsolutePath')->will($this->returnArgument(0)); + $this->directory->expects($this->once()) + ->method('search') + ->will($this->returnValue($returnKeys)); + $this->directory->expects($this->any()) + ->method('getAbsolutePath') + ->will($this->returnArgument(0)); $checkResult = array(); foreach ($files as $key => $file) { - $checkResult[$key] = new \Magento\Framework\View\Layout\File($file['handle'] . '.xml', $file['module']); - $this->fileFactory->expects($this->at($key)) + $checkResult[$key] = new \Magento\Framework\View\File($file['handle'], $file['module']); + $this->fileFactory + ->expects($this->at($key)) ->method('create') ->with(sprintf($handlePath, $file['module'], $file['handle']), $file['module']) - ->will($this->returnValue($checkResult[$key])); + ->will($this->returnValue($checkResult[$key])) + ; } $this->assertSame($checkResult, $this->model->getFiles($theme, $filePath)); @@ -106,13 +109,18 @@ class BaseTest extends \PHPUnit_Framework_TestCase return array( array( array( - array('handle' => '1', 'module' => 'Module_One'), - array('handle' => '2', 'module' => 'Module_One'), - array('handle' => '3', 'module' => 'Module_Two') + array('handle' => '1.xml', 'module' => 'Module_One'), + array('handle' => '2.xml', 'module' => 'Module_One'), + array('handle' => '3.xml', 'module' => 'Module_Two'), + ), + '*.xml', + ), + array( + array( + array('handle' => 'preset/4', 'module' => 'Module_Fourth'), ), - '*' + 'preset/4', ), - array(array(array('handle' => 'preset/4', 'module' => 'Module_Fourth')), 'preset/4') ); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Override/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php similarity index 56% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Override/ThemeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php index 660b29e300724f4068a66ddb4f3bd7ddda1e201e..e75ffb95e4622f76ba59fe350e8c8b961c65f501 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/Override/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php @@ -21,12 +21,13 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Override; -class ThemeTest extends \PHPUnit_Framework_TestCase +namespace Magento\Framework\View\File\Collector\Override; + +class ThemeModularTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Layout\File\Source\Override\Theme + * @var \Magento\Framework\View\File\Collector\Override\ThemeModular */ private $_model; @@ -44,19 +45,17 @@ class ThemeTest extends \PHPUnit_Framework_TestCase { $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false); $this->_directory = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false); - $this->_directory->expects($this->any())->method('getAbsolutePath')->will($this->returnArgument(0)); - - $filesystem->expects( - $this->any() - )->method( - 'getDirectoryRead' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::THEMES_DIR) - )->will( - $this->returnValue($this->_directory) + $this->_directory->expects($this->any()) + ->method('getAbsolutePath') + ->will($this->returnArgument(0)); + + $filesystem->expects($this->any())->method('getDirectoryRead') + ->with($this->equalTo(\Magento\Framework\App\Filesystem::THEMES_DIR)) + ->will($this->returnValue($this->_directory)); + $this->_fileFactory = $this->getMock('Magento\Framework\View\File\Factory', array(), array(), '', false); + $this->_model = new \Magento\Framework\View\File\Collector\Override\ThemeModular( + $filesystem, $this->_fileFactory, 'override/theme' ); - $this->_fileFactory = $this->getMock('Magento\Framework\View\Layout\File\Factory', array(), array(), '', false); - $this->_model = new \Magento\Framework\View\Layout\File\Source\Override\Theme($filesystem, $this->_fileFactory); } public function testGetFiles() @@ -72,32 +71,25 @@ class ThemeTest extends \PHPUnit_Framework_TestCase $theme->expects($this->once())->method('getFullPath')->will($this->returnValue('area/theme_path')); $theme->expects($this->once())->method('getParentTheme')->will($this->returnValue($parentTheme)); - $filePathOne = 'design/area/theme_path/Module_One/layout/override/theme/parent_theme/1.xml'; - $filePathTwo = 'design/area/theme_path/Module_Two/layout/override/theme/grand_parent_theme/2.xml'; - $this->_directory->expects( - $this->once() - )->method( - 'search' - )->with( - $this->equalTo('area/theme_path/*_*/layout/override/theme/*/*.xml') - )->will( - $this->returnValue(array($filePathOne, $filePathTwo)) - ); - - $fileOne = new \Magento\Framework\View\Layout\File('1.xml', 'Module_One', $parentTheme); - $fileTwo = new \Magento\Framework\View\Layout\File('2.xml', 'Module_Two', $grandparentTheme); - $this->_fileFactory->expects($this->exactly(2)) + $filePathOne = 'design/area/theme_path/Module_One/override/theme/parent_theme/1.xml'; + $filePathTwo = 'design/area/theme_path/Module_Two/override/theme/grand_parent_theme/2.xml'; + $this->_directory->expects($this->once()) + ->method('search') + ->with($this->equalTo('area/theme_path/*_*/override/theme/*/*.xml')) + ->will($this->returnValue(array($filePathOne, $filePathTwo))); + + $fileOne = new \Magento\Framework\View\File('1.xml', 'Module_One', $parentTheme); + $fileTwo = new \Magento\Framework\View\File('2.xml', 'Module_Two', $grandparentTheme); + $this->_fileFactory + ->expects($this->exactly(2)) ->method('create') - ->will( - $this->returnValueMap( - array( - array($filePathOne, 'Module_One', $parentTheme, false, $fileOne), - array($filePathTwo, 'Module_Two', $grandparentTheme, false, $fileTwo) - ) - ) - ); - - $this->assertSame(array($fileOne, $fileTwo), $this->_model->getFiles($theme)); + ->will($this->returnValueMap(array( + array($filePathOne, 'Module_One', $parentTheme, false, $fileOne), + array($filePathTwo, 'Module_Two', $grandparentTheme, false, $fileTwo), + ))) + ; + + $this->assertSame(array($fileOne, $fileTwo), $this->_model->getFiles($theme, '*.xml')); } public function testGetFilesWithPreset() @@ -113,40 +105,31 @@ class ThemeTest extends \PHPUnit_Framework_TestCase $theme->expects($this->once())->method('getFullPath')->will($this->returnValue('area/theme_path')); $theme->expects($this->once())->method('getParentTheme')->will($this->returnValue($parentTheme)); - $filePathOne = 'design/area/theme_path/Module_Two/layout/override/theme/grand_parent_theme/preset/3.xml'; - $this->_directory->expects( - $this->once() - )->method( - 'search' - )->with( - 'area/theme_path/*_*/layout/override/theme/*/preset/3.xml' - )->will( - $this->returnValue(array($filePathOne)) - ); + $filePathOne = 'design/area/theme_path/Module_Two/override/theme/grand_parent_theme/preset/3.xml'; + $this->_directory->expects($this->once()) + ->method('search') + ->with('area/theme_path/*_*/override/theme/*/preset/3.xml') + ->will($this->returnValue(array($filePathOne))) + ; - $fileOne = new \Magento\Framework\View\Layout\File('3.xml', 'Module_Two', $grandparentTheme); - $this->_fileFactory->expects( - $this->once() - )->method( - 'create' - )->with( - $filePathOne, - 'Module_Two', - $grandparentTheme - )->will( - $this->returnValue($fileOne) - ); + $fileOne = new \Magento\Framework\View\File('3.xml', 'Module_Two', $grandparentTheme); + $this->_fileFactory + ->expects($this->once()) + ->method('create') + ->with($filePathOne, 'Module_Two', $grandparentTheme) + ->will($this->returnValue($fileOne)) + ; - $this->assertSame(array($fileOne), $this->_model->getFiles($theme, 'preset/3')); + $this->assertSame(array($fileOne), $this->_model->getFiles($theme, 'preset/3.xml')); } public function testGetFilesWrongAncestor() { - $filePath = 'design/area/theme_path/Module_One/layout/override/theme/parent_theme/1.xml'; + $filePath = 'design/area/theme_path/Module_One/override/theme/parent_theme/1.xml'; $this->setExpectedException( 'Magento\Framework\Exception', - "Trying to override layout file '{$filePath}' for theme 'parent_theme'" . - ", which is not ancestor of theme 'theme_path'" + "Trying to override modular view file '$filePath' for theme 'parent_theme'" + . ", which is not ancestor of theme 'theme_path'" ); $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); @@ -154,16 +137,11 @@ class ThemeTest extends \PHPUnit_Framework_TestCase $theme->expects($this->once())->method('getParentTheme')->will($this->returnValue(null)); $theme->expects($this->once())->method('getCode')->will($this->returnValue('theme_path')); - $this->_directory->expects( - $this->once() - )->method( - 'search' - )->with( - 'area/theme_path/*_*/layout/override/theme/*/*.xml' - )->will( - $this->returnValue(array($filePath)) - ); + $this->_directory->expects($this->once()) + ->method('search') + ->with('area/theme_path/*_*/override/theme/*/*.xml') + ->will($this->returnValue(array($filePath))); - $this->_model->getFiles($theme); + $this->_model->getFiles($theme, '*.xml'); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeModularTest.php similarity index 53% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/ThemeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeModularTest.php index 250e268e376830dd67f79221e5d7cdeddef62de1..e8f69c18aece7981b82acf70d35220e217a94e14 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeModularTest.php @@ -21,15 +21,16 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source; -use Magento\Framework\Filesystem\Directory\Read; -use Magento\Framework\View\Layout\File\Factory; +namespace Magento\Framework\View\File\Collector; -class ThemeTest extends \PHPUnit_Framework_TestCase +use Magento\Framework\Filesystem\Directory\Read, + Magento\Framework\View\File\Factory; + +class ThemeModularTest extends \PHPUnit_Framework_TestCase { /** - * @var Base + * @var ThemeModular */ private $model; @@ -47,29 +48,19 @@ class ThemeTest extends \PHPUnit_Framework_TestCase { $this->directory = $this->getMock( 'Magento\Framework\Filesystem\Directory\Read', - array('getAbsolutePath', 'search'), - array(), - '', - false + array('getAbsolutePath', 'search'), array(), '', false ); $filesystem = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getDirectoryRead', '__wakeup'), - array(), - '', - false + 'Magento\Framework\App\Filesystem', array('getDirectoryRead', '__wakeup'), array(), '', false ); - $filesystem->expects( - $this->once() - )->method( - 'getDirectoryRead' - )->with( - \Magento\Framework\App\Filesystem::THEMES_DIR - )->will( - $this->returnValue($this->directory) + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(\Magento\Framework\App\Filesystem::THEMES_DIR) + ->will($this->returnValue($this->directory)); + $this->fileFactory = $this->getMock('Magento\Framework\View\File\Factory', array(), array(), '', false); + $this->model = new \Magento\Framework\View\File\Collector\ThemeModular( + $filesystem, $this->fileFactory, 'subdir' ); - $this->fileFactory = $this->getMock('Magento\Framework\View\Layout\File\Factory', array(), array(), '', false); - $this->model = new \Magento\Framework\View\Layout\File\Source\Theme($filesystem, $this->fileFactory); } /** @@ -83,33 +74,28 @@ class ThemeTest extends \PHPUnit_Framework_TestCase $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); $theme->expects($this->once())->method('getFullPath')->will($this->returnValue('area/theme/path')); - $handlePath = 'design/area/theme/path/%s/layout/%s.xml'; + $handlePath = 'design/area/theme/path/%s/subdir/%s'; $returnKeys = array(); foreach ($files as $file) { $returnKeys[] = sprintf($handlePath, $file['module'], $file['handle']); } - $this->directory->expects($this->once())->method('search')->will($this->returnValue($returnKeys)); - $this->directory->expects($this->any())->method('getAbsolutePath')->will($this->returnArgument(0)); + $this->directory->expects($this->once()) + ->method('search') + ->will($this->returnValue($returnKeys)); + $this->directory->expects($this->any()) + ->method('getAbsolutePath') + ->will($this->returnArgument(0)); $checkResult = array(); foreach ($files as $key => $file) { - $checkResult[$key] = new \Magento\Framework\View\Layout\File( - $file['handle'] . '.xml', - $file['module'], - $theme - ); - $this->fileFactory->expects( - $this->at($key) - )->method( - 'create' - )->with( - sprintf($handlePath, $file['module'], $file['handle']), - $file['module'], - $theme - )->will( - $this->returnValue($checkResult[$key]) - ); + $checkResult[$key] = new \Magento\Framework\View\File($file['handle'], $file['module'], $theme); + $this->fileFactory + ->expects($this->at($key)) + ->method('create') + ->with(sprintf($handlePath, $file['module'], $file['handle']), $file['module'], $theme) + ->will($this->returnValue($checkResult[$key])) + ; } $this->assertSame($checkResult, $this->model->getFiles($theme, $filePath)); } @@ -122,13 +108,18 @@ class ThemeTest extends \PHPUnit_Framework_TestCase return array( array( array( - array('handle' => '1', 'module' => 'Module_One'), - array('handle' => '2', 'module' => 'Module_One'), - array('handle' => '3', 'module' => 'Module_Two') + array('handle' => '1.xml', 'module' => 'Module_One'), + array('handle' => '2.xml', 'module' => 'Module_One'), + array('handle' => '3.xml', 'module' => 'Module_Two'), + ), + '*.xml', + ), + array( + array( + array('handle' => 'preset/4', 'module' => 'Module_Fourth'), ), - '*' + 'preset/4', ), - array(array(array('handle' => 'preset/4', 'module' => 'Module_Fourth')), 'preset/4') ); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/FactoryTest.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/FactoryTest.php index ce8e6177f68f8e2e7a9b16f7c9e92a9e9d80b4a9..6a1245a307b1555f6949f5118eb8ea02211c6918 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/FactoryTest.php @@ -21,12 +21,13 @@ * @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) */ -namespace Magento\Framework\View\Layout\File; + +namespace Magento\Framework\View\File; class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Layout\File\Factory + * @var \Magento\Framework\View\File\Factory */ private $_model; @@ -38,28 +39,28 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManager'); - $this->_model = new \Magento\Framework\View\Layout\File\Factory($this->_objectManager); + $this->_model = new \Magento\Framework\View\File\Factory($this->_objectManager); } public function testCreate() { $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); - $file = new \Magento\Framework\View\Layout\File(__FILE__, 'Fixture_Module', $theme); + $file = new \Magento\Framework\View\File(__FILE__, 'Fixture_Module', $theme); $isBase = true; - $this->_objectManager->expects($this->once()) + $this->_objectManager + ->expects($this->once()) ->method('create') ->with( - 'Magento\Framework\View\Layout\File', - $this->identicalTo( - array( - 'filename' => __FILE__, - 'module' => 'Fixture_Module', - 'theme' => $theme, - 'isBase' => $isBase - ) - ) + 'Magento\Framework\View\File', + $this->identicalTo(array( + 'filename' => __FILE__, + 'module' => 'Fixture_Module', + 'theme' => $theme, + 'isBase' => $isBase, + )) ) - ->will($this->returnValue($file)); + ->will($this->returnValue($file)) + ; $this->assertSame($file, $this->_model->create(__FILE__, 'Fixture_Module', $theme, $isBase)); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileList/CollatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileList/CollatorTest.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileList/CollatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/FileList/CollatorTest.php index 5bf7458f3dba290dca4b3c9131136a1c4bc05244..9a8c235ba1807c2ec2ae039e56a6f4b8b4e896ad 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileList/CollatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileList/CollatorTest.php @@ -21,7 +21,8 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\FileList; + +namespace Magento\Framework\View\File\FileList; class CollatorTest extends \PHPUnit_Framework_TestCase { @@ -31,24 +32,24 @@ class CollatorTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Framework\View\Layout\File[] + * @var \Magento\Framework\View\File[] */ protected $_originFiles; /** - * @var \Magento\Framework\View\Layout\File + * @var \Magento\Framework\View\File */ protected $_baseFile; /** - * @var \Magento\Framework\View\Layout\File + * @var \Magento\Framework\View\File */ protected $_themeFile; protected function setUp() { - $this->_baseFile = $this->_createLayoutFile('fixture.xml', 'Fixture_TestModule'); - $this->_themeFile = $this->_createLayoutFile('fixture.xml', 'Fixture_TestModule', 'area/theme/path'); + $this->_baseFile = $this->_createViewFile('fixture.xml', 'Fixture_TestModule'); + $this->_themeFile = $this->_createViewFile('fixture.xml', 'Fixture_TestModule', 'area/theme/path'); $this->_originFiles = array( $this->_baseFile->getFileIdentifier() => $this->_baseFile, $this->_themeFile->getFileIdentifier() => $this->_themeFile @@ -57,26 +58,26 @@ class CollatorTest extends \PHPUnit_Framework_TestCase } /** - * Return newly created theme layout file with a mocked theme + * Return newly created theme view file with a mocked theme * * @param string $filename * @param string $module * @param string|null $themeFullPath - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Layout\File + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\File */ - protected function _createLayoutFile($filename, $module, $themeFullPath = null) + protected function _createViewFile($filename, $module, $themeFullPath = null) { $theme = null; if ($themeFullPath !== null) { $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); $theme->expects($this->any())->method('getFullPath')->will($this->returnValue($themeFullPath)); } - return new \Magento\Framework\View\Layout\File($filename, $module, $theme); + return new \Magento\Framework\View\File($filename, $module, $theme); } public function testCollateBaseFile() { - $file = $this->_createLayoutFile('test/fixture.xml', 'Fixture_TestModule'); + $file = $this->_createViewFile('test/fixture.xml', 'Fixture_TestModule'); $this->assertSame( array($file->getFileIdentifier() => $file, $this->_themeFile->getFileIdentifier() => $this->_themeFile), $this->_model->collate(array($file), $this->_originFiles) @@ -85,7 +86,7 @@ class CollatorTest extends \PHPUnit_Framework_TestCase public function testReplaceThemeFile() { - $file = $this->_createLayoutFile('test/fixture.xml', 'Fixture_TestModule', 'area/theme/path'); + $file = $this->_createViewFile('test/fixture.xml', 'Fixture_TestModule', 'area/theme/path'); $this->assertSame( array($this->_baseFile->getFileIdentifier() => $this->_baseFile, $file->getFileIdentifier() => $file), $this->_model->collate(array($file), $this->_originFiles) @@ -94,31 +95,31 @@ class CollatorTest extends \PHPUnit_Framework_TestCase /** * @expectedException \LogicException - * @expectedExceptionMessage Overriding layout file 'new.xml' does not match to any of the files + * @expectedExceptionMessage Overriding view file 'new.xml' does not match to any of the files */ public function testReplaceBaseFileException() { - $file = $this->_createLayoutFile('new.xml', 'Fixture_TestModule'); + $file = $this->_createViewFile('new.xml', 'Fixture_TestModule'); $this->_model->collate(array($file), $this->_originFiles); } /** * @expectedException \LogicException - * @expectedExceptionMessage Overriding layout file 'test/fixture.xml' does not match to any of the files + * @expectedExceptionMessage Overriding view file 'test/fixture.xml' does not match to any of the files */ public function testReplaceBaseFileEmptyThemePathException() { - $file = $this->_createLayoutFile('test/fixture.xml', 'Fixture_TestModule', ''); + $file = $this->_createViewFile('test/fixture.xml', 'Fixture_TestModule', ''); $this->_model->collate(array($file), $this->_originFiles); } /** * @expectedException \LogicException - * @expectedExceptionMessage Overriding layout file 'new.xml' does not match to any of the files + * @expectedExceptionMessage Overriding view file 'new.xml' does not match to any of the files */ public function testReplaceThemeFileException() { - $file = $this->_createLayoutFile('new.xml', 'Fixture_TestModule', 'area/theme/path'); + $file = $this->_createViewFile('new.xml', 'Fixture_TestModule', 'area/theme/path'); $this->_model->collate(array($file), $this->_originFiles); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileList/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileList/FactoryTest.php similarity index 50% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileList/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/FileList/FactoryTest.php index e8e744a6239bf90eae87c0b1650347b5ed13e15c..c9d15b51f7fd24e3a6e8c5734f115e70e8c33bc9 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileList/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileList/FactoryTest.php @@ -21,15 +21,13 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\FileList; + +namespace Magento\Framework\View\File\FileList; class FactoryTest extends \PHPUnit_Framework_TestCase { - const CREATE_EXCEPTION_MESSAGE = - 'Magento\Framework\View\Layout\File\FileList\Collator has to implement the collate interface.'; - /** - * @var \Magento\Framework\View\Layout\File\FileList\Factory + * @var \Magento\Framework\View\File\FileList\Factory */ protected $model; @@ -41,57 +39,45 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManager'); - $this->model = new \Magento\Framework\View\Layout\File\FileList\Factory($this->objectManager); + $this->model = new \Magento\Framework\View\File\FileList\Factory($this->objectManager); } public function testCreate() { $helperObjectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $collator = $helperObjectManager->getObject( - \Magento\Framework\View\Layout\File\FileList\Factory::FILE_LIST_COLLATOR - ); - $list = $helperObjectManager->getObject('Magento\Framework\View\Layout\File\FileList'); + $collator = $helperObjectManager->getObject(\Magento\Framework\View\File\FileList\Factory::FILE_LIST_COLLATOR); + $list = $helperObjectManager->getObject('Magento\Framework\View\File\FileList'); - $this->objectManager->expects( - $this->once() - )->method( - 'get' - )->with( - $this->equalTo(\Magento\Framework\View\Layout\File\FileList\Factory::FILE_LIST_COLLATOR) - )->will( - $this->returnValue($collator) - ); + $this->objectManager + ->expects($this->once()) + ->method('get') + ->with($this->equalTo(\Magento\Framework\View\File\FileList\Factory::FILE_LIST_COLLATOR)) + ->will($this->returnValue($collator)); - $this->objectManager->expects( - $this->once() - )->method( - 'create' - )->with( - $this->equalTo('Magento\Framework\View\Layout\File\FileList'), - $this->equalTo(array('collator' => $collator)) - )->will( - $this->returnValue($list) - ); + $this->objectManager + ->expects($this->once()) + ->method('create') + ->with( + $this->equalTo('Magento\Framework\View\File\FileList'), + $this->equalTo(array('collator' => $collator)) + ) + ->will($this->returnValue($list)); $this->assertSame($list, $this->model->create()); } /** - * @expectedException UnexpectedValueException - * @expectedExceptionMessage \Magento\Framework\View\Layout\File\FileList\FactoryTest::CREATE_EXCEPTION_MESSAGE + * @expectedException \UnexpectedValueException + * @expectedExceptionMessage Magento\Framework\View\File\FileList\Collator has to implement the collate interface. */ public function testCreateException() { $collator = new \stdClass(); - $this->objectManager->expects( - $this->once() - )->method( - 'get' - )->with( - $this->equalTo(\Magento\Framework\View\Layout\File\FileList\Factory::FILE_LIST_COLLATOR) - )->will( - $this->returnValue($collator) - ); + $this->objectManager + ->expects($this->once()) + ->method('get') + ->with($this->equalTo(\Magento\Framework\View\File\FileList\Factory::FILE_LIST_COLLATOR)) + ->will($this->returnValue($collator)); $this->model->create(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileListTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php similarity index 63% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileListTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php index 156b60fb836ba848a3d21c1fd98bbc67cd23e794..afe42ee64620f12d8c336cd897bf164a1c3a6636 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/FileListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/FileListTest.php @@ -21,55 +21,56 @@ * @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) */ -namespace Magento\Framework\View\Layout\File; + +namespace Magento\Framework\View\File; class FileListTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Layout\File\FileList + * @var \Magento\Framework\View\File\FileList */ private $_model; /** - * @var \Magento\Framework\View\Layout\File + * @var \Magento\Framework\View\File */ private $_baseFile; /** - * @var \Magento\Framework\View\Layout\File + * @var \Magento\Framework\View\File */ private $_themeFile; /** - * @var \Magento\Framework\View\Layout\File\FileList\Collator|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\File\FileList\Collator|\PHPUnit_Framework_MockObject_MockObject */ protected $collator; protected function setUp() { - $this->_baseFile = $this->_createLayoutFile('fixture.xml', 'Fixture_TestModule'); - $this->_themeFile = $this->_createLayoutFile('fixture.xml', 'Fixture_TestModule', 'area/theme/path'); - $this->collator = $this->getMock('Magento\Framework\View\Layout\File\FileList\Collator', array('collate')); - $this->_model = new \Magento\Framework\View\Layout\File\FileList($this->collator); + $this->_baseFile = $this->_createViewFile('fixture.xml', 'Fixture_TestModule'); + $this->_themeFile = $this->_createViewFile('fixture.xml', 'Fixture_TestModule', 'area/theme/path'); + $this->collator = $this->getMock('Magento\Framework\View\File\FileList\Collator', array('collate')); + $this->_model = new \Magento\Framework\View\File\FileList($this->collator); $this->_model->add(array($this->_baseFile, $this->_themeFile)); } /** - * Return newly created theme layout file with a mocked theme + * Return newly created theme view file with a mocked theme * * @param string $filename * @param string $module * @param string|null $themeFullPath * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Design\ThemeInterface */ - protected function _createLayoutFile($filename, $module, $themeFullPath = null) + protected function _createViewFile($filename, $module, $themeFullPath = null) { $theme = null; if ($themeFullPath !== null) { $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); $theme->expects($this->any())->method('getFullPath')->will($this->returnValue($themeFullPath)); } - return new \Magento\Framework\View\Layout\File($filename, $module, $theme); + return new \Magento\Framework\View\File($filename, $module, $theme); } public function testGetAll() @@ -79,35 +80,35 @@ class FileListTest extends \PHPUnit_Framework_TestCase public function testAddBaseFile() { - $file = $this->_createLayoutFile('new.xml', 'Fixture_TestModule'); + $file = $this->_createViewFile('new.xml', 'Fixture_TestModule'); $this->_model->add(array($file)); $this->assertSame(array($this->_baseFile, $this->_themeFile, $file), $this->_model->getAll()); } public function testAddThemeFile() { - $file = $this->_createLayoutFile('new.xml', 'Fixture_TestModule', 'area/theme/path'); + $file = $this->_createViewFile('new.xml', 'Fixture_TestModule', 'area/theme/path'); $this->_model->add(array($file)); $this->assertSame(array($this->_baseFile, $this->_themeFile, $file), $this->_model->getAll()); } /** * @expectedException \LogicException - * @expectedExceptionMessage Layout file 'test/fixture.xml' is indistinguishable from the file 'fixture.xml' + * @expectedExceptionMessage View file 'test/fixture.xml' is indistinguishable from the file 'fixture.xml' */ public function testAddBaseFileException() { - $file = $this->_createLayoutFile('test/fixture.xml', 'Fixture_TestModule'); + $file = $this->_createViewFile('test/fixture.xml', 'Fixture_TestModule'); $this->_model->add(array($file)); } /** * @expectedException \LogicException - * @expectedExceptionMessage Layout file 'test/fixture.xml' is indistinguishable from the file 'fixture.xml' + * @expectedExceptionMessage View file 'test/fixture.xml' is indistinguishable from the file 'fixture.xml' */ public function testAddThemeFileException() { - $file = $this->_createLayoutFile('test/fixture.xml', 'Fixture_TestModule', 'area/theme/path'); + $file = $this->_createViewFile('test/fixture.xml', 'Fixture_TestModule', 'area/theme/path'); $this->_model->add(array($file)); } @@ -115,21 +116,16 @@ class FileListTest extends \PHPUnit_Framework_TestCase { $files = array('1'); $result = array('3'); - $this->collator->expects( - $this->once() - )->method( - 'collate' - )->with( - $this->equalTo($files), - $this->equalTo( - array( + $this->collator + ->expects($this->once()) + ->method('collate') + ->with( + $this->equalTo($files), + $this->equalTo(array( $this->_baseFile->getFileIdentifier() => $this->_baseFile, - $this->_themeFile->getFileIdentifier() => $this->_themeFile - ) - ) - )->will( - $this->returnValue($result) - ); + $this->_themeFile->getFileIdentifier() => $this->_themeFile) + )) + ->will($this->returnValue($result)); $this->assertNull($this->_model->replace($files)); $this->assertSame($result, $this->_model->getAll()); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php index c3c58ef7f4c4b92c50a1b0447848799e527ec6f5..7a58fec7f91345bd15f84e07e8414066ac264784 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/FileSystemTest.php @@ -30,38 +30,60 @@ namespace Magento\Framework\View; class FileSystemTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\FileSystem|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ protected $_model; /** - * @var \Magento\Framework\View\Design\FileResolution\StrategyPool|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Design\FileResolution\Fallback\File|\PHPUnit_Framework_MockObject_MockObject */ - protected $_strategyPool; + protected $_fileResolution; /** - * @var \Magento\Framework\View\Service|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile|\PHPUnit_Framework_MockObject_MockObject */ - protected $_viewService; + protected $_templateFileResolution; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_localeFileResolution; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_staticFileResolution; + + /** + * @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_assetRepo; protected function setUp() { - $this->_strategyPool = $this->getMock( - 'Magento\Framework\View\Design\FileResolution\StrategyPool', - array(), - array(), - '', - false + $this->_fileResolution = $this->getMock('Magento\Framework\View\Design\FileResolution\Fallback\File', array(), + array(), '', false ); - $this->_viewService = $this->getMock( - 'Magento\Framework\View\Service', - array('extractScope', 'updateDesignParams'), - array(), - '', - false + $this->_templateFileResolution = $this->getMock( + 'Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile', array(), array(), '', false + ); + $this->_localeFileResolution = $this->getMock( + 'Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile', array(), array(), '', false + ); + $this->_staticFileResolution = $this->getMock( + 'Magento\Framework\View\Design\FileResolution\Fallback\StaticFile', array(), array(), '', false + ); + $this->_assetRepo = $this->getMock('Magento\Framework\View\Asset\Repository', + array('extractScope', 'updateDesignParams', 'createAsset'), array(), '', false ); - $this->_model = new \Magento\Framework\View\FileSystem($this->_strategyPool, $this->_viewService); + $this->_model = new \Magento\Framework\View\FileSystem( + $this->_fileResolution, + $this->_templateFileResolution, + $this->_localeFileResolution, + $this->_staticFileResolution, + $this->_assetRepo + ); } public function testGetFilename() @@ -69,56 +91,52 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase $params = array( 'area' => 'some_area', 'themeModel' => $this->getMock( - 'Magento\Framework\View\Design\ThemeInterface', - array(), - array(), - '', - false, - false - ), - 'module' => 'Some_Module' //It should be set in \Magento\Framework\View\Service::extractScope - // but PHPUnit has problems with passing arguments by reference - + 'Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false, false + ), + 'module' => 'Some_Module' //It should be set in \Magento\Framework\View\Asset\Repository::extractScope + // but PHPUnit has troubles with passing arguments by reference ); $file = 'Some_Module::some_file.ext'; $expected = 'path/to/some_file.ext'; - $strategyMock = $this->getMock('Magento\Framework\View\Design\FileResolution\Strategy\FileInterface'); - $strategyMock->expects( - $this->once() - )->method( - 'getFile' - )->with( - $params['area'], - $params['themeModel'], - 'some_file.ext', - 'Some_Module' - )->will( - $this->returnValue($expected) - ); + $this->_fileResolution->expects($this->once()) + ->method('getFile') + ->with($params['area'], $params['themeModel'], 'some_file.ext', 'Some_Module') + ->will($this->returnValue($expected)); - $this->_strategyPool->expects( - $this->once() - )->method( - 'getFileStrategy' - )->with( - false - )->will( - $this->returnValue($strategyMock) - ); + $this->_assetRepo->expects($this->any()) + ->method('extractScope') + ->with($file, $params) + ->will($this->returnValue('some_file.ext')); + + $actual = $this->_model->getFilename($file, $params); + $this->assertEquals($expected, $actual); + } - $this->_viewService->expects( - $this->any() - )->method( - 'extractScope' - )->with( - $file, - $params - )->will( - $this->returnValue('some_file.ext') + public function testGetTemplateFileName() + { + $params = array( + 'area' => 'some_area', + 'themeModel' => $this->getMock( + 'Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false, false + ), + 'module' => 'Some_Module' //It should be set in \Magento\Framework\View\Asset\Repository::extractScope + // but PHPUnit has troubles with passing arguments by reference ); + $file = 'Some_Module::some_file.ext'; + $expected = 'path/to/some_file.ext'; - $actual = $this->_model->getFilename($file, $params); + $this->_templateFileResolution->expects($this->once()) + ->method('getFile') + ->with($params['area'], $params['themeModel'], 'some_file.ext', 'Some_Module') + ->will($this->returnValue($expected)); + + $this->_assetRepo->expects($this->any()) + ->method('extractScope') + ->with($file, $params) + ->will($this->returnValue('some_file.ext')); + + $actual = $this->_model->getTemplateFileName($file, $params); $this->assertEquals($expected, $actual); } @@ -139,29 +157,10 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase $file = 'some_file.ext'; $expected = 'path/to/some_file.ext'; - $strategyMock = $this->getMock('Magento\Framework\View\Design\FileResolution\Strategy\LocaleInterface'); - $strategyMock->expects( - $this->once() - )->method( - 'getLocaleFile' - )->with( - $params['area'], - $params['themeModel'], - $params['locale'], - 'some_file.ext' - )->will( - $this->returnValue($expected) - ); - - $this->_strategyPool->expects( - $this->once() - )->method( - 'getLocaleStrategy' - )->with( - false - )->will( - $this->returnValue($strategyMock) - ); + $this->_localeFileResolution->expects($this->once()) + ->method('getFile') + ->with($params['area'], $params['themeModel'], $params['locale'], 'some_file.ext') + ->will($this->returnValue($expected)); $actual = $this->_model->getLocaleFileName($file, $params); $this->assertEquals($expected, $actual); @@ -180,49 +179,17 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase false ), 'locale' => 'some_locale', - 'module' => 'Some_Module' //It should be set in \Magento\Framework\View\Service::extractScope - // but PHPUnit has problems with passing arguments by reference + 'module' => 'Some_Module' ); $file = 'Some_Module::some_file.ext'; $expected = 'path/to/some_file.ext'; - $strategyMock = $this->getMock('Magento\Framework\View\Design\FileResolution\Strategy\ViewInterface'); - $strategyMock->expects( - $this->once() - )->method( - 'getViewFile' - )->with( - $params['area'], - $params['themeModel'], - $params['locale'], - 'some_file.ext', - 'Some_Module' - )->will( - $this->returnValue($expected) - ); - - $this->_strategyPool->expects( - $this->once() - )->method( - 'getViewStrategy' - )->with( - false - )->will( - $this->returnValue($strategyMock) - ); - - $this->_viewService->expects( - $this->any() - )->method( - 'extractScope' - )->with( - $file, - $params - )->will( - $this->returnValue('some_file.ext') - ); + $this->_staticFileResolution->expects($this->once()) + ->method('getFile') + ->with($params['area'], $params['themeModel'], $params['locale'], 'some_file.ext', 'Some_Module') + ->will($this->returnValue($expected)); - $actual = $this->_model->getViewFile($file, $params); + $actual = $this->_model->getStaticFileName($file, $params); $this->assertEquals($expected, $actual); } @@ -237,6 +204,9 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expectedResult, $result); } + /** + * @return array + */ public function normalizePathDataProvider() { return array( @@ -246,4 +216,50 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase 'two times two dots path' => array('/dir/../somedir/../somefile.ext', '/somefile.ext') ); } + + /** + * @param string $relatedPath + * @param string $path + * @param string $expectedResult + * @dataProvider offsetPathDataProvider + */ + public function testOffsetPath($relatedPath, $path, $expectedResult) + { + $result = $this->_model->offsetPath($relatedPath, $path); + $this->assertEquals($expectedResult, $result); + } + + /** + * @return array + */ + public function offsetPathDataProvider() + { + return array( + 'local path' => array( + '/some/directory/two/another/file.ext', + '/some/directory/one/file.ext', + '../two/another' + ), + 'local path reverted' => array( + '/some/directory/one/file.ext', + '/some/directory/two/another/file.ext', + '../../one' + ), + 'url' => array( + 'http://example.com/images/logo.gif', + 'http://example.com/themes/demo/css/styles.css', + '../../../images' + ), + 'same path' => array( + '/some/directory/file.ext', + '/some/directory/file1.ext', + '.' + ), + 'non-normalized' => array( + '/some/directory/../one/file.ext', + '/some/directory/./two/another/file.ext', + '../../../one' + ), + ); + } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/FileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/FileTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/FileTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/FileTest.php index 88ff925e8635862f8cc43533abd5026e94ecda33..54e70800c5caae4cfabd57ece3d2f4a0d3a38e9b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/FileTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/FileTest.php @@ -21,12 +21,12 @@ * @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) */ -namespace Magento\Framework\View\Layout; +namespace Magento\Framework\View; class FileTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Layout\File + * @var \Magento\Framework\View\File */ private $_model; @@ -38,7 +38,7 @@ class FileTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); - $this->_model = new \Magento\Framework\View\Layout\File(__FILE__, 'Fixture_TestModule', $this->_theme, true); + $this->_model = new \Magento\Framework\View\File(__FILE__, 'Fixture_TestModule', $this->_theme, true); } public function testGetFilename() diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/AggregateTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Collector/AggregateTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/AggregateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Collector/AggregateTest.php index a773727938628e876553eb0a2239e76a3f4c8fd6..c1cac3e7fadea3d1e3374cb47adf50358c2061f5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/AggregateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Collector/AggregateTest.php @@ -21,12 +21,12 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source; +namespace Magento\Framework\View\Layout\File\Collector; class AggregateTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\View\Layout\File\Source\Aggregated + * @var \Magento\Framework\View\Layout\File\Collector\Aggregated */ private $_model; @@ -57,24 +57,24 @@ class AggregateTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_fileList = $this->getMock('Magento\Framework\View\Layout\File\FileList', array(), array(), '', false); - $this->_baseFiles = $this->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); - $this->_themeFiles = $this->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); + $this->_fileList = $this->getMock('Magento\Framework\View\File\FileList', array(), array(), '', false); + $this->_baseFiles = $this->getMockForAbstractClass('Magento\Framework\View\File\CollectorInterface'); + $this->_themeFiles = $this->getMockForAbstractClass('Magento\Framework\View\File\CollectorInterface'); $this->_overridingBaseFiles = $this->getMockForAbstractClass( - 'Magento\Framework\View\Layout\File\SourceInterface' + 'Magento\Framework\View\File\CollectorInterface' ); $this->_overridingThemeFiles = $this->getMockForAbstractClass( - 'Magento\Framework\View\Layout\File\SourceInterface' + 'Magento\Framework\View\File\CollectorInterface' ); $fileListFactory = $this->getMock( - 'Magento\Framework\View\Layout\File\FileList\Factory', + 'Magento\Framework\View\File\FileList\Factory', array(), array(), '', false ); $fileListFactory->expects($this->once())->method('create')->will($this->returnValue($this->_fileList)); - $this->_model = new \Magento\Framework\View\Layout\File\Source\Aggregated( + $this->_model = new \Magento\Framework\View\Layout\File\Collector\Aggregated( $fileListFactory, $this->_baseFiles, $this->_themeFiles, @@ -100,13 +100,13 @@ class AggregateTest extends \PHPUnit_Framework_TestCase ); $files = array( - new \Magento\Framework\View\Layout\File('0.xml', 'Module_One'), - new \Magento\Framework\View\Layout\File('1.xml', 'Module_One', $parentTheme), - new \Magento\Framework\View\Layout\File('2.xml', 'Module_One', $parentTheme), - new \Magento\Framework\View\Layout\File('3.xml', 'Module_One', $parentTheme), - new \Magento\Framework\View\Layout\File('4.xml', 'Module_One', $theme), - new \Magento\Framework\View\Layout\File('5.xml', 'Module_One', $theme), - new \Magento\Framework\View\Layout\File('6.xml', 'Module_One', $theme) + new \Magento\Framework\View\File('0.xml', 'Module_One'), + new \Magento\Framework\View\File('1.xml', 'Module_One', $parentTheme), + new \Magento\Framework\View\File('2.xml', 'Module_One', $parentTheme), + new \Magento\Framework\View\File('3.xml', 'Module_One', $parentTheme), + new \Magento\Framework\View\File('4.xml', 'Module_One', $theme), + new \Magento\Framework\View\File('5.xml', 'Module_One', $theme), + new \Magento\Framework\View\File('6.xml', 'Module_One', $theme) ); $this->_baseFiles->expects( @@ -185,6 +185,6 @@ class AggregateTest extends \PHPUnit_Framework_TestCase $this->_fileList->expects($this->atLeastOnce())->method('getAll')->will($this->returnValue($files)); - $this->assertSame($files, $this->_model->getFiles($theme)); + $this->assertSame($files, $this->_model->getFiles($theme, '*')); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/BaseTest.php deleted file mode 100644 index 2857d02078d8665d363294ad162489019df4807b..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/File/Source/BaseTest.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -namespace Magento\Framework\View\Layout\File\Source; - -/** - * Class for testing Magento\View\Layout\File\Source\Base - */ -class BaseTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\View\Layout\File\Source\Base|\PHPUnit_Framework_MockObject_MockObject - */ - protected $class; - - /** - * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $modulesDirectoryMock; - - /** - * @var \Magento\Framework\View\Layout\File\Factory|\PHPUnit_Framework_MockObject_MockObject - */ - protected $fileFactoryMock; - - /** - * Set up mocks - */ - public function setUp() - { - $filesystemMock = $this->getMock( - 'Magento\Framework\App\Filesystem', - ['getDirectoryRead', 'getAbsolutePath'], - [], - '', - false - ); - $this->fileFactoryMock = $this->getMock('Magento\Framework\View\Layout\File\Factory', [], [], '', false); - $this->modulesDirectoryMock = $this->getMock( - 'Magento\Framework\Filesystem\Directory\ReadInterface', - [], - [], - '', - false - ); - - $filesystemMock->expects($this->once()) - ->method('getDirectoryRead') - ->will($this->returnValue($this->modulesDirectoryMock)); - - $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->class = $objectManager->getObject( - 'Magento\Framework\View\Layout\File\Source\Base', - [ - 'filesystem' => $filesystemMock, - 'fileFactory' => $this->fileFactoryMock - ] - ); - } - - /** - * Test for method getFiles - */ - public function testGetFiles() - { - $fileName = 'somefile.xml'; - $fileRightPath = '/namespace/module/view/base/layout/' . $fileName; - $themeFileRightPath = '/namespace/module/view/area_code/layout/' . $fileName; - $fileWrongPath = '/namespace/module/view/' . $fileName; - $themeFileWrongPath = '/namespace/module/view/area_code/' . $fileName; - $areaCode = 'area_code'; - $sharedFiles = [ - $fileRightPath, - $fileWrongPath, - ]; - $themeFiles = [ - $themeFileRightPath, - $themeFileWrongPath, - ]; - $themeMock = $this->getMock('Magento\Framework\View\Design\ThemeInterface', [], [], '', false); - - $this->modulesDirectoryMock->expects($this->any()) - ->method('search') - ->will($this->returnValueMap( - [ - ["*/*/view/base/layout/*.xml", null, $sharedFiles], - ["*/*/view/$areaCode/layout/*.xml", null, $themeFiles], - ] - )); - $this->modulesDirectoryMock->expects($this->any()) - ->method('getAbsolutePath') - ->will($this->returnArgument(0)); - $themeMock->expects($this->once()) - ->method('getArea') - ->will($this->returnValue($areaCode)); - - $this->fileFactoryMock->expects($this->at(0)) - ->method('create') - ->with($this->equalTo($fileRightPath), $this->equalTo('namespace_module')) - ->will($this->returnValue($fileRightPath)); - $this->fileFactoryMock->expects($this->at(1)) - ->method('create') - ->with($this->equalTo($themeFileRightPath), $this->equalTo('namespace_module')) - ->will($this->returnValue($themeFileRightPath)); - - $expected = [$fileRightPath, $themeFileRightPath]; - $result = $this->class->getFiles($themeMock); - $this->assertEquals($expected, $result); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/CssFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/CssFileTest.php deleted file mode 100644 index 1ce1a8b6da9fed05bd71203961ecfa58c0bb0852..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/CssFileTest.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class CssFileTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\View\Publisher\CssFile */ - protected $cssFile; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $filesystemMock; - - /** @var \Magento\Framework\View\Service|\PHPUnit_Framework_MockObject_MockObject */ - protected $serviceMock; - - /** @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */ - protected $readerMock; - - /** @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $viewFileSystem; - - /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $rootDirectory; - - /** - * @var string - */ - protected $libDir = '/some/pub/lib/dir'; - - /** - * @var string - */ - protected $viewStaticDir = '/some/view/static/dir'; - - /** - * @var string - */ - protected $themeDir = '/some/theme/dir'; - - /** - * @param string $filePath - * @param bool $allowDuplication - * @param array $viewParams - * @param null|string $sourcePath - * @param bool $developerModel - */ - protected function getModelMock( - $filePath, - $allowDuplication, - $viewParams, - $sourcePath = null, - $developerModel = false - ) { - $this->rootDirectory = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface'); - - $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->filesystemMock->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::ROOT_DIR) - )->will( - $this->returnValue($this->rootDirectory) - ); - $this->filesystemMock->expects( - $this->any() - )->method( - 'getPath' - )->with( - $this->anything() - )->will( - $this->returnCallback(array($this, 'getPathCallback')) - ); - $this->serviceMock = $this->getMock('Magento\Framework\View\Service', array(), array(), '', false); - if ($developerModel) { - $this->serviceMock->expects($this->once())->method('getAppMode')->will($this->returnValue('developer')); - } - - $this->readerMock = $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false); - $this->viewFileSystem = $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false); - $this->viewFileSystem->expects( - $this->any() - )->method( - 'getAppMode' - )->will( - $this->returnValue(\Magento\Framework\App\State::MODE_DEVELOPER) - ); - - if ($sourcePath) { - $this->rootDirectory->expects( - $this->any() - )->method( - 'getRelativePath' - )->with( - $sourcePath - )->will( - $this->returnValue('related\\' . $sourcePath) - ); - $this->rootDirectory->expects( - $this->any() - )->method( - 'isExist' - )->with( - 'related\\' . $sourcePath - )->will( - $this->returnValue(true) - ); - } - - $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->cssFile = $this->objectManagerHelper->getObject( - 'Magento\Framework\View\Publisher\CssFile', - array( - 'filesystem' => $this->filesystemMock, - 'viewService' => $this->serviceMock, - 'modulesReader' => $this->readerMock, - 'viewFileSystem' => $this->viewFileSystem, - 'filePath' => $filePath, - 'allowDuplication' => $allowDuplication, - 'viewParams' => $viewParams, - 'sourcePath' => $sourcePath - ) - ); - } - - /** - * @param string $param - * @return string - * @throws \UnexpectedValueException - */ - public function getPathCallback($param) - { - switch ($param) { - case \Magento\Framework\App\Filesystem::PUB_LIB_DIR: - return $this->libDir; - case \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR: - return $this->viewStaticDir; - case \Magento\Framework\App\Filesystem::THEMES_DIR: - return $this->themeDir; - default: - throw new \UnexpectedValueException('Path callback received wrong value: ' . $param); - } - } - - /** - * @param null|string $sourcePath - * @param bool $expected - * @param bool $developerModel - * @internal param null|string $sourceFile - * @dataProvider isPublicationAllowedDataProvider - */ - public function testIsPublicationAllowed($sourcePath, $expected, $developerModel) - { - $filePath = 'some/css/path'; - $this->getModelMock($filePath, true, array('some', 'array'), $sourcePath, $developerModel); - $this->assertSame($expected, $this->cssFile->isPublicationAllowed()); - } - - /** - * @return array - */ - public function isPublicationAllowedDataProvider() - { - return array( - array(null, true, false), - array('some/interesting/path/to/file', true, false), - array('some\interesting\path\to\file', true, false), - array($this->libDir . '/path/to/file', false, false), - array($this->libDir . '\path\to\file', false, false), - array($this->viewStaticDir . '\path\to\file', false, false), - array($this->viewStaticDir . '/path/to/file', false, false), - array($this->themeDir . '/path/to/file', true, false), - array($this->themeDir . '\path\to\file', true, false), - array($this->libDir . '/path/to/file', false, false), - array($this->libDir . '\path\to\file', false, false), - array($this->viewStaticDir . '\path\to\file', true, true), - array($this->viewStaticDir . '/path/to/file', true, true) - ); - } - - /** - * @param string $filePath - * @param bool $allowDuplication - * @param array $viewParams - * @param string|null $sourcePath - * @param string $expected - * @dataProvider buildUniquePathDataProvider - */ - public function testBuildUniquePath($filePath, $allowDuplication, $viewParams, $sourcePath, $expected) - { - $this->getModelMock($filePath, $allowDuplication, $viewParams, $sourcePath); - $this->assertSame($expected, $this->cssFile->buildUniquePath()); - } - - /** - * @return array - */ - public function buildUniquePathDataProvider() - { - $themModelWithPath = $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(); - $themModelWithPath->expects($this->any())->method('getThemePath')->will($this->returnValue('theme/path')); - $themModelWithId = $this->getMock('Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false); - $themModelWithId->expects($this->any())->method('getId')->will($this->returnValue(11)); - return array( - 'theme with path' => array( - 'filePath' => 'some/css/path', - 'allowDuplication' => true, - 'viewParams' => array( - 'themeModel' => $themModelWithPath, - 'area' => 'frontend', - 'locale' => 'en_US', - 'module' => 'some_module' - ), - 'sourcePath' => null, - 'expected' => 'frontend/theme/path/en_US/some_module/some/css/path' - ), - 'theme with id' => array( - 'filePath' => 'some/css/path2', - 'allowDuplication' => true, - 'viewParams' => array( - 'themeModel' => $themModelWithId, - 'area' => 'backend', - 'locale' => 'en_EN', - 'module' => 'some_other_module' - ), - 'sourcePath' => null, - 'expected' => 'backend/_theme11/en_EN/some_other_module/some/css/path2' - ), - 'theme without any data' => array( - 'filePath' => 'some/css/path3', - 'allowDuplication' => true, - 'viewParams' => array( - 'themeModel' => $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(), - 'locale' => 'fr_FR', - 'area' => 'some_area', - 'module' => null - ), - 'sourcePath' => null, - 'expected' => 'some_area/_view/fr_FR/some/css/path3' - ), - 'no duplication modular file' => array( - 'filePath' => 'some/css/path4', - 'allowDuplication' => false, - 'viewParams' => array( - 'themeModel' => $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(), - 'locale' => 'fr_FR', - 'area' => 'some_area', - 'module' => 'My_Module' - ), - 'sourcePath' => 'custom_module_dir/some/css/path2', - 'expected' => 'some_area/_view/fr_FR/My_Module/some/css/path4' - ), - 'no duplication theme file' => array( - 'filePath' => 'some/css/path5', - 'allowDuplication' => false, - 'viewParams' => array( - 'themeModel' => $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(), - 'locale' => 'fr_FR', - 'area' => 'some_area', - 'module' => 'My_Module' - ), - 'sourcePath' => $this->themeDir . '/custom_module_dir/some/css/path5', - 'expected' => 'some_area/_view/fr_FR/My_Module/some/css/path5' - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileAbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileAbstractTest.php deleted file mode 100644 index e842fdd47ee79cd6712b4e54d019242f5f48f140..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileAbstractTest.php +++ /dev/null @@ -1,314 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -class FileAbstractTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\View\Publisher\FileAbstract|\PHPUnit_Framework_MockObject_MockObject */ - protected $fileAbstract; - - /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $filesystemMock; - - /** @var \Magento\Framework\View\Service|\PHPUnit_Framework_MockObject_MockObject */ - protected $serviceMock; - - /** @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */ - protected $readerMock; - - /** @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $viewFileSystem; - - /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $rootDirectory; - - /** - * @param string $filePath - * @param array $viewParams - * @param null|string $sourcePath - * @param null|string $fallback - */ - protected function initModelMock($filePath, $viewParams, $sourcePath = null, $fallback = null) - { - $this->rootDirectory = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface'); - - $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->filesystemMock->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::ROOT_DIR) - )->will( - $this->returnValue($this->rootDirectory) - ); - $this->serviceMock = $this->getMock('Magento\Framework\View\Service', array(), array(), '', false); - $this->readerMock = $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false); - $this->viewFileSystem = $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false); - if ($fallback) { - $this->viewFileSystem->expects( - $this->once() - )->method( - 'getViewFile' - )->with( - $this->equalTo($filePath), - $this->equalTo($viewParams) - )->will( - $this->returnValue('fallback\\' . $fallback) - ); - - $this->rootDirectory->expects( - $this->once() - )->method( - 'getRelativePath' - )->with( - 'fallback\\' . $fallback - )->will( - $this->returnValue('related\\' . $fallback) - ); - } - - $this->fileAbstract = $this->getMockForAbstractClass( - 'Magento\Framework\View\Publisher\FileAbstract', - array( - 'filesystem' => $this->filesystemMock, - 'viewService' => $this->serviceMock, - 'modulesReader' => $this->readerMock, - 'viewFileSystem' => $this->viewFileSystem, - 'filePath' => $filePath, - 'allowDuplication' => true, - 'viewParams' => $viewParams, - 'sourcePath' => $sourcePath - ) - ); - } - - /** - * @param string $filePath - * @param string $expected - * @dataProvider getExtensionDataProvider - */ - public function testGetExtension($filePath, $expected) - { - $this->initModelMock($filePath, array('some', 'array')); - $this->assertSame($expected, $this->fileAbstract->getExtension()); - } - - /** - * @return array - */ - public function getExtensionDataProvider() - { - return array(array('some\path\file.css', 'css'), array('some\path\noextension', '')); - } - - /** - * @param string $filePath - * @param bool $isExist - * @param null|string $sourcePath - * @param string|null $fallback - * @param bool $expected - * @internal param null|string $sourceFile - * @dataProvider isSourceFileExistsDataProvider - */ - public function testIsSourceFileExists($filePath, $isExist, $sourcePath, $fallback, $expected) - { - $this->initModelMock($filePath, array('some', 'array'), $sourcePath, $fallback); - if ($fallback) { - $this->rootDirectory->expects( - $this->once() - )->method( - 'isExist' - )->with( - 'related\\' . $fallback - )->will( - $this->returnValue($isExist) - ); - } - - $this->assertSame($expected, $this->fileAbstract->isSourceFileExists()); - } - - /** - * @return array - */ - public function isSourceFileExistsDataProvider() - { - return array( - array( - 'filePath' => 'some\file', - 'isExist' => false, - 'sourcePath' => null, - 'fallback' => null, - 'expectedResult' => false - ), - array( - 'filePath' => 'some\file2', - 'isExist' => false, - 'sourcePath' => 'some\sourcePath', - 'fallback' => null, - 'expectedResult' => false - ), - array( - 'filePath' => 'some\file2', - 'isExist' => false, - 'sourcePath' => null, - 'fallback' => 'some\fallback\file', - 'expectedResult' => false - ), - array( - 'filePath' => 'some\file2', - 'isExist' => true, - 'sourcePath' => null, - 'fallback' => 'some\fallback\file', - 'expectedResult' => true - ) - ); - } - - public function testGetFilePath() - { - $filePath = 'test\me'; - $this->initModelMock($filePath, array('some', 'array')); - $this->assertSame($filePath, $this->fileAbstract->getFilePath()); - } - - public function testGetViewParams() - { - $viewParams = array('some', 'array'); - $this->initModelMock('some\file', $viewParams); - $this->assertSame($viewParams, $this->fileAbstract->getViewParams()); - } - - public function testBuildPublicViewFilename() - { - $this->initModelMock('some\file', array()); - $this->serviceMock->expects($this->once())->method('getPublicDir')->will($this->returnValue('/some/pub/dir')); - - $this->fileAbstract->expects( - $this->once() - )->method( - 'buildUniquePath' - )->will( - $this->returnValue('some/path/to/file') - ); - $this->assertSame('/some/pub/dir/some/path/to/file', $this->fileAbstract->buildPublicViewFilename()); - } - - /** - * @param string $filePath - * @param bool $isExist - * @param null|string $sourcePath - * @param string|null $fallback - * @param bool $expected - * @internal param null|string $sourceFile - * @dataProvider getSourcePathDataProvider - */ - public function testGetSourcePath($filePath, $isExist, $sourcePath, $fallback, $expected) - { - $this->initModelMock($filePath, array('some', 'array'), $sourcePath, $fallback); - if ($fallback) { - $this->rootDirectory->expects( - $this->once() - )->method( - 'isExist' - )->with( - 'related\\' . $fallback - )->will( - $this->returnValue($isExist) - ); - } - - $this->assertSame($expected, $this->fileAbstract->getSourcePath()); - } - - /** - * @return array - */ - public function getSourcePathDataProvider() - { - return array( - array( - 'filePath' => 'some\file', - 'isExist' => false, - 'sourcePath' => null, - 'fallback' => null, - 'expectedResult' => null - ), - array( - 'filePath' => 'some\file2', - 'isExist' => false, - 'sourcePath' => 'some\sourcePath', - 'fallback' => null, - 'expectedResult' => null - ), - array( - 'filePath' => 'some\file2', - 'isExist' => false, - 'sourcePath' => null, - 'fallback' => 'some\fallback\file', - 'expectedResult' => null - ), - array( - 'filePath' => 'some\file2', - 'isExist' => true, - 'sourcePath' => null, - 'fallback' => 'some\fallback\file', - 'expectedResult' => 'fallback\some\fallback\file' - ) - ); - } - - /** - * @dataProvider sleepDataProvider - */ - public function test__sleep($expected) - { - $this->initModelMock('some\file', array()); - $this->assertEquals($expected, $this->fileAbstract->__sleep()); - } - - /** - * @return array - */ - public function sleepDataProvider() - { - return array( - array( - array( - 'filePath', - 'extension', - 'viewParams', - 'sourcePath', - 'allowDuplication', - 'isPublicationAllowed', - 'isFallbackUsed', - 'isSourcePathProvided' - ) - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileFactoryTest.php deleted file mode 100644 index 4a8ec967a13ef028befb2067dde2ca4d6307fe5b..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileFactoryTest.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class FileFactoryTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\View\Publisher\FileFactory */ - protected $fileFactory; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ - protected $objectManagerMock; - - protected function setUp() - { - $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); - - $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->fileFactory = $this->objectManagerHelper->getObject( - 'Magento\Framework\View\Publisher\FileFactory', - array('objectManager' => $this->objectManagerMock) - ); - } - - /** - * @param string $filePath - * @param array $viewParams - * @param string|null $sourcePath - * @param string $expectedInstance - * @dataProvider createDataProvider - */ - public function testCreate($filePath, $viewParams, $sourcePath, $expectedInstance) - { - $fileInstance = $this->getMock($expectedInstance, array(), array(), '', false); - $this->objectManagerMock->expects( - $this->once() - )->method( - 'create' - )->with( - $this->equalTo($expectedInstance), - $this->equalTo(array('filePath' => $filePath, 'viewParams' => $viewParams, 'sourcePath' => $sourcePath)) - )->will( - $this->returnValue($fileInstance) - ); - $this->assertInstanceOf($expectedInstance, $this->fileFactory->create($filePath, $viewParams, $sourcePath)); - } - - /** - * @return array - */ - public function createDataProvider() - { - return array( - 'css' => array( - 'some\file\path.css', - array('some', 'view', 'params'), - 'some\source\path', - 'Magento\Framework\View\Publisher\CssFile' - ), - 'other' => array( - 'some\file\path.gif', - array('some', 'other', 'view', 'params'), - 'some\other\source\path', - 'Magento\Framework\View\Publisher\File' - ) - ); - } - - /** - * @expectedException \UnexpectedValueException - * @expectedExceptionMessage stdClass has to implement the publisher file interface. - */ - public function testCreateWrongInstance() - { - $filePath = 'something'; - $viewParams = array('some', 'array'); - $fileInstance = new \stdClass(); - $this->objectManagerMock->expects( - $this->once() - )->method( - 'create' - )->with( - $this->equalTo('stdClass'), - $this->equalTo(array('filePath' => $filePath, 'viewParams' => $viewParams, 'sourcePath' => null)) - )->will( - $this->returnValue($fileInstance) - ); - $fileFactory = new FileFactory($this->objectManagerMock, 'stdClass'); - $fileFactory->create($filePath, $viewParams); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileTest.php deleted file mode 100644 index c58baeed05fdff322ce5e13f57defd6afa20fccf..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Publisher/FileTest.php +++ /dev/null @@ -1,294 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class FileTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\View\Publisher\File */ - protected $file; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $filesystemMock; - - /** @var \Magento\Framework\View\Service|\PHPUnit_Framework_MockObject_MockObject */ - protected $serviceMock; - - /** @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */ - protected $readerMock; - - /** @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $viewFileSystem; - - /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $rootDirectory; - - /** - * @var string - */ - protected $libDir = '/some/pub/lib/dir'; - - /** - * @var string - */ - protected $viewStaticDir = '/some/view/static/dir'; - - /** - * @var string - */ - protected $themeDir = '/some/theme/dir'; - - /** - * @param string $filePath - * @param bool $allowDuplication - * @param array $viewParams - * @param null|string $sourcePath - */ - protected function getModelMock($filePath, $allowDuplication, $viewParams, $sourcePath = null) - { - $this->rootDirectory = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface'); - - $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->filesystemMock->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->with( - $this->equalTo(\Magento\Framework\App\Filesystem::ROOT_DIR) - )->will( - $this->returnValue($this->rootDirectory) - ); - $this->filesystemMock->expects( - $this->any() - )->method( - 'getPath' - )->with( - $this->anything() - )->will( - $this->returnCallback(array($this, 'getPathCallback')) - ); - $this->serviceMock = $this->getMock('Magento\Framework\View\Service', array(), array(), '', false); - $this->readerMock = $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false); - $this->viewFileSystem = $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false); - - if ($sourcePath) { - $this->rootDirectory->expects( - $this->any() - )->method( - 'getRelativePath' - )->with( - $sourcePath - )->will( - $this->returnValue('related\\' . $sourcePath) - ); - $this->rootDirectory->expects( - $this->any() - )->method( - 'isExist' - )->with( - 'related\\' . $sourcePath - )->will( - $this->returnValue(true) - ); - } - - $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->file = $this->objectManagerHelper->getObject( - 'Magento\Framework\View\Publisher\File', - array( - 'filesystem' => $this->filesystemMock, - 'viewService' => $this->serviceMock, - 'modulesReader' => $this->readerMock, - 'viewFileSystem' => $this->viewFileSystem, - 'filePath' => $filePath, - 'allowDuplication' => $allowDuplication, - 'viewParams' => $viewParams, - 'sourcePath' => $sourcePath - ) - ); - } - - /** - * @param string $param - * @return string - * @throws \UnexpectedValueException - */ - public function getPathCallback($param) - { - switch ($param) { - case \Magento\Framework\App\Filesystem::PUB_LIB_DIR: - return $this->libDir; - case \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR: - return $this->viewStaticDir; - case \Magento\Framework\App\Filesystem::THEMES_DIR: - return $this->themeDir; - default: - throw new \UnexpectedValueException('Path callback received wrong value: ' . $param); - } - } - - /** - * @param null|string $sourcePath - * @param bool $expected - * @internal param null|string $sourceFile - * @dataProvider isPublicationAllowedDataProvider - */ - public function testIsPublicationAllowed($sourcePath, $expected) - { - $filePath = 'some/file/path'; - $this->getModelMock($filePath, true, array('some', 'array'), $sourcePath); - - $this->assertSame($expected, $this->file->isPublicationAllowed()); - } - - /** - * @return array - */ - public function isPublicationAllowedDataProvider() - { - return array( - array(null, true), - array('some/interesting/path/to/file', true), - array('some\interesting\path\to\file', true), - array($this->libDir . '/path/to/file', false), - array($this->libDir . '\path\to\file', false), - array($this->viewStaticDir . '\path\to\file', false), - array($this->viewStaticDir . '/path/to/file', false), - array($this->themeDir . '/path/to/file', true), - array($this->themeDir . '\path\to\file', true) - ); - } - - /** - * @param string $filePath - * @param bool $allowDuplication - * @param array $viewParams - * @param string|null $sourcePath - * @param string $expected - * @dataProvider buildUniquePathDataProvider - */ - public function testBuildUniquePath($filePath, $allowDuplication, $viewParams, $sourcePath, $expected) - { - $this->getModelMock($filePath, $allowDuplication, $viewParams, $sourcePath); - if (!$allowDuplication && isset($viewParams['module'])) { - $this->readerMock->expects( - $this->once() - )->method( - 'getModuleDir' - )->with( - $this->equalTo('theme'), - $this->equalTo($viewParams['module']) - )->will( - $this->returnValue('custom_module_dir') - ); - } - $this->assertSame($expected, $this->file->buildUniquePath()); - } - - /** - * @return array - */ - public function buildUniquePathDataProvider() - { - $themModelWithPath = $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(); - $themModelWithPath->expects($this->any())->method('getThemePath')->will($this->returnValue('theme/path')); - $themModelWithId = $this->getMock('Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false); - $themModelWithId->expects($this->any())->method('getId')->will($this->returnValue(11)); - return array( - 'theme with path' => array( - 'filePath' => 'some/file/path', - 'allowDuplication' => true, - 'viewParams' => array( - 'themeModel' => $themModelWithPath, - 'area' => 'frontend', - 'locale' => 'en_US', - 'module' => 'some_module' - ), - 'sourcePath' => null, - 'expected' => 'frontend/theme/path/en_US/some_module/some/file/path' - ), - 'theme with id' => array( - 'filePath' => 'some/file/path2', - 'allowDuplication' => true, - 'viewParams' => array( - 'themeModel' => $themModelWithId, - 'area' => 'backend', - 'locale' => 'en_EN', - 'module' => 'some_other_module' - ), - 'sourcePath' => null, - 'expected' => 'backend/_theme11/en_EN/some_other_module/some/file/path2' - ), - 'theme without any data' => array( - 'filePath' => 'some/file/path3', - 'allowDuplication' => true, - 'viewParams' => array( - 'themeModel' => $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(), - 'locale' => 'fr_FR', - 'area' => 'some_area', - 'module' => null - ), - 'sourcePath' => null, - 'expected' => 'some_area/_view/fr_FR/some/file/path3' - ), - 'no duplication modular file' => array( - 'filePath' => 'some/file/path4', - 'allowDuplication' => false, - 'viewParams' => array( - 'themeModel' => $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(), - 'locale' => 'fr_FR', - 'area' => 'some_area', - 'module' => 'My_Module' - ), - 'sourcePath' => 'custom_module_dir/some/file/path2', - 'expected' => '_module/My_Module/some/file/path2' - ), - 'no duplication theme file' => array( - 'filePath' => 'some/file/path5', - 'allowDuplication' => false, - 'viewParams' => array( - 'themeModel' => $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') - ->disableOriginalConstructor() - ->getMock(), - 'locale' => 'fr_FR', - 'area' => 'some_area' - ), - 'sourcePath' => $this->themeDir . '/custom_module_dir/some/file/path5', - 'expected' => 'custom_module_dir/some/file/path5' - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/PublisherTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/PublisherTest.php deleted file mode 100644 index b09971c6fce801e5d5a463f8f78cc474cb446ddf..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/PublisherTest.php +++ /dev/null @@ -1,458 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -use Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface; -use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; - -class PublisherTest extends \PHPUnit_Framework_TestCase -{ - /** @var \Magento\Framework\View\Publisher */ - protected $publisher; - - /** @var ObjectManagerHelper */ - protected $objectManagerHelper; - - /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $filesystemMock; - - /** @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ - protected $viewFileSystem; - - /** @var PreProcessorInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $preProcessorMock; - - /** @var \Magento\Framework\View\Publisher\FileFactory|\PHPUnit_Framework_MockObject_MockObject */ - protected $fileFactoryMock; - - /** @var \Magento\Framework\View\Publisher\FileInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $publisherFileMock; - - /** @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $rootDirectory; - - /** @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $tmpDirectory; - - /** @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $pubDirectory; - - protected function setUp() - { - $this->rootDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\WriteInterface', - array(), - array(), - '', - false - ); - $this->tmpDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\WriteInterface', - array(), - array(), - '', - false - ); - $this->pubDirectory = $this->getMock( - 'Magento\Framework\Filesystem\Directory\WriteInterface', - array(), - array(), - '', - false - ); - - $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->filesystemMock->expects( - $this->any() - )->method( - 'getDirectoryWrite' - )->will( - $this->returnCallback(array($this, 'getDirectoryWriteCallback')) - ); - - $this->viewFileSystem = $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false); - $this->preProcessorMock = $this->getMock('Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface'); - $this->fileFactoryMock = $this->getMockBuilder('Magento\Framework\View\Publisher\FileFactory') - ->disableOriginalConstructor() - ->getMock(); - $this->publisherFileMock = $this->getMockBuilder('Magento\Framework\View\Publisher\FileInterface') - ->disableOriginalConstructor() - ->getMock(); - $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->publisher = $this->objectManagerHelper->getObject( - 'Magento\Framework\View\Publisher', - array( - 'filesystem' => $this->filesystemMock, - 'viewFileSystem' => $this->viewFileSystem, - 'preProcessor' => $this->preProcessorMock, - 'fileFactory' => $this->fileFactoryMock - ) - ); - } - - /** - * @param string $param - * @return \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject - * @throws \UnexpectedValueException - */ - public function getDirectoryWriteCallback($param) - { - switch ($param) { - case \Magento\Framework\App\Filesystem::ROOT_DIR: - return $this->rootDirectory; - case \Magento\Framework\App\Filesystem::VAR_DIR: - return $this->tmpDirectory; - case \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR: - return $this->pubDirectory; - default: - throw new \UnexpectedValueException('Directory write callback received wrong value: ' . $param); - } - } - - public function testGetPublicFilePathNotAllowedExtension() - { - $filePath = 'some/file/path.php'; - $params = array('some', 'array'); - - $this->publisherFileMock->expects($this->once())->method('getExtension')->will($this->returnValue('php')); - - $this->fileFactoryMock->expects( - $this->once() - )->method( - 'create' - )->with( - $this->equalTo($filePath), - $this->equalTo($params) - )->will( - $this->returnValue($this->publisherFileMock) - ); - - $this->assertSame(null, $this->publisher->getPublicFilePath($filePath, $params)); - } - - /** - * @expectedException \Magento\Framework\Exception - * @expectedExceptionMessage Unable to locate theme file 'some/file/path'. - */ - public function testGetPublicFilePathException() - { - $filePath = 'some/file/path'; - $params = array('some', 'array2'); - - $this->publisherFileMock->expects($this->once())->method('getExtension')->will($this->returnValue('css')); - - $this->publisherFileMock->expects( - $this->once() - )->method( - 'isSourceFileExists' - )->will( - $this->returnValue(false) - ); - - $this->publisherFileMock->expects($this->once())->method('getFilePath')->will($this->returnValue($filePath)); - - $this->prepareCommonMocks($filePath, $params); - - $this->publisher->getPublicFilePath($filePath, $params); - } - - public function testGetPublicFilePathPublicationNotAllowed() - { - $filePath = 'some/file/path.css'; - $params = array('some', 'array3'); - - $this->publisherFileMock->expects($this->once())->method('getExtension')->will($this->returnValue('css')); - - $this->publisherFileMock->expects($this->once())->method('isSourceFileExists')->will($this->returnValue(true)); - - $this->publisherFileMock->expects( - $this->once() - )->method( - 'isPublicationAllowed' - )->will( - $this->returnValue(false) - ); - - $this->publisherFileMock->expects( - $this->once() - )->method( - 'getSourcePath' - )->will( - $this->returnValue('some/source/path.css') - ); - - $this->prepareCommonMocks($filePath, $params); - - $this->assertSame('some/source/path.css', $this->publisher->getPublicFilePath($filePath, $params)); - } - - /** - * @param string[] $testConfig - * @return void - * @dataProvider getPublicFilePathDataProvider - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function testGetPublicFilePath($testConfig) - { - $filePath = 'some/file/path.css'; - $params = array('some', 'array4'); - $sourcePath = 'some/source/path.css'; - $result = $testConfig['result']; - $timeSource = $testConfig['timeSource']; - $timeTarget = $testConfig['timeTarget']; - $isExistsTarget = $testConfig['isExistsTarget']; - $shouldBeUpdated = $testConfig['shouldBeUpdated']; - $isFile = $testConfig['isFile']; - $isDirectory = $testConfig['isDirectory']; - - $this->prepareCommonMocks($filePath, $params); - - $this->publisherFileMock->expects($this->once())->method('getExtension')->will($this->returnValue('css')); - - $this->publisherFileMock->expects($this->once())->method('isSourceFileExists')->will($this->returnValue(true)); - - $this->publisherFileMock->expects( - $this->once() - )->method( - 'isPublicationAllowed' - )->will( - $this->returnValue(true) - ); - - $this->publisherFileMock->expects( - $this->once() - )->method( - 'getSourcePath' - )->will( - $this->returnValue($sourcePath) - ); - - $this->publisherFileMock->expects( - $this->once() - )->method( - 'buildPublicViewFilename' - )->will( - $this->returnValue($result) - ); - - $uniquePath = 'unique\\' . $filePath; - $this->publisherFileMock->expects( - $this->once() - )->method( - 'buildUniquePath' - )->will( - $this->returnValue($uniquePath) - ); - - $relativePath = 'relative\\' . $sourcePath; - $this->rootDirectory->expects( - $this->once() - )->method( - 'getRelativePath' - )->with( - $this->equalTo($sourcePath) - )->will( - $this->returnValue($relativePath) - ); - - $this->rootDirectory->expects( - $this->once() - )->method( - 'stat' - )->with( - $this->equalTo($relativePath) - )->will( - $this->returnValue($timeSource) - ); - - $this->pubDirectory->expects( - $this->once() - )->method( - 'isExist' - )->with( - $this->equalTo($uniquePath) - )->will( - $this->returnValue($isExistsTarget) - ); - - if ($isExistsTarget) { - $this->pubDirectory->expects( - $this->once() - )->method( - 'stat' - )->with( - $this->equalTo($uniquePath) - )->will( - $this->returnValue($timeTarget) - ); - } - - if ($shouldBeUpdated) { - if ($isFile) { - $this->rootDirectory->expects( - $this->once() - )->method( - 'isFile' - )->with( - $this->equalTo($relativePath) - )->will( - $this->returnValue($isFile) - ); - $this->rootDirectory->expects( - $this->once() - )->method( - 'copyFile' - )->with( - $this->equalTo($relativePath), - $this->equalTo($uniquePath), - $this->equalTo($this->pubDirectory) - )->will( - $this->returnSelf() - ); - $this->pubDirectory->expects( - $this->once() - )->method( - 'touch' - )->with( - $this->equalTo($uniquePath), - $this->equalTo($timeSource['mtime']) - )->will( - $this->returnSelf() - ); - } elseif (!$isDirectory) { - $this->pubDirectory->expects( - $this->once() - )->method( - 'isDirectory' - )->with( - $this->equalTo($uniquePath) - )->will( - $this->returnValue(false) - ); - $this->pubDirectory->expects( - $this->once() - )->method( - 'create' - )->with( - $this->equalTo($uniquePath) - )->will( - $this->returnSelf() - ); - } - } - $this->viewFileSystem->expects( - $this->once() - )->method( - 'notifyViewFileLocationChanged' - )->with( - $this->equalTo($this->publisherFileMock) - )->will( - $this->returnSelf() - ); - - $this->assertSame($result, $this->publisher->getPublicFilePath($filePath, $params)); - } - - /** - * @return array - */ - public function getPublicFilePathDataProvider() - { - return array( - 'file that should be published mtime' => array( - array( - 'isExistsTarget' => true, - 'timeSource' => array('mtime' => 121), - 'timeTarget' => array('mtime' => 111), - 'shouldBeUpdated' => true, - 'isFile' => true, - 'isDirectory' => false, - 'result' => 'some/file/path.css' - ) - ), - 'file that should be published not exist' => array( - array( - 'isExistsTarget' => false, - 'timeSource' => array('mtime' => 111), - 'timeTarget' => array('mtime' => 111), - 'shouldBeUpdated' => false, - 'isFile' => false, - 'isDirectory' => false, - 'result' => 'some/file/path.img' - ) - ), - 'dir that should be published' => array( - array( - 'isExistsTarget' => true, - 'timeSource' => array('mtime' => 121), - 'timeTarget' => array('mtime' => 111), - 'shouldBeUpdated' => true, - 'isFile' => false, - 'isDirectory' => true, - 'result' => 'some/dir' - ) - ), - 'not dir not a file' => array( - array( - 'isExistsTarget' => true, - 'timeSource' => array('mtime' => 121), - 'timeTarget' => array('mtime' => 111), - 'shouldBeUpdated' => true, - 'isFile' => false, - 'isDirectory' => false, - 'result' => 'some/interesting/path' - ) - ) - ); - } - - /** - * @param string $filePath - * @param array $params - */ - protected function prepareCommonMocks($filePath, $params) - { - $this->fileFactoryMock->expects( - $this->once() - )->method( - 'create' - )->with( - $this->equalTo($filePath), - $this->equalTo($params) - )->will( - $this->returnValue($this->publisherFileMock) - ); - - $this->preProcessorMock->expects( - $this->once() - )->method( - 'process' - )->with( - $this->equalTo($this->publisherFileMock), - $this->equalTo($this->tmpDirectory) - )->will( - $this->returnValue($this->publisherFileMock) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Url/CssResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Url/CssResolverTest.php index 67d5b104633e625983edb3d92138ee045955eac0..3c6833ddb82dc84c255dc0a60ff8306d260a3906 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Url/CssResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Url/CssResolverTest.php @@ -32,148 +32,94 @@ class CssResolverTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $filesystem = - $this->getMock('Magento\Framework\App\Filesystem', array('getPath', '__wakeup'), array(), '', false); - $filesystem->expects($this->any()) - ->method('getPath') - ->with(\Magento\Framework\App\Filesystem::ROOT_DIR) - ->will($this->returnValue('/base_dir/')); - $viewFilesystem = $this->getMock( - 'Magento\Framework\View\Filesystem', - array('normalizePath'), - array(), - '', - false - ); - $viewFilesystem->expects($this->any()) - ->method('normalizePath') - ->will( - $this->returnValueMap( - array( - array('/does/not/matter.css', '/does/not/matter.css'), - array( - '/base_dir/pub/assets/new/location/any_new_name.css', - '/base_dir/pub/assets/new/location/any_new_name.css' - ), - array( - '/base_dir\pub/assets\new/location/any_new_name.css', - '/base_dir\pub/assets\new/location/any_new_name.css' - ), - array( - '/base_dir/pub/assets/referenced/di/any_new_name.css', - '/base_dir/pub/assets/referenced/di/any_new_name.css' - ), - array('/base_dir/pub/any_new_name.css', '/base_dir/pub/any_new_name.css'), - array('/not/base_dir/pub/new/file.css', '/not/base_dir/pub/new/file.css'), - array('/base_dir/pub/css/file.css', '/base_dir/pub/css/file.css'), - array('/not/base_dir/pub/css/file.css', '/not/base_dir/pub/css/file.css'), - array('/base_dir/pub/new/file.css', '/base_dir/pub/new/file.css'), - array( - '/base_dir/pub/assets/referenced/dir/../images/h2.gif', - '/base_dir/pub/assets/referenced/images/h2.gif' - ), - array( - '/base_dir/pub/assets/referenced/dir/Magento_Theme::favicon.ico', - '/base_dir/pub/assets/referenced/dir/Magento_Theme::favicon.ico' - ), - array( - '/base_dir/pub/assets/referenced/dir/original.css', - '/base_dir/pub/assets/referenced/dir/original.css' - ), - array( - '/base_dir/pub/assets/referenced/dir/body.gif', - '/base_dir/pub/assets/referenced/dir/body.gif' - ), - array('/base_dir/pub/dir/body.gif', '/base_dir/pub/dir/body.gif'), - array('/base_dir/pub/css/body.gif', '/base_dir/pub/css/body.gif'), - array('/not/base_dir/pub/css/body.gif', '/not/base_dir/pub/css/body.gif') - ) - ) - ); - $this->object = new CssResolver($filesystem, $viewFilesystem); + $this->object = new CssResolver(); + } + + public function testRelocateRelativeUrls() + { + $relatedPath = '/some/directory/two/another/file.ext'; + $filePath = '/some/directory/one/file.ext'; + + $fixturePath = __DIR__ . '/_files/'; + $source = file_get_contents($fixturePath . 'source.css'); + $result = file_get_contents($fixturePath . 'resultNormalized.css'); + + $this->assertEquals($result, $this->object->relocateRelativeUrls($source, $relatedPath, $filePath)); } /** * @param string $cssContent - * @param string $originalPath - * @param string $newPath - * @param callable $callback - * @param string $expected - * @dataProvider replaceCssRelativeUrlsDataProvider + * @param string $expectedResult + * @dataProvider aggregateImportDirectivesDataProvider */ - public function testReplaceCssRelativeUrls($cssContent, $originalPath, $newPath, $callback, $expected) + public function testAggregateImportDirectives($cssContent, $expectedResult) { - $actual = $this->object->replaceCssRelativeUrls($cssContent, $originalPath, $newPath, $callback); - $this->assertEquals($expected, $actual); + $this->assertEquals($expectedResult, $this->object->aggregateImportDirectives($cssContent)); } - public static function replaceCssRelativeUrlsDataProvider() + /** + * @return array + */ + public function aggregateImportDirectivesDataProvider() { $fixturePath = __DIR__ . '/_files/'; - $callback = function ($relativeUrl) { - return '/base_dir/pub/assets/referenced/dir/' . $relativeUrl; - }; + $source = file_get_contents($fixturePath . 'sourceImport.css'); + $result = file_get_contents($fixturePath . 'resultImport.css'); + $sourceNoImport = 'li {background: url("https://example.com/absolute.gif");}'; - $object = new \Magento\Framework\Object( - array('resolved_path' => array('body.gif' => '/base_dir/pub/dir/body.gif')) + return array( + 'empty' => array('', ''), + 'data without patterns' => array($sourceNoImport, $sourceNoImport), + 'data with patterns' => array($source, $result) ); - $objectCallback = array($object, 'getResolvedPath'); + } + /** + * @param string $cssContent + * @param callback $inlineCallback + * @param string $expectedResult + * @dataProvider replaceRelativeUrlsDataProvider + */ + public function testReplaceRelativeUrls($cssContent, $inlineCallback, $expectedResult) + { + $actual = $this->object->replaceRelativeUrls($cssContent, $inlineCallback); + $this->assertEquals($expectedResult, $actual); + } + + /** + * @return array + */ + public static function replaceRelativeUrlsDataProvider() + { + $fixturePath = __DIR__ . '/_files/'; + $callback = '\Magento\Framework\View\Url\CssResolverTest::replaceRelativeUrl'; $source = file_get_contents($fixturePath . 'source.css'); $result = file_get_contents($fixturePath . 'result.css'); + $sourceNoPatterns = 'li {background: url("https://example.com/absolute.gif");}'; return array( - 'standard parsing' => array( - $source, - '/does/not/matter.css', - '/base_dir/pub/assets/new/location/any_new_name.css', - $callback, - $result - ), - 'back slashes in new name' => array( - $source, - '/does/not/matter.css', - '/base_dir\pub/assets\new/location/any_new_name.css', - $callback, - $result - ), - 'directory with subset name' => array( - 'body {background: url(body.gif);}', - '/base_dir/pub/assets/referenced/dir/original.css', - '/base_dir/pub/assets/referenced/di/any_new_name.css', - null, - 'body {background: url(../dir/body.gif);}' - ), - 'objectCallback' => array( - 'body {background: url(body.gif);}', - '/does/not/matter.css', - '/base_dir/pub/any_new_name.css', - $objectCallback, - 'body {background: url(dir/body.gif);}' - ) + 'empty' => array('', '\Magento\Framework\View\Url\CssResolverTest::doNothing', ''), + 'data without patterns' => array($sourceNoPatterns, $callback, $sourceNoPatterns), + 'data with patterns' => array($source, $callback, $result) ); } /** - * @param string $originalFile - * @param string $newFile - * @expectedException \Magento\Framework\Exception - * @expectedExceptionMessage Offset can be calculated for internal resources only. - * @dataProvider replaceCssRelativeUrlsExceptionDataProvider + * A callback for testing replacing relative URLs + * + * @param string $relativeUrl + * @return string */ - public function testReplaceCssRelativeUrlsException($originalFile, $newFile) + public static function replaceRelativeUrl($relativeUrl) { - $this->object->replaceCssRelativeUrls('body {background: url(body.gif);}', $originalFile, $newFile); + return '../two/another/' . $relativeUrl; } /** - * @return array + * A dummy callback for testing replacing relative URLs */ - public static function replaceCssRelativeUrlsExceptionDataProvider() + public static function doNothing() { - return array( - 'new css path is out of reach' => array('/base_dir/pub/css/file.css', '/not/base_dir/pub/new/file.css'), - 'referenced path is out of reach' => array('/not/base_dir/pub/css/file.css', '/base_dir/pub/new/file.css') - ); + // do nothing } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/result.css b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/result.css index 6d8fdf24b2315a9132e5e0b6fea31b94c70b1420..f172012df34acb19f9cabd679bf817718df376d1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/result.css +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/result.css @@ -20,7 +20,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -h2 {background: url(../../referenced/images/h2.gif?test);} +h2 {background: url(../two/another/../images/h2.gif?test);} +body {background: url(../two/another/body.gif);} a {background: url(data:image/png;)} li {background: url("https://example.com/absolute.gif");} -ol.favicon {background: url(../../referenced/dir/Magento_Theme::favicon.ico)} /* base file */ +ol.favicon {background: url(../two/another/Magento_Theme::favicon.ico)} /* base file */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/resultImport.css b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/resultImport.css new file mode 100644 index 0000000000000000000000000000000000000000..5ceb6f102b48b3a8d6e6c4cfb42b507b8ed8bff2 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/resultImport.css @@ -0,0 +1,28 @@ +@import url(../recursive.css); +@import url("deep/recursive.css"); +/* The above import directives are aggregated from content. */ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +body {background: url(body.gif);} +p {background: url(1.gif?param);} +h1 {background: url('../h1.gif#param');} h2 {background: url(../images/h2.gif?test);} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/resultNormalized.css b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/resultNormalized.css new file mode 100644 index 0000000000000000000000000000000000000000..1c72beae3edb2da80e1d728f8455ef940a9fbdc8 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/resultNormalized.css @@ -0,0 +1,27 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +h2 {background: url(../two/images/h2.gif?test);} +body {background: url(../two/another/body.gif);} +a {background: url(data:image/png;)} +li {background: url("https://example.com/absolute.gif");} +ol.favicon {background: url(../two/another/Magento_Theme::favicon.ico)} /* base file */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/source.css b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/source.css index 09beb07f222c7d0655e367e8bbc13004fbf4423d..5280883e3be66f9530d694a35db58dfa4674c49c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/source.css +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/source.css @@ -21,6 +21,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ h2 {background: url(../images/h2.gif?test);} +body {background: url(body.gif);} a {background: url(data:image/png;)} li {background: url("https://example.com/absolute.gif");} ol.favicon {background: url(Magento_Theme::favicon.ico)} /* base file */ diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/style.css b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/sourceImport.css similarity index 80% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/style.css rename to dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/sourceImport.css index 7be32dbf2c7e736fa01ce6756c4cd54ee7b37350..9354a08ffd4c63ce25a8fd0edf00ea12a6c77421 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/style.css +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Url/_files/sourceImport.css @@ -20,5 +20,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -@import url(sub.css); -p {background: url(images/square.gif);} +body {background: url(body.gif);} +@import url(../recursive.css); +p {background: url(1.gif?param);} +@import url("deep/recursive.css"); +h1 {background: url('../h1.gif#param');} h2 {background: url(../images/h2.gif?test);} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/UrlTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/UrlTest.php deleted file mode 100644 index 9b56a4f28056277fc710cdcc51d0eb0b20518262..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/View/UrlTest.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -class UrlTest extends \PHPUnit_Framework_TestCase -{ - /** - * @param \Magento\Framework\View\Design\ThemeInterface $themeModel - * @dataProvider getViewFileUrlProductionModeDataProvider - */ - public function testGetViewFileUrlProductionMode($themeModel) - { - $isProductionMode = true; - $isSigned = false; - //NOTE: If going to test with signature enabled mock \Magento\Framework\Filesystem::getMTime() - $expected = 'http://example.com/public_dir/a/t/m/file.js'; - - // 1. Get fileSystem model - /** @var $filesystem \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ - $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $filesystem->expects($this->never())->method('isFile'); - $filesystem->expects($this->never())->method('isDirectory'); - $filesystem->expects($this->never())->method('read'); - $filesystem->expects($this->never())->method('write'); - $filesystem->expects($this->never())->method('copy'); - - // 2. Get directories configuration - $filesystem->expects($this->any())->method('getPath')->will($this->returnValue('some_dir')); - - // 3. Get url model - $urlBuilder = $this->getMockBuilder('Magento\Framework\UrlInterface')->getMockForAbstractClass(); - $urlBuilder->expects($this->any())->method('getBaseUrl')->will($this->returnValue('http://example.com/')); - - // 4. Get urlConfig model - $urlConfig = $this->getMockBuilder('Magento\Framework\View\Url\ConfigInterface')->getMockForAbstractClass(); - $urlConfig->expects($this->any())->method('getValue')->will($this->returnValue($isSigned)); - - // 5. Get viewService model - /** @var $viewService \Magento\Framework\View\Service|\PHPUnit_Framework_MockObject_MockObject */ - $viewService = $this->getMock( - 'Magento\Framework\View\Service', - array('updateDesignParams', 'extractScope', 'isViewFileOperationAllowed'), - array(), - '', - false - ); - $viewService->expects($this->any())->method('extractScope')->will($this->returnArgument(0)); - $viewService->expects( - $this->any() - )->method( - 'isViewFileOperationAllowed' - )->will( - $this->returnValue($isProductionMode) - ); - $viewService->expects($this->any())->method('updateDesignParams'); - - // 6. Get publisher model - /** @var $publisher \Magento\Framework\View\Publisher|\PHPUnit_Framework_MockObject_MockObject */ - $publisher = $this->getMock('Magento\Framework\View\Publisher', array(), array(), '', false); - $publisher->expects( - $this->any() - )->method( - 'getPublicFilePath' - )->will( - $this->returnValue('some_dir/public_dir/a/t/m/file.js') - ); - - // 7. Get deployed file manager - /** @var $dFManager \Magento\Framework\View\DeployedFilesManager|\PHPUnit_Framework_MockObject_MockObject */ - $dFManager = $this->getMock('Magento\Framework\View\DeployedFilesManager', array(), array(), '', false); - $viewFilesystem = $this->getMock('Magento\Framework\View\Filesystem', array(), array(), '', false); - - // 8. Get default fake url map - $urlMap = array('fake' => array('key' => "some_key", 'value' => "some_value")); - - // Create model to be tested - /** @var $model \Magento\Framework\View\Url|\PHPUnit_Framework_MockObject_MockObject */ - $model = new \Magento\Framework\View\Url( - $filesystem, - $urlBuilder, - $urlConfig, - $viewService, - $publisher, - $dFManager, - $viewFilesystem, - $urlMap - ); - - // Test - $actual = $model->getViewFileUrl( - 'file.js', - array('area' => 'a', 'themeModel' => $themeModel, 'locale' => 'l', 'module' => 'm') - ); - $this->assertEquals($expected, $actual); - } - - /** - * @return array - */ - public function getViewFileUrlProductionModeDataProvider() - { - $usualTheme = $this->getMock( - 'Magento\Framework\View\Design\ThemeInterface', - array(), - array(), - '', - false, - false - ); - $virtualTheme = clone $usualTheme; - $parentOfVirtualTheme = clone $usualTheme; - - $usualTheme->expects( - new \PHPUnit_Framework_MockObject_Matcher_InvokedCount(1) - )->method( - 'getThemePath' - )->will( - new \PHPUnit_Framework_MockObject_Stub_Return('t') - ); - - $parentOfVirtualTheme->expects( - new \PHPUnit_Framework_MockObject_Matcher_InvokedCount(1) - )->method( - 'getThemePath' - )->will( - new \PHPUnit_Framework_MockObject_Stub_Return('t') - ); - - $virtualTheme->expects( - new \PHPUnit_Framework_MockObject_Matcher_InvokedCount(1) - )->method( - 'getParentTheme' - )->will( - new \PHPUnit_Framework_MockObject_Stub_Return($parentOfVirtualTheme) - ); - - return array('usual theme' => array($usualTheme), 'virtual theme' => array($virtualTheme)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Paypal/Block/Billing/Agreement/ViewTest.php b/dev/tests/unit/testsuite/Magento/Paypal/Block/Billing/Agreement/ViewTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e826f5612b044ac6213d7a928433f90bca3b094e --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Paypal/Block/Billing/Agreement/ViewTest.php @@ -0,0 +1,103 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Paypal\Block\Billing\Agreement; + +/** + * Class ViewTest + * @package Magento\Paypal\Block\Billing\Agreement + */ +class ViewTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Sales\Model\Resource\Order\CollectionFactory | \PHPUnit_Framework_MockObject_MockObject + */ + protected $orderCollectionFactory; + + /** + * @var \Magento\Sales\Model\Order\Config | \PHPUnit_Framework_MockObject_MockObject + */ + protected $orderConfig; + + /** + * @var View + */ + protected $block; + + protected function setUp() + { + $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + + $this->orderCollectionFactory = $this->getMock( + 'Magento\Sales\Model\Resource\Order\CollectionFactory', + ['create'], + [], + '', + false + ); + $this->orderConfig = $this->getMock('Magento\Sales\Model\Order\Config', [], [], '', false); + + $this->block = $objectManager->getObject( + 'Magento\Paypal\Block\Billing\Agreement\View', + [ + 'orderCollectionFactory' => $this->orderCollectionFactory, + 'orderConfig' => $this->orderConfig, + ] + ); + } + + public function testGetRelatedOrders() + { + $visibleStatuses = []; + + $orderCollection = $this->getMock( + 'Magento\Sales\Model\Resource\Order\Collection', + ['addFieldToSelect', 'addFieldToFilter', 'setOrder'], + [], + '', + false + ); + $orderCollection->expects($this->at(0)) + ->method('addFieldToSelect') + ->will($this->returnValue($orderCollection)); + $orderCollection->expects($this->at(1)) + ->method('addFieldToFilter') + ->will($this->returnValue($orderCollection)); + $orderCollection->expects($this->at(2)) + ->method('addFieldToFilter') + ->with('status', ['in' => $visibleStatuses]) + ->will($this->returnValue($orderCollection)); + $orderCollection->expects($this->at(3)) + ->method('setOrder') + ->will($this->returnValue($orderCollection)); + + $this->orderCollectionFactory->expects($this->once()) + ->method('create') + ->will($this->returnValue($orderCollection)); + $this->orderConfig->expects($this->once()) + ->method('getVisibleOnFrontStatuses') + ->will($this->returnValue($visibleStatuses)); + + $this->block->getRelatedOrders(); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Paypal/Block/Express/ReviewTest.php b/dev/tests/unit/testsuite/Magento/Paypal/Block/Express/ReviewTest.php index 5c97415c1d5307ec809aacbb8f30853a8b43d7f8..4c532ea562ffda3e56b181f16308a17f74d56adb 100644 --- a/dev/tests/unit/testsuite/Magento/Paypal/Block/Express/ReviewTest.php +++ b/dev/tests/unit/testsuite/Magento/Paypal/Block/Express/ReviewTest.php @@ -32,9 +32,9 @@ class ReviewTest extends \PHPUnit_Framework_TestCase protected $request; /** - * @var \Magento\Framework\View\Url|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject */ - protected $viewUrl; + protected $assetRepo; /** * @var Review @@ -45,10 +45,10 @@ class ReviewTest extends \PHPUnit_Framework_TestCase { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->request = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); - $this->viewUrl = $this->getMock('Magento\Framework\View\Url', [], [], '', false); + $this->assetRepo = $this->getMock('Magento\Framework\View\Asset\Repository', [], [], '', false); $this->model = $helper->getObject( 'Magento\Paypal\Block\Express\Review', - ['request' => $this->request, 'viewUrl' => $this->viewUrl] + ['request' => $this->request, 'assetRepo' => $this->assetRepo] ); } @@ -59,8 +59,8 @@ class ReviewTest extends \PHPUnit_Framework_TestCase public function testGetViewFileUrl($isSecure) { $this->request->expects($this->once())->method('isSecure')->will($this->returnValue($isSecure)); - $this->viewUrl->expects($this->once()) - ->method('getViewFileUrl') + $this->assetRepo->expects($this->once()) + ->method('getUrlWithParams') ->with('some file', $this->callback(function ($value) use ($isSecure) { return isset($value['_secure']) && $value['_secure'] === $isSecure; })) diff --git a/dev/tests/unit/testsuite/Magento/RecurringPayment/Block/Payment/Related/Orders/GridTest.php b/dev/tests/unit/testsuite/Magento/RecurringPayment/Block/Payment/Related/Orders/GridTest.php index db6dd528eacacdb66a90213c09b85c38e0212fe8..d9822720aa29d0b794abb39d74d68f3db6bdbd57 100644 --- a/dev/tests/unit/testsuite/Magento/RecurringPayment/Block/Payment/Related/Orders/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/RecurringPayment/Block/Payment/Related/Orders/GridTest.php @@ -29,13 +29,68 @@ namespace Magento\RecurringPayment\Block\Payment\Related\Orders; class GridTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\TestFramework\Helper\ObjectManager + * @var \Magento\RecurringPayment\Block\Payment\Related\Orders\Grid */ - protected $_objectManagerHelper; + protected $block; + + /** + * @var \Magento\Framework\Registry | \PHPUnit_Framework_MockObject_MockObject + */ + protected $registry; + + /** + * @var \Magento\Store\Model\StoreManagerInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $storeManager; + + /** + * @var \Magento\Sales\Model\Resource\Order\Collection | \PHPUnit_Framework_MockObject_MockObject + */ + protected $collection; + + /** + * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface | \PHPUnit_Framework_MockObject_MockObject + */ + protected $locale; + + /** + * @var \Magento\Core\Helper\Data | \PHPUnit_Framework_MockObject_MockObject + */ + protected $helper; + + /** + * @var \Magento\RecurringPayment\Model\Resource\Order\CollectionFilter | \PHPUnit_Framework_MockObject_MockObject + */ + protected $recurringCollectionFilter; protected function setUp() { - $this->_objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + + $this->registry = $this->getMock('Magento\Framework\Registry', [], [], '', false); + $this->storeManager = $this->getMock('Magento\Store\Model\StoreManagerInterface'); + $this->collection = $this->getMock('Magento\Sales\Model\Resource\Order\Collection', [], [], '', false); + $this->locale = $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface'); + $this->helper = $this->getMock('Magento\Core\Helper\Data', [], [], '', false); + $this->recurringCollectionFilter = $this->getMock( + 'Magento\RecurringPayment\Model\Resource\Order\CollectionFilter', + ['byIds'], + [], + '', + false + ); + + $this->block = $objectManagerHelper->getObject( + 'Magento\RecurringPayment\Block\Payment\Related\Orders\Grid', + array( + 'registry' => $this->registry, + 'storeManager' => $this->storeManager, + 'collection' => $this->collection, + 'localeDate' => $this->locale, + 'coreHelper' => $this->helper, + 'recurringCollectionFilter' => $this->recurringCollectionFilter + ) + ); } /** @@ -56,12 +111,19 @@ class GridTest extends \PHPUnit_Framework_TestCase '__wakeup' ); $collectionElement = $this->getMock('Magento\RecurringPayment\Model\Payment', $args, array(), '', false); - $collectionElement->expects($this->once())->method('getIncrementId')->will($this->returnValue(1)); - $collection = $this->getMock('Magento\Sales\Model\Resource\Order\Collection', array(), array(), '', false); - $collection->expects($this->any())->method('addFieldToFilter')->will($this->returnValue($collection)); - $collection->expects($this->once())->method('addFieldToSelect')->will($this->returnValue($collection)); - $collection->expects($this->once())->method('setOrder')->will($this->returnValue($collection)); - $collection->expects( + $collectionElement->expects($this->once()) + ->method('getIncrementId') + ->will($this->returnValue(1)); + $this->collection->expects($this->any()) + ->method('addFieldToFilter') + ->will($this->returnValue($this->collection)); + $this->collection->expects($this->once()) + ->method('addFieldToSelect') + ->will($this->returnValue($this->collection)); + $this->collection->expects($this->once()) + ->method('setOrder') + ->will($this->returnValue($this->collection)); + $this->collection->expects( $this->once() )->method( 'getIterator' @@ -69,8 +131,7 @@ class GridTest extends \PHPUnit_Framework_TestCase $this->returnValue(new \ArrayIterator(array($collectionElement))) ); $payment = $this->getMock('Magento\RecurringPayment\Model\Payment', array(), array(), '', false); - $registry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); - $registry->expects( + $this->registry->expects( $this->at(0) )->method( 'registry' @@ -79,7 +140,7 @@ class GridTest extends \PHPUnit_Framework_TestCase )->will( $this->returnValue($payment) ); - $registry->expects( + $this->registry->expects( $this->at(1) )->method( 'registry' @@ -89,31 +150,16 @@ class GridTest extends \PHPUnit_Framework_TestCase $this->returnValue($customerId) ); $payment->expects($this->once())->method('setStore')->with($store)->will($this->returnValue($payment)); - $storeManager = $this->getMock('Magento\Store\Model\StoreManagerInterface'); - $storeManager->expects($this->once())->method('getStore')->will($this->returnValue($store)); - $locale = $this->getMock('\Magento\Framework\Stdlib\DateTime\TimezoneInterface'); - $locale->expects($this->once())->method('formatDate')->will($this->returnValue('11-11-1999')); - $recurringCollectionFilter = $this->getMock( - '\Magento\RecurringPayment\Model\Resource\Order\CollectionFilter', - array('byIds'), - array(), - '', - false - ); - $recurringCollectionFilter->expects($this->once())->method('byIds')->will($this->returnValue($collection)); - $helper = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $helper->expects($this->once())->method('formatCurrency')->will($this->returnValue('10 USD')); - $block = $this->_objectManagerHelper->getObject( - 'Magento\RecurringPayment\Block\Payment\Related\Orders\\Grid', - array( - 'registry' => $registry, - 'storeManager' => $storeManager, - 'collection' => $collection, - 'localeDate' => $locale, - 'coreHelper' => $helper, - 'recurringCollectionFilter' => $recurringCollectionFilter - ) - ); + $this->storeManager->expects($this->once())->method('getStore')->will($this->returnValue($store)); + + $this->locale->expects($this->once())->method('formatDate')->will($this->returnValue('11-11-1999')); + + $this->recurringCollectionFilter->expects($this->once()) + ->method('byIds') + ->will($this->returnValue($this->collection)); + + $this->helper->expects($this->once())->method('formatCurrency')->will($this->returnValue('10 USD')); + $pagerBlock = $this->getMockBuilder( 'Magento\Theme\Block\Html\Pager' )->disableOriginalConstructor()->setMethods( @@ -124,18 +170,18 @@ class GridTest extends \PHPUnit_Framework_TestCase )->method( 'setCollection' )->with( - $collection + $this->collection )->will( $this->returnValue($pagerBlock) ); $layout = $this->getMock('Magento\Framework\View\LayoutInterface'); $layout->expects($this->once())->method('createBlock')->will($this->returnValue($pagerBlock)); - $block->setLayout($layout); + $this->block->setLayout($layout); /** * @var \Magento\RecurringPayment\Block\Payment\Related\Orders\\Grid */ - $this->assertNotEmpty($block->getGridColumns()); + $this->assertNotEmpty($this->block->getGridColumns()); $expectedResult = array( new \Magento\Framework\Object( array( @@ -148,6 +194,6 @@ class GridTest extends \PHPUnit_Framework_TestCase ) ) ); - $this->assertEquals($expectedResult, $block->getGridElements()); + $this->assertEquals($expectedResult, $this->block->getGridElements()); } } diff --git a/dev/tests/unit/testsuite/Magento/RequireJs/Block/Html/Head/ConfigTest.php b/dev/tests/unit/testsuite/Magento/RequireJs/Block/Html/Head/ConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..695281ee650e0a1ae871fff7aa49c79a0b247ce3 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/RequireJs/Block/Html/Head/ConfigTest.php @@ -0,0 +1,84 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Magento + * @package Magento_Review + * @subpackage integration_tests + * @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) + */ + +namespace Magento\RequireJs\Block\Html\Head; + +class ConfigTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\View\Element\Context|\PHPUnit_Framework_MockObject_MockObject + */ + private $context; + + /** + * @var \Magento\Framework\RequireJs\Config|\PHPUnit_Framework_MockObject_MockObject + */ + private $config; + + /** + * @var \Magento\RequireJs\Model\FileManager|\PHPUnit_Framework_MockObject_MockObject + */ + private $fileManager; + + protected function setUp() + { + $this->context = $this->getMock('\Magento\Framework\View\Element\Context', array(), array(), '', false); + $this->config = $this->getMock('\Magento\Framework\RequireJs\Config', array(), array(), '', false); + $this->fileManager = $this->getMock('\Magento\RequireJs\Model\FileManager', array(), array(), '', false); + } + + public function testGetAsset() + { + $asset = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\LocalInterface'); + $this->fileManager->expects($this->once())->method('createRequireJsAsset')->will($this->returnValue($asset)); + $object = new Config($this->context, $this->config, $this->fileManager);; + $this->assertSame($asset, $object->getAsset()); + $this->assertSame($asset, $object->getAsset(), 'Asset is supposed to be cached in-memory'); + } + + public function testToHtml() + { + $this->context->expects($this->once()) + ->method('getEventManager') + ->will($this->returnValue($this->getMockForAbstractClass('\Magento\Framework\Event\ManagerInterface'))) + ; + $this->context->expects($this->once()) + ->method('getScopeConfig') + ->will($this->returnValue( + $this->getMockForAbstractClass('\Magento\Framework\App\Config\ScopeConfigInterface') + )) + ; + $this->config->expects($this->once())->method('getBaseConfig')->will($this->returnValue('the config data')); + $object = new Config($this->context, $this->config, $this->fileManager);; + $html = $object->toHtml(); + $expectedFormat = <<<expected +<script type="text/javascript"> +the config data</script> +expected; + $this->assertStringMatchesFormat($expectedFormat, $html); + } +} diff --git a/dev/tests/unit/testsuite/Magento/RequireJs/Model/FileManagerTest.php b/dev/tests/unit/testsuite/Magento/RequireJs/Model/FileManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4a345655c6926f6ac1fb64d11d1df100d92a47db --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/RequireJs/Model/FileManagerTest.php @@ -0,0 +1,126 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\RequireJs\Model; + +class FileManagerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\RequireJs\Config|\PHPUnit_Framework_MockObject_MockObject + */ + private $config; + + /** + * @var \Magento\Framework\App\FileSystem|\PHPUnit_Framework_MockObject_MockObject + */ + private $fileSystem; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $dir; + + /** + * @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject + */ + private $appState; + + /** + * @var \Magento\Framework\View\Asset\File|\PHPUnit_Framework_MockObject_MockObject + */ + private $asset; + + /** + * @var \Magento\RequireJs\Model\FileManager + */ + private $object; + + protected function setUp() + { + $this->config = $this->getMock('\Magento\Framework\RequireJs\Config', array(), array(), '', false); + $this->fileSystem = $this->getMock('\Magento\Framework\App\FileSystem', array(), array(), '', false); + $this->appState = $this->getMock('\Magento\Framework\App\State', array(), array(), '', false); + $assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false); + $this->object = new FileManager($this->config, $this->fileSystem, $this->appState, $assetRepo); + $this->dir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface'); + $this->fileSystem->expects($this->once()) + ->method('getDirectoryWrite') + ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) + ->will($this->returnValue($this->dir)) + ; + $this->config->expects($this->once()) + ->method('getConfigFileRelativePath') + ->will($this->returnValue('requirejs/file.js')) + ; + $this->asset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + $assetRepo->expects($this->once()) + ->method('createArbitrary') + ->with('requirejs/file.js', '') + ->will($this->returnValue($this->asset)); + } + + /** + * @param bool $exists + * @dataProvider createRequireJsAssetDataProvider + */ + public function testCreateRequireJsAsset($exists) + { + $this->appState->expects($this->once())->method('getMode')->will($this->returnValue('anything')); + $this->dir->expects($this->once()) + ->method('isExist') + ->with('requirejs/file.js') + ->will($this->returnValue($exists)) + ; + if ($exists) { + $this->config->expects($this->never())->method('getConfig'); + $this->dir->expects($this->never())->method('writeFile'); + } else { + $data = 'requirejs config data'; + $this->config->expects($this->once())->method('getConfig')->will($this->returnValue($data)); + $this->dir->expects($this->once())->method('writeFile')->with('requirejs/file.js', $data); + } + $this->assertSame($this->asset, $this->object->createRequireJsAsset()); + } + + /** + * @return array + */ + public function createRequireJsAssetDataProvider() + { + return array(array(true), array(false)); + } + + public function testCreateRequireJsAssetDevMode() + { + $this->appState->expects($this->once()) + ->method('getMode') + ->will($this->returnValue(\Magento\Framework\App\State::MODE_DEVELOPER)) + ; + $this->dir->expects($this->never())->method('isExist'); + $data = 'requirejs config data'; + $this->config->expects($this->once())->method('getConfig')->will($this->returnValue($data)); + $this->dir->expects($this->once())->method('writeFile')->with('requirejs/file.js', $data); + $this->assertSame($this->asset, $this->object->createRequireJsAsset()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Review/Model/ReviewTest.php b/dev/tests/unit/testsuite/Magento/Review/Model/ReviewTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7d31c946bfba5b62aed2f8132db5a9b963fc08c6 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Review/Model/ReviewTest.php @@ -0,0 +1,271 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Review\Model; + +use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; + +class ReviewTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Review\Model\Review */ + protected $review; + + /** @var ObjectManagerHelper */ + protected $objectManagerHelper; + + /** @var \Magento\Framework\Model\Context|\PHPUnit_Framework_MockObject_MockObject */ + protected $contextMock; + + /** @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ + protected $registryMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + protected $productFactoryMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + protected $statusFactoryMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + protected $reviewSummaryMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + protected $summaryModMock; + + /** @var \Magento\Review\Model\Review\Summary|\PHPUnit_Framework_MockObject_MockObject */ + protected $summaryMock; + + /** @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ + protected $storeManagerMock; + + /** @var \Magento\Framework\UrlInterface|\PHPUnit_Framework_MockObject_MockObject */ + protected $urlInterfaceMock; + + /** @var \Magento\Review\Model\Resource\Review|\PHPUnit_Framework_MockObject_MockObject */ + protected $resource; + + /** @var int */ + protected $reviewId = 8; + + protected function setUp() + { + $this->contextMock = $this->getMock('Magento\Framework\Model\Context', [], [], '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry'); + $this->productFactoryMock = $this->getMock( + 'Magento\Review\Model\Resource\Review\Product\CollectionFactory', + ['create'] + ); + $this->statusFactoryMock = $this->getMock( + 'Magento\Review\Model\Resource\Review\Status\CollectionFactory', + ['create'] + ); + $this->reviewSummaryMock = $this->getMock('Magento\Review\Model\Resource\Review\Summary\CollectionFactory'); + $this->summaryModMock = $this->getMock('Magento\Review\Model\Review\SummaryFactory', ['create']); + $this->summaryMock = $this->getMock('Magento\Review\Model\Review\Summary', [], [], '', false); + $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); + $this->urlInterfaceMock = $this->getMock('Magento\Framework\UrlInterface'); + $this->resource = $this->getMock('Magento\Review\Model\Resource\Review', [], [], '', false); + + $this->objectManagerHelper = new ObjectManagerHelper($this); + $this->review = $this->objectManagerHelper->getObject( + 'Magento\Review\Model\Review', + [ + 'context' => $this->contextMock, + 'registry' => $this->registryMock, + 'productFactory' => $this->productFactoryMock, + 'statusFactory' => $this->statusFactoryMock, + 'summaryFactory' => $this->reviewSummaryMock, + 'summaryModFactory' => $this->summaryModMock, + 'reviewSummary' => $this->summaryMock, + 'storeManager' => $this->storeManagerMock, + 'urlModel' => $this->urlInterfaceMock, + 'resource' => $this->resource, + 'data' => array('review_id' => $this->reviewId, 'status_id' => 1, 'stores' => [2, 3, 4]) + ] + ); + } + + public function testGetProductCollection() + { + $collection = $this->getMock('Magento\Review\Model\Resource\Review\Product\Collection', [], [], '', false); + $this->productFactoryMock->expects($this->once()) + ->method('create') + ->will($this->returnValue($collection)); + $this->assertSame($collection, $this->review->getProductCollection()); + } + + public function testGetStatusCollection() + { + $collection = $this->getMock('Magento\Review\Model\Resource\Review\Status\Collection', [], [], '', false); + $this->statusFactoryMock->expects($this->once()) + ->method('create') + ->will($this->returnValue($collection)); + $this->assertSame($collection, $this->review->getStatusCollection()); + } + + public function testGetTotalReviews() + { + $primaryKey = 'review_id'; + $approvedOnly = false; + $storeId = 0; + $result = 5; + $this->resource->expects($this->once())->method('getTotalReviews') + ->with($this->equalTo($primaryKey), $this->equalTo($approvedOnly), $this->equalTo($storeId)) + ->will($this->returnValue($result)); + $this->assertSame($result, $this->review->getTotalReviews($primaryKey, $approvedOnly, $storeId)); + } + + public function testAggregate() + { + $this->resource->expects($this->once())->method('aggregate') + ->with($this->equalTo($this->review)) + ->will($this->returnValue($this->review)); + $this->assertSame($this->review, $this->review->aggregate()); + } + + public function testGetEntitySummary() + { + $productId = 6; + $storeId = 4; + $testSummaryData = ['test' => 'value']; + $summary = new \Magento\Framework\Object(); + $summary->setData($testSummaryData); + + $product = $this->getMock( + 'Magento\Catalog\Model\Product', + ['getId', 'setRatingSummary', '__wakeup'], + [], + '', + false + ); + $product->expects($this->once())->method('getId')->will($this->returnValue($productId)); + $product->expects($this->once())->method('setRatingSummary')->with($summary)->will($this->returnSelf()); + + $summaryData = $this->getMock( + 'Magento\Review\Model\Review\Summary', + ['load', 'getData', 'setStoreId', '__wakeup'], + [], + '', + false + ); + $summaryData->expects($this->once())->method('setStoreId') + ->with($this->equalTo($storeId)) + ->will($this->returnSelf()); + $summaryData->expects($this->once())->method('load') + ->with($this->equalTo($productId)) + ->will($this->returnSelf()); + $summaryData->expects($this->once())->method('getData')->will($this->returnValue($testSummaryData)); + $this->summaryModMock->expects($this->once())->method('create')->will($this->returnValue($summaryData)); + $this->assertNull($this->review->getEntitySummary($product, $storeId)); + } + + public function testGetPendingStatus() + { + $this->assertSame(Review::STATUS_PENDING, $this->review->getPendingStatus()); + } + + public function testGetReviewUrl() + { + $result = 'http://some.url'; + $this->urlInterfaceMock->expects($this->once())->method('getUrl') + ->with($this->equalTo('review/product/view'), $this->equalTo(array('id' => $this->reviewId))) + ->will($this->returnValue($result)); + $this->assertSame($result, $this->review->getReviewUrl()); + } + + /** + * @param int $productId + * @param int $storeId + * @param string $result + * @dataProvider getProductUrlDataProvider + */ + public function testGetProductUrl($productId, $storeId, $result) + { + if ($storeId) { + $this->urlInterfaceMock->expects($this->once())->method('setScope') + ->with($this->equalTo($storeId)) + ->will($this->returnSelf()); + } + + $this->urlInterfaceMock->expects($this->once())->method('getUrl') + ->with($this->equalTo('catalog/product/view'), $this->equalTo(array('id' => $productId))) + ->will($this->returnValue($result)); + $this->assertSame($result, $this->review->getProductUrl($productId, $storeId)); + } + + /** + * @return array + */ + public function getProductUrlDataProvider() + { + return [ + 'store id specified' => [3, 5, 'http://some.url'], + 'store id is not specified' => [3, null, 'http://some.url/2/'], + ]; + } + + public function testIsApproved() + { + $this->assertTrue($this->review->isApproved()); + } + + /** + * @param int|null $storeId + * @param bool $result + * @dataProvider isAvailableOnStoreDataProvider + */ + public function testIsAvailableOnStore($storeId, $result) + { + $store = $this->getMock('Magento\Store\Model\Store', [], [], '', false); + if ($storeId) { + $store->expects($this->once())->method('getId')->will($this->returnValue($storeId)); + $this->storeManagerMock->expects($this->once()) + ->method('getStore') + ->with($this->equalTo($store)) + ->will($this->returnValue($store)); + } + $this->assertSame($result, $this->review->isAvailableOnStore($store)); + } + + /** + * @return array + */ + public function isAvailableOnStoreDataProvider() + { + return [ + 'store id is set and not in list' => [1, false], + 'store id is set' => [3, true], + 'store id is not set' => [null, false], + ]; + } + + public function testGetEntityIdByCode() + { + $entityCode = 'test'; + $result = 22; + $this->resource->expects($this->once())->method('getEntityIdByCode') + ->with($this->equalTo($entityCode)) + ->will($this->returnValue($result)); + $this->assertSame($result, $this->review->getEntityIdByCode($entityCode)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Rss/Block/Catalog/ReviewTest.php b/dev/tests/unit/testsuite/Magento/Rss/Block/Catalog/ReviewTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fe3e665b7a44906eac8da7497154de15e7d2d58e --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Rss/Block/Catalog/ReviewTest.php @@ -0,0 +1,149 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Rss\Block\Catalog; + +use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; + +class ReviewTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Rss\Block\Catalog\Review */ + protected $review; + + /** @var ObjectManagerHelper */ + protected $objectManagerHelper; + + /** @var \Magento\Backend\Block\Context|\PHPUnit_Framework_MockObject_MockObject */ + protected $contextMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + protected $rssFactoryMock; + + /** @var \Magento\Framework\Model\Resource\Iterator|\PHPUnit_Framework_MockObject_MockObject */ + protected $iteratorMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + protected $reviewFactoryMock; + + /** @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ + protected $storeManagerMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\UrlInterface */ + protected $urlInterfaceMock; + + protected function setUp() + { + $this->urlInterfaceMock = $this->getMock('Magento\Framework\UrlInterface', [], [], '', false); + $this->contextMock = $this->getMock('Magento\Backend\Block\Context', [], [], '', false); + $this->contextMock->expects($this->once()) + ->method('getUrlBuilder') + ->will($this->returnValue($this->urlInterfaceMock)); + + $this->rssFactoryMock = $this->getMock('Magento\Rss\Model\RssFactory'); + $this->iteratorMock = $this->getMock('Magento\Framework\Model\Resource\Iterator', [], [], '', false); + $this->reviewFactoryMock = $this->getMock('Magento\Review\Model\ReviewFactory'); + $this->storeManagerMock = $this->getMock( + 'Magento\Store\Model\StoreManager', + ['getStore', 'getName'], + [], + '', + false + ); + + $this->objectManagerHelper = new ObjectManagerHelper($this); + $this->review = $this->objectManagerHelper->getObject( + 'Magento\Rss\Block\Catalog\Review', + [ + 'context' => $this->contextMock, + 'rssFactory' => $this->rssFactoryMock, + 'resourceIterator' => $this->iteratorMock, + 'reviewFactory' => $this->reviewFactoryMock, + 'storeManager' => $this->storeManagerMock + ] + ); + } + + public function testAddReviewItemXmlCallback() + { + $row = [ + 'entity_id' => 1, + 'store_id' => 2, + 'review_id' => 3, + 'name' => 'Product Name', + 'title' => 'Review Summary', + 'detail' => 'Test of a review', + 'nickname' => 'User Name', + ]; + $productUrl = 'http://product.url'; + $reviewUrl = 'http://review.url'; + + + $reviewModel = $this->getMock('Magento\Review\Model\Review', [], [], '', false); + $reviewModel->expects($this->once()) + ->method('getProductUrl') + ->with($this->equalTo($row['entity_id']), $this->equalTo($row['store_id'])) + ->will($this->returnValue($productUrl)); + + $this->urlInterfaceMock->expects($this->once()) + ->method('getUrl') + ->with( + $this->equalTo('review/product/edit/'), + $this->equalTo(array('id' => $row['review_id'], '_secure' => true, '_nosecret' => true)) + ) + ->will($this->returnValue($reviewUrl)); + + $storeName = 'Store Name'; + $this->storeManagerMock->expects($this->once())->method('getStore') + ->with($this->equalTo($row['store_id']))->will($this->returnSelf()); + $this->storeManagerMock->expects($this->once()) + ->method('getName') + ->will($this->returnValue($storeName)); + $rssObj = $this->getMock('Magento\Rss\Model\Rss', [], [], '', false); + $description = '<p>' . __('Product: <a href="%1" target="_blank">%2</a> <br/>', $productUrl, $row['name']) + . __('Summary of review: %1 <br/>', $row['title']) . __('Review: %1 <br/>', $row['detail']) + . __('Store: %1 <br/>', $storeName) + . __('Click <a href="%1">here</a> to view the review.', $reviewUrl) + . '</p>'; + $rssObj->expects($this->once()) + ->method('_addEntry') + ->with( + $this->equalTo( + [ + 'title' => __('Product: "%1" reviewed by: %2', $row['name'], $row['nickname']), + 'link' => 'test', + 'description' => $description + ] + ) + ) + ->will($this->returnSelf()); + + $args = [ + 'row' => $row, + 'reviewModel' => $reviewModel, + 'rssObj' => $rssObj + ]; + + $this->assertNull($this->review->addReviewItemXmlCallback($args)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Rss/Block/WishlistTest.php b/dev/tests/unit/testsuite/Magento/Rss/Block/WishlistTest.php index c2fd175cba892325e5d323abb4e0c78f9aedea84..470bee917247ff7ec95d8d5dd599a8a05b282dc0 100644 --- a/dev/tests/unit/testsuite/Magento/Rss/Block/WishlistTest.php +++ b/dev/tests/unit/testsuite/Magento/Rss/Block/WishlistTest.php @@ -46,7 +46,7 @@ class WishlistTest extends \PHPUnit_Framework_TestCase protected $rssFactoryMock; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $urlBuilderMock; diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php index 8d553d434d3f5d78b9334871cfab980fedc2c13c..357f1771f052b6097b6acc047127f00317d6a0c0 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php @@ -171,4 +171,58 @@ class GridTest extends \PHPUnit_Framework_TestCase $item->expects($this->{$calledTimes}())->method('getProductType')->will($this->returnValue($productType)); return $item; } + + /** + * @covers \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid::getItems + */ + public function testGetItems() + { + $layoutMock = $this->getMock('\Magento\Framework\View\LayoutInterface'); + $blockMock = $this->getMock( + '\Magento\Framework\View\Element\AbstractBlock', + array('getItems'), array(), '', false + ); + + + $itemMock = $this->getMock( + '\Magento\Sales\Model\Quote\Item', + array('getProduct', 'setHasError', 'setQty', 'getQty', '__sleep', '__wakeup'), array(), '', false + ); + $productMock = $this->getMock( + '\Magento\Catalog\Model\Product', + array('getStockItem', 'getStatus', '__sleep', '__wakeup'), array(), '', false + ); + $stockItemMock = $this->getMock( + '\Magento\CatalogInventory\Model\Stock\Item', + array(), array(), '', false + ); + $checkMock = $this->getMock( + '\Magento\Framework\Object', + array('getMessage', 'getHasError'), array(), '', false + ); + + $layoutMock->expects($this->once())->method('getParentName')->will($this->returnValue('parentBlock')); + $layoutMock->expects($this->once())->method('getBlock')->with('parentBlock') + ->will($this->returnValue($blockMock)); + + $blockMock->expects($this->once())->method('getItems')->will($this->returnValue(array($itemMock))); + + $itemMock->expects($this->any())->method('getChildren')->will($this->returnValue(array($itemMock))); + $itemMock->expects($this->any())->method('getProduct')->will($this->returnValue($productMock)); + + $productMock->expects($this->any())->method('getStockItem')->will($this->returnValue($stockItemMock)); + $productMock->expects($this->any())->method('getStatus') + ->will($this->returnValue(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)); + + $checkMock->expects($this->any())->method('getMessage')->will($this->returnValue('Message')); + $checkMock->expects($this->any())->method('getHasError')->will($this->returnValue(false)); + + $stockItemMock->expects($this->once())->method('checkQuoteItemQty')->will($this->returnValue($checkMock)); + + $this->_block->getQuote()->setIsSuperMode(true); + $items = $this->_block->setLayout($layoutMock)->getItems(); + + $this->assertEquals('Message', $items[0]->getMessage()); + $this->assertEquals(true, $this->_block->getQuote()->getIsSuperMode()); + } } diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Status/Assign/FormTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Status/Assign/FormTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0d886b6585de5ba61694984cca647d73c8587d3f --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Status/Assign/FormTest.php @@ -0,0 +1,151 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Sales\Block\Adminhtml\Order\Status\Assign; + +/** + * Class FormTest + * @package Magento\Sales\Block\Adminhtml\Order\Status\Assign + */ +class FormTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Form + */ + protected $block; + + /** + * @var \Magento\Framework\Data\FormFactory | \PHPUnit_Framework_MockObject_MockObject + */ + protected $formFactory; + + /** + * @var \Magento\Sales\Model\Resource\Order\Status\CollectionFactory | \PHPUnit_Framework_MockObject_MockObject + */ + protected $collectionFactory; + + /** + * @var \Magento\Sales\Model\Order\Config | \PHPUnit_Framework_MockObject_MockObject + */ + protected $orderConfig; + + protected function setUp() + { + $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + + $this->formFactory = $this->getMock('Magento\Framework\Data\FormFactory', ['create'], [], '', false); + $this->collectionFactory = $this->getMock( + 'Magento\Sales\Model\Resource\Order\Status\CollectionFactory', + ['create'], + [], + '', + false + ); + $this->orderConfig = $this->getMock('Magento\Sales\Model\Order\Config', [], [], '', false); + + $this->block = $objectManager->getObject( + 'Magento\Sales\Block\Adminhtml\Order\Status\Assign\Form', + [ + 'formFactory' => $this->formFactory, + 'collectionFactory' => $this->collectionFactory, + 'orderConfig' => $this->orderConfig, + 'data' => ['template' => null] + ] + ); + } + + public function testToHtml() + { + $statuses = ['status1', 'status2']; + $states = ['state1', 'state2']; + + $statusesForField = $statuses; + array_unshift($statusesForField, ['value' => '', 'label' => '']); + $statesForField = array_merge(['' => ''], $states); + + $form = $this->getMock('Magento\Framework\Data\Form', [], [], '', false); + $fieldset = $this->getMock('Magento\Framework\Data\Form\Element\Fieldset', [], [], '', false); + $collection = $this->getMock('Magento\Sales\Model\Resource\Order\Status\Collection', [], [], '', false); + + $form->expects($this->once()) + ->method('addFieldset') + ->will($this->returnValue($fieldset)); + $this->formFactory->expects($this->once()) + ->method('create') + ->will($this->returnValue($form)); + + $collection->expects($this->once()) + ->method('toOptionArray') + ->will($this->returnValue($statuses)); + $this->collectionFactory->expects($this->once()) + ->method('create') + ->will($this->returnValue($collection)); + + $this->orderConfig->expects($this->once()) + ->method('getStates') + ->will($this->returnValue($states)); + + $fieldset->expects($this->at(0)) + ->method('addField') + ->with( + 'status', + 'select', + [ + 'name' => 'status', + 'label' => __('Order Status'), + 'class' => 'required-entry', + 'values' => $statusesForField, + 'required' => true + ] + ); + $fieldset->expects($this->at(1)) + ->method('addField') + ->with( + 'state', + 'select', + [ + 'name' => 'state', + 'label' => __('Order State'), + 'class' => 'required-entry', + 'values' => $statesForField, + 'required' => true + ] + ); + $fieldset->expects($this->at(2)) + ->method('addField') + ->with( + 'is_default', + 'checkbox', + ['name' => 'is_default', 'label' => __('Use Order Status As Default'), 'value' => 1] + ); + $fieldset->expects($this->at(3)) + ->method('addField') + ->with( + 'visible_on_front', + 'checkbox', + ['name' => 'visible_on_front', 'label' => __('Visible On Frontend'), 'value' => 1] + ); + + $this->block->toHtml(); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/HistoryTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/HistoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..30ec667e3f06625a328673f31c2e26c9444f9e8e --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/HistoryTest.php @@ -0,0 +1,144 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Sales\Block\Order; + +class HistoryTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Sales\Block\Order\History + */ + protected $model; + + /** + * @var \Magento\Framework\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject + */ + protected $context; + + /** + * @var \Magento\Sales\Model\Resource\Order\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderCollectionFactory; + + /** + * @var \Magento\Customer\Model\Session|\PHPUnit_Framework_MockObject_MockObject + */ + protected $customerSession; + + /** + * @var \Magento\Sales\Model\Order\Config|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderConfig; + + public function setUp() + { + $this->context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false, false); + $this->orderCollectionFactory = $this->getMock( + 'Magento\Sales\Model\Resource\Order\CollectionFactory', + ['create'], + [], + '', + false, + false + ); + $this->customerSession = $this->getMock( + 'Magento\Customer\Model\Session', + ['getCustomer'], + [], + '', + false, + false + ); + $this->orderConfig = $this->getMock( + 'Magento\Sales\Model\Order\Config', + ['getVisibleOnFrontStatuses'], + [], + '', + false, + false + ); + } + + public function testConstructMethod() + { + $data = []; + $layout = $this->getMock('Magento\Core\Model\Layout', ['getBlock'], [], '', false, false); + $this->context->expects($this->once()) + ->method('getLayout') + ->will($this->returnValue($layout)); + $layout->expects($this->once()) + ->method('getBlock') + ->will($this->returnValue(false)); + + $customerId = 25; + $customer = $this->getMock('Magento\Customer\Model\Customer', ['__wakeUp', 'getId'], [], '', false, false); + $customer->expects($this->once()) + ->method('getId') + ->will($this->returnValue($customerId)); + $this->customerSession->expects($this->once()) + ->method('getCustomer') + ->will($this->returnValue($customer)); + + $statuses = ['pending', 'processing', 'comlete']; + $this->orderConfig->expects($this->once()) + ->method('getVisibleOnFrontStatuses') + ->will($this->returnValue($statuses)); + + $orderCollection = $this->getMock( + 'Magento\Sales\Model\Resource\Order\Collection', + ['addFieldToSelect', 'addFieldToFilter', 'setOrder'], + [], + '', + false, + false + ); + $orderCollection->expects($this->at(0)) + ->method('addFieldToSelect') + ->with($this->equalTo('*')) + ->will($this->returnSelf()); + $orderCollection->expects($this->at(1)) + ->method('addFieldToFilter') + ->with('customer_id', $this->equalTo($customerId)) + ->will($this->returnSelf()); + $orderCollection->expects($this->at(2)) + ->method('addFieldToFilter') + ->with('status', $this->equalTo(['in' => $statuses])) + ->will($this->returnSelf()); + $orderCollection->expects($this->at(3)) + ->method('setOrder') + ->with('created_at', 'desc') + ->will($this->returnSelf()); + $this->orderCollectionFactory->expects($this->atLeastOnce()) + ->method('create') + ->will($this->returnValue($orderCollection)); + + $this->model = new \Magento\Sales\Block\Order\History( + $this->context, + $this->orderCollectionFactory, + $this->customerSession, + $this->orderConfig, + $data + ); + $this->assertEquals($orderCollection, $this->model->getOrders()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Order/RecentTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/RecentTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8796aa2dd102176f1b7b7dd37d02fa131978506b --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Order/RecentTest.php @@ -0,0 +1,181 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Sales\Block\Order; + +class RecentTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Sales\Block\Order\|Recent + */ + protected $model; + + /** + * @var \Magento\Framework\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject + */ + protected $context; + + /** + * @var \Magento\Sales\Model\Resource\Order\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderCollectionFactory; + + /** + * @var \Magento\Customer\Model\Session|\PHPUnit_Framework_MockObject_MockObject + */ + protected $customerSession; + + /** + * @var \Magento\Sales\Model\Order\Config|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderConfig; + + public function setUp() + { + $this->context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false, false); + $this->orderCollectionFactory = $this->getMock( + 'Magento\Sales\Model\Resource\Order\CollectionFactory', + ['create'], + [], + '', + false, + false + ); + $this->customerSession = $this->getMock( + 'Magento\Customer\Model\Session', + ['getCustomer'], + [], + '', + false, + false + ); + $this->orderConfig = $this->getMock( + 'Magento\Sales\Model\Order\Config', + ['getVisibleOnFrontStatuses'], + [], + '', + false, + false + ); + } + + public function testConstructMethod() + { + $data = []; + $attribute = ['customer_id', 'status']; + $customerId = 25; + $layout = $this->getMock('Magento\Core\Model\Layout', ['getBlock'], [], '', false, false); + $this->context->expects($this->once()) + ->method('getLayout') + ->will($this->returnValue($layout)); + $customer = $this->getMock('Magento\Customer\Model\Customer', ['__wakeUp', 'getId'], [], '', false, false); + $customer->expects($this->once()) + ->method('getId') + ->will($this->returnValue($customerId)); + $this->customerSession->expects($this->once()) + ->method('getCustomer') + ->will($this->returnValue($customer)); + + $statuses = ['pending', 'processing', 'complete']; + $this->orderConfig->expects($this->once()) + ->method('getVisibleOnFrontStatuses') + ->will($this->returnValue($statuses)); + + $orderCollection = $this->getMock( + 'Magento\Sales\Model\Resource\Order\Collection', + [ + 'addAttributeToSelect', + 'addFieldToFilter', + 'joinAttribute', + 'addAttributeToFilter', + 'addAttributeToSort', + 'setPageSize', + 'load' + ], + [], + '', + false, + false + ); + $orderCollection->expects($this->at(0)) + ->method('addAttributeToSelect') + ->with($this->equalTo('*')) + ->will($this->returnSelf()); + $orderCollection->expects($this->at(1)) + ->method('joinAttribute') + ->with( + 'shipping_firstname', + 'order_address/firstname', + 'shipping_address_id', + $this->equalTo(null), + 'left' + ) + ->will($this->returnSelf()); + $orderCollection->expects($this->at(2)) + ->method('joinAttribute') + ->with( + 'shipping_lastname', + 'order_address/lastname', + 'shipping_address_id', + $this->equalTo(null), + 'left' + ) + ->will($this->returnSelf()); + + $orderCollection->expects($this->at(3)) + ->method('addAttributeToFilter') + ->with( + $attribute[0], + $this->equalTo($customerId) + ) + ->will($this->returnSelf()); + $orderCollection->expects($this->at(4)) + ->method('addAttributeToFilter') + ->with($attribute[1], $this->equalTo(['in' => $statuses])) + ->will($this->returnSelf()); + $orderCollection->expects($this->at(5)) + ->method('addAttributeToSort') + ->with('created_at', 'desc') + ->will($this->returnSelf()); + $orderCollection->expects($this->at(6)) + ->method('setPageSize') + ->with('5') + ->will($this->returnSelf()); + $orderCollection->expects($this->at(7)) + ->method('load') + ->will($this->returnSelf()); + + $this->orderCollectionFactory->expects($this->atLeastOnce()) + ->method('create') + ->will($this->returnValue($orderCollection)); + + $this->model = new \Magento\Sales\Block\Order\Recent( + $this->context, + $this->orderCollectionFactory, + $this->customerSession, + $this->orderConfig, + $data + ); + $this->assertEquals($orderCollection, $this->model->getOrders()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Reorder/SidebarTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Reorder/SidebarTest.php index 56f300bea7b3d45f62636dc513288c36cdee0592..a5501c494a03cd4ff4ba6baf4c39d24dbf94facc 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Reorder/SidebarTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Reorder/SidebarTest.php @@ -23,6 +23,11 @@ */ namespace Magento\Sales\Block\Reorder; +/** + * Class SidebarTest + * + * @package Magento\Sales\Block\Reorder + */ class SidebarTest extends \PHPUnit_Framework_TestCase { /** @@ -30,9 +35,83 @@ class SidebarTest extends \PHPUnit_Framework_TestCase */ protected $block; + /** + * @var \Magento\Framework\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject + */ + protected $context; + + /** + * @var \Magento\Sales\Model\Resource\Order\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderCollectionFactory; + + /** + * @var \Magento\Customer\Model\Session|\PHPUnit_Framework_MockObject_MockObject + */ + protected $customerSession; + + /** + * @var \Magento\Sales\Model\Order\Config|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderConfig; + + /** + * @var \Magento\Framework\App\Http\Context|\PHPUnit_Framework_MockObject_MockObject + */ + protected $httpContext; + + /** + * @var \Magento\Sales\Model\Resource\Order\Collection|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderCollection; + + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $objectManagerHelper; + protected function setUp() { - $this->block = $this->getMock('Magento\Sales\Block\Reorder\Sidebar', array('getItems'), array(), '', false); + $this->objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false, false); + $this->httpContext = $this->getMock('Magento\Framework\App\Http\Context', ['getValue'], [], '', false, false); + $this->orderCollectionFactory = $this->getMock( + 'Magento\Sales\Model\Resource\Order\CollectionFactory', + ['create'], + [], + '', + false, + false + ); + $this->customerSession = $this->getMock( + 'Magento\Customer\Model\Session', + ['getCustomerId'], + [], + '', + false, + false + ); + $this->orderConfig = $this->getMock( + 'Magento\Sales\Model\Order\Config', + ['getVisibleOnFrontStatuses'], + [], + '', + false, + false + ); + $this->orderCollection = $this->getMock( + 'Magento\Sales\Model\Resource\Order\Collection', + [ + 'addAttributeToFilter', + 'addAttributeToSort', + 'setPage', + 'setOrders' + ], + [], + '', + false, + false + ); } protected function tearDown() @@ -42,22 +121,124 @@ class SidebarTest extends \PHPUnit_Framework_TestCase public function testGetIdentities() { - $productTags = array('catalog_product_1'); + $websiteId = 1; + $storeId = null; + $productTags = ['catalog_product_1']; + $limit = 5; - $product = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false); - $product->expects($this->once())->method('getIdentities')->will($this->returnValue($productTags)); + $storeManager = $this->getMock('Magento\Store\Model\StoreManager', ['getStore'], [], '', false, false); + $this->context->expects($this->once()) + ->method('getStoreManager') + ->will($this->returnValue($storeManager)); + $store = $this->getMock('Magento\Store\Model', ['getWebsiteId'], [], '', false, false); + $store->expects($this->once()) + ->method('getWebsiteId') + ->will($this->returnValue($websiteId)); + $storeManager->expects($this->once()) + ->method('getStore') + ->with($this->equalTo($storeId)) + ->will($this->returnValue($store)); + + $product = $this->getMock( + 'Magento\Catalog\Model\Product', + ['__wakeUp', 'getIdentities', 'getWebsiteIds'], + [], + '', + false + ); + $product->expects($this->once()) + ->method('getIdentities') + ->will($this->returnValue($productTags)); + $product->expects($this->atLeastOnce()) + ->method('getWebsiteIds') + ->will($this->returnValue([$websiteId])); $item = $this->getMock( 'Magento\Sales\Model\Resource\Order\Item', - array('getProduct', '__wakeup'), - array(), + ['__wakeup', 'getProduct'], + [], '', false ); - $item->expects($this->once())->method('getProduct')->will($this->returnValue($product)); + $item->expects($this->atLeastOnce()) + ->method('getProduct') + ->will($this->returnValue($product)); - $this->block->expects($this->once())->method('getItems')->will($this->returnValue(array($item))); + $order = $this->getMock( + 'Magento\Sales\Model\Order', + ['__wakeup', 'getParentItemsRandomCollection'], + [], + '', + false + ); + $order->expects($this->atLeastOnce()) + ->method('getParentItemsRandomCollection') + ->with($this->equalTo($limit)) + ->will($this->returnValue([$item])); + $this->block = new \Magento\Sales\Block\Reorder\Sidebar( + $this->context, + $this->orderCollectionFactory, + $this->orderConfig, + $this->customerSession, + $this->httpContext, + [] + ); + $this->block->setOrders([$order]); $this->assertEquals($productTags, $this->block->getIdentities()); } + + public function testInitOrders() + { + $customerId = 25; + $attribute = ['customer_id', 'status']; + + $this->httpContext->expects($this->once()) + ->method('getValue') + ->with($this->equalTo(\Magento\Customer\Helper\Data::CONTEXT_AUTH)) + ->will($this->returnValue(true)); + + $this->customerSession->expects($this->once()) + ->method('getCustomerId') + ->will($this->returnValue($customerId)); + + $statuses = ['pending', 'processing', 'complete']; + $this->orderConfig->expects($this->once()) + ->method('getVisibleOnFrontStatuses') + ->will($this->returnValue($statuses)); + + $this->orderCollection->expects($this->at(0)) + ->method('addAttributeToFilter') + ->with( + $attribute[0], + $this->equalTo($customerId) + ) + ->will($this->returnSelf()); + $this->orderCollection->expects($this->at(1)) + ->method('addAttributeToFilter') + ->with($attribute[1], $this->equalTo(['in' => $statuses])) + ->will($this->returnSelf()); + $this->orderCollection->expects($this->at(2)) + ->method('addAttributeToSort') + ->with('created_at', 'desc') + ->will($this->returnSelf()); + $this->orderCollection->expects($this->at(3)) + ->method('setPage') + ->with($this->equalTo(1), $this->equalTo(1)) + ->will($this->returnSelf()); + + $this->orderCollectionFactory->expects($this->atLeastOnce()) + ->method('create') + ->will($this->returnValue($this->orderCollection)); + + $this->block = new \Magento\Sales\Block\Reorder\Sidebar( + $this->context, + $this->orderCollectionFactory, + $this->orderConfig, + $this->customerSession, + $this->httpContext, + [] + ); + $this->assertEquals($this->orderCollection, $this->block->getOrders()); + } } diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Email/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Email/TemplateTest.php index f180ee8ae687184e3d2ce1fc987f4b19c2790a45..e70aa1875e2760d00352b0f6000282d4a8b55df4 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Email/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Email/TemplateTest.php @@ -68,7 +68,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase public function testIncludeTemplate() { $this->mockViewFilesystem->expects($this->once()) - ->method('getFilename') + ->method('getTemplateFileName') ->with('template') ->will($this->returnValue(__DIR__ . '/_files/test_include.php')); $include = $this->template->getInclude('template', ['one' => 1, 'two' => 2]); @@ -78,7 +78,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase public function testNoFilename() { $this->mockViewFilesystem->expects($this->once()) - ->method('getFilename') + ->method('getTemplateFileName') ->with('template') ->will($this->returnValue(false)); $include = $this->template->getInclude('template', ['one' => 1, 'two' => 2]); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/ConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0cc17fc8c10929570a24d2e1721d971a1f4d0e89 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/ConfigTest.php @@ -0,0 +1,109 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Sales\Model\Order; + +/** + * Class ConfigTest + * + * @package Magento\Sales\Model\Order + */ +class ConfigTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Sales\Model\Order\Config + */ + protected $salesConfig; + + /** + * @var \Magento\Sales\Model\Resource\Order\Status\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $orderStatusCollectionFactoryMock; + + public function setUp() + { + $orderStatusFactory = $this->getMock('Magento\Sales\Model\Order\StatusFactory', [], [], '', false, false); + $this->orderStatusCollectionFactoryMock = $this->getMock( + 'Magento\Sales\Model\Resource\Order\Status\CollectionFactory', + ['create'], + [], + '', + false, + false + ); + $this->salesConfig = new Config($orderStatusFactory, $this->orderStatusCollectionFactoryMock); + } + + public function testGetInvisibleOnFrontStatuses() + { + $statuses = [ + new \Magento\Framework\Object( + [ + 'status' => 'canceled', + 'is_default' => 1, + 'visible_on_front' => 1 + ] + ), + new \Magento\Framework\Object( + [ + 'status' => 'complete', + 'is_default' => 1, + 'visible_on_front' => 0 + ] + ), + new \Magento\Framework\Object( + [ + 'status' => 'processing', + 'is_default' => 1, + 'visible_on_front' => 1 + ] + ), + new \Magento\Framework\Object( + [ + 'status' => 'pending_payment', + 'is_default' => 1, + 'visible_on_front' => 0 + ] + ), + ]; + $expectedResult = ['complete', 'pending_payment']; + + $collectionMock = $this->getMock( + 'Magento\Sales\Model\Resource\Order\Status\Collection', + ['create', 'joinStates'], + [], + '', + false, + false + ); + $this->orderStatusCollectionFactoryMock->expects($this->once()) + ->method('create') + ->will($this->returnValue($collectionMock)); + $collectionMock->expects($this->once()) + ->method('joinStates') + ->will($this->returnValue($statuses)); + + $result = $this->salesConfig->getInvisibleOnFrontStatuses(); + $this->assertSame($expectedResult, $result); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/PaymentTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/PaymentTest.php index 77a0c025bbc7810db00336aebd8e8892a408c2e4..d48fa4a3e8d9e58a4e2038827d7ed822268deae3 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/PaymentTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/PaymentTest.php @@ -23,28 +23,106 @@ */ namespace Magento\Sales\Model\Order; +/** + * Class PaymentTest + * @package Magento\Sales\Model\Order + */ class PaymentTest extends \PHPUnit_Framework_TestCase { + /** + * @var Payment + */ + protected $payment; + + /** + * @var \Magento\Payment\Helper\Data | \PHPUnit_Framework_MockObject_MockObject + */ + protected $helper; + + /** + * @var \Magento\Framework\Event\Manager | \PHPUnit_Framework_MockObject_MockObject + */ + protected $eventManager; + + protected function setUp() + { + $objectManger = new \Magento\TestFramework\Helper\ObjectManager($this); + + $this->eventManager = $this->getMock('Magento\Framework\Event\Manager', [], [], '', false); + + $context = $this->getMock('Magento\Framework\Model\Context', [], [], '', false); + $context->expects($this->once()) + ->method('getEventDispatcher') + ->will($this->returnValue($this->eventManager)); + + $this->helper = $this->getMock('Magento\Payment\Helper\Data', ['getMethodInstance'], [], '', false); + + $this->payment = $objectManger->getObject( + 'Magento\Sales\Model\Order\Payment', + [ + 'paymentData' => $this->helper, + 'context' => $context + ] + ); + } + + protected function tearDown() + { + $this->payment = null; + } + public function testCancel() { - $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var Payment $model */ - $payment = $this->getMock('Magento\Payment\Model\Method\AbstractMethod', array('canVoid'), array(), '', false); - $paymentData = $this->getMock('Magento\Payment\Helper\Data', array('getMethodInstance'), array(), '', false); - $paymentData->expects($this->once())->method('getMethodInstance')->will($this->returnValue($payment)); - $model = $helper->getObject('Magento\Sales\Model\Order\Payment', array('paymentData' => $paymentData)); - $model->setMethod('any'); + $paymentMethod = $this->getMock('Magento\Payment\Model\Method\AbstractMethod', ['canVoid'], [], '', false); + $this->helper->expects($this->once())->method('getMethodInstance')->will($this->returnValue($paymentMethod)); + $this->payment->setMethod('any'); // check fix for partial refunds in Payflow Pro - $payment->expects( + $paymentMethod->expects( $this->once() )->method( 'canVoid' )->with( - new \PHPUnit_Framework_Constraint_IsIdentical($model) + new \PHPUnit_Framework_Constraint_IsIdentical($this->payment) )->will( $this->returnValue(false) ); - $model->cancel(); + $this->assertEquals($this->payment, $this->payment->cancel()); + } + + public function testPlace() + { + $newOrderStatus = 'new_status'; + /** @var \Magento\Sales\Model\Order\Config | \PHPUnit_Framework_MockObject_MockObject $orderConfig */ + $orderConfig = $this->getMock('Magento\Sales\Model\Order\Config', [], [], '', false); + $orderConfig->expects($this->at(0)) + ->method('getStateStatuses') + ->with(\Magento\Sales\Model\Order::STATE_NEW) + ->will($this->returnValue(['firstStatus', 'secondStatus'])); + $orderConfig->expects($this->at(1)) + ->method('getStateDefaultStatus') + ->with(\Magento\Sales\Model\Order::STATE_NEW) + ->will($this->returnValue($newOrderStatus)); + /** @var \Magento\Sales\Model\Order | \PHPUnit_Framework_MockObject_MockObject $order */ + $order = $this->getMock('Magento\Sales\Model\Order', [], [], '', false); + $order->expects($this->any()) + ->method('getConfig') + ->will($this->returnValue($orderConfig)); + $order->expects($this->once()) + ->method('setState') + ->with(\Magento\Sales\Model\Order::STATE_NEW, $newOrderStatus); + $methodInstance = $this->getMock('Magento\Payment\Model\Method\AbstractMethod', [], [], '', false); + + $this->payment->setOrder($order); + $this->payment->setMethodInstance($methodInstance); + + $this->eventManager->expects($this->at(0)) + ->method('dispatch') + ->with('sales_order_payment_place_start', ['payment' => $this->payment]); + $this->eventManager->expects($this->at(1)) + ->method('dispatch') + ->with('sales_order_payment_place_end', ['payment' => $this->payment]); + + $this->assertEquals($this->payment, $this->payment->place()); } } diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/StatusTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/StatusTest.php index 099c701b7107086e0aab952e37d015ffef10bdac..4a5ba8992854e9873368c925322472f7a0cae93c 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/StatusTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/StatusTest.php @@ -23,13 +23,18 @@ */ namespace Magento\Sales\Model\Order; +/** + * Class StatusTest + * + * @package Magento\Sales\Model\Order + */ class StatusTest extends \PHPUnit_Framework_TestCase { /** * Retrieve prepared for test \Magento\Sales\Model\Order\Status * - * @param null|PHPUnit_Framework_MockObject_MockObject $resource - * @param null|PHPUnit_Framework_MockObject_MockObject $eventDispatcher + * @param null|\PHPUnit_Framework_MockObject_MockObject $resource + * @param null|\PHPUnit_Framework_MockObject_MockObject $eventDispatcher * @return \Magento\Sales\Model\Order\Status */ protected function _getPreparedModel($resource = null, $eventDispatcher = null) @@ -80,4 +85,28 @@ class StatusTest extends \PHPUnit_Framework_TestCase $model->setStatus($status); $this->assertInstanceOf('Magento\Sales\Model\Order\Status', $model->unassignState($state)); } + + public function testAssignState() + { + $state = 'test_state'; + $status = 'test_status'; + $visibleOnFront = true; + + $resource = $this->getMock('Magento\Sales\Model\Resource\Order\Status', array(), array(), '', false); + $resource->expects($this->once()) + ->method('beginTransaction'); + $resource->expects($this->once()) + ->method('assignState') + ->with( + $this->equalTo($status), + $this->equalTo($state) + ); + $resource->expects($this->once())->method('commit'); + + $eventDispatcher = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); + + $model = $this->_getPreparedModel($resource, $eventDispatcher); + $model->setStatus($status); + $this->assertInstanceOf('Magento\Sales\Model\Order\Status', $model->assignState($state), $visibleOnFront); + } } diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php index 78ab2d5b514a150685051288ab759625b36721a7..f46fa01e52141a391139ba5650af8b01de2cc654 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/QuoteTest.php @@ -46,6 +46,21 @@ class QuoteTest extends \PHPUnit_Framework_TestCase */ protected $quoteAddressCollectionMock; + /** + * @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $storeManagerMock; + + /** + * @var \Magento\Store\Model\Store|\PHPUnit_Framework_MockObject_MockObject + */ + protected $storeMock; + + /** + * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $scopeConfigMock; + /** * @var \Magento\Sales\Model\Quote */ @@ -61,9 +76,10 @@ class QuoteTest extends \PHPUnit_Framework_TestCase false ); $this->quoteAddressMock = $this->getMock('Magento\Sales\Model\Quote\Address', array(), array(), '', false); + $methods = array('isDeleted', 'setQuoteFilter', 'getIterator', 'validateMinimumAmount'); $this->quoteAddressCollectionMock = $this->getMock( 'Magento\Sales\Model\Resource\Quote\Address\Collection', - array(), + $methods, array(), '', false @@ -84,12 +100,19 @@ class QuoteTest extends \PHPUnit_Framework_TestCase $this->returnValue($this->quoteAddressCollectionMock) ); + $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); + + $this->storeMock = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false); + $this->storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($this->storeMock)); + $this->scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $this->quote = (new ObjectManager( $this ))->getObject( - 'Magento\Sales\Model\Quote', - array('quoteAddressFactory' => $this->quoteAddressFactoryMock) - ); + 'Magento\Sales\Model\Quote', + array('quoteAddressFactory' => $this->quoteAddressFactoryMock, + 'storeManager' => $this->storeManagerMock, + 'scopeConfig' => $this->scopeConfigMock) + ); } /** @@ -177,4 +200,26 @@ class QuoteTest extends \PHPUnit_Framework_TestCase $shippingAddressMock->expects($this->any())->method('isDeleted')->will($this->returnValue(false)); return $shippingAddressMock; } + + public function testValidateMinimumAmount() + { + + $this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(false)); + $valueMap = array( + array('sales/minimum_order/active', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, false, true), + array('sales/minimum_order/multi_address', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, false, true) + ); + $this->scopeConfigMock->expects($this->any())->method('isSetFlag')->will($this->returnValueMap($valueMap)); + $this->scopeConfigMock->expects($this->once()) + ->method('getValue') + ->with('sales/minimum_order/amount', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, false) + ->will($this->returnValue(150)); + $this->quoteAddressCollectionMock + ->expects($this->any()) + ->method('setQuoteFilter') + ->will($this->returnValue(array($this->quoteAddressCollectionMock))); + $this->quoteAddressCollectionMock->expects($this->never())->method('validateMinimumAmount'); + $this->assertEquals(true, $this->quote->validateMinimumAmount(true)); + } } diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php new file mode 100644 index 0000000000000000000000000000000000000000..79f2a42c16032668351aa16d9c3224b4801276f1 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Resource/Order/StatusTest.php @@ -0,0 +1,129 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Sales\Model\Resource\Order; + +/** + * Class StatusTest + * + * @package Magento\Sales\Model\Resource + */ +class StatusTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Sales\Model\Resource\Order\Status + */ + protected $model; + + /** + * @var \Magento\Framework\App\Resource|\PHPUnit_Framework_MockObject_MockObject + */ + protected $resourceMock; + + /** + * @var \Magento\Eav\Model\Config|\PHPUnit_Framework_MockObject_MockObject + */ + protected $configMock; + + /** + * @var \Magento\Framework\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject + */ + protected $adapterMock; + + /** + * @var \Magento\Framework\DB\Select + */ + protected $selectMock; + + public function setUp() + { + $this->selectMock = $this->getMock('\Magento\Framework\DB\Select', [], [], '', false); + $this->selectMock->expects($this->any())->method('from')->will($this->returnSelf()); + $this->selectMock->expects($this->any())->method('where'); + + $this->adapterMock = $this->getMock( + '\Magento\Framework\DB\Adapter\Pdo\Mysql', + ['update', 'insertOnDuplicate'], + [], + '', + false + ); + $this->adapterMock->expects($this->any())->method('select')->will($this->returnValue($this->selectMock)); + + $this->resourceMock = $this->getMock( + '\Magento\Framework\App\Resource', + ['getTableName', 'getConnection'], + [], + '', + false + ); + $tableName = 'sales_order_status_state'; + $this->resourceMock->expects($this->at(1)) + ->method('getTableName') + ->with($this->equalTo($tableName)) + ->will($this->returnValue($tableName)); + $this->resourceMock->expects($this->any()) + ->method('getConnection') + ->will( + $this->returnValue($this->adapterMock) + ); + + $this->configMock = $this->getMock('\Magento\Eav\Model\Config', ['getConnectionName'], [], '', false); + + $this->model = new \Magento\Sales\Model\Resource\Order\Status( + $this->resourceMock, + new \Magento\Framework\Stdlib\DateTime(), + $this->configMock + ); + } + + public function testAssignState() + { + $state = 'processing'; + $status = 'processing'; + $isDefault = 1; + $visibleOnFront = 1; + $tableName = 'sales_order_status_state'; + $this->adapterMock->expects($this->once()) + ->method('update') + ->with( + $this->equalTo($tableName), + $this->equalTo(['is_default' => 0]), + $this->equalTo(['state = ?' => $state]) + ); + $this->adapterMock->expects($this->once()) + ->method('insertOnDuplicate') + ->with( + $this->equalTo($tableName), + $this->equalTo( + [ + 'status' => $status, + 'state' => $state, + 'is_default' => $isDefault, + 'visible_on_front' => $visibleOnFront + ] + ) + ); + $this->model->assignState($status, $state, $isDefault, $visibleOnFront); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php index 1e14508ae50eb0f5486cba575c6aa6a7fd5f6438..40644391cf99067284a2ae433a098c9e784081e3 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php @@ -210,12 +210,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase 'web/unsecure/base_link_url', 'http://domain.com/web/unsecure/base_link_url/index.php/' ), - array( - \Magento\Framework\UrlInterface::URL_TYPE_LIB, - false, - 'web/unsecure/base_lib_url', - 'http://domain.com/web/unsecure/base_lib_url/' - ), array( \Magento\Framework\UrlInterface::URL_TYPE_MEDIA, false, @@ -228,18 +222,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase 'web/unsecure/base_static_url', 'http://domain.com/web/unsecure/base_static_url/' ), - array( - \Magento\Framework\UrlInterface::URL_TYPE_CACHE, - false, - 'web/unsecure/base_cache_url', - 'http://domain.com/web/unsecure/base_cache_url/' - ), - array( - \Magento\Framework\UrlInterface::URL_TYPE_LIB, - false, - 'web/unsecure/base_url', - 'http://domain.com/web/unsecure/base_url/' - ), array( \Magento\Framework\UrlInterface::URL_TYPE_MEDIA, false, @@ -252,12 +234,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase 'web/unsecure/base_url', 'http://domain.com/web/unsecure/base_url/' ), - array( - \Magento\Framework\UrlInterface::URL_TYPE_CACHE, - false, - 'web/unsecure/base_url', - 'http://domain.com/web/unsecure/base_url/' - ), array( \Magento\Framework\UrlInterface::URL_TYPE_WEB, true, diff --git a/dev/tests/unit/testsuite/Magento/Tax/Pricing/Price/Plugin/AttributePriceTest.php b/dev/tests/unit/testsuite/Magento/Tax/Pricing/Price/Plugin/AttributePriceTest.php index 21a41b33c6312b64aee1814f63e233546979baac..f878e4211c59156f6ce422986e724e4dfcb7356f 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Pricing/Price/Plugin/AttributePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Pricing/Price/Plugin/AttributePriceTest.php @@ -48,7 +48,7 @@ class AttributePriceTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Tax\Pricing\Price\Plugin\AttributePrice */ protected $plugin; - /** @var \Magento\Object|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Object|\PHPUnit_Framework_MockObject_MockObject */ protected $rateRequestMock; /** @var \Magento\ConfigurableProduct\Pricing\Price\AttributePrice|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml index a15258871b4251bdcce3a7a510cc8cc1ccbb68c7..4e69d9ea788d607b403b446bb6b6632789928c33 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\App\RequestInterface" type="Magento\Framework\App\Request\Http\Proxy" /> <preference for="Magento\Core\Model\Config\InvalidatorInterface" type="Magento\Core\Model\Config\Invalidator\Proxy" /> <preference for="Magento\Framework\App\CacheInterface" type="Magento\Framework\App\Cache\Proxy" /> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml index e29dabbb81c4a37a81d6bc00c1f75c1ec748fa2b..5bbeed1e44312edbf7e950a058de204338ac9575 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/ObjectManager/etc/config.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\Cache"> <arguments> <argument name="storeManager" xsi:type="object">customStoreManagerProxy</argument> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/ContextTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/ContextTest.php index 34baeec7e2ec96b5834581d902a9ae70f999d095..29fed72c41e68028a3fbf07047d6de5664871cb1 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/ContextTest.php +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/I18n/Code/ContextTest.php @@ -56,7 +56,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase return array( array(array(Context::CONTEXT_TYPE_MODULE, 'Magento_Module'), '/app/code/Magento/Module/Block/Test.php'), array(array(Context::CONTEXT_TYPE_THEME, 'theme/test.phtml'), '/app/design/theme/test.phtml'), - array(array(Context::CONTEXT_TYPE_PUB, 'pub/lib/module/test.phtml'), '/pub/lib/module/test.phtml') + array(array(Context::CONTEXT_TYPE_LIB, 'lib/web/module/test.phtml'), '/lib/web/module/test.phtml'), ); } @@ -87,7 +87,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase return array( array('app/code/Magento/Module/i18n/', array(Context::CONTEXT_TYPE_MODULE, 'Magento_Module')), array('app/design/theme/test.phtml/i18n/', array(Context::CONTEXT_TYPE_THEME, 'theme/test.phtml')), - array('pub/lib/i18n/', array(Context::CONTEXT_TYPE_PUB, 'pub/lib/module/test.phtml')) + array('lib/web/i18n/', array(Context::CONTEXT_TYPE_LIB, 'lib/web/module/test.phtml')), ); } diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/community/Namespace/Module/etc/adminhtml.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/community/Namespace/Module/etc/adminhtml.xml index a1cc42a091ba32ed95701aaf237a9aa12627bc99..e2b5eae3a935e2c96d2183773ed55dbd592a87b8 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/community/Namespace/Module/etc/adminhtml.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/community/Namespace/Module/etc/adminhtml.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/ANamespace/Module/etc/adminhtml.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/ANamespace/Module/etc/adminhtml.xml index a1cc42a091ba32ed95701aaf237a9aa12627bc99..e2b5eae3a935e2c96d2183773ed55dbd592a87b8 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/ANamespace/Module/etc/adminhtml.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/ANamespace/Module/etc/adminhtml.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/BNamespace/Module/etc/adminhtml.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/BNamespace/Module/etc/adminhtml.xml index a1cc42a091ba32ed95701aaf237a9aa12627bc99..e2b5eae3a935e2c96d2183773ed55dbd592a87b8 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/BNamespace/Module/etc/adminhtml.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/core/BNamespace/Module/etc/adminhtml.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/local/Namespace/Module/etc/adminhtml.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/local/Namespace/Module/etc/adminhtml.xml index a1cc42a091ba32ed95701aaf237a9aa12627bc99..e2b5eae3a935e2c96d2183773ed55dbd592a87b8 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/local/Namespace/Module/etc/adminhtml.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/app/code/local/Namespace/Module/etc/adminhtml.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/parse_node_source.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/parse_node_source.xml index 189ea90b8856699e8c8c390a98b4e0dc6b601b2a..e692d62caabe9068d287942267151ae5ed80b955 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/parse_node_source.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/parse_node_source.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/empty.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/empty.xml index 0693e6e74911d234c95e2e90ae9c7125f3532781..a17f42cd695d38952a7b3f44c05220dc07ec31e4 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/empty.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/empty.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/not_empty.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/not_empty.xml index f2ed009ca3db724bcf68f38bc38d921ec82c22ca..ed627739892875582d3519852a5e57cd6d2d3452 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/not_empty.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/remove/not_empty.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/save/adminhtml.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/save/adminhtml.xml index a93c1a04cd5c1a31efdb6d3eb1f6eefe391d410b..32884879e243e4172bc8b44ec5873b4c1f06475e 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/save/adminhtml.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/save/adminhtml.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <admin> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_result.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_result.xml index 05373b8da8e47a6b9eaf6cb9e5f9184e46f9b648..13f0d3b20eb4e5457283b2de2277a35da58c9ccd 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_result.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_result.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Map_Module::admin"> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_source.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_source.xml index f832957a63c18302353071a22dd496469f2b4e7a..650e5e5239bbcac2a7d821f33231fa8089fb2f8f 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_source.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_child_acl_nodes_source.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="admin" xpath="/admin"> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_result.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_result.xml index d00d56f10b8c9038b610104ff3b04634305fffd9..76c9ce9877d0b275b59dc75489ff3a95cc75dd36 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_result.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_result.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <menu> <add id="item1" resource="acl4"/> <add id="item2" resource="acl2"/> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_source.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_source.xml index 6e56a6bbbb224bc7fac632acd7d75aa561e15395..412ef9cc408adbe30278fc6cedbad763f211e8b5 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_source.xml +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Migration/Acl/_files/update_menu_attributes_source.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <menu> <add id="item1" resource='some/resource' /> <add id="item2" /> diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Deployer/LogTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Deployer/LogTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0ed2ee85f0fbd20ed72bc16df4c300b2e710b40a --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Deployer/LogTest.php @@ -0,0 +1,66 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Test\Tools\View\Deployer; + +use \Magento\Tools\View\Deployer\Log; + +class LogTest extends \PHPUnit_Framework_TestCase +{ + /** + * @param string $method + * @param int $verbosity + * @param string $exepctedMsg + * @dataProvider logDataProvider + */ + public function testLog($method, $verbosity, $exepctedMsg) + { + $object = new Log($verbosity); + $object->$method('foo'); + $this->expectOutputString($exepctedMsg); + } + + /** + * @return array + */ + public function logDataProvider() + { + $foo = "foo\n"; + $err = "ERROR: {$foo}"; + return [ + ['logMessage', Log::SILENT, ''], + ['logError', Log::SILENT, ''], + ['logDebug', Log::SILENT, ''], + ['logMessage', Log::ERROR, $foo], + ['logError', Log::ERROR, $err], + ['logDebug', Log::ERROR, ''], + ['logMessage', Log::DEBUG, $foo], + ['logError', Log::DEBUG, ''], + ['logDebug', Log::DEBUG, $foo], + ['logMessage', Log::ERROR | Log::DEBUG, $foo], + ['logError', Log::ERROR | Log::DEBUG, $err], + ['logDebug', Log::ERROR | Log::DEBUG, $foo], + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ConfigTest.php deleted file mode 100644 index 31776c36f6c830824eacb386122aa00d9682d9e9..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ConfigTest.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Test\Tools\View\Generator; - - -require_once __DIR__ . '/../../../../../../../../tools/Magento/Tools/View/Generator/Config.php'; -class ConfigTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $_rootDirectory; - - /** - * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject - */ - protected $_filesystem; - - protected function setUp() - { - $this->_rootDirectory = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface'); - $this->_rootDirectory->expects($this->never())->method('getAbsolutePath'); - $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_filesystem->expects( - $this->once() - )->method( - 'getDirectoryWrite' - )->will( - $this->returnValue($this->_rootDirectory) - ); - } - - /** - * @param array $cmdOptions - * @param array $allowedFiles - * @param array $relativePathsMap - * @param array $dirExistenceMap - * @param bool $expectsReadingDir - * @param string $exceptionMessage - * - * @dataProvider constructorDataProvider - */ - public function testConstructor( - array $cmdOptions, - array $relativePathsMap, - array $dirExistenceMap, - array $allowedFiles, - $expectsReadingDir, - $exceptionMessage - ) { - if ($exceptionMessage) { - $this->setExpectedException('\Magento\Framework\Exception', $exceptionMessage); - } - - $this->_rootDirectory->expects( - $this->any() - )->method( - 'getRelativePath' - )->will( - $this->returnValueMap($relativePathsMap) - ); - $this->_rootDirectory->expects( - $this->any() - )->method( - 'isDirectory' - )->will( - $this->returnValueMap($dirExistenceMap) - ); - - if ($expectsReadingDir) { - $this->_rootDirectory->expects( - $this->once() - )->method( - 'read' - )->will( - $this->returnValue(array('destination/one', 'destination/two')) - ); - } - - new \Magento\Tools\View\Generator\Config($this->_filesystem, $cmdOptions, $allowedFiles); - } - - public function constructorDataProvider() - { - $sourceDir = '/base/dir/source'; - $relativeSourceDir = 'source'; - $destinationDir = '/base/dir/destination'; - $relativeDestinationDir = 'destination'; - - return array( - 'exception: non-empty destination dir' => array( - array('source' => $sourceDir, 'destination' => $destinationDir), - array(array($sourceDir, $relativeSourceDir), array($destinationDir, $relativeDestinationDir)), - array(array($relativeSourceDir, true), array($relativeDestinationDir, true)), - array('one'), - true, - 'Destination directory must be empty' - ), - 'exception: nonexistent destination directory' => array( - array('source' => $sourceDir, 'destination' => $destinationDir), - array(array($sourceDir, $relativeSourceDir), array($destinationDir, $relativeDestinationDir)), - array(array($relativeSourceDir, true), array($relativeDestinationDir, false)), - array(), - false, - 'Destination directory does not exist' - ), - 'exception: nonexistent source directory' => array( - array('source' => $sourceDir), - array(array($sourceDir, $relativeSourceDir)), - array(array($relativeSourceDir, false)), - array(), - false, - 'Source directory does not exist' - ), - 'no exception' => array( - array('source' => $sourceDir, 'destination' => $destinationDir), - array(array($sourceDir, $relativeSourceDir), array($destinationDir, $relativeDestinationDir)), - array(array($relativeSourceDir, true), array($relativeDestinationDir, true)), - array('one', 'two'), - true, - null - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/CopyRuleTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/CopyRuleTest.php deleted file mode 100644 index 94cdd28420763c6cce75c330fadc9fe422aa36a1..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/CopyRuleTest.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Test\Tools\View\Generator; - - -require_once __DIR__ . '/../../../../../../../../tools/Magento/Tools/View/Generator/CopyRule.php'; -class CopyRuleTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Tools\View\Generator\CopyRule - */ - protected $_object; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_directoryMock; - - /** - * @var \Magento\Core\Model\Theme\Collection - */ - protected $_themeCollection; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_fallbackRule; - - protected function setUp() - { - $filesystemMock = $this->getMock( - 'Magento\Framework\App\Filesystem', - array('getDirectoryRead', '__wakeup'), - array(), - '', - false - ); - $this->_directoryMock = $this->getMock( - '\Magento\Framework\Filesystem\Directory\Read', - array('search', 'isDirectory', 'getAbsolutePath', 'getRelativePath'), - array(), - '', - false - ); - $filesystemMock->expects( - $this->any() - )->method( - 'getDirectoryRead' - )->will( - $this->returnValue($this->_directoryMock) - ); - $this->_themeCollection = $this->getMock( - 'Magento\Core\Model\Theme\Collection', - array('isLoaded'), - array( - $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false), - $filesystemMock, - $this->getMock('\Magento\Framework\Config\FileIteratorFactory', array(), array(), '', false) - ) - ); - $this->_themeCollection->expects($this->any())->method('isLoaded')->will($this->returnValue(true)); - $this->_fallbackRule = $this->getMockForAbstractClass( - 'Magento\Framework\View\Design\Fallback\Rule\RuleInterface' - ); - $this->_object = new \Magento\Tools\View\Generator\CopyRule( - $filesystemMock, - $this->_themeCollection, - $this->_fallbackRule - ); - } - - protected function tearDown() - { - $this->_object = null; - $this->_directoryMock = null; - $this->_themeCollection = null; - $this->_fallbackRule = null; - } - - /** - * @param array $fixtureThemes - * @param array $patternDirMap - * @param array $filesystemGlobMap - * @param array $expectedResult - * @dataProvider getCopyRulesDataProvider - */ - public function testGetCopyRules( - array $fixtureThemes, - array $patternDirMap, - array $filesystemGlobMap, - array $expectedResult - ) { - foreach ($fixtureThemes as $theme) { - $this->_themeCollection->addItem($theme); - } - $this->_fallbackRule->expects( - $this->atLeastOnce() - )->method( - 'getPatternDirs' - )->will( - $this->returnValueMap($patternDirMap) - ); - $this->_directoryMock->expects( - $this->atLeastOnce() - )->method( - 'search' - )->will( - $this->returnValueMap($filesystemGlobMap) - ); - $this->_directoryMock->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); - $this->_directoryMock->expects($this->any())->method('getAbsolutePath')->will($this->returnArgument(0)); - $this->_directoryMock->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); - $this->_directoryMock->expects($this->atLeastOnce())->method('isDirectory')->will($this->returnValue(true)); - $this->assertEquals($expectedResult, $this->_object->getCopyRules()); - } - - public function getCopyRulesDataProvider() - { - $fixture = require __DIR__ . '/_files/fixture_themes.php'; - - $patternDirMap = array(); - $filesystemGlobMap = array(); - foreach ($fixture as $fixtureInfo) { - $patternDirMap = array_merge($patternDirMap, $fixtureInfo['pattern_dir_map']); - $filesystemGlobMap = array_merge($filesystemGlobMap, $fixtureInfo['filesystem_glob_map']); - } - - return array( - 'reverse fallback traversal' => array( - array($fixture['theme_customizing_one_module']['theme']), - $patternDirMap, - $filesystemGlobMap, - $fixture['theme_customizing_one_module']['expected_result'] - ), - 'themes in the same area' => array( - array( - $fixture['theme_customizing_one_module']['theme'], - $fixture['theme_customizing_two_modules']['theme'] - ), - $patternDirMap, - $filesystemGlobMap, - array_merge( - $fixture['theme_customizing_one_module']['expected_result'], - $fixture['theme_customizing_two_modules']['expected_result'] - ) - ), - 'themes in different areas' => array( - array( - $fixture['theme_customizing_one_module']['theme'], - $fixture['theme_customizing_no_modules']['theme'] - ), - $patternDirMap, - $filesystemGlobMap, - array_merge( - $fixture['theme_customizing_one_module']['expected_result'], - $fixture['theme_customizing_no_modules']['expected_result'] - ) - ) - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ThemeDeploymentTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ThemeDeploymentTest.php deleted file mode 100644 index 0e03619555ff8b3e3f096ec0889d5f8c8ad6974c..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ThemeDeploymentTest.php +++ /dev/null @@ -1,268 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Test\Tools\View\Generator; - - -require_once realpath( - __DIR__ . '/../../../../../../../../' -) . '/tools/Magento/Tools/View/Generator/ThemeDeployment.php'; -class ThemeDeploymentTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Framework\View\Url\CssResolver - */ - protected $_cssUrlResolver; - - /** - * @var string - */ - protected $_tmpDir; - - /** - * @var \Magento\Framework\App\Filesystem | \PHPUnit_Framework_MockObject_MockObject - */ - protected $filesystem; - - /** - * @var \Magento\Framework\Filesystem\Driver\File - */ - protected $filesystemAdapter; - - protected function setUp() - { - $methods = array('getDirectoryWrite', 'getPath', '__wakeup'); - $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', $methods, array(), '', false); - $this->filesystem->expects( - $this->any() - )->method( - 'getPath' - )->with( - \Magento\Framework\App\Filesystem::ROOT_DIR - )->will( - $this->returnValue(str_replace('\\', '/', BP)) - ); - - $viewFilesystem = $this->getMock( - 'Magento\Framework\View\Filesystem', - array('normalizePath'), - array(), - '', - false - ); - $viewFilesystem->expects($this->any())->method('normalizePath')->will($this->returnArgument(0)); - - $this->_cssUrlResolver = new \Magento\Framework\View\Url\CssResolver($this->filesystem, $viewFilesystem); - $this->_tmpDir = TESTS_TEMP_DIR . '/tool_theme_deployment'; - - $this->filesystemAdapter = new \Magento\Framework\Filesystem\Driver\File(); - $this->filesystemAdapter->createDirectory($this->_tmpDir, 0777); - } - - protected function tearDown() - { - $this->filesystemAdapter->deleteDirectory($this->_tmpDir); - } - - /** - * @param string $permitted - * @param string $forbidden - * @param string $exceptionMessage - * @dataProvider constructorExceptionDataProvider - */ - public function testConstructorException($permitted, $forbidden, $exceptionMessage) - { - $this->setExpectedException('Magento\Framework\Exception', $exceptionMessage); - $this->_createThemeDeployment($permitted, $forbidden); - } - - public static function constructorExceptionDataProvider() - { - $conflictPermitted = __DIR__ . '/_files/ThemeDeployment/constructor_exception/permitted.php'; - $conflictForbidden = __DIR__ . '/_files/ThemeDeployment/constructor_exception/forbidden.php'; - return array( - 'no permitted config' => array( - 'non_existing_config.txt', - $conflictForbidden, - 'Config file does not exist: non_existing_config.txt' - ), - 'no forbidden config' => array( - $conflictPermitted, - 'non_existing_config.txt', - 'Config file does not exist: non_existing_config.txt' - ), - 'config conflicts' => array( - $conflictPermitted, - $conflictForbidden, - 'Conflicts: the following extensions are added both to permitted and forbidden lists: ' . - 'conflict1, conflict2' - ) - ); - } - - public function testRun() - { - $permitted = __DIR__ . '/_files/ThemeDeployment/run/permitted.php'; - $forbidden = __DIR__ . '/_files/ThemeDeployment/run/forbidden.php'; - $fixture = include __DIR__ . '/_files/ThemeDeployment/run/fixture.php'; - - $object = $this->_createThemeDeployment($permitted, $forbidden); - $object->run($fixture['copyRules']); - - // Verify expected paths - $actualPaths = $this->_getRelativePaths($this->_tmpDir); - $actualPaths = $this->_canonizePathArray($actualPaths); - $expectedPaths = $this->_canonizePathArray($fixture['expectedRelPaths']); - $this->assertEquals($expectedPaths, $actualPaths, "Actual result of copying is different from expected paths"); - - // Verify content of files - foreach ($fixture['expectedFileContent'] as $relFile => $expectedContent) { - $actualContent = trim(file_get_contents($this->_tmpDir . '/' . $relFile)); - $this->assertEquals($expectedContent, $actualContent, "Actual content is wrong in file {$relFile}"); - } - } - - /** - * Recursively go through directory and compose relative paths of all its files - * - * @param string $dir - * @return array - */ - protected function _getRelativePaths($dir) - { - $dirLen = strlen($dir); - $files = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS) - ); - $result = array(); - foreach ($files as $file) { - $result[] = substr($file, $dirLen + 1); - } - return $result; - } - - /** - * Process $paths, sorting them and making system separator in them - * - * @param array $paths - * @return array - */ - protected function _canonizePathArray($paths) - { - rsort($paths, SORT_STRING); - foreach ($paths as &$path) { - $path = str_replace(array('/', '\\'), '/', $path); - } - return $paths; - } - - public function testRunInDryRun() - { - $permitted = __DIR__ . '/_files/ThemeDeployment/run/permitted.php'; - $forbidden = __DIR__ . '/_files/ThemeDeployment/run/forbidden.php'; - $fixture = include __DIR__ . '/_files/ThemeDeployment/run/fixture.php'; - - $object = $this->_createThemeDeployment($permitted, $forbidden, true); - $object->run($fixture['copyRules']); - - $actualPaths = $this->_getRelativePaths($this->_tmpDir); - $this->assertEmpty($actualPaths, 'Nothing must be copied/created in dry-run mode'); - } - - /** - * @expectedException \Magento\Framework\Exception - * @expectedExceptionMessage The file extension "php" must be added either to the permitted or forbidden list - */ - public function testRunWithUnknownExtension() - { - $permitted = __DIR__ . '/_files/ThemeDeployment/run/permitted.php'; - $forbidden = __DIR__ . '/_files/ThemeDeployment/run/forbidden_without_php.php'; - $fixture = include __DIR__ . '/_files/ThemeDeployment/run/fixture.php'; - - $object = $this->_createThemeDeployment($permitted, $forbidden, true); - $object->run($fixture['copyRules']); - } - - public function testRunWithCasedExtension() - { - $permitted = __DIR__ . '/_files/ThemeDeployment/run/permitted_cased_js.php'; - - $object = $this->_createThemeDeployment($permitted); - $copyRules = array( - array( - 'source' => __DIR__ . '/_files/ThemeDeployment/run/source_cased_js', - 'destinationContext' => array( - 'area' => 'frontend', - 'locale' => 'not_important', - 'themePath' => 'theme_path', - 'module' => null - ) - ) - ); - $object->run($copyRules); - $this->assertFileExists($this->_tmpDir . '/frontend/theme_path/file.JS'); - } - - /** - * Create Theme Deployment instance - * - * @param string $permitted - * @param string|null $forbidden - * @param bool $isDryRun - * @return \Magento\Tools\View\Generator\ThemeDeployment - */ - protected function _createThemeDeployment($permitted, $forbidden = null, $isDryRun = false) - { - $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $preProcessor = $this->getMock( - 'Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface', - array(), - array(), - '', - false - ); - $fileFactory = $this->getMock('Magento\Framework\View\Publisher\FileFactory', array(), array(), '', false); - $appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $themeFactory = $this->getMock('Magento\Core\Model\Theme\DataFactory', array('create'), array(), '', false); - - $object = new \Magento\Tools\View\Generator\ThemeDeployment( - $this->_cssUrlResolver, - $filesystem, - $preProcessor, - $fileFactory, - $appState, - $themeFactory, - $this->_tmpDir, - $permitted, - $forbidden, - $isDryRun - ); - - $fileObject = $this->getMock('Magento\Framework\View\Publisher\File', array(), array(), '', false); - $fileFactory->expects($this->any())->method('create')->will($this->returnValue($fileObject)); - $appState->expects($this->any())->method('emulateAreaCode')->will($this->returnValue($fileObject)); - $fileObject->expects($this->any())->method('getSourcePath')->will($this->returnValue(false)); - - return $object; - } -} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/fixture.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/fixture.php deleted file mode 100644 index cde2226b7cdd3a6e9aa320a702f66a6833788d5a..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/fixture.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -/** - * List of copy rules to feed the run() method - */ -$sourceDir = __DIR__ . '/source'; -$copyRules = array( - array( - 'source' => $sourceDir . '/frontend/package1/theme11', - 'destinationContext' => array( - 'area' => 'frontend', - 'locale' => 'not_important', - 'themePath' => 'package1/inherited_theme', - 'module' => null - ) - ), - array( - 'source' => $sourceDir . '/frontend/package1/theme12', - 'destinationContext' => array( - 'area' => 'frontend', - 'locale' => 'not_important', - 'themePath' => 'package1/theme12', - 'module' => null - ) - ), - array( - 'source' => $sourceDir . '/frontend/package2/theme21', - 'destinationContext' => array( - 'area' => 'frontend', - 'locale' => 'not_important', - 'themePath' => 'package1/inherited_theme', - 'module' => null - ) - ), - array( - 'source' => $sourceDir . '/frontend/package3/theme31', - 'destinationContext' => array( - 'area' => 'frontend', - 'locale' => 'not_important', - 'themePath' => 'package3/theme31', - 'module' => null - ) - ), - array( - 'source' => $sourceDir . '/Some_Module', - 'destinationContext' => array( - 'area' => 'adminhtml', - 'locale' => 'not_important', - 'themePath' => 'package4/theme41', - 'module' => 'Some_Module' - ) - ) -); - -// Relative expected paths, of what files must exist in destination dir, after running the tool -$expectedRelPaths = array( - 'frontend/package1/inherited_theme/Magento_Catalog/resource.png', - 'frontend/package1/inherited_theme/subdir/subdir.css', - 'frontend/package1/inherited_theme/subdir/subdir.js', - 'frontend/package1/inherited_theme/overwritten.css', - 'frontend/package1/inherited_theme/public.css', - 'frontend/package1/inherited_theme/theme21_file.js', - 'frontend/package1/theme12/theme12_file.js', - 'frontend/package3/theme31/theme31_file.css', - 'adminhtml/package4/theme41/Some_Module/theme41_file.css' -); - -// Expected file contents, so we can check overwriting and proper css expansion -$expectedFileContent = array( - 'frontend/package1/inherited_theme/overwritten.css' => 'Overwritten by next theme', - 'frontend/package1/inherited_theme/public.css' => 'a {background:url(Magento_Catalog/resource.png)}', - 'frontend/package1/inherited_theme/subdir/subdir.css' => "div {background:url(images/somefile.png)}\n" . - 'a {background:url(../Magento_Catalog/resource.png)}' -); - -// Return fixture -return array( - 'copyRules' => $copyRules, - 'expectedRelPaths' => $expectedRelPaths, - 'expectedFileContent' => $expectedFileContent -); diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/permitted.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/permitted.php deleted file mode 100644 index 94149afaa8fafcf23a0528baf03ccea9e17c6313..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/permitted.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -return array('css', 'js', 'png'); diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/permitted_cased_js.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/permitted_cased_js.php deleted file mode 100644 index 4d3092d942be2377366483a0388cfef47839cf3a..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/permitted_cased_js.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -return array('jS'); diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/Magento_Catalog/non_public b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/Magento_Catalog/non_public deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/Magento_Catalog/resource.png b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/Magento_Catalog/resource.png deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/non_public_file.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/non_public_file.php deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/non_public_file.txt b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/non_public_file.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/overwritten.css b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/overwritten.css deleted file mode 100644 index adc1f2f7a1e5300b01aa245acd4670974db2d4e3..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/overwritten.css +++ /dev/null @@ -1 +0,0 @@ -Basic css diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/public.css b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/public.css deleted file mode 100644 index 7bfffa2d74df94ea8823d784f1ef9240b97c596b..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/public.css +++ /dev/null @@ -1 +0,0 @@ -a {background:url(Magento_Catalog::resource.png)} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/subdir/subdir.css b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/subdir/subdir.css deleted file mode 100644 index 919c8940d511fb018c7e9ba7124d4d502782c677..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/subdir/subdir.css +++ /dev/null @@ -1,2 +0,0 @@ -div {background:url(images/somefile.png)} -a {background:url(Magento_Catalog::resource.png)} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/subdir/subdir.js b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/subdir/subdir.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/subdir/subdir.txt b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme11/subdir/subdir.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme12/theme12_file.js b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package1/theme12/theme12_file.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package2/theme21/overwritten.css b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package2/theme21/overwritten.css deleted file mode 100644 index bbf8c10b9b1fd6230051dd417ea493b845ea248b..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package2/theme21/overwritten.css +++ /dev/null @@ -1 +0,0 @@ -Overwritten by next theme diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package2/theme21/theme21_file.js b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package2/theme21/theme21_file.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package3/theme31/theme31_file.css b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source/frontend/package3/theme31/theme31_file.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source_cased_js/file.JS b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/source_cased_js/file.JS deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/fixture_themes.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/fixture_themes.php deleted file mode 100644 index 169a10a916574ab9866c68c4ba1543cfa46b03ce..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/fixture_themes.php +++ /dev/null @@ -1,157 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -$themeOne = new \Magento\Framework\Object(array('area' => 'area_one', 'theme_path' => 'fixture/theme_one')); -$themeTwo = new \Magento\Framework\Object(array('area' => 'area_one', 'theme_path' => 'fixture/theme_two')); -$themeThree = new \Magento\Framework\Object(array('area' => 'area_two', 'theme_path' => 'fixture/theme_three')); -$themeFour = new \Magento\Framework\Object(array('area' => 'area_two', 'theme_path' => 'fixture/theme_four')); - -return array( - 'theme_customizing_one_module' => array( - 'theme' => $themeOne, - 'pattern_dir_map' => array( - array(array('area' => 'area_one', 'theme' => $themeOne), array('/base/dir/area_one/fixture/theme_one')), - array( - array( - 'area' => 'area_one', - 'theme' => $themeOne, - 'namespace' => '%namespace%', - 'module' => '%module%' - ), - array('/base/dir/area_one/fixture/theme_one/%namespace%_%module%') - ) - ), - 'filesystem_glob_map' => array( - array( - '*_*', - '/base/dir/area_one/fixture/theme_one/', - array('/base/dir/area_one/fixture/theme_one/Magento_Core') - ) - ), - 'expected_result' => array( - array( - 'source' => '/base/dir/area_one/fixture/theme_one/Magento_Core', - 'destinationContext' => array( - 'area' => 'area_one', - 'themePath' => 'fixture/theme_one', - 'locale' => null, - 'module' => 'Magento_Core' - ) - ), - array( - 'source' => '/base/dir/area_one/fixture/theme_one', - 'destinationContext' => array( - 'area' => 'area_one', - 'themePath' => 'fixture/theme_one', - 'locale' => null, - 'module' => null - ) - ) - ) - ), - 'theme_customizing_two_modules' => array( - 'theme' => $themeTwo, - 'pattern_dir_map' => array( - array(array('area' => 'area_one', 'theme' => $themeTwo), array('/base/dir/area_one/fixture/theme_two')), - array( - array( - 'area' => 'area_one', - 'theme' => $themeTwo, - 'namespace' => '%namespace%', - 'module' => '%module%' - ), - array('/base/dir/area_one/fixture/theme_two/%namespace%_%module%') - ) - ), - 'filesystem_glob_map' => array( - array( - '*_*', - '/base/dir/area_one/fixture/theme_two/', - array( - '/base/dir/area_one/fixture/theme_two/Fixture_ModuleOne', - '/base/dir/area_one/fixture/theme_two/Fixture_ModuleTwo' - ) - ) - ), - 'expected_result' => array( - array( - 'source' => '/base/dir/area_one/fixture/theme_two/Fixture_ModuleOne', - 'destinationContext' => array( - 'area' => 'area_one', - 'themePath' => 'fixture/theme_two', - 'locale' => null, - 'module' => 'Fixture_ModuleOne' - ) - ), - array( - 'source' => '/base/dir/area_one/fixture/theme_two/Fixture_ModuleTwo', - 'destinationContext' => array( - 'area' => 'area_one', - 'themePath' => 'fixture/theme_two', - 'locale' => null, - 'module' => 'Fixture_ModuleTwo' - ) - ), - array( - 'source' => '/base/dir/area_one/fixture/theme_two', - 'destinationContext' => array( - 'area' => 'area_one', - 'themePath' => 'fixture/theme_two', - 'locale' => null, - 'module' => null - ) - ) - ) - ), - 'theme_customizing_no_modules' => array( - 'theme' => $themeThree, - 'pattern_dir_map' => array( - array( - array('area' => 'area_two', 'theme' => $themeThree), - array('/base/dir/area_two/fixture/theme_three') - ), - array( - array( - 'area' => 'area_two', - 'theme' => $themeThree, - 'namespace' => '%namespace%', - 'module' => '%module%' - ), - array('/base/dir/area_two/fixture/theme_three/%namespace%_%module%') - ) - ), - 'filesystem_glob_map' => array(array('*_*', '/base/dir/area_two/fixture/theme_three/', array())), - 'expected_result' => array( - array( - 'source' => '/base/dir/area_two/fixture/theme_three', - 'destinationContext' => array( - 'area' => 'area_two', - 'themePath' => 'fixture/theme_three', - 'locale' => null, - 'module' => null - ) - ) - ) - ) -); diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/CssTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/CssTest.php new file mode 100644 index 0000000000000000000000000000000000000000..90d8303182e18a8abcfb805a2a23a06915bdbd4d --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/CssTest.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Theme\Block\Html\Head; + +class CssTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Theme\Block\Html\Head\Css + */ + protected $_block; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_assetRepo; + + protected function setUp() + { + $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $context = $this->getMock('\Magento\Framework\View\Element\Template\Context', array(), array(), '', false); + $this->_assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false); + + $context->expects($this->once()) + ->method('getAssetRepository') + ->will($this->returnValue($this->_assetRepo)); + + $this->_block = $objectManagerHelper->getObject( + '\Magento\Theme\Block\Html\Head\Css', + array('context' => $context) + ); + + $this->_block->setData('file', 'fileValue'); + } + + public function testConstructor() + { + $this->assertInstanceOf('Magento\Framework\View\Element\AbstractBlock', $this->_block); + } + + public function testGetAsset() + { + $asset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + + $this->_assetRepo->expects($this->once()) + ->method('createAsset') + ->with('fileValue') + ->will($this->returnValue($asset)); + + $this->assertSame($this->_block->getAsset(), $asset); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/LinkTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/LinkTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5fc53db59a024cc4576b6a4d6543b4ee9fa4d0f5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/LinkTest.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Theme\Block\Html\Head; + +class LinkTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Theme\Block\Html\Head\Link + */ + protected $_block; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_assetRepo; + + protected function setUp() + { + $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $context = $this->getMock('\Magento\Framework\View\Element\Template\Context', array(), array(), '', false); + $this->_assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false); + + $context->expects($this->once()) + ->method('getAssetRepository') + ->will($this->returnValue($this->_assetRepo)); + + $this->_block = $objectManagerHelper->getObject( + '\Magento\Theme\Block\Html\Head\Link', + array('context' => $context) + ); + + $this->_block->setData('url', 'urlValue'); + } + + public function testConstructor() + { + $this->assertInstanceOf('Magento\Framework\View\Element\Template', $this->_block); + } + + public function testGetAsset() + { + $asset = $this->getMock('\Magento\Framework\View\Asset\Remote', array(), array(), '', false); + + $this->_assetRepo->expects($this->once()) + ->method('createRemoteAsset') + ->with('urlValue', 'link') + ->will($this->returnValue($asset)); + + $this->assertSame($this->_block->getAsset(), $asset); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/ScriptTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/ScriptTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bbfb0aefe205cced9954fb5cf870375ce8e8dd0f --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Head/ScriptTest.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Theme\Block\Html\Head; + +class ScriptTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Theme\Block\Html\Head\Script + */ + protected $_block; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_assetRepo; + + protected function setUp() + { + $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); + $context = $this->getMock('\Magento\Framework\View\Element\Template\Context', array(), array(), '', false); + $this->_assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false); + + $context->expects($this->once()) + ->method('getAssetRepository') + ->will($this->returnValue($this->_assetRepo)); + + $this->_block = $objectManagerHelper->getObject( + '\Magento\Theme\Block\Html\Head\Script', + array('context' => $context) + ); + + $this->_block->setData('file', 'fileValue'); + } + + public function testConstructor() + { + $this->assertInstanceOf('Magento\Framework\View\Element\AbstractBlock', $this->_block); + } + + public function testGetAsset() + { + $asset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false); + + $this->_assetRepo->expects($this->once()) + ->method('createAsset') + ->with('fileValue') + ->will($this->returnValue($asset)); + + $this->assertSame($this->_block->getAsset(), $asset); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Url/Plugin/SignatureTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Url/Plugin/SignatureTest.php new file mode 100644 index 0000000000000000000000000000000000000000..af3a9ff4d093666feca36539afcd62c8c1de20cc --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Url/Plugin/SignatureTest.php @@ -0,0 +1,105 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Theme\Model\Url\Plugin; + +class SignatureTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var Signature + */ + private $object; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $config; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $deploymentVersion; + + /** + * @var callable + */ + private $closureMock; + + protected function setUp() + { + $this->config = $this->getMock('Magento\Framework\View\Url\ConfigInterface'); + $this->deploymentVersion = $this->getMock( + 'Magento\Framework\App\View\Deployment\Version', array(), array(), '', false + ); + $this->closureMock = function () { + return 'http://127.0.0.1/magento/pub/static/'; + }; + $this->object = new Signature($this->config, $this->deploymentVersion); + } + + /** + * @param bool|int $fixtureConfigFlag + * @param string $inputUrlType + * @dataProvider aroundGetBaseUrlInactiveDataProvider + */ + public function testAroundGetBaseUrlInactive($fixtureConfigFlag, $inputUrlType) + { + $this->config + ->expects($this->any()) + ->method('getValue') + ->with(Signature::XML_PATH_STATIC_FILE_SIGNATURE) + ->will($this->returnValue($fixtureConfigFlag)) + ; + $this->deploymentVersion->expects($this->never())->method($this->anything()); + + $url = $this->getMockForAbstractClass('\Magento\Framework\Url\ScopeInterface'); + $actualResult = $this->object->aroundGetBaseUrl($url, $this->closureMock, $inputUrlType); + $this->assertEquals('http://127.0.0.1/magento/pub/static/', $actualResult); + } + + public function aroundGetBaseUrlInactiveDataProvider() + { + return array( + 'disabled in config, relevant URL type' => array(0, \Magento\Framework\UrlInterface::URL_TYPE_STATIC), + 'enabled in config, irrelevant URL type' => array(1, \Magento\Framework\UrlInterface::URL_TYPE_LINK), + ); + } + + public function testAroundGetBaseUrlActive() + { + $this->config + ->expects($this->once()) + ->method('getValue') + ->with(Signature::XML_PATH_STATIC_FILE_SIGNATURE) + ->will($this->returnValue(1)) + ; + $this->deploymentVersion->expects($this->once())->method('getValue')->will($this->returnValue('123')); + + $url = $this->getMockForAbstractClass('\Magento\Framework\Url\ScopeInterface'); + $actualResult = $this->object->aroundGetBaseUrl( + $url, $this->closureMock, \Magento\Framework\UrlInterface::URL_TYPE_STATIC + ); + $this->assertEquals('http://127.0.0.1/magento/pub/static/version123/', $actualResult); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php index a20867c8e4bc9615df3eda2d6ae67877c2d7f469..70ecf4554c27378031b3c058e86dd874ec7dcd35 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php @@ -111,9 +111,9 @@ class StorageTest extends \PHPUnit_Framework_TestCase */ public function testUploadFile() { - $uplaoder = $this->_prepareUploader(); + $uploader = $this->_prepareUploader(); - $uplaoder->expects($this->once())->method('save')->will($this->returnValue(array('not_empty'))); + $uploader->expects($this->once())->method('save')->will($this->returnValue(array('not_empty'))); $this->_helperStorage->expects( $this->once() @@ -474,10 +474,9 @@ class StorageTest extends \PHPUnit_Framework_TestCase $storagePath = $this->_storageRoot; $imagePath = $storagePath . '/' . $image; - $session = $this->getMock('Magento\Backend\Model\Session', array('getStoragePath'), array(), '', false); - $session->expects($this->atLeastOnce())->method('getStoragePath')->will($this->returnValue($storagePath)); - - $this->_helperStorage->expects($this->atLeastOnce())->method('getSession')->will($this->returnValue($session)); + $this->_helperStorage->expects($this->once()) + ->method('getCurrentPath') + ->will($this->returnValue($this->_storageRoot)); $this->_helperStorage->expects( $this->atLeastOnce() diff --git a/dev/tests/unit/testsuite/Magento/Ups/Model/CarrierTest.php b/dev/tests/unit/testsuite/Magento/Ups/Model/CarrierTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fea4e40ca618eab956a2f7d23c5603a5e2cca168 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Ups/Model/CarrierTest.php @@ -0,0 +1,134 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Ups\Model; + +class CarrierTest extends \PHPUnit_Framework_TestCase +{ + const FREE_METHOD_NAME = 'free_method'; + + const PAID_METHOD_NAME = 'paid_method'; + + /** + * Model under test + * + * @var \Magento\Framework\App\Config\ScopeConfigInterface|PHPUnit_Framework_MockObject_MockObject + */ + protected $config; + + /** + * Model under test + * + * @var \Magento\Ups\Model\Carrier + */ + protected $model; + + protected function setUp() + { + $this->config = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface'); + $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->model = $helper->getObject( + '\Magento\Ups\Model\Carrier', + array('scopeConfig'=>$this->config) + ); + } + + /** + * @dataProvider getMethodPriceProvider + * @param int $cost + * @param string $shippingMethod + * @param bool $freeShippingEnabled + * @param int $freeShippingSubtotal + * @param int $requestSubtotal + * @param int $expectedPrice + * @covers Magento\Shipping\Model\Carrier\AbstractCarrierOnline::getMethodPrice + */ + public function testGetMethodPrice( + $cost, + $shippingMethod, + $freeShippingEnabled, + $freeShippingSubtotal, + $requestSubtotal, + $expectedPrice + ) { + $path = 'carriers/' . $this->model->getCarrierCode() . '/'; + $this->config->expects($this->any())->method('isSetFlag')->with($path . 'free_shipping_enable')->will( + $this->returnValue($freeShippingEnabled) + ); + $this->config->expects($this->any())->method('getValue')->will($this->returnValueMap(array( + array( + $path . 'free_method', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + null, + self::FREE_METHOD_NAME + ), + array( + $path . 'free_shipping_subtotal', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + null, + $freeShippingSubtotal + ) + ))); + $request = new \Magento\Sales\Model\Quote\Address\RateRequest(); + $request->setBaseSubtotalInclTax($requestSubtotal); + $this->model->setRawRequest($request); + $price = $this->model->getMethodPrice($cost, $shippingMethod); + $this->assertEquals($expectedPrice, $price); + } + + /** + * Data provider for testGenerate method + * + * @return array + */ + public function getMethodPriceProvider() + { + return array( + array(3, self::FREE_METHOD_NAME, true, 5, 6, 0), + array(3, self::FREE_METHOD_NAME, true, 5, 4, 3), + array(3, self::FREE_METHOD_NAME, false, 5, 6, 3), + array(3, self::FREE_METHOD_NAME, false, 5, 4, 3), + array(3, self::PAID_METHOD_NAME, true, 5, 6, 3), + array(3, self::PAID_METHOD_NAME, true, 5, 4, 3), + array(3, self::PAID_METHOD_NAME, false, 5, 6, 3), + array(3, self::PAID_METHOD_NAME, false, 5, 4, 3), + array(7, self::FREE_METHOD_NAME, true, 5, 6, 0), + array(7, self::FREE_METHOD_NAME, true, 5, 4, 7), + array(7, self::FREE_METHOD_NAME, false, 5, 6, 7), + array(7, self::FREE_METHOD_NAME, false, 5, 4, 7), + array(7, self::PAID_METHOD_NAME, true, 5, 6, 7), + array(7, self::PAID_METHOD_NAME, true, 5, 4, 7), + array(7, self::PAID_METHOD_NAME, false, 5, 6, 7), + array(7, self::PAID_METHOD_NAME, false, 5, 4, 7), + array(3, self::FREE_METHOD_NAME, true, 5, 0, 3), + array(3, self::FREE_METHOD_NAME, true, 5, 0, 3), + array(3, self::FREE_METHOD_NAME, false, 5, 0, 3), + array(3, self::FREE_METHOD_NAME, false, 5, 0, 3), + array(3, self::PAID_METHOD_NAME, true, 5, 0, 3), + array(3, self::PAID_METHOD_NAME, true, 5, 0, 3), + array(3, self::PAID_METHOD_NAME, false, 5, 0, 3), + array(3, self::PAID_METHOD_NAME, false, 5, 0, 3) + ); + } + +} diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/_files/acl.xml b/dev/tests/unit/testsuite/Magento/Webapi/Model/_files/acl.xml index 73af23dcd5eac1ce1752aa63ba233ff074476ba8..731cf250b654dde83908646d970cd3efa5b2e78f 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Model/_files/acl.xml +++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/_files/acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/Magento/Framework/Acl/etc/acl.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Webapi::all"> diff --git a/dev/tools/Magento/Tools/Di/compiler.php b/dev/tools/Magento/Tools/Di/compiler.php index 59d71884e628721b0e65317bb6bb6fe668bafe25..60bfb993046b37ce17bc2ad1af88fa97867df878 100644 --- a/dev/tools/Magento/Tools/Di/compiler.php +++ b/dev/tools/Magento/Tools/Di/compiler.php @@ -54,7 +54,7 @@ try { $relationsFile = $diDir . '/relations.php'; $pluginDefFile = $diDir . '/plugins.php'; - $compilationDirs = array($rootDir . '/app/code', $rootDir . '/lib/Magento'); + $compilationDirs = array($rootDir . '/app/code', $rootDir . '/lib/internal/Magento'); /** @var Writer\WriterInterface $logWriter Writer model for success messages */ $logWriter = $opt->getOption('v') ? new Writer\Console() : new Writer\Quiet(); diff --git a/dev/tools/Magento/Tools/I18n/Code/Context.php b/dev/tools/Magento/Tools/I18n/Code/Context.php index 85312e23f567dd1bfcadac6272c081078918c6eb..32071baed7d3717ec296f8a1d80d748983630d20 100644 --- a/dev/tools/Magento/Tools/I18n/Code/Context.php +++ b/dev/tools/Magento/Tools/I18n/Code/Context.php @@ -40,7 +40,7 @@ class Context const CONTEXT_TYPE_THEME = 'theme'; - const CONTEXT_TYPE_PUB = 'pub'; + const CONTEXT_TYPE_LIB = 'lib'; /**#@-*/ @@ -64,8 +64,8 @@ class Context $type = self::CONTEXT_TYPE_THEME; $value = explode('/', $value); $value = $value[3] . '/' . $value[4]; - } elseif ($value = strstr($path, '/pub/lib/')) { - $type = self::CONTEXT_TYPE_PUB; + } elseif ($value = strstr($path, '/lib/web/')) { + $type = self::CONTEXT_TYPE_LIB; $value = ltrim($value, '/'); } else { throw new \InvalidArgumentException(sprintf('Invalid path given: "%s".', $path)); @@ -90,8 +90,8 @@ class Context case self::CONTEXT_TYPE_THEME: $path = 'app/design/' . $value; break; - case self::CONTEXT_TYPE_PUB: - $path = 'pub/lib'; + case self::CONTEXT_TYPE_LIB: + $path = 'lib/web'; break; default: throw new \InvalidArgumentException(sprintf('Invalid context given: "%s".', $type)); diff --git a/dev/tools/Magento/Tools/I18n/generator.php b/dev/tools/Magento/Tools/I18n/generator.php index 6d2d9289e08141ef78932ec9e8766de41ec9fec5..5b747682655e3e7a6e3799b2944b51a8c60b351b 100644 --- a/dev/tools/Magento/Tools/I18n/generator.php +++ b/dev/tools/Magento/Tools/I18n/generator.php @@ -56,8 +56,8 @@ try { 'paths' => array( $directory . '/app/code/', $directory . '/app/design/', - $directory . '/pub/lib/mage/', - $directory . '/pub/lib/varien/' + $directory . '/lib/web/mage/', + $directory . '/lib/web/varien/' ), 'fileMask' => '/\.(js|phtml)$/' ), diff --git a/dev/tools/Magento/Tools/Layout/xmlUpdater.php b/dev/tools/Magento/Tools/Layout/xmlUpdater.php index 538f933fdde4637fe9eb2dd9016322bf680e40ba..6f69cd8dda80f47425c3187136b4362c189bfb7a 100644 --- a/dev/tools/Magento/Tools/Layout/xmlUpdater.php +++ b/dev/tools/Magento/Tools/Layout/xmlUpdater.php @@ -25,7 +25,7 @@ $basePath = realpath(__DIR__ . '/../../../../../'); require_once $basePath . '/app/autoload.php'; require __DIR__ . '/Formatter.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array($basePath . '/lib')); +(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array($basePath . '/lib/internal')); try { $opt = new \Zend_Console_Getopt( diff --git a/dev/tools/Magento/Tools/Migration/get_aliases_map.php b/dev/tools/Magento/Tools/Migration/get_aliases_map.php index 6b7d6f42579a54b8e0399ab0b508d57a3fd3c51b..754c032cfebe88e94394d598a7641c3ed47fad78 100644 --- a/dev/tools/Magento/Tools/Migration/get_aliases_map.php +++ b/dev/tools/Magento/Tools/Migration/get_aliases_map.php @@ -49,7 +49,7 @@ require_once realpath( require_once realpath( dirname(dirname(dirname(dirname(dirname(__DIR__))))) ) . '/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php'; -require_once realpath(dirname(dirname(dirname(dirname(dirname(__DIR__)))))) . '/lib/Zend/Json.php'; +require_once realpath(dirname(dirname(dirname(dirname(dirname(__DIR__)))))) . '/lib/internal/Zend/Json.php'; $magentoBaseDir = dirname(__DIR__) . '/../../../../'; if (isset($options['p'])) { diff --git a/dev/tools/Magento/Tools/View/Deployer.php b/dev/tools/Magento/Tools/View/Deployer.php new file mode 100644 index 0000000000000000000000000000000000000000..19a6314980a839da1d6c53f82aeeb99358f74eb6 --- /dev/null +++ b/dev/tools/Magento/Tools/View/Deployer.php @@ -0,0 +1,249 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Tools\View; + +use Magento\TestFramework\Utility\Files; +use Magento\Framework\App\ObjectManagerFactory; +use Magento\Framework\App\View\Deployment\Version; + +/** + * A service for deploying Magento static view files for production mode + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class Deployer +{ + /** @var Files */ + private $filesUtil; + + /** @var ObjectManagerFactory */ + private $omFactory; + + /** @var Deployer\Log */ + private $logger; + + /** @var Version\StorageInterface */ + private $versionStorage; + + /** @var Version\GeneratorInterface */ + private $versionGenerator; + + /** @var \Magento\Framework\View\Asset\Repository */ + private $assetRepo; + + /** @var \Magento\Framework\App\View\Asset\Publisher */ + private $assetPublisher; + + /** @var bool */ + private $isDryRun; + + /** @var int */ + private $count; + + /** @var int */ + private $errorCount; + + /** + * @param Files $filesUtil + * @param Deployer\Log $logger + * @param bool $isDryRun + * @param \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage + * @param \Magento\Framework\App\View\Deployment\Version\GeneratorInterface $versionGenerator + */ + public function __construct( + Files $filesUtil, + Deployer\Log $logger, + Version\StorageInterface $versionStorage, + Version\GeneratorInterface $versionGenerator, + $isDryRun = false + ) { + $this->filesUtil = $filesUtil; + $this->logger = $logger; + $this->versionStorage = $versionStorage; + $this->versionGenerator = $versionGenerator; + $this->isDryRun = $isDryRun; + } + + /** + * Populate all static view files for specified root path and list of languages + * + * @param string $rootPath + * @param ObjectManagerFactory $omFactory + * @param array $locales + * @return void + */ + public function deploy($rootPath, ObjectManagerFactory $omFactory, array $locales) + { + $this->omFactory = $omFactory; + if ($this->isDryRun) { + $this->logger->logMessage('Dry run. Nothing will be recorded to the target directory.'); + } + $langList = implode(', ', $locales); + $this->logger->logMessage("Requested languages: {$langList}"); + $libFiles = $this->filesUtil->getStaticLibraryFiles(); + list($areas, $appFiles) = $this->collectAppFiles($locales); + foreach ($areas as $area => $themes) { + $this->emulateApplicationArea($rootPath, $area); + foreach ($locales as $locale) { + foreach ($themes as $themePath) { + $this->logger->logMessage("=== {$area} -> {$themePath} -> {$locale} ==="); + $this->count = 0; + $this->errorCount = 0; + foreach ($appFiles as $info) { + list($fileArea, $fileThemePath, , $module, $filePath) = $info; + $this->deployAppFile($area, $fileArea, $themePath, $fileThemePath, $locale, $module, $filePath); + } + foreach ($libFiles as $filePath) { + $this->deployFile($filePath, $area, $themePath, $locale, null); + } + $this->logger->logMessage("\nSuccessful: {$this->count} files; errors: {$this->errorCount}\n---\n"); + } + } + } + $version = $this->versionGenerator->generate(); + $this->logger->logMessage("New version of deployed files: {$version}"); + if (!$this->isDryRun) { + $this->versionStorage->save($version); + } + } + + /** + * Accumulate all static view files in the application and record all found areas, themes and languages + * + * Returns an array of areas and files with meta information + * + * @param array $requestedLocales + * @return array + */ + private function collectAppFiles($requestedLocales) + { + $areas = []; + $locales = []; + $files = $this->filesUtil->getStaticPreProcessingFiles(); + foreach ($files as $info) { + list($area, $themePath, $locale) = $info; + if ($themePath) { + $areas[$area][$themePath] = $themePath; + } + if ($locale) { + $locales[$locale] = $locale; + } + } + foreach ($requestedLocales as $locale) { + unset($locales[$locale]); + } + if (!empty($locales)) { + $langList = implode(', ', $locales); + $this->logger->logMessage( + "WARNING: there were files for the following languages detected in the file system: {$langList}." + . ' These languages were not requested, so the files will not be populated.' + ); + } + + return [$areas, $files]; + } + + /** + * Emulate application area and various services that are necessary for populating files + * + * @param string $rootPath + * @param string $areaCode + * @return void + */ + private function emulateApplicationArea($rootPath, $areaCode) + { + $objectManager = $this->omFactory->create( + $rootPath, + [\Magento\Framework\App\State::PARAM_MODE => \Magento\Framework\App\State::MODE_DEFAULT] + ); + /** @var \Magento\Framework\App\State $appState */ + $appState = $objectManager->get('Magento\Framework\App\State'); + $appState->setAreaCode($areaCode); + /** @var \Magento\Framework\App\ObjectManager\ConfigLoader $configLoader */ + $configLoader = $objectManager->get('Magento\Framework\App\ObjectManager\ConfigLoader'); + $objectManager->configure($configLoader->load($areaCode)); + $this->assetRepo = $objectManager->get('Magento\Framework\View\Asset\Repository'); + $this->assetPublisher = $objectManager->get('Magento\Framework\App\View\Asset\Publisher'); + } + + /** + * Deploy a static view file that belongs to the application + * + * @param string $area + * @param string $fileArea + * @param string $themePath + * @param string $fileThemePath + * @param string $locale + * @param string $module + * @param string $filePath + * @return void + */ + private function deployAppFile($area, $fileArea, $themePath, $fileThemePath, $locale, $module, $filePath) + { + if ($fileArea && $fileArea != $area) { + return; + } + if ($fileThemePath && $fileThemePath != $themePath) { + return; + } + $this->deployFile($filePath, $area, $themePath, $locale, $module); + } + + /** + * Deploy a static view file + * + * @param string $filePath + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @return void + */ + private function deployFile($filePath, $area, $themePath, $locale, $module) + { + $requestedPath = $filePath; + if (substr($filePath, -5) == '.less') { + $requestedPath = preg_replace('/.less$/', '.css', $filePath); + } + $logModule = $module ? "<{$module}>" : (null === $module ? '<lib>' : '<theme>'); + try { + $asset = $this->assetRepo->createAsset( + $requestedPath, + ['area' => $area, 'theme' => $themePath, 'locale' => $locale, 'module' => $module] + ); + $this->logger->logDebug("{$logModule} {$filePath} -> {$asset->getPath()}"); + if ($this->isDryRun) { + $asset->getContent(); + } else { + $this->assetPublisher->publish($asset); + } + $this->count++; + } catch (\Exception $e) { + $this->logger->logError("{$logModule} {$filePath}"); + $this->logger->logDebug((string)$e); + $this->errorCount++; + } + } +} diff --git a/dev/tools/Magento/Tools/View/Generator/ThemeLight.php b/dev/tools/Magento/Tools/View/Deployer/Log.php similarity index 51% rename from dev/tools/Magento/Tools/View/Generator/ThemeLight.php rename to dev/tools/Magento/Tools/View/Deployer/Log.php index 27cc2103cc90e4578629f72d30de935d9648d856..5fb7b1356c7347da351f2ad289acf49bf4c333a2 100644 --- a/dev/tools/Magento/Tools/View/Generator/ThemeLight.php +++ b/dev/tools/Magento/Tools/View/Deployer/Log.php @@ -21,68 +21,71 @@ * @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) */ -namespace Magento\Tools\View\Generator; -use Magento\Framework\View\Design\ThemeInterface; +namespace Magento\Tools\View\Deployer; /** - * Lightweight theme that implements minimal required interface + * An echo-logger with separating types of messages */ -class ThemeLight extends \Magento\Framework\Object implements ThemeInterface +class Log { - /** - * {@inheritdoc} - */ - public function getArea() - { - return $this->getData('area'); - } - - /** - * {@inheritdoc} + /**#@+ + * Bitmasks for verbosity level */ - public function getThemePath() - { - return $this->getData('theme_path'); - } + const SILENT = 0; + const ERROR = 1; + const DEBUG = 2; + /**#@-*/ /** - * {@inheritdoc} + * @var int */ - public function getFullPath() - { - return $this->getArea() . ThemeInterface::PATH_SEPARATOR . $this->getThemePath(); - } + private $verbosity; /** - * {@inheritdoc} + * @param int $verbosity */ - public function getParentTheme() + public function __construct($verbosity) { - return $this->getData('parent_theme'); + $this->verbosity = (int)$verbosity; } /** - * {@inheritdoc} + * Log anything + * + * @param string $msg + * @return void */ - public function getCode() + public function logMessage($msg) { - return (string)$this->getData('code'); + if ($this->verbosity !== self::SILENT) { + echo "{$msg}\n"; + } } /** - * {@inheritdoc} + * Log an error + * + * @param string $msg + * @return void */ - public function isPhysical() + public function logError($msg) { - return false; + if ($this->verbosity & self::ERROR) { + echo "ERROR: {$msg}\n"; + } } /** - * {@inheritdoc} + * Log a debug message + * + * @param string $msg + * @return void */ - public function getInheritedThemes() + public function logDebug($msg) { - return array(); + if ($this->verbosity & self::DEBUG) { + echo "{$msg}\n"; + } } } diff --git a/dev/tools/Magento/Tools/View/Generator/Config.php b/dev/tools/Magento/Tools/View/Generator/Config.php deleted file mode 100644 index 373426fd58aa35ba2ce6b3ad5ea609619d941b11..0000000000000000000000000000000000000000 --- a/dev/tools/Magento/Tools/View/Generator/Config.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -/** - * Parses, verifies and stores command-line parameters - */ -namespace Magento\Tools\View\Generator; - -class Config -{ - /** - * @var string - */ - private $_sourceDir; - - /** - * @var string - */ - private $_destinationDir; - - /** - * @var bool - */ - private $_isDryRun; - - /** - * @param \Magento\Framework\App\Filesystem $filesystem - * @param array $cmdOptions - * @param array $allowedFiles Non-generated files delivered with the application, - * so allowed to be present in the publication directory - * @throws \Magento\Framework\Exception - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - array $cmdOptions, - $allowedFiles = array() - ) { - $rootDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); - $sourceDir = isset($cmdOptions['source']) ? $cmdOptions['source'] : $rootDirectory->getAbsolutePath(); - if (!$rootDirectory->isDirectory($rootDirectory->getRelativePath($sourceDir))) { - throw new \Magento\Framework\Exception('Source directory does not exist: ' . $sourceDir); - } - - if (isset($cmdOptions['destination'])) { - $destinationDir = $cmdOptions['destination']; - } else { - $destinationDir = $filesystem->getPath(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); - } - $destinationDirRelative = $rootDirectory->getRelativePath($destinationDir); - if (!$rootDirectory->isDirectory($destinationDirRelative)) { - throw new \Magento\Framework\Exception('Destination directory does not exist: ' . $destinationDir); - } - foreach ($allowedFiles as $k => $allowedFile) { - $allowedFiles[$k] = $destinationDirRelative . '/' . $allowedFile; - } - if (array_diff($rootDirectory->read($destinationDirRelative), $allowedFiles)) { - throw new \Magento\Framework\Exception("Destination directory must be empty: {$destinationDir}"); - } - - $isDryRun = isset($cmdOptions['dry-run']); - - // Assign to internal values - $this->_sourceDir = $sourceDir; - $this->_destinationDir = $destinationDir; - $this->_isDryRun = $isDryRun; - } - - /** - * Return configured source path - * - * @return string - */ - public function getSourceDir() - { - return $this->_sourceDir; - } - - /** - * Return configured destination path - * - * @return string - */ - public function getDestinationDir() - { - return $this->_destinationDir; - } - - /** - * Return, whether dry run is turned on - * - * @return bool - */ - public function isDryRun() - { - return $this->_isDryRun; - } -} diff --git a/dev/tools/Magento/Tools/View/Generator/CopyRule.php b/dev/tools/Magento/Tools/View/Generator/CopyRule.php deleted file mode 100644 index d2327a0a3ccc01f41ac9edce323c22cb1a81d8fb..0000000000000000000000000000000000000000 --- a/dev/tools/Magento/Tools/View/Generator/CopyRule.php +++ /dev/null @@ -1,177 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -/** - * Generator of rules which and where folders from code base should be copied - */ -namespace Magento\Tools\View\Generator; - -class CopyRule -{ - /** - * @var \Magento\Framework\App\Filesystem - */ - private $_filesystem; - - /** - * @var \Magento\Core\Model\Theme\Collection - */ - private $_themes; - - /** - * @var \Magento\Framework\View\Design\Fallback\Rule\RuleInterface - */ - private $_fallbackRule; - - /** - * PCRE matching a named placeholder - * - * @var string - */ - private $_placeholderPcre = '#%(.+?)%#'; - - /** - * Constructor - * - * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Core\Model\Theme\Collection $themes - * @param \Magento\Framework\View\Design\Fallback\Rule\RuleInterface $fallbackRule - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Core\Model\Theme\Collection $themes, - \Magento\Framework\View\Design\Fallback\Rule\RuleInterface $fallbackRule - ) { - $this->_filesystem = $filesystem; - $this->_themes = $themes; - $this->_fallbackRule = $fallbackRule; - } - - /** - * Get rules for copying static view files - * returns array( - * array('source' => <Absolute Source Path>, 'destinationContext' => <Destination Path Context>), - * ...... - * ) - * - * @return array - */ - public function getCopyRules() - { - $result = array(); - /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ - foreach ($this->_themes as $theme) { - $area = $theme->getArea(); - $nonModularLocations = $this->_fallbackRule->getPatternDirs(array('area' => $area, 'theme' => $theme)); - $modularLocations = $this->_fallbackRule->getPatternDirs( - array( - 'area' => $area, - 'theme' => $theme, - 'namespace' => $this->_composePlaceholder('namespace'), - 'module' => $this->_composePlaceholder('module') - ) - ); - $allDirPatterns = array_merge(array_reverse($modularLocations), array_reverse($nonModularLocations)); - foreach ($allDirPatterns as $pattern) { - foreach ($this->_getMatchingDirs($pattern) as $srcDir) { - $paramsFromDir = $this->_parsePlaceholders($srcDir, $pattern); - if (!empty($paramsFromDir['namespace']) && !empty($paramsFromDir['module'])) { - $module = $paramsFromDir['namespace'] . '_' . $paramsFromDir['module']; - } else { - $module = null; - } - - $destinationContext = array( - 'area' => $area, - 'themePath' => $theme->getThemePath(), - 'locale' => null, // Temporary locale is not taken into account - 'module' => $module - ); - - $result[] = array('source' => $srcDir, 'destinationContext' => $destinationContext); - } - } - } - return $result; - } - - /** - * Compose a named placeholder that does not require escaping when directly used in a PCRE - * - * @param string $name - * @return string - */ - private function _composePlaceholder($name) - { - return '%' . $name . '%'; - } - - /** - * Retrieve absolute directory paths matching a pattern with placeholders - * - * @param string $dirPattern - * @return array - */ - private function _getMatchingDirs($dirPattern) - { - $dirPattern = preg_replace($this->_placeholderPcre, '*', $dirPattern, -1, $placeholderCount); - $directoryHandler = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - if ($placeholderCount) { - // autodetect pattern base directory because the filesystem interface requires it - $firstPlaceholderPos = strpos($dirPattern, '*'); - $patternBaseDir = substr($dirPattern, 0, $firstPlaceholderPos); - $patternTrailing = substr($dirPattern, $firstPlaceholderPos); - - $paths = $directoryHandler->search($patternTrailing, $patternBaseDir); - } else { - // pattern is already a valid path containing no placeholders - $paths = array($directoryHandler->getRelativePath($dirPattern)); - } - $result = array(); - foreach ($paths as $path) { - $path = $directoryHandler->getRelativePath($path); - if ($directoryHandler->isDirectory($path)) { - $result[] = $directoryHandler->getAbsolutePath($path); - } - } - return $result; - } - - /** - * Retrieve placeholder values - * - * @param string $subject - * @param string $pattern - * @return array - */ - private function _parsePlaceholders($subject, $pattern) - { - $pattern = preg_quote($pattern, '#'); - $parserPcre = '#^' . preg_replace($this->_placeholderPcre, '(?P<\\1>.+?)', $pattern) . '$#'; - if (preg_match($parserPcre, $subject, $placeholders)) { - return $placeholders; - } - return array(); - } -} diff --git a/dev/tools/Magento/Tools/View/Generator/ThemeDeployment.php b/dev/tools/Magento/Tools/View/Generator/ThemeDeployment.php deleted file mode 100644 index 6e315c674d360e08a136ad34daa58b912518d0db..0000000000000000000000000000000000000000 --- a/dev/tools/Magento/Tools/View/Generator/ThemeDeployment.php +++ /dev/null @@ -1,307 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Tools\View\Generator; - -/** - * Transformation of files, which must be copied to new location and its contents processed - */ -class ThemeDeployment -{ - /** - * Helper to process CSS content and fix urls - * - * @var \Magento\Framework\View\Url\CssResolver - */ - private $_cssUrlResolver; - - /** - * Destination dir, where files will be copied to - * - * @var string - */ - private $_destinationHomeDir; - - /** - * List of extensions for files, which should be deployed. - * For efficiency it is a map of ext => ext, so lookup by hash is possible. - * - * @var array - */ - private $_permitted = array(); - - /** - * List of extensions for files, which must not be deployed - * For efficiency it is a map of ext => ext, so lookup by hash is possible. - * - * @var array - */ - private $_forbidden = array(); - - /** - * Whether to actually do anything inside the filesystem - * - * @var bool - */ - private $_isDryRun; - - /** - * @var \Magento\Framework\App\State - */ - private $appState; - - /** - * @var \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface - */ - private $preProcessor; - - /** - * @var \Magento\Framework\View\Publisher\FileFactory - */ - private $fileFactory; - - /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface - */ - private $tmpDirectory; - - /** - * Constructor - * - * @param \Magento\Framework\View\Url\CssResolver $cssUrlResolver - * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface $preProcessor - * @param \Magento\Framework\View\Publisher\FileFactory $fileFactory - * @param \Magento\Framework\App\State $appState - * @param \Magento\Core\Model\Theme\DataFactory $themeFactory - * @param string $destinationHomeDir - * @param string $configPermitted - * @param string|null $configForbidden - * @param bool $isDryRun - * @throws \Magento\Framework\Exception - * @SuppressWarnings(PHPMD.ExcessiveParameterList) - */ - public function __construct( - \Magento\Framework\View\Url\CssResolver $cssUrlResolver, - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface $preProcessor, - \Magento\Framework\View\Publisher\FileFactory $fileFactory, - \Magento\Framework\App\State $appState, - \Magento\Core\Model\Theme\DataFactory $themeFactory, - $destinationHomeDir, - $configPermitted, - $configForbidden = null, - $isDryRun = false - ) { - $this->themeFactory = $themeFactory; - $this->appState = $appState; - $this->preProcessor = $preProcessor; - $this->tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); - $this->fileFactory = $fileFactory; - $this->_cssUrlResolver = $cssUrlResolver; - $this->_destinationHomeDir = $destinationHomeDir; - $this->_isDryRun = $isDryRun; - $this->_permitted = $this->_loadConfig($configPermitted); - if ($configForbidden) { - $this->_forbidden = $this->_loadConfig($configForbidden); - } - $conflicts = array_intersect($this->_permitted, $this->_forbidden); - if ($conflicts) { - $message = 'Conflicts: the following extensions are added both to permitted and forbidden lists: %s'; - throw new \Magento\Framework\Exception(sprintf($message, implode(', ', $conflicts))); - } - } - - /** - * Load config with file extensions - * - * @param string $path - * @return array - * @throws \Magento\Framework\Exception - */ - protected function _loadConfig($path) - { - if (!file_exists($path)) { - throw new \Magento\Framework\Exception("Config file does not exist: {$path}"); - } - - $contents = include $path; - $contents = array_unique($contents); - $contents = array_map('strtolower', $contents); - $contents = $contents ? array_combine($contents, $contents) : array(); - return $contents; - } - - /** - * Copy all the files according to $copyRules - * - * @param array $copyRules - * @return void - */ - public function run($copyRules) - { - foreach ($copyRules as $copyRule) { - $destinationContext = $copyRule['destinationContext']; - $context = array('source' => $copyRule['source'], 'destinationContext' => $destinationContext); - - $destDir = \Magento\Framework\View\DeployedFilesManager::buildDeployedFilePath( - $destinationContext['area'], - $destinationContext['themePath'], - '', - $destinationContext['module'] - ); - $destDir = rtrim($destDir, '\\/'); - - $this->_copyDirStructure($copyRule['source'], $this->_destinationHomeDir . '/' . $destDir, $context); - } - } - - /** - * Copy dir structure and files from $sourceDir to $destinationDir - * - * @param string $sourceDir - * @param string $destinationDir - * @param array $context - * @return void - * @throws \Magento\Framework\Exception - */ - protected function _copyDirStructure($sourceDir, $destinationDir, $context) - { - $files = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($sourceDir, \RecursiveDirectoryIterator::SKIP_DOTS) - ); - foreach ($files as $fileSource) { - $fileSource = (string)$fileSource; - $extension = strtolower(pathinfo($fileSource, PATHINFO_EXTENSION)); - if ($extension == 'less') { - $fileSource = preg_replace('/\.less$/', '.css', $fileSource); - } - $localPath = substr($fileSource, strlen($sourceDir) + 1); - $themeModel = $this->themeFactory->create( - array( - 'data' => array( - 'theme_path' => $context['destinationContext']['themePath'], - 'area' => $context['destinationContext']['area'] - ) - ) - ); - $fileObject = $this->fileFactory->create( - $localPath, - array_merge($context['destinationContext'], array('themeModel' => $themeModel)), - $fileSource - ); - /** @var \Magento\Framework\View\Publisher\FileAbstract $fileObject */ - $fileObject = $this->appState->emulateAreaCode( - $context['destinationContext']['area'], - array($this->preProcessor, 'process'), - array($fileObject, $this->tmpDirectory) - ); - - if ($fileObject->getSourcePath()) { - $fileSource = $fileObject->getSourcePath(); - } - - if (isset($this->_forbidden[$extension])) { - continue; - } - - if (!isset($this->_permitted[$extension])) { - $message = sprintf( - 'The file extension "%s" must be added either to the permitted or forbidden list. File: %s', - $extension, - $fileSource - ); - throw new \Magento\Framework\Exception($message); - } - - if (file_exists($fileSource)) { - $fileDestination = $destinationDir . '/' . $localPath; - $this->_deployFile($fileSource, $fileDestination, $context); - } - } - } - - /** - * Deploy file to the destination path, also processing modular paths inside css-files. - * - * @param string $fileSource - * @param string $fileDestination - * @param array $context - * @return void - * @throws \Magento\Framework\Exception - */ - protected function _deployFile($fileSource, $fileDestination, $context) - { - // Create directory - $destFileDir = dirname($fileDestination); - if (!is_dir($destFileDir) && !$this->_isDryRun) { - mkdir($destFileDir, 0777, true); - } - - // Copy file - $extension = pathinfo($fileSource, PATHINFO_EXTENSION); - if (strtolower($extension) == 'css') { - // For CSS files we need to process content and fix urls - // Callback to resolve relative urls to the file names - $destContext = $context['destinationContext']; - $destHomeDir = $this->_destinationHomeDir; - $callback = function ($relativeUrl) use ($destContext, $destFileDir, $destHomeDir) { - $parts = explode(\Magento\Framework\View\Service::SCOPE_SEPARATOR, $relativeUrl); - if (count($parts) == 2) { - list($module, $file) = $parts; - if (!strlen($module) || !strlen($file)) { - throw new \Magento\Framework\Exception("Wrong module url: {$relativeUrl}"); - } - $relPath = \Magento\Framework\View\DeployedFilesManager::buildDeployedFilePath( - $destContext['area'], - $destContext['themePath'], - $file, - $module - ); - - $result = $destHomeDir . '/' . $relPath; - } else { - $result = $destFileDir . '/' . $relativeUrl; - } - return $result; - }; - - // Replace relative urls and write the modified content (if not dry run) - $content = file_get_contents($fileSource); - $content = $this->_cssUrlResolver->replaceCssRelativeUrls( - $content, - $fileSource, - $fileDestination, - $callback - ); - - if (!$this->_isDryRun) { - file_put_contents($fileDestination, $content); - } - } else { - if (!$this->_isDryRun) { - copy($fileSource, $fileDestination); - } - } - } -} diff --git a/dev/tools/Magento/Tools/View/deploy.php b/dev/tools/Magento/Tools/View/deploy.php new file mode 100644 index 0000000000000000000000000000000000000000..f0735222f46a0fd92aa09af9bd966c0cd276c27b --- /dev/null +++ b/dev/tools/Magento/Tools/View/deploy.php @@ -0,0 +1,74 @@ +<?php +/** + * A script for deploying static view files for Magento system "production mode" + * + * The resulting files will be recorded into pub/static directory. + * They can be used not only by the server where Magento instance is, + * but also can be copied to a CDN, and the Magento instance may be configured to generate base URL to the CDN. + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +$baseName = basename(__FILE__); +$options = getopt('', array('langs::', 'dry-run', 'verbose::', 'help')); +define('USAGE', "USAGE:\n\tphp -f {$baseName} -- [--langs=en_US,de_DE,...] [--verbose=0|1] [--dry-run] [--help]\n"); +define('BARE_BOOTSTRAP', 1); +require __DIR__ . '/../../../../../app/bootstrap.php'; +$autoloader = new \Magento\Framework\Autoload\IncludePath(); +$autoloader->addIncludePath([BP . '/dev/tests/static/framework', realpath(__DIR__ . '/../../..')]); + +// parse all options +if (isset($options['help'])) { + echo USAGE; + exit(0); +} +$langs = ['en_US']; +if (isset($options['langs'])) { + $langs = explode(',', $options['langs']); + foreach ($langs as $lang) { + if (!preg_match('/^[a-z]{2}_[A-Z]{2}$/', $lang)) { + echo USAGE; + exit(1); + } + } +} +$isDryRun = isset($options['dry-run']); +$verbosity = \Magento\Tools\View\Deployer\Log::ERROR; +if (isset($options['verbose'])) { + $verbosity = 0 === (int)$options['verbose'] ? \Magento\Tools\View\Deployer\Log::SILENT + : \Magento\Tools\View\Deployer\Log::ERROR | \Magento\Tools\View\Deployer\Log::DEBUG; +} + +// run the deployment logic +$filesUtil = new \Magento\TestFramework\Utility\Files(BP); +$omFactory = new \Magento\Framework\App\ObjectManagerFactory(); +$objectManager = $omFactory->create( + BP, + [\Magento\Framework\App\State::PARAM_MODE => \Magento\Framework\App\State::MODE_DEFAULT] +); +$logger = new \Magento\Tools\View\Deployer\Log($verbosity); +/** @var \Magento\Tools\View\Deployer $deployer */ +$deployer = $objectManager->create( + 'Magento\Tools\View\Deployer', + ['filesUtil' => $filesUtil, 'logger' => $logger, 'isDryRun' => $isDryRun] +); +$deployer->deploy(BP, $omFactory, $langs); +exit(0); diff --git a/dev/tools/Magento/Tools/View/generator.php b/dev/tools/Magento/Tools/View/generator.php deleted file mode 100644 index 85c8b02b6496aec6ede60c3dd42dfa47272355ee..0000000000000000000000000000000000000000 --- a/dev/tools/Magento/Tools/View/generator.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * A command line tool that pre-populates static view files into public directory. - * In the production mode paths and URLs are to be composed without the filesystem lookup. - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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 __DIR__ . '/../../../../../app/bootstrap.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(__DIR__ . '/../../../'); - -/** - * Command line usage help - */ -define( - 'SYNOPSIS', -<<<USAGE -Usage: php -f generator.php -- [--source <dir>] [--destination <dir>] [--dry-run] - php -f generator.php -- --help - - --source <dir> Root directory to start search of static view files from. - If omitted, the application root directory is used. - - --destination <dir> Directory to copy files to. - If omitted, public location of static view files is used. - - --dry-run Do not create directories and files in a destination path. - - --help Print this usage information. - -USAGE -); - -$logWriter = new \Zend_Log_Writer_Stream('php://output'); -$logWriter->setFormatter(new \Zend_Log_Formatter_Simple('%message%' . PHP_EOL)); -$logger = new \Zend_Log($logWriter); - -$options = getopt('', array('help', 'dry-run', 'source:', 'destination:')); -if (isset($options['help'])) { - $logger->log(SYNOPSIS, \Zend_Log::INFO); - exit(0); -} - -$logger->log('Deploying...', \Zend_Log::INFO); -try { - - $objectManagerFactory = new \Magento\Framework\App\ObjectManagerFactory(); - $objectManager = $objectManagerFactory->create(BP, $_SERVER, false); - - $config = $objectManager->create( - 'Magento\Tools\View\Generator\Config', - array('cmdOptions' => $options, 'allowedFiles' => array('.htaccess')) - ); - $themes = $objectManager->create('Magento\Core\Model\Theme\Collection'); - $themes->setItemObjectClass('Magento\Tools\View\Generator\ThemeLight'); - $themes->addDefaultPattern('*'); - $fallbackFactory = $objectManager->create('Magento\Framework\View\Design\Fallback\Factory'); - $generator = $objectManager->create( - 'Magento\Tools\View\Generator\CopyRule', - array('themes' => $themes, 'fallbackRule' => $fallbackFactory->createViewFileRule()) - ); - $copyRules = $generator->getCopyRules(); - $deployment = $objectManager->create( - 'Magento\Tools\View\Generator\ThemeDeployment', - array( - 'destinationHomeDir' => $config->getDestinationDir(), - 'configPermitted' => __DIR__ . '/config/permitted.php', - 'configForbidden' => __DIR__ . '/config/forbidden.php', - 'isDryRun' => $config->isDryRun(), - 'preProcessor' => $objectManager->create('Magento\Framework\View\Asset\PreProcessor\Composite') - ) - ); - $deployment->run($copyRules); -} catch (\Exception $e) { - $logger->log('Error: ' . $e->getMessage(), \Zend_Log::ERR); - exit(1); -} -$logger->log('Completed successfully.', \Zend_Log::INFO); diff --git a/dev/tools/Magento/Tools/classmap/log_generator.php b/dev/tools/Magento/Tools/classmap/log_generator.php index 7e4b050ece477e6ae5afb513fca11f8bae8cc588..00b57d9fbcf9931be1c25e0d75eaff764f0f7656 100644 --- a/dev/tools/Magento/Tools/classmap/log_generator.php +++ b/dev/tools/Magento/Tools/classmap/log_generator.php @@ -44,7 +44,7 @@ foreach ($files as $file) { sort($classes); $baseDir = realpath(__DIR__ . '/../../../../../') . '/'; -$sources = array('app/code', 'lib'); +$sources = array('app/code', 'lib/internal'); $map = array(); foreach ($classes as $class) { diff --git a/dev/tools/bootstrap.php b/dev/tools/bootstrap.php index 851c4dd51fd19f6bb0181e81cb16d11104a53979..445c23378b09ca64b5b23125d542d7b779f5be52 100644 --- a/dev/tools/bootstrap.php +++ b/dev/tools/bootstrap.php @@ -26,7 +26,7 @@ define('BP', __DIR__ . '/../..'); (new \Magento\Framework\Autoload\IncludePath())->addIncludePath( array( BP . '/app/code', - BP . '/lib', + BP . '/lib/internal', ) ); diff --git a/dev/tools/layout/xml-updater.php b/dev/tools/layout/xml-updater.php index 66c64cb478622a87b121e7ea03182da0200beac1..9fdbd0fe7a89c30dfd36cb5ce68b45bb20cd7810 100644 --- a/dev/tools/layout/xml-updater.php +++ b/dev/tools/layout/xml-updater.php @@ -26,7 +26,7 @@ require_once $basePath . '/app/autoload.php'; require __DIR__ . '/Formatter.php'; (new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array( - $basePath . '/lib', + $basePath . '/lib/internal', )); try{ diff --git a/downloader/app/Magento/Downloader/Connect.php b/downloader/app/Magento/Downloader/Connect.php index 9eade1fae8212f27beac9ed826a7a387ad008eb9..1fdc91e02aa3414972cdc7dab75b08ed466212ed 100644 --- a/downloader/app/Magento/Downloader/Connect.php +++ b/downloader/app/Magento/Downloader/Connect.php @@ -28,7 +28,7 @@ error_reporting(E_ALL & ~E_NOTICE); // add Magento lib in include_path if needed $_includePath = get_include_path(); -$_libDir = dirname(__DIR__) . '/lib'; +$_libDir = dirname(__DIR__) . '/lib/internal'; if (strpos($_includePath, $_libDir) === false) { if (substr($_includePath, 0, 2) === '.' . PATH_SEPARATOR) { $_includePath = '.' . PATH_SEPARATOR . $_libDir . PATH_SEPARATOR . substr($_includePath, 2); diff --git a/downloader/app/Magento/Downloader/Controller.php b/downloader/app/Magento/Downloader/Controller.php index 7032bcdc51b2ee144c280e33daef6568ea00a8ed..43bf5e899f8ab9eaaae002c1a864b5ac323e436d 100644 --- a/downloader/app/Magento/Downloader/Controller.php +++ b/downloader/app/Magento/Downloader/Controller.php @@ -577,7 +577,7 @@ final class Controller */ public function getVarFilename() { - return $this->getMageDir() . '/lib/Magento/Framework/Profiler.php'; + return $this->getMageDir() . '/lib/internal/Magento/Framework/Profiler.php'; } /** diff --git a/downloader/mage.php b/downloader/mage.php index 784e1a80857420632925cd1dac5df0b97da3149d..e4b230449419b05c467f58a56a0c5a86d839445d 100644 --- a/downloader/mage.php +++ b/downloader/mage.php @@ -51,7 +51,7 @@ class __cli_Magento_Connect public function setIncludes() { if (defined('DEVELOPMENT_MODE')) { - $libPath = PS . dirname(BP) . '/lib'; + $libPath = PS . dirname(BP) . '/lib/internal'; } else { $libPath = PS . BP . '/downloader/lib'; } diff --git a/downloader/target.xml b/downloader/target.xml index cb0c7bc918850190a5ea99e13000450d76cc6437..dc6789d30d36c143b124f29b0886333c3080b3c0 100644 --- a/downloader/target.xml +++ b/downloader/target.xml @@ -27,7 +27,7 @@ <target name="magecore" label="Magento module file" uri="./app/code" /> <target name="magedesign" label="Magento User Interface (layouts, templates)" uri="./app/design" /> <target name="mageetc" label="Magento Global Configuration" uri="./app/etc" /> - <target name="magelib" label="Magento PHP Library file" uri="./lib" /> + <target name="magelib" label="Magento PHP Library file" uri="./lib/internal" /> <target name="magelocale" label="Magento Locale language file" uri="./app/locale" /> <target name="magemedia" label="Magento Media library" uri="./media" /> <target name="mageweb" label="Magento Other web accessible file" uri="." /> diff --git a/lib/Magento/Framework/Code/Minifier.php b/lib/Magento/Framework/Code/Minifier.php deleted file mode 100644 index 7da1733f9f525bdd13b981aefded0be16dab2d87..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Code/Minifier.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Code; - -use Magento\Framework\Filesystem\Directory\Read; - -class Minifier -{ - /** - * @var \Magento\Framework\Code\Minifier\StrategyInterface - */ - private $_strategy; - - /** - * @var Read - */ - private $rootDirectory; - - /** - * @var string directory name where minified files are saved - */ - private $directoryName; - - /** - * @var Read - */ - private $pubViewCacheDir; - - /** - * @param \Magento\Framework\Code\Minifier\StrategyInterface $strategy - * @param \Magento\Framework\App\Filesystem $filesystem - * @param string $directoryName - */ - public function __construct( - \Magento\Framework\Code\Minifier\StrategyInterface $strategy, - \Magento\Framework\App\Filesystem $filesystem, - $directoryName - ) { - $this->_strategy = $strategy; - $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - $this->pubViewCacheDir = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR); - $this->directoryName = $directoryName; - } - - /** - * Get path to minified file - * - * @param string $originalFile - * @return bool|string - */ - public function getMinifiedFile($originalFile) - { - if ($this->_isFileMinified($originalFile)) { - return $originalFile; - } - $originalFileRelative = $this->rootDirectory->getRelativePath($originalFile); - $minifiedFile = $this->_findOriginalMinifiedFile($originalFileRelative); - if ($minifiedFile) { - return $this->rootDirectory->getAbsolutePath($minifiedFile); - } - $minifiedFile = $this->directoryName . '/' . $this->_generateMinifiedFileName($originalFile); - $this->_strategy->minifyFile($originalFileRelative, $minifiedFile); - - return $minifiedFile; - } - - /** - * Check if file is minified - * - * @param string $fileName - * @return bool - */ - protected function _isFileMinified($fileName) - { - return (bool)preg_match('#.min.\w+$#', $fileName); - } - - /** - * Generate name of the minified file - * - * @param string $originalFile - * @return string - */ - protected function _generateMinifiedFileName($originalFile) - { - $fileInfo = pathinfo($originalFile); - $minifiedName = md5($originalFile) . '_' . $fileInfo['filename'] . '.min.' . $fileInfo['extension']; - - return $minifiedName; - } - - /** - * Search for minified file provided along with the original file in the code base - * - * @param string $originalFile - * @return bool|string - */ - protected function _findOriginalMinifiedFile($originalFile) - { - $fileInfo = pathinfo($originalFile); - $minifiedFile = $fileInfo['dirname'] . '/' . $fileInfo['filename'] . '.min.' . $fileInfo['extension']; - if ($this->rootDirectory->isExist($minifiedFile)) { - return $minifiedFile; - } - return false; - } -} diff --git a/lib/Magento/Framework/Code/Minifier/Strategy/Generate.php b/lib/Magento/Framework/Code/Minifier/Strategy/Generate.php deleted file mode 100644 index 2cdc9c014fcb7889f02757f33f982afa431a3051..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Code/Minifier/Strategy/Generate.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -/** - * Minification strategy that generates minified file, if it does not exist or outdated - */ -namespace Magento\Framework\Code\Minifier\Strategy; - -use Magento\Framework\App\Filesystem; -use Magento\Framework\Filesystem\Directory\Read; -use Magento\Framework\Filesystem\Directory\Write; - -class Generate implements \Magento\Framework\Code\Minifier\StrategyInterface -{ - /** - * @var \Magento\Framework\Code\Minifier\AdapterInterface - */ - protected $adapter; - - /** - * @var Read - */ - protected $rootDirectory; - - /** - * @var Write - */ - protected $pubViewCacheDir; - - /** - * @param \Magento\Framework\Code\Minifier\AdapterInterface $adapter - * @param Filesystem $filesystem - */ - public function __construct( - \Magento\Framework\Code\Minifier\AdapterInterface $adapter, - Filesystem $filesystem - ) { - $this->adapter = $adapter; - $this->rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR); - $this->pubViewCacheDir = $filesystem->getDirectoryWrite(Filesystem::PUB_VIEW_CACHE_DIR); - } - - /** - * Get path to minified file for specified original file - * - * @param string $originalFile path to original file relative to pub/view_cache - * @param string $targetFile path relative to pub/view_cache - * @return void - */ - public function minifyFile($originalFile, $targetFile) - { - if ($this->_isUpdateNeeded($originalFile, $targetFile)) { - $content = $this->rootDirectory->readFile($originalFile); - $content = $this->adapter->minify($content); - $targetFile = $this->pubViewCacheDir->getRelativePath($targetFile); - $this->pubViewCacheDir->writeFile($targetFile, $content); - $this->pubViewCacheDir->touch($targetFile, $this->rootDirectory->stat($originalFile)['mtime']); - } - } - - /** - * Check whether minified file should be created/updated - * - * @param string $originalFile path to original file relative to pub/view_cache - * @param string $minifiedFile path relative to pub/view_cache - * @return bool - */ - protected function _isUpdateNeeded($originalFile, $minifiedFile) - { - if (!$this->pubViewCacheDir->isExist($minifiedFile)) { - return true; - } - $originalFileMtime = $this->rootDirectory->stat($originalFile)['mtime']; - $minifiedFileMtime = $this->pubViewCacheDir->stat($minifiedFile)['mtime']; - return $originalFileMtime != $minifiedFileMtime; - } -} diff --git a/lib/Magento/Framework/Code/Minifier/Strategy/Lite.php b/lib/Magento/Framework/Code/Minifier/Strategy/Lite.php deleted file mode 100644 index 312e49b373ec96ad4e2cfa67b32d22d87d5a51c9..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Code/Minifier/Strategy/Lite.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ - -/** - * Minification strategy with light-weight operations with file system - * - * TODO: eliminate dependency of an adapter and write access to file system - * TODO: Goal: provide path to existing minified file w/o its creation - */ -namespace Magento\Framework\Code\Minifier\Strategy; - -use Magento\Framework\Filesystem\Directory\Read; -use Magento\Framework\Filesystem\Directory\Write; - -class Lite implements \Magento\Framework\Code\Minifier\StrategyInterface -{ - /** - * @var \Magento\Framework\Code\Minifier\AdapterInterface - */ - protected $adapter; - - /** - * @var Write - */ - protected $pubViewCacheDir; - - /** - * @var Read - */ - protected $rootDirectory; - - /** - * @param \Magento\Framework\Code\Minifier\AdapterInterface $adapter - * @param \Magento\Framework\App\Filesystem $filesystem - */ - public function __construct( - \Magento\Framework\Code\Minifier\AdapterInterface $adapter, - \Magento\Framework\App\Filesystem $filesystem - ) { - $this->adapter = $adapter; - $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - $this->pubViewCacheDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR); - } - - /** - * Get path to minified file for specified original file - * - * @param string $originalFile path to original file relative to pub/view_cache - * @param string $targetFile path relative to pub/view_cache - * @return void - */ - public function minifyFile($originalFile, $targetFile) - { - if ($this->_isUpdateNeeded($targetFile)) { - $content = $this->rootDirectory->readFile($originalFile); - $content = $this->adapter->minify($content); - $this->pubViewCacheDir->writeFile($targetFile, $content); - } - } - - /** - * Check whether minified file should be created - * - * @param string $minifiedFile path relative to pub/view_cache - * @return bool - */ - protected function _isUpdateNeeded($minifiedFile) - { - return !$this->pubViewCacheDir->isExist($minifiedFile); - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/CacheFactory.php b/lib/Magento/Framework/Css/PreProcessor/Cache/CacheFactory.php deleted file mode 100644 index b2bd05c60ab4f7bd11e45dd06697a71391e9b727..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/CacheFactory.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache; - -use Magento\Framework\Css\PreProcessor\Cache\Import\Cache; - -/** - * Cache manager factory - */ -class CacheFactory -{ - /** - * @var array - */ - protected $cacheTypes = array(Cache::IMPORT_CACHE => 'Magento\Framework\Css\PreProcessor\Cache\Import\Cache'); - - /** - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * @param \Magento\Framework\ObjectManager $objectManager - */ - public function __construct(\Magento\Framework\ObjectManager $objectManager) - { - $this->objectManager = $objectManager; - } - - /** - * @param string $cacheType - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @return CacheInterface - * @throws \InvalidArgumentException - */ - public function create($cacheType, $publisherFile) - { - if (!isset($this->cacheTypes[$cacheType])) { - throw new \InvalidArgumentException(sprintf('No cache type registered for "%s" type.', $cacheType)); - } - - /** @var CacheInterface $cacheManager */ - $cacheManager = $this->objectManager->create( - $this->cacheTypes[$cacheType], - array('publisherFile' => $publisherFile) - ); - - if (!$cacheManager instanceof CacheInterface) { - throw new \InvalidArgumentException( - 'Cache Manager does not implement \Magento\Framework\Css\PreProcessor\Cache\CacheInterface' - ); - } - - return $cacheManager; - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/CacheManager.php b/lib/Magento/Framework/Css/PreProcessor/Cache/CacheManager.php deleted file mode 100644 index c7a420485249407ecdd1f18e146be2e621d62b70..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/CacheManager.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache; - -use Magento\Framework\View\Publisher\FileInterface; - -class CacheManager -{ - /** - * @var CacheFactory - */ - protected $cacheFactory; - - /** - * @var CacheInterface[] - */ - protected $cacheByType = array(); - - /** - * @param CacheFactory $cacheFactory - */ - public function __construct(CacheFactory $cacheFactory) - { - $this->cacheFactory = $cacheFactory; - } - - /** - * @param string $cacheType - * @param FileInterface $publisherFile - * @return $this - */ - public function initializeCacheByType($cacheType, $publisherFile) - { - $this->cacheByType[$cacheType] = $this->cacheFactory->create($cacheType, $publisherFile); - return $this; - } - - /** - * @param string $cacheType - * @return string|null - */ - public function getCachedFile($cacheType) - { - return $this->isCacheInitialized($cacheType) ? $this->cacheByType[$cacheType]->get() : null; - } - - /** - * @param string $cacheType - * @param \Magento\Framework\Less\PreProcessor\File\Less $lessFile - * @return $this - */ - public function addToCache($cacheType, $lessFile) - { - !$this->isCacheInitialized($cacheType) ?: $this->cacheByType[$cacheType]->add($lessFile); - return $this; - } - - /** - * @param string $cacheType - * @param FileInterface $cacheFile - * @return $this - */ - public function saveCache($cacheType, $cacheFile) - { - !$this->isCacheInitialized($cacheType) ?: $this->cacheByType[$cacheType]->save($cacheFile); - return $this; - } - - /** - * @param string $cacheType - * @return $this - */ - public function clearCache($cacheType) - { - !$this->isCacheInitialized($cacheType) ?: $this->cacheByType[$cacheType]->clear(); - return $this; - } - - /** - * @param string $cacheType - * @return bool - */ - public function isCacheInitialized($cacheType) - { - return isset($this->cacheByType[$cacheType]); - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/Cache.php b/lib/Magento/Framework/Css/PreProcessor/Cache/Import/Cache.php deleted file mode 100644 index 30223f53546780cd9742f02c35846f5718997a88..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/Cache.php +++ /dev/null @@ -1,211 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import; - -use Magento\Framework\Exception; -use Magento\Framework\App\Filesystem; - -/** - * File cache entity for entry file - */ -class Cache implements \Magento\Framework\Css\PreProcessor\Cache\CacheInterface -{ - /** - * Cache import type - */ - const IMPORT_CACHE = 'import'; - - /** - * @var array - */ - protected $importEntities = array(); - - /** - * @var null|\Magento\Framework\View\Publisher\FileInterface - */ - protected $cachedFile; - - /** - * @var string - */ - protected $uniqueFileKey; - - /** - * @var Map\Storage - */ - protected $storage; - - /** - * @var ImportEntityFactory - */ - protected $importEntityFactory; - - /** - * @var \Magento\Framework\View\Publisher\FileFactory - */ - protected $fileFactory; - - /** - * @var \Magento\Framework\Filesystem\Directory\ReadInterface - */ - protected $readDirectory; - - /** - * @param Map\Storage $storage - * @param ImportEntityFactory $importEntityFactory - * @param Filesystem $filesystem - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @param \Magento\Framework\View\Publisher\FileFactory $fileFactory - */ - public function __construct( - Map\Storage $storage, - ImportEntityFactory $importEntityFactory, - Filesystem $filesystem, - \Magento\Framework\View\Publisher\FileInterface $publisherFile, - \Magento\Framework\View\Publisher\FileFactory $fileFactory - ) { - $this->storage = $storage; - $this->fileFactory = $fileFactory; - $this->readDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR); - $this->importEntityFactory = $importEntityFactory; - $this->uniqueFileKey = $this->prepareKey($publisherFile); - - $this->loadImportEntities(); - } - - /** - * Clear storage for current cached file - * - * @return $this - */ - public function clear() - { - $this->cachedFile = null; - $this->importEntities = array(); - $this->storage->delete($this->uniqueFileKey); - return $this; - } - - /** - * Return cached file - * - * @return null|\Magento\Framework\View\Publisher\FileInterface - */ - public function get() - { - if ($this->cachedFile instanceof \Magento\Framework\View\Publisher\FileInterface) { - return $this->cachedFile; - } - return null; - } - - /** - * Add file to cache - * - * @param \Magento\Framework\Less\PreProcessor\File\Less $lessFile - * @return $this - */ - public function add($lessFile) - { - $this->importEntities[$lessFile->getFileIdentifier()] = $this->importEntityFactory->create($lessFile); - return $this; - } - - /** - * Save state of files - * - * @param \Magento\Framework\View\Publisher\FileInterface $cachedFile - * @return $this - */ - public function save($cachedFile) - { - $this->storage->save($this->uniqueFileKey, $this->prepareSaveData($cachedFile)); - return $this; - } - - /** - * Prepare cache key for publication file - * - * @param \Magento\Framework\View\Publisher\FileInterface $lessFile - * @return string - */ - protected function prepareKey($lessFile) - { - $params = $lessFile->getViewParams(); - if (!empty($params['themeModel'])) { - $themeModel = $params['themeModel']; - $params['themeModel'] = $themeModel->getId() ?: md5($themeModel->getThemePath()); - } - ksort($params); - return $lessFile->getFilePath() . '|' . implode('|', $params); - } - - /** - * Load state of files - * - * @return $this - */ - protected function loadImportEntities() - { - $importEntities = unserialize($this->storage->load($this->uniqueFileKey)); - $this->cachedFile = isset($importEntities['cached_file']) ? $importEntities['cached_file'] : null; - $this->importEntities = isset($importEntities['imports']) ? $importEntities['imports'] : array(); - if (!$this->isValid()) { - $this->clear(); - } - return $this; - } - - /** - * Check file change time to make sure that file wasn't changed and it doesn't need of pre-processing - * - * @return bool - */ - public function isValid() - { - if (empty($this->importEntities)) { - return false; - } - /** @var ImportEntity $entity */ - foreach ($this->importEntities as $entity) { - $fileSourcePath = $entity->getOriginalFile(); - $fileMtime = $this->readDirectory->stat($this->readDirectory->getRelativePath($fileSourcePath))['mtime']; - if ($fileMtime !== $entity->getOriginalMtime()) { - return false; - } - } - return true; - } - - /** - * Serialize data of files state - * - * @param \Magento\Framework\View\Publisher\FileInterface $cachedFile - * @return string - */ - protected function prepareSaveData($cachedFile) - { - return serialize(array('cached_file' => clone $cachedFile, 'imports' => $this->importEntities)); - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityFactory.php b/lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityFactory.php deleted file mode 100644 index 27ecf3a2c4af14325de1f176a54116d86e408372..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityFactory.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import; - -/** - * Import entity factory - */ -class ImportEntityFactory -{ - /** - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * Instance name - * - * @var string - */ - protected $instanceName; - - /** - * @param \Magento\Framework\ObjectManager $objectManager - * @param string $instanceName - */ - public function __construct( - \Magento\Framework\ObjectManager $objectManager, - $instanceName = 'Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity' - ) { - $this->objectManager = $objectManager; - $this->instanceName = $instanceName; - } - - /** - * @param \Magento\Framework\Less\PreProcessor\File\Less $lessFile - * @return ImportEntityInterface - * @throws \InvalidArgumentException - */ - public function create($lessFile) - { - /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntityInterface $importEntity */ - $importEntity = $this->objectManager->create($this->instanceName, array('lessFile' => $lessFile)); - if (!$importEntity instanceof \Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntityInterface) { - throw new \InvalidArgumentException( - 'Import Entity does not implement \Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntityInterface' - ); - } - return $importEntity; - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/Map/Storage.php b/lib/Magento/Framework/Css/PreProcessor/Cache/Import/Map/Storage.php deleted file mode 100644 index 9107690ba48c611d9a1a1db67fcf8842231d3f03..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/Map/Storage.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import\Map; - -use Magento\Framework\App\Filesystem; - -/** - * Storage for import cache - */ -class Storage -{ - /** - * Maps directory for less files - */ - const MAPS_DIR = "maps/less"; - - /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface - */ - protected $mapsDirectory; - - /** - * @param Filesystem $filesystem - */ - public function __construct(Filesystem $filesystem) - { - $this->mapsDirectory = $filesystem->getDirectoryWrite(Filesystem::VAR_DIR); - if (!$this->mapsDirectory->isDirectory(self::MAPS_DIR)) { - $this->mapsDirectory->create(self::MAPS_DIR); - } - } - - /** - * @param string $key - * @return string - */ - public function load($key) - { - $mapFileName = $this->getMapFilePath($key); - if ($this->mapsDirectory->isFile($mapFileName)) { - return $this->mapsDirectory->readFile($mapFileName); - } - - return false; - } - - /** - * @param string $key - * @param string $data - * @return $this - */ - public function save($key, $data) - { - $mapFileName = $this->getMapFilePath($key); - $this->mapsDirectory->writeFile($mapFileName, $data); - return $this; - } - - /** - * @param string $key - * @return $this - */ - public function delete($key) - { - $this->save($key, ''); - return $this; - } - - /** - * @return $this - */ - public function clearMaps() - { - $this->mapsDirectory->delete(self::MAPS_DIR); - return $this; - } - - /** - * @param string $key - * @return string - */ - protected function getMapFilePath($key) - { - return self::MAPS_DIR . '/' . md5($key) . '.ser'; - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/InstructionPreProcessor.php b/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/InstructionPreProcessor.php deleted file mode 100644 index aa75c85b6162dc383e06a228c9ace8ac55f81828..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/InstructionPreProcessor.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Plugin; - -use Magento\Framework\Css\PreProcessor\Cache\CacheManager; -use Magento\Framework\Css\PreProcessor\Cache\Import\Cache; - -/** - * Plugin for less caching - */ -class InstructionPreProcessor -{ - /** - * @var CacheManager - */ - protected $cacheManager; - - /** - * @param CacheManager $cacheManager - */ - public function __construct(CacheManager $cacheManager) - { - $this->cacheManager = $cacheManager; - } - - /** - * Add to cache all pre-processed files that are related to initial less file - * - * @param \Magento\Framework\Less\PreProcessor $subject - * @param array $fileList - * - * @return array - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function afterProcessLessInstructions(\Magento\Framework\Less\PreProcessor $subject, $fileList) - { - foreach ($fileList as $lessFile) { - $this->cacheManager->addToCache(Cache::IMPORT_CACHE, $lessFile); - } - - return $fileList; - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/Less.php b/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/Less.php deleted file mode 100644 index 9367189ea097ccd1031363975b93a7de78c3f7d3..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Plugin/Less.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor\Cache\Plugin; - -use Magento\Framework\Filesystem; -use Magento\Framework\Css\PreProcessor\Cache\CacheManager; -use Magento\Framework\Css\PreProcessor\Cache\Import\Cache; - -/** - * Plugin for less caching - */ -class Less -{ - /** - * @var \Magento\Framework\Logger - */ - protected $logger; - - /** - * @var CacheManager - */ - protected $cacheManager; - - /** - * @param CacheManager $cacheManager - * @param \Magento\Framework\Logger $logger - */ - public function __construct(CacheManager $cacheManager, \Magento\Framework\Logger $logger) - { - $this->cacheManager = $cacheManager; - $this->logger = $logger; - } - - /** - * @param \Magento\Framework\Css\PreProcessor\Less $subject - * @param \Closure $proceed - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @param string $targetDirectory - * - * @return \Magento\Framework\View\Publisher\FileInterface|null|string - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function aroundProcess( - \Magento\Framework\Css\PreProcessor\Less $subject, - \Closure $proceed, - \Magento\Framework\View\Publisher\FileInterface $publisherFile, - $targetDirectory - ) { - if ($publisherFile->getSourcePath()) { - return $proceed($publisherFile, $targetDirectory); - } - - $this->cacheManager->initializeCacheByType(Cache::IMPORT_CACHE, $publisherFile); - - $cachedFile = $this->cacheManager->getCachedFile(Cache::IMPORT_CACHE); - if ($cachedFile instanceof \Magento\Framework\View\Publisher\FileInterface) { - return $cachedFile; - } - - try { - /** @var \Magento\Framework\View\Publisher\FileInterface $result */ - $result = $proceed($publisherFile, $targetDirectory); - $this->cacheManager->saveCache(Cache::IMPORT_CACHE, $result); - } catch (Filesystem\FilesystemException $e) { - $this->logger->logException($e); - return null; - } - return $result; - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Composite.php b/lib/Magento/Framework/Css/PreProcessor/Composite.php deleted file mode 100644 index baea7e482910310c48253cdda14f45175e6f7020..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Composite.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor; - -use Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface; -use Magento\Framework\View\Asset\PreProcessorFactory; - -/** - * Css pre-processor composite - */ -class Composite implements PreProcessorInterface -{ - /** - * Temporary directory prefix - */ - const TMP_VIEW_DIR = 'view'; - - /** - * @var PreProcessorInterface[] - */ - protected $preProcessors = array(); - - /** - * @var PreProcessorFactory - */ - protected $preProcessorFactory; - - /** - * @param PreProcessorFactory $preProcessorFactory - * @param array $preProcessors - */ - public function __construct(PreProcessorFactory $preProcessorFactory, array $preProcessors = array()) - { - $this->preProcessorFactory = $preProcessorFactory; - $this->preparePreProcessors($preProcessors); - } - - /** - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @param \Magento\Framework\Filesystem\Directory\WriteInterface $targetDirectory - * @return \Magento\Framework\View\Publisher\FileInterface - */ - public function process(\Magento\Framework\View\Publisher\FileInterface $publisherFile, $targetDirectory) - { - foreach ($this->preProcessors as $preProcessor) { - $publisherFile = $preProcessor->process($publisherFile, $targetDirectory); - } - - return $publisherFile; - } - - /** - * @param array $preProcessors - * @return PreProcessorInterface[] - */ - protected function preparePreProcessors($preProcessors) - { - if (empty($this->preProcessors)) { - foreach ($preProcessors as $preProcessorClass) { - $this->preProcessors[] = $this->preProcessorFactory->create($preProcessorClass); - } - } - return $this; - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/Less.php b/lib/Magento/Framework/Css/PreProcessor/Less.php deleted file mode 100644 index 8502b54a3046c8aee0c8330b3d967aa381b8869f..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/Less.php +++ /dev/null @@ -1,141 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor; - -use Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface; - -/** - * Css pre-processor less - */ -class Less implements PreProcessorInterface -{ - /** - * Temporary directory prefix - */ - const TMP_LESS_DIR = 'less'; - - /** - * @var \Magento\Framework\Less\PreProcessor - */ - protected $lessPreProcessor; - - /** - * @var AdapterInterface - */ - protected $adapter; - - /** - * @var \Magento\Framework\Logger - */ - protected $logger; - - /** - * @var \Magento\Framework\View\Publisher\FileFactory - */ - protected $fileFactory; - - /** - * @param \Magento\Framework\Less\PreProcessor $lessPreProcessor - * @param AdapterInterface $adapter - * @param \Magento\Framework\Logger $logger - * @param \Magento\Framework\View\Publisher\FileFactory $fileFactory - */ - public function __construct( - \Magento\Framework\Less\PreProcessor $lessPreProcessor, - AdapterInterface $adapter, - \Magento\Framework\Logger $logger, - \Magento\Framework\View\Publisher\FileFactory $fileFactory - ) { - $this->lessPreProcessor = $lessPreProcessor; - $this->adapter = $adapter; - $this->logger = $logger; - $this->fileFactory = $fileFactory; - } - - /** - * Process LESS file content - * - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @param \Magento\Framework\Filesystem\Directory\WriteInterface $targetDirectory - * @return \Magento\Framework\View\Publisher\FileInterface - */ - public function process(\Magento\Framework\View\Publisher\FileInterface $publisherFile, $targetDirectory) - { - // if css file has being already found_by_fallback or prepared_by_previous_pre-processor - if ($publisherFile->getSourcePath()) { - return $publisherFile; - } - - try { - $processedFiles = $this->lessPreProcessor->processLessInstructions( - $this->replaceExtension($publisherFile->getFilePath(), 'css', 'less'), - $publisherFile->getViewParams() - ); - $cssContent = $this->adapter->process($processedFiles->getPublicationPath()); - $cssTrimmedContent = trim($cssContent); - if (empty($cssTrimmedContent)) { - return $publisherFile; - } - } catch (\Magento\Framework\Filesystem\FilesystemException $e) { - $this->logger->logException($e); - // It has 'null' source path - return $publisherFile; - } catch (Adapter\AdapterException $e) { - $this->logger->logException($e); - // It has 'null' source path - return $publisherFile; - } catch (\Less_Exception_Compiler $e) { - $this->logger->logException($e); - return $publisherFile; - } - - $tmpFilePath = Composite::TMP_VIEW_DIR . '/' . self::TMP_LESS_DIR . '/' . $publisherFile->buildUniquePath(); - $targetDirectory->writeFile($tmpFilePath, $cssContent); - - $processedFile = $this->fileFactory->create( - $publisherFile->getFilePath(), - $publisherFile->getViewParams(), - $targetDirectory->getAbsolutePath($tmpFilePath) - ); - - return $processedFile; - } - - /** - * @param string $filePath - * @param string $search - * @param string $replace - * @return string - */ - protected function replaceExtension($filePath, $search, $replace) - { - $extension = pathinfo($filePath, PATHINFO_EXTENSION); - if ($extension === $search) { - $dotPosition = strrpos($filePath, '.'); - $filePath = substr($filePath, 0, $dotPosition + 1) . $replace; - } - - return $filePath; - } -} diff --git a/lib/Magento/Framework/Css/PreProcessor/UrlResolver.php b/lib/Magento/Framework/Css/PreProcessor/UrlResolver.php deleted file mode 100644 index e206d0c7c6cf526d08da2538ce40f3f8b875bd61..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Css/PreProcessor/UrlResolver.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Css\PreProcessor; - -use Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface; -use Magento\Framework\Filesystem\Directory\WriteInterface; - -/** - * Css pre-processor url resolver - */ -class UrlResolver implements PreProcessorInterface -{ - /** - * Temporary directory prefix - */ - const TMP_RESOLVER_DIR = 'resolver'; - - /** - * Root directory - * - * @var WriteInterface - */ - protected $rootDirectory; - - /** - * Related file - * - * @var \Magento\Framework\View\RelatedFile - */ - protected $relatedFile; - - /** - * Helper to process css content - * - * @var \Magento\Framework\View\Url\CssResolver - */ - protected $cssUrlResolver; - - /** - * Publisher - * - * @var \Magento\Framework\View\Publisher - */ - protected $publisher; - - /** - * Logger - * - * @var \Magento\Framework\Logger - */ - protected $logger; - - /** - * Publisher file factory - * - * @var \Magento\Framework\View\Publisher\FileFactory - */ - protected $fileFactory; - - /** - * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\RelatedFile $relatedFile - * @param \Magento\Framework\View\Url\CssResolver $cssUrlResolver - * @param \Magento\Framework\View\Publisher $publisher - * @param \Magento\Framework\Logger $logger - * @param \Magento\Framework\View\Publisher\FileFactory $fileFactory - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\RelatedFile $relatedFile, - \Magento\Framework\View\Url\CssResolver $cssUrlResolver, - \Magento\Framework\View\Publisher $publisher, - \Magento\Framework\Logger $logger, - \Magento\Framework\View\Publisher\FileFactory $fileFactory - ) { - $this->rootDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); - $this->relatedFile = $relatedFile; - $this->cssUrlResolver = $cssUrlResolver; - $this->publisher = $publisher; - $this->logger = $logger; - $this->fileFactory = $fileFactory; - } - - /** - * Process LESS file content - * - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @param \Magento\Framework\Filesystem\Directory\WriteInterface $targetDirectory - * @return \Magento\Framework\View\Publisher\FileInterface - */ - public function process(\Magento\Framework\View\Publisher\FileInterface $publisherFile, $targetDirectory) - { - if (!$publisherFile->isPublicationAllowed()) { - return $publisherFile; - } - $filePath = $publisherFile->getFilePath(); - $sourcePath = $publisherFile->getSourcePath(); - $content = $this->rootDirectory->readFile($this->rootDirectory->getRelativePath($sourcePath)); - $params = $publisherFile->getViewParams(); - - $callback = function ($fileId) use ($filePath, $params) { - $relatedPathPublic = $this->publishRelatedViewFile($fileId, $filePath, $params); - return $relatedPathPublic; - }; - try { - $content = $this->cssUrlResolver->replaceCssRelativeUrls( - $content, - $sourcePath, - $publisherFile->buildPublicViewFilename(), - $callback - ); - } catch (\Magento\Framework\Exception $e) { - $this->logger->logException($e); - } - - $tmpFilePath = Composite::TMP_VIEW_DIR . - '/' . - self::TMP_RESOLVER_DIR . - '/' . - $publisherFile->buildUniquePath(); - $targetDirectory->writeFile($tmpFilePath, $content); - - $processedFile = $this->fileFactory->create( - $publisherFile->getFilePath(), - $params, - $targetDirectory->getAbsolutePath($tmpFilePath) - ); - - return $processedFile; - } - - /** - * Publish file identified by $fileId basing on information about parent file path and name. - * - * @param string $fileId URL to the file that was extracted from $parentFilePath - * @param string $parentFileName original file name identifier that was requested for processing - * @param array $params theme/module parameters array - * @return string - */ - protected function publishRelatedViewFile($fileId, $parentFileName, $params) - { - $relativeFilePath = $this->relatedFile->buildPath($fileId, $parentFileName, $params); - return $this->publisher->getPublicFilePath($relativeFilePath, $params); - } -} diff --git a/lib/Magento/Framework/File/Transfer/Adapter/Http.php b/lib/Magento/Framework/File/Transfer/Adapter/Http.php deleted file mode 100644 index 10d1df016c88240a337006977f64dcdab7b0ea55..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/File/Transfer/Adapter/Http.php +++ /dev/null @@ -1,155 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\File\Transfer\Adapter; - -/** - * Csv parse - * - * @author Magento Core Team <core@magentocommerce.com> - */ -class Http -{ - /** - * @var array - */ - protected $_mimeTypes = array( - 'txt' => 'text/plain', - 'htm' => 'text/html', - 'html' => 'text/html', - 'php' => 'text/html', - 'css' => 'text/css', - 'js' => 'application/javascript', - 'json' => 'application/json', - 'xml' => 'application/xml', - 'swf' => 'application/x-shockwave-flash', - 'flv' => 'video/x-flv', - - // images - 'png' => 'image/png', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'gif' => 'image/gif', - 'bmp' => 'image/bmp', - 'ico' => 'image/vnd.microsoft.icon', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - - // archives - 'zip' => 'application/zip', - 'rar' => 'application/x-rar-compressed', - 'exe' => 'application/x-msdownload', - 'msi' => 'application/x-msdownload', - 'cab' => 'application/vnd.ms-cab-compressed', - - // audio/video - 'mp3' => 'audio/mpeg', - 'qt' => 'video/quicktime', - 'mov' => 'video/quicktime', - - // adobe - 'pdf' => 'application/pdf', - 'psd' => 'image/vnd.adobe.photoshop', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript' - ); - - /** - * Send the file to the client (Download) - * - * @param string|array $options Options for the file(s) to send - * @return void - * @throws \Exception - */ - public function send($options = null) - { - if (is_string($options)) { - $filepath = $options; - } else if (is_array($options)) { - $filepath = $options['filepath']; - } else { - throw new \Exception("Filename is not set."); - } - - if (!is_file($filepath) || !is_readable($filepath)) { - throw new \Exception("File '{$filepath}' does not exists."); - } - - $mimeType = $this->_detectMimeType(array('name' => $filepath)); - - $response = new \Zend_Controller_Response_Http(); - - $response->setHeader('Content-length', filesize($filepath)); - $response->setHeader('Content-Type', $mimeType); - - $response->sendHeaders(); - - $handle = fopen($filepath, 'r'); - if ($handle) { - while (($buffer = fgets($handle, 4096)) !== false) { - echo $buffer; - } - if (!feof($handle)) { - throw new \Exception("Error: unexpected fgets() fail."); - } - fclose($handle); - } - } - - /** - * Internal method to detect the mime type of a file - * - * @param array $value File infos - * @return string Mime type of given file - */ - protected function _detectMimeType($value) - { - if (file_exists($value['name'])) { - $file = $value['name']; - } else if (file_exists($value['tmp_name'])) { - $file = $value['tmp_name']; - } else { - return null; - } - - $parts = explode('.', $file); - $extention = strtolower(array_pop($parts)); - if (isset($this->_mimeTypes[$extention])) { - $result = $this->_mimeTypes[$extention]; - } - - if (empty($result) && (function_exists('mime_content_type') && ini_get('mime_magic.magicfile'))) { - $result = mime_content_type($file); - } - - if (empty($result)) { - $result = 'application/octet-stream'; - } - - return $result; - } -} diff --git a/lib/Magento/Framework/Less/File/Source/Base.php b/lib/Magento/Framework/Less/File/Source/Base.php deleted file mode 100644 index 2f03cd47f09f59744e348a4d7ecc4b35f70b40c9..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/File/Source/Base.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\File\Source; - -use Magento\Framework\View\Layout\File\SourceInterface; -use Magento\Framework\View\Design\ThemeInterface; -use Magento\Framework\App\Filesystem; -use Magento\Framework\Filesystem\Directory\ReadInterface; -use Magento\Framework\View\Layout\File\Factory; - -/** - * Source of base layout files introduced by modules - */ -class Base implements SourceInterface -{ - /** - * @var Factory - */ - protected $fileFactory; - - /** - * @var ReadInterface - */ - protected $modulesDirectory; - - /** - * @param Filesystem $filesystem - * @param Factory $fileFactory - */ - public function __construct(Filesystem $filesystem, Factory $fileFactory) - { - $this->modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR); - $this->fileFactory = $fileFactory; - } - - /** - * Retrieve files - * - * @param ThemeInterface $theme - * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] - */ - public function getFiles(ThemeInterface $theme, $filePath = '*') - { - //Import module base styles - - $filePath = pathinfo($filePath, PATHINFO_EXTENSION) ? $filePath : rtrim($filePath, '.') . '.less'; - - $namespace = $module = '*'; - $area = $theme->getArea(); - $files = $this->modulesDirectory->search("{$namespace}/{$module}/view/{$area}/{$filePath}"); - $result = array(); - $filePath = strtr(preg_quote($filePath), array('\*' => '[^/]+')); - $pattern = "#(?<namespace>[^/]+)/(?<module>[^/]+)/view/{$area}/" . $filePath . "$#i"; - foreach ($files as $file) { - $filename = $this->modulesDirectory->getAbsolutePath($file); - if (!preg_match($pattern, $filename, $matches)) { - continue; - } - $moduleFull = "{$matches['namespace']}_{$matches['module']}"; - $result[] = $this->fileFactory->create($filename, $moduleFull); - } - return $result; - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor.php b/lib/Magento/Framework/Less/PreProcessor.php deleted file mode 100644 index f8dfdb2c1b39130bfe38f2748e2274d0b19f8cff..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less; - -/** - * LESS instruction preprocessor - */ -class PreProcessor -{ - /** - * @var PreProcessor\InstructionFactory - */ - protected $instructionFactory; - - /** - * @var PreProcessor\File\FileListFactory - */ - protected $fileListFactory; - - /** - * List of instruction pre-processors - * - * @var array - */ - protected $preProcessors; - - /** - * @param PreProcessor\InstructionFactory $instructionFactory - * @param PreProcessor\File\FileListFactory $fileListFactory - * @param array $preProcessors - */ - public function __construct( - PreProcessor\InstructionFactory $instructionFactory, - PreProcessor\File\FileListFactory $fileListFactory, - array $preProcessors = array() - ) { - $this->instructionFactory = $instructionFactory; - $this->fileListFactory = $fileListFactory; - $this->preProcessors = $preProcessors; - } - - /** - * Instantiate instruction less pre-processors - * - * @param PreProcessor\File\FileList $fileList - * @return PreProcessorInterface[] - */ - protected function initLessPreProcessors(PreProcessor\File\FileList $fileList) - { - $preProcessorsInstances = array(); - foreach ($this->preProcessors as $preProcessorClass) { - $preProcessorsInstances[] = $this->instructionFactory->create( - $preProcessorClass['class'], - array('fileList' => $fileList) - ); - } - return $preProcessorsInstances; - } - - /** - * Process less file through pre-processors and all child files that was added during pre-processing - * - * @param string $lessFilePath - * @param array $viewParams - * @return PreProcessor\File\FileList list of pre-processed files - */ - public function processLessInstructions($lessFilePath, $viewParams) - { - /** @var $fileList PreProcessor\File\FileList */ - $fileList = $this->fileListFactory->create( - array('lessFilePath' => $lessFilePath, 'viewParams' => $viewParams) - ); - $preProcessors = $this->initLessPreProcessors($fileList); - /** @var $lessFile PreProcessor\File\Less */ - foreach ($fileList as $lessFile) { - $this->publishProcessedContent($preProcessors, $lessFile); - } - return $fileList; - } - - /** - * Process less content and save - * - * @param PreProcessorInterface[] $preProcessors - * @param PreProcessor\File\Less $lessFile - * @return void - */ - protected function publishProcessedContent(array $preProcessors, PreProcessor\File\Less $lessFile) - { - $lessContent = $lessFile->getContent(); - foreach ($preProcessors as $processor) { - $lessContent = $processor->process($lessFile, $lessContent); - } - $lessFile->saveContent($lessContent); - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor/File/FileList.php b/lib/Magento/Framework/Less/PreProcessor/File/FileList.php deleted file mode 100644 index d5aa4642719297e9c0d1459bc38f09f284fb190e..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor/File/FileList.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\PreProcessor\File; - -/** - * Less file list container - */ -class FileList implements \Iterator -{ - /** - * @var LessFactory - */ - protected $lessFactory; - - /** - * Entry less file for this container - * - * @var Less - */ - protected $initialFile; - - /** - * @var Less[] - */ - protected $files = array(); - - /** - * Constructor - * - * @param LessFactory $lessFactory - * @param string $lessFilePath - * @param array $viewParams - * @throws \InvalidArgumentException - */ - public function __construct(LessFactory $lessFactory, $lessFilePath = null, $viewParams = array()) - { - if (empty($lessFilePath) || empty($viewParams)) { - throw new \InvalidArgumentException('FileList container must contain entry less file data'); - } - $this->lessFactory = $lessFactory; - $this->initialFile = $this->createFile($lessFilePath, $viewParams); - $this->addFile($this->initialFile); - } - - /** - * Return entry less file for this container - * - * @return Less - */ - public function getInitialFile() - { - return $this->initialFile; - } - - /** - * Return publication path of entry less file - * - * @return string - */ - public function getPublicationPath() - { - return $this->initialFile->getPublicationPath(); - } - - /** - * Add file to list - * - * @param Less $file - * @return $this - */ - public function addFile(Less $file) - { - $this->files[$file->getFileIdentifier()] = $file; - return $this; - } - - /** - * Create instance of less file - * - * @param string $lessFilePath - * @param array $viewParams - * @return mixed - */ - public function createFile($lessFilePath, $viewParams) - { - return $this->lessFactory->create(array('filePath' => $lessFilePath, 'viewParams' => $viewParams)); - } - - /** - * {@inheritdoc} - */ - public function current() - { - return current($this->files); - } - - /** - * {@inheritdoc} - */ - public function next() - { - next($this->files); - } - - /** - * {@inheritdoc} - */ - public function key() - { - return key($this->files); - } - - /** - * {@inheritdoc} - */ - public function valid() - { - return (bool)current($this->files); - } - - /** - * {@inheritdoc} - */ - public function rewind() - { - reset($this->files); - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor/File/FileListFactory.php b/lib/Magento/Framework/Less/PreProcessor/File/FileListFactory.php deleted file mode 100644 index de95e25605c51b2dea903ac41c6f0ef21f9b98fd..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor/File/FileListFactory.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\PreProcessor\File; - -/** - * Factory class for \Magento\Framework\Less\PreProcessor\File\FileList - */ -class FileListFactory -{ - /** - * Object Manager instance - * - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * Instance name to create - * - * @var string - */ - protected $instanceName; - - /** - * Factory constructor - * - * @param \Magento\Framework\ObjectManager $objectManager - * @param string $instanceName - */ - public function __construct( - \Magento\Framework\ObjectManager $objectManager, - $instanceName = 'Magento\Framework\Less\PreProcessor\File\FileList' - ) { - $this->objectManager = $objectManager; - $this->instanceName = $instanceName; - } - - /** - * Create class instance with specified parameters - * - * @param array $data - * @return FileList - * @throws \UnexpectedValueException - */ - public function create(array $data = array()) - { - $fileList = $this->objectManager->create($this->instanceName, $data); - if (!$fileList instanceof FileList) { - throw new \UnexpectedValueException( - get_class($fileList) . ' doesn\'t extend \Magento\Framework\Less\PreProcessor\File\FileList' - ); - } - return $fileList; - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor/File/Less.php b/lib/Magento/Framework/Less/PreProcessor/File/Less.php deleted file mode 100644 index eb160471f4d8de6fca90a1dcace852ae32c18a3c..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor/File/Less.php +++ /dev/null @@ -1,200 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\PreProcessor\File; - -use Magento\Framework\View; - -/** - * Less file - */ -class Less -{ - /** - * Folder for publication preprocessed less files - */ - const PUBLICATION_PREFIX_PATH = 'less'; - - /** - * @var View\FileSystem - */ - protected $viewFileSystem; - - /** - * @var \Magento\Framework\App\Filesystem - */ - protected $filesystem; - - /** - * @var array - */ - protected $viewParams; - - /** - * @var string - */ - protected $filePath; - - /** - * @var string - */ - protected $sourcePath; - - /** - * @var bool - */ - protected $isPublished = false; - - /** - * @param View\FileSystem $viewFileSystem - * @param \Magento\Framework\App\Filesystem $filesystem - * @param string $filePath - * @param array $viewParams - * @param string|null $sourcePath - */ - public function __construct( - View\FileSystem $viewFileSystem, - \Magento\Framework\App\Filesystem $filesystem, - $filePath, - array $viewParams, - $sourcePath = null - ) { - $this->viewFileSystem = $viewFileSystem; - $this->filesystem = $filesystem; - $this->filePath = $filePath; - $this->viewParams = $viewParams; - $this->sourcePath = $sourcePath ?: $this->getSourcePath(); - } - - /** - * @return string - */ - public function getFilePath() - { - return $this->filePath; - } - - /** - * @return array - */ - public function getViewParams() - { - return $this->viewParams; - } - - /** - * Return source path of file if it's exist - * - * @return string - * @throws \Magento\Framework\Filesystem\FilesystemException - */ - public function getSourcePath() - { - if ($this->sourcePath === null) { - $this->sourcePath = $this->viewFileSystem->getViewFile($this->getFilePath(), $this->getViewParams()); - if (!$this->getDirectoryRead()->isExist($this->getDirectoryRead()->getRelativePath($this->sourcePath))) { - throw new \Magento\Framework\Filesystem\FilesystemException("File '{$this->sourcePath}' isn't exist"); - } - } - return $this->sourcePath; - } - - /** - * Build unique file path for publication - * - * @return string - */ - public function getPublicationPath() - { - $sourcePathPrefix = $this->getDirectoryRead()->getAbsolutePath(); - $targetPathPrefix = $this->getDirectoryWrite()->getAbsolutePath() . self::PUBLICATION_PREFIX_PATH . '/'; - return str_replace($sourcePathPrefix, $targetPathPrefix, $this->getSourcePath()); - } - - /** - * @return string - */ - public function getContent() - { - $directoryRead = $this->getDirectoryRead(); - $filePath = $this->isPublished() ? $this->getPublicationPath() : $this->getSourcePath(); - return $directoryRead->readFile($directoryRead->getRelativePath($filePath)); - } - - /** - * Save file content to publication path - * - * @param string $content - * @return void - */ - public function saveContent($content) - { - $directoryWrite = $this->getDirectoryWrite(); - $directoryWrite->writeFile($directoryWrite->getRelativePath($this->getPublicationPath()), $content); - $this->isPublished = true; - } - - /** - * Publishing state - * - * @return bool - */ - public function isPublished() - { - return $this->isPublished; - } - - /** - * Unique identifier for a file - * - * @return string - */ - public function getFileIdentifier() - { - $themeIdentifier = !empty($this->viewParams['themeModel']) && - $this->viewParams['themeModel']->getFullPath() ? 'base' : $this->viewParams['themeModel']->getFullPath(); - $module = empty($this->viewParams['module']) ? 'base' : $this->viewParams['module']; - $locale = empty($this->viewParams['locale']) ? 'base' : $this->viewParams['locale']; - return implode('|', array($this->filePath, $module, $themeIdentifier, $locale)); - } - - /** - * Get base directory with source of less files - * - * @return \Magento\Framework\Filesystem\Directory\ReadInterface - */ - public function getDirectoryRead() - { - return $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - } - - /** - * Get directory for publication temporary less files - * - * @return \Magento\Framework\Filesystem\Directory\WriteInterface - */ - public function getDirectoryWrite() - { - return $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::TMP_DIR); - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor/File/LessFactory.php b/lib/Magento/Framework/Less/PreProcessor/File/LessFactory.php deleted file mode 100644 index 2bcb643e585eacd1f87271621485558e4106b379..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor/File/LessFactory.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\PreProcessor\File; - -/** - * Factory class for \Magento\Framework\Less\PreProcessor\File\Less - */ -class LessFactory -{ - /** - * Object Manager instance - * - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * Instance name to create - * - * @var string - */ - protected $instanceName; - - /** - * Factory constructor - * - * @param \Magento\Framework\ObjectManager $objectManager - * @param string $instanceName - */ - public function __construct( - \Magento\Framework\ObjectManager $objectManager, - $instanceName = 'Magento\Framework\Less\PreProcessor\File\Less' - ) { - $this->objectManager = $objectManager; - $this->instanceName = $instanceName; - } - - /** - * Create class instance with specified parameters - * - * @param array $data - * @return \Magento\Framework\Less\PreProcessor\File\Less - * @throws \UnexpectedValueException - */ - public function create(array $data = array()) - { - $fileLessProcessor = $this->objectManager->create($this->instanceName, $data); - if (!$fileLessProcessor instanceof Less) { - throw new \UnexpectedValueException( - get_class($fileLessProcessor) . ' doesn\'t extend \Magento\Framework\Less\PreProcessor\File\Less' - ); - } - return $fileLessProcessor; - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor/Instruction/Import.php b/lib/Magento/Framework/Less/PreProcessor/Instruction/Import.php deleted file mode 100644 index 396542f8c7184188fa1ecc9549b006a6bde126d0..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor/Instruction/Import.php +++ /dev/null @@ -1,144 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\PreProcessor\Instruction; - -use Magento\Framework\Less\PreProcessorInterface; -use Magento\Framework\Less\PreProcessor; -use Magento\Framework\View; - -/** - * Less @import instruction preprocessor - */ -class Import implements PreProcessorInterface -{ - /** - * Pattern of @import less instruction - */ - const REPLACE_PATTERN = '#@import\s+(\((?P<type>\w+)\)\s+)?[\'\"](?P<path>(?![/\\\]|\w:[/\\\])[^\"\']+)[\'\"]\s*?(?P<media>.*?);#'; - - /** - * @var PreProcessor\File\FileList - */ - protected $fileList; - - /** - * Pre-processor error handler - * - * @var PreProcessor\ErrorHandlerInterface - */ - protected $errorHandler; - - /** - * Related file - * - * @var View\RelatedFile - */ - protected $relatedFile; - - /** - * @param View\RelatedFile $relatedFile - * @param PreProcessor\ErrorHandlerInterface $errorHandler - * @param PreProcessor\File\FileList $fileList - */ - public function __construct( - View\RelatedFile $relatedFile, - PreProcessor\ErrorHandlerInterface $errorHandler, - PreProcessor\File\FileList $fileList - ) { - $this->relatedFile = $relatedFile; - $this->errorHandler = $errorHandler; - $this->fileList = $fileList; - } - - /** - * Explode import paths - * - * @param \Magento\Framework\Less\PreProcessor\File\Less $lessFile - * @param array $matchedPaths - * @return array - */ - protected function generatePaths(PreProcessor\File\Less $lessFile, $matchedPaths) - { - $importPaths = array(); - foreach ($matchedPaths as $path) { - try { - $viewParams = $lessFile->getViewParams(); - $resolvedPath = $this->relatedFile->buildPath( - $this->preparePath($path), - $lessFile->getFilePath(), - $viewParams - ); - $importedLessFile = $this->fileList->createFile($resolvedPath, $viewParams); - $this->fileList->addFile($importedLessFile); - $importPaths[$path] = $importedLessFile->getPublicationPath(); - } catch (\Magento\Framework\Filesystem\FilesystemException $e) { - $this->errorHandler->processException($e); - } - } - return $importPaths; - } - - /** - * Prepare relative path to less compatible state - * - * @param string $lessSourcePath - * @return string - */ - protected function preparePath($lessSourcePath) - { - return pathinfo($lessSourcePath, PATHINFO_EXTENSION) ? $lessSourcePath : $lessSourcePath . '.less'; - } - - /** - * {@inheritdoc} - */ - public function process(PreProcessor\File\Less $lessFile, $lessContent) - { - $matches = array(); - preg_match_all(self::REPLACE_PATTERN, $lessContent, $matches); - $importPaths = $this->generatePaths($lessFile, $matches['path']); - $replaceCallback = function ($matchContent) use ($importPaths) { - return $this->replace($matchContent, $importPaths); - }; - return preg_replace_callback(self::REPLACE_PATTERN, $replaceCallback, $lessContent); - } - - /** - * Replace import path to file - * - * @param array $matchContent - * @param array $importPaths - * @return string - */ - protected function replace($matchContent, $importPaths) - { - if (empty($importPaths[$matchContent['path']])) { - return ''; - } - $filePath = $importPaths[$matchContent['path']]; - $typeString = empty($matchContent['type']) ? '' : '(' . $matchContent['type'] . ') '; - $mediaString = empty($matchContent['media']) ? '' : ' ' . $matchContent['media']; - return "@import {$typeString}'{$filePath}'{$mediaString};"; - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor/Instruction/MagentoImport.php b/lib/Magento/Framework/Less/PreProcessor/Instruction/MagentoImport.php deleted file mode 100644 index 18133704878536aeb9c9c383df4d810e791e8d35..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor/Instruction/MagentoImport.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\PreProcessor\Instruction; - -use Magento\Framework\Less\PreProcessor; -use Magento\Framework\Less\PreProcessorInterface; -use Magento\Framework\View; - -/** - * Less @magento_import instruction preprocessor - */ -class MagentoImport implements PreProcessorInterface -{ - /** - * Pattern of @import less instruction - */ - const REPLACE_PATTERN = '#//@magento_import\s+[\'\"](?P<path>(?![/\\\]|\w:[/\\\])[^\"\']+)[\'\"]\s*?;#'; - - /** - * Layout file source - * - * @var \Magento\Framework\View\Layout\File\SourceInterface - */ - protected $fileSource; - - /** - * Pre-processor error handler - * - * @var PreProcessor\ErrorHandlerInterface - */ - protected $errorHandler; - - /** - * Related file - * - * @var \Magento\Framework\View\RelatedFile - */ - protected $relatedFile; - - /** - * View service - * - * @var \Magento\Framework\View\Service - */ - protected $viewService; - - /** - * @param View\Layout\File\SourceInterface $fileSource - * @param View\Service $viewService - * @param View\RelatedFile $relatedFile - * @param PreProcessor\ErrorHandlerInterface $errorHandler - */ - public function __construct( - View\Layout\File\SourceInterface $fileSource, - View\Service $viewService, - View\RelatedFile $relatedFile, - PreProcessor\ErrorHandlerInterface $errorHandler - ) { - $this->fileSource = $fileSource; - $this->viewService = $viewService; - $this->relatedFile = $relatedFile; - $this->errorHandler = $errorHandler; - } - - /** - * {@inheritdoc} - */ - public function process(PreProcessor\File\Less $lessFile, $lessContent) - { - $viewParams = $lessFile->getViewParams(); - $parentPath = $lessFile->getFilePath(); - $this->viewService->updateDesignParams($viewParams); - $replaceCallback = function ($matchContent) use ($viewParams, $parentPath) { - return $this->replace($matchContent, $viewParams, $parentPath); - }; - return preg_replace_callback(self::REPLACE_PATTERN, $replaceCallback, $lessContent); - } - - /** - * Replace @magento_import to @import less instructions - * - * @param array $matchContent - * @param array $viewParams - * @param string $parentPath - * @return string - */ - protected function replace($matchContent, $viewParams, $parentPath) - { - $importsContent = ''; - try { - $resolvedPath = $this->relatedFile->buildPath($matchContent['path'], $parentPath, $viewParams); - $importFiles = $this->fileSource->getFiles($viewParams['themeModel'], $resolvedPath); - /** @var $importFile \Magento\Framework\View\Layout\File */ - foreach ($importFiles as $importFile) { - $importsContent .= $importFile->getModule() ? "@import '{$importFile - ->getModule()}::{$resolvedPath}';\n" : "@import '{$matchContent['path']}';\n"; - } - } catch (\LogicException $e) { - $this->errorHandler->processException($e); - } - return $importsContent; - } -} diff --git a/lib/Magento/Framework/Less/PreProcessor/InstructionFactory.php b/lib/Magento/Framework/Less/PreProcessor/InstructionFactory.php deleted file mode 100644 index 349ea221444d311b02160c05238b967d70705b5f..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/Less/PreProcessor/InstructionFactory.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\Less\PreProcessor; - -/** - * Factory class for \Magento\Framework\Less\PreProcessorInterface - */ -class InstructionFactory -{ - /** - * Object Manager instance - * - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * Factory constructor - * - * @param \Magento\Framework\ObjectManager $objectManager - */ - public function __construct(\Magento\Framework\ObjectManager $objectManager) - { - $this->objectManager = $objectManager; - } - - /** - * Create class instance with specified parameters - * - * @param string $className - * @param array $data - * @return \Magento\Framework\Less\PreProcessorInterface - * @throws \InvalidArgumentException - */ - public function create($className, array $data = array()) - { - $preProcessor = $this->objectManager->create($className, $data); - if (!$preProcessor instanceof \Magento\Framework\Less\PreProcessorInterface) { - throw new \InvalidArgumentException( - "{$className} doesn't implement \\Magento\\Framework\\Less\\PreProcessorInterface" - ); - } - return $preProcessor; - } -} diff --git a/lib/Magento/Framework/View/Asset/MergeStrategy/Direct.php b/lib/Magento/Framework/View/Asset/MergeStrategy/Direct.php deleted file mode 100644 index ef39e82d52aef5820d5e59726a22beb46879e40d..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Asset/MergeStrategy/Direct.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset\MergeStrategy; - -/** - * Simple merge strategy - merge anyway - */ -class Direct implements \Magento\Framework\View\Asset\MergeStrategyInterface -{ - /**#@+ - * Delimiters for merging files of various content type - */ - const MERGE_DELIMITER_JS = ';'; - - const MERGE_DELIMITER_EMPTY = ''; - - /**#@-*/ - - /** - * Directory Write - * - * @var \Magento\Framework\Filesystem\Directory\Write - */ - private $_directory; - - /** - * Css Resolver - * - * @var \Magento\Framework\View\Url\CssResolver - */ - protected $cssUrlResolver; - - /** - * Constructor - * - * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\Url\CssResolver $cssUrlResolver - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\Url\CssResolver $cssUrlResolver - ) { - $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::PUB_DIR); - $this->_cssUrlResolver = $cssUrlResolver; - } - - /** - * {@inheritdoc} - */ - public function mergeFiles(array $publicFiles, $destinationFile, $contentType) - { - $mergedContent = $this->composeMergedContent($publicFiles, $destinationFile, $contentType); - $this->_directory->writeFile($this->_directory->getRelativePath($destinationFile), $mergedContent); - } - - /** - * Merge files together and modify content if needed - * - * @param array $publicFiles - * @param string $targetFile - * @param string $contentType - * @return string - * @throws \Magento\Framework\Exception - */ - protected function composeMergedContent(array $publicFiles, $targetFile, $contentType) - { - $result = array(); - $isCss = $contentType == \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS ? true : false; - $delimiter = $this->_getFilesContentDelimiter($contentType); - - foreach ($publicFiles as $file) { - if (!$this->_directory->isExist($this->_directory->getRelativePath($file))) { - throw new \Magento\Framework\Exception("Unable to locate file '{$file}' for merging."); - } - $content = $this->_directory->readFile($this->_directory->getRelativePath($file)); - if ($isCss) { - $content = $this->_cssUrlResolver->replaceCssRelativeUrls($content, $file, $targetFile); - } - $result[] = $content; - } - $result = ltrim(implode($delimiter, $result)); - if ($isCss) { - $result = $this->_popCssImportsUp($result); - } - - return $result; - } - - /** - * Put CSS import directives to the start of CSS content - * - * @param string $contents - * @return string - */ - protected function _popCssImportsUp($contents) - { - $parts = preg_split('/(@import\s.+?;\s*)/', $contents, -1, PREG_SPLIT_DELIM_CAPTURE); - $imports = array(); - $css = array(); - foreach ($parts as $part) { - if (0 === strpos($part, '@import', 0)) { - $imports[] = trim($part); - } else { - $css[] = $part; - } - } - - $result = implode($css); - if ($imports) { - $result = implode("\n", $imports) . "\n" . "/* Import directives above popped up. */\n" . $result; - } - return $result; - } - - /** - * Return delimiter for separation of merged files content - * - * @param string $contentType - * @return string - */ - protected function _getFilesContentDelimiter($contentType) - { - if ($contentType == \Magento\Framework\View\Publisher::CONTENT_TYPE_JS) { - return self::MERGE_DELIMITER_JS; - } - return self::MERGE_DELIMITER_EMPTY; - } -} diff --git a/lib/Magento/Framework/View/Asset/Minified.php b/lib/Magento/Framework/View/Asset/Minified.php deleted file mode 100644 index 565d4e89ff87d646418b0eae3ae633235f2ceccc..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Asset/Minified.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset; - -/** - * Minified page asset - */ -class Minified implements MergeableInterface -{ - /** - * LocalInterface - * - * @var LocalInterface - */ - protected $originalAsset; - - /** - * Minfier - * - * @var \Magento\Framework\Code\Minifier - */ - protected $minifier; - - /** - * File - * - * @var string - */ - protected $file; - - /** - * URL - * - * @var string - */ - protected $url; - - /** - * View URL - * - * @var \Magento\Framework\View\Url - */ - protected $viewUrl; - - /** - * Logger - * - * @var \Magento\Framework\Logger - */ - protected $logger; - - /** - * Constructor - * - * @param LocalInterface $asset - * @param \Magento\Framework\Code\Minifier $minifier - * @param \Magento\Framework\View\Url $viewUrl - * @param \Magento\Framework\Logger $logger - */ - public function __construct( - LocalInterface $asset, - \Magento\Framework\Code\Minifier $minifier, - \Magento\Framework\View\Url $viewUrl, - \Magento\Framework\Logger $logger - ) { - $this->originalAsset = $asset; - $this->minifier = $minifier; - $this->viewUrl = $viewUrl; - $this->logger = $logger; - } - - /** - * {@inheritdoc} - */ - public function getUrl() - { - if (empty($this->url)) { - $this->process(); - } - return $this->url; - } - - /** - * {@inheritdoc} - */ - public function getContentType() - { - return $this->originalAsset->getContentType(); - } - - /** - * {@inheritdoc} - */ - public function getSourceFile() - { - if (empty($this->file)) { - $this->process(); - } - return $this->file; - } - - /** - * Minify content of child asset - * - * @return void - */ - protected function process() - { - $originalFile = $this->originalAsset->getSourceFile(); - - try { - $this->file = $this->minifier->getMinifiedFile($originalFile); - } catch (\Exception $e) { - $this->logger->logException( - new \Magento\Framework\Exception('Could not minify file: ' . $originalFile, 0, $e) - ); - $this->file = $originalFile; - } - if ($this->file == $originalFile) { - $this->url = $this->originalAsset->getUrl(); - } else { - $this->url = $this->viewUrl->getPublicFileUrl($this->file); - } - } -} diff --git a/lib/Magento/Framework/View/Asset/PreProcessor/Composite.php b/lib/Magento/Framework/View/Asset/PreProcessor/Composite.php deleted file mode 100644 index f763a0fb4737871d3f4274e1b824ad77c10bdfdd..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Asset/PreProcessor/Composite.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset\PreProcessor; - -use Magento\Framework\View\Asset\PreProcessorFactory; - -/** - * View asset pre-processor composite - */ -class Composite implements PreProcessorInterface -{ - /** - * Pre-processor config - * - * @var array - */ - protected $preProcessorsConfig = array(); - - /** - * Asset type pre-processor - * - * @var PreProcessorInterface[] - */ - protected $assetTypePreProcessors = array(); - - /** - * Pre-processor factory - * - * @var \Magento\Framework\View\Asset\PreProcessorFactory - */ - protected $preProcessorFactory; - - /** - * Constructor - * - * @param PreProcessorFactory $preProcessorFactory - * @param array $preProcessorsConfig - */ - public function __construct(PreProcessorFactory $preProcessorFactory, array $preProcessorsConfig = array()) - { - $this->preProcessorFactory = $preProcessorFactory; - $this->preProcessorsConfig = $preProcessorsConfig; - } - - /** - * Process view asset pro-processors - * - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @param \Magento\Framework\Filesystem\Directory\WriteInterface $targetDirectory - * @return \Magento\Framework\View\Publisher\FileInterface - */ - public function process(\Magento\Framework\View\Publisher\FileInterface $publisherFile, $targetDirectory) - { - foreach ($this->getAssetTypePreProcessors($publisherFile->getExtension()) as $preProcessor) { - $publisherFile = $preProcessor->process($publisherFile, $targetDirectory); - } - - return $publisherFile; - } - - /** - * Get processors list for given asset type - * - * @param string $assetType - * @return PreProcessorInterface[] - */ - protected function getAssetTypePreProcessors($assetType) - { - if (!isset($this->assetTypePreProcessors[$assetType])) { - $this->assetTypePreProcessors[$assetType] = array(); - foreach ($this->preProcessorsConfig as $preProcessorDetails) { - if ($assetType === $preProcessorDetails['asset_type']) { - $this->assetTypePreProcessors[$assetType][] = $this->preProcessorFactory->create( - $preProcessorDetails['class'] - ); - } - } - } - return $this->assetTypePreProcessors[$assetType]; - } -} diff --git a/lib/Magento/Framework/View/Asset/ViewFile.php b/lib/Magento/Framework/View/Asset/ViewFile.php deleted file mode 100644 index d2928bf1964843277d428f0303e420dd2354f023..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Asset/ViewFile.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Asset; - -/** - * Page asset representing a view file - */ -class ViewFile implements MergeableInterface -{ - /** - * View URL - * - * @var \Magento\Framework\View\Url - */ - protected $viewUrl; - - /** - * File - * - * @var string - */ - protected $file; - - /** - * Content type - * - * @var string - */ - protected $contentType; - - /** - * Constructor - * - * @param \Magento\Framework\View\Url $viewUrl - * @param string $file - * @param string $contentType - * @throws \InvalidArgumentException - */ - public function __construct(\Magento\Framework\View\Url $viewUrl, $file, $contentType) - { - if (empty($file)) { - throw new \InvalidArgumentException("Parameter 'file' must not be empty"); - } - $this->viewUrl = $viewUrl; - $this->file = $file; - $this->contentType = $contentType; - } - - /** - * {@inheritdoc} - */ - public function getUrl() - { - return $this->viewUrl->getViewFileUrl($this->file); - } - - /** - * {@inheritdoc} - */ - public function getContentType() - { - return $this->contentType; - } - - /** - * {@inheritdoc} - */ - public function getSourceFile() - { - return $this->viewUrl->getViewFilePublicPath($this->file); - } -} diff --git a/lib/Magento/Framework/View/DeployedFilesManager.php b/lib/Magento/Framework/View/DeployedFilesManager.php deleted file mode 100644 index 0dc022df522062388cf615725bf2c8b6fdd68a93..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/DeployedFilesManager.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -/** - * Builds path for files deployed into public directory in advance - */ -class DeployedFilesManager implements \Magento\Framework\View\PublicFilesManagerInterface -{ - /** - * View service - * - * @var \Magento\Framework\View\Service - */ - protected $_viewService; - - /** - * Constructor - * - * @param \Magento\Framework\View\Service $viewService - */ - public function __construct(\Magento\Framework\View\Service $viewService) - { - $this->_viewService = $viewService; - } - - /** - * Get deployed file path - * - * @param string $filePath - * @param array $params - * @return string - */ - public function getPublicFilePath($filePath, $params) - { - return $this->_getDeployedFilePath($filePath, $params); - } - - /** - * Build a relative path to a static view file, if published with duplication. - * - * Just concatenates all context arguments. - * Note: despite $locale is specified, it is currently ignored. - * - * @param string $area - * @param string $themePath - * @param string $file - * @param string|null $module - * @return string - */ - public static function buildDeployedFilePath($area, $themePath, $file, $module = null) - { - return $area . '/' . $themePath . '/' . ($module ? $module . '/' : '') . $file; - } - - /** - * Get deployed file path - * - * @param string $filePath - * @param array $params - * @return string - */ - protected function _getDeployedFilePath($filePath, $params) - { - /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */ - $themeModel = $params['themeModel']; - $themePath = $themeModel->getThemePath(); - while (empty($themePath) && $themeModel) { - $themePath = $themeModel->getThemePath(); - $themeModel = $themeModel->getParentTheme(); - } - $subPath = self::buildDeployedFilePath($params['area'], $themePath, $filePath, $params['module']); - $deployedFilePath = $this->_viewService->getPublicDir() . '/' . $subPath; - - return $deployedFilePath; - } -} diff --git a/lib/Magento/Framework/View/Design/Fallback/Factory.php b/lib/Magento/Framework/View/Design/Fallback/Factory.php deleted file mode 100644 index 34b815f43c7b13b62f245e0628380f25af90e732..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Design/Fallback/Factory.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\Fallback; - -use Magento\Framework\App\Filesystem; -use Magento\Framework\View\Design\Fallback\Rule\Composite; -use Magento\Framework\View\Design\Fallback\Rule\ModularSwitch; -use Magento\Framework\View\Design\Fallback\Rule\RuleInterface; -use Magento\Framework\View\Design\Fallback\Rule\Simple; -use Magento\Framework\View\Design\Fallback\Rule\Theme; - -/** - * Fallback Factory - * - * Factory that produces all sorts of fallback rules - */ -class Factory -{ - /** - * File system - * - * @var Filesystem - */ - protected $filesystem; - - /** - * Constructor - * - * @param Filesystem $filesystem - */ - public function __construct(Filesystem $filesystem) - { - $this->filesystem = $filesystem; - } - - /** - * Retrieve newly created fallback rule for locale files, such as CSV translation maps - * - * @return RuleInterface - */ - public function createLocaleFileRule() - { - $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR); - return new Theme(new Simple("{$themesDir}/<area>/<theme_path>/i18n/<locale>")); - } - - /** - * Retrieve newly created fallback rule for dynamic view files, such as layouts and templates - * - * @return RuleInterface - */ - public function createFileRule() - { - $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR); - $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR); - return new ModularSwitch( - new Theme(new Simple("{$themesDir}/<area>/<theme_path>")), - new Composite( - array( - new Theme(new Simple("{$themesDir}/<area>/<theme_path>/<namespace>_<module>")), - new Simple("{$modulesDir}/<namespace>/<module>/view/<area>"), - new Simple("{$modulesDir}/<namespace>/<module>/view/base") - ) - ) - ); - } - - /** - * Retrieve newly created fallback rule for static view files, such as CSS, JavaScript, images, etc. - * - * @return RuleInterface - */ - public function createViewFileRule() - { - $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR); - $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR); - $pubLibDir = $this->filesystem->getPath(Filesystem::PUB_LIB_DIR); - return new ModularSwitch( - new Composite( - array( - new Theme( - new Composite( - array( - new Simple("{$themesDir}/<area>/<theme_path>/i18n/<locale>", array('locale')), - new Simple("{$themesDir}/<area>/<theme_path>") - ) - ) - ), - new Simple($pubLibDir) - ) - ), - new Composite( - array( - new Theme( - new Composite( - array( - new Simple( - "{$themesDir}/<area>/<theme_path>/i18n/<locale>/<namespace>_<module>", - array('locale') - ), - new Simple("{$themesDir}/<area>/<theme_path>/<namespace>_<module>") - ) - ) - ), - new Simple("{$modulesDir}/<namespace>/<module>/view/<area>/i18n/<locale>", array('locale')), - new Simple("{$modulesDir}/<namespace>/<module>/view/<area>"), - new Simple("{$modulesDir}/<namespace>/<module>/view/base") - ) - ) - ); - } -} diff --git a/lib/Magento/Framework/View/Design/FileResolution/Strategy/Fallback.php b/lib/Magento/Framework/View/Design/FileResolution/Strategy/Fallback.php deleted file mode 100644 index 9ee1831354020cd820e19ea9d8568e59d0a1b4c3..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Design/FileResolution/Strategy/Fallback.php +++ /dev/null @@ -1,202 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\FileResolution\Strategy; - -use Magento\Framework\App\Filesystem; -use Magento\Framework\View\Design\Fallback\Factory; -use Magento\Framework\View\Design\Fallback\Rule\RuleInterface; -use Magento\Framework\View\Design\ThemeInterface; -use Magento\Framework\Filesystem\Directory\Read; - -/** - * Class Fallback - * - * Resolver, which performs full search of files, according to fallback rules - */ -class Fallback implements FileInterface, LocaleInterface, ViewInterface -{ - /** - * Fallback factory - * - * @var Factory - */ - protected $fallbackFactory; - - /** - * Rule file - * - * @var RuleInterface - */ - protected $ruleFile; - - /** - * Rule locale file - * - * @var RuleInterface - */ - protected $ruleLocaleFile; - - /** - * Rule view file - * - * @var RuleInterface - */ - protected $ruleViewFile; - - /** - * Root directory with read access - * - * @var Read - */ - protected $rootDirectory; - - /** - * Constructor - * - * @param Filesystem $filesystem - * @param Factory $fallbackFactory - */ - public function __construct(Filesystem $filesystem, Factory $fallbackFactory) - { - $this->rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR); - $this->fallbackFactory = $fallbackFactory; - } - - /** - * Get existing file name, using fallback mechanism - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $file - * @param string|null $module - * @return string - */ - public function getFile($area, ThemeInterface $themeModel, $file, $module = null) - { - $params = array('area' => $area, 'theme' => $themeModel, 'namespace' => null, 'module' => null); - if ($module) { - list($params['namespace'], $params['module']) = explode('_', $module, 2); - } - return $this->resolveFile($this->getFileRule(), $file, $params); - } - - /** - * Get locale file name, using fallback mechanism - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $locale - * @param string $file - * @return string - */ - public function getLocaleFile($area, ThemeInterface $themeModel, $locale, $file) - { - $params = array('area' => $area, 'theme' => $themeModel, 'locale' => $locale); - return $this->resolveFile($this->getLocaleFileRule(), $file, $params); - } - - /** - * Get theme file name, using fallback mechanism - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $locale - * @param string $file - * @param string|null $module - * @return string - */ - public function getViewFile($area, ThemeInterface $themeModel, $locale, $file, $module = null) - { - $params = array( - 'area' => $area, - 'theme' => $themeModel, - 'locale' => $locale, - 'namespace' => null, - 'module' => null - ); - if ($module) { - list($params['namespace'], $params['module']) = explode('_', $module, 2); - } - return $this->resolveFile($this->getViewFileRule(), $file, $params); - } - - /** - * Retrieve fallback rule for dynamic view files - * - * @return RuleInterface - */ - protected function getFileRule() - { - if (!$this->ruleFile) { - $this->ruleFile = $this->fallbackFactory->createFileRule(); - } - return $this->ruleFile; - } - - /** - * Retrieve fallback rule for locale files - * - * @return RuleInterface - */ - protected function getLocaleFileRule() - { - if (!$this->ruleLocaleFile) { - $this->ruleLocaleFile = $this->fallbackFactory->createLocaleFileRule(); - } - return $this->ruleLocaleFile; - } - - /** - * Retrieve fallback rule for static view files - * - * @return RuleInterface - */ - protected function getViewFileRule() - { - if (!$this->ruleViewFile) { - $this->ruleViewFile = $this->fallbackFactory->createViewFileRule(); - } - return $this->ruleViewFile; - } - - /** - * Get path of file after using fallback rules - * - * @param RuleInterface $fallbackRule - * @param string $file - * @param array $params - * @return string - */ - protected function resolveFile(RuleInterface $fallbackRule, $file, $params = array()) - { - $path = ''; - foreach ($fallbackRule->getPatternDirs($params) as $dir) { - $path = "{$dir}/{$file}"; - if ($this->rootDirectory->isExist($this->rootDirectory->getRelativePath($path))) { - return $path; - } - } - return $path; - } -} diff --git a/lib/Magento/Framework/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php b/lib/Magento/Framework/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php deleted file mode 100644 index f9baa80b3408fa69e87dd59ea96b746a7c88f48a..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php +++ /dev/null @@ -1,296 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\FileResolution\Strategy\Fallback; - -use Magento\Framework\App\Filesystem; -use Magento\Framework\View\Design\FileResolution\Strategy\Fallback; -use Magento\Framework\View\Design\FileResolution\Strategy\FileInterface; -use Magento\Framework\View\Design\FileResolution\Strategy\LocaleInterface; -use Magento\Framework\View\Design\FileResolution\Strategy\View\NotifiableInterface; -use Magento\Framework\View\Design\FileResolution\Strategy\ViewInterface; -use Magento\Framework\View\Design\ThemeInterface; -use Magento\Framework\Filesystem\Directory\Write; - -/** - * Caching Proxy - * - * A proxy for the Fallback resolver. This proxy processes fallback resolution calls by either using map of cached - * paths, or passing resolution to the Fallback resolver. - */ -class CachingProxy implements FileInterface, LocaleInterface, ViewInterface, NotifiableInterface -{ - /** - * Proxied fallback model - * - * @var Fallback - */ - protected $fallback; - - /** - * Path to maps directory - * - * @var string - */ - protected $mapDir; - - /** - * Path to Magento base directory - * - * @var string - */ - protected $baseDir; - - /** - * Whether object can save map changes upon destruction - * - * @var bool - */ - protected $canSaveMap; - - /** - * Var directory - * - * @var Write - */ - protected $varDirectory; - - /** - * Cached fallback map sections - * - * @var array - */ - protected $sections = array(); - - /** - * Constructor - * - * @param Fallback $fallback - * @param Filesystem $filesystem - * @param string $mapDir - * @param string $baseDir - * @param bool $canSaveMap - * @throws \InvalidArgumentException - */ - public function __construct( - Fallback $fallback, - Filesystem $filesystem, - $mapDir, - // magento root - $baseDir, - $canSaveMap = true - ) { - $this->fallback = $fallback; - $this->varDirectory = $filesystem->getDirectoryWrite(Filesystem::VAR_DIR); - $rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR); - if (!$rootDirectory->isDirectory($rootDirectory->getRelativePath($baseDir))) { - throw new \InvalidArgumentException("Wrong base directory specified: '{$baseDir}'"); - } - $this->baseDir = $baseDir; - $this->mapDir = $this->varDirectory->getRelativePath($mapDir); - $this->canSaveMap = $canSaveMap; - } - - /** - * Write the serialized map to the section files - */ - public function __destruct() - { - if (!$this->canSaveMap) { - return; - } - if (!$this->varDirectory->isDirectory($this->mapDir)) { - $this->varDirectory->create($this->mapDir); - } - foreach ($this->sections as $sectionFile => $section) { - if (!$section['is_changed']) { - continue; - } - $filePath = $this->mapDir . '/' . $sectionFile; - $this->varDirectory->writeFile($filePath, serialize($section['data'])); - } - } - - /** - * Proxy to \Magento\Framework\View\Design\FileResolution\Strategy\Fallback::getFile() - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $file - * @param string|null $module - * @return string - */ - public function getFile($area, ThemeInterface $themeModel, $file, $module = null) - { - $result = $this->getFromMap('file', $area, $themeModel, null, $module, $file); - if (!$result) { - $result = $this->fallback->getFile($area, $themeModel, $file, $module); - $this->setToMap('file', $area, $themeModel, null, $module, $file, $result); - } - return $result; - } - - /** - * Proxy to \Magento\Framework\View\Design\FileResolution\Strategy\Fallback::getLocaleFile() - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $locale - * @param string $file - * @return string - */ - public function getLocaleFile($area, ThemeInterface $themeModel, $locale, $file) - { - $result = $this->getFromMap('locale', $area, $themeModel, $locale, null, $file); - if (!$result) { - $result = $this->fallback->getLocaleFile($area, $themeModel, $locale, $file); - $this->getFromMap('locale', $area, $themeModel, $locale, null, $file, $result); - } - return $result; - } - - /** - * Proxy to \Magento\Framework\View\Design\FileResolution\Strategy\Fallback::getViewFile() - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $locale - * @param string $file - * @param string|null $module - * @return string - */ - public function getViewFile($area, ThemeInterface $themeModel, $locale, $file, $module = null) - { - $result = $this->getFromMap('view', $area, $themeModel, $locale, $module, $file); - if (!$result) { - $result = $this->fallback->getViewFile($area, $themeModel, $locale, $file, $module); - $this->getFromMap('view', $area, $themeModel, $locale, $module, $file, $result); - } - return $result; - } - - /** - * Get stored full file path - * - * @param string $fileType - * @param string $area - * @param ThemeInterface $theme - * @param string|null $locale - * @param string|null $module - * @param string $file - * @return null|string - */ - protected function getFromMap($fileType, $area, ThemeInterface $theme, $locale, $module, $file) - { - $sectionKey = $this->loadSection($area, $theme, $locale); - $fileKey = "{$fileType}|{$file}|{$module}"; - if (isset($this->sections[$sectionKey]['data'][$fileKey])) { - $value = $this->sections[$sectionKey]['data'][$fileKey]; - if ('' !== (string)$value) { - $value = $this->baseDir . '/' . $value; - } - return $value; - } - return null; - } - - /** - * Set stored full file path - * - * @param string $fileType - * @param string $area - * @param ThemeInterface $theme - * @param string|null $locale - * @param string|null $module - * @param string $file - * @param string $filePath - * @return void - * @throws \Magento\Framework\Exception - */ - protected function setToMap($fileType, $area, ThemeInterface $theme, $locale, $module, $file, $filePath) - { - if (0 !== strpos($filePath, $this->baseDir)) { - throw new \Magento\Framework\Exception( - "Attempt to store fallback path '{$filePath}', which is not within '{$this->baseDir}'" - ); - } - $value = ltrim(substr($filePath, strlen($this->baseDir)), '/\\'); - - $sectionKey = $this->loadSection($area, $theme, $locale); - $fileKey = "{$fileType}|{$file}|{$module}"; - $this->sections[$sectionKey]['data'][$fileKey] = $value; - $this->sections[$sectionKey]['is_changed'] = true; - } - - /** - * Compose section file name - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string|null $locale - * @return string - */ - protected function getSectionFile($area, ThemeInterface $themeModel, $locale) - { - $theme = $themeModel->getId() ?: md5($themeModel->getThemePath()); - return "{$area}_{$theme}_{$locale}.ser"; - } - - /** - * Load section and return its key - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string|null $locale - * @return string - */ - protected function loadSection($area, ThemeInterface $themeModel, $locale) - { - $sectionFile = $this->getSectionFile($area, $themeModel, $locale); - if (!isset($this->sections[$sectionFile])) { - $filePath = $this->mapDir . '/' . $sectionFile; - $this->sections[$sectionFile] = array('data' => array(), 'is_changed' => false); - if ($this->varDirectory->isFile($filePath)) { - $this->sections[$sectionFile]['data'] = unserialize($this->varDirectory->readFile($filePath)); - } - } - return $sectionFile; - } - - /** - * Set file path to map. - * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $locale - * @param string|null $module - * @param string $file - * @param string $newFilePath - * @return $this - */ - public function setViewFilePathToMap($area, ThemeInterface $themeModel, $locale, $module, $file, $newFilePath) - { - $this->setToMap('view', $area, $themeModel, $locale, $module, $file, $newFilePath); - return $this; - } -} diff --git a/lib/Magento/Framework/View/Design/FileResolution/StrategyPool.php b/lib/Magento/Framework/View/Design/FileResolution/StrategyPool.php deleted file mode 100644 index 71c7b12763e3a08a98a6c460999ca77e61326e90..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Design/FileResolution/StrategyPool.php +++ /dev/null @@ -1,199 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Design\FileResolution; - -use Magento\Framework\Exception; -use Magento\Framework\App\State; -use Magento\Framework\App\Filesystem; -use Magento\Framework\ObjectManager; - -/** - * Strategy Pool - * - * Class for choosing the strategy for file resolution - */ -class StrategyPool -{ - /** - * Sub-directory where to store maps of view files fallback (if used) - */ - const FALLBACK_MAP_DIR = 'maps/fallback'; - - /** - * Object manager - * - * @var ObjectManager - */ - protected $objectManager; - - /** - * Application state - * - * @var string - */ - protected $appState; - - /** - * File system - * - * @var Filesystem - */ - protected $filesystem; - - /** - * Pool of strategy objects - * - * @var array - */ - protected $strategyPool = array(); - - /** - * Settings for strategies that are used to resolve file paths - * - * @var array - */ - protected $strategies = array( - 'production_mode' => array( - 'file' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy', - 'locale' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback', - 'view' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback' - ), - 'caching_map' => array( - 'file' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy', - 'locale' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy', - 'view' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy' - ), - 'full_check' => array( - 'file' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback', - 'locale' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback', - 'view' => 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback' - ) - ); - - /** - * Constructor - * - * @param ObjectManager $objectManager - * @param State $appState - * @param Filesystem $filesystem - */ - public function __construct(ObjectManager $objectManager, State $appState, Filesystem $filesystem) - { - $this->objectManager = $objectManager; - $this->appState = $appState; - $this->filesystem = $filesystem; - } - - /** - * Get strategy to resolve dynamic files (e.g. templates) - * - * @param bool $skipProxy - * @return \Magento\Framework\View\Design\FileResolution\Strategy\FileInterface - */ - public function getFileStrategy($skipProxy = false) - { - return $this->getStrategy('file', $skipProxy); - } - - /** - * Get strategy to resolve locale files (e.g. locale settings) - * - * @param bool $skipProxy - * @return \Magento\Framework\View\Design\FileResolution\Strategy\LocaleInterface - */ - public function getLocaleStrategy($skipProxy = false) - { - return $this->getStrategy('locale', $skipProxy); - } - - /** - * Get strategy to resolve static view files (e.g. javascripts) - * - * @param bool $skipProxy - * @return \Magento\Framework\View\Design\FileResolution\Strategy\ViewInterface - */ - public function getViewStrategy($skipProxy = false) - { - return $this->getStrategy('view', $skipProxy); - } - - /** - * Determine the strategy to be used. Create or get it from the pool. - * - * @param string $fileType - * @param bool $skipProxy - * @return mixed - */ - protected function getStrategy($fileType, $skipProxy = false) - { - $strategyClass = $this->getStrategyClass($fileType, $skipProxy); - if (!isset($this->strategyPool[$strategyClass])) { - $this->strategyPool[$strategyClass] = $this->createStrategy($strategyClass); - } - return $this->strategyPool[$strategyClass]; - } - - /** - * Find the class of strategy, that must be used to resolve files of $fileType - * - * @param string $fileType - * @param bool $skipProxy - * @return string - * @throws Exception - */ - protected function getStrategyClass($fileType, $skipProxy = false) - { - $mode = $this->appState->getMode(); - if ($mode == State::MODE_PRODUCTION) { - $strategyClasses = $this->strategies['production_mode']; - } elseif ($mode == State::MODE_DEVELOPER || $skipProxy) { - $strategyClasses = $this->strategies['full_check']; - } elseif ($mode == State::MODE_DEFAULT) { - $strategyClasses = $this->strategies['caching_map']; - } else { - throw new Exception("Unknown mode to choose strategy: {$mode}"); - } - return $strategyClasses[$fileType]; - } - - /** - * Create strategy by its class name - * - * @param string $className - * @return mixed - */ - protected function createStrategy($className) - { - switch ($className) { - case 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy': - $mapDir = $this->filesystem->getPath(Filesystem::VAR_DIR) . '/' . self::FALLBACK_MAP_DIR; - $arguments = array('mapDir' => $mapDir, 'baseDir' => $this->filesystem->getPath(Filesystem::ROOT_DIR)); - break; - default: - $arguments = array(); - break; - } - return $this->objectManager->create($className, $arguments); - } -} diff --git a/lib/Magento/Framework/View/FileSystem.php b/lib/Magento/Framework/View/FileSystem.php deleted file mode 100644 index 2110ea62b6071b733e57c17ab2b127da22abdbe9..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/FileSystem.php +++ /dev/null @@ -1,174 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -/** - * Model that finds file paths by their fileId - */ -class FileSystem -{ - /** - * Model, used to resolve the file paths - * - * @var \Magento\Framework\View\Design\FileResolution\StrategyPool - */ - protected $_resolutionPool; - - /** - * View service - * - * @var Service - */ - protected $_viewService; - - /** - * Constructor - * - * @param \Magento\Framework\View\Design\FileResolution\StrategyPool $resolutionPool - * @param Service $viewService - */ - public function __construct( - \Magento\Framework\View\Design\FileResolution\StrategyPool $resolutionPool, - Service $viewService - ) { - $this->_resolutionPool = $resolutionPool; - $this->_viewService = $viewService; - } - - /** - * Get existing file name with fallback to default - * - * @param string $fileId - * @param array $params - * @return string - */ - public function getFilename($fileId, array $params = array()) - { - $filePath = $this->_viewService->extractScope($this->normalizePath($fileId), $params); - $this->_viewService->updateDesignParams($params); - return $this->_resolutionPool->getFileStrategy( - !empty($params['skipProxy']) - )->getFile( - $params['area'], - $params['themeModel'], - $filePath, - $params['module'] - ); - } - - /** - * Get a locale file - * - * @param string $file - * @param array $params - * @return string - */ - public function getLocaleFileName($file, array $params = array()) - { - $this->_viewService->updateDesignParams($params); - $skipProxy = isset($params['skipProxy']) && $params['skipProxy']; - return $this->_resolutionPool->getLocaleStrategy( - $skipProxy - )->getLocaleFile( - $params['area'], - $params['themeModel'], - $params['locale'], - $file - ); - } - - /** - * Find a view file using fallback mechanism - * - * @param string $fileId - * @param array $params - * @return string - */ - public function getViewFile($fileId, array $params = array()) - { - $filePath = $this->_viewService->extractScope($this->normalizePath($fileId), $params); - $this->_viewService->updateDesignParams($params); - $skipProxy = isset($params['skipProxy']) && $params['skipProxy']; - return $this->_resolutionPool->getViewStrategy( - $skipProxy - )->getViewFile( - $params['area'], - $params['themeModel'], - $params['locale'], - $filePath, - $params['module'] - ); - } - - /** - * Notify that view file resolved path was changed (i.e. it was published to a public directory) - * - * @param Publisher\FileInterface $publisherFile - * @return $this - */ - public function notifyViewFileLocationChanged(Publisher\FileInterface $publisherFile) - { - $params = $publisherFile->getViewParams(); - $skipProxy = isset($params['skipProxy']) && $params['skipProxy']; - $strategy = $this->_resolutionPool->getViewStrategy($skipProxy); - if ($strategy instanceof Design\FileResolution\Strategy\View\NotifiableInterface) { - /** @var $strategy Design\FileResolution\Strategy\View\NotifiableInterface */ - $strategy->setViewFilePathToMap( - $params['area'], - $params['themeModel'], - $params['locale'], - $params['module'], - $publisherFile->getFilePath(), - $publisherFile->buildPublicViewFilename() - ); - } - - return $this; - } - - /** - * Remove unmeaning path chunks from path - * - * @param string $path - * @return string - */ - public function normalizePath($path) - { - $parts = explode('/', $path); - $result = array(); - - foreach ($parts as $part) { - if ('..' === $part) { - if (!count($result) || $result[count($result) - 1] == '..') { - $result[] = $part; - } else { - array_pop($result); - } - } elseif ('.' !== $part) { - $result[] = $part; - } - } - return implode('/', $result); - } -} diff --git a/lib/Magento/Framework/View/Publisher.php b/lib/Magento/Framework/View/Publisher.php deleted file mode 100644 index 90f17c2361784cb417d88c92ba0a722a40520e3f..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Publisher.php +++ /dev/null @@ -1,203 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -use Magento\Framework\Filesystem\Directory\WriteInterface; - -/** - * Magento view file publisher - */ -class Publisher implements PublicFilesManagerInterface -{ - /**#@+ - * Extensions group for static files - */ - const CONTENT_TYPE_CSS = 'css'; - - const CONTENT_TYPE_JS = 'js'; - - /**#@-*/ - - /**#@+ - * Protected extensions group for publication mechanism - */ - const CONTENT_TYPE_PHP = 'php'; - - const CONTENT_TYPE_PHTML = 'phtml'; - - const CONTENT_TYPE_XML = 'xml'; - - /**#@-*/ - - /** - * View file system - * - * @var \Magento\Framework\View\FileSystem - */ - protected $viewFileSystem; - - /** - * Pre-processor - * - * @var \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface - */ - protected $preProcessor; - - /** - * Publisher file factory - * - * @var Publisher\FileFactory - */ - protected $fileFactory; - - /** - * Root directory - * - * @var WriteInterface - */ - protected $rootDirectory; - - /** - * Pre-processors temporary directory - * - * @var WriteInterface - */ - protected $tmpDirectory; - - /** - * Public directory - * - * @var WriteInterface - */ - protected $pubDirectory; - - /** - * @param \Magento\Framework\App\Filesystem $filesystem - * @param FileSystem $viewFileSystem - * @param Asset\PreProcessor\PreProcessorInterface $preProcessor - * @param Publisher\FileFactory $fileFactory - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\FileSystem $viewFileSystem, - \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface $preProcessor, - Publisher\FileFactory $fileFactory - ) { - $this->rootDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); - $this->tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); - $this->pubDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); - $this->viewFileSystem = $viewFileSystem; - $this->preProcessor = $preProcessor; - $this->fileFactory = $fileFactory; - } - - /** - * Get published file path - * - * @param string $filePath - * @param array $params - * @return string - */ - public function getPublicFilePath($filePath, $params) - { - return $this->getPublishedFilePath($this->fileFactory->create($filePath, $params)); - } - - /** - * @param string $extension - * @return bool - */ - protected function isAllowedExtension($extension) - { - $protectedExtensions = array(self::CONTENT_TYPE_PHP, self::CONTENT_TYPE_PHTML, self::CONTENT_TYPE_XML); - if (in_array($extension, $protectedExtensions)) { - return false; - } - return true; - } - - /** - * Get published file path - * - * Check, if requested theme file has public access, and move it to public folder, if the file has no public access - * - * @param Publisher\FileInterface $publisherFile - * @return string|null - * @throws \Magento\Framework\Exception - */ - protected function getPublishedFilePath(Publisher\FileInterface $publisherFile) - { - /** If $filePath points to file with protected extension - no publishing, return null */ - if (!$this->isAllowedExtension($publisherFile->getExtension())) { - return null; - } - - $fileToPublish = $this->preProcessor->process($publisherFile, $this->tmpDirectory); - - if (!$fileToPublish->isSourceFileExists()) { - throw new \Magento\Framework\Exception("Unable to locate theme file '{$fileToPublish->getFilePath()}'."); - } - - if (!$fileToPublish->isPublicationAllowed()) { - return $fileToPublish->getSourcePath(); - } - - $this->publishFile($fileToPublish); - return $fileToPublish->buildPublicViewFilename(); - } - - /** - * Publish file - * - * @param Publisher\FileInterface $publisherFile - * @return $this - */ - protected function publishFile(Publisher\FileInterface $publisherFile) - { - $sourcePath = $publisherFile->getSourcePath(); - $sourcePathRelative = $this->rootDirectory->getRelativePath($sourcePath); - - $targetPathRelative = $publisherFile->buildUniquePath(); - - $targetDirectory = $this->pubDirectory; - - $fileMTime = $this->rootDirectory->stat($sourcePathRelative)['mtime']; - if (!$targetDirectory->isExist( - $targetPathRelative - ) || $fileMTime != $targetDirectory->stat( - $targetPathRelative - )['mtime'] - ) { - if ($this->rootDirectory->isFile($sourcePathRelative)) { - $this->rootDirectory->copyFile($sourcePathRelative, $targetPathRelative, $targetDirectory); - $targetDirectory->touch($targetPathRelative, $fileMTime); - } elseif (!$targetDirectory->isDirectory($targetPathRelative)) { - $targetDirectory->create($targetPathRelative); - } - } - - $this->viewFileSystem->notifyViewFileLocationChanged($publisherFile); - return $this; - } -} diff --git a/lib/Magento/Framework/View/Publisher/CssFile.php b/lib/Magento/Framework/View/Publisher/CssFile.php deleted file mode 100644 index 1ee3422f5371d12c8dd7430dc016f900cdfd1621..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Publisher/CssFile.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -/** - * Publisher file type CSS - */ -class CssFile extends FileAbstract -{ - /** - * Determine whether a file needs to be published - * - * If sourcePath points to CSS file and developer mode is enabled - publish file - * - * @return bool - */ - public function isPublicationAllowed() - { - if ($this->isPublicationAllowed === null) { - $filePath = str_replace('\\', '/', $this->sourcePath); - - if ($this->isLibFile($filePath)) { - $this->isPublicationAllowed = false; - } elseif (!$this->isViewStaticFile($filePath)) { - $this->isPublicationAllowed = true; - } else { - $this->isPublicationAllowed = - $this->viewService->getAppMode() === \Magento\Framework\App\State::MODE_DEVELOPER; - } - } - return $this->isPublicationAllowed; - } - - /** - * Build unique file path for publication - * - * @return string - */ - public function buildUniquePath() - { - return $this->buildPublicViewRedundantFilename(); - } -} diff --git a/lib/Magento/Framework/View/Publisher/File.php b/lib/Magento/Framework/View/Publisher/File.php deleted file mode 100644 index 8edf4365474e7f57de04f6d4fafd3872316ca552..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Publisher/File.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -/** - * Basic publisher file type - */ -class File extends FileAbstract -{ - /** - * Determine whether a file needs to be published - * - * All files located in 'pub/lib' dir should not be published cause it's already publicly accessible. - * All other files must be processed either if they are not published already (located in 'pub/static'), - * or if they are css-files and we're working in developer mode. - * - * If sourcePath points to file in 'pub/lib' dir - no publishing required - * If sourcePath points to file in 'pub/static' dir - no publishing required - * - * @return bool - */ - public function isPublicationAllowed() - { - if ($this->isPublicationAllowed === null) { - $filePath = str_replace('\\', '/', $this->sourcePath); - $this->isPublicationAllowed = !$this->isLibFile($filePath) && !$this->isViewStaticFile($filePath); - } - - return $this->isPublicationAllowed; - } - - /** - * Build unique file path for publication - * - * @return string - */ - public function buildUniquePath() - { - if ($this->allowDuplication) { - $targetPath = $this->buildPublicViewRedundantFilename(); - } else { - $targetPath = $this->buildPublicViewSufficientFilename(); - } - return $targetPath; - } -} diff --git a/lib/Magento/Framework/View/Publisher/FileAbstract.php b/lib/Magento/Framework/View/Publisher/FileAbstract.php deleted file mode 100644 index d70e71d814be618c19e2d6d042489dbe4b2c9aa2..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Publisher/FileAbstract.php +++ /dev/null @@ -1,349 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -use Magento\Framework\Filesystem\Directory\WriteInterface; - -/** - * Abstract publisher file type - */ -abstract class FileAbstract implements FileInterface -{ - /** - * @var \Magento\Framework\App\Filesystem - */ - protected $filesystem; - - /** - * @var \Magento\Framework\View\Service - */ - protected $viewService; - - /** - * @var \Magento\Framework\Module\Dir\Reader - */ - protected $modulesReader; - - /** - * @var \Magento\Framework\View\FileSystem - */ - protected $viewFileSystem; - - /** - * @var string - */ - protected $filePath; - - /** - * @var string - */ - protected $extension; - - /** - * @var array - */ - protected $viewParams; - - /** - * @var string|null - */ - protected $sourcePath; - - /** - * Indicates how to materialize view files: with or without "duplication" - * - * @var bool - */ - protected $allowDuplication; - - /** - * @var bool - */ - protected $isPublicationAllowed; - - /** - * @var WriteInterface - */ - protected $rootDirectory; - - /** - * Makes sure that fallback is only used once per file and only if no 'valid' source path was passed to constructor - * - * @var bool - */ - protected $isFallbackUsed = false; - - /** - * Makes sure that source path is not overwritten when 'valid' value of source path was passed to constructor - * - * @var bool - */ - protected $isSourcePathProvided; - - /** - * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\Service $viewService - * @param \Magento\Framework\Module\Dir\Reader $modulesReader - * @param \Magento\Framework\View\FileSystem $viewFileSystem - * @param string $filePath - * @param bool $allowDuplication - * @param array $viewParams - * @param string|null $sourcePath - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\Service $viewService, - \Magento\Framework\Module\Dir\Reader $modulesReader, - \Magento\Framework\View\FileSystem $viewFileSystem, - $filePath, - $allowDuplication, - array $viewParams, - $sourcePath = null - ) { - $this->filesystem = $filesystem; - $this->viewService = $viewService; - $this->modulesReader = $modulesReader; - $this->filePath = $filePath; - $this->allowDuplication = $allowDuplication; - $this->viewParams = $viewParams; - $this->viewFileSystem = $viewFileSystem; - $this->rootDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); - $this->setSourcePath($sourcePath); - $this->isSourcePathProvided = $sourcePath !== null; - } - - /** - * Determine whether a file needs to be published - * - * All files located in 'pub/lib' dir should not be published cause it's already publicly accessible. - * All other files must be processed either if they are not published already (located in 'pub/static'), - * or if they are css-files and we're working in developer mode. - * - * If sourcePath points to file in 'pub/lib' dir - no publishing required - * If sourcePath points to file in 'pub/static' dir - no publishing required - * - * @return bool - */ - abstract public function isPublicationAllowed(); - - /** - * Build unique file path for publication - * - * @return string - */ - abstract public function buildUniquePath(); - - /** - * Original file extension - * - * @return string - */ - public function getExtension() - { - if ($this->extension === null) { - $this->extension = strtolower(pathinfo($this->getFilePath(), PATHINFO_EXTENSION)); - } - return $this->extension; - } - - /** - * @return bool - */ - public function isSourceFileExists() - { - return $this->getSourcePath() !== null; - } - - /** - * @return string - */ - public function getFilePath() - { - return $this->filePath; - } - - /** - * @return array - */ - public function getViewParams() - { - return $this->viewParams; - } - - /** - * Build path to file located in public folder - * - * @return string - */ - public function buildPublicViewFilename() - { - return $this->viewService->getPublicDir() . '/' . $this->buildUniquePath(); - } - - /** - * @return string|null - */ - public function getSourcePath() - { - if (!$this->isSourcePathProvided && !$this->isFallbackUsed) { - $this->isFallbackUsed = true; - - // Fallback look-up for view files. Remember it can be file of any type: CSS, LESS, JS, image - $fallbackSourcePath = $this->viewFileSystem->getViewFile($this->getFilePath(), $this->getViewParams()); - $this->setSourcePath($fallbackSourcePath); - } - return $this->sourcePath; - } - - /** - * @param string $sourcePath - * @return $this - */ - protected function setSourcePath($sourcePath) - { - if ($sourcePath === null || !$this->rootDirectory->isExist($this->rootDirectory->getRelativePath($sourcePath)) - ) { - $this->sourcePath = null; - } else { - $this->sourcePath = $sourcePath; - } - - return $this; - } - - /** - * @param string $filePath - * @return bool - */ - protected function isLibFile($filePath) - { - $pubLibDir = $this->filesystem->getPath(\Magento\Framework\App\Filesystem::PUB_LIB_DIR) . '/'; - if (strncmp($filePath, $pubLibDir, strlen($pubLibDir)) === 0) { - return true; - } - return false; - } - - /** - * @param string $filePath - * @return bool - */ - protected function isViewStaticFile($filePath) - { - $pubStaticDir = $this->filesystem->getPath(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) . '/'; - if (strncmp($filePath, $pubStaticDir, strlen($pubStaticDir)) === 0) { - return true; - } - return false; - } - - /** - * Build public filename for a theme file that always includes area/package/theme/locate parameters - * - * @return string - */ - protected function buildPublicViewRedundantFilename() - { - /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ - $theme = $this->getViewParams()['themeModel']; - if ($theme->getThemePath()) { - $designPath = $theme->getThemePath(); - } elseif ($theme->getId()) { - $designPath = self::PUBLIC_THEME_DIR . $theme->getId(); - } else { - $designPath = self::PUBLIC_VIEW_DIR; - } - - $publicFile = $this->getViewParams()['area'] . - '/' . - $designPath . - '/' . - $this->getViewParams()['locale'] . - ($this->getViewParams()['module'] ? '/' . - $this->getViewParams()['module'] : '') . - '/' . - $this->getFilePath(); - - return $publicFile; - } - - /** - * Build public filename for a view file that sufficiently depends on the passed parameters - * - * @return string - */ - protected function buildPublicViewSufficientFilename() - { - $designDir = $this->filesystem->getPath(\Magento\Framework\App\Filesystem::THEMES_DIR) . '/'; - if (0 === strpos($this->getSourcePath(), $designDir)) { - // theme file - $publicFile = substr($this->getSourcePath(), strlen($designDir)); - } else { - // modular file - $module = $this->getViewParams()['module']; - $moduleDir = $this->modulesReader->getModuleDir('theme', $module) . '/'; - $publicFile = substr($this->getSourcePath(), strlen($moduleDir)); - $publicFile = self::PUBLIC_MODULE_DIR . '/' . $module . '/' . $publicFile; - } - return $publicFile; - } - - /** - * @return array - */ - public function __sleep() - { - if (!empty($this->viewParams['themeModel'])) { - $this->viewParams['themeId'] = $this->viewParams['themeModel']->getId(); - unset($this->viewParams['themeModel']); - } - - return array( - 'filePath', - 'extension', - 'viewParams', - 'sourcePath', - 'allowDuplication', - 'isPublicationAllowed', - 'isFallbackUsed', - 'isSourcePathProvided' - ); - } - - /** - * @return void - */ - public function __wakeup() - { - $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); - $this->filesystem = $objectManager->get('\Magento\Framework\App\Filesystem'); - $this->viewService = $objectManager->get('\Magento\Framework\View\Service'); - $this->modulesReader = $objectManager->get('\Magento\Framework\Module\Dir\Reader'); - $this->viewFileSystem = $objectManager->get('\Magento\Framework\View\FileSystem'); - - $this->viewService->updateDesignParams($this->viewParams); - - $this->rootDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); - } -} diff --git a/lib/Magento/Framework/View/Publisher/FileFactory.php b/lib/Magento/Framework/View/Publisher/FileFactory.php deleted file mode 100644 index b2da12dbdda1a7c41aa1b0aa273fd35222d522f9..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Publisher/FileFactory.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Publisher; - -use Magento\Framework\ObjectManager; - -/** - * Publisher file factory - */ -class FileFactory -{ - /** - * Default publisher file class - */ - const DEFAULT_FILE_INSTANCE_CLASS = 'Magento\Framework\View\Publisher\File'; - - /** - * @var ObjectManager - */ - protected $objectManager; - - /** - * @var string - */ - protected $instanceName; - - /** - * @var array - */ - protected $publisherFileTypes = array('css' => 'Magento\Framework\View\Publisher\CssFile'); - - /** - * @param ObjectManager $objectManager - * @param string $instanceName - */ - public function __construct(ObjectManager $objectManager, $instanceName = self::DEFAULT_FILE_INSTANCE_CLASS) - { - $this->objectManager = $objectManager; - $this->instanceName = $instanceName; - } - - /** - * Return newly created instance of a publisher file - * - * @param string $filePath - * @param array $viewParams - * @param null|string $sourcePath - * @return FileInterface - * @throws \UnexpectedValueException - */ - public function create($filePath, array $viewParams, $sourcePath = null) - { - $instanceName = $this->instanceName; - $extension = $this->getExtension($filePath); - if (isset($this->publisherFileTypes[$extension])) { - $instanceName = $this->publisherFileTypes[$extension]; - } - $publisherFile = $this->objectManager->create( - $instanceName, - array('filePath' => $filePath, 'viewParams' => $viewParams, 'sourcePath' => $sourcePath) - ); - - if (!$publisherFile instanceof FileInterface) { - throw new \UnexpectedValueException("{$instanceName} has to implement the publisher file interface."); - } - return $publisherFile; - } - - /** - * Get file extension by file path - * - * @param string $filePath - * @return string - */ - protected function getExtension($filePath) - { - return strtolower(pathinfo($filePath, PATHINFO_EXTENSION)); - } -} diff --git a/lib/Magento/Framework/View/RelatedFile.php b/lib/Magento/Framework/View/RelatedFile.php deleted file mode 100644 index f4ac7886def0007232e0adb37ed34dbc8d870bb6..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/RelatedFile.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -/** - * File path resolver - */ -class RelatedFile -{ - /** - * View service - * - * @var Service - */ - protected $viewService; - - /** - * View file system - * - * @var FileSystem - */ - protected $viewFileSystem; - - /** - * @param Service $viewService - * @param FileSystem $viewFileSystem - */ - public function __construct(Service $viewService, FileSystem $viewFileSystem) - { - $this->viewService = $viewService; - $this->viewFileSystem = $viewFileSystem; - } - - /** - * Get relative $fileUrl based on information about parent file path and name. - * - * @param string $relativeFilePath URL to the file that was extracted from $parentPath - * @param string $parentRelativePath original file name identifier that was requested for processing - * @param array &$params theme/module parameters array - * @return string - */ - public function buildPath($relativeFilePath, $parentRelativePath, &$params) - { - if (strpos($relativeFilePath, \Magento\Framework\View\Service::SCOPE_SEPARATOR)) { - $relativeFilePath = $this->viewService->extractScope($relativeFilePath, $params); - } else { - $relativeFilePath = dirname($parentRelativePath) . '/' . $relativeFilePath; - } - return $this->viewFileSystem->normalizePath($relativeFilePath); - } -} diff --git a/lib/Magento/Framework/View/Service.php b/lib/Magento/Framework/View/Service.php deleted file mode 100644 index 2aabbd3918375c26601bbcffa54edc41f079b02e..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Service.php +++ /dev/null @@ -1,189 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -/** - * Design service model - */ -class Service -{ - /** - * Scope separator - */ - const SCOPE_SEPARATOR = '::'; - - /** - * Application state - * - * @var \Magento\Framework\App\State - */ - protected $_appState; - - /** - * Design - * - * @var \Magento\Framework\View\DesignInterface - */ - private $_design; - - /** - * Theme factory - * - * @var \Magento\Framework\View\Design\Theme\FlyweightFactory - */ - protected $themeFactory; - - /** - * Pub directory - * - * @var string - */ - protected $_pubDirectory; - - /** - * Constructor - * - * @param \Magento\Framework\App\State $appState - * @param \Magento\Framework\View\DesignInterface $design - * @param \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory - * @param \Magento\Framework\App\Filesystem $filesystem - */ - public function __construct( - \Magento\Framework\App\State $appState, - \Magento\Framework\View\DesignInterface $design, - \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory, - \Magento\Framework\App\Filesystem $filesystem - ) { - $this->_appState = $appState; - $this->_design = $design; - $this->_pubDirectory = $filesystem->getPath(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); - $this->themeFactory = $themeFactory; - } - - /** - * Identify file scope if it defined in file name and override 'module' parameter in $params array - * - * It accepts $fileId e.g. \Magento\Core::prototype/magento.css and splits it to module part and path part. - * Then sets module path to $params['module'] and returns path part. - * - * @param string $fileId - * @param array &$params - * @return string - * @throws \Magento\Framework\Exception - */ - public function extractScope($fileId, array &$params) - { - if (strpos(str_replace('\\', '/', $fileId), './') !== false) { - throw new \Magento\Framework\Exception("File name '{$fileId}' is forbidden for security reasons."); - } - if (strpos($fileId, self::SCOPE_SEPARATOR) === false) { - $file = $fileId; - } else { - $fileId = explode(self::SCOPE_SEPARATOR, $fileId); - if (empty($fileId[0])) { - throw new \Magento\Framework\Exception('Scope separator "::" cannot be used without scope identifier.'); - } - $params['module'] = $fileId[0]; - $file = $fileId[1]; - } - return $file; - } - - /** - * Verify whether we should work with files - * - * @return bool - */ - public function isViewFileOperationAllowed() - { - return $this->getAppMode() != \Magento\Framework\App\State::MODE_PRODUCTION; - } - - /** - * Return whether developer mode is turned on - * - * @return string - */ - public function getAppMode() - { - return $this->_appState->getMode(); - } - - /** - * Return directory for theme files publication - * - * @return string - */ - public function getPublicDir() - { - return $this->_pubDirectory; - } - - /** - * Update required parameters with default values if custom not specified - * - * @param array &$params - * @return $this - * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - */ - public function updateDesignParams(array &$params) - { - $defaults = $this->_design->getDesignParams(); - - // Set area - if (empty($params['area'])) { - $params['area'] = $defaults['area']; - } - - // Set themeModel - $theme = null; - $area = $params['area']; - if (!empty($params['themeId'])) { - $theme = $params['themeId']; - } elseif (isset($params['theme'])) { - $theme = $params['theme']; - } elseif (empty($params['themeModel']) && $area !== $defaults['area']) { - $theme = $this->_design->getConfigurationDesignTheme($area); - } - - if ($theme) { - $params['themeModel'] = $this->themeFactory->create($theme, $area); - } elseif (empty($params['themeModel'])) { - $params['themeModel'] = $defaults['themeModel']; - } - - - // Set module - if (!array_key_exists('module', $params)) { - $params['module'] = false; - } - - // Set locale - if (empty($params['locale'])) { - $params['locale'] = $defaults['locale']; - } - return $this; - } -} diff --git a/lib/Magento/Framework/View/Url.php b/lib/Magento/Framework/View/Url.php deleted file mode 100644 index 845e0ce311b1241221d12ee2cc8525eeb0672d14..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Url.php +++ /dev/null @@ -1,220 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View; - -/** - * Builds URLs for publicly accessible files - */ -class Url -{ - /** - * XPath for configuration setting of signing static files - */ - const XML_PATH_STATIC_FILE_SIGNATURE = 'dev/static/sign'; - - /** - * File system - * - * @var \Magento\Framework\App\Filesystem - */ - protected $_filesystem; - - /** - * View service - * - * @var \Magento\Framework\View\Service - */ - protected $_viewService; - - /** - * Publisher - * - * @var \Magento\Framework\View\Publisher - */ - protected $_publisher; - - /** - * Deployed file manager - * - * @var \Magento\Framework\View\DeployedFilesManager - */ - protected $_deployedFileManager; - - /** - * URL builder - * - * @var \Magento\Framework\UrlInterface - */ - protected $_urlBuilder; - - /** - * Config - * - * @var \Magento\Framework\View\Url\ConfigInterface - */ - protected $_config; - - /** - * Map urls to app dirs - * - * @var array - */ - protected $_fileUrlMap; - - /** - * View file system - * - * @var \Magento\Framework\View\FileSystem - */ - protected $_viewFileSystem; - - /** - * Constructor - * - * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Magento\Framework\View\Url\ConfigInterface $config - * @param \Magento\Framework\View\Service $viewService - * @param \Magento\Framework\View\Publisher $publisher - * @param \Magento\Framework\View\DeployedFilesManager $deployedFileManager - * @param \Magento\Framework\View\FileSystem $viewFileSystem - * @param array $fileUrlMap - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\UrlInterface $urlBuilder, - \Magento\Framework\View\Url\ConfigInterface $config, - \Magento\Framework\View\Service $viewService, - \Magento\Framework\View\Publisher $publisher, - \Magento\Framework\View\DeployedFilesManager $deployedFileManager, - \Magento\Framework\View\FileSystem $viewFileSystem, - array $fileUrlMap = array() - ) { - $this->_filesystem = $filesystem; - $this->_urlBuilder = $urlBuilder; - $this->_config = $config; - $this->_viewService = $viewService; - $this->_publisher = $publisher; - $this->_deployedFileManager = $deployedFileManager; - $this->_viewFileSystem = $viewFileSystem; - $this->_fileUrlMap = $fileUrlMap; - } - - /** - * Retrieve view file URL - * - * Get URL to file base on theme file identifier. - * Publishes file there, if needed. - * - * @param string $fileId - * @param array $params - * @return string - */ - public function getViewFileUrl($fileId, array $params = array()) - { - $isSecure = isset($params['_secure']) ? (bool)$params['_secure'] : null; - unset($params['_secure']); - - $publicFilePath = $this->getViewFilePublicPath($fileId, $params); - $url = $this->getPublicFileUrl($publicFilePath, $isSecure); - - return $url; - } - - /** - * Get public file path - * - * @param string $fileId - * @param array $params - * @return string - */ - public function getViewFilePublicPath($fileId, array $params = array()) - { - $this->_viewService->updateDesignParams($params); - $filePath = $this->_viewService->extractScope($this->_viewFileSystem->normalizePath($fileId), $params); - - $publicFilePath = $this->_getFilesManager()->getPublicFilePath($filePath, $params); - - return $publicFilePath; - } - - /** - * Get url to public file - * - * @param string $publicFilePath - * @param bool|null $isSecure - * @return string - * @throws \Magento\Framework\Exception - */ - public function getPublicFileUrl($publicFilePath, $isSecure = null) - { - foreach ($this->_fileUrlMap as $urlMap) { - $dir = $this->_filesystem->getPath($urlMap['value']); - $publicFilePath = str_replace('\\', '/', $publicFilePath); - if (strpos($publicFilePath, $dir) === 0) { - $relativePath = ltrim(substr($publicFilePath, strlen($dir)), '\\/'); - $url = $this->_urlBuilder->getBaseUrl( - array('_type' => $urlMap['key'], '_secure' => $isSecure) - ) . $relativePath; - - if ($this->_isStaticFilesSigned() && $this->_viewService->isViewFileOperationAllowed()) { - $directory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - $fileMTime = $directory->stat($directory->getRelativePath($publicFilePath))['mtime']; - $url .= '?' . $fileMTime; - } - return $url; - } - } - - throw new \Magento\Framework\Exception( - "Cannot build URL for the file '{$publicFilePath}' because it does not reside in a public directory." - ); - } - - /** - * Check if static files have to be signed - * - * @return bool - */ - protected function _isStaticFilesSigned() - { - return (bool)$this->_config->getValue(self::XML_PATH_STATIC_FILE_SIGNATURE); - } - - /** - * Get files manager that is able to return file public path - * - * @return \Magento\Framework\View\PublicFilesManagerInterface - */ - protected function _getFilesManager() - { - if ($this->_viewService->isViewFileOperationAllowed()) { - $filesManager = $this->_publisher; - } else { - $filesManager = $this->_deployedFileManager; - } - - return $filesManager; - } -} diff --git a/lib/Magento/Framework/View/Url/CssResolver.php b/lib/Magento/Framework/View/Url/CssResolver.php deleted file mode 100644 index 71bf31fd448dd44ed37de540a7a3b6b6051d58e9..0000000000000000000000000000000000000000 --- a/lib/Magento/Framework/View/Url/CssResolver.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @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) - */ -namespace Magento\Framework\View\Url; - -/** - * Helper to work with CSS files - */ -class CssResolver -{ - /** - * PCRE that matches non-absolute URLs in CSS content - */ - const REGEX_CSS_RELATIVE_URLS = - '#url\s*\(\s*(?(?=\'|").)(?!http\://|https\://|/|data\:)(.+?)(?:[\#\?].*?|[\'"])?\s*\)#'; - - /** - * File system - * - * @var \Magento\Framework\App\Filesystem - */ - protected $filesystem; - - /** - * View file system - * - * @var \Magento\Framework\View\FileSystem - */ - protected $viewFileSystem; - - /** - * Constructor - * - * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\FileSystem $viewFileSystem - */ - public function __construct( - \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\FileSystem $viewFileSystem - ) { - $this->filesystem = $filesystem; - $this->viewFileSystem = $viewFileSystem; - } - - /** - * Replace relative URLs - * - * Go through CSS content and modify relative urls, when content is read at $originalPath and then put to $newPath - * - * @param string $cssContent - * @param string $originalPath - * @param string $newPath - * @param callable|null $cbRelUrlToPublicPath Optional custom callback to resolve relative urls to file paths - * @return string - */ - public function replaceCssRelativeUrls($cssContent, $originalPath, $newPath, $cbRelUrlToPublicPath = null) - { - $relativeUrls = $this->_extractCssRelativeUrls($cssContent); - foreach ($relativeUrls as $urlNotation => $originalRelativeUrl) { - if ($cbRelUrlToPublicPath) { - $filePath = call_user_func($cbRelUrlToPublicPath, $originalRelativeUrl); - } else { - $filePath = dirname($originalPath) . '/' . $originalRelativeUrl; - } - $filePath = $this->viewFileSystem->normalizePath(str_replace('\\', '/', $filePath)); - $relativePath = $this->_getFileRelativePath(str_replace('\\', '/', $newPath), $filePath); - $urlNotationNew = str_replace($originalRelativeUrl, $relativePath, $urlNotation); - $cssContent = str_replace($urlNotation, $urlNotationNew, $cssContent); - } - return $cssContent; - } - - /** - * Extract non-absolute URLs from a CSS content - * - * @param string $cssContent - * @return array - */ - protected function _extractCssRelativeUrls($cssContent) - { - preg_match_all(self::REGEX_CSS_RELATIVE_URLS, $cssContent, $matches); - if (!empty($matches[0]) && !empty($matches[1])) { - return array_combine($matches[0], $matches[1]); - } - return array(); - } - - /** - * Calculate relative path from a public file to another public file - * - * Example: public file to public file: - * pub/cache/_merged/hash.css -> pub/static/frontend/default/default/images/image.png - * Result: ../../frontend/default/default/images/image.png - * - * @param string $file Normalized absolute path to the file, which references $referencedFile - * @param string $referencedFile Normalized absolute path to the referenced file - * @return string - * @throws \Magento\Framework\Exception - */ - protected function _getFileRelativePath($file, $referencedFile) - { - /** - * We would like to properly calculate url relations, and do it for public files only. - * However, directory locations are not related to each other and to any of their urls. - * Thus, calculating relative path is not possible in general case. So we just assume, - * that urls follow the structure of directory paths. - */ - $topDir = $this->filesystem->getPath(\Magento\Framework\App\Filesystem::ROOT_DIR); - if (strpos($file, $topDir) !== 0 || strpos($referencedFile, $topDir) !== 0) { - throw new \Magento\Framework\Exception('Offset can be calculated for internal resources only.'); - } - - $offset = ''; - $currentDir = dirname($file); - while (strpos($referencedFile, $currentDir . '/') !== 0) { - $currentDir = dirname($currentDir); - $offset .= '../'; - } - $suffix = substr($referencedFile, strlen($currentDir) + 1); - return $offset . $suffix; - } -} diff --git a/lib/CardinalCommerce/CentinelClient.php b/lib/internal/CardinalCommerce/CentinelClient.php similarity index 100% rename from lib/CardinalCommerce/CentinelClient.php rename to lib/internal/CardinalCommerce/CentinelClient.php diff --git a/lib/CardinalCommerce/CentinelErrors.php b/lib/internal/CardinalCommerce/CentinelErrors.php similarity index 100% rename from lib/CardinalCommerce/CentinelErrors.php rename to lib/internal/CardinalCommerce/CentinelErrors.php diff --git a/lib/CardinalCommerce/XMLParser.php b/lib/internal/CardinalCommerce/XMLParser.php similarity index 100% rename from lib/CardinalCommerce/XMLParser.php rename to lib/internal/CardinalCommerce/XMLParser.php diff --git a/lib/Cm/Cache/Backend/File.php b/lib/internal/Cm/Cache/Backend/File.php similarity index 100% rename from lib/Cm/Cache/Backend/File.php rename to lib/internal/Cm/Cache/Backend/File.php diff --git a/lib/Cm/Cache/Backend/Redis.php b/lib/internal/Cm/Cache/Backend/Redis.php similarity index 100% rename from lib/Cm/Cache/Backend/Redis.php rename to lib/internal/Cm/Cache/Backend/Redis.php diff --git a/lib/Credis/Client.php b/lib/internal/Credis/Client.php similarity index 100% rename from lib/Credis/Client.php rename to lib/internal/Credis/Client.php diff --git a/lib/JSMin/jsmin.php b/lib/internal/JSMin/jsmin.php similarity index 100% rename from lib/JSMin/jsmin.php rename to lib/internal/JSMin/jsmin.php diff --git a/lib/Less/Autoloader.php b/lib/internal/Less/Autoloader.php similarity index 100% rename from lib/Less/Autoloader.php rename to lib/internal/Less/Autoloader.php diff --git a/lib/Less/Cache.php b/lib/internal/Less/Cache.php similarity index 100% rename from lib/Less/Cache.php rename to lib/internal/Less/Cache.php diff --git a/lib/Less/Colors.php b/lib/internal/Less/Colors.php similarity index 100% rename from lib/Less/Colors.php rename to lib/internal/Less/Colors.php diff --git a/lib/Less/Configurable.php b/lib/internal/Less/Configurable.php similarity index 100% rename from lib/Less/Configurable.php rename to lib/internal/Less/Configurable.php diff --git a/lib/Less/Environment.php b/lib/internal/Less/Environment.php similarity index 100% rename from lib/Less/Environment.php rename to lib/internal/Less/Environment.php diff --git a/lib/Less/Exception/Chunk.php b/lib/internal/Less/Exception/Chunk.php similarity index 100% rename from lib/Less/Exception/Chunk.php rename to lib/internal/Less/Exception/Chunk.php diff --git a/lib/Less/Exception/Compiler.php b/lib/internal/Less/Exception/Compiler.php similarity index 100% rename from lib/Less/Exception/Compiler.php rename to lib/internal/Less/Exception/Compiler.php diff --git a/lib/Less/Exception/Parser.php b/lib/internal/Less/Exception/Parser.php similarity index 100% rename from lib/Less/Exception/Parser.php rename to lib/internal/Less/Exception/Parser.php diff --git a/lib/Less/Functions.php b/lib/internal/Less/Functions.php similarity index 100% rename from lib/Less/Functions.php rename to lib/internal/Less/Functions.php diff --git a/lib/Less/LICENSE b/lib/internal/Less/LICENSE similarity index 100% rename from lib/Less/LICENSE rename to lib/internal/Less/LICENSE diff --git a/lib/Less/Less.php.combine b/lib/internal/Less/Less.php.combine similarity index 100% rename from lib/Less/Less.php.combine rename to lib/internal/Less/Less.php.combine diff --git a/lib/Less/Mime.php b/lib/internal/Less/Mime.php similarity index 100% rename from lib/Less/Mime.php rename to lib/internal/Less/Mime.php diff --git a/lib/Less/Output.php b/lib/internal/Less/Output.php similarity index 100% rename from lib/Less/Output.php rename to lib/internal/Less/Output.php diff --git a/lib/Less/Output/Mapped.php b/lib/internal/Less/Output/Mapped.php similarity index 100% rename from lib/Less/Output/Mapped.php rename to lib/internal/Less/Output/Mapped.php diff --git a/lib/Less/Parser.php b/lib/internal/Less/Parser.php similarity index 100% rename from lib/Less/Parser.php rename to lib/internal/Less/Parser.php diff --git a/lib/Less/SourceMap/Base64VLQ.php b/lib/internal/Less/SourceMap/Base64VLQ.php similarity index 100% rename from lib/Less/SourceMap/Base64VLQ.php rename to lib/internal/Less/SourceMap/Base64VLQ.php diff --git a/lib/Less/SourceMap/Generator.php b/lib/internal/Less/SourceMap/Generator.php similarity index 100% rename from lib/Less/SourceMap/Generator.php rename to lib/internal/Less/SourceMap/Generator.php diff --git a/lib/Less/Tree.php b/lib/internal/Less/Tree.php similarity index 100% rename from lib/Less/Tree.php rename to lib/internal/Less/Tree.php diff --git a/lib/Less/Tree/Alpha.php b/lib/internal/Less/Tree/Alpha.php similarity index 100% rename from lib/Less/Tree/Alpha.php rename to lib/internal/Less/Tree/Alpha.php diff --git a/lib/Less/Tree/Anonymous.php b/lib/internal/Less/Tree/Anonymous.php similarity index 100% rename from lib/Less/Tree/Anonymous.php rename to lib/internal/Less/Tree/Anonymous.php diff --git a/lib/Less/Tree/Assignment.php b/lib/internal/Less/Tree/Assignment.php similarity index 100% rename from lib/Less/Tree/Assignment.php rename to lib/internal/Less/Tree/Assignment.php diff --git a/lib/Less/Tree/Attribute.php b/lib/internal/Less/Tree/Attribute.php similarity index 100% rename from lib/Less/Tree/Attribute.php rename to lib/internal/Less/Tree/Attribute.php diff --git a/lib/Less/Tree/Call.php b/lib/internal/Less/Tree/Call.php similarity index 100% rename from lib/Less/Tree/Call.php rename to lib/internal/Less/Tree/Call.php diff --git a/lib/Less/Tree/Color.php b/lib/internal/Less/Tree/Color.php similarity index 100% rename from lib/Less/Tree/Color.php rename to lib/internal/Less/Tree/Color.php diff --git a/lib/Less/Tree/Comment.php b/lib/internal/Less/Tree/Comment.php similarity index 100% rename from lib/Less/Tree/Comment.php rename to lib/internal/Less/Tree/Comment.php diff --git a/lib/Less/Tree/Condition.php b/lib/internal/Less/Tree/Condition.php similarity index 100% rename from lib/Less/Tree/Condition.php rename to lib/internal/Less/Tree/Condition.php diff --git a/lib/Less/Tree/DefaultFunc.php b/lib/internal/Less/Tree/DefaultFunc.php similarity index 100% rename from lib/Less/Tree/DefaultFunc.php rename to lib/internal/Less/Tree/DefaultFunc.php diff --git a/lib/Less/Tree/DetachedRuleset.php b/lib/internal/Less/Tree/DetachedRuleset.php similarity index 100% rename from lib/Less/Tree/DetachedRuleset.php rename to lib/internal/Less/Tree/DetachedRuleset.php diff --git a/lib/Less/Tree/Dimension.php b/lib/internal/Less/Tree/Dimension.php similarity index 100% rename from lib/Less/Tree/Dimension.php rename to lib/internal/Less/Tree/Dimension.php diff --git a/lib/Less/Tree/Directive.php b/lib/internal/Less/Tree/Directive.php similarity index 100% rename from lib/Less/Tree/Directive.php rename to lib/internal/Less/Tree/Directive.php diff --git a/lib/Less/Tree/Element.php b/lib/internal/Less/Tree/Element.php similarity index 100% rename from lib/Less/Tree/Element.php rename to lib/internal/Less/Tree/Element.php diff --git a/lib/Less/Tree/Expression.php b/lib/internal/Less/Tree/Expression.php similarity index 100% rename from lib/Less/Tree/Expression.php rename to lib/internal/Less/Tree/Expression.php diff --git a/lib/Less/Tree/Extend.php b/lib/internal/Less/Tree/Extend.php similarity index 100% rename from lib/Less/Tree/Extend.php rename to lib/internal/Less/Tree/Extend.php diff --git a/lib/Less/Tree/Import.php b/lib/internal/Less/Tree/Import.php similarity index 100% rename from lib/Less/Tree/Import.php rename to lib/internal/Less/Tree/Import.php diff --git a/lib/Less/Tree/Javascript.php b/lib/internal/Less/Tree/Javascript.php similarity index 100% rename from lib/Less/Tree/Javascript.php rename to lib/internal/Less/Tree/Javascript.php diff --git a/lib/Less/Tree/Keyword.php b/lib/internal/Less/Tree/Keyword.php similarity index 100% rename from lib/Less/Tree/Keyword.php rename to lib/internal/Less/Tree/Keyword.php diff --git a/lib/Less/Tree/Media.php b/lib/internal/Less/Tree/Media.php similarity index 100% rename from lib/Less/Tree/Media.php rename to lib/internal/Less/Tree/Media.php diff --git a/lib/Less/Tree/Mixin/Call.php b/lib/internal/Less/Tree/Mixin/Call.php similarity index 100% rename from lib/Less/Tree/Mixin/Call.php rename to lib/internal/Less/Tree/Mixin/Call.php diff --git a/lib/Less/Tree/Mixin/Definition.php b/lib/internal/Less/Tree/Mixin/Definition.php similarity index 100% rename from lib/Less/Tree/Mixin/Definition.php rename to lib/internal/Less/Tree/Mixin/Definition.php diff --git a/lib/Less/Tree/NameValue.php b/lib/internal/Less/Tree/NameValue.php similarity index 100% rename from lib/Less/Tree/NameValue.php rename to lib/internal/Less/Tree/NameValue.php diff --git a/lib/Less/Tree/Negative.php b/lib/internal/Less/Tree/Negative.php similarity index 100% rename from lib/Less/Tree/Negative.php rename to lib/internal/Less/Tree/Negative.php diff --git a/lib/Less/Tree/Operation.php b/lib/internal/Less/Tree/Operation.php similarity index 100% rename from lib/Less/Tree/Operation.php rename to lib/internal/Less/Tree/Operation.php diff --git a/lib/Less/Tree/Paren.php b/lib/internal/Less/Tree/Paren.php similarity index 100% rename from lib/Less/Tree/Paren.php rename to lib/internal/Less/Tree/Paren.php diff --git a/lib/Less/Tree/Quoted.php b/lib/internal/Less/Tree/Quoted.php similarity index 100% rename from lib/Less/Tree/Quoted.php rename to lib/internal/Less/Tree/Quoted.php diff --git a/lib/Less/Tree/Rule.php b/lib/internal/Less/Tree/Rule.php similarity index 100% rename from lib/Less/Tree/Rule.php rename to lib/internal/Less/Tree/Rule.php diff --git a/lib/Less/Tree/Ruleset.php b/lib/internal/Less/Tree/Ruleset.php similarity index 100% rename from lib/Less/Tree/Ruleset.php rename to lib/internal/Less/Tree/Ruleset.php diff --git a/lib/Less/Tree/RulesetCall.php b/lib/internal/Less/Tree/RulesetCall.php similarity index 100% rename from lib/Less/Tree/RulesetCall.php rename to lib/internal/Less/Tree/RulesetCall.php diff --git a/lib/Less/Tree/Selector.php b/lib/internal/Less/Tree/Selector.php similarity index 100% rename from lib/Less/Tree/Selector.php rename to lib/internal/Less/Tree/Selector.php diff --git a/lib/Less/Tree/UnicodeDescriptor.php b/lib/internal/Less/Tree/UnicodeDescriptor.php similarity index 100% rename from lib/Less/Tree/UnicodeDescriptor.php rename to lib/internal/Less/Tree/UnicodeDescriptor.php diff --git a/lib/Less/Tree/Unit.php b/lib/internal/Less/Tree/Unit.php similarity index 100% rename from lib/Less/Tree/Unit.php rename to lib/internal/Less/Tree/Unit.php diff --git a/lib/Less/Tree/UnitConversions.php b/lib/internal/Less/Tree/UnitConversions.php similarity index 100% rename from lib/Less/Tree/UnitConversions.php rename to lib/internal/Less/Tree/UnitConversions.php diff --git a/lib/Less/Tree/Url.php b/lib/internal/Less/Tree/Url.php similarity index 100% rename from lib/Less/Tree/Url.php rename to lib/internal/Less/Tree/Url.php diff --git a/lib/Less/Tree/Value.php b/lib/internal/Less/Tree/Value.php similarity index 100% rename from lib/Less/Tree/Value.php rename to lib/internal/Less/Tree/Value.php diff --git a/lib/Less/Tree/Variable.php b/lib/internal/Less/Tree/Variable.php similarity index 100% rename from lib/Less/Tree/Variable.php rename to lib/internal/Less/Tree/Variable.php diff --git a/lib/Less/Version.php b/lib/internal/Less/Version.php similarity index 100% rename from lib/Less/Version.php rename to lib/internal/Less/Version.php diff --git a/lib/Less/Visitor.php b/lib/internal/Less/Visitor.php similarity index 100% rename from lib/Less/Visitor.php rename to lib/internal/Less/Visitor.php diff --git a/lib/Less/Visitor/extendFinder.php b/lib/internal/Less/Visitor/extendFinder.php similarity index 100% rename from lib/Less/Visitor/extendFinder.php rename to lib/internal/Less/Visitor/extendFinder.php diff --git a/lib/Less/Visitor/import.php b/lib/internal/Less/Visitor/import.php similarity index 100% rename from lib/Less/Visitor/import.php rename to lib/internal/Less/Visitor/import.php diff --git a/lib/Less/Visitor/joinSelector.php b/lib/internal/Less/Visitor/joinSelector.php similarity index 100% rename from lib/Less/Visitor/joinSelector.php rename to lib/internal/Less/Visitor/joinSelector.php diff --git a/lib/Less/Visitor/processExtends.php b/lib/internal/Less/Visitor/processExtends.php similarity index 100% rename from lib/Less/Visitor/processExtends.php rename to lib/internal/Less/Visitor/processExtends.php diff --git a/lib/Less/Visitor/toCSS.php b/lib/internal/Less/Visitor/toCSS.php similarity index 100% rename from lib/Less/Visitor/toCSS.php rename to lib/internal/Less/Visitor/toCSS.php diff --git a/lib/Less/VisitorReplacing.php b/lib/internal/Less/VisitorReplacing.php similarity index 100% rename from lib/Less/VisitorReplacing.php rename to lib/internal/Less/VisitorReplacing.php diff --git a/lib/LinLibertineFont/Bugs b/lib/internal/LinLibertineFont/Bugs similarity index 100% rename from lib/LinLibertineFont/Bugs rename to lib/internal/LinLibertineFont/Bugs diff --git a/lib/LinLibertineFont/ChangeLog.txt b/lib/internal/LinLibertineFont/ChangeLog.txt similarity index 100% rename from lib/LinLibertineFont/ChangeLog.txt rename to lib/internal/LinLibertineFont/ChangeLog.txt diff --git a/lib/LinLibertineFont/GPL.txt b/lib/internal/LinLibertineFont/GPL.txt similarity index 100% rename from lib/LinLibertineFont/GPL.txt rename to lib/internal/LinLibertineFont/GPL.txt diff --git a/lib/LinLibertineFont/LICENCE.txt b/lib/internal/LinLibertineFont/LICENCE.txt similarity index 100% rename from lib/LinLibertineFont/LICENCE.txt rename to lib/internal/LinLibertineFont/LICENCE.txt diff --git a/lib/LinLibertineFont/LinLibertineC_Re-2.8.0.ttf b/lib/internal/LinLibertineFont/LinLibertineC_Re-2.8.0.ttf similarity index 100% rename from lib/LinLibertineFont/LinLibertineC_Re-2.8.0.ttf rename to lib/internal/LinLibertineFont/LinLibertineC_Re-2.8.0.ttf diff --git a/lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf b/lib/internal/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf similarity index 100% rename from lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf rename to lib/internal/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf diff --git a/lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf b/lib/internal/LinLibertineFont/LinLibertine_It-2.8.2.ttf similarity index 100% rename from lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf rename to lib/internal/LinLibertineFont/LinLibertine_It-2.8.2.ttf diff --git a/lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf b/lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf similarity index 100% rename from lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf rename to lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf diff --git a/lib/LinLibertineFont/OFL.txt b/lib/internal/LinLibertineFont/OFL.txt similarity index 100% rename from lib/LinLibertineFont/OFL.txt rename to lib/internal/LinLibertineFont/OFL.txt diff --git a/lib/LinLibertineFont/Readme b/lib/internal/LinLibertineFont/Readme similarity index 100% rename from lib/LinLibertineFont/Readme rename to lib/internal/LinLibertineFont/Readme diff --git a/lib/LinLibertineFont/Readme-TEX.txt b/lib/internal/LinLibertineFont/Readme-TEX.txt similarity index 100% rename from lib/LinLibertineFont/Readme-TEX.txt rename to lib/internal/LinLibertineFont/Readme-TEX.txt diff --git a/lib/Magento/Framework/Acl.php b/lib/internal/Magento/Framework/Acl.php similarity index 100% rename from lib/Magento/Framework/Acl.php rename to lib/internal/Magento/Framework/Acl.php diff --git a/lib/Magento/Framework/Acl/Builder.php b/lib/internal/Magento/Framework/Acl/Builder.php similarity index 100% rename from lib/Magento/Framework/Acl/Builder.php rename to lib/internal/Magento/Framework/Acl/Builder.php diff --git a/lib/Magento/Framework/Acl/Cache.php b/lib/internal/Magento/Framework/Acl/Cache.php similarity index 100% rename from lib/Magento/Framework/Acl/Cache.php rename to lib/internal/Magento/Framework/Acl/Cache.php diff --git a/lib/Magento/Framework/Acl/CacheInterface.php b/lib/internal/Magento/Framework/Acl/CacheInterface.php similarity index 100% rename from lib/Magento/Framework/Acl/CacheInterface.php rename to lib/internal/Magento/Framework/Acl/CacheInterface.php diff --git a/lib/Magento/Framework/Acl/Loader/DefaultLoader.php b/lib/internal/Magento/Framework/Acl/Loader/DefaultLoader.php similarity index 100% rename from lib/Magento/Framework/Acl/Loader/DefaultLoader.php rename to lib/internal/Magento/Framework/Acl/Loader/DefaultLoader.php diff --git a/lib/Magento/Framework/Acl/Loader/Resource.php b/lib/internal/Magento/Framework/Acl/Loader/Resource.php similarity index 100% rename from lib/Magento/Framework/Acl/Loader/Resource.php rename to lib/internal/Magento/Framework/Acl/Loader/Resource.php diff --git a/lib/Magento/Framework/Acl/LoaderInterface.php b/lib/internal/Magento/Framework/Acl/LoaderInterface.php similarity index 100% rename from lib/Magento/Framework/Acl/LoaderInterface.php rename to lib/internal/Magento/Framework/Acl/LoaderInterface.php diff --git a/lib/Magento/Framework/Acl/Resource.php b/lib/internal/Magento/Framework/Acl/Resource.php similarity index 100% rename from lib/Magento/Framework/Acl/Resource.php rename to lib/internal/Magento/Framework/Acl/Resource.php diff --git a/lib/Magento/Framework/Acl/Resource/Config/Converter/Dom.php b/lib/internal/Magento/Framework/Acl/Resource/Config/Converter/Dom.php similarity index 100% rename from lib/Magento/Framework/Acl/Resource/Config/Converter/Dom.php rename to lib/internal/Magento/Framework/Acl/Resource/Config/Converter/Dom.php diff --git a/lib/Magento/Framework/Acl/Resource/Config/Reader/Filesystem.php b/lib/internal/Magento/Framework/Acl/Resource/Config/Reader/Filesystem.php similarity index 100% rename from lib/Magento/Framework/Acl/Resource/Config/Reader/Filesystem.php rename to lib/internal/Magento/Framework/Acl/Resource/Config/Reader/Filesystem.php diff --git a/lib/Magento/Framework/Acl/Resource/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Acl/Resource/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/Acl/Resource/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/Acl/Resource/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/Acl/Resource/Provider.php b/lib/internal/Magento/Framework/Acl/Resource/Provider.php similarity index 100% rename from lib/Magento/Framework/Acl/Resource/Provider.php rename to lib/internal/Magento/Framework/Acl/Resource/Provider.php diff --git a/lib/Magento/Framework/Acl/Resource/ProviderInterface.php b/lib/internal/Magento/Framework/Acl/Resource/ProviderInterface.php similarity index 100% rename from lib/Magento/Framework/Acl/Resource/ProviderInterface.php rename to lib/internal/Magento/Framework/Acl/Resource/ProviderInterface.php diff --git a/lib/Magento/Framework/Acl/Resource/TreeBuilder.php b/lib/internal/Magento/Framework/Acl/Resource/TreeBuilder.php similarity index 100% rename from lib/Magento/Framework/Acl/Resource/TreeBuilder.php rename to lib/internal/Magento/Framework/Acl/Resource/TreeBuilder.php diff --git a/lib/Magento/Framework/Acl/ResourceFactory.php b/lib/internal/Magento/Framework/Acl/ResourceFactory.php similarity index 100% rename from lib/Magento/Framework/Acl/ResourceFactory.php rename to lib/internal/Magento/Framework/Acl/ResourceFactory.php diff --git a/lib/Magento/Framework/Acl/Role/Registry.php b/lib/internal/Magento/Framework/Acl/Role/Registry.php similarity index 100% rename from lib/Magento/Framework/Acl/Role/Registry.php rename to lib/internal/Magento/Framework/Acl/Role/Registry.php diff --git a/lib/Magento/Framework/Acl/RootResource.php b/lib/internal/Magento/Framework/Acl/RootResource.php similarity index 100% rename from lib/Magento/Framework/Acl/RootResource.php rename to lib/internal/Magento/Framework/Acl/RootResource.php diff --git a/lib/Magento/Framework/Acl/etc/acl.xsd b/lib/internal/Magento/Framework/Acl/etc/acl.xsd similarity index 100% rename from lib/Magento/Framework/Acl/etc/acl.xsd rename to lib/internal/Magento/Framework/Acl/etc/acl.xsd diff --git a/lib/Magento/Framework/AclFactory.php b/lib/internal/Magento/Framework/AclFactory.php similarity index 100% rename from lib/Magento/Framework/AclFactory.php rename to lib/internal/Magento/Framework/AclFactory.php diff --git a/lib/Magento/Framework/App/AbstractShell.php b/lib/internal/Magento/Framework/App/AbstractShell.php similarity index 100% rename from lib/Magento/Framework/App/AbstractShell.php rename to lib/internal/Magento/Framework/App/AbstractShell.php diff --git a/lib/Magento/Framework/App/Action/AbstractAction.php b/lib/internal/Magento/Framework/App/Action/AbstractAction.php similarity index 100% rename from lib/Magento/Framework/App/Action/AbstractAction.php rename to lib/internal/Magento/Framework/App/Action/AbstractAction.php diff --git a/lib/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php similarity index 100% rename from lib/Magento/Framework/App/Action/Action.php rename to lib/internal/Magento/Framework/App/Action/Action.php diff --git a/lib/Magento/Framework/App/Action/Context.php b/lib/internal/Magento/Framework/App/Action/Context.php similarity index 100% rename from lib/Magento/Framework/App/Action/Context.php rename to lib/internal/Magento/Framework/App/Action/Context.php diff --git a/lib/Magento/Framework/App/Action/Exception.php b/lib/internal/Magento/Framework/App/Action/Exception.php similarity index 100% rename from lib/Magento/Framework/App/Action/Exception.php rename to lib/internal/Magento/Framework/App/Action/Exception.php diff --git a/lib/Magento/Framework/App/Action/Forward.php b/lib/internal/Magento/Framework/App/Action/Forward.php similarity index 100% rename from lib/Magento/Framework/App/Action/Forward.php rename to lib/internal/Magento/Framework/App/Action/Forward.php diff --git a/lib/Magento/Framework/App/Action/NotFoundException.php b/lib/internal/Magento/Framework/App/Action/NotFoundException.php similarity index 100% rename from lib/Magento/Framework/App/Action/NotFoundException.php rename to lib/internal/Magento/Framework/App/Action/NotFoundException.php diff --git a/lib/Magento/Framework/App/Action/Redirect.php b/lib/internal/Magento/Framework/App/Action/Redirect.php similarity index 100% rename from lib/Magento/Framework/App/Action/Redirect.php rename to lib/internal/Magento/Framework/App/Action/Redirect.php diff --git a/lib/Magento/Framework/App/Action/Title.php b/lib/internal/Magento/Framework/App/Action/Title.php similarity index 100% rename from lib/Magento/Framework/App/Action/Title.php rename to lib/internal/Magento/Framework/App/Action/Title.php diff --git a/lib/Magento/Framework/App/ActionFactory.php b/lib/internal/Magento/Framework/App/ActionFactory.php similarity index 100% rename from lib/Magento/Framework/App/ActionFactory.php rename to lib/internal/Magento/Framework/App/ActionFactory.php diff --git a/lib/Magento/Framework/App/ActionFlag.php b/lib/internal/Magento/Framework/App/ActionFlag.php similarity index 100% rename from lib/Magento/Framework/App/ActionFlag.php rename to lib/internal/Magento/Framework/App/ActionFlag.php diff --git a/lib/Magento/Framework/App/ActionInterface.php b/lib/internal/Magento/Framework/App/ActionInterface.php similarity index 100% rename from lib/Magento/Framework/App/ActionInterface.php rename to lib/internal/Magento/Framework/App/ActionInterface.php diff --git a/lib/Magento/Framework/App/Area.php b/lib/internal/Magento/Framework/App/Area.php similarity index 98% rename from lib/Magento/Framework/App/Area.php rename to lib/internal/Magento/Framework/App/Area.php index 37ec7c77d116f016b2be8e0c5f05c2509277b687..3627f51ed349545ee19be9fcb330aaaeb697ae53 100644 --- a/lib/Magento/Framework/App/Area.php +++ b/lib/internal/Magento/Framework/App/Area.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework\App; + /** * Application area model */ -namespace Magento\Framework\App; - class Area implements \Magento\Framework\App\AreaInterface { const AREA_GLOBAL = 'global'; @@ -233,11 +233,12 @@ class Area implements \Magento\Framework\App\AreaInterface /** * Load area configuration * - * @return void + * @return $this */ protected function _initConfig() { $this->_objectManager->configure($this->_diConfigLoader->load($this->_code)); + return $this; } /** @@ -257,10 +258,13 @@ class Area implements \Magento\Framework\App\AreaInterface } /** - * @return void + * Initialize design + * + * @return $this */ protected function _initDesign() { $this->_getDesign()->setArea($this->_code)->setDefaultDesignTheme(); + return $this; } } diff --git a/lib/Magento/Framework/App/Area/FrontNameResolverFactory.php b/lib/internal/Magento/Framework/App/Area/FrontNameResolverFactory.php similarity index 100% rename from lib/Magento/Framework/App/Area/FrontNameResolverFactory.php rename to lib/internal/Magento/Framework/App/Area/FrontNameResolverFactory.php diff --git a/lib/Magento/Framework/App/Area/FrontNameResolverInterface.php b/lib/internal/Magento/Framework/App/Area/FrontNameResolverInterface.php similarity index 100% rename from lib/Magento/Framework/App/Area/FrontNameResolverInterface.php rename to lib/internal/Magento/Framework/App/Area/FrontNameResolverInterface.php diff --git a/lib/Magento/Framework/App/AreaInterface.php b/lib/internal/Magento/Framework/App/AreaInterface.php similarity index 100% rename from lib/Magento/Framework/App/AreaInterface.php rename to lib/internal/Magento/Framework/App/AreaInterface.php diff --git a/lib/Magento/Framework/App/AreaList.php b/lib/internal/Magento/Framework/App/AreaList.php similarity index 100% rename from lib/Magento/Framework/App/AreaList.php rename to lib/internal/Magento/Framework/App/AreaList.php diff --git a/lib/Magento/Framework/App/AreaList/Proxy.php b/lib/internal/Magento/Framework/App/AreaList/Proxy.php similarity index 100% rename from lib/Magento/Framework/App/AreaList/Proxy.php rename to lib/internal/Magento/Framework/App/AreaList/Proxy.php diff --git a/lib/Magento/Framework/App/Arguments.php b/lib/internal/Magento/Framework/App/Arguments.php similarity index 100% rename from lib/Magento/Framework/App/Arguments.php rename to lib/internal/Magento/Framework/App/Arguments.php diff --git a/lib/Magento/Framework/App/Arguments/ArgumentInterpreter.php b/lib/internal/Magento/Framework/App/Arguments/ArgumentInterpreter.php similarity index 100% rename from lib/Magento/Framework/App/Arguments/ArgumentInterpreter.php rename to lib/internal/Magento/Framework/App/Arguments/ArgumentInterpreter.php diff --git a/lib/Magento/Framework/App/Arguments/FileResolver/Primary.php b/lib/internal/Magento/Framework/App/Arguments/FileResolver/Primary.php similarity index 100% rename from lib/Magento/Framework/App/Arguments/FileResolver/Primary.php rename to lib/internal/Magento/Framework/App/Arguments/FileResolver/Primary.php diff --git a/lib/Magento/Framework/App/Arguments/Loader.php b/lib/internal/Magento/Framework/App/Arguments/Loader.php similarity index 100% rename from lib/Magento/Framework/App/Arguments/Loader.php rename to lib/internal/Magento/Framework/App/Arguments/Loader.php diff --git a/lib/Magento/Framework/App/Arguments/ValidationState.php b/lib/internal/Magento/Framework/App/Arguments/ValidationState.php similarity index 100% rename from lib/Magento/Framework/App/Arguments/ValidationState.php rename to lib/internal/Magento/Framework/App/Arguments/ValidationState.php diff --git a/lib/Magento/Framework/App/Cache.php b/lib/internal/Magento/Framework/App/Cache.php similarity index 100% rename from lib/Magento/Framework/App/Cache.php rename to lib/internal/Magento/Framework/App/Cache.php diff --git a/lib/Magento/Framework/App/Cache/Frontend/Factory.php b/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Frontend/Factory.php rename to lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php diff --git a/lib/Magento/Framework/App/Cache/Frontend/Pool.php b/lib/internal/Magento/Framework/App/Cache/Frontend/Pool.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Frontend/Pool.php rename to lib/internal/Magento/Framework/App/Cache/Frontend/Pool.php diff --git a/lib/Magento/Framework/App/Cache/InstanceFactory.php b/lib/internal/Magento/Framework/App/Cache/InstanceFactory.php similarity index 100% rename from lib/Magento/Framework/App/Cache/InstanceFactory.php rename to lib/internal/Magento/Framework/App/Cache/InstanceFactory.php diff --git a/lib/Magento/Framework/App/Cache/Proxy.php b/lib/internal/Magento/Framework/App/Cache/Proxy.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Proxy.php rename to lib/internal/Magento/Framework/App/Cache/Proxy.php diff --git a/lib/Magento/Framework/App/Cache/State.php b/lib/internal/Magento/Framework/App/Cache/State.php similarity index 100% rename from lib/Magento/Framework/App/Cache/State.php rename to lib/internal/Magento/Framework/App/Cache/State.php diff --git a/lib/Magento/Framework/App/Cache/State/Options.php b/lib/internal/Magento/Framework/App/Cache/State/Options.php similarity index 100% rename from lib/Magento/Framework/App/Cache/State/Options.php rename to lib/internal/Magento/Framework/App/Cache/State/Options.php diff --git a/lib/Magento/Framework/App/Cache/State/OptionsInterface.php b/lib/internal/Magento/Framework/App/Cache/State/OptionsInterface.php similarity index 100% rename from lib/Magento/Framework/App/Cache/State/OptionsInterface.php rename to lib/internal/Magento/Framework/App/Cache/State/OptionsInterface.php diff --git a/lib/Magento/Framework/App/Cache/StateInterface.php b/lib/internal/Magento/Framework/App/Cache/StateInterface.php similarity index 100% rename from lib/Magento/Framework/App/Cache/StateInterface.php rename to lib/internal/Magento/Framework/App/Cache/StateInterface.php diff --git a/lib/Magento/Framework/App/Cache/Type/AccessProxy.php b/lib/internal/Magento/Framework/App/Cache/Type/AccessProxy.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Type/AccessProxy.php rename to lib/internal/Magento/Framework/App/Cache/Type/AccessProxy.php diff --git a/lib/Magento/Framework/App/Cache/Type/Block.php b/lib/internal/Magento/Framework/App/Cache/Type/Block.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Type/Block.php rename to lib/internal/Magento/Framework/App/Cache/Type/Block.php diff --git a/lib/Magento/Framework/App/Cache/Type/Collection.php b/lib/internal/Magento/Framework/App/Cache/Type/Collection.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Type/Collection.php rename to lib/internal/Magento/Framework/App/Cache/Type/Collection.php diff --git a/lib/Magento/Framework/App/Cache/Type/Config.php b/lib/internal/Magento/Framework/App/Cache/Type/Config.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Type/Config.php rename to lib/internal/Magento/Framework/App/Cache/Type/Config.php diff --git a/lib/Magento/Framework/App/Cache/Type/FrontendPool.php b/lib/internal/Magento/Framework/App/Cache/Type/FrontendPool.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Type/FrontendPool.php rename to lib/internal/Magento/Framework/App/Cache/Type/FrontendPool.php diff --git a/lib/Magento/Framework/App/Cache/Type/Layout.php b/lib/internal/Magento/Framework/App/Cache/Type/Layout.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Type/Layout.php rename to lib/internal/Magento/Framework/App/Cache/Type/Layout.php diff --git a/lib/Magento/Framework/App/Cache/Type/Translate.php b/lib/internal/Magento/Framework/App/Cache/Type/Translate.php similarity index 100% rename from lib/Magento/Framework/App/Cache/Type/Translate.php rename to lib/internal/Magento/Framework/App/Cache/Type/Translate.php diff --git a/lib/Magento/Framework/App/Cache/TypeList.php b/lib/internal/Magento/Framework/App/Cache/TypeList.php similarity index 100% rename from lib/Magento/Framework/App/Cache/TypeList.php rename to lib/internal/Magento/Framework/App/Cache/TypeList.php diff --git a/lib/Magento/Framework/App/Cache/TypeListInterface.php b/lib/internal/Magento/Framework/App/Cache/TypeListInterface.php similarity index 100% rename from lib/Magento/Framework/App/Cache/TypeListInterface.php rename to lib/internal/Magento/Framework/App/Cache/TypeListInterface.php diff --git a/lib/Magento/Framework/App/CacheInterface.php b/lib/internal/Magento/Framework/App/CacheInterface.php similarity index 100% rename from lib/Magento/Framework/App/CacheInterface.php rename to lib/internal/Magento/Framework/App/CacheInterface.php diff --git a/lib/Magento/Framework/App/Config.php b/lib/internal/Magento/Framework/App/Config.php similarity index 100% rename from lib/Magento/Framework/App/Config.php rename to lib/internal/Magento/Framework/App/Config.php diff --git a/lib/Magento/Framework/App/Config/Base.php b/lib/internal/Magento/Framework/App/Config/Base.php similarity index 100% rename from lib/Magento/Framework/App/Config/Base.php rename to lib/internal/Magento/Framework/App/Config/Base.php diff --git a/lib/Magento/Framework/App/Config/BaseFactory.php b/lib/internal/Magento/Framework/App/Config/BaseFactory.php similarity index 100% rename from lib/Magento/Framework/App/Config/BaseFactory.php rename to lib/internal/Magento/Framework/App/Config/BaseFactory.php diff --git a/lib/Magento/Framework/App/Config/Data.php b/lib/internal/Magento/Framework/App/Config/Data.php similarity index 100% rename from lib/Magento/Framework/App/Config/Data.php rename to lib/internal/Magento/Framework/App/Config/Data.php diff --git a/lib/Magento/Framework/App/Config/Data/ProcessorFactory.php b/lib/internal/Magento/Framework/App/Config/Data/ProcessorFactory.php similarity index 100% rename from lib/Magento/Framework/App/Config/Data/ProcessorFactory.php rename to lib/internal/Magento/Framework/App/Config/Data/ProcessorFactory.php diff --git a/lib/Magento/Framework/App/Config/Data/ProcessorInterface.php b/lib/internal/Magento/Framework/App/Config/Data/ProcessorInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/Data/ProcessorInterface.php rename to lib/internal/Magento/Framework/App/Config/Data/ProcessorInterface.php diff --git a/lib/Magento/Framework/App/Config/DataFactory.php b/lib/internal/Magento/Framework/App/Config/DataFactory.php similarity index 100% rename from lib/Magento/Framework/App/Config/DataFactory.php rename to lib/internal/Magento/Framework/App/Config/DataFactory.php diff --git a/lib/Magento/Framework/App/Config/DataInterface.php b/lib/internal/Magento/Framework/App/Config/DataInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/DataInterface.php rename to lib/internal/Magento/Framework/App/Config/DataInterface.php diff --git a/lib/Magento/Framework/App/Config/Element.php b/lib/internal/Magento/Framework/App/Config/Element.php similarity index 100% rename from lib/Magento/Framework/App/Config/Element.php rename to lib/internal/Magento/Framework/App/Config/Element.php diff --git a/lib/Magento/Framework/App/Config/FileResolver.php b/lib/internal/Magento/Framework/App/Config/FileResolver.php similarity index 100% rename from lib/Magento/Framework/App/Config/FileResolver.php rename to lib/internal/Magento/Framework/App/Config/FileResolver.php diff --git a/lib/Magento/Framework/App/Config/Initial.php b/lib/internal/Magento/Framework/App/Config/Initial.php similarity index 100% rename from lib/Magento/Framework/App/Config/Initial.php rename to lib/internal/Magento/Framework/App/Config/Initial.php diff --git a/lib/Magento/Framework/App/Config/Initial/Converter.php b/lib/internal/Magento/Framework/App/Config/Initial/Converter.php similarity index 100% rename from lib/Magento/Framework/App/Config/Initial/Converter.php rename to lib/internal/Magento/Framework/App/Config/Initial/Converter.php diff --git a/lib/Magento/Framework/App/Config/Initial/Reader.php b/lib/internal/Magento/Framework/App/Config/Initial/Reader.php similarity index 100% rename from lib/Magento/Framework/App/Config/Initial/Reader.php rename to lib/internal/Magento/Framework/App/Config/Initial/Reader.php diff --git a/lib/Magento/Framework/App/Config/Initial/SchemaLocator.php b/lib/internal/Magento/Framework/App/Config/Initial/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/App/Config/Initial/SchemaLocator.php rename to lib/internal/Magento/Framework/App/Config/Initial/SchemaLocator.php diff --git a/lib/Magento/Framework/App/Config/MetadataProcessor.php b/lib/internal/Magento/Framework/App/Config/MetadataProcessor.php similarity index 100% rename from lib/Magento/Framework/App/Config/MetadataProcessor.php rename to lib/internal/Magento/Framework/App/Config/MetadataProcessor.php diff --git a/lib/Magento/Framework/App/Config/MutableScopeConfigInterface.php b/lib/internal/Magento/Framework/App/Config/MutableScopeConfigInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/MutableScopeConfigInterface.php rename to lib/internal/Magento/Framework/App/Config/MutableScopeConfigInterface.php diff --git a/lib/Magento/Framework/App/Config/ReinitableConfigInterface.php b/lib/internal/Magento/Framework/App/Config/ReinitableConfigInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/ReinitableConfigInterface.php rename to lib/internal/Magento/Framework/App/Config/ReinitableConfigInterface.php diff --git a/lib/Magento/Framework/App/Config/Resource/ConfigInterface.php b/lib/internal/Magento/Framework/App/Config/Resource/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/Resource/ConfigInterface.php rename to lib/internal/Magento/Framework/App/Config/Resource/ConfigInterface.php diff --git a/lib/Magento/Framework/App/Config/Scope/Converter.php b/lib/internal/Magento/Framework/App/Config/Scope/Converter.php similarity index 100% rename from lib/Magento/Framework/App/Config/Scope/Converter.php rename to lib/internal/Magento/Framework/App/Config/Scope/Converter.php diff --git a/lib/Magento/Framework/App/Config/Scope/ReaderInterface.php b/lib/internal/Magento/Framework/App/Config/Scope/ReaderInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/Scope/ReaderInterface.php rename to lib/internal/Magento/Framework/App/Config/Scope/ReaderInterface.php diff --git a/lib/Magento/Framework/App/Config/Scope/ReaderPoolInterface.php b/lib/internal/Magento/Framework/App/Config/Scope/ReaderPoolInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/Scope/ReaderPoolInterface.php rename to lib/internal/Magento/Framework/App/Config/Scope/ReaderPoolInterface.php diff --git a/lib/Magento/Framework/App/Config/ScopeConfigInterface.php b/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/ScopeConfigInterface.php rename to lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php diff --git a/lib/Magento/Framework/App/Config/ScopePool.php b/lib/internal/Magento/Framework/App/Config/ScopePool.php similarity index 100% rename from lib/Magento/Framework/App/Config/ScopePool.php rename to lib/internal/Magento/Framework/App/Config/ScopePool.php diff --git a/lib/Magento/Framework/App/Config/Storage/Writer.php b/lib/internal/Magento/Framework/App/Config/Storage/Writer.php similarity index 100% rename from lib/Magento/Framework/App/Config/Storage/Writer.php rename to lib/internal/Magento/Framework/App/Config/Storage/Writer.php diff --git a/lib/Magento/Framework/App/Config/Storage/WriterInterface.php b/lib/internal/Magento/Framework/App/Config/Storage/WriterInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/Storage/WriterInterface.php rename to lib/internal/Magento/Framework/App/Config/Storage/WriterInterface.php diff --git a/lib/Magento/Framework/App/Config/Value.php b/lib/internal/Magento/Framework/App/Config/Value.php similarity index 100% rename from lib/Magento/Framework/App/Config/Value.php rename to lib/internal/Magento/Framework/App/Config/Value.php diff --git a/lib/Magento/Framework/App/Config/ValueFactory.php b/lib/internal/Magento/Framework/App/Config/ValueFactory.php similarity index 100% rename from lib/Magento/Framework/App/Config/ValueFactory.php rename to lib/internal/Magento/Framework/App/Config/ValueFactory.php diff --git a/lib/Magento/Framework/App/Config/ValueInterface.php b/lib/internal/Magento/Framework/App/Config/ValueInterface.php similarity index 100% rename from lib/Magento/Framework/App/Config/ValueInterface.php rename to lib/internal/Magento/Framework/App/Config/ValueInterface.php diff --git a/lib/Magento/Framework/App/Console/Request.php b/lib/internal/Magento/Framework/App/Console/Request.php similarity index 100% rename from lib/Magento/Framework/App/Console/Request.php rename to lib/internal/Magento/Framework/App/Console/Request.php diff --git a/lib/Magento/Framework/App/Console/Response.php b/lib/internal/Magento/Framework/App/Console/Response.php similarity index 100% rename from lib/Magento/Framework/App/Console/Response.php rename to lib/internal/Magento/Framework/App/Console/Response.php diff --git a/lib/Magento/Framework/App/Cron.php b/lib/internal/Magento/Framework/App/Cron.php similarity index 100% rename from lib/Magento/Framework/App/Cron.php rename to lib/internal/Magento/Framework/App/Cron.php diff --git a/lib/Magento/Framework/App/DefaultPath/DefaultPath.php b/lib/internal/Magento/Framework/App/DefaultPath/DefaultPath.php similarity index 100% rename from lib/Magento/Framework/App/DefaultPath/DefaultPath.php rename to lib/internal/Magento/Framework/App/DefaultPath/DefaultPath.php diff --git a/lib/Magento/Framework/App/DefaultPathInterface.php b/lib/internal/Magento/Framework/App/DefaultPathInterface.php similarity index 100% rename from lib/Magento/Framework/App/DefaultPathInterface.php rename to lib/internal/Magento/Framework/App/DefaultPathInterface.php diff --git a/lib/Magento/Framework/App/DesignInterface.php b/lib/internal/Magento/Framework/App/DesignInterface.php similarity index 100% rename from lib/Magento/Framework/App/DesignInterface.php rename to lib/internal/Magento/Framework/App/DesignInterface.php diff --git a/lib/Magento/Framework/App/EntryPoint/EntryPoint.php b/lib/internal/Magento/Framework/App/EntryPoint/EntryPoint.php similarity index 100% rename from lib/Magento/Framework/App/EntryPoint/EntryPoint.php rename to lib/internal/Magento/Framework/App/EntryPoint/EntryPoint.php diff --git a/lib/Magento/Framework/App/EntryPointInterface.php b/lib/internal/Magento/Framework/App/EntryPointInterface.php similarity index 100% rename from lib/Magento/Framework/App/EntryPointInterface.php rename to lib/internal/Magento/Framework/App/EntryPointInterface.php diff --git a/lib/Magento/Framework/App/Error/Handler.php b/lib/internal/Magento/Framework/App/Error/Handler.php similarity index 100% rename from lib/Magento/Framework/App/Error/Handler.php rename to lib/internal/Magento/Framework/App/Error/Handler.php diff --git a/lib/Magento/Framework/App/Filesystem.php b/lib/internal/Magento/Framework/App/Filesystem.php similarity index 93% rename from lib/Magento/Framework/App/Filesystem.php rename to lib/internal/Magento/Framework/App/Filesystem.php index 75b1c7d66456d75bb198692a316350608abcac5f..7feeae89ef8900a764bda04d1ceb1b768126b7a6 100644 --- a/lib/Magento/Framework/App/Filesystem.php +++ b/lib/internal/Magento/Framework/App/Filesystem.php @@ -60,7 +60,12 @@ class Filesystem extends \Magento\Framework\Filesystem /** * Libraries or third-party components */ - const LIB_DIR = 'lib'; + const LIB_INTERNAL = 'lib_internal'; + + /** + * Libraries/components that need to be accessible publicly through web-server (such as various DHTML components) + */ + const LIB_WEB = 'lib_web'; /** * Files with translation of system labels and messages from en_US to other languages @@ -72,11 +77,6 @@ class Filesystem extends \Magento\Framework\Filesystem */ const PUB_DIR = 'pub'; - /** - * Libraries/components that need to be accessible publicly through web-server (such as various DHTML components) - */ - const PUB_LIB_DIR = 'pub_lib'; - /** * Storage of files entered or generated by the end-user */ @@ -87,11 +87,6 @@ class Filesystem extends \Magento\Framework\Filesystem */ const STATIC_VIEW_DIR = 'static'; - /** - * Public view files, stored to avoid repetitive run-time calculation, and can be re-generated any time - */ - const PUB_VIEW_CACHE_DIR = 'view_cache'; - /** * Various files generated by the system in runtime */ diff --git a/lib/Magento/Framework/App/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php similarity index 93% rename from lib/Magento/Framework/App/Filesystem/DirectoryList.php rename to lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php index 7a6c68187743c31e1345432e6e67ab060d6b8165..03496995a94c7cf069599937e0d8ad149f282cd8 100644 --- a/lib/Magento/Framework/App/Filesystem/DirectoryList.php +++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php @@ -30,6 +30,11 @@ use Magento\Framework\App\Filesystem; */ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList { + /** + * Directory for dynamically generated public view files, relative to STATIC_VIEW_DIR + */ + const CACHE_VIEW_REL_DIR = '_cache'; + /** * Directories configurations * @@ -40,7 +45,7 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList Filesystem::APP_DIR => array('path' => 'app'), Filesystem::MODULES_DIR => array('path' => 'app/code'), Filesystem::CONFIG_DIR => array('path' => 'app/etc'), - Filesystem::LIB_DIR => array('path' => 'lib'), + Filesystem::LIB_INTERNAL => array('path' => 'lib/internal'), Filesystem::VAR_DIR => array( 'path' => 'var', 'read_only' => false, diff --git a/lib/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php similarity index 100% rename from lib/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php rename to lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php diff --git a/lib/Magento/Framework/App/Filesystem/DirectoryList/Verification.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Verification.php similarity index 100% rename from lib/Magento/Framework/App/Filesystem/DirectoryList/Verification.php rename to lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Verification.php diff --git a/lib/Magento/Framework/App/FrontController.php b/lib/internal/Magento/Framework/App/FrontController.php similarity index 100% rename from lib/Magento/Framework/App/FrontController.php rename to lib/internal/Magento/Framework/App/FrontController.php diff --git a/lib/Magento/Framework/App/FrontControllerInterface.php b/lib/internal/Magento/Framework/App/FrontControllerInterface.php similarity index 100% rename from lib/Magento/Framework/App/FrontControllerInterface.php rename to lib/internal/Magento/Framework/App/FrontControllerInterface.php diff --git a/lib/Magento/Framework/App/Helper/AbstractHelper.php b/lib/internal/Magento/Framework/App/Helper/AbstractHelper.php similarity index 100% rename from lib/Magento/Framework/App/Helper/AbstractHelper.php rename to lib/internal/Magento/Framework/App/Helper/AbstractHelper.php diff --git a/lib/Magento/Framework/App/Helper/Context.php b/lib/internal/Magento/Framework/App/Helper/Context.php similarity index 100% rename from lib/Magento/Framework/App/Helper/Context.php rename to lib/internal/Magento/Framework/App/Helper/Context.php diff --git a/lib/Magento/Framework/App/Http.php b/lib/internal/Magento/Framework/App/Http.php similarity index 100% rename from lib/Magento/Framework/App/Http.php rename to lib/internal/Magento/Framework/App/Http.php diff --git a/lib/Magento/Framework/App/Http/Context.php b/lib/internal/Magento/Framework/App/Http/Context.php similarity index 100% rename from lib/Magento/Framework/App/Http/Context.php rename to lib/internal/Magento/Framework/App/Http/Context.php diff --git a/lib/Magento/Framework/App/MutableScopeConfig.php b/lib/internal/Magento/Framework/App/MutableScopeConfig.php similarity index 100% rename from lib/Magento/Framework/App/MutableScopeConfig.php rename to lib/internal/Magento/Framework/App/MutableScopeConfig.php diff --git a/lib/Magento/Framework/App/ObjectManager.php b/lib/internal/Magento/Framework/App/ObjectManager.php similarity index 100% rename from lib/Magento/Framework/App/ObjectManager.php rename to lib/internal/Magento/Framework/App/ObjectManager.php diff --git a/lib/Magento/Framework/App/ObjectManager/ConfigCache.php b/lib/internal/Magento/Framework/App/ObjectManager/ConfigCache.php similarity index 100% rename from lib/Magento/Framework/App/ObjectManager/ConfigCache.php rename to lib/internal/Magento/Framework/App/ObjectManager/ConfigCache.php diff --git a/lib/Magento/Framework/App/ObjectManager/ConfigLoader.php b/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php similarity index 100% rename from lib/Magento/Framework/App/ObjectManager/ConfigLoader.php rename to lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php diff --git a/lib/Magento/Framework/App/ObjectManagerFactory.php b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php similarity index 100% rename from lib/Magento/Framework/App/ObjectManagerFactory.php rename to lib/internal/Magento/Framework/App/ObjectManagerFactory.php diff --git a/lib/Magento/Framework/App/PageCache/Cache.php b/lib/internal/Magento/Framework/App/PageCache/Cache.php similarity index 100% rename from lib/Magento/Framework/App/PageCache/Cache.php rename to lib/internal/Magento/Framework/App/PageCache/Cache.php diff --git a/lib/Magento/Framework/App/PageCache/FormKey.php b/lib/internal/Magento/Framework/App/PageCache/FormKey.php similarity index 100% rename from lib/Magento/Framework/App/PageCache/FormKey.php rename to lib/internal/Magento/Framework/App/PageCache/FormKey.php diff --git a/lib/Magento/Framework/App/PageCache/Identifier.php b/lib/internal/Magento/Framework/App/PageCache/Identifier.php similarity index 100% rename from lib/Magento/Framework/App/PageCache/Identifier.php rename to lib/internal/Magento/Framework/App/PageCache/Identifier.php diff --git a/lib/Magento/Framework/App/PageCache/Kernel.php b/lib/internal/Magento/Framework/App/PageCache/Kernel.php similarity index 100% rename from lib/Magento/Framework/App/PageCache/Kernel.php rename to lib/internal/Magento/Framework/App/PageCache/Kernel.php diff --git a/lib/Magento/Framework/App/PageCache/Version.php b/lib/internal/Magento/Framework/App/PageCache/Version.php similarity index 100% rename from lib/Magento/Framework/App/PageCache/Version.php rename to lib/internal/Magento/Framework/App/PageCache/Version.php diff --git a/lib/Magento/Framework/App/ReinitableConfig.php b/lib/internal/Magento/Framework/App/ReinitableConfig.php similarity index 100% rename from lib/Magento/Framework/App/ReinitableConfig.php rename to lib/internal/Magento/Framework/App/ReinitableConfig.php diff --git a/lib/Magento/Framework/App/Request/Http.php b/lib/internal/Magento/Framework/App/Request/Http.php similarity index 100% rename from lib/Magento/Framework/App/Request/Http.php rename to lib/internal/Magento/Framework/App/Request/Http.php diff --git a/lib/Magento/Framework/App/Request/PathInfoProcessorInterface.php b/lib/internal/Magento/Framework/App/Request/PathInfoProcessorInterface.php similarity index 100% rename from lib/Magento/Framework/App/Request/PathInfoProcessorInterface.php rename to lib/internal/Magento/Framework/App/Request/PathInfoProcessorInterface.php diff --git a/lib/Magento/Framework/App/RequestFactory.php b/lib/internal/Magento/Framework/App/RequestFactory.php similarity index 100% rename from lib/Magento/Framework/App/RequestFactory.php rename to lib/internal/Magento/Framework/App/RequestFactory.php diff --git a/lib/Magento/Framework/App/RequestInterface.php b/lib/internal/Magento/Framework/App/RequestInterface.php similarity index 100% rename from lib/Magento/Framework/App/RequestInterface.php rename to lib/internal/Magento/Framework/App/RequestInterface.php diff --git a/lib/Magento/Framework/App/Resource.php b/lib/internal/Magento/Framework/App/Resource.php similarity index 100% rename from lib/Magento/Framework/App/Resource.php rename to lib/internal/Magento/Framework/App/Resource.php diff --git a/lib/Magento/Framework/App/Resource/Config.php b/lib/internal/Magento/Framework/App/Resource/Config.php similarity index 100% rename from lib/Magento/Framework/App/Resource/Config.php rename to lib/internal/Magento/Framework/App/Resource/Config.php diff --git a/lib/Magento/Framework/App/Resource/Config/Converter.php b/lib/internal/Magento/Framework/App/Resource/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/App/Resource/Config/Converter.php rename to lib/internal/Magento/Framework/App/Resource/Config/Converter.php diff --git a/lib/Magento/Framework/App/Resource/Config/Reader.php b/lib/internal/Magento/Framework/App/Resource/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/App/Resource/Config/Reader.php rename to lib/internal/Magento/Framework/App/Resource/Config/Reader.php diff --git a/lib/Magento/Framework/App/Resource/Config/SchemaLocator.php b/lib/internal/Magento/Framework/App/Resource/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/App/Resource/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/App/Resource/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/App/Resource/ConfigInterface.php b/lib/internal/Magento/Framework/App/Resource/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/App/Resource/ConfigInterface.php rename to lib/internal/Magento/Framework/App/Resource/ConfigInterface.php diff --git a/lib/Magento/Framework/App/Resource/ConnectionAdapterInterface.php b/lib/internal/Magento/Framework/App/Resource/ConnectionAdapterInterface.php similarity index 100% rename from lib/Magento/Framework/App/Resource/ConnectionAdapterInterface.php rename to lib/internal/Magento/Framework/App/Resource/ConnectionAdapterInterface.php diff --git a/lib/Magento/Framework/App/Resource/ConnectionFactory.php b/lib/internal/Magento/Framework/App/Resource/ConnectionFactory.php similarity index 100% rename from lib/Magento/Framework/App/Resource/ConnectionFactory.php rename to lib/internal/Magento/Framework/App/Resource/ConnectionFactory.php diff --git a/lib/internal/Magento/Framework/App/Response/FileInterface.php b/lib/internal/Magento/Framework/App/Response/FileInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..68a3505e16c0788f1dbc07abd4c9f1e8decd9ded --- /dev/null +++ b/lib/internal/Magento/Framework/App/Response/FileInterface.php @@ -0,0 +1,37 @@ +<?php +/** + * Interface of response sending file content + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\App\Response; + +interface FileInterface extends HttpInterface +{ + /** + * Set path to the file being sent + * + * @param string $path + * @return void + */ + public function setFilePath($path); +} diff --git a/lib/Magento/Framework/App/Response/Http.php b/lib/internal/Magento/Framework/App/Response/Http.php similarity index 97% rename from lib/Magento/Framework/App/Response/Http.php rename to lib/internal/Magento/Framework/App/Response/Http.php index 748c99d5415232d852a8947ec4a342db690ba91e..7d1a9d7b48cb78756dedc09ee64035c140533e74 100644 --- a/lib/Magento/Framework/App/Response/Http.php +++ b/lib/internal/Magento/Framework/App/Response/Http.php @@ -25,7 +25,7 @@ */ namespace Magento\Framework\App\Response; -class Http extends \Zend_Controller_Response_Http implements \Magento\Framework\App\ResponseInterface +class Http extends \Zend_Controller_Response_Http implements HttpInterface { /** * Cookie to store page vary string diff --git a/lib/Magento/Framework/App/Response/Http/FileFactory.php b/lib/internal/Magento/Framework/App/Response/Http/FileFactory.php similarity index 100% rename from lib/Magento/Framework/App/Response/Http/FileFactory.php rename to lib/internal/Magento/Framework/App/Response/Http/FileFactory.php diff --git a/lib/internal/Magento/Framework/App/Response/HttpInterface.php b/lib/internal/Magento/Framework/App/Response/HttpInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..1b5926463a892a72ebc9d979cd1d59c55e168587 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Response/HttpInterface.php @@ -0,0 +1,37 @@ +<?php +/** + * HTTP response interface + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\App\Response; + +interface HttpInterface extends \Magento\Framework\App\ResponseInterface +{ + /** + * Set HTTP response code + * + * @param int $code + * @return void + */ + public function setHttpResponseCode($code); +} diff --git a/lib/Magento/Framework/App/Response/RedirectInterface.php b/lib/internal/Magento/Framework/App/Response/RedirectInterface.php similarity index 100% rename from lib/Magento/Framework/App/Response/RedirectInterface.php rename to lib/internal/Magento/Framework/App/Response/RedirectInterface.php diff --git a/lib/Magento/Framework/App/ResponseFactory.php b/lib/internal/Magento/Framework/App/ResponseFactory.php similarity index 100% rename from lib/Magento/Framework/App/ResponseFactory.php rename to lib/internal/Magento/Framework/App/ResponseFactory.php diff --git a/lib/Magento/Framework/App/ResponseInterface.php b/lib/internal/Magento/Framework/App/ResponseInterface.php similarity index 100% rename from lib/Magento/Framework/App/ResponseInterface.php rename to lib/internal/Magento/Framework/App/ResponseInterface.php diff --git a/lib/Magento/Framework/App/Route/Config.php b/lib/internal/Magento/Framework/App/Route/Config.php similarity index 100% rename from lib/Magento/Framework/App/Route/Config.php rename to lib/internal/Magento/Framework/App/Route/Config.php diff --git a/lib/Magento/Framework/App/Route/Config/Converter.php b/lib/internal/Magento/Framework/App/Route/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/App/Route/Config/Converter.php rename to lib/internal/Magento/Framework/App/Route/Config/Converter.php diff --git a/lib/Magento/Framework/App/Route/Config/Reader.php b/lib/internal/Magento/Framework/App/Route/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/App/Route/Config/Reader.php rename to lib/internal/Magento/Framework/App/Route/Config/Reader.php diff --git a/lib/Magento/Framework/App/Route/Config/SchemaLocator.php b/lib/internal/Magento/Framework/App/Route/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/App/Route/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/App/Route/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/App/Route/ConfigInterface.php b/lib/internal/Magento/Framework/App/Route/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/App/Route/ConfigInterface.php rename to lib/internal/Magento/Framework/App/Route/ConfigInterface.php diff --git a/lib/Magento/Framework/App/Router/AbstractRouter.php b/lib/internal/Magento/Framework/App/Router/AbstractRouter.php similarity index 100% rename from lib/Magento/Framework/App/Router/AbstractRouter.php rename to lib/internal/Magento/Framework/App/Router/AbstractRouter.php diff --git a/lib/Magento/Framework/App/Router/DefaultRouter.php b/lib/internal/Magento/Framework/App/Router/DefaultRouter.php similarity index 100% rename from lib/Magento/Framework/App/Router/DefaultRouter.php rename to lib/internal/Magento/Framework/App/Router/DefaultRouter.php diff --git a/lib/Magento/Framework/App/Router/NoRouteHandlerInterface.php b/lib/internal/Magento/Framework/App/Router/NoRouteHandlerInterface.php similarity index 100% rename from lib/Magento/Framework/App/Router/NoRouteHandlerInterface.php rename to lib/internal/Magento/Framework/App/Router/NoRouteHandlerInterface.php diff --git a/lib/Magento/Framework/App/Router/NoRouteHandlerList.php b/lib/internal/Magento/Framework/App/Router/NoRouteHandlerList.php similarity index 100% rename from lib/Magento/Framework/App/Router/NoRouteHandlerList.php rename to lib/internal/Magento/Framework/App/Router/NoRouteHandlerList.php diff --git a/lib/Magento/Framework/App/RouterInterface.php b/lib/internal/Magento/Framework/App/RouterInterface.php similarity index 100% rename from lib/Magento/Framework/App/RouterInterface.php rename to lib/internal/Magento/Framework/App/RouterInterface.php diff --git a/lib/Magento/Framework/App/RouterList.php b/lib/internal/Magento/Framework/App/RouterList.php similarity index 100% rename from lib/Magento/Framework/App/RouterList.php rename to lib/internal/Magento/Framework/App/RouterList.php diff --git a/lib/Magento/Framework/App/RouterListInterface.php b/lib/internal/Magento/Framework/App/RouterListInterface.php similarity index 100% rename from lib/Magento/Framework/App/RouterListInterface.php rename to lib/internal/Magento/Framework/App/RouterListInterface.php diff --git a/lib/Magento/Framework/App/ScopeInterface.php b/lib/internal/Magento/Framework/App/ScopeInterface.php similarity index 100% rename from lib/Magento/Framework/App/ScopeInterface.php rename to lib/internal/Magento/Framework/App/ScopeInterface.php diff --git a/lib/Magento/Framework/App/ScopeResolverInterface.php b/lib/internal/Magento/Framework/App/ScopeResolverInterface.php similarity index 100% rename from lib/Magento/Framework/App/ScopeResolverInterface.php rename to lib/internal/Magento/Framework/App/ScopeResolverInterface.php diff --git a/lib/Magento/Framework/App/ScopeResolverPool.php b/lib/internal/Magento/Framework/App/ScopeResolverPool.php similarity index 100% rename from lib/Magento/Framework/App/ScopeResolverPool.php rename to lib/internal/Magento/Framework/App/ScopeResolverPool.php diff --git a/lib/Magento/Framework/App/State.php b/lib/internal/Magento/Framework/App/State.php similarity index 100% rename from lib/Magento/Framework/App/State.php rename to lib/internal/Magento/Framework/App/State.php diff --git a/lib/Magento/Framework/App/State/MaintenanceMode.php b/lib/internal/Magento/Framework/App/State/MaintenanceMode.php similarity index 100% rename from lib/Magento/Framework/App/State/MaintenanceMode.php rename to lib/internal/Magento/Framework/App/State/MaintenanceMode.php diff --git a/lib/internal/Magento/Framework/App/StaticResource.php b/lib/internal/Magento/Framework/App/StaticResource.php new file mode 100644 index 0000000000000000000000000000000000000000..3b4999e4dd8bacd8b28e96ab67096761f6c861b2 --- /dev/null +++ b/lib/internal/Magento/Framework/App/StaticResource.php @@ -0,0 +1,181 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\App; + +use Magento\Framework\App\ObjectManager; +use Magento\Framework\App\Request; +use Magento\Framework\App\Response; + +/** + * Entry point for retrieving static resources like JS, CSS, images by requested public path + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class StaticResource implements \Magento\Framework\AppInterface +{ + /** + * @var State + */ + private $state; + + /** + * @var Response\FileInterface + */ + private $response; + + /** + * @var Request\Http + */ + private $request; + + /** + * @var \Magento\Framework\App\View\Asset\Publisher + */ + private $publisher; + + /** + * @var \Magento\Framework\View\Asset\Repository + */ + private $assetRepo; + + /** + * @var \Magento\Framework\Module\ModuleList + */ + private $moduleList; + + /** + * @var \Magento\Framework\ObjectManager + */ + private $objectManager; + + /** + * @var ObjectManager\ConfigLoader + */ + private $configLoader; + + /** + * @param State $state + * @param Response\FileInterface $response + * @param Request\Http $request + * @param \Magento\Framework\App\View\Asset\Publisher $publisher + * @param \Magento\Framework\View\Asset\Repository $assetRepo + * @param \Magento\Framework\Module\ModuleList $moduleList + * @param \Magento\Framework\ObjectManager $objectManager + * @param ObjectManager\ConfigLoader $configLoader + */ + public function __construct( + State $state, + Response\FileInterface $response, + Request\Http $request, + View\Asset\Publisher $publisher, + \Magento\Framework\View\Asset\Repository $assetRepo, + \Magento\Framework\Module\ModuleList $moduleList, + \Magento\Framework\ObjectManager $objectManager, + ObjectManager\ConfigLoader $configLoader + ) { + $this->state = $state; + $this->response = $response; + $this->request = $request; + $this->publisher = $publisher; + $this->assetRepo = $assetRepo; + $this->moduleList = $moduleList; + $this->objectManager = $objectManager; + $this->configLoader = $configLoader; + } + + /** + * Finds requested resource and provides it to the client + * + * @return \Magento\Framework\App\ResponseInterface + * @throws \Exception + */ + public function launch() + { + $appMode = $this->state->getMode(); + if ($appMode == \Magento\Framework\App\State::MODE_PRODUCTION) { + $this->response->setHttpResponseCode(404); + } else { + try { + $path = $this->request->get('resource'); + $params = $this->parsePath($path); + $this->state->setAreaCode($params['area']); + $this->objectManager->configure($this->configLoader->load($params['area'])); + $file = $params['file']; + unset($params['file']); + $asset = $this->assetRepo->createAsset($file, $params); + $this->response->setFilePath($asset->getSourceFile()); + $this->publisher->publish($asset); + } catch (\Exception $e) { + if ($appMode == \Magento\Framework\App\State::MODE_DEVELOPER) { + throw $e; + } + $this->response->setHttpResponseCode(404); + } + } + return $this->response; + } + + /** + * Parse path to identify parts needed for searching original file + * + * @param string $path + * @throws \InvalidArgumentException + * @return array + */ + protected function parsePath($path) + { + $path = ltrim($path, '/'); + $parts = explode('/', $path, 6); + if (count($parts) < 5) { + throw new \InvalidArgumentException("Requested path '$path' is wrong."); + } + $result = array(); + $result['area'] = $parts[0]; + $result['theme'] = $parts[1] . '/' . $parts[2]; + $result['locale'] = $parts[3]; + if (count($parts) >= 6 && $this->isModule($parts[4])) { + $result['module'] = $parts[4]; + } else { + $result['module'] = ''; + if (isset($parts[5])) { + $parts[5] = $parts[4] . '/' . $parts[5]; + } else { + $parts[5] = $parts[4]; + } + } + $result['file'] = $parts[5]; + return $result; + } + + /** + * Check if active module 'name' exists + * + * @param string $name + * @return bool + */ + protected function isModule($name) + { + return null !== $this->moduleList->getModule($name); + } +} diff --git a/lib/Magento/Framework/App/TemplateTypesInterface.php b/lib/internal/Magento/Framework/App/TemplateTypesInterface.php similarity index 100% rename from lib/Magento/Framework/App/TemplateTypesInterface.php rename to lib/internal/Magento/Framework/App/TemplateTypesInterface.php diff --git a/lib/Magento/Framework/App/View.php b/lib/internal/Magento/Framework/App/View.php similarity index 100% rename from lib/Magento/Framework/App/View.php rename to lib/internal/Magento/Framework/App/View.php diff --git a/lib/internal/Magento/Framework/App/View/Asset/Publisher.php b/lib/internal/Magento/Framework/App/View/Asset/Publisher.php new file mode 100644 index 0000000000000000000000000000000000000000..37b49184c248648016d6246150c7597b5915f04c --- /dev/null +++ b/lib/internal/Magento/Framework/App/View/Asset/Publisher.php @@ -0,0 +1,85 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\App\View\Asset; + +use Magento\Framework\View\Asset; + +/** + * A publishing service for view assets + */ +class Publisher +{ + /** + * @var \Magento\Framework\App\State + */ + protected $appState; + + /** + * @var \Magento\Framework\App\Filesystem + */ + protected $filesystem; + + /** + * @param \Magento\Framework\App\State $appState + * @param \Magento\Framework\App\Filesystem $filesystem + */ + public function __construct( + \Magento\Framework\App\State $appState, + \Magento\Framework\App\Filesystem $filesystem + ) { + $this->appState = $appState; + $this->filesystem = $filesystem; + } + + /** + * {@inheritdoc} + */ + public function publish(Asset\LocalInterface $asset) + { + if ($this->appState->getMode() === \Magento\Framework\App\State::MODE_DEVELOPER) { + return false; + } + $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + if ($dir->isExist($asset->getPath())) { + return true; + } + return $this->publishAsset($asset); + } + + /** + * Publish the asset + * + * @param Asset\LocalInterface $asset + * @return bool + */ + private function publishAsset(Asset\LocalInterface $asset) + { + $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + $rootDir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); + $source = $rootDir->getRelativePath($asset->getSourceFile()); + $destination = $asset->getPath(); + return $rootDir->copyFile($source, $destination, $dir); + } +} diff --git a/lib/internal/Magento/Framework/App/View/Deployment/Version.php b/lib/internal/Magento/Framework/App/View/Deployment/Version.php new file mode 100644 index 0000000000000000000000000000000000000000..d88c37aaf569bf950f82201301e5d2491920b12d --- /dev/null +++ b/lib/internal/Magento/Framework/App/View/Deployment/Version.php @@ -0,0 +1,107 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\App\View\Deployment; + +/** + * Deployment version of static files + */ +class Version +{ + /** + * @var \Magento\Framework\App\State + */ + private $appState; + + /** + * @var \Magento\Framework\App\View\Deployment\Version\StorageInterface + */ + private $versionStorage; + + /** + * @var \Magento\Framework\App\View\Deployment\Version\GeneratorInterface + */ + private $versionGenerator; + + /** + * @var string + */ + private $cachedValue; + + /** + * @param \Magento\Framework\App\State $appState + * @param \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage + * @param \Magento\Framework\App\View\Deployment\Version\GeneratorInterface $versionGenerator + */ + public function __construct( + \Magento\Framework\App\State $appState, + \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage, + \Magento\Framework\App\View\Deployment\Version\GeneratorInterface $versionGenerator + ) { + $this->appState = $appState; + $this->versionStorage = $versionStorage; + $this->versionGenerator = $versionGenerator; + } + + /** + * Retrieve deployment version of static files + * + * @return string + */ + public function getValue() + { + if (!$this->cachedValue) { + $this->cachedValue = $this->readValue($this->appState->getMode()); + } + return $this->cachedValue; + } + + /** + * Load or generate deployment version of static files depending on the application mode + * + * @param string $appMode + * @return string + */ + protected function readValue($appMode) + { + switch ($appMode) { + case \Magento\Framework\App\State::MODE_DEFAULT: + try { + $result = $this->versionStorage->load(); + } catch (\UnexpectedValueException $e) { + $result = $this->versionGenerator->generate(); + $this->versionStorage->save($result); + } + break; + + case \Magento\Framework\App\State::MODE_DEVELOPER: + $result = $this->versionGenerator->generate(); + break; + + default: + $result = $this->versionStorage->load(); + } + return $result; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/constructor_exception/permitted.php b/lib/internal/Magento/Framework/App/View/Deployment/Version/Generator/Timestamp.php similarity index 72% rename from dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/constructor_exception/permitted.php rename to lib/internal/Magento/Framework/App/View/Deployment/Version/Generator/Timestamp.php index d68e5c7154621cfefe29044ba59beaf7c77aeb2d..830a001c74e656ddefca962a73590de935de2fa8 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/constructor_exception/permitted.php +++ b/lib/internal/Magento/Framework/App/View/Deployment/Version/Generator/Timestamp.php @@ -22,4 +22,18 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -return array('permitted1', 'permitted2', 'conflict1', 'conflict2', 'permitted3'); +namespace Magento\Framework\App\View\Deployment\Version\Generator; + +/** + * Generation of deployment version of static files using the timestamp + */ +class Timestamp implements \Magento\Framework\App\View\Deployment\Version\GeneratorInterface +{ + /** + * {@inheritdoc} + */ + public function generate() + { + return (string)time(); + } +} diff --git a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityInterface.php b/lib/internal/Magento/Framework/App/View/Deployment/Version/GeneratorInterface.php similarity index 75% rename from lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityInterface.php rename to lib/internal/Magento/Framework/App/View/Deployment/Version/GeneratorInterface.php index e485c33ec2298e245b58cb203f5f0dcc41cc7240..5dc9b87c7cedce38a32c7ec76a50a4ecfa768306 100644 --- a/lib/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityInterface.php +++ b/lib/internal/Magento/Framework/App/View/Deployment/Version/GeneratorInterface.php @@ -21,24 +21,18 @@ * @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) */ -namespace Magento\Framework\Css\PreProcessor\Cache\Import; + +namespace Magento\Framework\App\View\Deployment\Version; /** - * Import entity interface + * Algorithm of generation of deployment version of static files */ -interface ImportEntityInterface +interface GeneratorInterface { /** - * Source path to original file + * Return deployment version of static files that is unique enough for the current deployment * * @return string */ - public function getOriginalFile(); - - /** - * Change timestamp for original file - * - * @return int - */ - public function getOriginalMtime(); + public function generate(); } diff --git a/lib/internal/Magento/Framework/App/View/Deployment/Version/Storage/File.php b/lib/internal/Magento/Framework/App/View/Deployment/Version/Storage/File.php new file mode 100644 index 0000000000000000000000000000000000000000..02b6d14ffa8823d0e31503f2f7be46b2530ee72b --- /dev/null +++ b/lib/internal/Magento/Framework/App/View/Deployment/Version/Storage/File.php @@ -0,0 +1,79 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\App\View\Deployment\Version\Storage; + +/** + * Persistence of deployment version of static files in a local file + */ +class File implements \Magento\Framework\App\View\Deployment\Version\StorageInterface +{ + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface + */ + private $directory; + + /** + * @var string + */ + private $fileName; + + /** + * @param \Magento\Framework\App\Filesystem $filesystem + * @param string $directoryCode + * @param string $fileName + */ + public function __construct( + \Magento\Framework\App\Filesystem $filesystem, + $directoryCode, + $fileName + ) { + $this->directory = $filesystem->getDirectoryWrite($directoryCode); + $this->fileName = $fileName; + } + + /** + * {@inheritdoc} + */ + public function load() + { + try { + return $this->directory->readFile($this->fileName); + } catch (\Magento\Framework\Filesystem\FilesystemException $e) { + throw new \UnexpectedValueException( + 'Unable to retrieve deployment version of static files from the file system.', + 0, + $e + ); + } + } + + /** + * {@inheritdoc} + */ + public function save($data) + { + $this->directory->writeFile($this->fileName, $data, 'w'); + } +} diff --git a/lib/Magento/Framework/View/Design/FileResolution/Strategy/FileInterface.php b/lib/internal/Magento/Framework/App/View/Deployment/Version/StorageInterface.php similarity index 67% rename from lib/Magento/Framework/View/Design/FileResolution/Strategy/FileInterface.php rename to lib/internal/Magento/Framework/App/View/Deployment/Version/StorageInterface.php index 0035e999b0d692478e6a9b5e85ee4f376b9a36d1..62b57156006c225e9ed108a371387fd7792153cd 100644 --- a/lib/Magento/Framework/View/Design/FileResolution/Strategy/FileInterface.php +++ b/lib/internal/Magento/Framework/App/View/Deployment/Version/StorageInterface.php @@ -21,25 +21,27 @@ * @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) */ -namespace Magento\Framework\View\Design\FileResolution\Strategy; -use Magento\Framework\View\Design\ThemeInterface; +namespace Magento\Framework\App\View\Deployment\Version; /** - * File Interface - * - * Interface for 'file' file resolution strategy + * Persistence of deployment version of static files */ -interface FileInterface +interface StorageInterface { /** - * Get a usual file path (e.g. template) + * Retrieve version value from a persistent storage * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $file - * @param string|null $module * @return string + * @throws \UnexpectedValueException Exception is thrown when unable to retrieve data from a storage + */ + public function load(); + + /** + * Store version value in a persistent storage + * + * @param string $data + * @return void */ - public function getFile($area, ThemeInterface $themeModel, $file, $module = null); + public function save($data); } diff --git a/lib/Magento/Framework/App/ViewInterface.php b/lib/internal/Magento/Framework/App/ViewInterface.php similarity index 100% rename from lib/Magento/Framework/App/ViewInterface.php rename to lib/internal/Magento/Framework/App/ViewInterface.php diff --git a/lib/Magento/Framework/App/etc/resources.xsd b/lib/internal/Magento/Framework/App/etc/resources.xsd similarity index 100% rename from lib/Magento/Framework/App/etc/resources.xsd rename to lib/internal/Magento/Framework/App/etc/resources.xsd diff --git a/lib/Magento/Framework/App/etc/routes.xsd b/lib/internal/Magento/Framework/App/etc/routes.xsd similarity index 100% rename from lib/Magento/Framework/App/etc/routes.xsd rename to lib/internal/Magento/Framework/App/etc/routes.xsd diff --git a/lib/Magento/Framework/App/etc/routes_merged.xsd b/lib/internal/Magento/Framework/App/etc/routes_merged.xsd similarity index 100% rename from lib/Magento/Framework/App/etc/routes_merged.xsd rename to lib/internal/Magento/Framework/App/etc/routes_merged.xsd diff --git a/lib/Magento/Framework/AppInterface.php b/lib/internal/Magento/Framework/AppInterface.php similarity index 97% rename from lib/Magento/Framework/AppInterface.php rename to lib/internal/Magento/Framework/AppInterface.php index bedbc39d1cb6afddc4b593985ed7b0d183e07a62..b025f1a1a365945705025d977a2cdcb7a487987f 100644 --- a/lib/Magento/Framework/AppInterface.php +++ b/lib/internal/Magento/Framework/AppInterface.php @@ -35,7 +35,7 @@ interface AppInterface /** * Magento version */ - const VERSION = '2.0.0.0-dev79'; + const VERSION = '2.0.0.0-dev80'; /** * Launch application diff --git a/lib/Magento/Framework/Archive.php b/lib/internal/Magento/Framework/Archive.php similarity index 100% rename from lib/Magento/Framework/Archive.php rename to lib/internal/Magento/Framework/Archive.php diff --git a/lib/Magento/Framework/Archive/AbstractArchive.php b/lib/internal/Magento/Framework/Archive/AbstractArchive.php similarity index 100% rename from lib/Magento/Framework/Archive/AbstractArchive.php rename to lib/internal/Magento/Framework/Archive/AbstractArchive.php diff --git a/lib/Magento/Framework/Archive/ArchiveInterface.php b/lib/internal/Magento/Framework/Archive/ArchiveInterface.php similarity index 100% rename from lib/Magento/Framework/Archive/ArchiveInterface.php rename to lib/internal/Magento/Framework/Archive/ArchiveInterface.php diff --git a/lib/Magento/Framework/Archive/Bz.php b/lib/internal/Magento/Framework/Archive/Bz.php similarity index 100% rename from lib/Magento/Framework/Archive/Bz.php rename to lib/internal/Magento/Framework/Archive/Bz.php diff --git a/lib/Magento/Framework/Archive/Gz.php b/lib/internal/Magento/Framework/Archive/Gz.php similarity index 100% rename from lib/Magento/Framework/Archive/Gz.php rename to lib/internal/Magento/Framework/Archive/Gz.php diff --git a/lib/Magento/Framework/Archive/Helper/File.php b/lib/internal/Magento/Framework/Archive/Helper/File.php similarity index 82% rename from lib/Magento/Framework/Archive/Helper/File.php rename to lib/internal/Magento/Framework/Archive/Helper/File.php index 7293a4b5f3de2d9f946bd767e3d59627c12f336b..a60f6765a9955c39b744962fbebff7e842f7b88e 100644 --- a/lib/Magento/Framework/Archive/Helper/File.php +++ b/lib/internal/Magento/Framework/Archive/Helper/File.php @@ -27,6 +27,8 @@ */ namespace Magento\Framework\Archive\Helper; +use Magento\Framework\Exception as MagentoException; + class File { /** @@ -64,6 +66,13 @@ class File */ protected $_fileHandler; + /** + * Whether file has been opened in write mode + * + * @var bool + */ + protected $_isInWriteMode; + /** * Set file path via constructor * @@ -94,17 +103,19 @@ class File * @param string $mode * @param int $chmod * @return void - * @throws \Magento\Framework\Exception + * @throws MagentoException */ public function open($mode = 'w+', $chmod = 0666) { - if ($this->_isWritableMode($mode)) { + $this->_isInWriteMode = $this->_isWritableMode($mode); + + if ($this->_isInWriteMode) { if (!is_writable($this->_fileLocation)) { - throw new \Magento\Framework\Exception('Permission denied to write to ' . $this->_fileLocation); + throw new MagentoException('Permission denied to write to ' . $this->_fileLocation); } if (is_file($this->_filePath) && !is_writable($this->_filePath)) { - throw new \Magento\Framework\Exception( + throw new MagentoException( "Can't open file " . $this->_fileName . " for writing. Permission denied." ); } @@ -112,11 +123,11 @@ class File if ($this->_isReadableMode($mode) && (!is_file($this->_filePath) || !is_readable($this->_filePath))) { if (!is_file($this->_filePath)) { - throw new \Magento\Framework\Exception('File ' . $this->_filePath . ' does not exist'); + throw new MagentoException('File ' . $this->_filePath . ' does not exist'); } if (!is_readable($this->_filePath)) { - throw new \Magento\Framework\Exception('Permission denied to read file ' . $this->_filePath); + throw new MagentoException('Permission denied to read file ' . $this->_filePath); } } @@ -175,7 +186,10 @@ class File $this->_checkFileOpened(); $this->_close(); $this->_fileHandler = false; - @chmod($this->_filePath, $this->_chmod); + + if ($this->_isInWriteMode) { + @chmod($this->_filePath, $this->_chmod); + } } /** @@ -183,14 +197,14 @@ class File * * @param string $mode * @return void - * @throws \Magento\Framework\Exception + * @throws MagentoException */ protected function _open($mode) { $this->_fileHandler = @fopen($this->_filePath, $mode); if (false === $this->_fileHandler) { - throw new \Magento\Framework\Exception('Failed to open file ' . $this->_filePath); + throw new MagentoException('Failed to open file ' . $this->_filePath); } } @@ -199,14 +213,14 @@ class File * * @param string $data * @return void - * @throws \Magento\Framework\Exception + * @throws MagentoException */ protected function _write($data) { $result = @fwrite($this->_fileHandler, $data); if (false === $result) { - throw new \Magento\Framework\Exception('Failed to write data to ' . $this->_filePath); + throw new MagentoException('Failed to write data to ' . $this->_filePath); } } @@ -215,14 +229,14 @@ class File * * @param int $length * @return string - * @throws \Magento\Framework\Exception + * @throws MagentoException */ protected function _read($length) { $result = fread($this->_fileHandler, $length); if (false === $result) { - throw new \Magento\Framework\Exception('Failed to read data from ' . $this->_filePath); + throw new MagentoException('Failed to read data from ' . $this->_filePath); } return $result; @@ -274,12 +288,12 @@ class File * Check whether file is opened * * @return void - * @throws \Magento\Framework\Exception + * @throws MagentoException */ protected function _checkFileOpened() { if (!$this->_fileHandler) { - throw new \Magento\Framework\Exception('File not opened'); + throw new MagentoException('File not opened'); } } } diff --git a/lib/Magento/Framework/Archive/Helper/File/Bz.php b/lib/internal/Magento/Framework/Archive/Helper/File/Bz.php similarity index 100% rename from lib/Magento/Framework/Archive/Helper/File/Bz.php rename to lib/internal/Magento/Framework/Archive/Helper/File/Bz.php diff --git a/lib/Magento/Framework/Archive/Helper/File/Gz.php b/lib/internal/Magento/Framework/Archive/Helper/File/Gz.php similarity index 100% rename from lib/Magento/Framework/Archive/Helper/File/Gz.php rename to lib/internal/Magento/Framework/Archive/Helper/File/Gz.php diff --git a/lib/Magento/Framework/Archive/Tar.php b/lib/internal/Magento/Framework/Archive/Tar.php similarity index 100% rename from lib/Magento/Framework/Archive/Tar.php rename to lib/internal/Magento/Framework/Archive/Tar.php diff --git a/lib/Magento/Framework/Authorization.php b/lib/internal/Magento/Framework/Authorization.php similarity index 100% rename from lib/Magento/Framework/Authorization.php rename to lib/internal/Magento/Framework/Authorization.php diff --git a/lib/Magento/Framework/Authorization/Factory.php b/lib/internal/Magento/Framework/Authorization/Factory.php similarity index 100% rename from lib/Magento/Framework/Authorization/Factory.php rename to lib/internal/Magento/Framework/Authorization/Factory.php diff --git a/lib/Magento/Framework/Authorization/Policy.php b/lib/internal/Magento/Framework/Authorization/Policy.php similarity index 100% rename from lib/Magento/Framework/Authorization/Policy.php rename to lib/internal/Magento/Framework/Authorization/Policy.php diff --git a/lib/Magento/Framework/Authorization/Policy/Acl.php b/lib/internal/Magento/Framework/Authorization/Policy/Acl.php similarity index 100% rename from lib/Magento/Framework/Authorization/Policy/Acl.php rename to lib/internal/Magento/Framework/Authorization/Policy/Acl.php diff --git a/lib/Magento/Framework/Authorization/Policy/DefaultPolicy.php b/lib/internal/Magento/Framework/Authorization/Policy/DefaultPolicy.php similarity index 100% rename from lib/Magento/Framework/Authorization/Policy/DefaultPolicy.php rename to lib/internal/Magento/Framework/Authorization/Policy/DefaultPolicy.php diff --git a/lib/Magento/Framework/Authorization/RoleLocator.php b/lib/internal/Magento/Framework/Authorization/RoleLocator.php similarity index 100% rename from lib/Magento/Framework/Authorization/RoleLocator.php rename to lib/internal/Magento/Framework/Authorization/RoleLocator.php diff --git a/lib/Magento/Framework/Authorization/RoleLocator/DefaultRoleLocator.php b/lib/internal/Magento/Framework/Authorization/RoleLocator/DefaultRoleLocator.php similarity index 100% rename from lib/Magento/Framework/Authorization/RoleLocator/DefaultRoleLocator.php rename to lib/internal/Magento/Framework/Authorization/RoleLocator/DefaultRoleLocator.php diff --git a/lib/Magento/Framework/AuthorizationInterface.php b/lib/internal/Magento/Framework/AuthorizationInterface.php similarity index 100% rename from lib/Magento/Framework/AuthorizationInterface.php rename to lib/internal/Magento/Framework/AuthorizationInterface.php diff --git a/lib/Magento/Framework/Autoload/ClassMap.php b/lib/internal/Magento/Framework/Autoload/ClassMap.php similarity index 100% rename from lib/Magento/Framework/Autoload/ClassMap.php rename to lib/internal/Magento/Framework/Autoload/ClassMap.php diff --git a/lib/Magento/Framework/Autoload/IncludePath.php b/lib/internal/Magento/Framework/Autoload/IncludePath.php similarity index 100% rename from lib/Magento/Framework/Autoload/IncludePath.php rename to lib/internal/Magento/Framework/Autoload/IncludePath.php diff --git a/lib/Magento/Framework/Autoload/Simple.php b/lib/internal/Magento/Framework/Autoload/Simple.php similarity index 100% rename from lib/Magento/Framework/Autoload/Simple.php rename to lib/internal/Magento/Framework/Autoload/Simple.php diff --git a/lib/Magento/Framework/Backup/AbstractBackup.php b/lib/internal/Magento/Framework/Backup/AbstractBackup.php similarity index 100% rename from lib/Magento/Framework/Backup/AbstractBackup.php rename to lib/internal/Magento/Framework/Backup/AbstractBackup.php diff --git a/lib/Magento/Framework/Backup/Archive/Tar.php b/lib/internal/Magento/Framework/Backup/Archive/Tar.php similarity index 100% rename from lib/Magento/Framework/Backup/Archive/Tar.php rename to lib/internal/Magento/Framework/Backup/Archive/Tar.php diff --git a/lib/Magento/Framework/Backup/BackupException.php b/lib/internal/Magento/Framework/Backup/BackupException.php similarity index 100% rename from lib/Magento/Framework/Backup/BackupException.php rename to lib/internal/Magento/Framework/Backup/BackupException.php diff --git a/lib/Magento/Framework/Backup/BackupInterface.php b/lib/internal/Magento/Framework/Backup/BackupInterface.php similarity index 100% rename from lib/Magento/Framework/Backup/BackupInterface.php rename to lib/internal/Magento/Framework/Backup/BackupInterface.php diff --git a/lib/Magento/Framework/Backup/Db.php b/lib/internal/Magento/Framework/Backup/Db.php similarity index 100% rename from lib/Magento/Framework/Backup/Db.php rename to lib/internal/Magento/Framework/Backup/Db.php diff --git a/lib/Magento/Framework/Backup/Db/BackupDbInterface.php b/lib/internal/Magento/Framework/Backup/Db/BackupDbInterface.php similarity index 100% rename from lib/Magento/Framework/Backup/Db/BackupDbInterface.php rename to lib/internal/Magento/Framework/Backup/Db/BackupDbInterface.php diff --git a/lib/Magento/Framework/Backup/Db/BackupFactory.php b/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php similarity index 100% rename from lib/Magento/Framework/Backup/Db/BackupFactory.php rename to lib/internal/Magento/Framework/Backup/Db/BackupFactory.php diff --git a/lib/Magento/Framework/Backup/Db/BackupInterface.php b/lib/internal/Magento/Framework/Backup/Db/BackupInterface.php similarity index 100% rename from lib/Magento/Framework/Backup/Db/BackupInterface.php rename to lib/internal/Magento/Framework/Backup/Db/BackupInterface.php diff --git a/lib/Magento/Framework/Backup/Exception/CantLoadSnapshot.php b/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php similarity index 100% rename from lib/Magento/Framework/Backup/Exception/CantLoadSnapshot.php rename to lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php diff --git a/lib/Magento/Framework/Backup/Exception/FtpConnectionFailed.php b/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php similarity index 100% rename from lib/Magento/Framework/Backup/Exception/FtpConnectionFailed.php rename to lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php diff --git a/lib/Magento/Framework/Backup/Exception/FtpValidationFailed.php b/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php similarity index 100% rename from lib/Magento/Framework/Backup/Exception/FtpValidationFailed.php rename to lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php diff --git a/lib/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php similarity index 100% rename from lib/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php rename to lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php diff --git a/lib/Magento/Framework/Backup/Exception/NotEnoughPermissions.php b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php similarity index 100% rename from lib/Magento/Framework/Backup/Exception/NotEnoughPermissions.php rename to lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php diff --git a/lib/Magento/Framework/Backup/Factory.php b/lib/internal/Magento/Framework/Backup/Factory.php similarity index 100% rename from lib/Magento/Framework/Backup/Factory.php rename to lib/internal/Magento/Framework/Backup/Factory.php diff --git a/lib/Magento/Framework/Backup/Filesystem.php b/lib/internal/Magento/Framework/Backup/Filesystem.php similarity index 100% rename from lib/Magento/Framework/Backup/Filesystem.php rename to lib/internal/Magento/Framework/Backup/Filesystem.php diff --git a/lib/Magento/Framework/Backup/Filesystem/Helper.php b/lib/internal/Magento/Framework/Backup/Filesystem/Helper.php similarity index 100% rename from lib/Magento/Framework/Backup/Filesystem/Helper.php rename to lib/internal/Magento/Framework/Backup/Filesystem/Helper.php diff --git a/lib/Magento/Framework/Backup/Filesystem/Iterator/File.php b/lib/internal/Magento/Framework/Backup/Filesystem/Iterator/File.php similarity index 100% rename from lib/Magento/Framework/Backup/Filesystem/Iterator/File.php rename to lib/internal/Magento/Framework/Backup/Filesystem/Iterator/File.php diff --git a/lib/Magento/Framework/Backup/Filesystem/Iterator/Filter.php b/lib/internal/Magento/Framework/Backup/Filesystem/Iterator/Filter.php similarity index 100% rename from lib/Magento/Framework/Backup/Filesystem/Iterator/Filter.php rename to lib/internal/Magento/Framework/Backup/Filesystem/Iterator/Filter.php diff --git a/lib/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php similarity index 100% rename from lib/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php rename to lib/internal/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php diff --git a/lib/Magento/Framework/Backup/Filesystem/Rollback/Fs.php b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php similarity index 100% rename from lib/Magento/Framework/Backup/Filesystem/Rollback/Fs.php rename to lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php diff --git a/lib/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php similarity index 100% rename from lib/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php rename to lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Ftp.php diff --git a/lib/Magento/Framework/Backup/Media.php b/lib/internal/Magento/Framework/Backup/Media.php similarity index 100% rename from lib/Magento/Framework/Backup/Media.php rename to lib/internal/Magento/Framework/Backup/Media.php diff --git a/lib/Magento/Framework/Backup/Nomedia.php b/lib/internal/Magento/Framework/Backup/Nomedia.php similarity index 100% rename from lib/Magento/Framework/Backup/Nomedia.php rename to lib/internal/Magento/Framework/Backup/Nomedia.php diff --git a/lib/Magento/Framework/Backup/Snapshot.php b/lib/internal/Magento/Framework/Backup/Snapshot.php similarity index 100% rename from lib/Magento/Framework/Backup/Snapshot.php rename to lib/internal/Magento/Framework/Backup/Snapshot.php diff --git a/lib/Magento/Framework/BootstrapException.php b/lib/internal/Magento/Framework/BootstrapException.php similarity index 100% rename from lib/Magento/Framework/BootstrapException.php rename to lib/internal/Magento/Framework/BootstrapException.php diff --git a/lib/Magento/Framework/Cache/Backend/Database.php b/lib/internal/Magento/Framework/Cache/Backend/Database.php similarity index 100% rename from lib/Magento/Framework/Cache/Backend/Database.php rename to lib/internal/Magento/Framework/Cache/Backend/Database.php diff --git a/lib/Magento/Framework/Cache/Backend/Decorator/AbstractDecorator.php b/lib/internal/Magento/Framework/Cache/Backend/Decorator/AbstractDecorator.php similarity index 100% rename from lib/Magento/Framework/Cache/Backend/Decorator/AbstractDecorator.php rename to lib/internal/Magento/Framework/Cache/Backend/Decorator/AbstractDecorator.php diff --git a/lib/Magento/Framework/Cache/Backend/Decorator/Compression.php b/lib/internal/Magento/Framework/Cache/Backend/Decorator/Compression.php similarity index 100% rename from lib/Magento/Framework/Cache/Backend/Decorator/Compression.php rename to lib/internal/Magento/Framework/Cache/Backend/Decorator/Compression.php diff --git a/lib/Magento/Framework/Cache/Backend/Eaccelerator.php b/lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php similarity index 100% rename from lib/Magento/Framework/Cache/Backend/Eaccelerator.php rename to lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php diff --git a/lib/Magento/Framework/Cache/Backend/Memcached.php b/lib/internal/Magento/Framework/Cache/Backend/Memcached.php similarity index 100% rename from lib/Magento/Framework/Cache/Backend/Memcached.php rename to lib/internal/Magento/Framework/Cache/Backend/Memcached.php diff --git a/lib/Magento/Framework/Cache/Backend/MongoDb.php b/lib/internal/Magento/Framework/Cache/Backend/MongoDb.php similarity index 100% rename from lib/Magento/Framework/Cache/Backend/MongoDb.php rename to lib/internal/Magento/Framework/Cache/Backend/MongoDb.php diff --git a/lib/Magento/Framework/Cache/Config.php b/lib/internal/Magento/Framework/Cache/Config.php similarity index 100% rename from lib/Magento/Framework/Cache/Config.php rename to lib/internal/Magento/Framework/Cache/Config.php diff --git a/lib/Magento/Framework/Cache/Config/Converter.php b/lib/internal/Magento/Framework/Cache/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/Cache/Config/Converter.php rename to lib/internal/Magento/Framework/Cache/Config/Converter.php diff --git a/lib/Magento/Framework/Cache/Config/Data.php b/lib/internal/Magento/Framework/Cache/Config/Data.php similarity index 100% rename from lib/Magento/Framework/Cache/Config/Data.php rename to lib/internal/Magento/Framework/Cache/Config/Data.php diff --git a/lib/Magento/Framework/Cache/Config/Reader.php b/lib/internal/Magento/Framework/Cache/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/Cache/Config/Reader.php rename to lib/internal/Magento/Framework/Cache/Config/Reader.php diff --git a/lib/Magento/Framework/Cache/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Cache/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/Cache/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/Cache/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/Cache/ConfigInterface.php b/lib/internal/Magento/Framework/Cache/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Cache/ConfigInterface.php rename to lib/internal/Magento/Framework/Cache/ConfigInterface.php diff --git a/lib/Magento/Framework/Cache/Core.php b/lib/internal/Magento/Framework/Cache/Core.php similarity index 100% rename from lib/Magento/Framework/Cache/Core.php rename to lib/internal/Magento/Framework/Cache/Core.php diff --git a/lib/Magento/Framework/Cache/Frontend/Adapter/Zend.php b/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php similarity index 100% rename from lib/Magento/Framework/Cache/Frontend/Adapter/Zend.php rename to lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php diff --git a/lib/Magento/Framework/Cache/Frontend/Decorator/Bare.php b/lib/internal/Magento/Framework/Cache/Frontend/Decorator/Bare.php similarity index 100% rename from lib/Magento/Framework/Cache/Frontend/Decorator/Bare.php rename to lib/internal/Magento/Framework/Cache/Frontend/Decorator/Bare.php diff --git a/lib/Magento/Framework/Cache/Frontend/Decorator/Profiler.php b/lib/internal/Magento/Framework/Cache/Frontend/Decorator/Profiler.php similarity index 100% rename from lib/Magento/Framework/Cache/Frontend/Decorator/Profiler.php rename to lib/internal/Magento/Framework/Cache/Frontend/Decorator/Profiler.php diff --git a/lib/Magento/Framework/Cache/Frontend/Decorator/TagScope.php b/lib/internal/Magento/Framework/Cache/Frontend/Decorator/TagScope.php similarity index 100% rename from lib/Magento/Framework/Cache/Frontend/Decorator/TagScope.php rename to lib/internal/Magento/Framework/Cache/Frontend/Decorator/TagScope.php diff --git a/lib/Magento/Framework/Cache/FrontendInterface.php b/lib/internal/Magento/Framework/Cache/FrontendInterface.php similarity index 100% rename from lib/Magento/Framework/Cache/FrontendInterface.php rename to lib/internal/Magento/Framework/Cache/FrontendInterface.php diff --git a/lib/Magento/Framework/Cache/etc/cache.xsd b/lib/internal/Magento/Framework/Cache/etc/cache.xsd similarity index 100% rename from lib/Magento/Framework/Cache/etc/cache.xsd rename to lib/internal/Magento/Framework/Cache/etc/cache.xsd diff --git a/lib/Magento/Framework/Code/Generator.php b/lib/internal/Magento/Framework/Code/Generator.php similarity index 100% rename from lib/Magento/Framework/Code/Generator.php rename to lib/internal/Magento/Framework/Code/Generator.php diff --git a/lib/Magento/Framework/Code/Generator/Autoloader.php b/lib/internal/Magento/Framework/Code/Generator/Autoloader.php similarity index 100% rename from lib/Magento/Framework/Code/Generator/Autoloader.php rename to lib/internal/Magento/Framework/Code/Generator/Autoloader.php diff --git a/lib/Magento/Framework/Code/Generator/CodeGenerator/CodeGeneratorInterface.php b/lib/internal/Magento/Framework/Code/Generator/CodeGenerator/CodeGeneratorInterface.php similarity index 100% rename from lib/Magento/Framework/Code/Generator/CodeGenerator/CodeGeneratorInterface.php rename to lib/internal/Magento/Framework/Code/Generator/CodeGenerator/CodeGeneratorInterface.php diff --git a/lib/Magento/Framework/Code/Generator/CodeGenerator/Zend.php b/lib/internal/Magento/Framework/Code/Generator/CodeGenerator/Zend.php similarity index 100% rename from lib/Magento/Framework/Code/Generator/CodeGenerator/Zend.php rename to lib/internal/Magento/Framework/Code/Generator/CodeGenerator/Zend.php diff --git a/lib/Magento/Framework/Code/Generator/EntityAbstract.php b/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php similarity index 100% rename from lib/Magento/Framework/Code/Generator/EntityAbstract.php rename to lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php diff --git a/lib/Magento/Framework/Code/Generator/Io.php b/lib/internal/Magento/Framework/Code/Generator/Io.php similarity index 100% rename from lib/Magento/Framework/Code/Generator/Io.php rename to lib/internal/Magento/Framework/Code/Generator/Io.php diff --git a/lib/Magento/Framework/Code/Minifier/Adapter/Js/Jsmin.php b/lib/internal/Magento/Framework/Code/Minifier/Adapter/Js/Jsmin.php similarity index 100% rename from lib/Magento/Framework/Code/Minifier/Adapter/Js/Jsmin.php rename to lib/internal/Magento/Framework/Code/Minifier/Adapter/Js/Jsmin.php diff --git a/lib/Magento/Framework/Code/Minifier/AdapterInterface.php b/lib/internal/Magento/Framework/Code/Minifier/AdapterInterface.php similarity index 100% rename from lib/Magento/Framework/Code/Minifier/AdapterInterface.php rename to lib/internal/Magento/Framework/Code/Minifier/AdapterInterface.php diff --git a/lib/Magento/Framework/Code/NameBuilder.php b/lib/internal/Magento/Framework/Code/NameBuilder.php similarity index 100% rename from lib/Magento/Framework/Code/NameBuilder.php rename to lib/internal/Magento/Framework/Code/NameBuilder.php diff --git a/lib/Magento/Framework/Code/Reader/ArgumentsReader.php b/lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php similarity index 100% rename from lib/Magento/Framework/Code/Reader/ArgumentsReader.php rename to lib/internal/Magento/Framework/Code/Reader/ArgumentsReader.php diff --git a/lib/Magento/Framework/Code/Reader/ClassReader.php b/lib/internal/Magento/Framework/Code/Reader/ClassReader.php similarity index 100% rename from lib/Magento/Framework/Code/Reader/ClassReader.php rename to lib/internal/Magento/Framework/Code/Reader/ClassReader.php diff --git a/lib/Magento/Framework/Code/ValidationException.php b/lib/internal/Magento/Framework/Code/ValidationException.php similarity index 100% rename from lib/Magento/Framework/Code/ValidationException.php rename to lib/internal/Magento/Framework/Code/ValidationException.php diff --git a/lib/Magento/Framework/Code/Validator.php b/lib/internal/Magento/Framework/Code/Validator.php similarity index 100% rename from lib/Magento/Framework/Code/Validator.php rename to lib/internal/Magento/Framework/Code/Validator.php diff --git a/lib/Magento/Framework/Code/Validator/ArgumentSequence.php b/lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php similarity index 100% rename from lib/Magento/Framework/Code/Validator/ArgumentSequence.php rename to lib/internal/Magento/Framework/Code/Validator/ArgumentSequence.php diff --git a/lib/Magento/Framework/Code/Validator/ConstructorIntegrity.php b/lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php similarity index 100% rename from lib/Magento/Framework/Code/Validator/ConstructorIntegrity.php rename to lib/internal/Magento/Framework/Code/Validator/ConstructorIntegrity.php diff --git a/lib/Magento/Framework/Code/Validator/ContextAggregation.php b/lib/internal/Magento/Framework/Code/Validator/ContextAggregation.php similarity index 100% rename from lib/Magento/Framework/Code/Validator/ContextAggregation.php rename to lib/internal/Magento/Framework/Code/Validator/ContextAggregation.php diff --git a/lib/Magento/Framework/Code/Validator/TypeDuplication.php b/lib/internal/Magento/Framework/Code/Validator/TypeDuplication.php similarity index 100% rename from lib/Magento/Framework/Code/Validator/TypeDuplication.php rename to lib/internal/Magento/Framework/Code/Validator/TypeDuplication.php diff --git a/lib/Magento/Framework/Code/ValidatorInterface.php b/lib/internal/Magento/Framework/Code/ValidatorInterface.php similarity index 100% rename from lib/Magento/Framework/Code/ValidatorInterface.php rename to lib/internal/Magento/Framework/Code/ValidatorInterface.php diff --git a/lib/Magento/Framework/Config/AbstractXml.php b/lib/internal/Magento/Framework/Config/AbstractXml.php similarity index 100% rename from lib/Magento/Framework/Config/AbstractXml.php rename to lib/internal/Magento/Framework/Config/AbstractXml.php diff --git a/lib/Magento/Framework/Config/CacheInterface.php b/lib/internal/Magento/Framework/Config/CacheInterface.php similarity index 100% rename from lib/Magento/Framework/Config/CacheInterface.php rename to lib/internal/Magento/Framework/Config/CacheInterface.php diff --git a/lib/Magento/Framework/Config/Converter/Dom.php b/lib/internal/Magento/Framework/Config/Converter/Dom.php similarity index 100% rename from lib/Magento/Framework/Config/Converter/Dom.php rename to lib/internal/Magento/Framework/Config/Converter/Dom.php diff --git a/lib/Magento/Framework/Config/Converter/Dom/Flat.php b/lib/internal/Magento/Framework/Config/Converter/Dom/Flat.php similarity index 100% rename from lib/Magento/Framework/Config/Converter/Dom/Flat.php rename to lib/internal/Magento/Framework/Config/Converter/Dom/Flat.php diff --git a/lib/Magento/Framework/Config/ConverterInterface.php b/lib/internal/Magento/Framework/Config/ConverterInterface.php similarity index 100% rename from lib/Magento/Framework/Config/ConverterInterface.php rename to lib/internal/Magento/Framework/Config/ConverterInterface.php diff --git a/lib/Magento/Framework/Config/Data.php b/lib/internal/Magento/Framework/Config/Data.php similarity index 100% rename from lib/Magento/Framework/Config/Data.php rename to lib/internal/Magento/Framework/Config/Data.php diff --git a/lib/Magento/Framework/Config/Data/Scoped.php b/lib/internal/Magento/Framework/Config/Data/Scoped.php similarity index 100% rename from lib/Magento/Framework/Config/Data/Scoped.php rename to lib/internal/Magento/Framework/Config/Data/Scoped.php diff --git a/lib/Magento/Framework/Config/DataInterface.php b/lib/internal/Magento/Framework/Config/DataInterface.php similarity index 100% rename from lib/Magento/Framework/Config/DataInterface.php rename to lib/internal/Magento/Framework/Config/DataInterface.php diff --git a/lib/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php similarity index 100% rename from lib/Magento/Framework/Config/Dom.php rename to lib/internal/Magento/Framework/Config/Dom.php diff --git a/lib/Magento/Framework/Config/Dom/ArrayNodeConfig.php b/lib/internal/Magento/Framework/Config/Dom/ArrayNodeConfig.php similarity index 100% rename from lib/Magento/Framework/Config/Dom/ArrayNodeConfig.php rename to lib/internal/Magento/Framework/Config/Dom/ArrayNodeConfig.php diff --git a/lib/Magento/Framework/Config/Dom/NodeMergingConfig.php b/lib/internal/Magento/Framework/Config/Dom/NodeMergingConfig.php similarity index 100% rename from lib/Magento/Framework/Config/Dom/NodeMergingConfig.php rename to lib/internal/Magento/Framework/Config/Dom/NodeMergingConfig.php diff --git a/lib/Magento/Framework/Config/Dom/NodePathMatcher.php b/lib/internal/Magento/Framework/Config/Dom/NodePathMatcher.php similarity index 100% rename from lib/Magento/Framework/Config/Dom/NodePathMatcher.php rename to lib/internal/Magento/Framework/Config/Dom/NodePathMatcher.php diff --git a/lib/Magento/Framework/Config/Dom/ValidationException.php b/lib/internal/Magento/Framework/Config/Dom/ValidationException.php similarity index 100% rename from lib/Magento/Framework/Config/Dom/ValidationException.php rename to lib/internal/Magento/Framework/Config/Dom/ValidationException.php diff --git a/lib/Magento/Framework/Config/DomFactory.php b/lib/internal/Magento/Framework/Config/DomFactory.php similarity index 100% rename from lib/Magento/Framework/Config/DomFactory.php rename to lib/internal/Magento/Framework/Config/DomFactory.php diff --git a/lib/Magento/Framework/Config/FileIterator.php b/lib/internal/Magento/Framework/Config/FileIterator.php similarity index 100% rename from lib/Magento/Framework/Config/FileIterator.php rename to lib/internal/Magento/Framework/Config/FileIterator.php diff --git a/lib/Magento/Framework/Config/FileIteratorFactory.php b/lib/internal/Magento/Framework/Config/FileIteratorFactory.php similarity index 100% rename from lib/Magento/Framework/Config/FileIteratorFactory.php rename to lib/internal/Magento/Framework/Config/FileIteratorFactory.php diff --git a/lib/Magento/Framework/Config/FileResolverInterface.php b/lib/internal/Magento/Framework/Config/FileResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Config/FileResolverInterface.php rename to lib/internal/Magento/Framework/Config/FileResolverInterface.php diff --git a/lib/Magento/Framework/Config/Reader/Filesystem.php b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php similarity index 100% rename from lib/Magento/Framework/Config/Reader/Filesystem.php rename to lib/internal/Magento/Framework/Config/Reader/Filesystem.php diff --git a/lib/Magento/Framework/Config/ReaderInterface.php b/lib/internal/Magento/Framework/Config/ReaderInterface.php similarity index 100% rename from lib/Magento/Framework/Config/ReaderInterface.php rename to lib/internal/Magento/Framework/Config/ReaderInterface.php diff --git a/lib/Magento/Framework/Config/SchemaLocatorInterface.php b/lib/internal/Magento/Framework/Config/SchemaLocatorInterface.php similarity index 100% rename from lib/Magento/Framework/Config/SchemaLocatorInterface.php rename to lib/internal/Magento/Framework/Config/SchemaLocatorInterface.php diff --git a/lib/Magento/Framework/Config/Scope.php b/lib/internal/Magento/Framework/Config/Scope.php similarity index 100% rename from lib/Magento/Framework/Config/Scope.php rename to lib/internal/Magento/Framework/Config/Scope.php diff --git a/lib/Magento/Framework/Config/ScopeInterface.php b/lib/internal/Magento/Framework/Config/ScopeInterface.php similarity index 100% rename from lib/Magento/Framework/Config/ScopeInterface.php rename to lib/internal/Magento/Framework/Config/ScopeInterface.php diff --git a/lib/Magento/Framework/Config/ScopeListInterface.php b/lib/internal/Magento/Framework/Config/ScopeListInterface.php similarity index 100% rename from lib/Magento/Framework/Config/ScopeListInterface.php rename to lib/internal/Magento/Framework/Config/ScopeListInterface.php diff --git a/lib/Magento/Framework/Config/Theme.php b/lib/internal/Magento/Framework/Config/Theme.php similarity index 100% rename from lib/Magento/Framework/Config/Theme.php rename to lib/internal/Magento/Framework/Config/Theme.php diff --git a/lib/Magento/Framework/Config/ValidationStateInterface.php b/lib/internal/Magento/Framework/Config/ValidationStateInterface.php similarity index 100% rename from lib/Magento/Framework/Config/ValidationStateInterface.php rename to lib/internal/Magento/Framework/Config/ValidationStateInterface.php diff --git a/lib/Magento/Framework/Config/View.php b/lib/internal/Magento/Framework/Config/View.php similarity index 100% rename from lib/Magento/Framework/Config/View.php rename to lib/internal/Magento/Framework/Config/View.php diff --git a/lib/Magento/Framework/Config/etc/theme.xsd b/lib/internal/Magento/Framework/Config/etc/theme.xsd similarity index 100% rename from lib/Magento/Framework/Config/etc/theme.xsd rename to lib/internal/Magento/Framework/Config/etc/theme.xsd diff --git a/lib/Magento/Framework/Config/etc/view.xsd b/lib/internal/Magento/Framework/Config/etc/view.xsd similarity index 100% rename from lib/Magento/Framework/Config/etc/view.xsd rename to lib/internal/Magento/Framework/Config/etc/view.xsd diff --git a/lib/Magento/Framework/Connect/Channel/Generator.php b/lib/internal/Magento/Framework/Connect/Channel/Generator.php similarity index 100% rename from lib/Magento/Framework/Connect/Channel/Generator.php rename to lib/internal/Magento/Framework/Connect/Channel/Generator.php diff --git a/lib/Magento/Framework/Connect/Channel/Parser.php b/lib/internal/Magento/Framework/Connect/Channel/Parser.php similarity index 100% rename from lib/Magento/Framework/Connect/Channel/Parser.php rename to lib/internal/Magento/Framework/Connect/Channel/Parser.php diff --git a/lib/Magento/Framework/Connect/Channel/VO.php b/lib/internal/Magento/Framework/Connect/Channel/VO.php similarity index 100% rename from lib/Magento/Framework/Connect/Channel/VO.php rename to lib/internal/Magento/Framework/Connect/Channel/VO.php diff --git a/lib/Magento/Framework/Connect/Command.php b/lib/internal/Magento/Framework/Connect/Command.php similarity index 100% rename from lib/Magento/Framework/Connect/Command.php rename to lib/internal/Magento/Framework/Connect/Command.php diff --git a/lib/Magento/Framework/Connect/Command/Channels.php b/lib/internal/Magento/Framework/Connect/Command/Channels.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Channels.php rename to lib/internal/Magento/Framework/Connect/Command/Channels.php diff --git a/lib/Magento/Framework/Connect/Command/Channels_Header.php b/lib/internal/Magento/Framework/Connect/Command/Channels_Header.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Channels_Header.php rename to lib/internal/Magento/Framework/Connect/Command/Channels_Header.php diff --git a/lib/Magento/Framework/Connect/Command/Config.php b/lib/internal/Magento/Framework/Connect/Command/Config.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Config.php rename to lib/internal/Magento/Framework/Connect/Command/Config.php diff --git a/lib/Magento/Framework/Connect/Command/Config_Header.php b/lib/internal/Magento/Framework/Connect/Command/Config_Header.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Config_Header.php rename to lib/internal/Magento/Framework/Connect/Command/Config_Header.php diff --git a/lib/Magento/Framework/Connect/Command/Install.php b/lib/internal/Magento/Framework/Connect/Command/Install.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Install.php rename to lib/internal/Magento/Framework/Connect/Command/Install.php diff --git a/lib/Magento/Framework/Connect/Command/Install_Header.php b/lib/internal/Magento/Framework/Connect/Command/Install_Header.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Install_Header.php rename to lib/internal/Magento/Framework/Connect/Command/Install_Header.php diff --git a/lib/Magento/Framework/Connect/Command/Package.php b/lib/internal/Magento/Framework/Connect/Command/Package.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Package.php rename to lib/internal/Magento/Framework/Connect/Command/Package.php diff --git a/lib/Magento/Framework/Connect/Command/Package_Header.php b/lib/internal/Magento/Framework/Connect/Command/Package_Header.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Package_Header.php rename to lib/internal/Magento/Framework/Connect/Command/Package_Header.php diff --git a/lib/Magento/Framework/Connect/Command/Registry.php b/lib/internal/Magento/Framework/Connect/Command/Registry.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Registry.php rename to lib/internal/Magento/Framework/Connect/Command/Registry.php diff --git a/lib/Magento/Framework/Connect/Command/Registry_Header.php b/lib/internal/Magento/Framework/Connect/Command/Registry_Header.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Registry_Header.php rename to lib/internal/Magento/Framework/Connect/Command/Registry_Header.php diff --git a/lib/Magento/Framework/Connect/Command/Remote.php b/lib/internal/Magento/Framework/Connect/Command/Remote.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Remote.php rename to lib/internal/Magento/Framework/Connect/Command/Remote.php diff --git a/lib/Magento/Framework/Connect/Command/Remote_Header.php b/lib/internal/Magento/Framework/Connect/Command/Remote_Header.php similarity index 100% rename from lib/Magento/Framework/Connect/Command/Remote_Header.php rename to lib/internal/Magento/Framework/Connect/Command/Remote_Header.php diff --git a/lib/Magento/Framework/Connect/Config.php b/lib/internal/Magento/Framework/Connect/Config.php similarity index 100% rename from lib/Magento/Framework/Connect/Config.php rename to lib/internal/Magento/Framework/Connect/Config.php diff --git a/lib/Magento/Framework/Connect/Converter.php b/lib/internal/Magento/Framework/Connect/Converter.php similarity index 100% rename from lib/Magento/Framework/Connect/Converter.php rename to lib/internal/Magento/Framework/Connect/Converter.php diff --git a/lib/Magento/Framework/Connect/Frontend.php b/lib/internal/Magento/Framework/Connect/Frontend.php similarity index 100% rename from lib/Magento/Framework/Connect/Frontend.php rename to lib/internal/Magento/Framework/Connect/Frontend.php diff --git a/lib/Magento/Framework/Connect/Frontend/CLI.php b/lib/internal/Magento/Framework/Connect/Frontend/CLI.php similarity index 100% rename from lib/Magento/Framework/Connect/Frontend/CLI.php rename to lib/internal/Magento/Framework/Connect/Frontend/CLI.php diff --git a/lib/Magento/Framework/Connect/Ftp.php b/lib/internal/Magento/Framework/Connect/Ftp.php similarity index 100% rename from lib/Magento/Framework/Connect/Ftp.php rename to lib/internal/Magento/Framework/Connect/Ftp.php diff --git a/lib/Magento/Framework/Connect/Loader.php b/lib/internal/Magento/Framework/Connect/Loader.php similarity index 100% rename from lib/Magento/Framework/Connect/Loader.php rename to lib/internal/Magento/Framework/Connect/Loader.php diff --git a/lib/Magento/Framework/Connect/Loader/Ftp.php b/lib/internal/Magento/Framework/Connect/Loader/Ftp.php similarity index 100% rename from lib/Magento/Framework/Connect/Loader/Ftp.php rename to lib/internal/Magento/Framework/Connect/Loader/Ftp.php diff --git a/lib/Magento/Framework/Connect/Package.php b/lib/internal/Magento/Framework/Connect/Package.php similarity index 100% rename from lib/Magento/Framework/Connect/Package.php rename to lib/internal/Magento/Framework/Connect/Package.php diff --git a/lib/Magento/Framework/Connect/Package/Hotfix.php b/lib/internal/Magento/Framework/Connect/Package/Hotfix.php similarity index 100% rename from lib/Magento/Framework/Connect/Package/Hotfix.php rename to lib/internal/Magento/Framework/Connect/Package/Hotfix.php diff --git a/lib/Magento/Framework/Connect/Package/Reader.php b/lib/internal/Magento/Framework/Connect/Package/Reader.php similarity index 100% rename from lib/Magento/Framework/Connect/Package/Reader.php rename to lib/internal/Magento/Framework/Connect/Package/Reader.php diff --git a/lib/Magento/Framework/Connect/Package/Target.php b/lib/internal/Magento/Framework/Connect/Package/Target.php similarity index 98% rename from lib/Magento/Framework/Connect/Package/Target.php rename to lib/internal/Magento/Framework/Connect/Package/Target.php index 55e07d5fadc3c58fb0bb1707aae0c786f3edfdbf..b2927a795290deb772ae4e933f5180b224ef486e 100644 --- a/lib/Magento/Framework/Connect/Package/Target.php +++ b/lib/internal/Magento/Framework/Connect/Package/Target.php @@ -65,7 +65,7 @@ class Target 'label' => "Magento Global Configuration", 'uri' => "./app/etc" ); - $this->_targetMap[] = array('name' => "magelib", 'label' => "Magento PHP Library file", 'uri' => "./lib"); + $this->_targetMap[] = array('name' => "magelib", 'label' => "Magento PHP Library file", 'uri' => "./lib/internal"); $this->_targetMap[] = array( 'name' => "magelocale", 'label' => "Magento Locale language file", diff --git a/lib/Magento/Framework/Connect/Package/VO.php b/lib/internal/Magento/Framework/Connect/Package/VO.php similarity index 100% rename from lib/Magento/Framework/Connect/Package/VO.php rename to lib/internal/Magento/Framework/Connect/Package/VO.php diff --git a/lib/Magento/Framework/Connect/Package/Writer.php b/lib/internal/Magento/Framework/Connect/Package/Writer.php similarity index 100% rename from lib/Magento/Framework/Connect/Package/Writer.php rename to lib/internal/Magento/Framework/Connect/Package/Writer.php diff --git a/lib/Magento/Framework/Connect/Packager.php b/lib/internal/Magento/Framework/Connect/Packager.php similarity index 100% rename from lib/Magento/Framework/Connect/Packager.php rename to lib/internal/Magento/Framework/Connect/Packager.php diff --git a/lib/Magento/Framework/Connect/Rest.php b/lib/internal/Magento/Framework/Connect/Rest.php similarity index 100% rename from lib/Magento/Framework/Connect/Rest.php rename to lib/internal/Magento/Framework/Connect/Rest.php diff --git a/lib/Magento/Framework/Connect/Singleconfig.php b/lib/internal/Magento/Framework/Connect/Singleconfig.php similarity index 100% rename from lib/Magento/Framework/Connect/Singleconfig.php rename to lib/internal/Magento/Framework/Connect/Singleconfig.php diff --git a/lib/Magento/Framework/Connect/Structures/Graph.php b/lib/internal/Magento/Framework/Connect/Structures/Graph.php similarity index 100% rename from lib/Magento/Framework/Connect/Structures/Graph.php rename to lib/internal/Magento/Framework/Connect/Structures/Graph.php diff --git a/lib/Magento/Framework/Connect/Structures/Node.php b/lib/internal/Magento/Framework/Connect/Structures/Node.php similarity index 100% rename from lib/Magento/Framework/Connect/Structures/Node.php rename to lib/internal/Magento/Framework/Connect/Structures/Node.php diff --git a/lib/Magento/Framework/Connect/Validator.php b/lib/internal/Magento/Framework/Connect/Validator.php similarity index 100% rename from lib/Magento/Framework/Connect/Validator.php rename to lib/internal/Magento/Framework/Connect/Validator.php diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/forbidden.php b/lib/internal/Magento/Framework/Controller/Response/Http.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/forbidden.php rename to lib/internal/Magento/Framework/Controller/Response/Http.php index b55caa64e18506b545ceea2d1dbe0c293366fc46..c71089eb5db4ccfc8b8e047f90c661841b6b9161 100644 --- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/_files/ThemeDeployment/run/forbidden.php +++ b/lib/internal/Magento/Framework/Controller/Response/Http.php @@ -1,5 +1,7 @@ <?php /** + * Magento's adapter for Zend Response class. Needed for proper DI functioning. + * * Magento * * NOTICE OF LICENSE @@ -21,5 +23,8 @@ * @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) */ +namespace Magento\Framework\Controller\Response; -return array('', 'txt', 'php'); +class Http extends \Zend_Controller_Response_Http +{ +} diff --git a/lib/Magento/Framework/Controller/Router/Route/Factory.php b/lib/internal/Magento/Framework/Controller/Router/Route/Factory.php similarity index 100% rename from lib/Magento/Framework/Controller/Router/Route/Factory.php rename to lib/internal/Magento/Framework/Controller/Router/Route/Factory.php diff --git a/lib/Magento/Framework/Convert/ConvertArray.php b/lib/internal/Magento/Framework/Convert/ConvertArray.php similarity index 100% rename from lib/Magento/Framework/Convert/ConvertArray.php rename to lib/internal/Magento/Framework/Convert/ConvertArray.php diff --git a/lib/Magento/Framework/Convert/Excel.php b/lib/internal/Magento/Framework/Convert/Excel.php similarity index 100% rename from lib/Magento/Framework/Convert/Excel.php rename to lib/internal/Magento/Framework/Convert/Excel.php diff --git a/lib/Magento/Framework/Convert/Object.php b/lib/internal/Magento/Framework/Convert/Object.php similarity index 100% rename from lib/Magento/Framework/Convert/Object.php rename to lib/internal/Magento/Framework/Convert/Object.php diff --git a/lib/Magento/Framework/Convert/Xml.php b/lib/internal/Magento/Framework/Convert/Xml.php similarity index 100% rename from lib/Magento/Framework/Convert/Xml.php rename to lib/internal/Magento/Framework/Convert/Xml.php diff --git a/lib/Magento/Framework/Css/PreProcessor/Adapter/AdapterException.php b/lib/internal/Magento/Framework/Css/PreProcessor/Adapter/AdapterException.php similarity index 100% rename from lib/Magento/Framework/Css/PreProcessor/Adapter/AdapterException.php rename to lib/internal/Magento/Framework/Css/PreProcessor/Adapter/AdapterException.php diff --git a/lib/Magento/Framework/Css/PreProcessor/Adapter/Oyejorge.php b/lib/internal/Magento/Framework/Css/PreProcessor/Adapter/Oyejorge.php similarity index 100% rename from lib/Magento/Framework/Css/PreProcessor/Adapter/Oyejorge.php rename to lib/internal/Magento/Framework/Css/PreProcessor/Adapter/Oyejorge.php diff --git a/lib/Magento/Framework/Css/PreProcessor/AdapterInterface.php b/lib/internal/Magento/Framework/Css/PreProcessor/AdapterInterface.php similarity index 100% rename from lib/Magento/Framework/Css/PreProcessor/AdapterInterface.php rename to lib/internal/Magento/Framework/Css/PreProcessor/AdapterInterface.php diff --git a/lib/internal/Magento/Framework/Css/PreProcessor/Less.php b/lib/internal/Magento/Framework/Css/PreProcessor/Less.php new file mode 100644 index 0000000000000000000000000000000000000000..bc39779da3cb501dddc1678846878996413ab817 --- /dev/null +++ b/lib/internal/Magento/Framework/Css/PreProcessor/Less.php @@ -0,0 +1,68 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Css\PreProcessor; + +use Magento\Framework\Css\PreProcessor\AdapterInterface; +use Magento\Framework\View\Asset\PreProcessorInterface; + +class Less implements PreProcessorInterface +{ + /** + * @var \Magento\Framework\Less\FileGenerator + */ + protected $fileGenerator; + + /** + * @var AdapterInterface + */ + protected $adapter; + + /** + * @param \Magento\Framework\Less\FileGenerator $fileGenerator + * @param AdapterInterface $adapter + */ + public function __construct( + \Magento\Framework\Less\FileGenerator $fileGenerator, + AdapterInterface $adapter + ) { + $this->fileGenerator = $fileGenerator; + $this->adapter = $adapter; + } + + /** + * {@inheritdoc} + */ + public function process(\Magento\Framework\View\Asset\PreProcessor\Chain $chain) + { + $chain->setContentType('less'); + $tmpLessFile = $this->fileGenerator->generateLessFileTree($chain); + $cssContent = $this->adapter->process($tmpLessFile); + $cssTrimmedContent = trim($cssContent); + if (!empty($cssTrimmedContent)) { + $chain->setContent($cssContent); + $chain->setContentType('css'); + } + } +} diff --git a/lib/Magento/Framework/Currency.php b/lib/internal/Magento/Framework/Currency.php similarity index 100% rename from lib/Magento/Framework/Currency.php rename to lib/internal/Magento/Framework/Currency.php diff --git a/lib/Magento/Framework/CurrencyFactory.php b/lib/internal/Magento/Framework/CurrencyFactory.php similarity index 100% rename from lib/Magento/Framework/CurrencyFactory.php rename to lib/internal/Magento/Framework/CurrencyFactory.php diff --git a/lib/Magento/Framework/CurrencyInterface.php b/lib/internal/Magento/Framework/CurrencyInterface.php similarity index 100% rename from lib/Magento/Framework/CurrencyInterface.php rename to lib/internal/Magento/Framework/CurrencyInterface.php diff --git a/lib/Magento/Framework/DB/Adapter/AdapterInterface.php b/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php similarity index 100% rename from lib/Magento/Framework/DB/Adapter/AdapterInterface.php rename to lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php diff --git a/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php similarity index 99% rename from lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php rename to lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php index de85b40366bd719303ab7df4a03e6994ba7614a2..e56566387e714a8d2e6f685d354bbcf688cea8f0 100644 --- a/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -2475,14 +2475,21 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface $comment = $options['COMMENT']; } + //set column position + $after = null; + if (!empty($options['AFTER'])) { + $after = $options['AFTER']; + } + return sprintf( - '%s%s%s%s%s COMMENT %s', + '%s%s%s%s%s COMMENT %s %s', $cType, $cUnsigned ? ' UNSIGNED' : '', $cNullable ? ' NULL' : ' NOT NULL', $cDefault !== false ? $this->quoteInto(' default ?', $cDefault) : '', $cIdentity ? ' auto_increment' : '', - $this->quote($comment) + $this->quote($comment), + $after ? 'AFTER ' . $this->quoteIdentifier($after) : '' ); } diff --git a/lib/Magento/Framework/DB/DBException.php b/lib/internal/Magento/Framework/DB/DBException.php similarity index 100% rename from lib/Magento/Framework/DB/DBException.php rename to lib/internal/Magento/Framework/DB/DBException.php diff --git a/lib/Magento/Framework/DB/Ddl/Table.php b/lib/internal/Magento/Framework/DB/Ddl/Table.php similarity index 100% rename from lib/Magento/Framework/DB/Ddl/Table.php rename to lib/internal/Magento/Framework/DB/Ddl/Table.php diff --git a/lib/Magento/Framework/DB/Ddl/Trigger.php b/lib/internal/Magento/Framework/DB/Ddl/Trigger.php similarity index 100% rename from lib/Magento/Framework/DB/Ddl/Trigger.php rename to lib/internal/Magento/Framework/DB/Ddl/Trigger.php diff --git a/lib/Magento/Framework/DB/Ddl/TriggerFactory.php b/lib/internal/Magento/Framework/DB/Ddl/TriggerFactory.php similarity index 100% rename from lib/Magento/Framework/DB/Ddl/TriggerFactory.php rename to lib/internal/Magento/Framework/DB/Ddl/TriggerFactory.php diff --git a/lib/Magento/Framework/DB/ExpressionConverter.php b/lib/internal/Magento/Framework/DB/ExpressionConverter.php similarity index 100% rename from lib/Magento/Framework/DB/ExpressionConverter.php rename to lib/internal/Magento/Framework/DB/ExpressionConverter.php diff --git a/lib/Magento/Framework/DB/Helper.php b/lib/internal/Magento/Framework/DB/Helper.php similarity index 100% rename from lib/Magento/Framework/DB/Helper.php rename to lib/internal/Magento/Framework/DB/Helper.php diff --git a/lib/Magento/Framework/DB/Helper/AbstractHelper.php b/lib/internal/Magento/Framework/DB/Helper/AbstractHelper.php similarity index 100% rename from lib/Magento/Framework/DB/Helper/AbstractHelper.php rename to lib/internal/Magento/Framework/DB/Helper/AbstractHelper.php diff --git a/lib/Magento/Framework/DB/Profiler.php b/lib/internal/Magento/Framework/DB/Profiler.php similarity index 100% rename from lib/Magento/Framework/DB/Profiler.php rename to lib/internal/Magento/Framework/DB/Profiler.php diff --git a/lib/Magento/Framework/DB/Select.php b/lib/internal/Magento/Framework/DB/Select.php similarity index 100% rename from lib/Magento/Framework/DB/Select.php rename to lib/internal/Magento/Framework/DB/Select.php diff --git a/lib/Magento/Framework/DB/Statement/Parameter.php b/lib/internal/Magento/Framework/DB/Statement/Parameter.php similarity index 100% rename from lib/Magento/Framework/DB/Statement/Parameter.php rename to lib/internal/Magento/Framework/DB/Statement/Parameter.php diff --git a/lib/Magento/Framework/DB/Statement/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php similarity index 100% rename from lib/Magento/Framework/DB/Statement/Pdo/Mysql.php rename to lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php diff --git a/lib/Magento/Framework/DB/Transaction.php b/lib/internal/Magento/Framework/DB/Transaction.php similarity index 100% rename from lib/Magento/Framework/DB/Transaction.php rename to lib/internal/Magento/Framework/DB/Transaction.php diff --git a/lib/Magento/Framework/DB/Tree.php b/lib/internal/Magento/Framework/DB/Tree.php similarity index 100% rename from lib/Magento/Framework/DB/Tree.php rename to lib/internal/Magento/Framework/DB/Tree.php diff --git a/lib/Magento/Framework/DB/Tree/Node.php b/lib/internal/Magento/Framework/DB/Tree/Node.php similarity index 100% rename from lib/Magento/Framework/DB/Tree/Node.php rename to lib/internal/Magento/Framework/DB/Tree/Node.php diff --git a/lib/Magento/Framework/DB/Tree/Node/NodeException.php b/lib/internal/Magento/Framework/DB/Tree/Node/NodeException.php similarity index 100% rename from lib/Magento/Framework/DB/Tree/Node/NodeException.php rename to lib/internal/Magento/Framework/DB/Tree/Node/NodeException.php diff --git a/lib/Magento/Framework/DB/Tree/NodeSet.php b/lib/internal/Magento/Framework/DB/Tree/NodeSet.php similarity index 100% rename from lib/Magento/Framework/DB/Tree/NodeSet.php rename to lib/internal/Magento/Framework/DB/Tree/NodeSet.php diff --git a/lib/Magento/Framework/DB/Tree/NodeSet/NodeSetException.php b/lib/internal/Magento/Framework/DB/Tree/NodeSet/NodeSetException.php similarity index 100% rename from lib/Magento/Framework/DB/Tree/NodeSet/NodeSetException.php rename to lib/internal/Magento/Framework/DB/Tree/NodeSet/NodeSetException.php diff --git a/lib/Magento/Framework/DB/Tree/TreeException.php b/lib/internal/Magento/Framework/DB/Tree/TreeException.php similarity index 100% rename from lib/Magento/Framework/DB/Tree/TreeException.php rename to lib/internal/Magento/Framework/DB/Tree/TreeException.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/ArrayType.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/ArrayType.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/ArrayType.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/ArrayType.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/Boolean.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/Boolean.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/Boolean.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/Boolean.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/Composite.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/Composite.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/Composite.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/Composite.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/Constant.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/Constant.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/Constant.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/Constant.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/NullType.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/NullType.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/NullType.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/NullType.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/Number.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/Number.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/Number.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/Number.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/Object.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/Object.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/Object.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/Object.php diff --git a/lib/Magento/Framework/Data/Argument/Interpreter/String.php b/lib/internal/Magento/Framework/Data/Argument/Interpreter/String.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/Interpreter/String.php rename to lib/internal/Magento/Framework/Data/Argument/Interpreter/String.php diff --git a/lib/Magento/Framework/Data/Argument/InterpreterInterface.php b/lib/internal/Magento/Framework/Data/Argument/InterpreterInterface.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/InterpreterInterface.php rename to lib/internal/Magento/Framework/Data/Argument/InterpreterInterface.php diff --git a/lib/Magento/Framework/Data/Argument/MissingOptionalValueException.php b/lib/internal/Magento/Framework/Data/Argument/MissingOptionalValueException.php similarity index 100% rename from lib/Magento/Framework/Data/Argument/MissingOptionalValueException.php rename to lib/internal/Magento/Framework/Data/Argument/MissingOptionalValueException.php diff --git a/lib/Magento/Framework/Data/Collection.php b/lib/internal/Magento/Framework/Data/Collection.php similarity index 100% rename from lib/Magento/Framework/Data/Collection.php rename to lib/internal/Magento/Framework/Data/Collection.php diff --git a/lib/Magento/Framework/Data/Collection/Db.php b/lib/internal/Magento/Framework/Data/Collection/Db.php similarity index 100% rename from lib/Magento/Framework/Data/Collection/Db.php rename to lib/internal/Magento/Framework/Data/Collection/Db.php diff --git a/lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php b/lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php similarity index 100% rename from lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php rename to lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php diff --git a/lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php b/lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php similarity index 100% rename from lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php rename to lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php diff --git a/lib/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php b/lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php similarity index 100% rename from lib/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php rename to lib/internal/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php diff --git a/lib/Magento/Framework/Data/Collection/EntityFactoryInterface.php b/lib/internal/Magento/Framework/Data/Collection/EntityFactoryInterface.php similarity index 100% rename from lib/Magento/Framework/Data/Collection/EntityFactoryInterface.php rename to lib/internal/Magento/Framework/Data/Collection/EntityFactoryInterface.php diff --git a/lib/Magento/Framework/Data/Collection/Filesystem.php b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php similarity index 100% rename from lib/Magento/Framework/Data/Collection/Filesystem.php rename to lib/internal/Magento/Framework/Data/Collection/Filesystem.php diff --git a/lib/Magento/Framework/Data/DataArray.php b/lib/internal/Magento/Framework/Data/DataArray.php similarity index 100% rename from lib/Magento/Framework/Data/DataArray.php rename to lib/internal/Magento/Framework/Data/DataArray.php diff --git a/lib/Magento/Framework/Data/Form.php b/lib/internal/Magento/Framework/Data/Form.php similarity index 100% rename from lib/Magento/Framework/Data/Form.php rename to lib/internal/Magento/Framework/Data/Form.php diff --git a/lib/Magento/Framework/Data/Form/AbstractForm.php b/lib/internal/Magento/Framework/Data/Form/AbstractForm.php similarity index 100% rename from lib/Magento/Framework/Data/Form/AbstractForm.php rename to lib/internal/Magento/Framework/Data/Form/AbstractForm.php diff --git a/lib/Magento/Framework/Data/Form/Element/AbstractElement.php b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/AbstractElement.php rename to lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php diff --git a/lib/Magento/Framework/Data/Form/Element/Button.php b/lib/internal/Magento/Framework/Data/Form/Element/Button.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Button.php rename to lib/internal/Magento/Framework/Data/Form/Element/Button.php diff --git a/lib/Magento/Framework/Data/Form/Element/Checkbox.php b/lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Checkbox.php rename to lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php diff --git a/lib/Magento/Framework/Data/Form/Element/Checkboxes.php b/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Checkboxes.php rename to lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php diff --git a/lib/Magento/Framework/Data/Form/Element/Collection.php b/lib/internal/Magento/Framework/Data/Form/Element/Collection.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Collection.php rename to lib/internal/Magento/Framework/Data/Form/Element/Collection.php diff --git a/lib/Magento/Framework/Data/Form/Element/CollectionFactory.php b/lib/internal/Magento/Framework/Data/Form/Element/CollectionFactory.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/CollectionFactory.php rename to lib/internal/Magento/Framework/Data/Form/Element/CollectionFactory.php diff --git a/lib/Magento/Framework/Data/Form/Element/Column.php b/lib/internal/Magento/Framework/Data/Form/Element/Column.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Column.php rename to lib/internal/Magento/Framework/Data/Form/Element/Column.php diff --git a/lib/Magento/Framework/Data/Form/Element/Date.php b/lib/internal/Magento/Framework/Data/Form/Element/Date.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Date.php rename to lib/internal/Magento/Framework/Data/Form/Element/Date.php diff --git a/lib/Magento/Framework/Data/Form/Element/Editablemultiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Editablemultiselect.php rename to lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php diff --git a/lib/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Editor.php rename to lib/internal/Magento/Framework/Data/Form/Element/Editor.php diff --git a/lib/Magento/Framework/Data/Form/Element/Factory.php b/lib/internal/Magento/Framework/Data/Form/Element/Factory.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Factory.php rename to lib/internal/Magento/Framework/Data/Form/Element/Factory.php diff --git a/lib/Magento/Framework/Data/Form/Element/Fieldset.php b/lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Fieldset.php rename to lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php diff --git a/lib/Magento/Framework/Data/Form/Element/File.php b/lib/internal/Magento/Framework/Data/Form/Element/File.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/File.php rename to lib/internal/Magento/Framework/Data/Form/Element/File.php diff --git a/lib/Magento/Framework/Data/Form/Element/Gallery.php b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Gallery.php rename to lib/internal/Magento/Framework/Data/Form/Element/Gallery.php diff --git a/lib/Magento/Framework/Data/Form/Element/Hidden.php b/lib/internal/Magento/Framework/Data/Form/Element/Hidden.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Hidden.php rename to lib/internal/Magento/Framework/Data/Form/Element/Hidden.php diff --git a/lib/Magento/Framework/Data/Form/Element/Image.php b/lib/internal/Magento/Framework/Data/Form/Element/Image.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Image.php rename to lib/internal/Magento/Framework/Data/Form/Element/Image.php diff --git a/lib/Magento/Framework/Data/Form/Element/Imagefile.php b/lib/internal/Magento/Framework/Data/Form/Element/Imagefile.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Imagefile.php rename to lib/internal/Magento/Framework/Data/Form/Element/Imagefile.php diff --git a/lib/Magento/Framework/Data/Form/Element/Label.php b/lib/internal/Magento/Framework/Data/Form/Element/Label.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Label.php rename to lib/internal/Magento/Framework/Data/Form/Element/Label.php diff --git a/lib/Magento/Framework/Data/Form/Element/Link.php b/lib/internal/Magento/Framework/Data/Form/Element/Link.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Link.php rename to lib/internal/Magento/Framework/Data/Form/Element/Link.php diff --git a/lib/Magento/Framework/Data/Form/Element/Multiline.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiline.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Multiline.php rename to lib/internal/Magento/Framework/Data/Form/Element/Multiline.php diff --git a/lib/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Multiselect.php rename to lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php diff --git a/lib/Magento/Framework/Data/Form/Element/Note.php b/lib/internal/Magento/Framework/Data/Form/Element/Note.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Note.php rename to lib/internal/Magento/Framework/Data/Form/Element/Note.php diff --git a/lib/Magento/Framework/Data/Form/Element/Obscure.php b/lib/internal/Magento/Framework/Data/Form/Element/Obscure.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Obscure.php rename to lib/internal/Magento/Framework/Data/Form/Element/Obscure.php diff --git a/lib/Magento/Framework/Data/Form/Element/Password.php b/lib/internal/Magento/Framework/Data/Form/Element/Password.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Password.php rename to lib/internal/Magento/Framework/Data/Form/Element/Password.php diff --git a/lib/Magento/Framework/Data/Form/Element/Radio.php b/lib/internal/Magento/Framework/Data/Form/Element/Radio.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Radio.php rename to lib/internal/Magento/Framework/Data/Form/Element/Radio.php diff --git a/lib/Magento/Framework/Data/Form/Element/Radios.php b/lib/internal/Magento/Framework/Data/Form/Element/Radios.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Radios.php rename to lib/internal/Magento/Framework/Data/Form/Element/Radios.php diff --git a/lib/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php b/lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php rename to lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php diff --git a/lib/Magento/Framework/Data/Form/Element/Reset.php b/lib/internal/Magento/Framework/Data/Form/Element/Reset.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Reset.php rename to lib/internal/Magento/Framework/Data/Form/Element/Reset.php diff --git a/lib/Magento/Framework/Data/Form/Element/Select.php b/lib/internal/Magento/Framework/Data/Form/Element/Select.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Select.php rename to lib/internal/Magento/Framework/Data/Form/Element/Select.php diff --git a/lib/Magento/Framework/Data/Form/Element/Submit.php b/lib/internal/Magento/Framework/Data/Form/Element/Submit.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Submit.php rename to lib/internal/Magento/Framework/Data/Form/Element/Submit.php diff --git a/lib/Magento/Framework/Data/Form/Element/Text.php b/lib/internal/Magento/Framework/Data/Form/Element/Text.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Text.php rename to lib/internal/Magento/Framework/Data/Form/Element/Text.php diff --git a/lib/Magento/Framework/Data/Form/Element/Textarea.php b/lib/internal/Magento/Framework/Data/Form/Element/Textarea.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Textarea.php rename to lib/internal/Magento/Framework/Data/Form/Element/Textarea.php diff --git a/lib/Magento/Framework/Data/Form/Element/Time.php b/lib/internal/Magento/Framework/Data/Form/Element/Time.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Element/Time.php rename to lib/internal/Magento/Framework/Data/Form/Element/Time.php diff --git a/lib/Magento/Framework/Data/Form/ElementFactory.php b/lib/internal/Magento/Framework/Data/Form/ElementFactory.php similarity index 100% rename from lib/Magento/Framework/Data/Form/ElementFactory.php rename to lib/internal/Magento/Framework/Data/Form/ElementFactory.php diff --git a/lib/Magento/Framework/Data/Form/Filter/Date.php b/lib/internal/Magento/Framework/Data/Form/Filter/Date.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Filter/Date.php rename to lib/internal/Magento/Framework/Data/Form/Filter/Date.php diff --git a/lib/Magento/Framework/Data/Form/Filter/Escapehtml.php b/lib/internal/Magento/Framework/Data/Form/Filter/Escapehtml.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Filter/Escapehtml.php rename to lib/internal/Magento/Framework/Data/Form/Filter/Escapehtml.php diff --git a/lib/Magento/Framework/Data/Form/Filter/FilterInterface.php b/lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Filter/FilterInterface.php rename to lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php diff --git a/lib/Magento/Framework/Data/Form/Filter/Striptags.php b/lib/internal/Magento/Framework/Data/Form/Filter/Striptags.php similarity index 100% rename from lib/Magento/Framework/Data/Form/Filter/Striptags.php rename to lib/internal/Magento/Framework/Data/Form/Filter/Striptags.php diff --git a/lib/Magento/Framework/Data/Form/FormKey.php b/lib/internal/Magento/Framework/Data/Form/FormKey.php similarity index 100% rename from lib/Magento/Framework/Data/Form/FormKey.php rename to lib/internal/Magento/Framework/Data/Form/FormKey.php diff --git a/lib/Magento/Framework/Data/FormFactory.php b/lib/internal/Magento/Framework/Data/FormFactory.php similarity index 100% rename from lib/Magento/Framework/Data/FormFactory.php rename to lib/internal/Magento/Framework/Data/FormFactory.php diff --git a/lib/Magento/Framework/Data/Graph.php b/lib/internal/Magento/Framework/Data/Graph.php similarity index 100% rename from lib/Magento/Framework/Data/Graph.php rename to lib/internal/Magento/Framework/Data/Graph.php diff --git a/lib/Magento/Framework/Data/OptionSourceInterface.php b/lib/internal/Magento/Framework/Data/OptionSourceInterface.php similarity index 100% rename from lib/Magento/Framework/Data/OptionSourceInterface.php rename to lib/internal/Magento/Framework/Data/OptionSourceInterface.php diff --git a/lib/Magento/Framework/Data/Schema.php b/lib/internal/Magento/Framework/Data/Schema.php similarity index 100% rename from lib/Magento/Framework/Data/Schema.php rename to lib/internal/Magento/Framework/Data/Schema.php diff --git a/lib/Magento/Framework/Data/Structure.php b/lib/internal/Magento/Framework/Data/Structure.php similarity index 100% rename from lib/Magento/Framework/Data/Structure.php rename to lib/internal/Magento/Framework/Data/Structure.php diff --git a/lib/Magento/Framework/Data/Tree.php b/lib/internal/Magento/Framework/Data/Tree.php similarity index 100% rename from lib/Magento/Framework/Data/Tree.php rename to lib/internal/Magento/Framework/Data/Tree.php diff --git a/lib/Magento/Framework/Data/Tree/Db.php b/lib/internal/Magento/Framework/Data/Tree/Db.php similarity index 100% rename from lib/Magento/Framework/Data/Tree/Db.php rename to lib/internal/Magento/Framework/Data/Tree/Db.php diff --git a/lib/Magento/Framework/Data/Tree/Dbp.php b/lib/internal/Magento/Framework/Data/Tree/Dbp.php similarity index 100% rename from lib/Magento/Framework/Data/Tree/Dbp.php rename to lib/internal/Magento/Framework/Data/Tree/Dbp.php diff --git a/lib/Magento/Framework/Data/Tree/Node.php b/lib/internal/Magento/Framework/Data/Tree/Node.php similarity index 100% rename from lib/Magento/Framework/Data/Tree/Node.php rename to lib/internal/Magento/Framework/Data/Tree/Node.php diff --git a/lib/Magento/Framework/Data/Tree/Node/Collection.php b/lib/internal/Magento/Framework/Data/Tree/Node/Collection.php similarity index 100% rename from lib/Magento/Framework/Data/Tree/Node/Collection.php rename to lib/internal/Magento/Framework/Data/Tree/Node/Collection.php diff --git a/lib/Magento/Framework/Data/etc/argument/types.xsd b/lib/internal/Magento/Framework/Data/etc/argument/types.xsd similarity index 100% rename from lib/Magento/Framework/Data/etc/argument/types.xsd rename to lib/internal/Magento/Framework/Data/etc/argument/types.xsd diff --git a/lib/Magento/Framework/Debug.php b/lib/internal/Magento/Framework/Debug.php similarity index 100% rename from lib/Magento/Framework/Debug.php rename to lib/internal/Magento/Framework/Debug.php diff --git a/lib/Magento/Framework/DomDocument/Factory.php b/lib/internal/Magento/Framework/DomDocument/Factory.php similarity index 100% rename from lib/Magento/Framework/DomDocument/Factory.php rename to lib/internal/Magento/Framework/DomDocument/Factory.php diff --git a/lib/Magento/Framework/Encryption/Crypt.php b/lib/internal/Magento/Framework/Encryption/Crypt.php similarity index 100% rename from lib/Magento/Framework/Encryption/Crypt.php rename to lib/internal/Magento/Framework/Encryption/Crypt.php diff --git a/lib/Magento/Framework/Encryption/CryptFactory.php b/lib/internal/Magento/Framework/Encryption/CryptFactory.php similarity index 100% rename from lib/Magento/Framework/Encryption/CryptFactory.php rename to lib/internal/Magento/Framework/Encryption/CryptFactory.php diff --git a/lib/Magento/Framework/Encryption/Encryptor.php b/lib/internal/Magento/Framework/Encryption/Encryptor.php similarity index 100% rename from lib/Magento/Framework/Encryption/Encryptor.php rename to lib/internal/Magento/Framework/Encryption/Encryptor.php diff --git a/lib/Magento/Framework/Encryption/EncryptorInterface.php b/lib/internal/Magento/Framework/Encryption/EncryptorInterface.php similarity index 100% rename from lib/Magento/Framework/Encryption/EncryptorInterface.php rename to lib/internal/Magento/Framework/Encryption/EncryptorInterface.php diff --git a/lib/Magento/Framework/Encryption/UrlCoder.php b/lib/internal/Magento/Framework/Encryption/UrlCoder.php similarity index 100% rename from lib/Magento/Framework/Encryption/UrlCoder.php rename to lib/internal/Magento/Framework/Encryption/UrlCoder.php diff --git a/lib/Magento/Framework/Error/Handler.php b/lib/internal/Magento/Framework/Error/Handler.php similarity index 100% rename from lib/Magento/Framework/Error/Handler.php rename to lib/internal/Magento/Framework/Error/Handler.php diff --git a/lib/Magento/Framework/Error/HandlerInterface.php b/lib/internal/Magento/Framework/Error/HandlerInterface.php similarity index 100% rename from lib/Magento/Framework/Error/HandlerInterface.php rename to lib/internal/Magento/Framework/Error/HandlerInterface.php diff --git a/lib/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php similarity index 100% rename from lib/Magento/Framework/Escaper.php rename to lib/internal/Magento/Framework/Escaper.php diff --git a/lib/Magento/Framework/Event.php b/lib/internal/Magento/Framework/Event.php similarity index 100% rename from lib/Magento/Framework/Event.php rename to lib/internal/Magento/Framework/Event.php diff --git a/lib/Magento/Framework/Event/Collection.php b/lib/internal/Magento/Framework/Event/Collection.php similarity index 84% rename from lib/Magento/Framework/Event/Collection.php rename to lib/internal/Magento/Framework/Event/Collection.php index 3ed5b1eae98297c343c7b2c9b0c1e98f938674e4..e88b9f7936701d3495b74dfb0f2d86b7e3fc79aa 100644 --- a/lib/Magento/Framework/Event/Collection.php +++ b/lib/internal/Magento/Framework/Event/Collection.php @@ -39,7 +39,7 @@ class Collection * * @var array */ - protected $_events; + protected $events; /** * Global observers @@ -48,15 +48,18 @@ class Collection * * @var Observer\Collection */ - protected $_observers; + protected $globalObservers; /** * Initializes global observers collection + * + * @param array $events + * @param Observer\Collection $observerCollection */ - public function __construct() + public function __construct(array $events = [], Observer\Collection $observerCollection = null) { - $this->_events = array(); - $this->_globalObservers = new Observer\Collection(); + $this->events = $events; + $this->globalObservers = !$observerCollection ? new Observer\Collection() : $observerCollection; } /** @@ -66,7 +69,7 @@ class Collection */ public function getAllEvents() { - return $this->_events; + return $this->events; } /** @@ -76,7 +79,7 @@ class Collection */ public function getGlobalObservers() { - return $this->_globalObservers; + return $this->globalObservers; } /** @@ -89,10 +92,10 @@ class Collection */ public function getEventByName($eventName) { - if (!isset($this->_events[$eventName])) { + if (!isset($this->events[$eventName])) { $this->addEvent(new Event(array('name' => $eventName))); } - return $this->_events[$eventName]; + return $this->events[$eventName]; } /** @@ -103,7 +106,7 @@ class Collection */ public function addEvent(Event $event) { - $this->_events[$event->getName()] = $event; + $this->events[$event->getName()] = $event; return $this; } diff --git a/lib/Magento/Framework/Event/Config.php b/lib/internal/Magento/Framework/Event/Config.php similarity index 100% rename from lib/Magento/Framework/Event/Config.php rename to lib/internal/Magento/Framework/Event/Config.php diff --git a/lib/Magento/Framework/Event/Config/Converter.php b/lib/internal/Magento/Framework/Event/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/Event/Config/Converter.php rename to lib/internal/Magento/Framework/Event/Config/Converter.php diff --git a/lib/Magento/Framework/Event/Config/Data.php b/lib/internal/Magento/Framework/Event/Config/Data.php similarity index 100% rename from lib/Magento/Framework/Event/Config/Data.php rename to lib/internal/Magento/Framework/Event/Config/Data.php diff --git a/lib/Magento/Framework/Event/Config/Reader.php b/lib/internal/Magento/Framework/Event/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/Event/Config/Reader.php rename to lib/internal/Magento/Framework/Event/Config/Reader.php diff --git a/lib/Magento/Framework/Event/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Event/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/Event/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/Event/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/Event/ConfigInterface.php b/lib/internal/Magento/Framework/Event/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Event/ConfigInterface.php rename to lib/internal/Magento/Framework/Event/ConfigInterface.php diff --git a/lib/Magento/Framework/Event/Invoker/InvokerDefault.php b/lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php similarity index 100% rename from lib/Magento/Framework/Event/Invoker/InvokerDefault.php rename to lib/internal/Magento/Framework/Event/Invoker/InvokerDefault.php diff --git a/lib/Magento/Framework/Event/InvokerInterface.php b/lib/internal/Magento/Framework/Event/InvokerInterface.php similarity index 100% rename from lib/Magento/Framework/Event/InvokerInterface.php rename to lib/internal/Magento/Framework/Event/InvokerInterface.php diff --git a/lib/Magento/Framework/Event/Manager.php b/lib/internal/Magento/Framework/Event/Manager.php similarity index 100% rename from lib/Magento/Framework/Event/Manager.php rename to lib/internal/Magento/Framework/Event/Manager.php diff --git a/lib/Magento/Framework/Event/ManagerInterface.php b/lib/internal/Magento/Framework/Event/ManagerInterface.php similarity index 100% rename from lib/Magento/Framework/Event/ManagerInterface.php rename to lib/internal/Magento/Framework/Event/ManagerInterface.php diff --git a/lib/Magento/Framework/Event/Observer.php b/lib/internal/Magento/Framework/Event/Observer.php similarity index 92% rename from lib/Magento/Framework/Event/Observer.php rename to lib/internal/Magento/Framework/Event/Observer.php index 05d095c26842eb680be67a2f026e240d0f8712e5..b37c3a9dd300972730119d678eb4b63c2c83f296 100644 --- a/lib/Magento/Framework/Event/Observer.php +++ b/lib/internal/Magento/Framework/Event/Observer.php @@ -53,11 +53,14 @@ class Observer extends \Magento\Framework\Object $callback = $this->getCallback(); $this->setEvent($event); - $_profilerKey = 'OBSERVER: ' . (is_object( - $callback[0] - ) ? get_class( - $callback[0] - ) : (string)$callback[0]) . ' -> ' . $callback[1]; + $_profilerKey = 'OBSERVER: '; + if (is_object($callback[0])) { + $_profilerKey .= get_class($callback[0]); + } else { + $_profilerKey .= (string)$callback[0]; + } + $_profilerKey .= ' -> ' . $callback[1]; + \Magento\Framework\Profiler::start($_profilerKey); call_user_func($callback, $this); \Magento\Framework\Profiler::stop($_profilerKey); diff --git a/lib/Magento/Framework/Event/Observer/Collection.php b/lib/internal/Magento/Framework/Event/Observer/Collection.php similarity index 100% rename from lib/Magento/Framework/Event/Observer/Collection.php rename to lib/internal/Magento/Framework/Event/Observer/Collection.php diff --git a/lib/Magento/Framework/Event/Observer/Cron.php b/lib/internal/Magento/Framework/Event/Observer/Cron.php similarity index 100% rename from lib/Magento/Framework/Event/Observer/Cron.php rename to lib/internal/Magento/Framework/Event/Observer/Cron.php diff --git a/lib/Magento/Framework/Event/Observer/Regex.php b/lib/internal/Magento/Framework/Event/Observer/Regex.php similarity index 100% rename from lib/Magento/Framework/Event/Observer/Regex.php rename to lib/internal/Magento/Framework/Event/Observer/Regex.php diff --git a/lib/Magento/Framework/Event/ObserverFactory.php b/lib/internal/Magento/Framework/Event/ObserverFactory.php similarity index 100% rename from lib/Magento/Framework/Event/ObserverFactory.php rename to lib/internal/Magento/Framework/Event/ObserverFactory.php diff --git a/lib/Magento/Framework/Event/WrapperFactory.php b/lib/internal/Magento/Framework/Event/WrapperFactory.php similarity index 100% rename from lib/Magento/Framework/Event/WrapperFactory.php rename to lib/internal/Magento/Framework/Event/WrapperFactory.php diff --git a/lib/Magento/Framework/Event/etc/events.xsd b/lib/internal/Magento/Framework/Event/etc/events.xsd similarity index 100% rename from lib/Magento/Framework/Event/etc/events.xsd rename to lib/internal/Magento/Framework/Event/etc/events.xsd diff --git a/lib/Magento/Framework/EventFactory.php b/lib/internal/Magento/Framework/EventFactory.php similarity index 100% rename from lib/Magento/Framework/EventFactory.php rename to lib/internal/Magento/Framework/EventFactory.php diff --git a/lib/Magento/Framework/Exception.php b/lib/internal/Magento/Framework/Exception.php similarity index 100% rename from lib/Magento/Framework/Exception.php rename to lib/internal/Magento/Framework/Exception.php diff --git a/lib/Magento/Framework/Exception/AbstractAggregateException.php b/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php similarity index 100% rename from lib/Magento/Framework/Exception/AbstractAggregateException.php rename to lib/internal/Magento/Framework/Exception/AbstractAggregateException.php diff --git a/lib/Magento/Framework/Exception/AuthenticationException.php b/lib/internal/Magento/Framework/Exception/AuthenticationException.php similarity index 100% rename from lib/Magento/Framework/Exception/AuthenticationException.php rename to lib/internal/Magento/Framework/Exception/AuthenticationException.php diff --git a/lib/Magento/Framework/Exception/AuthorizationException.php b/lib/internal/Magento/Framework/Exception/AuthorizationException.php similarity index 100% rename from lib/Magento/Framework/Exception/AuthorizationException.php rename to lib/internal/Magento/Framework/Exception/AuthorizationException.php diff --git a/lib/Magento/Framework/Exception/EmailNotConfirmedException.php b/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php similarity index 100% rename from lib/Magento/Framework/Exception/EmailNotConfirmedException.php rename to lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php diff --git a/lib/Magento/Framework/Exception/ErrorMessage.php b/lib/internal/Magento/Framework/Exception/ErrorMessage.php similarity index 100% rename from lib/Magento/Framework/Exception/ErrorMessage.php rename to lib/internal/Magento/Framework/Exception/ErrorMessage.php diff --git a/lib/Magento/Framework/Exception/Exception.php b/lib/internal/Magento/Framework/Exception/Exception.php similarity index 100% rename from lib/Magento/Framework/Exception/Exception.php rename to lib/internal/Magento/Framework/Exception/Exception.php diff --git a/lib/Magento/Framework/Exception/InputException.php b/lib/internal/Magento/Framework/Exception/InputException.php similarity index 100% rename from lib/Magento/Framework/Exception/InputException.php rename to lib/internal/Magento/Framework/Exception/InputException.php diff --git a/lib/Magento/Framework/Exception/InvalidEmailOrPasswordException.php b/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php similarity index 100% rename from lib/Magento/Framework/Exception/InvalidEmailOrPasswordException.php rename to lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php diff --git a/lib/Magento/Framework/Exception/LocalizedException.php b/lib/internal/Magento/Framework/Exception/LocalizedException.php similarity index 100% rename from lib/Magento/Framework/Exception/LocalizedException.php rename to lib/internal/Magento/Framework/Exception/LocalizedException.php diff --git a/lib/Magento/Framework/Exception/NoSuchEntityException.php b/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php similarity index 100% rename from lib/Magento/Framework/Exception/NoSuchEntityException.php rename to lib/internal/Magento/Framework/Exception/NoSuchEntityException.php diff --git a/lib/Magento/Framework/Exception/State/ExpiredException.php b/lib/internal/Magento/Framework/Exception/State/ExpiredException.php similarity index 100% rename from lib/Magento/Framework/Exception/State/ExpiredException.php rename to lib/internal/Magento/Framework/Exception/State/ExpiredException.php diff --git a/lib/Magento/Framework/Exception/State/InputMismatchException.php b/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php similarity index 100% rename from lib/Magento/Framework/Exception/State/InputMismatchException.php rename to lib/internal/Magento/Framework/Exception/State/InputMismatchException.php diff --git a/lib/Magento/Framework/Exception/State/InvalidTransitionException.php b/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php similarity index 100% rename from lib/Magento/Framework/Exception/State/InvalidTransitionException.php rename to lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php diff --git a/lib/Magento/Framework/Exception/StateException.php b/lib/internal/Magento/Framework/Exception/StateException.php similarity index 100% rename from lib/Magento/Framework/Exception/StateException.php rename to lib/internal/Magento/Framework/Exception/StateException.php diff --git a/lib/Magento/Framework/File/Csv.php b/lib/internal/Magento/Framework/File/Csv.php similarity index 100% rename from lib/Magento/Framework/File/Csv.php rename to lib/internal/Magento/Framework/File/Csv.php diff --git a/lib/Magento/Framework/File/CsvMulty.php b/lib/internal/Magento/Framework/File/CsvMulty.php similarity index 100% rename from lib/Magento/Framework/File/CsvMulty.php rename to lib/internal/Magento/Framework/File/CsvMulty.php diff --git a/lib/internal/Magento/Framework/File/Mime.php b/lib/internal/Magento/Framework/File/Mime.php new file mode 100644 index 0000000000000000000000000000000000000000..a628194117e01a067fcf33354e24a72a47f681bd --- /dev/null +++ b/lib/internal/Magento/Framework/File/Mime.php @@ -0,0 +1,107 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\File; + +class Mime +{ + /** + * Mime types + * + * @var array + */ + protected $mimeTypes = array( + 'txt' => 'text/plain', + 'htm' => 'text/html', + 'html' => 'text/html', + 'php' => 'text/html', + 'css' => 'text/css', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'xml' => 'application/xml', + 'swf' => 'application/x-shockwave-flash', + 'flv' => 'video/x-flv', + + // images + 'png' => 'image/png', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'gif' => 'image/gif', + 'bmp' => 'image/bmp', + 'ico' => 'image/vnd.microsoft.icon', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + + // archives + 'zip' => 'application/zip', + 'rar' => 'application/x-rar-compressed', + 'exe' => 'application/x-msdownload', + 'msi' => 'application/x-msdownload', + 'cab' => 'application/vnd.ms-cab-compressed', + + // audio/video + 'mp3' => 'audio/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + + // adobe + 'pdf' => 'application/pdf', + 'psd' => 'image/vnd.adobe.photoshop', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript' + ); + + /** + * Get mime type of a file + * + * @param string $file + * @return string + * @throws \InvalidArgumentException + */ + public function getMimeType($file) + { + if (!file_exists($file)) { + throw new \InvalidArgumentException("File '$file' doesn't exist"); + } + + $extension = pathinfo($file, PATHINFO_EXTENSION); + if (isset($this->mimeTypes[$extension])) { + $result = $this->mimeTypes[$extension]; + } + + if (empty($result) && (function_exists('mime_content_type') && ini_get('mime_magic.magicfile'))) { + $result = mime_content_type($file); + } + + if (empty($result)) { + $result = 'application/octet-stream'; + } + + return $result; + } +} diff --git a/lib/Magento/Framework/File/Size.php b/lib/internal/Magento/Framework/File/Size.php similarity index 100% rename from lib/Magento/Framework/File/Size.php rename to lib/internal/Magento/Framework/File/Size.php diff --git a/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php b/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php new file mode 100644 index 0000000000000000000000000000000000000000..ef55933d997bea3645c5386b30d7510fc100d263 --- /dev/null +++ b/lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\File\Transfer\Adapter; + +class Http +{ + /** + * @var \Zend_Controller_Response_Http + */ + private $response; + + /** + * @var \Magento\Framework\File\Mime + */ + private $mime; + + /** + * @param \Magento\Framework\Controller\Response\Http $response + * @param \Magento\Framework\File\Mime $mime + */ + public function __construct(\Magento\Framework\Controller\Response\Http $response, \Magento\Framework\File\Mime $mime) + { + $this->response = $response; + $this->mime = $mime; + } + + /** + * Send the file to the client (Download) + * + * @param string|array $options Options for the file(s) to send + * @throws \UnexpectedValueException + * @throws \InvalidArgumentException + * @return void + */ + public function send($options = null) + { + if (is_string($options)) { + $filepath = $options; + } else if (is_array($options) && isset($options['filepath'])) { + $filepath = $options['filepath']; + } else { + throw new \InvalidArgumentException("Filename is not set."); + } + + if (!is_file($filepath) || !is_readable($filepath)) { + throw new \InvalidArgumentException("File '{$filepath}' does not exists."); + } + + $mimeType = $this->mime->getMimeType($filepath); + + $this->response->setHeader('Content-length', filesize($filepath)); + $this->response->setHeader('Content-Type', $mimeType); + + $this->response->sendHeaders(); + + $handle = fopen($filepath, 'r'); + if ($handle) { + while (($buffer = fgets($handle, 4096)) !== false) { + echo $buffer; + } + if (!feof($handle)) { + throw new \UnexpectedValueException("Unexpected end of file"); + } + fclose($handle); + } + } +} diff --git a/lib/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php similarity index 100% rename from lib/Magento/Framework/File/Uploader.php rename to lib/internal/Magento/Framework/File/Uploader.php diff --git a/lib/Magento/Framework/File/UploaderFactory.php b/lib/internal/Magento/Framework/File/UploaderFactory.php similarity index 100% rename from lib/Magento/Framework/File/UploaderFactory.php rename to lib/internal/Magento/Framework/File/UploaderFactory.php diff --git a/lib/Magento/Framework/Filesystem.php b/lib/internal/Magento/Framework/Filesystem.php similarity index 100% rename from lib/Magento/Framework/Filesystem.php rename to lib/internal/Magento/Framework/Filesystem.php diff --git a/lib/Magento/Framework/Filesystem/Directory/Read.php b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Directory/Read.php rename to lib/internal/Magento/Framework/Filesystem/Directory/Read.php diff --git a/lib/Magento/Framework/Filesystem/Directory/ReadFactory.php b/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Directory/ReadFactory.php rename to lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php diff --git a/lib/Magento/Framework/Filesystem/Directory/ReadInterface.php b/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Directory/ReadInterface.php rename to lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php diff --git a/lib/Magento/Framework/Filesystem/Directory/Write.php b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Directory/Write.php rename to lib/internal/Magento/Framework/Filesystem/Directory/Write.php diff --git a/lib/Magento/Framework/Filesystem/Directory/WriteFactory.php b/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php similarity index 96% rename from lib/Magento/Framework/Filesystem/Directory/WriteFactory.php rename to lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php index 17ef4f31a7419f265f74e75ab6c9a8e85a005430..24451d6167aeebfc6f86f3275c843bba1a919b8e 100644 --- a/lib/Magento/Framework/Filesystem/Directory/WriteFactory.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php @@ -30,7 +30,7 @@ class WriteFactory * * @param array $config * @param \Magento\Framework\Filesystem\DriverFactory $driverFactory - * @return \Magento\Framework\Filesystem\File\WriteInterface + * @return \Magento\Framework\Filesystem\Directory\Write */ public function create(array $config, \Magento\Framework\Filesystem\DriverFactory $driverFactory) { diff --git a/lib/Magento/Framework/Filesystem/Directory/WriteInterface.php b/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Directory/WriteInterface.php rename to lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php diff --git a/lib/Magento/Framework/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/Filesystem/DirectoryList.php similarity index 100% rename from lib/Magento/Framework/Filesystem/DirectoryList.php rename to lib/internal/Magento/Framework/Filesystem/DirectoryList.php diff --git a/lib/Magento/Framework/Filesystem/Driver/File.php b/lib/internal/Magento/Framework/Filesystem/Driver/File.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Driver/File.php rename to lib/internal/Magento/Framework/Filesystem/Driver/File.php diff --git a/lib/Magento/Framework/Filesystem/Driver/Http.php b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Driver/Http.php rename to lib/internal/Magento/Framework/Filesystem/Driver/Http.php diff --git a/lib/Magento/Framework/Filesystem/Driver/Https.php b/lib/internal/Magento/Framework/Filesystem/Driver/Https.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Driver/Https.php rename to lib/internal/Magento/Framework/Filesystem/Driver/Https.php diff --git a/lib/Magento/Framework/Filesystem/Driver/Zlib.php b/lib/internal/Magento/Framework/Filesystem/Driver/Zlib.php similarity index 100% rename from lib/Magento/Framework/Filesystem/Driver/Zlib.php rename to lib/internal/Magento/Framework/Filesystem/Driver/Zlib.php diff --git a/lib/Magento/Framework/Filesystem/DriverFactory.php b/lib/internal/Magento/Framework/Filesystem/DriverFactory.php similarity index 100% rename from lib/Magento/Framework/Filesystem/DriverFactory.php rename to lib/internal/Magento/Framework/Filesystem/DriverFactory.php diff --git a/lib/Magento/Framework/Filesystem/DriverInterface.php b/lib/internal/Magento/Framework/Filesystem/DriverInterface.php similarity index 100% rename from lib/Magento/Framework/Filesystem/DriverInterface.php rename to lib/internal/Magento/Framework/Filesystem/DriverInterface.php diff --git a/lib/Magento/Framework/Filesystem/File/Read.php b/lib/internal/Magento/Framework/Filesystem/File/Read.php similarity index 100% rename from lib/Magento/Framework/Filesystem/File/Read.php rename to lib/internal/Magento/Framework/Filesystem/File/Read.php diff --git a/lib/Magento/Framework/Filesystem/File/ReadFactory.php b/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php similarity index 100% rename from lib/Magento/Framework/Filesystem/File/ReadFactory.php rename to lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php diff --git a/lib/Magento/Framework/Filesystem/File/ReadInterface.php b/lib/internal/Magento/Framework/Filesystem/File/ReadInterface.php similarity index 100% rename from lib/Magento/Framework/Filesystem/File/ReadInterface.php rename to lib/internal/Magento/Framework/Filesystem/File/ReadInterface.php diff --git a/lib/Magento/Framework/Filesystem/File/Write.php b/lib/internal/Magento/Framework/Filesystem/File/Write.php similarity index 100% rename from lib/Magento/Framework/Filesystem/File/Write.php rename to lib/internal/Magento/Framework/Filesystem/File/Write.php diff --git a/lib/Magento/Framework/Filesystem/File/WriteFactory.php b/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php similarity index 100% rename from lib/Magento/Framework/Filesystem/File/WriteFactory.php rename to lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php diff --git a/lib/Magento/Framework/Filesystem/File/WriteInterface.php b/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php similarity index 100% rename from lib/Magento/Framework/Filesystem/File/WriteInterface.php rename to lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php diff --git a/lib/Magento/Framework/Filesystem/FilesystemException.php b/lib/internal/Magento/Framework/Filesystem/FilesystemException.php similarity index 100% rename from lib/Magento/Framework/Filesystem/FilesystemException.php rename to lib/internal/Magento/Framework/Filesystem/FilesystemException.php diff --git a/lib/Magento/Framework/Filesystem/WrapperFactory.php b/lib/internal/Magento/Framework/Filesystem/WrapperFactory.php similarity index 100% rename from lib/Magento/Framework/Filesystem/WrapperFactory.php rename to lib/internal/Magento/Framework/Filesystem/WrapperFactory.php diff --git a/lib/Magento/Framework/Filesystem/WrapperInterface.php b/lib/internal/Magento/Framework/Filesystem/WrapperInterface.php similarity index 100% rename from lib/Magento/Framework/Filesystem/WrapperInterface.php rename to lib/internal/Magento/Framework/Filesystem/WrapperInterface.php diff --git a/lib/Magento/Framework/Filter/AbstractFactory.php b/lib/internal/Magento/Framework/Filter/AbstractFactory.php similarity index 100% rename from lib/Magento/Framework/Filter/AbstractFactory.php rename to lib/internal/Magento/Framework/Filter/AbstractFactory.php diff --git a/lib/Magento/Framework/Filter/ArrayFilter.php b/lib/internal/Magento/Framework/Filter/ArrayFilter.php similarity index 100% rename from lib/Magento/Framework/Filter/ArrayFilter.php rename to lib/internal/Magento/Framework/Filter/ArrayFilter.php diff --git a/lib/Magento/Framework/Filter/Decrypt.php b/lib/internal/Magento/Framework/Filter/Decrypt.php similarity index 100% rename from lib/Magento/Framework/Filter/Decrypt.php rename to lib/internal/Magento/Framework/Filter/Decrypt.php diff --git a/lib/Magento/Framework/Filter/Email.php b/lib/internal/Magento/Framework/Filter/Email.php similarity index 100% rename from lib/Magento/Framework/Filter/Email.php rename to lib/internal/Magento/Framework/Filter/Email.php diff --git a/lib/Magento/Framework/Filter/Encrypt.php b/lib/internal/Magento/Framework/Filter/Encrypt.php similarity index 100% rename from lib/Magento/Framework/Filter/Encrypt.php rename to lib/internal/Magento/Framework/Filter/Encrypt.php diff --git a/lib/Magento/Framework/Filter/Encrypt/AdapterInterface.php b/lib/internal/Magento/Framework/Filter/Encrypt/AdapterInterface.php similarity index 100% rename from lib/Magento/Framework/Filter/Encrypt/AdapterInterface.php rename to lib/internal/Magento/Framework/Filter/Encrypt/AdapterInterface.php diff --git a/lib/Magento/Framework/Filter/Encrypt/Basic.php b/lib/internal/Magento/Framework/Filter/Encrypt/Basic.php similarity index 100% rename from lib/Magento/Framework/Filter/Encrypt/Basic.php rename to lib/internal/Magento/Framework/Filter/Encrypt/Basic.php diff --git a/lib/Magento/Framework/Filter/Factory.php b/lib/internal/Magento/Framework/Filter/Factory.php similarity index 100% rename from lib/Magento/Framework/Filter/Factory.php rename to lib/internal/Magento/Framework/Filter/Factory.php diff --git a/lib/Magento/Framework/Filter/FactoryInterface.php b/lib/internal/Magento/Framework/Filter/FactoryInterface.php similarity index 100% rename from lib/Magento/Framework/Filter/FactoryInterface.php rename to lib/internal/Magento/Framework/Filter/FactoryInterface.php diff --git a/lib/Magento/Framework/Filter/FilterManager.php b/lib/internal/Magento/Framework/Filter/FilterManager.php similarity index 100% rename from lib/Magento/Framework/Filter/FilterManager.php rename to lib/internal/Magento/Framework/Filter/FilterManager.php diff --git a/lib/Magento/Framework/Filter/FilterManager/Config.php b/lib/internal/Magento/Framework/Filter/FilterManager/Config.php similarity index 100% rename from lib/Magento/Framework/Filter/FilterManager/Config.php rename to lib/internal/Magento/Framework/Filter/FilterManager/Config.php diff --git a/lib/Magento/Framework/Filter/FilterManager/ConfigInterface.php b/lib/internal/Magento/Framework/Filter/FilterManager/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Filter/FilterManager/ConfigInterface.php rename to lib/internal/Magento/Framework/Filter/FilterManager/ConfigInterface.php diff --git a/lib/Magento/Framework/Filter/GridArray/Grid.php b/lib/internal/Magento/Framework/Filter/GridArray/Grid.php similarity index 100% rename from lib/Magento/Framework/Filter/GridArray/Grid.php rename to lib/internal/Magento/Framework/Filter/GridArray/Grid.php diff --git a/lib/Magento/Framework/Filter/Input.php b/lib/internal/Magento/Framework/Filter/Input.php similarity index 100% rename from lib/Magento/Framework/Filter/Input.php rename to lib/internal/Magento/Framework/Filter/Input.php diff --git a/lib/Magento/Framework/Filter/Input/MaliciousCode.php b/lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php similarity index 100% rename from lib/Magento/Framework/Filter/Input/MaliciousCode.php rename to lib/internal/Magento/Framework/Filter/Input/MaliciousCode.php diff --git a/lib/Magento/Framework/Filter/Money.php b/lib/internal/Magento/Framework/Filter/Money.php similarity index 100% rename from lib/Magento/Framework/Filter/Money.php rename to lib/internal/Magento/Framework/Filter/Money.php diff --git a/lib/Magento/Framework/Filter/Object.php b/lib/internal/Magento/Framework/Filter/Object.php similarity index 100% rename from lib/Magento/Framework/Filter/Object.php rename to lib/internal/Magento/Framework/Filter/Object.php diff --git a/lib/Magento/Framework/Filter/Object/Grid.php b/lib/internal/Magento/Framework/Filter/Object/Grid.php similarity index 100% rename from lib/Magento/Framework/Filter/Object/Grid.php rename to lib/internal/Magento/Framework/Filter/Object/Grid.php diff --git a/lib/Magento/Framework/Filter/RemoveAccents.php b/lib/internal/Magento/Framework/Filter/RemoveAccents.php similarity index 100% rename from lib/Magento/Framework/Filter/RemoveAccents.php rename to lib/internal/Magento/Framework/Filter/RemoveAccents.php diff --git a/lib/Magento/Framework/Filter/RemoveTags.php b/lib/internal/Magento/Framework/Filter/RemoveTags.php similarity index 100% rename from lib/Magento/Framework/Filter/RemoveTags.php rename to lib/internal/Magento/Framework/Filter/RemoveTags.php diff --git a/lib/Magento/Framework/Filter/SplitWords.php b/lib/internal/Magento/Framework/Filter/SplitWords.php similarity index 100% rename from lib/Magento/Framework/Filter/SplitWords.php rename to lib/internal/Magento/Framework/Filter/SplitWords.php diff --git a/lib/Magento/Framework/Filter/Sprintf.php b/lib/internal/Magento/Framework/Filter/Sprintf.php similarity index 100% rename from lib/Magento/Framework/Filter/Sprintf.php rename to lib/internal/Magento/Framework/Filter/Sprintf.php diff --git a/lib/Magento/Framework/Filter/StripTags.php b/lib/internal/Magento/Framework/Filter/StripTags.php similarity index 100% rename from lib/Magento/Framework/Filter/StripTags.php rename to lib/internal/Magento/Framework/Filter/StripTags.php diff --git a/lib/Magento/Framework/Filter/Template.php b/lib/internal/Magento/Framework/Filter/Template.php similarity index 100% rename from lib/Magento/Framework/Filter/Template.php rename to lib/internal/Magento/Framework/Filter/Template.php diff --git a/lib/Magento/Framework/Filter/Template/Simple.php b/lib/internal/Magento/Framework/Filter/Template/Simple.php similarity index 100% rename from lib/Magento/Framework/Filter/Template/Simple.php rename to lib/internal/Magento/Framework/Filter/Template/Simple.php diff --git a/lib/Magento/Framework/Filter/Template/Tokenizer/AbstractTokenizer.php b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/AbstractTokenizer.php similarity index 100% rename from lib/Magento/Framework/Filter/Template/Tokenizer/AbstractTokenizer.php rename to lib/internal/Magento/Framework/Filter/Template/Tokenizer/AbstractTokenizer.php diff --git a/lib/Magento/Framework/Filter/Template/Tokenizer/Parameter.php b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php similarity index 100% rename from lib/Magento/Framework/Filter/Template/Tokenizer/Parameter.php rename to lib/internal/Magento/Framework/Filter/Template/Tokenizer/Parameter.php diff --git a/lib/Magento/Framework/Filter/Template/Tokenizer/Variable.php b/lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php similarity index 100% rename from lib/Magento/Framework/Filter/Template/Tokenizer/Variable.php rename to lib/internal/Magento/Framework/Filter/Template/Tokenizer/Variable.php diff --git a/lib/Magento/Framework/Filter/Translit.php b/lib/internal/Magento/Framework/Filter/Translit.php similarity index 100% rename from lib/Magento/Framework/Filter/Translit.php rename to lib/internal/Magento/Framework/Filter/Translit.php diff --git a/lib/Magento/Framework/Filter/TranslitUrl.php b/lib/internal/Magento/Framework/Filter/TranslitUrl.php similarity index 100% rename from lib/Magento/Framework/Filter/TranslitUrl.php rename to lib/internal/Magento/Framework/Filter/TranslitUrl.php diff --git a/lib/Magento/Framework/Filter/Truncate.php b/lib/internal/Magento/Framework/Filter/Truncate.php similarity index 100% rename from lib/Magento/Framework/Filter/Truncate.php rename to lib/internal/Magento/Framework/Filter/Truncate.php diff --git a/lib/Magento/Framework/Filter/ZendFactory.php b/lib/internal/Magento/Framework/Filter/ZendFactory.php similarity index 100% rename from lib/Magento/Framework/Filter/ZendFactory.php rename to lib/internal/Magento/Framework/Filter/ZendFactory.php diff --git a/lib/Magento/Framework/Flag.php b/lib/internal/Magento/Framework/Flag.php similarity index 100% rename from lib/Magento/Framework/Flag.php rename to lib/internal/Magento/Framework/Flag.php diff --git a/lib/Magento/Framework/Flag/Resource.php b/lib/internal/Magento/Framework/Flag/Resource.php similarity index 100% rename from lib/Magento/Framework/Flag/Resource.php rename to lib/internal/Magento/Framework/Flag/Resource.php diff --git a/lib/Magento/Framework/FlagFactory.php b/lib/internal/Magento/Framework/FlagFactory.php similarity index 100% rename from lib/Magento/Framework/FlagFactory.php rename to lib/internal/Magento/Framework/FlagFactory.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/Content.php b/lib/internal/Magento/Framework/Gdata/Gshopping/Content.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/Content.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/Content.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/Entry.php b/lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/Entry.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/Entry.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/Extension/Attribute.php b/lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Attribute.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/Extension/Attribute.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Attribute.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/Extension/Control.php b/lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Control.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/Extension/Control.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Control.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/Extension/Shipping.php b/lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Shipping.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/Extension/Shipping.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Shipping.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/Extension/Tax.php b/lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Tax.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/Extension/Tax.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/Extension/Tax.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/HttpException.php b/lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/HttpException.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/HttpException.php diff --git a/lib/Magento/Framework/Gdata/Gshopping/ItemQuery.php b/lib/internal/Magento/Framework/Gdata/Gshopping/ItemQuery.php similarity index 100% rename from lib/Magento/Framework/Gdata/Gshopping/ItemQuery.php rename to lib/internal/Magento/Framework/Gdata/Gshopping/ItemQuery.php diff --git a/lib/Magento/Framework/HTTP/Adapter/Curl.php b/lib/internal/Magento/Framework/HTTP/Adapter/Curl.php similarity index 100% rename from lib/Magento/Framework/HTTP/Adapter/Curl.php rename to lib/internal/Magento/Framework/HTTP/Adapter/Curl.php diff --git a/lib/Magento/Framework/HTTP/Adapter/FileTransferFactory.php b/lib/internal/Magento/Framework/HTTP/Adapter/FileTransferFactory.php similarity index 100% rename from lib/Magento/Framework/HTTP/Adapter/FileTransferFactory.php rename to lib/internal/Magento/Framework/HTTP/Adapter/FileTransferFactory.php diff --git a/lib/Magento/Framework/HTTP/Authentication.php b/lib/internal/Magento/Framework/HTTP/Authentication.php similarity index 100% rename from lib/Magento/Framework/HTTP/Authentication.php rename to lib/internal/Magento/Framework/HTTP/Authentication.php diff --git a/lib/Magento/Framework/HTTP/Client.php b/lib/internal/Magento/Framework/HTTP/Client.php similarity index 100% rename from lib/Magento/Framework/HTTP/Client.php rename to lib/internal/Magento/Framework/HTTP/Client.php diff --git a/lib/Magento/Framework/HTTP/Client/Curl.php b/lib/internal/Magento/Framework/HTTP/Client/Curl.php similarity index 100% rename from lib/Magento/Framework/HTTP/Client/Curl.php rename to lib/internal/Magento/Framework/HTTP/Client/Curl.php diff --git a/lib/Magento/Framework/HTTP/Client/Socket.php b/lib/internal/Magento/Framework/HTTP/Client/Socket.php similarity index 100% rename from lib/Magento/Framework/HTTP/Client/Socket.php rename to lib/internal/Magento/Framework/HTTP/Client/Socket.php diff --git a/lib/Magento/Framework/HTTP/Header.php b/lib/internal/Magento/Framework/HTTP/Header.php similarity index 100% rename from lib/Magento/Framework/HTTP/Header.php rename to lib/internal/Magento/Framework/HTTP/Header.php diff --git a/lib/Magento/Framework/HTTP/IClient.php b/lib/internal/Magento/Framework/HTTP/IClient.php similarity index 100% rename from lib/Magento/Framework/HTTP/IClient.php rename to lib/internal/Magento/Framework/HTTP/IClient.php diff --git a/lib/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php similarity index 100% rename from lib/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php rename to lib/internal/Magento/Framework/HTTP/PhpEnvironment/RemoteAddress.php diff --git a/lib/Magento/Framework/HTTP/PhpEnvironment/ServerAddress.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/ServerAddress.php similarity index 100% rename from lib/Magento/Framework/HTTP/PhpEnvironment/ServerAddress.php rename to lib/internal/Magento/Framework/HTTP/PhpEnvironment/ServerAddress.php diff --git a/lib/Magento/Framework/HTTP/ZendClient.php b/lib/internal/Magento/Framework/HTTP/ZendClient.php similarity index 100% rename from lib/Magento/Framework/HTTP/ZendClient.php rename to lib/internal/Magento/Framework/HTTP/ZendClient.php diff --git a/lib/Magento/Framework/Image.php b/lib/internal/Magento/Framework/Image.php similarity index 100% rename from lib/Magento/Framework/Image.php rename to lib/internal/Magento/Framework/Image.php diff --git a/lib/Magento/Framework/Image/Adapter/AbstractAdapter.php b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php similarity index 100% rename from lib/Magento/Framework/Image/Adapter/AbstractAdapter.php rename to lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php diff --git a/lib/Magento/Framework/Image/Adapter/AdapterInterface.php b/lib/internal/Magento/Framework/Image/Adapter/AdapterInterface.php similarity index 100% rename from lib/Magento/Framework/Image/Adapter/AdapterInterface.php rename to lib/internal/Magento/Framework/Image/Adapter/AdapterInterface.php diff --git a/lib/Magento/Framework/Image/Adapter/Config.php b/lib/internal/Magento/Framework/Image/Adapter/Config.php similarity index 100% rename from lib/Magento/Framework/Image/Adapter/Config.php rename to lib/internal/Magento/Framework/Image/Adapter/Config.php diff --git a/lib/Magento/Framework/Image/Adapter/ConfigInterface.php b/lib/internal/Magento/Framework/Image/Adapter/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Image/Adapter/ConfigInterface.php rename to lib/internal/Magento/Framework/Image/Adapter/ConfigInterface.php diff --git a/lib/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php similarity index 100% rename from lib/Magento/Framework/Image/Adapter/Gd2.php rename to lib/internal/Magento/Framework/Image/Adapter/Gd2.php diff --git a/lib/Magento/Framework/Image/Adapter/ImageMagick.php b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php similarity index 100% rename from lib/Magento/Framework/Image/Adapter/ImageMagick.php rename to lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php diff --git a/lib/Magento/Framework/Image/AdapterFactory.php b/lib/internal/Magento/Framework/Image/AdapterFactory.php similarity index 100% rename from lib/Magento/Framework/Image/AdapterFactory.php rename to lib/internal/Magento/Framework/Image/AdapterFactory.php diff --git a/lib/Magento/Framework/Image/Factory.php b/lib/internal/Magento/Framework/Image/Factory.php similarity index 100% rename from lib/Magento/Framework/Image/Factory.php rename to lib/internal/Magento/Framework/Image/Factory.php diff --git a/lib/Magento/Framework/Interception/Chain.php b/lib/internal/Magento/Framework/Interception/Chain.php similarity index 100% rename from lib/Magento/Framework/Interception/Chain.php rename to lib/internal/Magento/Framework/Interception/Chain.php diff --git a/lib/Magento/Framework/Interception/Chain/Chain.php b/lib/internal/Magento/Framework/Interception/Chain/Chain.php similarity index 100% rename from lib/Magento/Framework/Interception/Chain/Chain.php rename to lib/internal/Magento/Framework/Interception/Chain/Chain.php diff --git a/lib/Magento/Framework/Interception/Code/Generator/Interceptor.php b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php similarity index 100% rename from lib/Magento/Framework/Interception/Code/Generator/Interceptor.php rename to lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php diff --git a/lib/Magento/Framework/Interception/Code/InterfaceValidator.php b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php similarity index 100% rename from lib/Magento/Framework/Interception/Code/InterfaceValidator.php rename to lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php diff --git a/lib/Magento/Framework/Interception/Code/ValidatorException.php b/lib/internal/Magento/Framework/Interception/Code/ValidatorException.php similarity index 100% rename from lib/Magento/Framework/Interception/Code/ValidatorException.php rename to lib/internal/Magento/Framework/Interception/Code/ValidatorException.php diff --git a/lib/Magento/Framework/Interception/Config.php b/lib/internal/Magento/Framework/Interception/Config.php similarity index 100% rename from lib/Magento/Framework/Interception/Config.php rename to lib/internal/Magento/Framework/Interception/Config.php diff --git a/lib/Magento/Framework/Interception/Config/Config.php b/lib/internal/Magento/Framework/Interception/Config/Config.php similarity index 100% rename from lib/Magento/Framework/Interception/Config/Config.php rename to lib/internal/Magento/Framework/Interception/Config/Config.php diff --git a/lib/Magento/Framework/Interception/Definition.php b/lib/internal/Magento/Framework/Interception/Definition.php similarity index 100% rename from lib/Magento/Framework/Interception/Definition.php rename to lib/internal/Magento/Framework/Interception/Definition.php diff --git a/lib/Magento/Framework/Interception/Definition/Compiled.php b/lib/internal/Magento/Framework/Interception/Definition/Compiled.php similarity index 100% rename from lib/Magento/Framework/Interception/Definition/Compiled.php rename to lib/internal/Magento/Framework/Interception/Definition/Compiled.php diff --git a/lib/Magento/Framework/Interception/Definition/Runtime.php b/lib/internal/Magento/Framework/Interception/Definition/Runtime.php similarity index 100% rename from lib/Magento/Framework/Interception/Definition/Runtime.php rename to lib/internal/Magento/Framework/Interception/Definition/Runtime.php diff --git a/lib/Magento/Framework/Interception/ObjectManager/Config.php b/lib/internal/Magento/Framework/Interception/ObjectManager/Config.php similarity index 100% rename from lib/Magento/Framework/Interception/ObjectManager/Config.php rename to lib/internal/Magento/Framework/Interception/ObjectManager/Config.php diff --git a/lib/Magento/Framework/Interception/PluginList.php b/lib/internal/Magento/Framework/Interception/PluginList.php similarity index 100% rename from lib/Magento/Framework/Interception/PluginList.php rename to lib/internal/Magento/Framework/Interception/PluginList.php diff --git a/lib/Magento/Framework/Interception/PluginList/PluginList.php b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php similarity index 100% rename from lib/Magento/Framework/Interception/PluginList/PluginList.php rename to lib/internal/Magento/Framework/Interception/PluginList/PluginList.php diff --git a/lib/Magento/Framework/Io/AbstractIo.php b/lib/internal/Magento/Framework/Io/AbstractIo.php similarity index 100% rename from lib/Magento/Framework/Io/AbstractIo.php rename to lib/internal/Magento/Framework/Io/AbstractIo.php diff --git a/lib/Magento/Framework/Io/File.php b/lib/internal/Magento/Framework/Io/File.php similarity index 100% rename from lib/Magento/Framework/Io/File.php rename to lib/internal/Magento/Framework/Io/File.php diff --git a/lib/Magento/Framework/Io/Ftp.php b/lib/internal/Magento/Framework/Io/Ftp.php similarity index 100% rename from lib/Magento/Framework/Io/Ftp.php rename to lib/internal/Magento/Framework/Io/Ftp.php diff --git a/lib/Magento/Framework/Io/IoException.php b/lib/internal/Magento/Framework/Io/IoException.php similarity index 100% rename from lib/Magento/Framework/Io/IoException.php rename to lib/internal/Magento/Framework/Io/IoException.php diff --git a/lib/Magento/Framework/Io/IoInterface.php b/lib/internal/Magento/Framework/Io/IoInterface.php similarity index 100% rename from lib/Magento/Framework/Io/IoInterface.php rename to lib/internal/Magento/Framework/Io/IoInterface.php diff --git a/lib/Magento/Framework/Io/Sftp.php b/lib/internal/Magento/Framework/Io/Sftp.php similarity index 100% rename from lib/Magento/Framework/Io/Sftp.php rename to lib/internal/Magento/Framework/Io/Sftp.php diff --git a/lib/Magento/Framework/Json/Decoder.php b/lib/internal/Magento/Framework/Json/Decoder.php similarity index 100% rename from lib/Magento/Framework/Json/Decoder.php rename to lib/internal/Magento/Framework/Json/Decoder.php diff --git a/lib/Magento/Framework/Json/DecoderInterface.php b/lib/internal/Magento/Framework/Json/DecoderInterface.php similarity index 100% rename from lib/Magento/Framework/Json/DecoderInterface.php rename to lib/internal/Magento/Framework/Json/DecoderInterface.php diff --git a/lib/Magento/Framework/Json/Encoder.php b/lib/internal/Magento/Framework/Json/Encoder.php similarity index 100% rename from lib/Magento/Framework/Json/Encoder.php rename to lib/internal/Magento/Framework/Json/Encoder.php diff --git a/lib/Magento/Framework/Json/EncoderInterface.php b/lib/internal/Magento/Framework/Json/EncoderInterface.php similarity index 100% rename from lib/Magento/Framework/Json/EncoderInterface.php rename to lib/internal/Magento/Framework/Json/EncoderInterface.php diff --git a/lib/Magento/Framework/Less/File/Source/Aggregated.php b/lib/internal/Magento/Framework/Less/File/Collector/Aggregated.php similarity index 71% rename from lib/Magento/Framework/Less/File/Source/Aggregated.php rename to lib/internal/Magento/Framework/Less/File/Collector/Aggregated.php index f352ba9b1f2ab79ed470bf7039b1d6b333f23aa6..f02d306258c9cf72e8ea6d7e3e1696fb73f4c4be 100644 --- a/lib/Magento/Framework/Less/File/Source/Aggregated.php +++ b/lib/internal/Magento/Framework/Less/File/Collector/Aggregated.php @@ -21,16 +21,17 @@ * @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) */ -namespace Magento\Framework\Less\File\Source; -use Magento\Framework\View\Layout\File\SourceInterface; -use Magento\Framework\View\Layout\File\FileList\Factory; +namespace Magento\Framework\Less\File\Collector; + +use Magento\Framework\View\File\CollectorInterface; +use Magento\Framework\View\File\FileList\Factory; use Magento\Framework\View\Design\ThemeInterface; /** * Source of layout files aggregated from a theme and its parents according to merging and overriding conventions */ -class Aggregated implements SourceInterface +class Aggregated implements CollectorInterface { /** * @var Factory @@ -38,36 +39,36 @@ class Aggregated implements SourceInterface protected $fileListFactory; /** - * @var SourceInterface + * @var \Magento\Framework\View\File\CollectorInterface */ protected $libraryFiles; /** - * @var SourceInterface + * @var \Magento\Framework\View\File\CollectorInterface */ protected $baseFiles; /** - * @var SourceInterface + * @var \Magento\Framework\View\File\CollectorInterface */ - protected $themeFiles; + protected $overriddenBaseFiles; /** * @param Factory $fileListFactory - * @param SourceInterface $libraryFiles - * @param SourceInterface $baseFiles - * @param SourceInterface $themeFiles + * @param CollectorInterface $libraryFiles + * @param CollectorInterface $baseFiles + * @param CollectorInterface $overriddenBaseFiles */ public function __construct( Factory $fileListFactory, - SourceInterface $libraryFiles, - SourceInterface $baseFiles, - SourceInterface $themeFiles + CollectorInterface $libraryFiles, + CollectorInterface $baseFiles, + CollectorInterface $overriddenBaseFiles ) { $this->fileListFactory = $fileListFactory; $this->libraryFiles = $libraryFiles; $this->baseFiles = $baseFiles; - $this->themeFiles = $themeFiles; + $this->overriddenBaseFiles = $overriddenBaseFiles; } /** @@ -77,17 +78,17 @@ class Aggregated implements SourceInterface * * @param \Magento\Framework\View\Design\ThemeInterface $theme * @param string $filePath - * @return \Magento\Framework\View\Layout\File[] + * @return \Magento\Framework\View\File[] * @throws \LogicException */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $list = $this->fileListFactory->create('Magento\Framework\Less\File\FileList\Collator'); $list->add($this->libraryFiles->getFiles($theme, $filePath)); $list->add($this->baseFiles->getFiles($theme, $filePath)); foreach ($theme->getInheritedThemes() as $currentTheme) { - $files = $this->themeFiles->getFiles($currentTheme, $filePath); + $files = $this->overriddenBaseFiles->getFiles($currentTheme, $filePath); $list->replace($files); } $result = $list->getAll(); diff --git a/lib/Magento/Framework/Less/File/Source/Library.php b/lib/internal/Magento/Framework/Less/File/Collector/Library.php similarity index 81% rename from lib/Magento/Framework/Less/File/Source/Library.php rename to lib/internal/Magento/Framework/Less/File/Collector/Library.php index eafcadb1bb79f9b1474bd7cde3bca7cc019bf53a..87fb0db48356dbca74cf471049145da8dfcaa14c 100644 --- a/lib/Magento/Framework/Less/File/Source/Library.php +++ b/lib/internal/Magento/Framework/Less/File/Collector/Library.php @@ -21,19 +21,19 @@ * @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) */ -namespace Magento\Framework\Less\File\Source; +namespace Magento\Framework\Less\File\Collector; -use Magento\Framework\View\Layout\File\SourceInterface; +use Magento\Framework\View\File\CollectorInterface; use Magento\Framework\View\Design\ThemeInterface; use Magento\Framework\App\Filesystem; use Magento\Framework\Filesystem\Directory\ReadInterface; -use Magento\Framework\View\Layout\File\Factory; -use Magento\Framework\View\Layout\File\FileList\Factory as FileListFactory; +use Magento\Framework\View\File\Factory; +use Magento\Framework\View\File\FileList\Factory as FileListFactory; /** * Source of base layout files introduced by modules */ -class Library implements SourceInterface +class Library implements CollectorInterface { /** * @var Factory @@ -60,10 +60,13 @@ class Library implements SourceInterface * @param Filesystem $filesystem * @param Factory $fileFactory */ - public function __construct(FileListFactory $fileListFactory, Filesystem $filesystem, Factory $fileFactory) - { + public function __construct( + FileListFactory $fileListFactory, + Filesystem $filesystem, + Factory $fileFactory + ) { $this->fileListFactory = $fileListFactory; - $this->libraryDirectory = $filesystem->getDirectoryRead(Filesystem::PUB_LIB_DIR); + $this->libraryDirectory = $filesystem->getDirectoryRead(Filesystem::LIB_WEB); $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR); $this->fileFactory = $fileFactory; } @@ -73,18 +76,17 @@ class Library implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] + * @return array|\Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { - $filePath = pathinfo($filePath, PATHINFO_EXTENSION) ? $filePath : rtrim($filePath, '.') . '.less'; $list = $this->fileListFactory->create(); $files = $this->libraryDirectory->search($filePath); $list->add($this->createFiles($this->libraryDirectory, $theme, $files)); foreach ($theme->getInheritedThemes() as $currentTheme) { $themeFullPath = $currentTheme->getFullPath(); - $files = $this->themesDirectory->search("{$themeFullPath}/{$filePath}"); + $files = $this->themesDirectory->search("{$themeFullPath}/web/{$filePath}"); $list->replace($this->createFiles($this->themesDirectory, $theme, $files), false); } return $list->getAll(); diff --git a/lib/Magento/Framework/Less/File/FileList/Collator.php b/lib/internal/Magento/Framework/Less/File/FileList/Collator.php similarity index 86% rename from lib/Magento/Framework/Less/File/FileList/Collator.php rename to lib/internal/Magento/Framework/Less/File/FileList/Collator.php index c5163e32a3f415ecf4ae44f58108ac1454ca790d..9f37b884e27fa296f271228a02eae24dc564ba2c 100644 --- a/lib/Magento/Framework/Less/File/FileList/Collator.php +++ b/lib/internal/Magento/Framework/Less/File/FileList/Collator.php @@ -23,7 +23,7 @@ */ namespace Magento\Framework\Less\File\FileList; -use Magento\Framework\View\Layout\File\FileList\CollateInterface; +use Magento\Framework\View\File\FileList\CollateInterface; /** * Less file list collator @@ -33,9 +33,9 @@ class Collator implements CollateInterface /** * Collate less files * - * @param \Magento\Framework\View\Layout\File[] $files - * @param \Magento\Framework\View\Layout\File[] $filesOrigin - * @return \Magento\Framework\View\Layout\File[] + * @param \Magento\Framework\View\File[] $files + * @param \Magento\Framework\View\File[] $filesOrigin + * @return \Magento\Framework\View\File[] */ public function collate($files, $filesOrigin) { diff --git a/lib/internal/Magento/Framework/Less/FileGenerator.php b/lib/internal/Magento/Framework/Less/FileGenerator.php new file mode 100644 index 0000000000000000000000000000000000000000..e9c7793caa0f7cded9f41b9d5178beb557a4d588 --- /dev/null +++ b/lib/internal/Magento/Framework/Less/FileGenerator.php @@ -0,0 +1,138 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Less; + +use Magento\Framework\View\Asset\LocalInterface; +use Magento\Framework\View\Asset\Source; + +class FileGenerator +{ + /** + * Temporary directory prefix + */ + const TMP_LESS_DIR = 'less'; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface + */ + protected $tmpDirectory; + + /** + * @var \Magento\Framework\View\Asset\Repository + */ + private $assetRepo; + + /** + * @var \Magento\Framework\Less\PreProcessor\Instruction\MagentoImport + */ + private $magentoImportProcessor; + + /** + * @var \Magento\Framework\Less\PreProcessor\Instruction\Import + */ + private $importProcessor; + + /** + * @param \Magento\Framework\App\Filesystem $filesystem + * @param \Magento\Framework\View\Asset\Repository $assetRepo + * @param \Magento\Framework\Less\PreProcessor\Instruction\MagentoImport $magentoImportProcessor + * @param \Magento\Framework\Less\PreProcessor\Instruction\Import $importProcessor + */ + public function __construct( + \Magento\Framework\App\Filesystem $filesystem, + \Magento\Framework\View\Asset\Repository $assetRepo, + \Magento\Framework\Less\PreProcessor\Instruction\MagentoImport $magentoImportProcessor, + \Magento\Framework\Less\PreProcessor\Instruction\Import $importProcessor + ) { + $this->tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); + $this->assetRepo = $assetRepo; + $this->magentoImportProcessor = $magentoImportProcessor; + $this->importProcessor = $importProcessor; + } + + /** + * Create a tree of self-sustainable files and return the topmost LESS file, ready for passing to 3rd party library + * + * @param \Magento\Framework\View\Asset\PreProcessor\Chain $chain + * @return string Absolute path of generated LESS file + */ + public function generateLessFileTree(\Magento\Framework\View\Asset\PreProcessor\Chain $chain) + { + /** + * @bug This logic is duplicated at \Magento\Framework\View\Asset\PreProcessor\Pool::getPreProcessors() + * If you need to extend or modify behavior of LESS preprocessing, you must account for both places + */ + $this->magentoImportProcessor->process($chain); + $this->importProcessor->process($chain); + $this->generateRelatedFiles(); + $lessRelativePath = preg_replace('#\.css$#', '.less', $chain->getAsset()->getPath()); + $tmpFilePath = $this->createFile($lessRelativePath, $chain->getContent()); + return $tmpFilePath; + } + + /** + * Create all asset files, referenced from already processed ones + * + * @return void + */ + protected function generateRelatedFiles() + { + do { + $relatedFiles = $this->importProcessor->getRelatedFiles(); + $this->importProcessor->resetRelatedFiles(); + foreach ($relatedFiles as $relatedFileInfo) { + list($relatedFileId, $asset) = $relatedFileInfo; + $this->generateRelatedFile($relatedFileId, $asset); + } + } while ($relatedFiles); + } + + /** + * Create file, referenced relatively to an asset + * + * @param string $relatedFileId + * @param LocalInterface $asset + * @return void + */ + protected function generateRelatedFile($relatedFileId, LocalInterface $asset) + { + $relatedAsset = $this->assetRepo->createRelated($relatedFileId, $asset); + $this->createFile($relatedAsset->getPath(), $relatedAsset->getContent()); + } + + /** + * Write down contents to a temporary file and return its absolute path + * + * @param string $relativePath + * @param string $contents + * @return string + */ + protected function createFile($relativePath, $contents) + { + $filePath = Source::TMP_MATERIALIZATION_DIR . '/' . self::TMP_LESS_DIR . '/' . $relativePath; + $this->tmpDirectory->writeFile($filePath, $contents); + return $this->tmpDirectory->getAbsolutePath($filePath); + } +} diff --git a/lib/Magento/Framework/Less/PreProcessor/ErrorHandler.php b/lib/internal/Magento/Framework/Less/PreProcessor/ErrorHandler.php similarity index 100% rename from lib/Magento/Framework/Less/PreProcessor/ErrorHandler.php rename to lib/internal/Magento/Framework/Less/PreProcessor/ErrorHandler.php diff --git a/lib/Magento/Framework/Less/PreProcessor/ErrorHandlerInterface.php b/lib/internal/Magento/Framework/Less/PreProcessor/ErrorHandlerInterface.php similarity index 100% rename from lib/Magento/Framework/Less/PreProcessor/ErrorHandlerInterface.php rename to lib/internal/Magento/Framework/Less/PreProcessor/ErrorHandlerInterface.php diff --git a/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php new file mode 100644 index 0000000000000000000000000000000000000000..f3ba0aaf5c026e42089a29ee9cf013c2e854f95a --- /dev/null +++ b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/Import.php @@ -0,0 +1,139 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Less\PreProcessor\Instruction; + +use Magento\Framework\View\Asset\PreProcessorInterface; +use Magento\Framework\View\Asset\LocalInterface; +use Magento\Framework\View\Asset\ModuleNotation; + +/** + * Less @import instruction preprocessor + */ +class Import implements PreProcessorInterface +{ + /** + * Pattern of @import less instruction + */ + const REPLACE_PATTERN = + '#@import\s+(\((?P<type>\w+)\)\s+)?[\'\"](?P<path>(?![/\\\]|\w:[/\\\])[^\"\']+)[\'\"]\s*?(?P<media>.*?);#'; + + /** + * @var \Magento\Framework\View\Asset\ModuleNotation\Resolver + */ + private $notationResolver; + + /** + * @var array + */ + protected $relatedFiles = array(); + + /** + * @param ModuleNotation\Resolver $notationResolver + */ + public function __construct(ModuleNotation\Resolver $notationResolver) + { + $this->notationResolver = $notationResolver; + } + + /** + * {@inheritdoc} + */ + public function process(\Magento\Framework\View\Asset\PreProcessor\Chain $chain) + { + $asset = $chain->getAsset(); + $replaceCallback = function ($matchContent) use ($asset) { + return $this->replace($matchContent, $asset); + }; + $chain->setContent(preg_replace_callback(self::REPLACE_PATTERN, $replaceCallback, $chain->getContent())); + } + + /** + * Retrieve information on all related files, processed so far + * + * BUG: this information about related files is not supposed to be in the state of this object. + * This class is meant to be a service (shareable instance) without such a transient state. + * The list of related files needs to be accumulated for the LESS preprocessor (\Magento\Framework\Css\PreProcessor\Less), + * because it uses a 3rd-party library, which requires the files to physically reside in the base same directory. + * + * @return array + */ + public function getRelatedFiles() + { + return $this->relatedFiles; + } + + /** + * Clear the record of related files, processed so far + * @return void + */ + public function resetRelatedFiles() + { + $this->relatedFiles = array(); + } + + /** + * Add related file to the record of processed files + * + * @param string $matchedFileId + * @param LocalInterface $asset + * @return void + */ + protected function recordRelatedFile($matchedFileId, LocalInterface $asset) + { + $this->relatedFiles[] = array($matchedFileId, $asset); + } + + /** + * Return replacement of an original @import directive + * + * @param array $matchedContent + * @param LocalInterface $asset + * @return string + */ + protected function replace(array $matchedContent, LocalInterface $asset) + { + $matchedFileId = $this->fixFileExtension($matchedContent['path']); + $this->recordRelatedFile($matchedFileId, $asset); + $resolvedPath = $this->notationResolver->convertModuleNotationToPath($asset, $matchedFileId); + $typeString = empty($matchedContent['type']) ? '' : '(' . $matchedContent['type'] . ') '; + $mediaString = empty($matchedContent['media']) ? '' : ' ' . trim($matchedContent['media']); + return "@import {$typeString}'{$resolvedPath}'{$mediaString};"; + } + + /** + * Resolve extension of imported asset according to the specification of LESS format + * + * @param string $fileId + * @return string + * @link http://lesscss.org/features/#import-directives-feature-file-extensions + */ + protected function fixFileExtension($fileId) + { + if (!pathinfo($fileId, PATHINFO_EXTENSION)) { + $fileId .= '.less'; + } + return $fileId; + } +} diff --git a/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/MagentoImport.php b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/MagentoImport.php new file mode 100644 index 0000000000000000000000000000000000000000..b81ba96350b831c0cbb36b0921a16a7b73c4ab72 --- /dev/null +++ b/lib/internal/Magento/Framework/Less/PreProcessor/Instruction/MagentoImport.php @@ -0,0 +1,142 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\Less\PreProcessor\Instruction; + +use Magento\Framework\Less\PreProcessor\ErrorHandlerInterface; +use Magento\Framework\View\Asset\PreProcessorInterface; +use Magento\Framework\View\Asset\LocalInterface; +use Magento\Framework\View\DesignInterface; +use Magento\Framework\View\File\CollectorInterface; +use Magento\Framework\View\Asset\File\FallbackContext; + +/** + * LESS @magento_import instruction preprocessor + */ +class MagentoImport implements PreProcessorInterface +{ + /** + * PCRE pattern that matches @magento_import LESS instruction + */ + const REPLACE_PATTERN = '#//@magento_import\s+[\'\"](?P<path>(?![/\\\]|\w:[/\\\])[^\"\']+)[\'\"]\s*?;#'; + + /** + * @var DesignInterface + */ + protected $design; + + /** + * @var CollectorInterface + */ + protected $fileSource; + + /** + * @var ErrorHandlerInterface + */ + protected $errorHandler; + + /** + * @var \Magento\Framework\View\Asset\Repository + */ + protected $assetRepo; + + /** + * @var \Magento\Framework\View\Design\Theme\Provider + */ + protected $themeProvider; + + /** + * @param DesignInterface $design + * @param CollectorInterface $fileSource + * @param ErrorHandlerInterface $errorHandler + * @param \Magento\Framework\View\Asset\Repository $assetRepo + * @param \Magento\Framework\View\Design\Theme\Provider $themeProvider + */ + public function __construct( + DesignInterface $design, + CollectorInterface $fileSource, + ErrorHandlerInterface $errorHandler, + \Magento\Framework\View\Asset\Repository $assetRepo, + \Magento\Framework\View\Design\Theme\Provider $themeProvider + ) { + $this->design = $design; + $this->fileSource = $fileSource; + $this->errorHandler = $errorHandler; + $this->assetRepo = $assetRepo; + $this->themeProvider = $themeProvider; + } + + /** + * {@inheritdoc} + */ + public function process(\Magento\Framework\View\Asset\PreProcessor\Chain $chain) + { + $asset = $chain->getAsset(); + $replaceCallback = function ($matchContent) use ($asset) { + return $this->replace($matchContent, $asset); + }; + $chain->setContent(preg_replace_callback(self::REPLACE_PATTERN, $replaceCallback, $chain->getContent())); + } + + /** + * Replace @magento_import to @import less instructions + * + * @param array $matchedContent + * @param LocalInterface $asset + * @return string + */ + protected function replace(array $matchedContent, LocalInterface $asset) + { + $importsContent = ''; + try { + $matchedFileId = $matchedContent['path']; + $relatedAsset = $this->assetRepo->createRelated($matchedFileId, $asset); + $resolvedPath = $relatedAsset->getFilePath(); + $importFiles = $this->fileSource->getFiles($this->getTheme($relatedAsset), $resolvedPath); + /** @var $importFile \Magento\Framework\View\File */ + foreach ($importFiles as $importFile) { + $importsContent .= $importFile->getModule() + ? "@import '{$importFile->getModule()}::{$resolvedPath}';\n" + : "@import '{$matchedFileId}';\n"; + } + } catch (\LogicException $e) { + $this->errorHandler->processException($e); + } + return $importsContent; + } + + /** + * Get theme model based on the information from asset + * + * @param LocalInterface $asset + * @return \Magento\Framework\View\Design\ThemeInterface + */ + protected function getTheme(LocalInterface $asset) + { + $context = $asset->getContext(); + if ($context instanceof FallbackContext) { + return $this->themeProvider->getThemeModel($context->getThemePath(), $context->getAreaCode()); + } + return $this->design->getDesignTheme(); + } +} diff --git a/lib/Magento/Framework/Locale.php b/lib/internal/Magento/Framework/Locale.php similarity index 100% rename from lib/Magento/Framework/Locale.php rename to lib/internal/Magento/Framework/Locale.php diff --git a/lib/Magento/Framework/Locale/Config.php b/lib/internal/Magento/Framework/Locale/Config.php similarity index 100% rename from lib/Magento/Framework/Locale/Config.php rename to lib/internal/Magento/Framework/Locale/Config.php diff --git a/lib/Magento/Framework/Locale/ConfigInterface.php b/lib/internal/Magento/Framework/Locale/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Locale/ConfigInterface.php rename to lib/internal/Magento/Framework/Locale/ConfigInterface.php diff --git a/lib/Magento/Framework/Locale/Currency.php b/lib/internal/Magento/Framework/Locale/Currency.php similarity index 100% rename from lib/Magento/Framework/Locale/Currency.php rename to lib/internal/Magento/Framework/Locale/Currency.php diff --git a/lib/Magento/Framework/Locale/CurrencyInterface.php b/lib/internal/Magento/Framework/Locale/CurrencyInterface.php similarity index 100% rename from lib/Magento/Framework/Locale/CurrencyInterface.php rename to lib/internal/Magento/Framework/Locale/CurrencyInterface.php diff --git a/lib/Magento/Framework/Locale/Format.php b/lib/internal/Magento/Framework/Locale/Format.php similarity index 100% rename from lib/Magento/Framework/Locale/Format.php rename to lib/internal/Magento/Framework/Locale/Format.php diff --git a/lib/Magento/Framework/Locale/FormatInterface.php b/lib/internal/Magento/Framework/Locale/FormatInterface.php similarity index 100% rename from lib/Magento/Framework/Locale/FormatInterface.php rename to lib/internal/Magento/Framework/Locale/FormatInterface.php diff --git a/lib/Magento/Framework/Locale/Hierarchy/Config.php b/lib/internal/Magento/Framework/Locale/Hierarchy/Config.php similarity index 100% rename from lib/Magento/Framework/Locale/Hierarchy/Config.php rename to lib/internal/Magento/Framework/Locale/Hierarchy/Config.php diff --git a/lib/Magento/Framework/Locale/Hierarchy/Config/Converter.php b/lib/internal/Magento/Framework/Locale/Hierarchy/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/Locale/Hierarchy/Config/Converter.php rename to lib/internal/Magento/Framework/Locale/Hierarchy/Config/Converter.php diff --git a/lib/Magento/Framework/Locale/Hierarchy/Config/FileResolver.php b/lib/internal/Magento/Framework/Locale/Hierarchy/Config/FileResolver.php similarity index 100% rename from lib/Magento/Framework/Locale/Hierarchy/Config/FileResolver.php rename to lib/internal/Magento/Framework/Locale/Hierarchy/Config/FileResolver.php diff --git a/lib/Magento/Framework/Locale/Hierarchy/Config/Reader.php b/lib/internal/Magento/Framework/Locale/Hierarchy/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/Locale/Hierarchy/Config/Reader.php rename to lib/internal/Magento/Framework/Locale/Hierarchy/Config/Reader.php diff --git a/lib/Magento/Framework/Locale/Hierarchy/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Locale/Hierarchy/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/Locale/Hierarchy/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/Locale/Hierarchy/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/Locale/Lists.php b/lib/internal/Magento/Framework/Locale/Lists.php similarity index 100% rename from lib/Magento/Framework/Locale/Lists.php rename to lib/internal/Magento/Framework/Locale/Lists.php diff --git a/lib/Magento/Framework/Locale/ListsInterface.php b/lib/internal/Magento/Framework/Locale/ListsInterface.php similarity index 100% rename from lib/Magento/Framework/Locale/ListsInterface.php rename to lib/internal/Magento/Framework/Locale/ListsInterface.php diff --git a/lib/Magento/Framework/Locale/Resolver.php b/lib/internal/Magento/Framework/Locale/Resolver.php similarity index 100% rename from lib/Magento/Framework/Locale/Resolver.php rename to lib/internal/Magento/Framework/Locale/Resolver.php diff --git a/lib/Magento/Framework/Locale/ResolverInterface.php b/lib/internal/Magento/Framework/Locale/ResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Locale/ResolverInterface.php rename to lib/internal/Magento/Framework/Locale/ResolverInterface.php diff --git a/lib/Magento/Framework/Locale/Validator.php b/lib/internal/Magento/Framework/Locale/Validator.php similarity index 100% rename from lib/Magento/Framework/Locale/Validator.php rename to lib/internal/Magento/Framework/Locale/Validator.php diff --git a/lib/Magento/Framework/LocaleFactory.php b/lib/internal/Magento/Framework/LocaleFactory.php similarity index 100% rename from lib/Magento/Framework/LocaleFactory.php rename to lib/internal/Magento/Framework/LocaleFactory.php diff --git a/lib/Magento/Framework/LocaleInterface.php b/lib/internal/Magento/Framework/LocaleInterface.php similarity index 100% rename from lib/Magento/Framework/LocaleInterface.php rename to lib/internal/Magento/Framework/LocaleInterface.php diff --git a/lib/Magento/Framework/Logger.php b/lib/internal/Magento/Framework/Logger.php similarity index 100% rename from lib/Magento/Framework/Logger.php rename to lib/internal/Magento/Framework/Logger.php diff --git a/lib/Magento/Framework/Logger/Adapter.php b/lib/internal/Magento/Framework/Logger/Adapter.php similarity index 100% rename from lib/Magento/Framework/Logger/Adapter.php rename to lib/internal/Magento/Framework/Logger/Adapter.php diff --git a/lib/Magento/Framework/Mail/Exception.php b/lib/internal/Magento/Framework/Mail/Exception.php similarity index 100% rename from lib/Magento/Framework/Mail/Exception.php rename to lib/internal/Magento/Framework/Mail/Exception.php diff --git a/lib/Magento/Framework/Mail/Message.php b/lib/internal/Magento/Framework/Mail/Message.php similarity index 100% rename from lib/Magento/Framework/Mail/Message.php rename to lib/internal/Magento/Framework/Mail/Message.php diff --git a/lib/Magento/Framework/Mail/MessageInterface.php b/lib/internal/Magento/Framework/Mail/MessageInterface.php similarity index 100% rename from lib/Magento/Framework/Mail/MessageInterface.php rename to lib/internal/Magento/Framework/Mail/MessageInterface.php diff --git a/lib/Magento/Framework/Mail/Template/ConfigInterface.php b/lib/internal/Magento/Framework/Mail/Template/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Mail/Template/ConfigInterface.php rename to lib/internal/Magento/Framework/Mail/Template/ConfigInterface.php diff --git a/lib/Magento/Framework/Mail/Template/Factory.php b/lib/internal/Magento/Framework/Mail/Template/Factory.php similarity index 100% rename from lib/Magento/Framework/Mail/Template/Factory.php rename to lib/internal/Magento/Framework/Mail/Template/Factory.php diff --git a/lib/Magento/Framework/Mail/Template/FactoryInterface.php b/lib/internal/Magento/Framework/Mail/Template/FactoryInterface.php similarity index 100% rename from lib/Magento/Framework/Mail/Template/FactoryInterface.php rename to lib/internal/Magento/Framework/Mail/Template/FactoryInterface.php diff --git a/lib/Magento/Framework/Mail/Template/SenderResolverInterface.php b/lib/internal/Magento/Framework/Mail/Template/SenderResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Mail/Template/SenderResolverInterface.php rename to lib/internal/Magento/Framework/Mail/Template/SenderResolverInterface.php diff --git a/lib/Magento/Framework/Mail/Template/TransportBuilder.php b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php similarity index 100% rename from lib/Magento/Framework/Mail/Template/TransportBuilder.php rename to lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php diff --git a/lib/Magento/Framework/Mail/TemplateInterface.php b/lib/internal/Magento/Framework/Mail/TemplateInterface.php similarity index 100% rename from lib/Magento/Framework/Mail/TemplateInterface.php rename to lib/internal/Magento/Framework/Mail/TemplateInterface.php diff --git a/lib/Magento/Framework/Mail/Transport.php b/lib/internal/Magento/Framework/Mail/Transport.php similarity index 100% rename from lib/Magento/Framework/Mail/Transport.php rename to lib/internal/Magento/Framework/Mail/Transport.php diff --git a/lib/Magento/Framework/Mail/TransportInterface.php b/lib/internal/Magento/Framework/Mail/TransportInterface.php similarity index 100% rename from lib/Magento/Framework/Mail/TransportInterface.php rename to lib/internal/Magento/Framework/Mail/TransportInterface.php diff --git a/lib/Magento/Framework/Mail/TransportInterfaceFactory.php b/lib/internal/Magento/Framework/Mail/TransportInterfaceFactory.php similarity index 100% rename from lib/Magento/Framework/Mail/TransportInterfaceFactory.php rename to lib/internal/Magento/Framework/Mail/TransportInterfaceFactory.php diff --git a/lib/Magento/Framework/Math/Calculator.php b/lib/internal/Magento/Framework/Math/Calculator.php similarity index 100% rename from lib/Magento/Framework/Math/Calculator.php rename to lib/internal/Magento/Framework/Math/Calculator.php diff --git a/lib/Magento/Framework/Math/Division.php b/lib/internal/Magento/Framework/Math/Division.php similarity index 100% rename from lib/Magento/Framework/Math/Division.php rename to lib/internal/Magento/Framework/Math/Division.php diff --git a/lib/Magento/Framework/Math/Random.php b/lib/internal/Magento/Framework/Math/Random.php similarity index 100% rename from lib/Magento/Framework/Math/Random.php rename to lib/internal/Magento/Framework/Math/Random.php diff --git a/lib/Magento/Framework/Message/AbstractMessage.php b/lib/internal/Magento/Framework/Message/AbstractMessage.php similarity index 100% rename from lib/Magento/Framework/Message/AbstractMessage.php rename to lib/internal/Magento/Framework/Message/AbstractMessage.php diff --git a/lib/Magento/Framework/Message/Collection.php b/lib/internal/Magento/Framework/Message/Collection.php similarity index 100% rename from lib/Magento/Framework/Message/Collection.php rename to lib/internal/Magento/Framework/Message/Collection.php diff --git a/lib/Magento/Framework/Message/CollectionFactory.php b/lib/internal/Magento/Framework/Message/CollectionFactory.php similarity index 100% rename from lib/Magento/Framework/Message/CollectionFactory.php rename to lib/internal/Magento/Framework/Message/CollectionFactory.php diff --git a/lib/Magento/Framework/Message/Error.php b/lib/internal/Magento/Framework/Message/Error.php similarity index 100% rename from lib/Magento/Framework/Message/Error.php rename to lib/internal/Magento/Framework/Message/Error.php diff --git a/lib/Magento/Framework/Message/Factory.php b/lib/internal/Magento/Framework/Message/Factory.php similarity index 100% rename from lib/Magento/Framework/Message/Factory.php rename to lib/internal/Magento/Framework/Message/Factory.php diff --git a/lib/Magento/Framework/Message/Manager.php b/lib/internal/Magento/Framework/Message/Manager.php similarity index 100% rename from lib/Magento/Framework/Message/Manager.php rename to lib/internal/Magento/Framework/Message/Manager.php diff --git a/lib/Magento/Framework/Message/ManagerInterface.php b/lib/internal/Magento/Framework/Message/ManagerInterface.php similarity index 100% rename from lib/Magento/Framework/Message/ManagerInterface.php rename to lib/internal/Magento/Framework/Message/ManagerInterface.php diff --git a/lib/Magento/Framework/Message/MessageInterface.php b/lib/internal/Magento/Framework/Message/MessageInterface.php similarity index 100% rename from lib/Magento/Framework/Message/MessageInterface.php rename to lib/internal/Magento/Framework/Message/MessageInterface.php diff --git a/lib/Magento/Framework/Message/Notice.php b/lib/internal/Magento/Framework/Message/Notice.php similarity index 100% rename from lib/Magento/Framework/Message/Notice.php rename to lib/internal/Magento/Framework/Message/Notice.php diff --git a/lib/Magento/Framework/Message/Session.php b/lib/internal/Magento/Framework/Message/Session.php similarity index 100% rename from lib/Magento/Framework/Message/Session.php rename to lib/internal/Magento/Framework/Message/Session.php diff --git a/lib/Magento/Framework/Message/Success.php b/lib/internal/Magento/Framework/Message/Success.php similarity index 100% rename from lib/Magento/Framework/Message/Success.php rename to lib/internal/Magento/Framework/Message/Success.php diff --git a/lib/Magento/Framework/Message/Warning.php b/lib/internal/Magento/Framework/Message/Warning.php similarity index 100% rename from lib/Magento/Framework/Message/Warning.php rename to lib/internal/Magento/Framework/Message/Warning.php diff --git a/lib/Magento/Framework/Model/AbstractModel.php b/lib/internal/Magento/Framework/Model/AbstractModel.php similarity index 100% rename from lib/Magento/Framework/Model/AbstractModel.php rename to lib/internal/Magento/Framework/Model/AbstractModel.php diff --git a/lib/Magento/Framework/Model/ActionValidator/RemoveAction.php b/lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction.php similarity index 100% rename from lib/Magento/Framework/Model/ActionValidator/RemoveAction.php rename to lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction.php diff --git a/lib/Magento/Framework/Model/ActionValidator/RemoveAction/Allowed.php b/lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction/Allowed.php similarity index 100% rename from lib/Magento/Framework/Model/ActionValidator/RemoveAction/Allowed.php rename to lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction/Allowed.php diff --git a/lib/Magento/Framework/Model/Context.php b/lib/internal/Magento/Framework/Model/Context.php similarity index 100% rename from lib/Magento/Framework/Model/Context.php rename to lib/internal/Magento/Framework/Model/Context.php diff --git a/lib/Magento/Framework/Model/Exception.php b/lib/internal/Magento/Framework/Model/Exception.php similarity index 100% rename from lib/Magento/Framework/Model/Exception.php rename to lib/internal/Magento/Framework/Model/Exception.php diff --git a/lib/Magento/Framework/Model/Resource/AbstractResource.php b/lib/internal/Magento/Framework/Model/Resource/AbstractResource.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/AbstractResource.php rename to lib/internal/Magento/Framework/Model/Resource/AbstractResource.php diff --git a/lib/Magento/Framework/Model/Resource/Db/AbstractDb.php b/lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Db/AbstractDb.php rename to lib/internal/Magento/Framework/Model/Resource/Db/AbstractDb.php diff --git a/lib/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php b/lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php rename to lib/internal/Magento/Framework/Model/Resource/Db/Collection/AbstractCollection.php diff --git a/lib/Magento/Framework/Model/Resource/Db/Profiler.php b/lib/internal/Magento/Framework/Model/Resource/Db/Profiler.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Db/Profiler.php rename to lib/internal/Magento/Framework/Model/Resource/Db/Profiler.php diff --git a/lib/Magento/Framework/Model/Resource/Entity/AbstractEntity.php b/lib/internal/Magento/Framework/Model/Resource/Entity/AbstractEntity.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Entity/AbstractEntity.php rename to lib/internal/Magento/Framework/Model/Resource/Entity/AbstractEntity.php diff --git a/lib/Magento/Framework/Model/Resource/Entity/Table.php b/lib/internal/Magento/Framework/Model/Resource/Entity/Table.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Entity/Table.php rename to lib/internal/Magento/Framework/Model/Resource/Entity/Table.php diff --git a/lib/Magento/Framework/Model/Resource/Iterator.php b/lib/internal/Magento/Framework/Model/Resource/Iterator.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Iterator.php rename to lib/internal/Magento/Framework/Model/Resource/Iterator.php diff --git a/lib/Magento/Framework/Model/Resource/Type/AbstractType.php b/lib/internal/Magento/Framework/Model/Resource/Type/AbstractType.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Type/AbstractType.php rename to lib/internal/Magento/Framework/Model/Resource/Type/AbstractType.php diff --git a/lib/Magento/Framework/Model/Resource/Type/Db.php b/lib/internal/Magento/Framework/Model/Resource/Type/Db.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Type/Db.php rename to lib/internal/Magento/Framework/Model/Resource/Type/Db.php diff --git a/lib/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php b/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php similarity index 100% rename from lib/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php rename to lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php diff --git a/lib/Magento/Framework/Module/Declaration/Converter/Dom.php b/lib/internal/Magento/Framework/Module/Declaration/Converter/Dom.php similarity index 100% rename from lib/Magento/Framework/Module/Declaration/Converter/Dom.php rename to lib/internal/Magento/Framework/Module/Declaration/Converter/Dom.php diff --git a/lib/Magento/Framework/Module/Declaration/FileIterator.php b/lib/internal/Magento/Framework/Module/Declaration/FileIterator.php similarity index 100% rename from lib/Magento/Framework/Module/Declaration/FileIterator.php rename to lib/internal/Magento/Framework/Module/Declaration/FileIterator.php diff --git a/lib/Magento/Framework/Module/Declaration/FileIteratorFactory.php b/lib/internal/Magento/Framework/Module/Declaration/FileIteratorFactory.php similarity index 100% rename from lib/Magento/Framework/Module/Declaration/FileIteratorFactory.php rename to lib/internal/Magento/Framework/Module/Declaration/FileIteratorFactory.php diff --git a/lib/Magento/Framework/Module/Declaration/FileResolver.php b/lib/internal/Magento/Framework/Module/Declaration/FileResolver.php similarity index 100% rename from lib/Magento/Framework/Module/Declaration/FileResolver.php rename to lib/internal/Magento/Framework/Module/Declaration/FileResolver.php diff --git a/lib/Magento/Framework/Module/Declaration/Reader/Filesystem.php b/lib/internal/Magento/Framework/Module/Declaration/Reader/Filesystem.php similarity index 100% rename from lib/Magento/Framework/Module/Declaration/Reader/Filesystem.php rename to lib/internal/Magento/Framework/Module/Declaration/Reader/Filesystem.php diff --git a/lib/Magento/Framework/Module/Declaration/SchemaLocator.php b/lib/internal/Magento/Framework/Module/Declaration/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/Module/Declaration/SchemaLocator.php rename to lib/internal/Magento/Framework/Module/Declaration/SchemaLocator.php diff --git a/lib/Magento/Framework/Module/DependencyManager.php b/lib/internal/Magento/Framework/Module/DependencyManager.php similarity index 100% rename from lib/Magento/Framework/Module/DependencyManager.php rename to lib/internal/Magento/Framework/Module/DependencyManager.php diff --git a/lib/Magento/Framework/Module/DependencyManagerInterface.php b/lib/internal/Magento/Framework/Module/DependencyManagerInterface.php similarity index 100% rename from lib/Magento/Framework/Module/DependencyManagerInterface.php rename to lib/internal/Magento/Framework/Module/DependencyManagerInterface.php diff --git a/lib/Magento/Framework/Module/Dir.php b/lib/internal/Magento/Framework/Module/Dir.php similarity index 100% rename from lib/Magento/Framework/Module/Dir.php rename to lib/internal/Magento/Framework/Module/Dir.php diff --git a/lib/Magento/Framework/Module/Dir/Reader.php b/lib/internal/Magento/Framework/Module/Dir/Reader.php similarity index 100% rename from lib/Magento/Framework/Module/Dir/Reader.php rename to lib/internal/Magento/Framework/Module/Dir/Reader.php diff --git a/lib/Magento/Framework/Module/Dir/ReverseResolver.php b/lib/internal/Magento/Framework/Module/Dir/ReverseResolver.php similarity index 100% rename from lib/Magento/Framework/Module/Dir/ReverseResolver.php rename to lib/internal/Magento/Framework/Module/Dir/ReverseResolver.php diff --git a/lib/Magento/Framework/Module/FrontController/Plugin/Install.php b/lib/internal/Magento/Framework/Module/FrontController/Plugin/Install.php similarity index 100% rename from lib/Magento/Framework/Module/FrontController/Plugin/Install.php rename to lib/internal/Magento/Framework/Module/FrontController/Plugin/Install.php diff --git a/lib/Magento/Framework/Module/Manager.php b/lib/internal/Magento/Framework/Module/Manager.php similarity index 100% rename from lib/Magento/Framework/Module/Manager.php rename to lib/internal/Magento/Framework/Module/Manager.php diff --git a/lib/Magento/Framework/Module/ModuleList.php b/lib/internal/Magento/Framework/Module/ModuleList.php similarity index 100% rename from lib/Magento/Framework/Module/ModuleList.php rename to lib/internal/Magento/Framework/Module/ModuleList.php diff --git a/lib/Magento/Framework/Module/ModuleListInterface.php b/lib/internal/Magento/Framework/Module/ModuleListInterface.php similarity index 100% rename from lib/Magento/Framework/Module/ModuleListInterface.php rename to lib/internal/Magento/Framework/Module/ModuleListInterface.php diff --git a/lib/Magento/Framework/Module/Output/Config.php b/lib/internal/Magento/Framework/Module/Output/Config.php similarity index 100% rename from lib/Magento/Framework/Module/Output/Config.php rename to lib/internal/Magento/Framework/Module/Output/Config.php diff --git a/lib/Magento/Framework/Module/Output/ConfigInterface.php b/lib/internal/Magento/Framework/Module/Output/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Module/Output/ConfigInterface.php rename to lib/internal/Magento/Framework/Module/Output/ConfigInterface.php diff --git a/lib/Magento/Framework/Module/ResourceInterface.php b/lib/internal/Magento/Framework/Module/ResourceInterface.php similarity index 100% rename from lib/Magento/Framework/Module/ResourceInterface.php rename to lib/internal/Magento/Framework/Module/ResourceInterface.php diff --git a/lib/Magento/Framework/Module/ResourceResolver.php b/lib/internal/Magento/Framework/Module/ResourceResolver.php similarity index 100% rename from lib/Magento/Framework/Module/ResourceResolver.php rename to lib/internal/Magento/Framework/Module/ResourceResolver.php diff --git a/lib/Magento/Framework/Module/ResourceResolverInterface.php b/lib/internal/Magento/Framework/Module/ResourceResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Module/ResourceResolverInterface.php rename to lib/internal/Magento/Framework/Module/ResourceResolverInterface.php diff --git a/lib/Magento/Framework/Module/Setup.php b/lib/internal/Magento/Framework/Module/Setup.php similarity index 100% rename from lib/Magento/Framework/Module/Setup.php rename to lib/internal/Magento/Framework/Module/Setup.php diff --git a/lib/Magento/Framework/Module/Setup/Context.php b/lib/internal/Magento/Framework/Module/Setup/Context.php similarity index 100% rename from lib/Magento/Framework/Module/Setup/Context.php rename to lib/internal/Magento/Framework/Module/Setup/Context.php diff --git a/lib/Magento/Framework/Module/Setup/Migration.php b/lib/internal/Magento/Framework/Module/Setup/Migration.php similarity index 100% rename from lib/Magento/Framework/Module/Setup/Migration.php rename to lib/internal/Magento/Framework/Module/Setup/Migration.php diff --git a/lib/Magento/Framework/Module/Setup/MigrationData.php b/lib/internal/Magento/Framework/Module/Setup/MigrationData.php similarity index 100% rename from lib/Magento/Framework/Module/Setup/MigrationData.php rename to lib/internal/Magento/Framework/Module/Setup/MigrationData.php diff --git a/lib/Magento/Framework/Module/Setup/MigrationFactory.php b/lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php similarity index 100% rename from lib/Magento/Framework/Module/Setup/MigrationFactory.php rename to lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php diff --git a/lib/Magento/Framework/Module/Updater.php b/lib/internal/Magento/Framework/Module/Updater.php similarity index 100% rename from lib/Magento/Framework/Module/Updater.php rename to lib/internal/Magento/Framework/Module/Updater.php diff --git a/lib/Magento/Framework/Module/Updater/SetupFactory.php b/lib/internal/Magento/Framework/Module/Updater/SetupFactory.php similarity index 100% rename from lib/Magento/Framework/Module/Updater/SetupFactory.php rename to lib/internal/Magento/Framework/Module/Updater/SetupFactory.php diff --git a/lib/Magento/Framework/Module/Updater/SetupInterface.php b/lib/internal/Magento/Framework/Module/Updater/SetupInterface.php similarity index 100% rename from lib/Magento/Framework/Module/Updater/SetupInterface.php rename to lib/internal/Magento/Framework/Module/Updater/SetupInterface.php diff --git a/lib/Magento/Framework/Module/UpdaterInterface.php b/lib/internal/Magento/Framework/Module/UpdaterInterface.php similarity index 100% rename from lib/Magento/Framework/Module/UpdaterInterface.php rename to lib/internal/Magento/Framework/Module/UpdaterInterface.php diff --git a/lib/Magento/Framework/Module/etc/module.xsd b/lib/internal/Magento/Framework/Module/etc/module.xsd similarity index 100% rename from lib/Magento/Framework/Module/etc/module.xsd rename to lib/internal/Magento/Framework/Module/etc/module.xsd diff --git a/lib/Magento/Framework/Mview/ActionFactory.php b/lib/internal/Magento/Framework/Mview/ActionFactory.php similarity index 100% rename from lib/Magento/Framework/Mview/ActionFactory.php rename to lib/internal/Magento/Framework/Mview/ActionFactory.php diff --git a/lib/Magento/Framework/Mview/ActionInterface.php b/lib/internal/Magento/Framework/Mview/ActionInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/ActionInterface.php rename to lib/internal/Magento/Framework/Mview/ActionInterface.php diff --git a/lib/Magento/Framework/Mview/Config.php b/lib/internal/Magento/Framework/Mview/Config.php similarity index 100% rename from lib/Magento/Framework/Mview/Config.php rename to lib/internal/Magento/Framework/Mview/Config.php diff --git a/lib/Magento/Framework/Mview/Config/Converter.php b/lib/internal/Magento/Framework/Mview/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/Mview/Config/Converter.php rename to lib/internal/Magento/Framework/Mview/Config/Converter.php diff --git a/lib/Magento/Framework/Mview/Config/Data.php b/lib/internal/Magento/Framework/Mview/Config/Data.php similarity index 100% rename from lib/Magento/Framework/Mview/Config/Data.php rename to lib/internal/Magento/Framework/Mview/Config/Data.php diff --git a/lib/Magento/Framework/Mview/Config/Data/Proxy.php b/lib/internal/Magento/Framework/Mview/Config/Data/Proxy.php similarity index 100% rename from lib/Magento/Framework/Mview/Config/Data/Proxy.php rename to lib/internal/Magento/Framework/Mview/Config/Data/Proxy.php diff --git a/lib/Magento/Framework/Mview/Config/Reader.php b/lib/internal/Magento/Framework/Mview/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/Mview/Config/Reader.php rename to lib/internal/Magento/Framework/Mview/Config/Reader.php diff --git a/lib/Magento/Framework/Mview/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Mview/Config/SchemaLocator.php similarity index 96% rename from lib/Magento/Framework/Mview/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/Mview/Config/SchemaLocator.php index 3207fcb896ef9ea36444a26fef44705eaade5d8d..ed13030d2fee071d2145be19e28b4b7400c72203 100644 --- a/lib/Magento/Framework/Mview/Config/SchemaLocator.php +++ b/lib/internal/Magento/Framework/Mview/Config/SchemaLocator.php @@ -44,7 +44,8 @@ class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface */ public function __construct(\Magento\Framework\Filesystem\DirectoryList $directoryList) { - $etcDir = $directoryList->getDir(\Magento\Framework\App\Filesystem::LIB_DIR) . '/Magento/Framework/Mview/etc'; + $etcDir = $directoryList->getDir(\Magento\Framework\App\Filesystem::LIB_INTERNAL) + . '/Magento/Framework/Mview/etc'; $this->_schema = $etcDir . '/mview.xsd'; $this->_perFileSchema = $etcDir . '/mview.xsd'; } diff --git a/lib/Magento/Framework/Mview/ConfigInterface.php b/lib/internal/Magento/Framework/Mview/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/ConfigInterface.php rename to lib/internal/Magento/Framework/Mview/ConfigInterface.php diff --git a/lib/Magento/Framework/Mview/Processor.php b/lib/internal/Magento/Framework/Mview/Processor.php similarity index 100% rename from lib/Magento/Framework/Mview/Processor.php rename to lib/internal/Magento/Framework/Mview/Processor.php diff --git a/lib/Magento/Framework/Mview/ProcessorInterface.php b/lib/internal/Magento/Framework/Mview/ProcessorInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/ProcessorInterface.php rename to lib/internal/Magento/Framework/Mview/ProcessorInterface.php diff --git a/lib/Magento/Framework/Mview/View.php b/lib/internal/Magento/Framework/Mview/View.php similarity index 100% rename from lib/Magento/Framework/Mview/View.php rename to lib/internal/Magento/Framework/Mview/View.php diff --git a/lib/Magento/Framework/Mview/View/AbstractFactory.php b/lib/internal/Magento/Framework/Mview/View/AbstractFactory.php similarity index 100% rename from lib/Magento/Framework/Mview/View/AbstractFactory.php rename to lib/internal/Magento/Framework/Mview/View/AbstractFactory.php diff --git a/lib/Magento/Framework/Mview/View/Changelog.php b/lib/internal/Magento/Framework/Mview/View/Changelog.php similarity index 100% rename from lib/Magento/Framework/Mview/View/Changelog.php rename to lib/internal/Magento/Framework/Mview/View/Changelog.php diff --git a/lib/Magento/Framework/Mview/View/ChangelogInterface.php b/lib/internal/Magento/Framework/Mview/View/ChangelogInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/View/ChangelogInterface.php rename to lib/internal/Magento/Framework/Mview/View/ChangelogInterface.php diff --git a/lib/Magento/Framework/Mview/View/Collection.php b/lib/internal/Magento/Framework/Mview/View/Collection.php similarity index 100% rename from lib/Magento/Framework/Mview/View/Collection.php rename to lib/internal/Magento/Framework/Mview/View/Collection.php diff --git a/lib/Magento/Framework/Mview/View/CollectionFactory.php b/lib/internal/Magento/Framework/Mview/View/CollectionFactory.php similarity index 100% rename from lib/Magento/Framework/Mview/View/CollectionFactory.php rename to lib/internal/Magento/Framework/Mview/View/CollectionFactory.php diff --git a/lib/Magento/Framework/Mview/View/CollectionInterface.php b/lib/internal/Magento/Framework/Mview/View/CollectionInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/View/CollectionInterface.php rename to lib/internal/Magento/Framework/Mview/View/CollectionInterface.php diff --git a/lib/Magento/Framework/Mview/View/State/CollectionFactory.php b/lib/internal/Magento/Framework/Mview/View/State/CollectionFactory.php similarity index 100% rename from lib/Magento/Framework/Mview/View/State/CollectionFactory.php rename to lib/internal/Magento/Framework/Mview/View/State/CollectionFactory.php diff --git a/lib/Magento/Framework/Mview/View/State/CollectionInterface.php b/lib/internal/Magento/Framework/Mview/View/State/CollectionInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/View/State/CollectionInterface.php rename to lib/internal/Magento/Framework/Mview/View/State/CollectionInterface.php diff --git a/lib/Magento/Framework/Mview/View/StateInterface.php b/lib/internal/Magento/Framework/Mview/View/StateInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/View/StateInterface.php rename to lib/internal/Magento/Framework/Mview/View/StateInterface.php diff --git a/lib/Magento/Framework/Mview/View/Subscription.php b/lib/internal/Magento/Framework/Mview/View/Subscription.php similarity index 100% rename from lib/Magento/Framework/Mview/View/Subscription.php rename to lib/internal/Magento/Framework/Mview/View/Subscription.php diff --git a/lib/Magento/Framework/Mview/View/SubscriptionFactory.php b/lib/internal/Magento/Framework/Mview/View/SubscriptionFactory.php similarity index 100% rename from lib/Magento/Framework/Mview/View/SubscriptionFactory.php rename to lib/internal/Magento/Framework/Mview/View/SubscriptionFactory.php diff --git a/lib/Magento/Framework/Mview/View/SubscriptionInterface.php b/lib/internal/Magento/Framework/Mview/View/SubscriptionInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/View/SubscriptionInterface.php rename to lib/internal/Magento/Framework/Mview/View/SubscriptionInterface.php diff --git a/lib/Magento/Framework/Mview/ViewInterface.php b/lib/internal/Magento/Framework/Mview/ViewInterface.php similarity index 100% rename from lib/Magento/Framework/Mview/ViewInterface.php rename to lib/internal/Magento/Framework/Mview/ViewInterface.php diff --git a/lib/Magento/Framework/Mview/etc/mview.xsd b/lib/internal/Magento/Framework/Mview/etc/mview.xsd similarity index 100% rename from lib/Magento/Framework/Mview/etc/mview.xsd rename to lib/internal/Magento/Framework/Mview/etc/mview.xsd diff --git a/lib/Magento/Framework/Oauth/ConsumerInterface.php b/lib/internal/Magento/Framework/Oauth/ConsumerInterface.php similarity index 100% rename from lib/Magento/Framework/Oauth/ConsumerInterface.php rename to lib/internal/Magento/Framework/Oauth/ConsumerInterface.php diff --git a/lib/Magento/Framework/Oauth/Exception.php b/lib/internal/Magento/Framework/Oauth/Exception.php similarity index 100% rename from lib/Magento/Framework/Oauth/Exception.php rename to lib/internal/Magento/Framework/Oauth/Exception.php diff --git a/lib/Magento/Framework/Oauth/Helper/Oauth.php b/lib/internal/Magento/Framework/Oauth/Helper/Oauth.php similarity index 100% rename from lib/Magento/Framework/Oauth/Helper/Oauth.php rename to lib/internal/Magento/Framework/Oauth/Helper/Oauth.php diff --git a/lib/Magento/Framework/Oauth/Helper/Request.php b/lib/internal/Magento/Framework/Oauth/Helper/Request.php similarity index 100% rename from lib/Magento/Framework/Oauth/Helper/Request.php rename to lib/internal/Magento/Framework/Oauth/Helper/Request.php diff --git a/lib/Magento/Framework/Oauth/NonceGeneratorInterface.php b/lib/internal/Magento/Framework/Oauth/NonceGeneratorInterface.php similarity index 100% rename from lib/Magento/Framework/Oauth/NonceGeneratorInterface.php rename to lib/internal/Magento/Framework/Oauth/NonceGeneratorInterface.php diff --git a/lib/Magento/Framework/Oauth/Oauth.php b/lib/internal/Magento/Framework/Oauth/Oauth.php similarity index 100% rename from lib/Magento/Framework/Oauth/Oauth.php rename to lib/internal/Magento/Framework/Oauth/Oauth.php diff --git a/lib/Magento/Framework/Oauth/OauthInterface.php b/lib/internal/Magento/Framework/Oauth/OauthInterface.php similarity index 100% rename from lib/Magento/Framework/Oauth/OauthInterface.php rename to lib/internal/Magento/Framework/Oauth/OauthInterface.php diff --git a/lib/Magento/Framework/Oauth/TokenProviderInterface.php b/lib/internal/Magento/Framework/Oauth/TokenProviderInterface.php similarity index 100% rename from lib/Magento/Framework/Oauth/TokenProviderInterface.php rename to lib/internal/Magento/Framework/Oauth/TokenProviderInterface.php diff --git a/lib/Magento/Framework/Object.php b/lib/internal/Magento/Framework/Object.php similarity index 100% rename from lib/Magento/Framework/Object.php rename to lib/internal/Magento/Framework/Object.php diff --git a/lib/Magento/Framework/Object/Cache.php b/lib/internal/Magento/Framework/Object/Cache.php similarity index 100% rename from lib/Magento/Framework/Object/Cache.php rename to lib/internal/Magento/Framework/Object/Cache.php diff --git a/lib/Magento/Framework/Object/Copy.php b/lib/internal/Magento/Framework/Object/Copy.php similarity index 100% rename from lib/Magento/Framework/Object/Copy.php rename to lib/internal/Magento/Framework/Object/Copy.php diff --git a/lib/Magento/Framework/Object/Copy/Config.php b/lib/internal/Magento/Framework/Object/Copy/Config.php similarity index 100% rename from lib/Magento/Framework/Object/Copy/Config.php rename to lib/internal/Magento/Framework/Object/Copy/Config.php diff --git a/lib/Magento/Framework/Object/Copy/Config/Converter.php b/lib/internal/Magento/Framework/Object/Copy/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/Object/Copy/Config/Converter.php rename to lib/internal/Magento/Framework/Object/Copy/Config/Converter.php diff --git a/lib/Magento/Framework/Object/Copy/Config/Data.php b/lib/internal/Magento/Framework/Object/Copy/Config/Data.php similarity index 100% rename from lib/Magento/Framework/Object/Copy/Config/Data.php rename to lib/internal/Magento/Framework/Object/Copy/Config/Data.php diff --git a/lib/Magento/Framework/Object/Copy/Config/Reader.php b/lib/internal/Magento/Framework/Object/Copy/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/Object/Copy/Config/Reader.php rename to lib/internal/Magento/Framework/Object/Copy/Config/Reader.php diff --git a/lib/Magento/Framework/Object/Copy/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Object/Copy/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/Object/Copy/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/Object/Copy/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/Object/Factory.php b/lib/internal/Magento/Framework/Object/Factory.php similarity index 100% rename from lib/Magento/Framework/Object/Factory.php rename to lib/internal/Magento/Framework/Object/Factory.php diff --git a/lib/Magento/Framework/Object/IdentityInterface.php b/lib/internal/Magento/Framework/Object/IdentityInterface.php similarity index 100% rename from lib/Magento/Framework/Object/IdentityInterface.php rename to lib/internal/Magento/Framework/Object/IdentityInterface.php diff --git a/lib/Magento/Framework/Object/Mapper.php b/lib/internal/Magento/Framework/Object/Mapper.php similarity index 100% rename from lib/Magento/Framework/Object/Mapper.php rename to lib/internal/Magento/Framework/Object/Mapper.php diff --git a/lib/Magento/Framework/Object/etc/fieldset.xsd b/lib/internal/Magento/Framework/Object/etc/fieldset.xsd similarity index 100% rename from lib/Magento/Framework/Object/etc/fieldset.xsd rename to lib/internal/Magento/Framework/Object/etc/fieldset.xsd diff --git a/lib/Magento/Framework/Object/etc/fieldset_file.xsd b/lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd similarity index 100% rename from lib/Magento/Framework/Object/etc/fieldset_file.xsd rename to lib/internal/Magento/Framework/Object/etc/fieldset_file.xsd diff --git a/lib/Magento/Framework/ObjectManager.php b/lib/internal/Magento/Framework/ObjectManager.php similarity index 100% rename from lib/Magento/Framework/ObjectManager.php rename to lib/internal/Magento/Framework/ObjectManager.php diff --git a/lib/Magento/Framework/ObjectManager/Code/Generator/Factory.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Factory.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Code/Generator/Factory.php rename to lib/internal/Magento/Framework/ObjectManager/Code/Generator/Factory.php diff --git a/lib/Magento/Framework/ObjectManager/Code/Generator/Proxy.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Code/Generator/Proxy.php rename to lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php diff --git a/lib/Magento/Framework/ObjectManager/Config.php b/lib/internal/Magento/Framework/ObjectManager/Config.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Config.php rename to lib/internal/Magento/Framework/ObjectManager/Config.php diff --git a/lib/Magento/Framework/ObjectManager/Config/Config.php b/lib/internal/Magento/Framework/ObjectManager/Config/Config.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Config/Config.php rename to lib/internal/Magento/Framework/ObjectManager/Config/Config.php diff --git a/lib/Magento/Framework/ObjectManager/Config/Mapper/ArgumentParser.php b/lib/internal/Magento/Framework/ObjectManager/Config/Mapper/ArgumentParser.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Config/Mapper/ArgumentParser.php rename to lib/internal/Magento/Framework/ObjectManager/Config/Mapper/ArgumentParser.php diff --git a/lib/Magento/Framework/ObjectManager/Config/Mapper/Dom.php b/lib/internal/Magento/Framework/ObjectManager/Config/Mapper/Dom.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Config/Mapper/Dom.php rename to lib/internal/Magento/Framework/ObjectManager/Config/Mapper/Dom.php diff --git a/lib/Magento/Framework/ObjectManager/Config/Reader/Dom.php b/lib/internal/Magento/Framework/ObjectManager/Config/Reader/Dom.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Config/Reader/Dom.php rename to lib/internal/Magento/Framework/ObjectManager/Config/Reader/Dom.php diff --git a/lib/Magento/Framework/ObjectManager/Config/SchemaLocator.php b/lib/internal/Magento/Framework/ObjectManager/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/ObjectManager/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/ObjectManager/ConfigCache.php b/lib/internal/Magento/Framework/ObjectManager/ConfigCache.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/ConfigCache.php rename to lib/internal/Magento/Framework/ObjectManager/ConfigCache.php diff --git a/lib/Magento/Framework/ObjectManager/ContextInterface.php b/lib/internal/Magento/Framework/ObjectManager/ContextInterface.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/ContextInterface.php rename to lib/internal/Magento/Framework/ObjectManager/ContextInterface.php diff --git a/lib/Magento/Framework/ObjectManager/Definition.php b/lib/internal/Magento/Framework/ObjectManager/Definition.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Definition.php rename to lib/internal/Magento/Framework/ObjectManager/Definition.php diff --git a/lib/Magento/Framework/ObjectManager/Definition/Compiled.php b/lib/internal/Magento/Framework/ObjectManager/Definition/Compiled.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Definition/Compiled.php rename to lib/internal/Magento/Framework/ObjectManager/Definition/Compiled.php diff --git a/lib/Magento/Framework/ObjectManager/Definition/Compiled/Binary.php b/lib/internal/Magento/Framework/ObjectManager/Definition/Compiled/Binary.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Definition/Compiled/Binary.php rename to lib/internal/Magento/Framework/ObjectManager/Definition/Compiled/Binary.php diff --git a/lib/Magento/Framework/ObjectManager/Definition/Compiled/Serialized.php b/lib/internal/Magento/Framework/ObjectManager/Definition/Compiled/Serialized.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Definition/Compiled/Serialized.php rename to lib/internal/Magento/Framework/ObjectManager/Definition/Compiled/Serialized.php diff --git a/lib/Magento/Framework/ObjectManager/Definition/Runtime.php b/lib/internal/Magento/Framework/ObjectManager/Definition/Runtime.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Definition/Runtime.php rename to lib/internal/Magento/Framework/ObjectManager/Definition/Runtime.php diff --git a/lib/Magento/Framework/ObjectManager/DefinitionFactory.php b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/DefinitionFactory.php rename to lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php diff --git a/lib/Magento/Framework/ObjectManager/DynamicConfigInterface.php b/lib/internal/Magento/Framework/ObjectManager/DynamicConfigInterface.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/DynamicConfigInterface.php rename to lib/internal/Magento/Framework/ObjectManager/DynamicConfigInterface.php diff --git a/lib/Magento/Framework/ObjectManager/Factory.php b/lib/internal/Magento/Framework/ObjectManager/Factory.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Factory.php rename to lib/internal/Magento/Framework/ObjectManager/Factory.php diff --git a/lib/Magento/Framework/ObjectManager/Factory/Factory.php b/lib/internal/Magento/Framework/ObjectManager/Factory/Factory.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Factory/Factory.php rename to lib/internal/Magento/Framework/ObjectManager/Factory/Factory.php diff --git a/lib/Magento/Framework/ObjectManager/ObjectManager.php b/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/ObjectManager.php rename to lib/internal/Magento/Framework/ObjectManager/ObjectManager.php diff --git a/lib/Magento/Framework/ObjectManager/Relations.php b/lib/internal/Magento/Framework/ObjectManager/Relations.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Relations.php rename to lib/internal/Magento/Framework/ObjectManager/Relations.php diff --git a/lib/Magento/Framework/ObjectManager/Relations/Compiled.php b/lib/internal/Magento/Framework/ObjectManager/Relations/Compiled.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Relations/Compiled.php rename to lib/internal/Magento/Framework/ObjectManager/Relations/Compiled.php diff --git a/lib/Magento/Framework/ObjectManager/Relations/Runtime.php b/lib/internal/Magento/Framework/ObjectManager/Relations/Runtime.php similarity index 100% rename from lib/Magento/Framework/ObjectManager/Relations/Runtime.php rename to lib/internal/Magento/Framework/ObjectManager/Relations/Runtime.php diff --git a/lib/Magento/Framework/ObjectManager/etc/config.xsd b/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd similarity index 100% rename from lib/Magento/Framework/ObjectManager/etc/config.xsd rename to lib/internal/Magento/Framework/ObjectManager/etc/config.xsd diff --git a/lib/Magento/Framework/Option/ArrayInterface.php b/lib/internal/Magento/Framework/Option/ArrayInterface.php similarity index 100% rename from lib/Magento/Framework/Option/ArrayInterface.php rename to lib/internal/Magento/Framework/Option/ArrayInterface.php diff --git a/lib/Magento/Framework/Option/ArrayPool.php b/lib/internal/Magento/Framework/Option/ArrayPool.php similarity index 100% rename from lib/Magento/Framework/Option/ArrayPool.php rename to lib/internal/Magento/Framework/Option/ArrayPool.php diff --git a/lib/Magento/Framework/OsInfo.php b/lib/internal/Magento/Framework/OsInfo.php similarity index 100% rename from lib/Magento/Framework/OsInfo.php rename to lib/internal/Magento/Framework/OsInfo.php diff --git a/lib/Magento/Framework/Pear.php b/lib/internal/Magento/Framework/Pear.php similarity index 100% rename from lib/Magento/Framework/Pear.php rename to lib/internal/Magento/Framework/Pear.php diff --git a/lib/Magento/Framework/Pear/Frontend.php b/lib/internal/Magento/Framework/Pear/Frontend.php similarity index 100% rename from lib/Magento/Framework/Pear/Frontend.php rename to lib/internal/Magento/Framework/Pear/Frontend.php diff --git a/lib/Magento/Framework/Pear/Package.php b/lib/internal/Magento/Framework/Pear/Package.php similarity index 100% rename from lib/Magento/Framework/Pear/Package.php rename to lib/internal/Magento/Framework/Pear/Package.php diff --git a/lib/Magento/Framework/Pear/Registry.php b/lib/internal/Magento/Framework/Pear/Registry.php similarity index 100% rename from lib/Magento/Framework/Pear/Registry.php rename to lib/internal/Magento/Framework/Pear/Registry.php diff --git a/lib/Magento/Framework/Phrase.php b/lib/internal/Magento/Framework/Phrase.php similarity index 100% rename from lib/Magento/Framework/Phrase.php rename to lib/internal/Magento/Framework/Phrase.php diff --git a/lib/Magento/Framework/Phrase/Renderer/Composite.php b/lib/internal/Magento/Framework/Phrase/Renderer/Composite.php similarity index 100% rename from lib/Magento/Framework/Phrase/Renderer/Composite.php rename to lib/internal/Magento/Framework/Phrase/Renderer/Composite.php diff --git a/lib/Magento/Framework/Phrase/Renderer/Inline.php b/lib/internal/Magento/Framework/Phrase/Renderer/Inline.php similarity index 100% rename from lib/Magento/Framework/Phrase/Renderer/Inline.php rename to lib/internal/Magento/Framework/Phrase/Renderer/Inline.php diff --git a/lib/Magento/Framework/Phrase/Renderer/Placeholder.php b/lib/internal/Magento/Framework/Phrase/Renderer/Placeholder.php similarity index 100% rename from lib/Magento/Framework/Phrase/Renderer/Placeholder.php rename to lib/internal/Magento/Framework/Phrase/Renderer/Placeholder.php diff --git a/lib/Magento/Framework/Phrase/Renderer/Translate.php b/lib/internal/Magento/Framework/Phrase/Renderer/Translate.php similarity index 93% rename from lib/Magento/Framework/Phrase/Renderer/Translate.php rename to lib/internal/Magento/Framework/Phrase/Renderer/Translate.php index 33fc931270e67c0544b4a1565a239bc18b1b31cf..58be776147f542259a5ed04679dd88d97d510b97 100644 --- a/lib/Magento/Framework/Phrase/Renderer/Translate.php +++ b/lib/internal/Magento/Framework/Phrase/Renderer/Translate.php @@ -53,9 +53,7 @@ class Translate implements \Magento\Framework\Phrase\RendererInterface { $text = end($source); - $code = $this->translator->getTheme() - . \Magento\Framework\View\Service::SCOPE_SEPARATOR - . $text; + $code = $this->translator->getTheme() . '::' . $text; $data = $this->translator->getData(); diff --git a/lib/Magento/Framework/Phrase/RendererInterface.php b/lib/internal/Magento/Framework/Phrase/RendererInterface.php similarity index 100% rename from lib/Magento/Framework/Phrase/RendererInterface.php rename to lib/internal/Magento/Framework/Phrase/RendererInterface.php diff --git a/lib/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php b/lib/internal/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php rename to lib/internal/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php diff --git a/lib/Magento/Framework/Pricing/Adjustment/Calculator.php b/lib/internal/Magento/Framework/Pricing/Adjustment/Calculator.php similarity index 100% rename from lib/Magento/Framework/Pricing/Adjustment/Calculator.php rename to lib/internal/Magento/Framework/Pricing/Adjustment/Calculator.php diff --git a/lib/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php b/lib/internal/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php rename to lib/internal/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php diff --git a/lib/Magento/Framework/Pricing/Adjustment/Collection.php b/lib/internal/Magento/Framework/Pricing/Adjustment/Collection.php similarity index 100% rename from lib/Magento/Framework/Pricing/Adjustment/Collection.php rename to lib/internal/Magento/Framework/Pricing/Adjustment/Collection.php diff --git a/lib/Magento/Framework/Pricing/Adjustment/Factory.php b/lib/internal/Magento/Framework/Pricing/Adjustment/Factory.php similarity index 100% rename from lib/Magento/Framework/Pricing/Adjustment/Factory.php rename to lib/internal/Magento/Framework/Pricing/Adjustment/Factory.php diff --git a/lib/Magento/Framework/Pricing/Adjustment/Pool.php b/lib/internal/Magento/Framework/Pricing/Adjustment/Pool.php similarity index 100% rename from lib/Magento/Framework/Pricing/Adjustment/Pool.php rename to lib/internal/Magento/Framework/Pricing/Adjustment/Pool.php diff --git a/lib/Magento/Framework/Pricing/Amount/AmountFactory.php b/lib/internal/Magento/Framework/Pricing/Amount/AmountFactory.php similarity index 100% rename from lib/Magento/Framework/Pricing/Amount/AmountFactory.php rename to lib/internal/Magento/Framework/Pricing/Amount/AmountFactory.php diff --git a/lib/Magento/Framework/Pricing/Amount/AmountInterface.php b/lib/internal/Magento/Framework/Pricing/Amount/AmountInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Amount/AmountInterface.php rename to lib/internal/Magento/Framework/Pricing/Amount/AmountInterface.php diff --git a/lib/Magento/Framework/Pricing/Amount/Base.php b/lib/internal/Magento/Framework/Pricing/Amount/Base.php similarity index 100% rename from lib/Magento/Framework/Pricing/Amount/Base.php rename to lib/internal/Magento/Framework/Pricing/Amount/Base.php diff --git a/lib/Magento/Framework/Pricing/Object/SaleableInterface.php b/lib/internal/Magento/Framework/Pricing/Object/SaleableInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Object/SaleableInterface.php rename to lib/internal/Magento/Framework/Pricing/Object/SaleableInterface.php diff --git a/lib/Magento/Framework/Pricing/Price/AbstractPrice.php b/lib/internal/Magento/Framework/Pricing/Price/AbstractPrice.php similarity index 100% rename from lib/Magento/Framework/Pricing/Price/AbstractPrice.php rename to lib/internal/Magento/Framework/Pricing/Price/AbstractPrice.php diff --git a/lib/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php b/lib/internal/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php rename to lib/internal/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php diff --git a/lib/Magento/Framework/Pricing/Price/Collection.php b/lib/internal/Magento/Framework/Pricing/Price/Collection.php similarity index 100% rename from lib/Magento/Framework/Pricing/Price/Collection.php rename to lib/internal/Magento/Framework/Pricing/Price/Collection.php diff --git a/lib/Magento/Framework/Pricing/Price/Factory.php b/lib/internal/Magento/Framework/Pricing/Price/Factory.php similarity index 100% rename from lib/Magento/Framework/Pricing/Price/Factory.php rename to lib/internal/Magento/Framework/Pricing/Price/Factory.php diff --git a/lib/Magento/Framework/Pricing/Price/Pool.php b/lib/internal/Magento/Framework/Pricing/Price/Pool.php similarity index 100% rename from lib/Magento/Framework/Pricing/Price/Pool.php rename to lib/internal/Magento/Framework/Pricing/Price/Pool.php diff --git a/lib/Magento/Framework/Pricing/Price/PriceInterface.php b/lib/internal/Magento/Framework/Pricing/Price/PriceInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Price/PriceInterface.php rename to lib/internal/Magento/Framework/Pricing/Price/PriceInterface.php diff --git a/lib/internal/Magento/Framework/Pricing/PriceComposite.php b/lib/internal/Magento/Framework/Pricing/PriceComposite.php new file mode 100644 index 0000000000000000000000000000000000000000..e9a9f9b771e03224f3e45f4f4b0edba5622ae0d0 --- /dev/null +++ b/lib/internal/Magento/Framework/Pricing/PriceComposite.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\Pricing; + +use Magento\Framework\Pricing\Object\SaleableInterface; +use Magento\Framework\Pricing\Price\Factory as PriceFactory; +use Magento\Framework\Pricing\Price\PriceInterface; + +/** + * Composite price model + */ +class PriceComposite +{ + /** + * @var PriceFactory + */ + protected $priceFactory; + + /** + * @var array + */ + protected $metadata; + + /** + * @param PriceFactory $priceFactory + * @param array $metadata + */ + public function __construct(PriceFactory $priceFactory, array $metadata = []) + { + $this->priceFactory = $priceFactory; + $this->metadata = $metadata; + } + + /** + * @return array + */ + public function getPriceCodes() + { + return array_keys($this->metadata); + } + + /** + * Returns metadata for prices + * + * @return array + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * @param SaleableInterface $salableItem + * @param string $priceCode + * @param float $quantity + * @return PriceInterface + * @throws \InvalidArgumentException + */ + public function createPriceObject(SaleableInterface $salableItem, $priceCode, $quantity) + { + if (!isset($this->metadata[$priceCode])) { + throw new \InvalidArgumentException($priceCode . ' is not registered in prices list'); + } + $className = $this->metadata[$priceCode]['class']; + return $this->priceFactory->create($salableItem, $className, $quantity); + } +} diff --git a/lib/Magento/Framework/Pricing/PriceCurrencyInterface.php b/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/PriceCurrencyInterface.php rename to lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php diff --git a/lib/Magento/Framework/Pricing/PriceInfo/Base.php b/lib/internal/Magento/Framework/Pricing/PriceInfo/Base.php similarity index 100% rename from lib/Magento/Framework/Pricing/PriceInfo/Base.php rename to lib/internal/Magento/Framework/Pricing/PriceInfo/Base.php diff --git a/lib/Magento/Framework/Pricing/PriceInfo/Factory.php b/lib/internal/Magento/Framework/Pricing/PriceInfo/Factory.php similarity index 100% rename from lib/Magento/Framework/Pricing/PriceInfo/Factory.php rename to lib/internal/Magento/Framework/Pricing/PriceInfo/Factory.php diff --git a/lib/Magento/Framework/Pricing/PriceInfoInterface.php b/lib/internal/Magento/Framework/Pricing/PriceInfoInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/PriceInfoInterface.php rename to lib/internal/Magento/Framework/Pricing/PriceInfoInterface.php diff --git a/lib/Magento/Framework/Pricing/Render.php b/lib/internal/Magento/Framework/Pricing/Render.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render.php rename to lib/internal/Magento/Framework/Pricing/Render.php diff --git a/lib/Magento/Framework/Pricing/Render/AbstractAdjustment.php b/lib/internal/Magento/Framework/Pricing/Render/AbstractAdjustment.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/AbstractAdjustment.php rename to lib/internal/Magento/Framework/Pricing/Render/AbstractAdjustment.php diff --git a/lib/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php b/lib/internal/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php rename to lib/internal/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php diff --git a/lib/Magento/Framework/Pricing/Render/Amount.php b/lib/internal/Magento/Framework/Pricing/Render/Amount.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/Amount.php rename to lib/internal/Magento/Framework/Pricing/Render/Amount.php diff --git a/lib/Magento/Framework/Pricing/Render/AmountRenderInterface.php b/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/AmountRenderInterface.php rename to lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php diff --git a/lib/Magento/Framework/Pricing/Render/Layout.php b/lib/internal/Magento/Framework/Pricing/Render/Layout.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/Layout.php rename to lib/internal/Magento/Framework/Pricing/Render/Layout.php diff --git a/lib/Magento/Framework/Pricing/Render/PriceBox.php b/lib/internal/Magento/Framework/Pricing/Render/PriceBox.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/PriceBox.php rename to lib/internal/Magento/Framework/Pricing/Render/PriceBox.php diff --git a/lib/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php b/lib/internal/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php rename to lib/internal/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php diff --git a/lib/Magento/Framework/Pricing/Render/RendererPool.php b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php similarity index 100% rename from lib/Magento/Framework/Pricing/Render/RendererPool.php rename to lib/internal/Magento/Framework/Pricing/Render/RendererPool.php diff --git a/lib/Magento/Framework/Profiler.php b/lib/internal/Magento/Framework/Profiler.php similarity index 100% rename from lib/Magento/Framework/Profiler.php rename to lib/internal/Magento/Framework/Profiler.php diff --git a/lib/Magento/Framework/Profiler/Driver/Factory.php b/lib/internal/Magento/Framework/Profiler/Driver/Factory.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Factory.php rename to lib/internal/Magento/Framework/Profiler/Driver/Factory.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard/AbstractOutput.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard/AbstractOutput.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard/AbstractOutput.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard/AbstractOutput.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard/Output/Csvfile.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Csvfile.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard/Output/Csvfile.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Csvfile.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard/Output/Factory.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Factory.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard/Output/Factory.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Factory.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Firebug.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard/Output/Html.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Html.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard/Output/Html.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard/Output/Html.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard/OutputInterface.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard/OutputInterface.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard/OutputInterface.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard/OutputInterface.php diff --git a/lib/Magento/Framework/Profiler/Driver/Standard/Stat.php b/lib/internal/Magento/Framework/Profiler/Driver/Standard/Stat.php similarity index 100% rename from lib/Magento/Framework/Profiler/Driver/Standard/Stat.php rename to lib/internal/Magento/Framework/Profiler/Driver/Standard/Stat.php diff --git a/lib/Magento/Framework/Profiler/DriverInterface.php b/lib/internal/Magento/Framework/Profiler/DriverInterface.php similarity index 100% rename from lib/Magento/Framework/Profiler/DriverInterface.php rename to lib/internal/Magento/Framework/Profiler/DriverInterface.php diff --git a/lib/Magento/Framework/Registry.php b/lib/internal/Magento/Framework/Registry.php similarity index 100% rename from lib/Magento/Framework/Registry.php rename to lib/internal/Magento/Framework/Registry.php diff --git a/lib/internal/Magento/Framework/RequireJs/Config.php b/lib/internal/Magento/Framework/RequireJs/Config.php new file mode 100644 index 0000000000000000000000000000000000000000..e8b5be8027d9075282bc3b4135a623095e4681fb --- /dev/null +++ b/lib/internal/Magento/Framework/RequireJs/Config.php @@ -0,0 +1,167 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\RequireJs; + +/** + * Provider of RequireJs config information + */ +class Config +{ + /** + * Name of sub-directory where generated RequireJs config is placed + */ + const DIR_NAME = '_requirejs'; + + /** + * File name of RequireJs config + */ + const CONFIG_FILE_NAME = 'requirejs-config.js'; + + /** + * Path to normalization plugin in RequireJs format + */ + const NORMALIZE_PLUGIN_PATH = 'mage/requirejs/plugin/id-normalizer'; + + /** + * Template for combined RequireJs config file + */ + const FULL_CONFIG_TEMPLATE = <<<config +(function(require){ +%function% + +%usages% +})(require); +config; + + /** + * Template for wrapped partial config + */ + const PARTIAL_CONFIG_TEMPLATE = <<<config +(function() { +%config% +require.config(mageUpdateConfigPaths(config, '%context%')) +})(); + +config; + + + /** + * @var \Magento\Framework\RequireJs\Config\File\Collector\Aggregated + */ + private $fileSource; + + /** + * @var \Magento\Framework\View\DesignInterface + */ + private $design; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface + */ + private $baseDir; + + /** + * @var \Magento\Framework\View\Asset\ContextInterface + */ + private $staticContext; + + /** + * @param \Magento\Framework\RequireJs\Config\File\Collector\Aggregated $fileSource + * @param \Magento\Framework\View\DesignInterface $design + * @param \Magento\Framework\App\Filesystem $appFilesystem + * @param \Magento\Framework\View\Asset\Repository $assetRepo + */ + public function __construct( + \Magento\Framework\RequireJs\Config\File\Collector\Aggregated $fileSource, + \Magento\Framework\View\DesignInterface $design, + \Magento\Framework\App\Filesystem $appFilesystem, + \Magento\Framework\View\Asset\Repository $assetRepo + ) { + $this->fileSource = $fileSource; + $this->design = $design; + $this->baseDir = $appFilesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); + $this->staticContext = $assetRepo->getStaticViewFileContext(); + } + + /** + * Get aggregated distributed configuration + * + * @return string + */ + public function getConfig() + { + $functionSource = __DIR__ . '/paths-updater.js'; + $functionDeclaration = $this->baseDir->readFile($this->baseDir->getRelativePath($functionSource)); + + $distributedConfig = ''; + $customConfigFiles = $this->fileSource->getFiles($this->design->getDesignTheme(), self::CONFIG_FILE_NAME); + foreach ($customConfigFiles as $file) { + $config = $this->baseDir->readFile($this->baseDir->getRelativePath($file->getFilename())); + $distributedConfig .= str_replace( + array('%config%', '%context%'), + array($config, $file->getModule()), + self::PARTIAL_CONFIG_TEMPLATE + ); + } + + $fullConfig = str_replace( + array('%function%', '%usages%'), + array($functionDeclaration, $distributedConfig), + self::FULL_CONFIG_TEMPLATE + ); + + return $fullConfig; + } + + /** + * Get path to config file relative to directory, where all config files with different context are located + * + * @return string + */ + public function getConfigFileRelativePath() + { + return self::DIR_NAME . '/' . $this->staticContext->getPath() . '/' . self::CONFIG_FILE_NAME; + } + + /** + * Get base RequireJs configuration necessary for working with Magento application + * + * @return string + */ + public function getBaseConfig() + { + $config = array( + 'baseUrl' => $this->staticContext->getBaseUrl() . $this->staticContext->getPath(), + 'paths' => array( + 'magento' => self::NORMALIZE_PLUGIN_PATH, + ), + //Disable the timeout, so that normalizer plugin and other JS modules are waited to be loaded + // independent of server load time and network speed + 'waitSeconds' => 0, + ); + $config = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); + return "require.config($config);\n"; + } +} diff --git a/lib/internal/Magento/Framework/RequireJs/Config/File/Collector/Aggregated.php b/lib/internal/Magento/Framework/RequireJs/Config/File/Collector/Aggregated.php new file mode 100644 index 0000000000000000000000000000000000000000..7223ee8f4bc8a45323394f3f48067fbdb328a979 --- /dev/null +++ b/lib/internal/Magento/Framework/RequireJs/Config/File/Collector/Aggregated.php @@ -0,0 +1,114 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\RequireJs\Config\File\Collector; + +use Magento\Framework\View\Design\ThemeInterface; +use Magento\Framework\View\File\CollectorInterface; + +/** + * Source of RequireJs config files basing on list of directories they may be located in + */ +class Aggregated implements CollectorInterface +{ + /** + * Base files + * + * @var \Magento\Framework\View\File\CollectorInterface + */ + protected $baseFiles; + + /** + * Theme files + * + * @var \Magento\Framework\View\File\CollectorInterface + */ + protected $themeFiles; + + /** + * Theme modular files + * + * @var \Magento\Framework\View\File\CollectorInterface + */ + protected $themeModularFiles; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface + */ + protected $libDirectory; + + /** + * @var \Magento\Framework\View\File\Factory + */ + protected $fileFactory; + + /** + * @param \Magento\Framework\App\Filesystem $filesystem + * @param \Magento\Framework\View\File\Factory $fileFactory + * @param CollectorInterface $baseFiles + * @param CollectorInterface $themeFiles + * @param CollectorInterface $themeModularFiles + */ + public function __construct( + \Magento\Framework\App\Filesystem $filesystem, + \Magento\Framework\View\File\Factory $fileFactory, + CollectorInterface $baseFiles, + CollectorInterface $themeFiles, + CollectorInterface $themeModularFiles + ) { + $this->libDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::LIB_WEB); + $this->fileFactory = $fileFactory; + $this->baseFiles = $baseFiles; + $this->themeFiles = $themeFiles; + $this->themeModularFiles = $themeModularFiles; + } + + /** + * Get layout files from modules, theme with ancestors and library + * + * @param ThemeInterface $theme + * @param string $filePath + * @throws \InvalidArgumentException + * @return \Magento\Framework\View\File[] + */ + public function getFiles(ThemeInterface $theme, $filePath) + { + if (empty($filePath)) { + throw new \InvalidArgumentException('File path must be specified'); + } + $files = array(); + if ($this->libDirectory->isExist($filePath)) { + $filename = $this->libDirectory->getAbsolutePath($filePath); + $files[] = $this->fileFactory->create($filename); + } + + $files = array_merge($files, $this->baseFiles->getFiles($theme, $filePath)); + + foreach ($theme->getInheritedThemes() as $currentTheme) { + $files = array_merge($files, $this->themeModularFiles->getFiles($currentTheme, $filePath)); + $files = array_merge($files, $this->themeFiles->getFiles($currentTheme, $filePath)); + } + return $files; + } +} diff --git a/pub/lib/mage/accordion.js b/lib/internal/Magento/Framework/RequireJs/paths-updater.js similarity index 66% rename from pub/lib/mage/accordion.js rename to lib/internal/Magento/Framework/RequireJs/paths-updater.js index ced94b6cdc6bbf61e28c3af4dca517922cbcbd46..59be074f2549ef26064b3f099a2d997c4452757a 100644 --- a/pub/lib/mage/accordion.js +++ b/lib/internal/Magento/Framework/RequireJs/paths-updater.js @@ -21,12 +21,21 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ - -(function($) { - 'use strict'; - /** - * Accordion Widget - this widget is a wrapper for the jQuery UI Accordion - */ - $.widget('mage.accordion', $.ui.accordion, { - }); -})(jQuery); +/** + * Update config.paths by fixing relative paths basing on the context + */ +var mageUpdateConfigPaths = function(config, context) +{ + "use strict"; + if (config.paths) { + if (context) { + context += '/'; + } + for (var key in config.paths) { + if (config.paths[key].substr(0, 2) == './') { + config.paths[key] = context + config.paths[key].substr(2); + } + } + } + return config; +}; diff --git a/lib/Magento/Framework/Service/Data/AbstractObject.php b/lib/internal/Magento/Framework/Service/Data/AbstractObject.php similarity index 100% rename from lib/Magento/Framework/Service/Data/AbstractObject.php rename to lib/internal/Magento/Framework/Service/Data/AbstractObject.php diff --git a/lib/Magento/Framework/Service/Data/AbstractObjectBuilder.php b/lib/internal/Magento/Framework/Service/Data/AbstractObjectBuilder.php similarity index 100% rename from lib/Magento/Framework/Service/Data/AbstractObjectBuilder.php rename to lib/internal/Magento/Framework/Service/Data/AbstractObjectBuilder.php diff --git a/lib/Magento/Framework/Service/Data/Eav/AbstractObject.php b/lib/internal/Magento/Framework/Service/Data/Eav/AbstractObject.php similarity index 100% rename from lib/Magento/Framework/Service/Data/Eav/AbstractObject.php rename to lib/internal/Magento/Framework/Service/Data/Eav/AbstractObject.php diff --git a/lib/Magento/Framework/Service/Data/Eav/AbstractObjectBuilder.php b/lib/internal/Magento/Framework/Service/Data/Eav/AbstractObjectBuilder.php similarity index 100% rename from lib/Magento/Framework/Service/Data/Eav/AbstractObjectBuilder.php rename to lib/internal/Magento/Framework/Service/Data/Eav/AbstractObjectBuilder.php diff --git a/lib/Magento/Framework/Service/Data/Eav/AttributeValue.php b/lib/internal/Magento/Framework/Service/Data/Eav/AttributeValue.php similarity index 100% rename from lib/Magento/Framework/Service/Data/Eav/AttributeValue.php rename to lib/internal/Magento/Framework/Service/Data/Eav/AttributeValue.php diff --git a/lib/Magento/Framework/Service/Data/Eav/AttributeValueBuilder.php b/lib/internal/Magento/Framework/Service/Data/Eav/AttributeValueBuilder.php similarity index 100% rename from lib/Magento/Framework/Service/Data/Eav/AttributeValueBuilder.php rename to lib/internal/Magento/Framework/Service/Data/Eav/AttributeValueBuilder.php diff --git a/lib/Magento/Framework/Service/DataObjectConverter.php b/lib/internal/Magento/Framework/Service/DataObjectConverter.php similarity index 100% rename from lib/Magento/Framework/Service/DataObjectConverter.php rename to lib/internal/Magento/Framework/Service/DataObjectConverter.php diff --git a/lib/Magento/Framework/Service/EavDataObjectConverter.php b/lib/internal/Magento/Framework/Service/EavDataObjectConverter.php similarity index 100% rename from lib/Magento/Framework/Service/EavDataObjectConverter.php rename to lib/internal/Magento/Framework/Service/EavDataObjectConverter.php diff --git a/lib/Magento/Framework/Service/V1/Data/Filter.php b/lib/internal/Magento/Framework/Service/V1/Data/Filter.php similarity index 100% rename from lib/Magento/Framework/Service/V1/Data/Filter.php rename to lib/internal/Magento/Framework/Service/V1/Data/Filter.php diff --git a/lib/Magento/Framework/Service/V1/Data/FilterBuilder.php b/lib/internal/Magento/Framework/Service/V1/Data/FilterBuilder.php similarity index 100% rename from lib/Magento/Framework/Service/V1/Data/FilterBuilder.php rename to lib/internal/Magento/Framework/Service/V1/Data/FilterBuilder.php diff --git a/lib/Magento/Framework/Service/V1/Data/Search/FilterGroup.php b/lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroup.php similarity index 100% rename from lib/Magento/Framework/Service/V1/Data/Search/FilterGroup.php rename to lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroup.php diff --git a/lib/Magento/Framework/Service/V1/Data/Search/FilterGroupBuilder.php b/lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroupBuilder.php similarity index 100% rename from lib/Magento/Framework/Service/V1/Data/Search/FilterGroupBuilder.php rename to lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroupBuilder.php diff --git a/lib/Magento/Framework/Service/V1/Data/SearchCriteria.php b/lib/internal/Magento/Framework/Service/V1/Data/SearchCriteria.php similarity index 100% rename from lib/Magento/Framework/Service/V1/Data/SearchCriteria.php rename to lib/internal/Magento/Framework/Service/V1/Data/SearchCriteria.php diff --git a/lib/Magento/Framework/Service/V1/Data/SearchCriteriaBuilder.php b/lib/internal/Magento/Framework/Service/V1/Data/SearchCriteriaBuilder.php similarity index 100% rename from lib/Magento/Framework/Service/V1/Data/SearchCriteriaBuilder.php rename to lib/internal/Magento/Framework/Service/V1/Data/SearchCriteriaBuilder.php diff --git a/lib/Magento/Framework/Session/Config.php b/lib/internal/Magento/Framework/Session/Config.php similarity index 100% rename from lib/Magento/Framework/Session/Config.php rename to lib/internal/Magento/Framework/Session/Config.php diff --git a/lib/Magento/Framework/Session/Config/ConfigInterface.php b/lib/internal/Magento/Framework/Session/Config/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Session/Config/ConfigInterface.php rename to lib/internal/Magento/Framework/Session/Config/ConfigInterface.php diff --git a/lib/Magento/Framework/Session/Exception.php b/lib/internal/Magento/Framework/Session/Exception.php similarity index 100% rename from lib/Magento/Framework/Session/Exception.php rename to lib/internal/Magento/Framework/Session/Exception.php diff --git a/lib/Magento/Framework/Session/Generic.php b/lib/internal/Magento/Framework/Session/Generic.php similarity index 100% rename from lib/Magento/Framework/Session/Generic.php rename to lib/internal/Magento/Framework/Session/Generic.php diff --git a/lib/Magento/Framework/Session/SaveHandler.php b/lib/internal/Magento/Framework/Session/SaveHandler.php similarity index 100% rename from lib/Magento/Framework/Session/SaveHandler.php rename to lib/internal/Magento/Framework/Session/SaveHandler.php diff --git a/lib/Magento/Framework/Session/SaveHandler/DbTable.php b/lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php similarity index 100% rename from lib/Magento/Framework/Session/SaveHandler/DbTable.php rename to lib/internal/Magento/Framework/Session/SaveHandler/DbTable.php diff --git a/lib/Magento/Framework/Session/SaveHandler/Native.php b/lib/internal/Magento/Framework/Session/SaveHandler/Native.php similarity index 100% rename from lib/Magento/Framework/Session/SaveHandler/Native.php rename to lib/internal/Magento/Framework/Session/SaveHandler/Native.php diff --git a/lib/Magento/Framework/Session/SaveHandlerException.php b/lib/internal/Magento/Framework/Session/SaveHandlerException.php similarity index 100% rename from lib/Magento/Framework/Session/SaveHandlerException.php rename to lib/internal/Magento/Framework/Session/SaveHandlerException.php diff --git a/lib/Magento/Framework/Session/SaveHandlerFactory.php b/lib/internal/Magento/Framework/Session/SaveHandlerFactory.php similarity index 100% rename from lib/Magento/Framework/Session/SaveHandlerFactory.php rename to lib/internal/Magento/Framework/Session/SaveHandlerFactory.php diff --git a/lib/Magento/Framework/Session/SaveHandlerInterface.php b/lib/internal/Magento/Framework/Session/SaveHandlerInterface.php similarity index 100% rename from lib/Magento/Framework/Session/SaveHandlerInterface.php rename to lib/internal/Magento/Framework/Session/SaveHandlerInterface.php diff --git a/lib/Magento/Framework/Session/SessionConsole.php b/lib/internal/Magento/Framework/Session/SessionConsole.php similarity index 100% rename from lib/Magento/Framework/Session/SessionConsole.php rename to lib/internal/Magento/Framework/Session/SessionConsole.php diff --git a/lib/Magento/Framework/Session/SessionManager.php b/lib/internal/Magento/Framework/Session/SessionManager.php similarity index 100% rename from lib/Magento/Framework/Session/SessionManager.php rename to lib/internal/Magento/Framework/Session/SessionManager.php diff --git a/lib/Magento/Framework/Session/SessionManagerInterface.php b/lib/internal/Magento/Framework/Session/SessionManagerInterface.php similarity index 100% rename from lib/Magento/Framework/Session/SessionManagerInterface.php rename to lib/internal/Magento/Framework/Session/SessionManagerInterface.php diff --git a/lib/Magento/Framework/Session/SidResolver.php b/lib/internal/Magento/Framework/Session/SidResolver.php similarity index 100% rename from lib/Magento/Framework/Session/SidResolver.php rename to lib/internal/Magento/Framework/Session/SidResolver.php diff --git a/lib/Magento/Framework/Session/SidResolverInterface.php b/lib/internal/Magento/Framework/Session/SidResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Session/SidResolverInterface.php rename to lib/internal/Magento/Framework/Session/SidResolverInterface.php diff --git a/lib/Magento/Framework/Session/Storage.php b/lib/internal/Magento/Framework/Session/Storage.php similarity index 100% rename from lib/Magento/Framework/Session/Storage.php rename to lib/internal/Magento/Framework/Session/Storage.php diff --git a/lib/Magento/Framework/Session/StorageInterface.php b/lib/internal/Magento/Framework/Session/StorageInterface.php similarity index 100% rename from lib/Magento/Framework/Session/StorageInterface.php rename to lib/internal/Magento/Framework/Session/StorageInterface.php diff --git a/lib/Magento/Framework/Session/Validator.php b/lib/internal/Magento/Framework/Session/Validator.php similarity index 100% rename from lib/Magento/Framework/Session/Validator.php rename to lib/internal/Magento/Framework/Session/Validator.php diff --git a/lib/Magento/Framework/Session/ValidatorInterface.php b/lib/internal/Magento/Framework/Session/ValidatorInterface.php similarity index 100% rename from lib/Magento/Framework/Session/ValidatorInterface.php rename to lib/internal/Magento/Framework/Session/ValidatorInterface.php diff --git a/lib/Magento/Framework/Shell.php b/lib/internal/Magento/Framework/Shell.php similarity index 100% rename from lib/Magento/Framework/Shell.php rename to lib/internal/Magento/Framework/Shell.php diff --git a/lib/Magento/Framework/Shell/CommandRenderer.php b/lib/internal/Magento/Framework/Shell/CommandRenderer.php similarity index 100% rename from lib/Magento/Framework/Shell/CommandRenderer.php rename to lib/internal/Magento/Framework/Shell/CommandRenderer.php diff --git a/lib/Magento/Framework/Shell/CommandRendererBackground.php b/lib/internal/Magento/Framework/Shell/CommandRendererBackground.php similarity index 100% rename from lib/Magento/Framework/Shell/CommandRendererBackground.php rename to lib/internal/Magento/Framework/Shell/CommandRendererBackground.php diff --git a/lib/Magento/Framework/Shell/CommandRendererInterface.php b/lib/internal/Magento/Framework/Shell/CommandRendererInterface.php similarity index 100% rename from lib/Magento/Framework/Shell/CommandRendererInterface.php rename to lib/internal/Magento/Framework/Shell/CommandRendererInterface.php diff --git a/lib/Magento/Framework/ShellInterface.php b/lib/internal/Magento/Framework/ShellInterface.php similarity index 100% rename from lib/Magento/Framework/ShellInterface.php rename to lib/internal/Magento/Framework/ShellInterface.php diff --git a/lib/Magento/Framework/Simplexml/Config.php b/lib/internal/Magento/Framework/Simplexml/Config.php similarity index 100% rename from lib/Magento/Framework/Simplexml/Config.php rename to lib/internal/Magento/Framework/Simplexml/Config.php diff --git a/lib/Magento/Framework/Simplexml/Config/Cache/AbstractCache.php b/lib/internal/Magento/Framework/Simplexml/Config/Cache/AbstractCache.php similarity index 100% rename from lib/Magento/Framework/Simplexml/Config/Cache/AbstractCache.php rename to lib/internal/Magento/Framework/Simplexml/Config/Cache/AbstractCache.php diff --git a/lib/Magento/Framework/Simplexml/Config/Cache/File.php b/lib/internal/Magento/Framework/Simplexml/Config/Cache/File.php similarity index 100% rename from lib/Magento/Framework/Simplexml/Config/Cache/File.php rename to lib/internal/Magento/Framework/Simplexml/Config/Cache/File.php diff --git a/lib/Magento/Framework/Simplexml/Element.php b/lib/internal/Magento/Framework/Simplexml/Element.php similarity index 100% rename from lib/Magento/Framework/Simplexml/Element.php rename to lib/internal/Magento/Framework/Simplexml/Element.php diff --git a/lib/Magento/Framework/Stdlib/ArrayUtils.php b/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php similarity index 100% rename from lib/Magento/Framework/Stdlib/ArrayUtils.php rename to lib/internal/Magento/Framework/Stdlib/ArrayUtils.php diff --git a/lib/Magento/Framework/Stdlib/BooleanUtils.php b/lib/internal/Magento/Framework/Stdlib/BooleanUtils.php similarity index 100% rename from lib/Magento/Framework/Stdlib/BooleanUtils.php rename to lib/internal/Magento/Framework/Stdlib/BooleanUtils.php diff --git a/lib/Magento/Framework/Stdlib/Cookie.php b/lib/internal/Magento/Framework/Stdlib/Cookie.php similarity index 100% rename from lib/Magento/Framework/Stdlib/Cookie.php rename to lib/internal/Magento/Framework/Stdlib/Cookie.php diff --git a/lib/Magento/Framework/Stdlib/DateTime.php b/lib/internal/Magento/Framework/Stdlib/DateTime.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime.php rename to lib/internal/Magento/Framework/Stdlib/DateTime.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/Date.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Date.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/Date.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/Date.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/DateFactory.php b/lib/internal/Magento/Framework/Stdlib/DateTime/DateFactory.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/DateFactory.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/DateFactory.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/DateInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/DateInterface.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/DateInterface.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/DateTime.php b/lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/DateTime.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/Filter/Date.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/Date.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/Filter/Date.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/Filter/Date.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/Timezone.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/Timezone.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/Timezone/ValidationException.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/ValidationException.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/Timezone/ValidationException.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/ValidationException.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php diff --git a/lib/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php similarity index 100% rename from lib/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php rename to lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php diff --git a/lib/Magento/Framework/Stdlib/String.php b/lib/internal/Magento/Framework/Stdlib/String.php similarity index 100% rename from lib/Magento/Framework/Stdlib/String.php rename to lib/internal/Magento/Framework/Stdlib/String.php diff --git a/lib/Magento/Framework/System/Args.php b/lib/internal/Magento/Framework/System/Args.php similarity index 100% rename from lib/Magento/Framework/System/Args.php rename to lib/internal/Magento/Framework/System/Args.php diff --git a/lib/Magento/Framework/System/Dirs.php b/lib/internal/Magento/Framework/System/Dirs.php similarity index 100% rename from lib/Magento/Framework/System/Dirs.php rename to lib/internal/Magento/Framework/System/Dirs.php diff --git a/lib/Magento/Framework/System/Ftp.php b/lib/internal/Magento/Framework/System/Ftp.php similarity index 100% rename from lib/Magento/Framework/System/Ftp.php rename to lib/internal/Magento/Framework/System/Ftp.php diff --git a/lib/Magento/Framework/Translate.php b/lib/internal/Magento/Framework/Translate.php similarity index 97% rename from lib/Magento/Framework/Translate.php rename to lib/internal/Magento/Framework/Translate.php index 2a065dc394619da36e91f8243d802895e8295094..95cf2370ae50c00b0b9eecc122a683f0c5421ced 100644 --- a/lib/Magento/Framework/Translate.php +++ b/lib/internal/Magento/Framework/Translate.php @@ -313,14 +313,14 @@ class Translate implements \Magento\Framework\TranslateInterface /** * Checking previous value */ - $scopeKey = $this->_dataScope[$key] . \Magento\Framework\View\Service::SCOPE_SEPARATOR . $key; + $scopeKey = $this->_dataScope[$key] . '::' . $key; if (!isset($this->_data[$scopeKey])) { if (isset($this->_data[$key])) { $this->_data[$scopeKey] = $this->_data[$key]; unset($this->_data[$key]); } } - $scopeKey = $scope . \Magento\Framework\View\Service::SCOPE_SEPARATOR . $key; + $scopeKey = $scope . '::' . $key; $this->_data[$scopeKey] = $value; } else { $this->_data[$key] = $value; @@ -345,7 +345,9 @@ class Translate implements \Magento\Framework\TranslateInterface $requiredLocaleList = $this->_composeRequiredLocaleList($this->getLocale()); foreach ($requiredLocaleList as $locale) { $file = $this->_getThemeTranslationFile($locale); - $this->_addData($this->_getFileData($file), 'theme' . $this->_config['theme'], $forceReload); + if ($file) { + $this->_addData($this->_getFileData($file), 'theme' . $this->_config['theme'], $forceReload); + } } return $this; } @@ -388,7 +390,7 @@ class Translate implements \Magento\Framework\TranslateInterface */ protected function _getThemeTranslationFile($locale) { - return $this->_viewFileSystem->getFilename( + return $this->_viewFileSystem->getLocaleFileName( \Magento\Framework\App\Filesystem::LOCALE_DIR . '/' . $locale . '.csv', ['area' => $this->getConfig('area')] ); diff --git a/lib/Magento/Framework/Translate/AbstractAdapter.php b/lib/internal/Magento/Framework/Translate/AbstractAdapter.php similarity index 100% rename from lib/Magento/Framework/Translate/AbstractAdapter.php rename to lib/internal/Magento/Framework/Translate/AbstractAdapter.php diff --git a/lib/Magento/Framework/Translate/Adapter.php b/lib/internal/Magento/Framework/Translate/Adapter.php similarity index 100% rename from lib/Magento/Framework/Translate/Adapter.php rename to lib/internal/Magento/Framework/Translate/Adapter.php diff --git a/lib/Magento/Framework/Translate/AdapterInterface.php b/lib/internal/Magento/Framework/Translate/AdapterInterface.php similarity index 100% rename from lib/Magento/Framework/Translate/AdapterInterface.php rename to lib/internal/Magento/Framework/Translate/AdapterInterface.php diff --git a/lib/Magento/Framework/Translate/Inline.php b/lib/internal/Magento/Framework/Translate/Inline.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline.php rename to lib/internal/Magento/Framework/Translate/Inline.php diff --git a/lib/Magento/Framework/Translate/Inline/ConfigInterface.php b/lib/internal/Magento/Framework/Translate/Inline/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/ConfigInterface.php rename to lib/internal/Magento/Framework/Translate/Inline/ConfigInterface.php diff --git a/lib/Magento/Framework/Translate/Inline/ParserFactory.php b/lib/internal/Magento/Framework/Translate/Inline/ParserFactory.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/ParserFactory.php rename to lib/internal/Magento/Framework/Translate/Inline/ParserFactory.php diff --git a/lib/Magento/Framework/Translate/Inline/ParserInterface.php b/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/ParserInterface.php rename to lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php diff --git a/lib/Magento/Framework/Translate/Inline/Provider.php b/lib/internal/Magento/Framework/Translate/Inline/Provider.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/Provider.php rename to lib/internal/Magento/Framework/Translate/Inline/Provider.php diff --git a/lib/Magento/Framework/Translate/Inline/ProviderInterface.php b/lib/internal/Magento/Framework/Translate/Inline/ProviderInterface.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/ProviderInterface.php rename to lib/internal/Magento/Framework/Translate/Inline/ProviderInterface.php diff --git a/lib/Magento/Framework/Translate/Inline/Proxy.php b/lib/internal/Magento/Framework/Translate/Inline/Proxy.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/Proxy.php rename to lib/internal/Magento/Framework/Translate/Inline/Proxy.php diff --git a/lib/Magento/Framework/Translate/Inline/State.php b/lib/internal/Magento/Framework/Translate/Inline/State.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/State.php rename to lib/internal/Magento/Framework/Translate/Inline/State.php diff --git a/lib/Magento/Framework/Translate/Inline/StateInterface.php b/lib/internal/Magento/Framework/Translate/Inline/StateInterface.php similarity index 100% rename from lib/Magento/Framework/Translate/Inline/StateInterface.php rename to lib/internal/Magento/Framework/Translate/Inline/StateInterface.php diff --git a/lib/Magento/Framework/Translate/InlineInterface.php b/lib/internal/Magento/Framework/Translate/InlineInterface.php similarity index 100% rename from lib/Magento/Framework/Translate/InlineInterface.php rename to lib/internal/Magento/Framework/Translate/InlineInterface.php diff --git a/lib/Magento/Framework/Translate/Locale/Resolver/Plugin.php b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php similarity index 100% rename from lib/Magento/Framework/Translate/Locale/Resolver/Plugin.php rename to lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php diff --git a/lib/Magento/Framework/Translate/ResourceInterface.php b/lib/internal/Magento/Framework/Translate/ResourceInterface.php similarity index 100% rename from lib/Magento/Framework/Translate/ResourceInterface.php rename to lib/internal/Magento/Framework/Translate/ResourceInterface.php diff --git a/lib/Magento/Framework/TranslateInterface.php b/lib/internal/Magento/Framework/TranslateInterface.php similarity index 100% rename from lib/Magento/Framework/TranslateInterface.php rename to lib/internal/Magento/Framework/TranslateInterface.php diff --git a/lib/Magento/Framework/Url.php b/lib/internal/Magento/Framework/Url.php similarity index 96% rename from lib/Magento/Framework/Url.php rename to lib/internal/Magento/Framework/Url.php index f5c86450bbb1a514a412b0ac8dcbf897752211f5..6d6e9a5f6c0a8dcccae434f8973dc7c366ac69db 100644 --- a/lib/Magento/Framework/Url.php +++ b/lib/internal/Magento/Framework/Url.php @@ -22,6 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework; + /** * URL * @@ -69,11 +71,7 @@ * - F: host_url * - G: route_path * - H: route_url - * - * @author Magento Core Team <core@magentocommerce.com> */ -namespace Magento\Framework; - class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInterface { /** @@ -242,7 +240,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt */ public function setUseSession($useSession) { - $this->_useSession = (bool)$useSession; + $this->_useSession = (bool) $useSession; return $this; } @@ -351,7 +349,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt protected function _isSecure() { if ($this->_routeParamsResolver->hasData('secure_is_forced')) { - return (bool)$this->_routeParamsResolver->getData('secure'); + return (bool) $this->_routeParamsResolver->getData('secure'); } if (!$this->_getScope()->isUrlSecure()) { @@ -359,7 +357,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt } if (!$this->_routeParamsResolver->hasData('secure')) { - if ($this->_getType() == \Magento\Framework\UrlInterface::URL_TYPE_LINK) { + if ($this->_getType() == UrlInterface::URL_TYPE_LINK) { $pathSecure = $this->_urlSecurityInfo->isSecure('/' . $this->_getActionPath()); $this->_routeParamsResolver->setData('secure', $pathSecure); } else { @@ -418,12 +416,12 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt /** * Add availability support urls without scope code */ - if ($this->_getType() == \Magento\Framework\UrlInterface::URL_TYPE_LINK + if ($this->_getType() == UrlInterface::URL_TYPE_LINK && $this->_getRequest()->isDirectAccessFrontendName( $this->_getRouteFrontName() ) ) { - $this->_routeParamsResolver->setType(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK); + $this->_routeParamsResolver->setType(UrlInterface::URL_TYPE_DIRECT_LINK); } $result = $this->_getScope()->getBaseUrl($this->_getType(), $this->_isSecure()); @@ -494,7 +492,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt return ''; } - $hasParams = (bool)$this->_getRouteParams(); + $hasParams = (bool) $this->_getRouteParams(); $path = $this->_getRouteFrontName() . '/'; if ($this->_getControllerName()) { @@ -550,15 +548,10 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt if ($this->_getData('route_name') == $data) { return $this; } - $this->unsetData( - 'route_front_name' - )->unsetData( - 'route_path' - )->unsetData( - 'controller_name' - )->unsetData( - 'action_name' - ); + $this->unsetData('route_front_name') + ->unsetData('route_path') + ->unsetData('controller_name') + ->unsetData('action_name'); $this->_queryParamsResolver->unsetData('secure'); return $this->setData('route_name', $data); } @@ -976,10 +969,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt $key = 'use_session_id_for_url_' . (int)$secure; if (is_null($this->getData($key))) { $httpHost = $this->_request->getHttpHost(); - $urlHost = parse_url( - $this->_getScope()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LINK, $secure), - PHP_URL_HOST - ); + $urlHost = parse_url($this->_getScope()->getBaseUrl(UrlInterface::URL_TYPE_LINK, $secure), PHP_URL_HOST); if ($httpHost != $urlHost) { $this->setData($key, true); @@ -1001,7 +991,7 @@ class Url extends \Magento\Framework\Object implements \Magento\Framework\UrlInt $referer = parse_url($this->_request->getServer('HTTP_REFERER'), PHP_URL_HOST); foreach ($this->_scopeResolver->getScopes() as $scope) { $scopeDomains[] = parse_url($scope->getBaseUrl(), PHP_URL_HOST); - $scopeDomains[] = parse_url($scope->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LINK, true), PHP_URL_HOST); + $scopeDomains[] = parse_url($scope->getBaseUrl(UrlInterface::URL_TYPE_LINK, true), PHP_URL_HOST); } $scopeDomains = array_unique($scopeDomains); if (empty($referer) || in_array($referer, $scopeDomains)) { diff --git a/lib/Magento/Framework/Url/QueryParamsResolver.php b/lib/internal/Magento/Framework/Url/QueryParamsResolver.php similarity index 100% rename from lib/Magento/Framework/Url/QueryParamsResolver.php rename to lib/internal/Magento/Framework/Url/QueryParamsResolver.php diff --git a/lib/Magento/Framework/Url/QueryParamsResolverInterface.php b/lib/internal/Magento/Framework/Url/QueryParamsResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Url/QueryParamsResolverInterface.php rename to lib/internal/Magento/Framework/Url/QueryParamsResolverInterface.php diff --git a/lib/Magento/Framework/Url/RouteParamsResolverFactory.php b/lib/internal/Magento/Framework/Url/RouteParamsResolverFactory.php similarity index 100% rename from lib/Magento/Framework/Url/RouteParamsResolverFactory.php rename to lib/internal/Magento/Framework/Url/RouteParamsResolverFactory.php diff --git a/lib/Magento/Framework/Url/RouteParamsResolverInterface.php b/lib/internal/Magento/Framework/Url/RouteParamsResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Url/RouteParamsResolverInterface.php rename to lib/internal/Magento/Framework/Url/RouteParamsResolverInterface.php diff --git a/lib/Magento/Framework/Url/ScopeInterface.php b/lib/internal/Magento/Framework/Url/ScopeInterface.php similarity index 100% rename from lib/Magento/Framework/Url/ScopeInterface.php rename to lib/internal/Magento/Framework/Url/ScopeInterface.php diff --git a/lib/Magento/Framework/Url/ScopeResolverInterface.php b/lib/internal/Magento/Framework/Url/ScopeResolverInterface.php similarity index 100% rename from lib/Magento/Framework/Url/ScopeResolverInterface.php rename to lib/internal/Magento/Framework/Url/ScopeResolverInterface.php diff --git a/lib/Magento/Framework/Url/SecurityInfoInterface.php b/lib/internal/Magento/Framework/Url/SecurityInfoInterface.php similarity index 100% rename from lib/Magento/Framework/Url/SecurityInfoInterface.php rename to lib/internal/Magento/Framework/Url/SecurityInfoInterface.php diff --git a/lib/Magento/Framework/Url/Validator.php b/lib/internal/Magento/Framework/Url/Validator.php similarity index 100% rename from lib/Magento/Framework/Url/Validator.php rename to lib/internal/Magento/Framework/Url/Validator.php diff --git a/lib/Magento/Framework/UrlFactory.php b/lib/internal/Magento/Framework/UrlFactory.php similarity index 100% rename from lib/Magento/Framework/UrlFactory.php rename to lib/internal/Magento/Framework/UrlFactory.php diff --git a/lib/Magento/Framework/UrlInterface.php b/lib/internal/Magento/Framework/UrlInterface.php similarity index 98% rename from lib/Magento/Framework/UrlInterface.php rename to lib/internal/Magento/Framework/UrlInterface.php index 4aa69d66328c08749981f016f6f3bab4cc2b5740..2d87c726a9ec710d0d0df7b286af9021448d715f 100644 --- a/lib/Magento/Framework/UrlInterface.php +++ b/lib/internal/Magento/Framework/UrlInterface.php @@ -25,24 +25,16 @@ namespace Magento\Framework; interface UrlInterface { - /** + /**#@+ * Possible URL types */ const URL_TYPE_LINK = 'link'; - const URL_TYPE_DIRECT_LINK = 'direct_link'; - const URL_TYPE_WEB = 'web'; - - const URL_TYPE_LIB = 'lib'; - const URL_TYPE_MEDIA = 'media'; - const URL_TYPE_STATIC = 'static'; - - const URL_TYPE_CACHE = 'cache'; - const URL_TYPE_JS = 'js'; + /**#@-*/ /** * Default url type diff --git a/lib/Magento/Framework/Util.php b/lib/internal/Magento/Framework/Util.php similarity index 100% rename from lib/Magento/Framework/Util.php rename to lib/internal/Magento/Framework/Util.php diff --git a/lib/Magento/Framework/Validator.php b/lib/internal/Magento/Framework/Validator.php similarity index 100% rename from lib/Magento/Framework/Validator.php rename to lib/internal/Magento/Framework/Validator.php diff --git a/lib/Magento/Framework/Validator/AbstractValidator.php b/lib/internal/Magento/Framework/Validator/AbstractValidator.php similarity index 100% rename from lib/Magento/Framework/Validator/AbstractValidator.php rename to lib/internal/Magento/Framework/Validator/AbstractValidator.php diff --git a/lib/Magento/Framework/Validator/Alnum.php b/lib/internal/Magento/Framework/Validator/Alnum.php similarity index 100% rename from lib/Magento/Framework/Validator/Alnum.php rename to lib/internal/Magento/Framework/Validator/Alnum.php diff --git a/lib/Magento/Framework/Validator/Builder.php b/lib/internal/Magento/Framework/Validator/Builder.php similarity index 100% rename from lib/Magento/Framework/Validator/Builder.php rename to lib/internal/Magento/Framework/Validator/Builder.php diff --git a/lib/Magento/Framework/Validator/Config.php b/lib/internal/Magento/Framework/Validator/Config.php similarity index 100% rename from lib/Magento/Framework/Validator/Config.php rename to lib/internal/Magento/Framework/Validator/Config.php diff --git a/lib/Magento/Framework/Validator/Constraint.php b/lib/internal/Magento/Framework/Validator/Constraint.php similarity index 100% rename from lib/Magento/Framework/Validator/Constraint.php rename to lib/internal/Magento/Framework/Validator/Constraint.php diff --git a/lib/Magento/Framework/Validator/Constraint/Option.php b/lib/internal/Magento/Framework/Validator/Constraint/Option.php similarity index 100% rename from lib/Magento/Framework/Validator/Constraint/Option.php rename to lib/internal/Magento/Framework/Validator/Constraint/Option.php diff --git a/lib/Magento/Framework/Validator/Constraint/Option/Callback.php b/lib/internal/Magento/Framework/Validator/Constraint/Option/Callback.php similarity index 100% rename from lib/Magento/Framework/Validator/Constraint/Option/Callback.php rename to lib/internal/Magento/Framework/Validator/Constraint/Option/Callback.php diff --git a/lib/Magento/Framework/Validator/Constraint/OptionInterface.php b/lib/internal/Magento/Framework/Validator/Constraint/OptionInterface.php similarity index 100% rename from lib/Magento/Framework/Validator/Constraint/OptionInterface.php rename to lib/internal/Magento/Framework/Validator/Constraint/OptionInterface.php diff --git a/lib/Magento/Framework/Validator/Constraint/Property.php b/lib/internal/Magento/Framework/Validator/Constraint/Property.php similarity index 100% rename from lib/Magento/Framework/Validator/Constraint/Property.php rename to lib/internal/Magento/Framework/Validator/Constraint/Property.php diff --git a/lib/Magento/Framework/Validator/ConstraintFactory.php b/lib/internal/Magento/Framework/Validator/ConstraintFactory.php similarity index 100% rename from lib/Magento/Framework/Validator/ConstraintFactory.php rename to lib/internal/Magento/Framework/Validator/ConstraintFactory.php diff --git a/lib/Magento/Framework/Validator/EmailAddress.php b/lib/internal/Magento/Framework/Validator/EmailAddress.php similarity index 100% rename from lib/Magento/Framework/Validator/EmailAddress.php rename to lib/internal/Magento/Framework/Validator/EmailAddress.php diff --git a/lib/Magento/Framework/Validator/Entity/Properties.php b/lib/internal/Magento/Framework/Validator/Entity/Properties.php similarity index 100% rename from lib/Magento/Framework/Validator/Entity/Properties.php rename to lib/internal/Magento/Framework/Validator/Entity/Properties.php diff --git a/lib/Magento/Framework/Validator/File/Extension.php b/lib/internal/Magento/Framework/Validator/File/Extension.php similarity index 100% rename from lib/Magento/Framework/Validator/File/Extension.php rename to lib/internal/Magento/Framework/Validator/File/Extension.php diff --git a/lib/Magento/Framework/Validator/File/ImageSize.php b/lib/internal/Magento/Framework/Validator/File/ImageSize.php similarity index 100% rename from lib/Magento/Framework/Validator/File/ImageSize.php rename to lib/internal/Magento/Framework/Validator/File/ImageSize.php diff --git a/lib/Magento/Framework/Validator/File/IsImage.php b/lib/internal/Magento/Framework/Validator/File/IsImage.php similarity index 100% rename from lib/Magento/Framework/Validator/File/IsImage.php rename to lib/internal/Magento/Framework/Validator/File/IsImage.php diff --git a/lib/Magento/Framework/Validator/File/Size.php b/lib/internal/Magento/Framework/Validator/File/Size.php similarity index 100% rename from lib/Magento/Framework/Validator/File/Size.php rename to lib/internal/Magento/Framework/Validator/File/Size.php diff --git a/lib/Magento/Framework/Validator/Float.php b/lib/internal/Magento/Framework/Validator/Float.php similarity index 100% rename from lib/Magento/Framework/Validator/Float.php rename to lib/internal/Magento/Framework/Validator/Float.php diff --git a/lib/Magento/Framework/Validator/Int.php b/lib/internal/Magento/Framework/Validator/Int.php similarity index 100% rename from lib/Magento/Framework/Validator/Int.php rename to lib/internal/Magento/Framework/Validator/Int.php diff --git a/lib/Magento/Framework/Validator/Ip.php b/lib/internal/Magento/Framework/Validator/Ip.php similarity index 100% rename from lib/Magento/Framework/Validator/Ip.php rename to lib/internal/Magento/Framework/Validator/Ip.php diff --git a/lib/Magento/Framework/Validator/NotEmpty.php b/lib/internal/Magento/Framework/Validator/NotEmpty.php similarity index 100% rename from lib/Magento/Framework/Validator/NotEmpty.php rename to lib/internal/Magento/Framework/Validator/NotEmpty.php diff --git a/lib/Magento/Framework/Validator/Object.php b/lib/internal/Magento/Framework/Validator/Object.php similarity index 100% rename from lib/Magento/Framework/Validator/Object.php rename to lib/internal/Magento/Framework/Validator/Object.php diff --git a/lib/Magento/Framework/Validator/Regex.php b/lib/internal/Magento/Framework/Validator/Regex.php similarity index 100% rename from lib/Magento/Framework/Validator/Regex.php rename to lib/internal/Magento/Framework/Validator/Regex.php diff --git a/lib/Magento/Framework/Validator/StringLength.php b/lib/internal/Magento/Framework/Validator/StringLength.php similarity index 100% rename from lib/Magento/Framework/Validator/StringLength.php rename to lib/internal/Magento/Framework/Validator/StringLength.php diff --git a/lib/Magento/Framework/Validator/UniversalFactory.php b/lib/internal/Magento/Framework/Validator/UniversalFactory.php similarity index 100% rename from lib/Magento/Framework/Validator/UniversalFactory.php rename to lib/internal/Magento/Framework/Validator/UniversalFactory.php diff --git a/lib/Magento/Framework/Validator/ValidatorException.php b/lib/internal/Magento/Framework/Validator/ValidatorException.php similarity index 100% rename from lib/Magento/Framework/Validator/ValidatorException.php rename to lib/internal/Magento/Framework/Validator/ValidatorException.php diff --git a/lib/Magento/Framework/Validator/ValidatorInterface.php b/lib/internal/Magento/Framework/Validator/ValidatorInterface.php similarity index 100% rename from lib/Magento/Framework/Validator/ValidatorInterface.php rename to lib/internal/Magento/Framework/Validator/ValidatorInterface.php diff --git a/lib/Magento/Framework/Validator/etc/validation.xsd b/lib/internal/Magento/Framework/Validator/etc/validation.xsd similarity index 100% rename from lib/Magento/Framework/Validator/etc/validation.xsd rename to lib/internal/Magento/Framework/Validator/etc/validation.xsd diff --git a/lib/Magento/Framework/ValidatorFactory.php b/lib/internal/Magento/Framework/ValidatorFactory.php similarity index 100% rename from lib/Magento/Framework/ValidatorFactory.php rename to lib/internal/Magento/Framework/ValidatorFactory.php diff --git a/lib/Magento/Framework/View/Asset/AssetInterface.php b/lib/internal/Magento/Framework/View/Asset/AssetInterface.php similarity index 93% rename from lib/Magento/Framework/View/Asset/AssetInterface.php rename to lib/internal/Magento/Framework/View/Asset/AssetInterface.php index 7681c5c133b6f1189abad5acf3b5aa514061a5b2..47f2c86deb4a6fddf6c36f7bf8636e52289832e9 100644 --- a/lib/Magento/Framework/View/Asset/AssetInterface.php +++ b/lib/internal/Magento/Framework/View/Asset/AssetInterface.php @@ -24,7 +24,7 @@ namespace Magento\Framework\View\Asset; /** - * Interface of a resource linked to a page + * An abstraction for static view file (or resource) that may be embedded to a web page */ interface AssetInterface { diff --git a/lib/Magento/Framework/View/Asset/Collection.php b/lib/internal/Magento/Framework/View/Asset/Collection.php similarity index 100% rename from lib/Magento/Framework/View/Asset/Collection.php rename to lib/internal/Magento/Framework/View/Asset/Collection.php diff --git a/lib/Magento/Framework/View/Asset/ConfigInterface.php b/lib/internal/Magento/Framework/View/Asset/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/View/Asset/ConfigInterface.php rename to lib/internal/Magento/Framework/View/Asset/ConfigInterface.php diff --git a/lib/Magento/Framework/View/Asset/LocalInterface.php b/lib/internal/Magento/Framework/View/Asset/ContextInterface.php similarity index 80% rename from lib/Magento/Framework/View/Asset/LocalInterface.php rename to lib/internal/Magento/Framework/View/Asset/ContextInterface.php index b8031d3293fd6b18330fa453173efda12f7b3ade..d9ef2261daeafd2947e43adcf8d5b557706a85d6 100644 --- a/lib/Magento/Framework/View/Asset/LocalInterface.php +++ b/lib/internal/Magento/Framework/View/Asset/ContextInterface.php @@ -21,17 +21,25 @@ * @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) */ + namespace Magento\Framework\View\Asset; /** - * Interface of an asset with locally accessible source file + * An abstraction for getting context path of an asset */ -interface LocalInterface extends AssetInterface +interface ContextInterface { /** - * Retrieve source file + * Get context path of an asset + * + * @return string + */ + public function getPath(); + + /** + * Get base URL * * @return string */ - public function getSourceFile(); + public function getBaseUrl(); } diff --git a/lib/internal/Magento/Framework/View/Asset/File.php b/lib/internal/Magento/Framework/View/Asset/File.php new file mode 100644 index 0000000000000000000000000000000000000000..3bb2d9509bdc6823cf573cdaae87d21b885c6132 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/File.php @@ -0,0 +1,167 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset; + +/** + * A locally available static view file asset that can be referred with a file path + * + * This class is a value object with lazy loading of some of its data (content, physical file path) + */ +class File implements MergeableInterface +{ + /** + * @var string + */ + protected $filePath; + + /** + * @var string + */ + protected $module; + + /** + * @var string + */ + protected $contentType; + + /** + * @var ContextInterface + */ + protected $context; + + /** + * @var Source + */ + protected $source; + + /** + * @var string|bool + */ + private $resolvedFile; + + /** + * @param Source $source + * @param ContextInterface $context + * @param string $filePath + * @param string $module + * @param string $contentType + */ + public function __construct(Source $source, ContextInterface $context, $filePath, $module, $contentType) + { + $this->source = $source; + $this->context = $context; + $this->filePath = $filePath; + $this->module = $module; + $this->contentType = $contentType; + } + + /** + * {@inheritdoc} + */ + public function getUrl() + { + return $this->context->getBaseUrl() . $this->getPath(); + } + + /** + * {@inheritdoc} + */ + public function getContentType() + { + return $this->contentType; + } + + /** + * {@inheritdoc} + */ + public function getPath() + { + $result = ''; + $result = $this->join($result, $this->context->getPath()); + $result = $this->join($result, $this->module); + $result = $this->join($result, $this->filePath); + return $result; + } + + /** + * Subroutine for building path + * + * @param string $path + * @param string $item + * @return string + */ + private function join($path, $item) + { + return trim($path . ($item ? '/' . $item : ''), '/'); + } + + /** + * {@inheritdoc} + * @throws \LogicException if file cannot be resolved + */ + public function getSourceFile() + { + if (null === $this->resolvedFile) { + $this->resolvedFile = $this->source->getFile($this); + if (false === $this->resolvedFile) { + throw new \LogicException("Unable to resolve the source file for '{$this->getPath()}'"); + } + } + return $this->resolvedFile; + } + + /** + * {@inheritdoc} + */ + public function getContent() + { + return (string)$this->source->getContent($this); + } + + /** + * {@inheritdoc} + */ + public function getFilePath() + { + return $this->filePath; + } + + /** + * {@inheritdoc} + * @return File\Context + */ + public function getContext() + { + return $this->context; + } + + /** + * {@inheritdoc} + */ + public function getModule() + { + return $this->module; + } +} diff --git a/lib/Magento/Framework/View/Asset/PublicFile.php b/lib/internal/Magento/Framework/View/Asset/File/Context.php similarity index 56% rename from lib/Magento/Framework/View/Asset/PublicFile.php rename to lib/internal/Magento/Framework/View/Asset/File/Context.php index 9a8af3f163ccaa9ce37da0cc8fc4f32562140572..37179f817a327570746e326a5fa1c3bd1e994dc5 100644 --- a/lib/Magento/Framework/View/Asset/PublicFile.php +++ b/lib/internal/Magento/Framework/View/Asset/File/Context.php @@ -21,68 +21,66 @@ * @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) */ -namespace Magento\Framework\View\Asset; + +namespace Magento\Framework\View\Asset\File; + +use Magento\Framework\View\Asset; /** - * Page asset representing a local file that already has public access + * A basic path context for assets that includes a directory path */ -class PublicFile implements LocalInterface +class Context implements Asset\ContextInterface { /** - * View URL - * - * @var \Magento\Framework\View\Url + * @var string */ - protected $viewUrl; + private $baseUrl; /** - * File - * * @var string */ - protected $file; + private $baseDir; /** - * Content type * @var string */ - protected $contentType; + private $path; /** - * Constructor - * - * @param \Magento\Framework\View\Url $viewUrl - * @param string $file - * @param string $contentType + * @param string $baseUrl + * @param string $baseDirType + * @param string $contextPath */ - public function __construct(\Magento\Framework\View\Url $viewUrl, $file, $contentType) + public function __construct($baseUrl, $baseDirType, $contextPath) { - $this->viewUrl = $viewUrl; - $this->file = $file; - $this->contentType = $contentType; + $this->baseUrl = $baseUrl; + $this->baseDir = $baseDirType; + $this->path = $contextPath; } /** * {@inheritdoc} */ - public function getUrl() + public function getPath() { - return $this->viewUrl->getPublicFileUrl($this->file); + return $this->path; } /** * {@inheritdoc} */ - public function getContentType() + public function getBaseUrl() { - return $this->contentType; + return $this->baseUrl; } /** - * {@inheritdoc} + * Get type of base directory + * + * @return string */ - public function getSourceFile() + public function getBaseDirType() { - return $this->file; + return $this->baseDir; } } diff --git a/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php b/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php new file mode 100644 index 0000000000000000000000000000000000000000..4101639e3e97d40c157459e070c1d9deaa7dfe25 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php @@ -0,0 +1,100 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\File; + +/** + * An advanced context that contains information necessary for view files fallback system + */ +class FallbackContext extends Context +{ + /** + * @var string + */ + private $area; + + /** + * @var string + */ + private $theme; + + /** + * @var string + */ + private $locale; + + /** + * @param string $baseUrl + * @param string $areaType + * @param string $themePath + * @param string $localeCode + */ + public function __construct($baseUrl, $areaType, $themePath, $localeCode) + { + $this->area = $areaType; + $this->theme = $themePath; + $this->locale = $localeCode; + parent::__construct($baseUrl, \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->generatePath()); + } + + /** + * Get area code + * + * @return string + */ + public function getAreaCode() + { + return $this->area; + } + + /** + * Get theme path + * + * @return string + */ + public function getThemePath() + { + return $this->theme; + } + + /** + * Get locale code + * + * @return string + */ + public function getLocaleCode() + { + return $this->locale; + } + + /** + * Generate path based on the context parameters + * + * @return string + */ + private function generatePath() + { + return $this->area . ($this->theme ? '/' . $this->theme : '') . ($this->locale ? '/' . $this->locale : ''); + } +} diff --git a/lib/Magento/Framework/View/Asset/GroupedCollection.php b/lib/internal/Magento/Framework/View/Asset/GroupedCollection.php similarity index 100% rename from lib/Magento/Framework/View/Asset/GroupedCollection.php rename to lib/internal/Magento/Framework/View/Asset/GroupedCollection.php diff --git a/lib/Magento/Framework/View/Publisher/FileInterface.php b/lib/internal/Magento/Framework/View/Asset/LocalInterface.php similarity index 56% rename from lib/Magento/Framework/View/Publisher/FileInterface.php rename to lib/internal/Magento/Framework/View/Asset/LocalInterface.php index 083aef9f7fd716e901902105b87c4d2591597884..3fb653e0f50ea37302399f9442d9cf7fd9efd97a 100644 --- a/lib/Magento/Framework/View/Publisher/FileInterface.php +++ b/lib/internal/Magento/Framework/View/Asset/LocalInterface.php @@ -21,71 +21,56 @@ * @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) */ -namespace Magento\Framework\View\Publisher; +namespace Magento\Framework\View\Asset; /** - * Publisher file interface + * Interface of an asset with locally accessible source file */ -interface FileInterface +interface LocalInterface extends AssetInterface { - /**#@+ - * Public directories prefix group - */ - const PUBLIC_MODULE_DIR = '_module'; - - const PUBLIC_VIEW_DIR = '_view'; - - const PUBLIC_THEME_DIR = '_theme'; - - /**#@-*/ - /** - * Check is publication allowed for a file + * Get original source file where the asset contents can be read from * - * @return bool - */ - public function isPublicationAllowed(); - - /** - * Build unique file path for publication + * Returns absolute path to file in local file system * * @return string */ - public function buildUniquePath(); + public function getSourceFile(); /** - * Original file extension + * Get content of a local asset * * @return string */ - public function getExtension(); - - /** - * @return bool - */ - public function isSourceFileExists(); + public function getContent(); /** + * Get an invariant relative path to file + * * @return string */ public function getFilePath(); /** - * @return array + * Get context of the asset that contains data necessary to build an absolute path or URL to the file + * + * @return ContextInterface */ - public function getViewParams(); + public function getContext(); /** - * Build path to file located in public folder + * Get the module context of file path * * @return string */ - public function buildPublicViewFilename(); + public function getModule(); /** - * Returns absolute path + * Get a relative "context" path to the asset file + * + * This path includes both invariant and context part that can serve as an identifier of the file in current context * - * @return string|null + * @return string */ - public function getSourcePath(); + public function getPath(); } diff --git a/lib/Magento/Framework/View/Asset/MergeService.php b/lib/internal/Magento/Framework/View/Asset/MergeService.php similarity index 89% rename from lib/Magento/Framework/View/Asset/MergeService.php rename to lib/internal/Magento/Framework/View/Asset/MergeService.php index ea2efcceac394af4630013c5ff0b267bbb4524fc..a74b6c5569809ada12cddef07dee38b95cfbb9bb 100644 --- a/lib/Magento/Framework/View/Asset/MergeService.php +++ b/lib/internal/Magento/Framework/View/Asset/MergeService.php @@ -86,15 +86,15 @@ class MergeService */ public function getMergedAssets(array $assets, $contentType) { - $isCss = $contentType == \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS; - $isJs = $contentType == \Magento\Framework\View\Publisher::CONTENT_TYPE_JS; + $isCss = $contentType == 'css'; + $isJs = $contentType == 'js'; if (!$isCss && !$isJs) { throw new \InvalidArgumentException("Merge for content type '{$contentType}' is not supported."); } $isCssMergeEnabled = $this->config->isMergeCssFiles(); $isJsMergeEnabled = $this->config->isMergeJsFiles(); - if ($isCss && $isCssMergeEnabled || $isJs && $isJsMergeEnabled) { + if (($isCss && $isCssMergeEnabled) || ($isJs && $isJsMergeEnabled)) { if ($this->state->getMode() == \Magento\Framework\App\State::MODE_PRODUCTION) { $mergeStrategyClass = 'Magento\Framework\View\Asset\MergeStrategy\FileExists'; } else { @@ -118,10 +118,7 @@ class MergeService */ public function cleanMergedJsCss() { - $this->filesystem->getDirectoryWrite( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - )->delete( - Merged::PUBLIC_MERGE_DIR - ); + $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR) + ->delete(Merged::getRelativeDir()); } } diff --git a/lib/Magento/Framework/View/Asset/MergeStrategy/Checksum.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php similarity index 59% rename from lib/Magento/Framework/View/Asset/MergeStrategy/Checksum.php rename to lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php index ebaf94ab677526b38e5b67cfdb04452aed97c55a..826eba61e1513e22e23ea74912872e66c23a79c9 100644 --- a/lib/Magento/Framework/View/Asset/MergeStrategy/Checksum.php +++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php @@ -24,28 +24,24 @@ namespace Magento\Framework\View\Asset\MergeStrategy; /** - * Merge strategy representing the following: merged file is being recreated if and only if file does not exist - * or meta-file does not exist or checksums do not match + * Skip merging if all of the files that need to be merged were not modified + * + * Each file will be resolved and its mtime will be checked. + * Then combination of all mtimes will be compared to a special .dat file that contains mtimes from previous merging */ class Checksum implements \Magento\Framework\View\Asset\MergeStrategyInterface { /** - * Strategy - * * @var \Magento\Framework\View\Asset\MergeStrategyInterface */ protected $strategy; /** - * Filesystem - * * @var \Magento\Framework\App\Filesystem */ protected $filesystem; /** - * Constructor - * * @param \Magento\Framework\View\Asset\MergeStrategyInterface $strategy * @param \Magento\Framework\App\Filesystem $filesystem */ @@ -60,27 +56,23 @@ class Checksum implements \Magento\Framework\View\Asset\MergeStrategyInterface /** * {@inheritdoc} */ - public function mergeFiles(array $publicFiles, $destinationFile, $contentType) + public function merge(array $assetsToMerge, \Magento\Framework\View\Asset\LocalInterface $resultAsset) { - $directory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::PUB_DIR); - $mergedMTimeFile = $directory->getRelativePath($destinationFile . '.dat'); - - // Check whether we have already merged these files - $filesMTimeData = ''; - foreach ($publicFiles as $file) { - $filesMTimeData .= $directory->stat($directory->getRelativePath($file))['mtime']; + $sourceDir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); + $mTime = null; + /** @var \Magento\Framework\View\Asset\MergeableInterface $asset */ + foreach ($assetsToMerge as $asset) { + $mTime .= $sourceDir->stat($sourceDir->getRelativePath($asset->getSourceFile()))['mtime']; } - if (!($directory->isExist( - $destinationFile - ) && $directory->isExist( - $mergedMTimeFile - ) && strcmp( - $filesMTimeData, - $directory->readFile($mergedMTimeFile) - ) == 0) - ) { - $this->strategy->mergeFiles($publicFiles, $destinationFile, $contentType); - $directory->writeFile($mergedMTimeFile, $filesMTimeData); + if (null === $mTime) { + return; // nothing to merge + } + + $dat = $resultAsset->getPath() . '.dat'; + $targetDir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + if (!$targetDir->isExist($dat) || strcmp($mTime, $targetDir->readFile($dat)) !== 0) { + $this->strategy->merge($assetsToMerge, $resultAsset); + $targetDir->writeFile($dat, $mTime); } } } diff --git a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php new file mode 100644 index 0000000000000000000000000000000000000000..0b0f7797e3c4767d0dd7db4f8b2bdf2e89a679f4 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php @@ -0,0 +1,140 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\View\Asset\MergeStrategy; + +use Magento\Framework\View\Asset; + +/** + * The actual merging service + */ +class Direct implements \Magento\Framework\View\Asset\MergeStrategyInterface +{ + /**#@+ + * Delimiters for merging files of various content type + */ + const MERGE_DELIMITER_JS = ';'; + + const MERGE_DELIMITER_EMPTY = ''; + + /**#@-*/ + + /** + * @var \Magento\Framework\App\Filesystem + */ + private $filesystem; + + /** + * @var \Magento\Framework\View\Url\CssResolver + */ + private $cssUrlResolver; + + /** + * @param \Magento\Framework\App\Filesystem $filesystem + * @param \Magento\Framework\View\Url\CssResolver $cssUrlResolver + */ + public function __construct( + \Magento\Framework\App\Filesystem $filesystem, + \Magento\Framework\View\Url\CssResolver $cssUrlResolver + ) { + $this->filesystem = $filesystem; + $this->cssUrlResolver = $cssUrlResolver; + } + + /** + * {@inheritdoc} + */ + public function merge(array $assetsToMerge, Asset\LocalInterface $resultAsset) + { + $mergedContent = $this->composeMergedContent($assetsToMerge, $resultAsset); + $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + $dir->writeFile($resultAsset->getPath(), $mergedContent); + } + + /** + * Merge files together and modify content if needed + * + * @param \Magento\Framework\View\Asset\MergeableInterface[] $assetsToMerge + * @param \Magento\Framework\View\Asset\LocalInterface $resultAsset + * @return string + * @throws \Magento\Framework\Exception + */ + private function composeMergedContent(array $assetsToMerge, Asset\LocalInterface $resultAsset) + { + $result = array(); + /** @var Asset\MergeableInterface $asset */ + foreach ($assetsToMerge as $asset) { + $result[] = $this->preProcessBeforeMerging($asset, $resultAsset, $asset->getContent()); + } + $delimiter = $this->_getFilesContentDelimiter($resultAsset->getContentType()); + $result = $this->preProcessMergeResult($resultAsset, ltrim(implode($delimiter, $result))); + return $result; + } + + /** + * Process an asset before merging into resulting asset + * + * @param Asset\LocalInterface $item + * @param Asset\LocalInterface $result + * @param string $content + * @return string + */ + private function preProcessBeforeMerging(Asset\LocalInterface $item, Asset\LocalInterface $result, $content) + { + if ($result->getContentType() == 'css') { + $from = $item->getPath(); + $to = $result->getPath(); + return $this->cssUrlResolver->relocateRelativeUrls($content, $from, $to); + } + return $content; + } + + /** + * Process the resulting asset after merging content is done + * + * @param Asset\LocalInterface $result + * @param string $content + * @return string + */ + private function preProcessMergeResult(Asset\LocalInterface $result, $content) + { + if ($result->getContentType() == 'css') { + $content = $this->cssUrlResolver->aggregateImportDirectives($content); + } + return $content; + } + + /** + * Return delimiter for separation of merged files content + * + * @param string $contentType + * @return string + */ + protected function _getFilesContentDelimiter($contentType) + { + if ($contentType == 'js') { + return self::MERGE_DELIMITER_JS; + } + return self::MERGE_DELIMITER_EMPTY; + } +} diff --git a/lib/Magento/Framework/View/Asset/MergeStrategy/FileExists.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/FileExists.php similarity index 75% rename from lib/Magento/Framework/View/Asset/MergeStrategy/FileExists.php rename to lib/internal/Magento/Framework/View/Asset/MergeStrategy/FileExists.php index 7f5689c369ff4c3016fd13533c64bfebbcd0a91e..7294fa3d7c4e2ecd73acde0b8d5756216c61a56e 100644 --- a/lib/Magento/Framework/View/Asset/MergeStrategy/FileExists.php +++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/FileExists.php @@ -24,27 +24,21 @@ namespace Magento\Framework\View\Asset\MergeStrategy; /** - * Merge strategy representing the following: merged file is being recreated if and only if merged file does not exist + * Skip merging if the merged file already exists */ class FileExists implements \Magento\Framework\View\Asset\MergeStrategyInterface { /** - * Strategy - * * @var \Magento\Framework\View\Asset\MergeStrategyInterface */ protected $strategy; /** - * Filesystem - * * @var \Magento\Framework\App\Filesystem */ protected $filesystem; /** - * Constructor - * * @param \Magento\Framework\View\Asset\MergeStrategyInterface $strategy * @param \Magento\Framework\App\Filesystem $filesystem */ @@ -59,11 +53,11 @@ class FileExists implements \Magento\Framework\View\Asset\MergeStrategyInterface /** * {@inheritdoc} */ - public function mergeFiles(array $publicFiles, $destinationFile, $contentType) + public function merge(array $assetsToMerge, \Magento\Framework\View\Asset\LocalInterface $resultAsset) { - $directory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::PUB_DIR); - if (!$directory->isExist($directory->getRelativePath($destinationFile))) { - $this->strategy->mergeFiles($publicFiles, $destinationFile, $contentType); + $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + if (!$dir->isExist($resultAsset->getPath())) { + $this->strategy->merge($assetsToMerge, $resultAsset); } } } diff --git a/lib/Magento/Framework/View/Asset/MergeStrategyInterface.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategyInterface.php similarity index 73% rename from lib/Magento/Framework/View/Asset/MergeStrategyInterface.php rename to lib/internal/Magento/Framework/View/Asset/MergeStrategyInterface.php index 9a900961c8d0ea5588048b0bb53a5404232207f4..7dffb8d58e5926b03a021b8277757334acd0d430 100644 --- a/lib/Magento/Framework/View/Asset/MergeStrategyInterface.php +++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategyInterface.php @@ -24,17 +24,18 @@ namespace Magento\Framework\View\Asset; /** - * Interface for different file merging strategies + * Interface for merging multiple assets into one */ interface MergeStrategyInterface { /** - * Merge files into one and save to disk + * Merge assets into one * - * @param array $publicFiles List of full file paths to merge - * @param string $destinationFile Full file path for merged file - * @param string $contentType Asset content type + * The $resultAsset may be used to persist result + * + * @param MergeableInterface[] $assetsToMerge + * @param LocalInterface $resultAsset * @return void */ - public function mergeFiles(array $publicFiles, $destinationFile, $contentType); + public function merge(array $assetsToMerge, LocalInterface $resultAsset); } diff --git a/lib/Magento/Framework/View/Asset/MergeableInterface.php b/lib/internal/Magento/Framework/View/Asset/MergeableInterface.php similarity index 100% rename from lib/Magento/Framework/View/Asset/MergeableInterface.php rename to lib/internal/Magento/Framework/View/Asset/MergeableInterface.php diff --git a/lib/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php similarity index 59% rename from lib/Magento/Framework/View/Asset/Merged.php rename to lib/internal/Magento/Framework/View/Asset/Merged.php index 89debe2bc93b7ac0981c222ea31197838625a8a2..fbb70b8687a147db9674f30b3003afab4eb7d7ee 100644 --- a/lib/Magento/Framework/View/Asset/Merged.php +++ b/lib/internal/Magento/Framework/View/Asset/Merged.php @@ -29,77 +29,58 @@ namespace Magento\Framework\View\Asset; class Merged implements \Iterator { /** - * Sub path for merged files relative to public view cache directory - */ - const PUBLIC_MERGE_DIR = '_merged'; - - /** - * ObjectManager - * - * @var \Magento\Framework\ObjectManager - */ - protected $objectManager; - - /** - * Logger - * * @var \Magento\Framework\Logger */ protected $logger; /** - * MergeStrategyInterface - * * @var MergeStrategyInterface */ protected $mergeStrategy; /** - * Assets - * + * @var \Magento\Framework\View\Asset\Repository + */ + private $assetRepo; + + /** * @var MergeableInterface[] */ protected $assets; /** - * Content type - * * @var string */ protected $contentType; /** - * Whether initialization has been performed or not - * * @var bool */ protected $isInitialized = false; /** - * Constructor - * - * @param \Magento\Framework\ObjectManager $objectManager * @param \Magento\Framework\Logger $logger * @param MergeStrategyInterface $mergeStrategy + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param array $assets * @throws \InvalidArgumentException */ public function __construct( - \Magento\Framework\ObjectManager $objectManager, \Magento\Framework\Logger $logger, MergeStrategyInterface $mergeStrategy, + \Magento\Framework\View\Asset\Repository $assetRepo, array $assets ) { - $this->objectManager = $objectManager; $this->logger = $logger; $this->mergeStrategy = $mergeStrategy; + $this->assetRepo = $assetRepo; if (!$assets) { throw new \InvalidArgumentException('At least one asset has to be passed for merging.'); } /** @var $asset MergeableInterface */ foreach ($assets as $asset) { - if (!$asset instanceof MergeableInterface) { + if (!($asset instanceof MergeableInterface)) { throw new \InvalidArgumentException( 'Asset has to implement \Magento\Framework\View\Asset\MergeableInterface.' ); @@ -125,7 +106,9 @@ class Merged implements \Iterator if (!$this->isInitialized) { $this->isInitialized = true; try { - $this->assets = array($this->getMergedAsset($this->assets)); + $mergedAsset = $this->createMergedAsset($this->assets); + $this->mergeStrategy->merge($this->assets, $mergedAsset); + $this->assets = array($mergedAsset); } catch (\Exception $e) { $this->logger->logException($e); } @@ -133,66 +116,21 @@ class Merged implements \Iterator } /** - * Retrieve asset instance representing a merged file - * - * @param MergeableInterface[] $assets - * @return AssetInterface - */ - protected function getMergedAsset(array $assets) - { - $sourceFiles = $this->getPublicFilesToMerge($assets); - $destinationFile = $this->getMergedFilePath($sourceFiles); - - $this->mergeStrategy->mergeFiles($sourceFiles, $destinationFile, $this->contentType); - return $this->objectManager->create( - 'Magento\Framework\View\Asset\PublicFile', - array('file' => $destinationFile, 'contentType' => $this->contentType) - ); - } - - /** - * Go through all the files to merge, ensure that they are public (publish if needed), and compose - * array of public paths to merge + * Create an asset object for merged file * - * @param MergeableInterface[] $assets - * @return array + * @param array $assets + * @return MergeableInterface */ - protected function getPublicFilesToMerge(array $assets) + private function createMergedAsset(array $assets) { - $result = array(); + $paths = array(); + /** @var MergeableInterface $asset */ foreach ($assets as $asset) { - $publicFile = $asset->getSourceFile(); - $result[$publicFile] = $publicFile; + $paths[] = $asset->getPath(); } - return $result; - } - - /** - * Return file name for the resulting merged file - * - * @param array $publicFiles - * @return string - */ - protected function getMergedFilePath(array $publicFiles) - { - /** @var \Magento\Framework\App\Filesystem $filesystem */ - $filesystem = $this->objectManager->get('Magento\Framework\App\Filesystem'); - $jsDir = $filesystem->getPath(\Magento\Framework\App\Filesystem::PUB_LIB_DIR); - $publicDir = $filesystem->getPath(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); - - $prefixRemovals = array($jsDir, $publicDir); - - $relFileNames = array(); - foreach ($publicFiles as $file) { - $relFileNames[] = ltrim(str_replace($prefixRemovals, '', $file), '/'); - } - - $mergedDir = $filesystem->getDirectoryRead( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - )->getAbsolutePath( - self::PUBLIC_MERGE_DIR - ); - return $mergedDir . '/' . md5(implode('|', $relFileNames)) . '.' . $this->contentType; + $paths = array_unique($paths); + $filePath = md5(implode('|', $paths)) . '.' . $this->contentType; + return $this->assetRepo->createArbitrary($filePath, self::getRelativeDir()); } /** @@ -241,4 +179,14 @@ class Merged implements \Iterator $this->initialize(); return (bool)current($this->assets); } + + /** + * Returns directory for storing merged files relative to STATIC_VIEW_DIR + * + * @return string + */ + public static function getRelativeDir() + { + return \Magento\Framework\App\Filesystem\DirectoryList::CACHE_VIEW_REL_DIR . '/merged'; + } } diff --git a/lib/internal/Magento/Framework/View/Asset/Minified.php b/lib/internal/Magento/Framework/View/Asset/Minified.php new file mode 100644 index 0000000000000000000000000000000000000000..d28dd89af1ee9a2de7496cb9df2cf093f7f363a7 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/Minified.php @@ -0,0 +1,355 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\View\Asset; + +/** + * Minified page asset + */ +class Minified implements LocalInterface +{ + /**#@+ + * Strategies for verifying whether the files need to be minified + */ + const FILE_EXISTS = 'file_exists'; + const MTIME = 'mtime'; + /**#@-*/ + + /** + * LocalInterface + * + * @var LocalInterface + */ + protected $originalAsset; + + /** + * @var string + */ + protected $strategy; + + /** + * File + * + * @var string + */ + protected $file; + + /** + * Relative path to the file + * + * @var string + */ + protected $path; + + /** + * @var string + */ + protected $filePath; + + /** + * @var \Magento\Framework\View\Asset\File\Context + */ + protected $context; + + /** + * URL + * + * @var string + */ + protected $url; + + /** + * @var \Magento\Framework\Code\Minifier\AdapterInterface + */ + protected $adapter; + + /** + * Logger + * + * @var \Magento\Framework\Logger + */ + protected $logger; + + /** + * Directory object for root directory + * + * @var \Magento\Framework\Filesystem\Directory\ReadInterface + */ + protected $rootDir; + + /** + * Directory object for static view directory + * + * @var \Magento\Framework\Filesystem\Directory\ReadInterface + */ + protected $staticViewDir; + + /** + * Url configuration + * + * @var \Magento\Framework\UrlInterface + */ + protected $baseUrl; + + /** + * Constructor + * + * @param LocalInterface $asset + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\App\Filesystem $filesystem + * @param \Magento\Framework\UrlInterface $baseUrl + * @param \Magento\Framework\Code\Minifier\AdapterInterface $adapter + * @param string $strategy + */ + public function __construct( + LocalInterface $asset, + \Magento\Framework\Logger $logger, + \Magento\Framework\App\Filesystem $filesystem, + \Magento\Framework\UrlInterface $baseUrl, + \Magento\Framework\Code\Minifier\AdapterInterface $adapter, + $strategy = self::FILE_EXISTS + ) { + $this->originalAsset = $asset; + $this->strategy = $strategy; + $this->logger = $logger; + $this->rootDir = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); + $this->staticViewDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR); + $this->baseUrl = $baseUrl; + $this->adapter = $adapter; + } + + /** + * {@inheritdoc} + */ + public function getUrl() + { + if (empty($this->url)) { + $this->process(); + } + return $this->url; + } + + /** + * {@inheritdoc} + */ + public function getContentType() + { + return $this->originalAsset->getContentType(); + } + + /** + * {@inheritdoc} + */ + public function getSourceFile() + { + if (empty($this->file)) { + $this->process(); + } + return $this->file; + } + + /** + * {@inheritdoc} + */ + public function getPath() + { + if (empty($this->path)) { + $this->process(); + } + return $this->path; + } + + /** + * {@inheritdoc} + */ + public function getFilePath() + { + if (null === $this->filePath) { + $this->process(); + } + return $this->filePath; + } + + /** + * {@inheritdoc} + */ + public function getContext() + { + if (null === $this->context) { + $this->process(); + } + return $this->context; + } + + /** + * {@inheritdoc} + */ + public function getModule() + { + return $this->originalAsset->getModule(); + } + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->path) { + $this->process(); + } + return $this->staticViewDir->readFile($this->path); + } + + /** + * Minify content of child asset + * + * @return void + */ + protected function process() + { + if ($this->isFileMinified($this->originalAsset->getPath())) { + $this->fillPropertiesByOriginalAsset(); + } else if ($this->hasPreminifiedFile($this->originalAsset->getSourceFile())) { + $this->fillPropertiesByOriginalAssetWithMin(); + } else { + try { + $this->fillPropertiesByMinifyingAsset(); + } catch (\Exception $e) { + $this->logger->logException( + new \Magento\Framework\Exception( + 'Could not minify file: ' . $this->originalAsset->getSourceFile(), + 0, + $e + ) + ); + $this->fillPropertiesByOriginalAsset(); + } + } + } + + /** + * Check, whether file is already minified + * + * @param string $fileName + * @return bool + */ + protected function isFileMinified($fileName) + { + return (bool)preg_match('#.min.\w+$#', $fileName); + } + + /** + * Check, whether the file has its preminified version in the same directory + * + * @param string $fileName + * @return bool + */ + protected function hasPreminifiedFile($fileName) + { + $minifiedFile = $this->composeMinifiedName($fileName); + return $this->rootDir->isExist($this->rootDir->getRelativePath($minifiedFile)); + } + + /** + * Compose path to a preminified file in the same folder out of path to an original file + * + * @param string $fileName + * @return string + */ + protected function composeMinifiedName($fileName) + { + return preg_replace('/\\.([^.]*)$/', '.min.$1', $fileName); + } + + /** + * Fill the properties by bare copying properties from original asset + * + * @return void + */ + protected function fillPropertiesByOriginalAsset() + { + $this->file = $this->originalAsset->getSourceFile(); + $this->path = $this->originalAsset->getPath(); + $this->filePath = $this->originalAsset->getFilePath(); + $this->context = $this->originalAsset->getContext(); + $this->url = $this->originalAsset->getUrl(); + } + + /** + * Fill the properties by copying properties from original asset and adding '.min' inside them + * + * @return void + */ + protected function fillPropertiesByOriginalAssetWithMin() + { + $this->file = $this->composeMinifiedName($this->originalAsset->getSourceFile()); + $this->path = $this->composeMinifiedName($this->originalAsset->getPath()); + $this->filePath = $this->composeMinifiedName($this->originalAsset->getFilePath()); + $this->context = $this->originalAsset->getContext(); + $this->url = $this->composeMinifiedName($this->originalAsset->getUrl()); + } + + /** + * Generate minified file and fill the properties to reference that file + * + * @return void + */ + protected function fillPropertiesByMinifyingAsset() + { + $path = $this->originalAsset->getPath(); + $this->context = new \Magento\Framework\View\Asset\File\Context( + $this->baseUrl->getBaseUrl(array('_type' => \Magento\Framework\UrlInterface::URL_TYPE_STATIC)), + \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, + \Magento\Framework\App\Filesystem\DirectoryList::CACHE_VIEW_REL_DIR . '/minified' + ); + $this->filePath = md5($path) . '_' . $this->composeMinifiedName(basename($path)); + $this->path = $this->context->getPath() . '/' . $this->filePath; + $this->minify(); + $this->file = $this->staticViewDir->getAbsolutePath($this->path); + $this->url = $this->context->getBaseUrl() . $this->path; + } + + /** + * Perform actual minification + * + * @return void + */ + private function minify() + { + $isExists = $this->staticViewDir->isExist($this->path); + if (!$isExists) { + $shouldMinify = true; + } elseif ($this->strategy == self::FILE_EXISTS) { + $shouldMinify = false; + } else { + $origlFile = $this->rootDir->getRelativePath($this->originalAsset->getSourceFile()); + $origMtime = $this->rootDir->stat($origlFile)['mtime']; + $minMtime = $this->staticViewDir->stat($this->path)['mtime']; + $shouldMinify = $origMtime != $minMtime; + } + if ($shouldMinify) { + $content = $this->adapter->minify($this->originalAsset->getContent()); + $this->staticViewDir->writeFile($this->path, $content); + } + } +} diff --git a/lib/Magento/Framework/View/Asset/MinifyService.php b/lib/internal/Magento/Framework/View/Asset/MinifyService.php similarity index 53% rename from lib/Magento/Framework/View/Asset/MinifyService.php rename to lib/internal/Magento/Framework/View/Asset/MinifyService.php index c7445a6b1274d93f531c261cf1613434d16f5242..b0fc58cdc6eba9e1ed2cb3e6a1a2883026501e50 100644 --- a/lib/Magento/Framework/View/Asset/MinifyService.php +++ b/lib/internal/Magento/Framework/View/Asset/MinifyService.php @@ -50,44 +50,30 @@ class MinifyService protected $enabled = array(); /** - * Minfiers - * - * @var \Magento\Framework\Code\Minifier[] - */ - protected $minifiers = array(); - - /** - * Applicaiton State - * - * @var \Magento\Framework\App\State + * @var \Magento\Framework\Code\Minifier\AdapterInterface[] */ - protected $appState; + protected $adapters = array(); /** - * Filesystem instance - * - * @var \Magento\Framework\App\Filesystem + * @var string */ - protected $_filesystem; + protected $appMode; /** * Constructor * * @param ConfigInterface $config * @param \Magento\Framework\ObjectManager $objectManager - * @param \Magento\Framework\App\State $appState - * @param \Magento\Framework\App\Filesystem $filesystem + * @param string $appMode */ public function __construct( ConfigInterface $config, \Magento\Framework\ObjectManager $objectManager, - \Magento\Framework\App\State $appState, - \Magento\Framework\App\Filesystem $filesystem + $appMode = \Magento\Framework\App\State::MODE_DEFAULT ) { $this->config = $config; $this->objectManager = $objectManager; - $this->appState = $appState; - $this->_filesystem = $filesystem; + $this->appMode = $appMode; } /** @@ -95,61 +81,33 @@ class MinifyService * Assets applicable for minification are wrapped with the minified asset * * @param array|\Iterator $assets - * @return array + * @return \Magento\Framework\View\Asset\Minified[] */ public function getAssets($assets) { $resultAssets = array(); + $strategy = $this->appMode == \Magento\Framework\App\State::MODE_PRODUCTION + ? Minified::FILE_EXISTS : Minified::MTIME; /** @var $asset AssetInterface */ foreach ($assets as $asset) { $contentType = $asset->getContentType(); if ($this->isEnabled($contentType)) { - $asset = $this->objectManager->create( - 'Magento\Framework\View\Asset\Minified', - array('asset' => $asset, 'minifier' => $this->getMinifier($contentType)) - ); + /** @var \Magento\Framework\View\Asset\Minified $asset */ + $asset = $this->objectManager + ->create( + 'Magento\Framework\View\Asset\Minified', + array( + 'asset' => $asset, + 'strategy' => $strategy, + 'adapter' => $this->getAdapter($contentType), + ) + ); } $resultAssets[] = $asset; } return $resultAssets; } - /** - * Get minifier object configured with specified content type - * - * @param string $contentType - * @return \Magento\Framework\Code\Minifier - */ - protected function getMinifier($contentType) - { - if (!isset($this->minifiers[$contentType])) { - $adapter = $this->getAdapter($contentType); - $strategyParams = array('adapter' => $adapter); - switch ($this->appState->getMode()) { - case \Magento\Framework\App\State::MODE_PRODUCTION: - $strategy = $this->objectManager - ->create('Magento\Framework\Code\Minifier\Strategy\Lite', $strategyParams); - break; - default: - $strategy = $this->objectManager->create( - 'Magento\Framework\Code\Minifier\Strategy\Generate', - $strategyParams - ); - } - $baseDir = $this->_filesystem->getDirectoryRead( - \Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR - )->getAbsolutePath( - 'minify' - ); - - $this->minifiers[$contentType] = $this->objectManager->create( - 'Magento\Framework\Code\Minifier', - array('strategy' => $strategy, 'directoryName' => $baseDir) - ); - } - return $this->minifiers[$contentType]; - } - /** * Check if minification is enabled for specified content type * @@ -168,19 +126,27 @@ class MinifyService * Get minification adapter by specified content type * * @param string $contentType - * @return mixed + * @return \Magento\Framework\Code\Minifier\AdapterInterface * @throws \Magento\Framework\Exception */ protected function getAdapter($contentType) { - $adapterClass = $this->config->getAssetMinificationAdapter($contentType); - if (!$adapterClass) { - throw new \Magento\Framework\Exception( - "Minification adapter is not specified for '{$contentType}' content type" - ); + if (!isset($this->adapters[$contentType])) { + $adapterClass = $this->config->getAssetMinificationAdapter($contentType); + if (!$adapterClass) { + throw new \Magento\Framework\Exception( + "Minification adapter is not specified for '$contentType' content type" + ); + } + $adapter = $this->objectManager->get($adapterClass); + if (!($adapter instanceof \Magento\Framework\Code\Minifier\AdapterInterface)) { + $type = get_class($adapter); + throw new \Magento\Framework\Exception( + "Invalid adapter: '{$type}'. Expected: \\Magento\\Framework\\Code\\Minifier\\AdapterInterface" + ); + } + $this->adapters[$contentType] = $adapter; } - - $adapter = $this->objectManager->create($adapterClass); - return $adapter; + return $this->adapters[$contentType]; } } diff --git a/lib/internal/Magento/Framework/View/Asset/ModuleNotation/Resolver.php b/lib/internal/Magento/Framework/View/Asset/ModuleNotation/Resolver.php new file mode 100644 index 0000000000000000000000000000000000000000..086772ed896d72f733ffdfe7256a9cc81f54f789 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/ModuleNotation/Resolver.php @@ -0,0 +1,67 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\ModuleNotation; + +use Magento\Framework\View\Asset; +use Magento\Framework\View\FileSystem; + +class Resolver +{ + /** + * @var \Magento\Framework\View\Asset\Repository + */ + private $assetRepo; + + /** + * @param Asset\Repository $assetRepo + */ + public function __construct(Asset\Repository $assetRepo) + { + $this->assetRepo = $assetRepo; + } + + /** + * Convert module notation to a path relative to the specified asset + * + * For example, the asset is Foo_Bar/styles/style.css and it refers to Bar_Baz::images/logo.gif + * (i.e. url(Bar_Baz::images/logo.gif)) + * The result will be ../../Bar_Baz/images/logo.gif + * + * @param Asset\LocalInterface $thisAsset + * @param string $relatedFileId + * @return string + */ + public function convertModuleNotationToPath(Asset\LocalInterface $thisAsset, $relatedFileId) + { + if (false === strpos($relatedFileId, Asset\Repository::FILE_ID_SEPARATOR)) { + return $relatedFileId; + } + $thisPath = $thisAsset->getPath(); + $relatedAsset = $this->assetRepo->createSimilar($relatedFileId, $thisAsset); + $relatedPath = $relatedAsset->getPath(); + $offset = FileSystem::offsetPath($relatedPath, $thisPath); + return FileSystem::normalizePath($offset . '/' . basename($relatedPath)); + } +} diff --git a/lib/Magento/Framework/View/Asset/PreProcessor/PreProcessorInterface.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Cache.php similarity index 61% rename from lib/Magento/Framework/View/Asset/PreProcessor/PreProcessorInterface.php rename to lib/internal/Magento/Framework/View/Asset/PreProcessor/Cache.php index 3dc2ff589081b8f51e54358efc690658fc021878..70bed74eca8c3b4355412bc0831c928e07531670 100644 --- a/lib/Magento/Framework/View/Asset/PreProcessor/PreProcessorInterface.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Cache.php @@ -21,20 +21,26 @@ * @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) */ + namespace Magento\Framework\View\Asset\PreProcessor; -/** - * The pre-processors which implement this interface are supposed to publish processed content to the $targetDirectory - * and return publisher file object with updated path to the published file. - */ -interface PreProcessorInterface +class Cache extends \Magento\Framework\Cache\Frontend\Decorator\TagScope { /** - * Process content - * - * @param \Magento\Framework\View\Publisher\FileInterface $publisherFile - * @param \Magento\Framework\Filesystem\Directory\WriteInterface $targetDirectory - * @return \Magento\Framework\View\Publisher\FileInterface + * Cache type code unique among all cache types + */ + const TYPE_IDENTIFIER = 'view_files_preprocessing'; + + /** + * Cache tag used to distinguish the cache type from all other cache + */ + const CACHE_TAG = 'VIEW_FILES_PREPROCESSING'; + + /** + * @param \Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool */ - public function process(\Magento\Framework\View\Publisher\FileInterface $publisherFile, $targetDirectory); + public function __construct(\Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool) + { + parent::__construct($cacheFrontendPool->get(self::TYPE_IDENTIFIER), self::CACHE_TAG); + } } diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php new file mode 100644 index 0000000000000000000000000000000000000000..08a62d6206b80dc311c950e5a2aa69c7d3a7f8ab --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php @@ -0,0 +1,186 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\PreProcessor; + +/** + * An object that's passed to preprocessors to carry current and original information for processing + * Encapsulates complexity of all necessary context and parameters + */ +class Chain +{ + /** + * @var \Magento\Framework\View\Asset\LocalInterface + */ + private $asset; + + /** + * @var string + */ + private $origContent; + + /** + * @var string + */ + private $origContentType; + + /** + * @var string + */ + private $content; + + /** + * @var string + */ + private $contentType; + + /** + * @var string + */ + private $targetContentType; + + /** + * @param \Magento\Framework\View\Asset\LocalInterface $asset + * @param string $origContent + * @param string $origContentType + */ + public function __construct(\Magento\Framework\View\Asset\LocalInterface $asset, $origContent, $origContentType) + { + $this->asset = $asset; + $this->origContent = $origContent; + $this->content = $origContent; + $this->origContentType = $origContentType; + $this->contentType = $origContentType; + $this->targetContentType = $asset->getContentType(); + } + + /** + * Get asset object + * + * @return \Magento\Framework\View\Asset\LocalInterface + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Get original content + * + * @return string + */ + public function getOrigContent() + { + return $this->origContent; + } + + /** + * Get current content + * + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Set current content + * + * @param string $content + * @return void + */ + public function setContent($content) + { + $this->content = $content; + } + + /** + * Get original content type + * + * @return string + */ + public function getOrigContentType() + { + return $this->origContentType; + } + + /** + * Get current content type + * + * @return string + */ + public function getContentType() + { + return $this->contentType; + } + + /** + * Set current content type + * + * @param string $contentType + * @return void + */ + public function setContentType($contentType) + { + $this->contentType = $contentType; + } + + /** + * Get the intended content type + * + * @return string + */ + public function getTargetContentType() + { + return $this->targetContentType; + } + + /** + * Assert invariants + * + * Impose an integrity check to avoid generating mismatching content type and not leaving transient data behind + * + * @return void + * @throws \LogicException + */ + public function assertValid() + { + if ($this->contentType !== $this->targetContentType) { + throw new \LogicException( + "The requested asset type was '{$this->targetContentType}', but ended up with '{$this->contentType}'" + ); + } + } + + /** + * Whether the contents or type have changed during the lifetime of the object + * + * @return bool + */ + public function isChanged() + { + return $this->origContentType != $this->contentType || $this->origContent != $this->content; + } +} diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ModuleNotation.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ModuleNotation.php new file mode 100644 index 0000000000000000000000000000000000000000..b7c49540baaca24b09fd8e7271a0a1640d5df46b --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ModuleNotation.php @@ -0,0 +1,74 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\PreProcessor; + +use Magento\Framework\View\Asset; +use Magento\Framework\View\Url\CssResolver; + +/** + * Support of notation "Module_Name::file/path.ext" in CSS-files + * + * This implementation is specific to CSS, despite that the actual algorithm of calculating offsets is generic. + * The part specific to CSS is the fact that a CSS file may refer to another file and the relative path has to be + * based off the current location of CSS-file. So context of base path can be known ONLY at the moment + * of traversing the CSS contents in context of the file location. + * Other than that, the algorithm of resolving notation "Module_Name::file/path.ext" is generic + */ +class ModuleNotation implements Asset\PreProcessorInterface +{ + /** + * @var \Magento\Framework\View\Url\CssResolver + */ + private $cssResolver; + + /** + * @var \Magento\Framework\View\Asset\ModuleNotation\Resolver + */ + private $notationResolver; + + /** + * @param CssResolver $cssResolver + * @param \Magento\Framework\View\Asset\ModuleNotation\Resolver $notationResolver + */ + public function __construct( + CssResolver $cssResolver, + \Magento\Framework\View\Asset\ModuleNotation\Resolver $notationResolver + ) { + $this->cssResolver = $cssResolver; + $this->notationResolver = $notationResolver; + } + + /** + * {@inheritdoc} + */ + public function process(Chain $chain) + { + $asset = $chain->getAsset(); + $callback = function ($path) use ($asset) { + return $this->notationResolver->convertModuleNotationToPath($asset, $path); + }; + $chain->setContent($this->cssResolver->replaceRelativeUrls($chain->getContent(), $callback)); + } +} diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Pool.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Pool.php new file mode 100644 index 0000000000000000000000000000000000000000..f8e101e0ffea23b769a7418588835f5ec695b7ad --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Pool.php @@ -0,0 +1,78 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset\PreProcessor; + +use Magento\Framework\ObjectManager; + +/** + * A registry of asset preprocessors (not to confuse with the "Registry" pattern) + */ +class Pool +{ + /** + * @var \Magento\Framework\ObjectManager + */ + private $objectManager; + + /** + * @param ObjectManager $objectManager + */ + public function __construct(ObjectManager $objectManager) + { + $this->objectManager = $objectManager; + } + + /** + * Retrieve preprocessors instances suitable to convert source content type into a destination one + * + * BUG: this implementation is hard-coded intentionally because there is a logic duplication that needs to be fixed. + * Adding an extensibility layer through DI configuration would add even more fragility to this design. + * If you need to add another preprocessor, use interceptors or class inheritance (at your own risk). + * + * @param string $sourceContentType + * @param string $targetContentType + * @return \Magento\Framework\View\Asset\PreProcessorInterface[] + */ + public function getPreProcessors($sourceContentType, $targetContentType) + { + $result = array(); + if ($sourceContentType == 'less') { + if ($targetContentType == 'css') { + $result[] = $this->objectManager->get('Magento\Framework\Css\PreProcessor\Less'); + } else if ($targetContentType == 'less') { + /** + * @bug This logic is duplicated at \Magento\Framework\Less\FileGenerator::generateLessFileTree() + * If you need to extend or modify behavior of LESS preprocessing, you must account for both places + */ + $result[] = $this->objectManager->get('Magento\Framework\Less\PreProcessor\Instruction\MagentoImport'); + $result[] = $this->objectManager->get('Magento\Framework\Less\PreProcessor\Instruction\Import'); + } + } + if ($targetContentType == 'css') { + $result[] = $this->objectManager->get('Magento\Framework\View\Asset\PreProcessor\ModuleNotation'); + } + return $result; + } +} diff --git a/lib/Magento/Framework/View/Asset/PreProcessorFactory.php b/lib/internal/Magento/Framework/View/Asset/PreProcessorFactory.php similarity index 92% rename from lib/Magento/Framework/View/Asset/PreProcessorFactory.php rename to lib/internal/Magento/Framework/View/Asset/PreProcessorFactory.php index 184a4f200eedd8731beb0634cd982721b13b57d9..e6ead32ed80b2ff68bc41cbac7ceffcf9dff5b4f 100644 --- a/lib/Magento/Framework/View/Asset/PreProcessorFactory.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessorFactory.php @@ -50,13 +50,13 @@ class PreProcessorFactory * * @param string $instanceName * @param array $data - * @return PreProcessor\PreProcessorInterface + * @return \Magento\Framework\View\Asset\PreProcessorInterface * @throws \UnexpectedValueException */ public function create($instanceName, array $data = array()) { $processorInstance = $this->objectManager->create($instanceName, $data); - if (!$processorInstance instanceof PreProcessor\PreProcessorInterface) { + if (!$processorInstance instanceof \Magento\Framework\View\Asset\PreProcessorInterface) { throw new \UnexpectedValueException("{$instanceName} has to implement the pre-processor interface."); } return $processorInstance; diff --git a/lib/Magento/Framework/Less/PreProcessorInterface.php b/lib/internal/Magento/Framework/View/Asset/PreProcessorInterface.php similarity index 73% rename from lib/Magento/Framework/Less/PreProcessorInterface.php rename to lib/internal/Magento/Framework/View/Asset/PreProcessorInterface.php index 7dacd137ebbbcb9351609c2d272af61ebe0f8e50..b4d55323980f7fe4e713d3b1f7e2935efc6fab51 100644 --- a/lib/Magento/Framework/Less/PreProcessorInterface.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessorInterface.php @@ -21,19 +21,18 @@ * @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) */ -namespace Magento\Framework\Less; +namespace Magento\Framework\View\Asset; /** - * Interface for pre-processing less instruction + * An interface for "preprocessing" asset contents */ interface PreProcessorInterface { /** - * Process less content to adapt magento view system + * Transform content and/or content type for the specified preprocessing chain object * - * @param PreProcessor\File\Less $lessFile - * @param string $lessContent - * @return string of processed content + * @param \Magento\Framework\View\Asset\PreProcessor\Chain $chain + * @return void */ - public function process(PreProcessor\File\Less $lessFile, $lessContent); + public function process(\Magento\Framework\View\Asset\PreProcessor\Chain $chain); } diff --git a/lib/Magento/Framework/View/Asset/PropertyGroup.php b/lib/internal/Magento/Framework/View/Asset/PropertyGroup.php similarity index 100% rename from lib/Magento/Framework/View/Asset/PropertyGroup.php rename to lib/internal/Magento/Framework/View/Asset/PropertyGroup.php diff --git a/lib/Magento/Framework/View/Asset/PropertyGroupFactory.php b/lib/internal/Magento/Framework/View/Asset/PropertyGroupFactory.php similarity index 100% rename from lib/Magento/Framework/View/Asset/PropertyGroupFactory.php rename to lib/internal/Magento/Framework/View/Asset/PropertyGroupFactory.php diff --git a/lib/Magento/Framework/View/Asset/Remote.php b/lib/internal/Magento/Framework/View/Asset/Remote.php similarity index 100% rename from lib/Magento/Framework/View/Asset/Remote.php rename to lib/internal/Magento/Framework/View/Asset/Remote.php diff --git a/lib/internal/Magento/Framework/View/Asset/Repository.php b/lib/internal/Magento/Framework/View/Asset/Repository.php new file mode 100644 index 0000000000000000000000000000000000000000..667a5ce4f06eceafa40573f01756d07c49adc8c2 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/Repository.php @@ -0,0 +1,361 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset; + +use Magento\Framework\View\Asset\File; +use \Magento\Framework\UrlInterface; +use \Magento\Framework\App\Filesystem; + +/** + * A repository service for view assets + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class Repository +{ + /** + * Scope separator for module notation of file ID + */ + const FILE_ID_SEPARATOR = '::'; + + /** + * @var \Magento\Framework\UrlInterface + */ + private $baseUrl; + + /** + * @var \Magento\Framework\View\DesignInterface + */ + private $design; + + /** + * @var \Magento\Framework\View\Design\Theme\Provider + */ + private $themeProvider; + + /** + * @var \Magento\Framework\View\Asset\Source + */ + private $assetSource; + + /** + * @var \Magento\Framework\View\Asset\ContextInterface[] + */ + private $fallbackContext; + + /** + * @var \Magento\Framework\View\Asset\ContextInterface[] + */ + private $fileContext; + + /** + * @param \Magento\Framework\UrlInterface $baseUrl + * @param \Magento\Framework\View\DesignInterface $design + * @param \Magento\Framework\View\Design\Theme\Provider $themeProvider + * @param \Magento\Framework\View\Asset\Source $assetSource + */ + public function __construct( + \Magento\Framework\UrlInterface $baseUrl, + \Magento\Framework\View\DesignInterface $design, + \Magento\Framework\View\Design\Theme\Provider $themeProvider, + \Magento\Framework\View\Asset\Source $assetSource + ) { + $this->baseUrl = $baseUrl; + $this->design = $design; + $this->themeProvider = $themeProvider; + $this->assetSource = $assetSource; + } + + /** + * Update required parameters with default values if custom not specified + * + * @param array &$params + * @throws \UnexpectedValueException + * @return $this + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + */ + public function updateDesignParams(array &$params) + { + $defaults = $this->design->getDesignParams(); + + // Set area + if (empty($params['area'])) { + $params['area'] = $defaults['area']; + } + + // Set themeModel + $theme = null; + $area = $params['area']; + if (!empty($params['themeId'])) { + $theme = $params['themeId']; + } elseif (isset($params['theme'])) { + $theme = $params['theme']; + } elseif (empty($params['themeModel']) && $area !== $defaults['area']) { + $theme = $this->design->getConfigurationDesignTheme($area); + } + + if ($theme) { + $params['themeModel'] = $this->themeProvider->getThemeModel($theme, $area); + if (!$params['themeModel']) { + throw new \UnexpectedValueException("Could not find theme '$theme' for area '$area'"); + } + } elseif (empty($params['themeModel'])) { + $params['themeModel'] = $defaults['themeModel']; + } + + + // Set module + if (!array_key_exists('module', $params)) { + $params['module'] = false; + } + + // Set locale + if (empty($params['locale'])) { + $params['locale'] = $defaults['locale']; + } + return $this; + } + + /** + * Create a file asset that's subject of fallback system + * + * @param string $fileId + * @param array $params + * @return File + */ + public function createAsset($fileId, array $params = array()) + { + $this->updateDesignParams($params); + list($module, $filePath) = self::extractModule($fileId); + if (!$module && $params['module']) { + $module = $params['module']; + } + $isSecure = isset($params['_secure']) ? (bool) $params['_secure'] : null; + $themePath = $this->design->getThemePath($params['themeModel']); + $context = $this->getFallbackContext( + UrlInterface::URL_TYPE_STATIC, + $isSecure, + $params['area'], + $themePath, + $params['locale'] + ); + return new File( + $this->assetSource, + $context, + $filePath, + $module, + $this->assetSource->getContentType($filePath) + ); + } + + /** + * Get current context for static view files + * + * @return \Magento\Framework\View\Asset\ContextInterface + */ + public function getStaticViewFileContext() + { + $params = array(); + $this->updateDesignParams($params); + $themePath = $this->design->getThemePath($params['themeModel']); + return $this->getFallbackContext( + UrlInterface::URL_TYPE_STATIC, + null, + $params['area'], + $themePath, + $params['locale'] + ); + } + + /** + * Get a fallback context value object + * + * Create only one instance per combination of parameters + * + * @param string $urlType + * @param bool|null $isSecure + * @param string $area + * @param string $themePath + * @param string $locale + * @return \Magento\Framework\View\Asset\File\FallbackContext + */ + private function getFallbackContext($urlType, $isSecure, $area, $themePath, $locale) + { + $secureKey = null === $isSecure ? 'null' : (int)$isSecure; + $baseDirType = \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR; + $id = implode('|', array($baseDirType, $urlType, $secureKey, $area, $themePath, $locale)); + if (!isset($this->fallbackContext[$id])) { + $url = $this->baseUrl->getBaseUrl(array('_type' => $urlType, '_secure' => $isSecure)); + $this->fallbackContext[$id] = new \Magento\Framework\View\Asset\File\FallbackContext( + $url, + $area, + $themePath, + $locale + ); + } + return $this->fallbackContext[$id]; + } + + /** + * Create a file asset similar to an existing local asset by using its context + * + * @param string $fileId + * @param LocalInterface $similarTo + * @return File + */ + public function createSimilar($fileId, LocalInterface $similarTo) + { + list($module, $filePath) = self::extractModule($fileId); + if (!$module) { + $module = $similarTo->getModule(); + } + return new File( + $this->assetSource, + $similarTo->getContext(), + $filePath, + $module, + $this->assetSource->getContentType($filePath) + ); + } + + /** + * Create a file asset with an arbitrary path + * + * This kind of file is not subject of fallback system + * Client code is responsible for ensuring that the file is in specified directory + * + * @param string $filePath + * @param string $dirPath + * @param string $baseDirType + * @param string $baseUrlType + * @return File + */ + public function createArbitrary( + $filePath, + $dirPath, + $baseDirType = Filesystem::STATIC_VIEW_DIR, + $baseUrlType = UrlInterface::URL_TYPE_STATIC + ) { + $context = $this->getFileContext($baseDirType, $baseUrlType, $dirPath); + $contentType = $this->assetSource->getContentType($filePath); + return new File($this->assetSource, $context, $filePath, '', $contentType); + } + + /** + * Get a file context value object + * + * Same instance per set of parameters + * + * @param string $baseDirType + * @param string $urlType + * @param string $dirPath + * @return \Magento\Framework\View\Asset\File\Context + */ + private function getFileContext($baseDirType, $urlType, $dirPath) + { + $id = implode('|', array($baseDirType, $urlType, $dirPath)); + if (!isset($this->fileContext[$id])) { + $url = $this->baseUrl->getBaseUrl(array('_type' => $urlType)); + $this->fileContext[$id] = new \Magento\Framework\View\Asset\File\Context($url, $baseDirType, $dirPath); + } + return $this->fileContext[$id]; + } + + /** + * Create a file asset with path relative to specified local asset + * + * @param string $fileId + * @param LocalInterface $relativeTo + * @return File + */ + public function createRelated($fileId, LocalInterface $relativeTo) + { + list($module, $filePath) = self::extractModule($fileId); + if ($module) { + return $this->createSimilar($fileId, $relativeTo); + } + $filePath = \Magento\Framework\View\FileSystem::getRelatedPath($relativeTo->getFilePath(), $filePath); + return $this->createSimilar($filePath, $relativeTo); + } + + /** + * Create a remote asset value object + * + * @param string $url + * @param string $contentType + * @return Remote + */ + public function createRemoteAsset($url, $contentType) + { + return new Remote($url, $contentType); + } + + /** + * Getter for static view file URL + * + * @param string $fileId + * @return string + */ + public function getUrl($fileId) + { + $asset = $this->createAsset($fileId); + return $asset->getUrl(); + } + + /** + * A getter for static view file URL with special parameters + * + * To omit parameters and have them automatically determined from application state, use getUrl() + * + * @param string $fileId + * @param array $params + * @return string + * @see getUrl() + */ + public function getUrlWithParams($fileId, array $params) + { + $asset = $this->createAsset($fileId, $params); + return $asset->getUrl(); + } + + /** + * Extract module name from specified file ID + * + * @param string $fileId + * @return array + * @throws \Magento\Framework\Exception + */ + public static function extractModule($fileId) + { + if (strpos($fileId, self::FILE_ID_SEPARATOR) === false) { + return array('', $fileId); + } + $result = explode(self::FILE_ID_SEPARATOR, $fileId, 2); + if (empty($result[0])) { + throw new \Magento\Framework\Exception('Scope separator "::" cannot be used without scope identifier.'); + } + return array($result[0], $result[1]); + } +} diff --git a/lib/internal/Magento/Framework/View/Asset/Source.php b/lib/internal/Magento/Framework/View/Asset/Source.php new file mode 100644 index 0000000000000000000000000000000000000000..5d40493a79b1d1658d9952c6bf4397edc69b50f0 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Asset/Source.php @@ -0,0 +1,244 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Asset; + +use Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple; + +/** + * A service for preprocessing content of assets + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class Source +{ + /** + * A suffix for temporary materialization directory where pre-processed files will be written (if necessary) + */ + const TMP_MATERIALIZATION_DIR = 'view_preprocessed'; + + /** + * @var \Magento\Framework\App\Filesystem + */ + private $filesystem; + + /** + * @var \Magento\Framework\View\Asset\PreProcessor\Cache + */ + protected $cache; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface + */ + protected $rootDir; + + /** + * @var \Magento\Framework\Filesystem\Directory\WriteInterface + */ + protected $varDir; + + /** + * @var \Magento\Framework\View\Asset\PreProcessor\Pool + */ + private $preProcessorPool; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile + */ + protected $fallback; + + /** + * @var \Magento\Framework\View\Design\Theme\Provider + */ + protected $themeProvider; + + /** + * @param PreProcessor\Cache $cache + * @param \Magento\Framework\App\Filesystem $filesystem + * @param PreProcessor\Pool $preProcessorPool + * @param \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallback + * @param \Magento\Framework\View\Design\Theme\Provider $themeProvider + */ + public function __construct( + PreProcessor\Cache $cache, + \Magento\Framework\App\Filesystem $filesystem, + PreProcessor\Pool $preProcessorPool, + \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallback, + \Magento\Framework\View\Design\Theme\Provider $themeProvider + ) { + $this->cache = $cache; + $this->filesystem = $filesystem; + $this->rootDir = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); + $this->varDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); + $this->preProcessorPool = $preProcessorPool; + $this->fallback = $fallback; + $this->themeProvider = $themeProvider; + } + + /** + * Get absolute path to the asset file + * + * @param LocalInterface $asset + * @return bool|string + */ + public function getFile(LocalInterface $asset) + { + $result = $this->preProcess($asset); + if (!$result) { + return false; + } + list($dirCode, $path) = $result; + return $this->filesystem->getDirectoryRead($dirCode)->getAbsolutePath($path); + } + + /** + * Get content of an asset + * + * @param LocalInterface $asset + * @return bool|string + */ + public function getContent(LocalInterface $asset) + { + $result = $this->preProcess($asset); + if (!$result) { + return false; + } + list($dirCode, $path) = $result; + return $this->filesystem->getDirectoryRead($dirCode)->readFile($path); + } + + /** + * Perform necessary preprocessing and materialization when the specified asset is requested + * + * Returns an array of two elements: + * - directory code where the file is supposed to be found + * - relative path to the file + * + * Automatically caches the obtained successful results or returns false if source file was not found + * + * @param LocalInterface $asset + * @return array|bool + */ + private function preProcess(LocalInterface $asset) + { + $sourceFile = $this->findSourceFile($asset); + if (!$sourceFile) { + return false; + } + $dirCode = \Magento\Framework\App\Filesystem::ROOT_DIR; + $path = $this->rootDir->getRelativePath($sourceFile); + $cacheId = $path . ':' . $asset->getPath(); + $cached = $this->cache->load($cacheId); + if ($cached) { + return unserialize($cached); + } + $chain = new \Magento\Framework\View\Asset\PreProcessor\Chain( + $asset, + $this->rootDir->readFile($path), + $this->getContentType($path) + ); + $preProcessors = $this->preProcessorPool + ->getPreProcessors($chain->getOrigContentType(), $chain->getTargetContentType()); + foreach ($preProcessors as $processor) { + $processor->process($chain); + } + $chain->assertValid(); + if ($chain->isChanged()) { + $dirCode = \Magento\Framework\App\Filesystem::VAR_DIR; + $path = self::TMP_MATERIALIZATION_DIR . '/source/' . $asset->getPath(); + $this->varDir->writeFile($path, $chain->getContent()); + } + $result = array($dirCode, $path); + $this->cache->save(serialize($result), $cacheId); + return $result; + } + + /** + * Infer a content type from the specified path + * + * @param string $path + * @return string + */ + public function getContentType($path) + { + return pathinfo($path, PATHINFO_EXTENSION); + } + + /** + * Search for asset file depending on its context type + * + * @param LocalInterface $asset + * @return bool|string + * @throws \LogicException + */ + private function findSourceFile(LocalInterface $asset) + { + $context = $asset->getContext(); + if ($context instanceof \Magento\Framework\View\Asset\File\FallbackContext) { + $result = $this->findFileThroughFallback($asset, $context); + } elseif ($context instanceof \Magento\Framework\View\Asset\File\Context) { + $result = $this->findFile($asset, $context); + } else { + $type = get_class($context); + throw new \LogicException("Support for {$type} is not implemented."); + } + return $result; + } + + /** + * Find asset file via fallback mechanism + * + * @param LocalInterface $asset + * @param \Magento\Framework\View\Asset\File\FallbackContext $context + * @return bool|string + */ + private function findFileThroughFallback( + LocalInterface $asset, + \Magento\Framework\View\Asset\File\FallbackContext $context + ) { + $themeModel = $this->themeProvider->getThemeModel($context->getThemePath(), $context->getAreaCode()); + $sourceFile = $this->fallback->getFile( + $context->getAreaCode(), + $themeModel, + $context->getLocaleCode(), + $asset->getFilePath(), + $asset->getModule() + ); + return $sourceFile; + } + + /** + * Find asset file by simply appending its path to the directory in context + * + * @param LocalInterface $asset + * @param \Magento\Framework\View\Asset\File\Context $context + * @return string + */ + private function findFile(LocalInterface $asset, \Magento\Framework\View\Asset\File\Context $context) + { + $dir = $this->filesystem->getDirectoryRead($context->getBaseDirType()); + Simple::assertFilePathFormat($asset->getFilePath()); + return $dir->getAbsolutePath($asset->getPath()); + } +} diff --git a/lib/Magento/Framework/View/Block/IdentityInterface.php b/lib/internal/Magento/Framework/View/Block/IdentityInterface.php similarity index 100% rename from lib/Magento/Framework/View/Block/IdentityInterface.php rename to lib/internal/Magento/Framework/View/Block/IdentityInterface.php diff --git a/lib/Magento/Framework/View/BlockPool.php b/lib/internal/Magento/Framework/View/BlockPool.php similarity index 100% rename from lib/Magento/Framework/View/BlockPool.php rename to lib/internal/Magento/Framework/View/BlockPool.php diff --git a/lib/Magento/Framework/View/Config.php b/lib/internal/Magento/Framework/View/Config.php similarity index 92% rename from lib/Magento/Framework/View/Config.php rename to lib/internal/Magento/Framework/View/Config.php index 4ccd1731fb9b813857b8c2e29e8e9eba172ceef4..3a89069eb38f4ce0e65b33f53272ed0aedcce6b0 100644 --- a/lib/Magento/Framework/View/Config.php +++ b/lib/internal/Magento/Framework/View/Config.php @@ -54,9 +54,9 @@ class Config implements \Magento\Framework\View\ConfigInterface /** * View service * - * @var \Magento\Framework\View\Service + * @var \Magento\Framework\View\Asset\Repository */ - protected $viewService; + protected $assetRepo; /** * View file system model @@ -84,7 +84,7 @@ class Config implements \Magento\Framework\View\ConfigInterface * * @param \Magento\Framework\Module\Dir\Reader $moduleReader * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Framework\View\Service $viewService + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\FileSystem $viewFileSystem * @param \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory * @param string $filename @@ -92,14 +92,14 @@ class Config implements \Magento\Framework\View\ConfigInterface public function __construct( \Magento\Framework\Module\Dir\Reader $moduleReader, \Magento\Framework\App\Filesystem $filesystem, - \Magento\Framework\View\Service $viewService, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory, $filename = self::CONFIG_FILE_NAME ) { $this->moduleReader = $moduleReader; $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - $this->viewService = $viewService; + $this->assetRepo = $assetRepo; $this->viewFileSystem = $viewFileSystem; $this->filename = $filename; $this->fileIteratorFactory = $fileIteratorFactory; @@ -113,7 +113,7 @@ class Config implements \Magento\Framework\View\ConfigInterface */ public function getViewConfig(array $params = array()) { - $this->viewService->updateDesignParams($params); + $this->assetRepo->updateDesignParams($params); /** @var $currentTheme \Magento\Framework\View\Design\ThemeInterface */ $currentTheme = $params['themeModel']; $key = $currentTheme->getId(); @@ -121,8 +121,7 @@ class Config implements \Magento\Framework\View\ConfigInterface return $this->viewConfigs[$key]; } - $configFiles = $this->moduleReader->getConfigurationFiles($this->filename)->toArray(); - + $configFiles = $this->moduleReader->getConfigurationFiles(basename($this->filename))->toArray(); $themeConfigFile = $currentTheme->getCustomization()->getCustomViewConfigPath(); if (empty($themeConfigFile) || !$this->rootDirectory->isExist( $this->rootDirectory->getRelativePath($themeConfigFile) diff --git a/lib/Magento/Framework/View/ConfigInterface.php b/lib/internal/Magento/Framework/View/ConfigInterface.php similarity index 96% rename from lib/Magento/Framework/View/ConfigInterface.php rename to lib/internal/Magento/Framework/View/ConfigInterface.php index e54b47c6f9a0369f4a2ccfdf607986cdd29297ec..cb7b7a133c89c52ac3e419a5c7c9326500a11cd7 100644 --- a/lib/Magento/Framework/View/ConfigInterface.php +++ b/lib/internal/Magento/Framework/View/ConfigInterface.php @@ -31,7 +31,7 @@ interface ConfigInterface /** * Filename of view configuration */ - const CONFIG_FILE_NAME = 'view.xml'; + const CONFIG_FILE_NAME = 'etc/view.xml'; /** * Render view config object for current package and theme diff --git a/lib/Magento/Framework/View/Context.php b/lib/internal/Magento/Framework/View/Context.php similarity index 96% rename from lib/Magento/Framework/View/Context.php rename to lib/internal/Magento/Framework/View/Context.php index 9c3323f9afa0601d768087c6513043fd214b3d2b..432e60755a68ca9aab049d60832789ec328675d4 100644 --- a/lib/Magento/Framework/View/Context.php +++ b/lib/internal/Magento/Framework/View/Context.php @@ -27,7 +27,6 @@ use Magento\Framework\App\Request\Http as Request; use Magento\Framework\App\FrontControllerInterface; use Magento\Framework\TranslateInterface; use Magento\Framework\App\Config\ScopeConfigInterface; -use Magento\Framework\View\Url as ViewUrl; use Magento\Framework\View\ConfigInterface as ViewConfig; use Magento\Framework\Logger; use Magento\Framework\App\State as AppState; @@ -111,13 +110,6 @@ class Context */ protected $frontController; - /** - * View URL - * - * @var \Magento\Framework\View\Url - */ - protected $viewUrl; - /** * Layout * @@ -165,7 +157,6 @@ class Context * @param SessionManager $session * @param ScopeConfigInterface $scopeConfig * @param FrontControllerInterface $frontController - * @param ViewUrl $viewUrl * @param ViewConfig $viewConfig * @param CacheState $cacheState * @param Logger $logger @@ -186,7 +177,6 @@ class Context SessionManager $session, ScopeConfigInterface $scopeConfig, FrontControllerInterface $frontController, - ViewUrl $viewUrl, ViewConfig $viewConfig, CacheState $cacheState, Logger $logger, @@ -202,7 +192,6 @@ class Context $this->session = $session; $this->scopeConfig = $scopeConfig; $this->frontController = $frontController; - $this->viewUrl = $viewUrl; $this->viewConfig = $viewConfig; $this->cacheState = $cacheState; $this->logger = $logger; @@ -310,16 +299,6 @@ class Context return $this->urlBuilder; } - /** - * Retrieve View URL - * - * @return \Magento\Framework\View\Url - */ - public function getViewUrl() - { - return $this->viewUrl; - } - /** * Retrieve view config * diff --git a/lib/Magento/Framework/View/DataSourcePool.php b/lib/internal/Magento/Framework/View/DataSourcePool.php similarity index 100% rename from lib/Magento/Framework/View/DataSourcePool.php rename to lib/internal/Magento/Framework/View/DataSourcePool.php diff --git a/lib/Magento/Framework/View/Design/Fallback/Rule/Composite.php b/lib/internal/Magento/Framework/View/Design/Fallback/Rule/Composite.php similarity index 100% rename from lib/Magento/Framework/View/Design/Fallback/Rule/Composite.php rename to lib/internal/Magento/Framework/View/Design/Fallback/Rule/Composite.php diff --git a/lib/Magento/Framework/View/Design/Fallback/Rule/ModularSwitch.php b/lib/internal/Magento/Framework/View/Design/Fallback/Rule/ModularSwitch.php similarity index 100% rename from lib/Magento/Framework/View/Design/Fallback/Rule/ModularSwitch.php rename to lib/internal/Magento/Framework/View/Design/Fallback/Rule/ModularSwitch.php diff --git a/lib/Magento/Framework/View/Design/Fallback/Rule/RuleInterface.php b/lib/internal/Magento/Framework/View/Design/Fallback/Rule/RuleInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Fallback/Rule/RuleInterface.php rename to lib/internal/Magento/Framework/View/Design/Fallback/Rule/RuleInterface.php diff --git a/lib/Magento/Framework/View/Design/Fallback/Rule/Simple.php b/lib/internal/Magento/Framework/View/Design/Fallback/Rule/Simple.php similarity index 100% rename from lib/Magento/Framework/View/Design/Fallback/Rule/Simple.php rename to lib/internal/Magento/Framework/View/Design/Fallback/Rule/Simple.php diff --git a/lib/Magento/Framework/View/Design/Fallback/Rule/Theme.php b/lib/internal/Magento/Framework/View/Design/Fallback/Rule/Theme.php similarity index 100% rename from lib/Magento/Framework/View/Design/Fallback/Rule/Theme.php rename to lib/internal/Magento/Framework/View/Design/Fallback/Rule/Theme.php diff --git a/lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php b/lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php new file mode 100644 index 0000000000000000000000000000000000000000..c33f0e176eae3cdf9846fd401209c1e559a653f0 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php @@ -0,0 +1,210 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\Fallback; + +use Magento\Framework\App\Filesystem; +use Magento\Framework\View\Design\Fallback\Rule\Composite; +use Magento\Framework\View\Design\Fallback\Rule\ModularSwitch; +use Magento\Framework\View\Design\Fallback\Rule\RuleInterface; +use Magento\Framework\View\Design\Fallback\Rule\Simple; +use Magento\Framework\View\Design\Fallback\Rule\Theme; + +/** + * Fallback Factory + * + * Factory that produces all sorts of fallback rules + */ +class RulePool +{ + /**#@+ + * Supported types of fallback rules + */ + const TYPE_FILE = 'file'; + const TYPE_LOCALE_FILE = 'locale'; + const TYPE_TEMPLATE_FILE = 'template'; + const TYPE_STATIC_FILE = 'static'; + /**#@-*/ + + /** + * File system + * + * @var Filesystem + */ + protected $filesystem; + + /** + * @var array + */ + private $rules = []; + + /** + * Constructor + * + * @param Filesystem $filesystem + */ + public function __construct(Filesystem $filesystem) + { + $this->filesystem = $filesystem; + } + + /** + * Retrieve newly created fallback rule for locale files, such as CSV translation maps + * + * @return RuleInterface + */ + protected function createLocaleFileRule() + { + $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR); + return new Theme( + new Simple("$themesDir/<area>/<theme_path>") + ); + } + + /** + * Retrieve newly created fallback rule for template files + * + * @return RuleInterface + */ + protected function createTemplateFileRule() + { + $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR); + $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR); + return new ModularSwitch( + new Theme( + new Simple("$themesDir/<area>/<theme_path>/templates") + ), + new Composite( + array( + new Theme(new Simple("$themesDir/<area>/<theme_path>/<namespace>_<module>/templates")), + new Simple("$modulesDir/<namespace>/<module>/view/<area>/templates"), + new Simple("$modulesDir/<namespace>/<module>/view/base/templates"), + ) + ) + ); + } + + /** + * Retrieve newly created fallback rule for dynamic view files + * + * @return RuleInterface + */ + protected function createFileRule() + { + $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR); + $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR); + return new ModularSwitch( + new Theme(new Simple("$themesDir/<area>/<theme_path>")), + new Composite( + array( + new Theme(new Simple("$themesDir/<area>/<theme_path>/<namespace>_<module>")), + new Simple("$modulesDir/<namespace>/<module>/view/<area>"), + new Simple("{$modulesDir}/<namespace>/<module>/view/base"), + ) + ) + ); + } + + /** + * Retrieve newly created fallback rule for static view files, such as CSS, JavaScript, images, etc. + * + * @return RuleInterface + */ + protected function createViewFileRule() + { + $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR); + $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR); + $libDir = $this->filesystem->getPath(Filesystem::LIB_WEB); + return new ModularSwitch( + new Composite( + array( + new Theme( + new Composite( + array( + new Simple("$themesDir/<area>/<theme_path>/web/i18n/<locale>", array('locale')), + new Simple("$themesDir/<area>/<theme_path>/web"), + ) + ) + ), + new Simple($libDir), + ) + ), + new Composite( + array( + new Theme( + new Composite( + array( + new Simple( + "$themesDir/<area>/<theme_path>/<namespace>_<module>/web/i18n/<locale>", + array('locale') + ), + new Simple("$themesDir/<area>/<theme_path>/<namespace>_<module>/web"), + ) + ) + ), + new Simple( + "$modulesDir/<namespace>/<module>/view/<area>/web/i18n/<locale>", + array('locale') + ), + new Simple( + "$modulesDir/<namespace>/<module>/view/base/web/i18n/<locale>", + array('locale') + ), + new Simple("$modulesDir/<namespace>/<module>/view/<area>/web"), + new Simple("{$modulesDir}/<namespace>/<module>/view/base/web"), + ) + ) + ); + } + + /** + * @param string $type + * @return RuleInterface + * @throws \InvalidArgumentException + */ + public function getRule($type) + { + if (isset($this->rules[$type])) { + return $this->rules[$type]; + } + switch ($type) { + case self::TYPE_FILE: + $rule = $this->createFileRule(); + break; + case self::TYPE_LOCALE_FILE: + $rule = $this->createLocaleFileRule(); + break; + case self::TYPE_TEMPLATE_FILE: + $rule = $this->createTemplateFileRule(); + break; + case self::TYPE_STATIC_FILE: + $rule = $this->createViewFileRule(); + break; + default: + throw new \InvalidArgumentException("Fallback rule '$type' is not supported"); + } + $this->rules[$type] = $rule; + return $this->rules[$type]; + } +} diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Cache.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Cache.php new file mode 100644 index 0000000000000000000000000000000000000000..49e63d0bceb0c8cd4c0cf045c025ef0f8e445fb1 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Cache.php @@ -0,0 +1,46 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +class Cache extends \Magento\Framework\Cache\Frontend\Decorator\TagScope +{ + /** + * Cache type code unique among all cache types + */ + const TYPE_IDENTIFIER = 'view_files_fallback'; + + /** + * Cache tag used to distinguish the cache type from all other cache + */ + const CACHE_TAG = 'VIEW_FILES_FALLBACK'; + + /** + * @param \Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool + */ + public function __construct(\Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool) + { + parent::__construct($cacheFrontendPool->get(self::TYPE_IDENTIFIER), self::CACHE_TAG); + } +} diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/Flat.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/Flat.php new file mode 100644 index 0000000000000000000000000000000000000000..ea592c0aba908ccc5cd18b7ef0b3fc53dd6ad0af --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/Flat.php @@ -0,0 +1,85 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\CacheData; + +use Magento\Framework\View\Design\FileResolution\Fallback; + +class Flat implements Fallback\CacheDataInterface +{ + /** + * @var Fallback\Cache + */ + private $cache; + + /** + * @param Fallback\Cache $cache + */ + public function __construct(Fallback\Cache $cache) + { + $this->cache = $cache; + } + + /** + * {@inheritdoc} + */ + public function getFromCache($type, $file, $area, $themePath, $locale, $module) + { + $cacheId = $this->getCacheId($type, $file, $area, $themePath, $locale, $module); + return $this->cache->load($cacheId); + } + + /** + * {@inheritdoc} + */ + public function saveToCache($value, $type, $file, $area, $themePath, $locale, $module) + { + $cacheId = $this->getCacheId($type, $file, $area, $themePath, $locale, $module); + return $this->cache->save($value, $cacheId); + } + + /** + * Generate cache ID + * + * @param string $type + * @param string $file + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @return string + */ + protected function getCacheId($type, $file, $area, $themePath, $locale, $module) + { + return sprintf( + "type:%s|area:%s|theme:%s|locale:%s|module:%s|file:%s", + $type, + $area, + $themePath, + $locale, + $module, + $file + ); + } +} diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/Grouped.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/Grouped.php new file mode 100644 index 0000000000000000000000000000000000000000..ffffe2c7e8a0f38e6ec65fb232e2a42eb898b9c8 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheData/Grouped.php @@ -0,0 +1,143 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\CacheData; + +use Magento\Framework\View\Design\FileResolution\Fallback; + +class Grouped implements Fallback\CacheDataInterface +{ + /** + * @var Fallback\Cache + */ + private $cache; + + /** + * @var string[] + */ + private $isDirty = []; + + /** + * @var array + */ + private $cacheSections = []; + + /** + * @param Fallback\Cache $cache + */ + public function __construct(Fallback\Cache $cache) + { + $this->cache = $cache; + } + + /** + * {@inheritdoc} + */ + public function getFromCache($type, $file, $area, $themePath, $locale, $module) + { + $sectionId = $this->getCacheSectionId($type, $area, $themePath, $locale); + $this->loadSection($sectionId); + $recordId = $this->getCacheRecordId($file, $module); + if (!isset($this->cacheSections[$sectionId][$recordId])) { + $this->cacheSections[$sectionId][$recordId] = false; + } + return $this->cacheSections[$sectionId][$recordId]; + } + + /** + * {@inheritdoc} + */ + public function saveToCache($value, $type, $file, $area, $themePath, $locale, $module) + { + $sectionId = $this->getCacheSectionId($type, $area, $themePath, $locale); + $this->loadSection($sectionId); + $recordId = $this->getCacheRecordId($file, $module); + if (!isset($this->cacheSections[$sectionId][$recordId]) + || $this->cacheSections[$sectionId][$recordId] !== $value) { + $this->isDirty[$sectionId] = $sectionId; + $this->cacheSections[$sectionId][$recordId] = $value; + } + return true; + } + + /** + * @param string $sectionId + * @return void + */ + private function loadSection($sectionId) + { + if (!isset($this->cacheSections[$sectionId])) { + $value = $this->cache->load($sectionId); + if ($value) { + $this->cacheSections[$sectionId] = json_decode($value, true); + } else { + $this->cacheSections[$sectionId] = []; + } + } + } + + /** + * Generate section ID + * + * @param string $type + * @param string $area + * @param string $themePath + * @param string $locale + * + * @return string + */ + protected function getCacheSectionId($type, $area, $themePath, $locale) + { + return sprintf( + "type:%s|area:%s|theme:%s|locale:%s", + $type, + $area, + $themePath, + $locale + ); + } + + /** + * Generate record ID + * + * @param string $file + * @param string $module + * @return string + */ + protected function getCacheRecordId($file, $module) + { + return sprintf("module:%s|file:%s", $module, $file); + } + + /** + * Save cache + */ + public function __destruct() + { + foreach ($this->isDirty as $sectionId) { + $value = json_encode($this->cacheSections[$sectionId]); + $this->cache->save($value, $sectionId); + } + } +} diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheDataInterface.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheDataInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..87cabdc323bd9e2427a382daad69d6750ec2b451 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/CacheDataInterface.php @@ -0,0 +1,55 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +interface CacheDataInterface +{ + /** + * Retrieve cached value by file name and parameters + * + * @param string $type + * @param string $file + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @return string + */ + public function getFromCache($type, $file, $area, $themePath, $locale, $module); + + /** + * Save value to cache as unique to file name and parameters + * + * @param string $value + * @param string $type + * @param string $file + * @param string $area + * @param string $themePath + * @param string $locale + * @param string $module + * @return bool + */ + public function saveToCache($value, $type, $file, $area, $themePath, $locale, $module); +} diff --git a/lib/Magento/Framework/View/Design/FileResolution/Strategy/View/NotifiableInterface.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/File.php similarity index 57% rename from lib/Magento/Framework/View/Design/FileResolution/Strategy/View/NotifiableInterface.php rename to lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/File.php index 8133141bc2de3a757bab16dd15a3be8bcce15241..3bef6897e0f59d1ead66f59793909b6c3841475a 100644 --- a/lib/Magento/Framework/View/Design/FileResolution/Strategy/View/NotifiableInterface.php +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/File.php @@ -21,31 +21,50 @@ * @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) */ -namespace Magento\Framework\View\Design\FileResolution\Strategy\View; -use Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy; +namespace Magento\Framework\View\Design\FileResolution\Fallback; + use Magento\Framework\View\Design\ThemeInterface; /** - * Notifiable Interface - * - * Interface for a view strategy to be notifiable, that file location has changed + * Provider of dynamic view files */ -interface NotifiableInterface +class File { /** - * Set view file path to map + * @var ResolverInterface + */ + private $resolver; + + /** + * Constructor * - * Notify the strategy, that file has changed its location, and next time should be resolved to this - * new location. + * @param ResolverInterface $resolver + */ + public function __construct(ResolverInterface $resolver) + { + $this->resolver = $resolver; + } + + /** + * Get existing file name, using fallback mechanism * * @param string $area * @param ThemeInterface $themeModel - * @param string $locale - * @param string|null $module * @param string $file - * @param string $newFilePath - * @return CachingProxy + * @param string|null $module + * @return string|bool + */ + public function getFile($area, ThemeInterface $themeModel, $file, $module = null) + { + return $this->resolver->resolve($this->getFallbackType(), $file, $area, $themeModel, null, $module); + } + + /** + * @return string */ - public function setViewFilePathToMap($area, ThemeInterface $themeModel, $locale, $module, $file, $newFilePath); + protected function getFallbackType() + { + return \Magento\Framework\View\Design\Fallback\RulePool::TYPE_FILE; + } } diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/LocaleFile.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/LocaleFile.php new file mode 100644 index 0000000000000000000000000000000000000000..4ead6cfc5edf397865a06bc8dd56900e87548772 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/LocaleFile.php @@ -0,0 +1,70 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +use Magento\Framework\View\Design\ThemeInterface; + +/** + * Provider of localized view files + */ +class LocaleFile +{ + /** + * @var ResolverInterface + */ + private $resolver; + + /** + * Constructor + * + * @param ResolverInterface $resolver + */ + public function __construct(ResolverInterface $resolver) + { + $this->resolver = $resolver; + } + + /** + * Get locale file name, using fallback mechanism + * + * @param string $area + * @param ThemeInterface $themeModel + * @param string $locale + * @param string $file + * @return string|bool + */ + public function getFile($area, ThemeInterface $themeModel, $locale, $file) + { + return $this->resolver->resolve($this->getFallbackType(), $file, $area, $themeModel, $locale, null); + } + + /** + * @return string + */ + protected function getFallbackType() + { + return \Magento\Framework\View\Design\Fallback\RulePool::TYPE_LOCALE_FILE; + } +} diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Alternative.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Alternative.php new file mode 100644 index 0000000000000000000000000000000000000000..3a208e0e9b8c5ce316ef2e70c4c46bfe1d2f9190 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Alternative.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver; + +use Magento\Framework\View\Design\FileResolution\Fallback; +use Magento\Framework\App\Filesystem; +use Magento\Framework\View\Design\Fallback\Rule\RuleInterface; + +/** + * Resolver for view files with support of alternative extensions map + */ +class Alternative extends Simple +{ + /** + * @var array + */ + private $alternativeExtensions; + + /** + * Constructor + * + * @param Filesystem $filesystem + * @param \Magento\Framework\View\Design\Fallback\RulePool $rulePool + * @param Fallback\CacheDataInterface $cache + * @param array $alternativeExtensions + * @throws \InvalidArgumentException + */ + public function __construct( + Filesystem $filesystem, + \Magento\Framework\View\Design\Fallback\RulePool $rulePool, + Fallback\CacheDataInterface $cache, + array $alternativeExtensions + ) { + foreach ($alternativeExtensions as $extension => $newExtensions) { + if (!is_string($extension) || !is_array($newExtensions)) { + throw new \InvalidArgumentException( + "\$alternativeExtensions must be an array with format: " + . "array('ext1' => array('ext1', 'ext2'), 'ext3' => array(...)]" + ); + } + } + $this->alternativeExtensions = $alternativeExtensions; + parent::__construct($filesystem, $rulePool, $cache); + } + + /** + * {@inheritdoc} + */ + public function resolveFile(RuleInterface $fallbackRule, $file, array $params = array()) + { + $path = parent::resolveFile($fallbackRule, $file, $params); + if (!$path) { + $extension = pathinfo($file, PATHINFO_EXTENSION); + if (isset($this->alternativeExtensions[$extension])) { + foreach ($this->alternativeExtensions[$extension] as $newExtension) { + $newFile = substr($file, 0, strlen($file) - strlen($extension)) . $newExtension; + $result = parent::resolveFile($fallbackRule, $newFile, $params); + if ($result) { + $path = $result; + break; + } + } + } + } + return $path; + } +} diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Simple.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Simple.php new file mode 100644 index 0000000000000000000000000000000000000000..e4bf3c390bbf0503eab0731dd64421ad6b90d400 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Simple.php @@ -0,0 +1,125 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver; + +use Magento\Framework\App\Filesystem; +use Magento\Framework\View\Design\FileResolution\Fallback; +use Magento\Framework\View\Design\Fallback\Rule\RuleInterface; +use Magento\Framework\View\Design\Fallback\RulePool; +use Magento\Framework\Filesystem\Directory\ReadInterface; +use Magento\Framework\View\Design\ThemeInterface; + +/** + * Resolver for view files + */ +class Simple implements Fallback\ResolverInterface +{ + /** + * @var ReadInterface + */ + protected $rootDirectory; + + /** + * Fallback factory + * + * @var RulePool + */ + protected $rulePool; + + /** + * Constructor + * + * @param Filesystem $filesystem + * @param RulePool $rulePool + * @param Fallback\CacheDataInterface $cache + */ + public function __construct(Filesystem $filesystem, RulePool $rulePool, Fallback\CacheDataInterface $cache) + { + $this->rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR); + $this->rulePool = $rulePool; + $this->cache = $cache; + } + + /** + * {@inheritdoc} + */ + public function resolve($type, $file, $area = null, ThemeInterface $theme = null, $locale = null, $module = null) + { + self::assertFilePathFormat($file); + $themePath = $theme ? $theme->getThemePath() : ''; + $path = $this->cache->getFromCache($type, $file, $area, $themePath, $locale, $module); + if (false !== $path) { + $path = $path ? $this->rootDirectory->getAbsolutePath($path) : false; + } else { + $params = ['area' => $area, 'theme' => $theme, 'locale' => $locale]; + foreach ($params as $key => $param) { + if ($param === null) { + unset($params[$key]); + } + } + if (!empty($module)) { + list($params['namespace'], $params['module']) = explode('_', $module, 2); + } + $path = $this->resolveFile($this->rulePool->getRule($type), $file, $params); + $cachedValue = $path ? $this->rootDirectory->getRelativePath($path) : ''; + + $this->cache->saveToCache($cachedValue, $type, $file, $area, $themePath, $locale, $module); + } + return $path; + } + + /** + * Validate the file path format + * + * @param string $filePath + * @throws \InvalidArgumentException + * @return void + */ + public static function assertFilePathFormat($filePath) + { + if (strpos(str_replace('\\', '/', $filePath), './') !== false) { + throw new \InvalidArgumentException("File path '{$filePath}' is forbidden for security reasons."); + } + } + + /** + * Get path of file after using fallback rules + * + * @param RuleInterface $fallbackRule + * @param string $file + * @param array $params + * @return string|bool + */ + protected function resolveFile(RuleInterface $fallbackRule, $file, array $params = array()) + { + foreach ($fallbackRule->getPatternDirs($params) as $dir) { + $path = "{$dir}/{$file}"; + if ($this->rootDirectory->isExist($this->rootDirectory->getRelativePath($path))) { + return $path; + } + } + return false; + } +} diff --git a/lib/Magento/Framework/View/Design/FileResolution/Strategy/ViewInterface.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/ResolverInterface.php similarity index 66% rename from lib/Magento/Framework/View/Design/FileResolution/Strategy/ViewInterface.php rename to lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/ResolverInterface.php index 6d0dae5cf4a28fa44858fdbbb9f62b2bd49f1062..7cb203b9bbac60f82f5a3d6c0a0f55d6df8480bf 100644 --- a/lib/Magento/Framework/View/Design/FileResolution/Strategy/ViewInterface.php +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/ResolverInterface.php @@ -21,26 +21,27 @@ * @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) */ -namespace Magento\Framework\View\Design\FileResolution\Strategy; +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +use Magento\Framework\View\Design\FileResolution\Fallback; use Magento\Framework\View\Design\ThemeInterface; /** - * View Interface - * - * Interface for 'view' file resolution strategy + * Interface for resolvers of view files using fallback rules */ -interface ViewInterface +interface ResolverInterface { /** - * Get theme file name (e.g. a javascript file) + * Get path of file after using fallback rules * - * @param string $area - * @param ThemeInterface $themeModel - * @param string $locale + * @param string $type * @param string $file + * @param string|null $area + * @param ThemeInterface|null $theme + * @param string|null $locale * @param string|null $module - * @return string + * @return string|false */ - public function getViewFile($area, ThemeInterface $themeModel, $locale, $file, $module = null); + public function resolve($type, $file, $area = null, ThemeInterface $theme = null, $locale = null, $module = null); } diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/StaticFile.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/StaticFile.php new file mode 100644 index 0000000000000000000000000000000000000000..c7afb24219ad331e4ebafe3606f32c1330b9baf8 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/StaticFile.php @@ -0,0 +1,71 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\FileResolution\Fallback; + +use Magento\Framework\View\Design\ThemeInterface; + +/** + * Provider of static view files + */ +class StaticFile +{ + /** + * @var ResolverInterface + */ + private $resolver; + + /** + * Constructor + * + * @param ResolverInterface $resolver + */ + public function __construct(ResolverInterface $resolver) + { + $this->resolver = $resolver; + } + + /** + * Get a static view file name, using fallback mechanism + * + * @param string $area + * @param ThemeInterface $themeModel + * @param string $locale + * @param string $file + * @param string|null $module + * @return string|bool + */ + public function getFile($area, ThemeInterface $themeModel, $locale, $file, $module = null) + { + return $this->resolver->resolve($this->getFallbackType(), $file, $area, $themeModel, $locale, $module); + } + + /** + * @return string + */ + protected function getFallbackType() + { + return \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE; + } +} diff --git a/lib/Magento/Framework/View/PublicFilesManagerInterface.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php similarity index 78% rename from lib/Magento/Framework/View/PublicFilesManagerInterface.php rename to lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php index 3e2d5e100cfc19237f45a8374304b3895f535c69..f9f9b43d513bace3fa99b4d6db83f646d6c2bcd4 100644 --- a/lib/Magento/Framework/View/PublicFilesManagerInterface.php +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php @@ -21,19 +21,19 @@ * @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) */ -namespace Magento\Framework\View; + +namespace Magento\Framework\View\Design\FileResolution\Fallback; /** - * FileSystem Interface + * Provider of template view files */ -interface PublicFilesManagerInterface +class TemplateFile extends File { /** - * Get public file path - * - * @param string $filePath - * @param array $params * @return string */ - public function getPublicFilePath($filePath, $params); + protected function getFallbackType() + { + return \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE; + } } diff --git a/lib/Magento/Framework/View/Design/Theme/Customization.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/ConfigInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/ConfigInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/ConfigInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/File/Css.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/File/Css.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/File/Css.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/File/Css.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/File/Js.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/File/Js.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/File/Js.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/File/Js.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/FileAssetInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/FileAssetInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/FileAssetInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/FileAssetInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/FileInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/FileInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/FileInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/FileInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/FileServiceFactory.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/FileServiceFactory.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/FileServiceFactory.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/FileServiceFactory.php diff --git a/lib/Magento/Framework/View/Design/Theme/Customization/Path.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/Path.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Customization/Path.php rename to lib/internal/Magento/Framework/View/Design/Theme/Customization/Path.php diff --git a/lib/Magento/Framework/View/Design/Theme/CustomizationInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/CustomizationInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/CustomizationInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/CustomizationInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/Domain/Factory.php b/lib/internal/Magento/Framework/View/Design/Theme/Domain/Factory.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Domain/Factory.php rename to lib/internal/Magento/Framework/View/Design/Theme/Domain/Factory.php diff --git a/lib/Magento/Framework/View/Design/Theme/Domain/PhysicalInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Domain/PhysicalInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Domain/PhysicalInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Domain/PhysicalInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/Domain/StagingInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Domain/StagingInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Domain/StagingInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Domain/StagingInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/Domain/VirtualInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Domain/VirtualInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Domain/VirtualInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Domain/VirtualInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/File/CollectionInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/File/CollectionInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/File/CollectionInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/File/CollectionInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/FileFactory.php b/lib/internal/Magento/Framework/View/Design/Theme/FileFactory.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/FileFactory.php rename to lib/internal/Magento/Framework/View/Design/Theme/FileFactory.php diff --git a/lib/Magento/Framework/View/Design/Theme/FileInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/FileInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/FileInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/FileInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/FileProviderInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/FileProviderInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/FileProviderInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/FileProviderInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/FlyweightFactory.php b/lib/internal/Magento/Framework/View/Design/Theme/FlyweightFactory.php similarity index 84% rename from lib/Magento/Framework/View/Design/Theme/FlyweightFactory.php rename to lib/internal/Magento/Framework/View/Design/Theme/FlyweightFactory.php index 3a81833a72abaf5cf103b4dbd48a9439bd193004..6ca7c5c85c9dbda7c1910cede11de9afbc5dd9fd 100644 --- a/lib/Magento/Framework/View/Design/Theme/FlyweightFactory.php +++ b/lib/internal/Magento/Framework/View/Design/Theme/FlyweightFactory.php @@ -66,23 +66,41 @@ class FlyweightFactory * @param string $area * @return \Magento\Framework\View\Design\ThemeInterface|null * @throws \InvalidArgumentException + * @throws \LogicException */ public function create($themeKey, $area = \Magento\Framework\View\DesignInterface::DEFAULT_AREA) { + if (!is_numeric($themeKey) && !is_string($themeKey)) { + throw new \InvalidArgumentException('Incorrect theme identification key'); + } + $themeKey = $this->extractThemeId($themeKey); if (is_numeric($themeKey)) { $themeModel = $this->_loadById($themeKey); - } elseif (is_string($themeKey)) { - $themeModel = $this->_loadByPath($themeKey, $area); } else { - throw new \InvalidArgumentException('Incorrect theme identification key'); + $themeModel = $this->_loadByPath($themeKey, $area); } if (!$themeModel->getId()) { - return null; + throw new \LogicException("Unable to load theme by specified key: '{$themeKey}'"); } $this->_addTheme($themeModel); return $themeModel; } + /** + * Attempt to determine a numeric theme ID from the specified path + * + * @param string $path + * @return string + */ + private function extractThemeId($path) + { + $dir = \Magento\Framework\View\DesignInterface::PUBLIC_THEME_DIR; + if (preg_match('/^' . preg_quote($dir, '/') . '(\d+)$/', $path, $matches)) { + return $matches[1]; + } + return $path; + } + /** * Load theme by id * diff --git a/lib/Magento/Framework/View/Design/Theme/Image.php b/lib/internal/Magento/Framework/View/Design/Theme/Image.php similarity index 52% rename from lib/Magento/Framework/View/Design/Theme/Image.php rename to lib/internal/Magento/Framework/View/Design/Theme/Image.php index ed8bd18bd3ad84fe35e8bb087705dab59867a05e..dfd36776e0a4d083a86c2d6d870e3a3c5f84d9b9 100644 --- a/lib/Magento/Framework/View/Design/Theme/Image.php +++ b/lib/internal/Magento/Framework/View/Design/Theme/Image.php @@ -24,6 +24,7 @@ namespace Magento\Framework\View\Design\Theme; use Magento\Framework\Filesystem\Directory\WriteInterface; +use Magento\Framework\View\Design\ThemeInterface; /** * Theme Image model class @@ -40,47 +41,61 @@ class Image */ const PREVIEW_IMAGE_HEIGHT = 800; + /** + * Media directory + * + * @var WriteInterface + */ + protected $mediaDirectory; + + /** + * Root directory + * + * @var WriteInterface + */ + protected $rootDirectory; + /** * Image factory * * @var \Magento\Framework\Image\Factory */ - protected $_imageFactory; + protected $imageFactory; /** * Image uploader * * @var Image\Uploader */ - protected $_uploader; + protected $uploader; /** * Theme image path * * @var Image\PathInterface */ - protected $_themeImagePath; + protected $themeImagePath; /** * Logger * * @var \Magento\Framework\Logger */ - protected $_logger; + protected $logger; /** * Theme * - * @var \Magento\Framework\View\Design\ThemeInterface + * @var ThemeInterface */ - protected $_theme; + protected $theme; /** - * Media directory + * Width and height of preview image * - * @var WriteInterface + * @var array */ - protected $_mediaDirectory; + protected $imageParams; /** * Initialize dependencies @@ -90,7 +105,8 @@ class Image * @param Image\Uploader $uploader * @param Image\PathInterface $themeImagePath * @param \Magento\Framework\Logger $logger - * @param \Magento\Framework\View\Design\ThemeInterface $theme + * @param array $imageParams + * @param ThemeInterface $theme */ public function __construct( \Magento\Framework\App\Filesystem $filesystem, @@ -98,14 +114,17 @@ class Image Image\Uploader $uploader, Image\PathInterface $themeImagePath, \Magento\Framework\Logger $logger, - \Magento\Framework\View\Design\ThemeInterface $theme = null + array $imageParams = array(self::PREVIEW_IMAGE_WIDTH, self::PREVIEW_IMAGE_HEIGHT), + ThemeInterface $theme = null ) { - $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); - $this->_imageFactory = $imageFactory; - $this->_uploader = $uploader; - $this->_themeImagePath = $themeImagePath; - $this->_logger = $logger; - $this->_theme = $theme; + $this->mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); + $this->rootDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); + $this->imageFactory = $imageFactory; + $this->uploader = $uploader; + $this->themeImagePath = $themeImagePath; + $this->logger = $logger; + $this->imageParams = $imageParams; + $this->theme = $theme; } /** @@ -116,43 +135,44 @@ class Image */ public function createPreviewImage($imagePath) { - $image = $this->_imageFactory->create($imagePath); + list($imageWidth, $imageHeight) = $this->imageParams; + $image = $this->imageFactory->create($imagePath); $image->keepTransparency(true); $image->constrainOnly(true); $image->keepFrame(true); $image->keepAspectRatio(true); $image->backgroundColor(array(255, 255, 255)); - $image->resize(self::PREVIEW_IMAGE_WIDTH, self::PREVIEW_IMAGE_HEIGHT); + $image->resize($imageWidth, $imageHeight); $imageName = uniqid('preview_image_') . image_type_to_extension($image->getMimeType()); - $image->save($this->_themeImagePath->getImagePreviewDirectory(), $imageName); - $this->_theme->setPreviewImage($imageName); + $image->save($this->themeImagePath->getImagePreviewDirectory(), $imageName); + $this->theme->setPreviewImage($imageName); return $this; } /** * Create preview image duplicate * - * @param string $previewImagePath + * @param ThemeInterface $theme * @return bool */ - public function createPreviewImageCopy($previewImagePath) + public function createPreviewImageCopy(ThemeInterface $theme) { - $previewDir = $this->_themeImagePath->getImagePreviewDirectory(); - $destinationFilePath = $previewDir . '/' . $previewImagePath; - $destinationFileRelative = $this->_mediaDirectory->getRelativePath($destinationFilePath); - if (empty($previewImagePath) && !$this->_mediaDirectory->isExist($destinationFileRelative)) { + $previewDir = $this->themeImagePath->getImagePreviewDirectory(); + $sourcePath = $theme->getThemeImage()->getPreviewImagePath(); + $sourceRelativePath = $this->rootDirectory->getRelativePath($sourcePath); + if (!$theme->getPreviewImage() && !$this->mediaDirectory->isExist($sourceRelativePath)) { return false; } - $isCopied = false; try { - $destinationFileName = \Magento\Framework\File\Uploader::getNewFileName($destinationFilePath); - $targetRelative = $this->_mediaDirectory->getRelativePath($previewDir . '/' . $destinationFileName); - $isCopied = $this->_mediaDirectory->copyFile($destinationFileRelative, $targetRelative); - $this->_theme->setPreviewImage($destinationFileName); - } catch (\Exception $e) { - $this->_logger->logException($e); + $destinationFileName = \Magento\Framework\File\Uploader::getNewFileName($sourcePath); + $targetRelativePath = $this->mediaDirectory->getRelativePath($previewDir . '/' . $destinationFileName); + $isCopied = $this->rootDirectory->copyFile($sourceRelativePath, $targetRelativePath, $this->mediaDirectory); + $this->theme->setPreviewImage($destinationFileName); + } catch (\Magento\Framework\Filesystem\FilesystemException $e) { + $this->theme->setPreviewImage(null); + $this->logger->logException($e); } return $isCopied; } @@ -164,14 +184,11 @@ class Image */ public function removePreviewImage() { - $previewImage = $this->_theme->getPreviewImage(); - $this->_theme->setPreviewImage(null); + $previewImage = $this->theme->getPreviewImage(); + $this->theme->setPreviewImage(null); if ($previewImage) { - return $this->_mediaDirectory->delete( - $this->_mediaDirectory->getRelativePath( - $this->_themeImagePath->getImagePreviewDirectory() . '/' . $previewImage - ) - ); + $previewImagePath = $this->themeImagePath->getImagePreviewDirectory() . '/' . $previewImage; + return $this->mediaDirectory->delete($this->mediaDirectory->getRelativePath($previewImagePath)); } return false; } @@ -184,29 +201,38 @@ class Image */ public function uploadPreviewImage($scope) { - $tmpDirPath = $this->_themeImagePath->getTemporaryDirectory(); - $tmpFilePath = $this->_uploader->uploadPreviewImage($scope, $tmpDirPath); + $tmpDirPath = $this->themeImagePath->getTemporaryDirectory(); + $tmpFilePath = $this->uploader->uploadPreviewImage($scope, $tmpDirPath); if ($tmpFilePath) { - if ($this->_theme->getPreviewImage()) { + if ($this->theme->getPreviewImage()) { $this->removePreviewImage(); } $this->createPreviewImage($tmpFilePath); - $this->_mediaDirectory->delete($tmpFilePath); + $this->mediaDirectory->delete($tmpFilePath); } return $this; } /** - * Get url for themes preview image + * Get path to preview image + * + * @return string + */ + public function getPreviewImagePath() + { + return $this->themeImagePath->getPreviewImagePath($this->theme); + } + + /** + * Get url of theme preview image * * @return string */ public function getPreviewImageUrl() { - $previewImage = $this->_theme->getPreviewImage(); - if ($previewImage) { - return $this->_themeImagePath->getPreviewImageDirectoryUrl() . $previewImage; - } - return $this->_themeImagePath->getPreviewImageDefaultUrl(); + $previewImage = $this->theme->getPreviewImage(); + return empty($previewImage) + ? $this->themeImagePath->getPreviewImageDefaultUrl() + : $this->themeImagePath->getPreviewImageUrl($this->theme); } } diff --git a/lib/Magento/Framework/View/Design/Theme/Image/PathInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Image/PathInterface.php similarity index 82% rename from lib/Magento/Framework/View/Design/Theme/Image/PathInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Image/PathInterface.php index 76ac240b84a23612f296ae7430c527102a8218ee..4208923e38f4e843e5c025d024aff2ef2d00f3ce 100644 --- a/lib/Magento/Framework/View/Design/Theme/Image/PathInterface.php +++ b/lib/internal/Magento/Framework/View/Design/Theme/Image/PathInterface.php @@ -23,6 +23,8 @@ */ namespace Magento\Framework\View\Design\Theme\Image; +use Magento\Framework\View\Design\ThemeInterface; + /** * Theme Image Path interface */ @@ -36,9 +38,18 @@ interface PathInterface /** * Get preview image directory url * + * @param ThemeInterface $theme + * @return string + */ + public function getPreviewImageUrl(ThemeInterface $theme); + + /** + * Get path to preview image + * + * @param \Magento\Core\Model\Theme|ThemeInterface $theme * @return string */ - public function getPreviewImageDirectoryUrl(); + public function getPreviewImagePath(ThemeInterface $theme); /** * Return default themes preview image url diff --git a/lib/Magento/Framework/View/Design/Theme/Image/Uploader.php b/lib/internal/Magento/Framework/View/Design/Theme/Image/Uploader.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Image/Uploader.php rename to lib/internal/Magento/Framework/View/Design/Theme/Image/Uploader.php diff --git a/lib/Magento/Framework/View/Design/Theme/ImageFactory.php b/lib/internal/Magento/Framework/View/Design/Theme/ImageFactory.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/ImageFactory.php rename to lib/internal/Magento/Framework/View/Design/Theme/ImageFactory.php diff --git a/lib/Magento/Framework/View/Design/Theme/Label.php b/lib/internal/Magento/Framework/View/Design/Theme/Label.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Label.php rename to lib/internal/Magento/Framework/View/Design/Theme/Label.php diff --git a/lib/Magento/Framework/View/Design/Theme/Label/ListInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Label/ListInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Label/ListInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/Label/ListInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/LabelFactory.php b/lib/internal/Magento/Framework/View/Design/Theme/LabelFactory.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/LabelFactory.php rename to lib/internal/Magento/Framework/View/Design/Theme/LabelFactory.php diff --git a/lib/Magento/Framework/View/Design/Theme/ListInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/ListInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/ListInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/ListInterface.php diff --git a/lib/internal/Magento/Framework/View/Design/Theme/Provider.php b/lib/internal/Magento/Framework/View/Design/Theme/Provider.php new file mode 100644 index 0000000000000000000000000000000000000000..80476a217886c5022e72816213700ad38489038c --- /dev/null +++ b/lib/internal/Magento/Framework/View/Design/Theme/Provider.php @@ -0,0 +1,75 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ + +namespace Magento\Framework\View\Design\Theme; + +class Provider +{ + /** + * @var \Magento\Framework\App\State + */ + protected $appState; + + /** + * @var FlyweightFactory + */ + private $flyweightFactory; + + /** + * @var ListInterface + */ + private $themeList; + + /** + * @param \Magento\Framework\App\State $appState + * @param FlyweightFactory $flyweightFactory + * @param ListInterface $themeList + */ + public function __construct( + \Magento\Framework\App\State $appState, + FlyweightFactory $flyweightFactory, + ListInterface $themeList + ) { + $this->appState = $appState; + $this->flyweightFactory = $flyweightFactory; + $this->themeList = $themeList; + } + + /** + * Get theme model by theme path and area code + * + * @param string $themePath + * @param string $areaCode + * @return \Magento\Framework\View\Design\ThemeInterface + */ + public function getThemeModel($themePath, $areaCode) + { + if ($this->appState->isInstalled()) { + $themeModel = $this->flyweightFactory->create($themePath, $areaCode); + } else { + $themeModel = $this->themeList->getThemeByFullPath($areaCode . '/' . $themePath); + } + return $themeModel; + } +} diff --git a/lib/Magento/Framework/View/Design/Theme/ResolverInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/ResolverInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/ResolverInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/ResolverInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/ThemeProviderInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/ThemeProviderInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/ThemeProviderInterface.php rename to lib/internal/Magento/Framework/View/Design/Theme/ThemeProviderInterface.php diff --git a/lib/Magento/Framework/View/Design/Theme/Validator.php b/lib/internal/Magento/Framework/View/Design/Theme/Validator.php similarity index 100% rename from lib/Magento/Framework/View/Design/Theme/Validator.php rename to lib/internal/Magento/Framework/View/Design/Theme/Validator.php diff --git a/lib/Magento/Framework/View/Design/ThemeFactory.php b/lib/internal/Magento/Framework/View/Design/ThemeFactory.php similarity index 100% rename from lib/Magento/Framework/View/Design/ThemeFactory.php rename to lib/internal/Magento/Framework/View/Design/ThemeFactory.php diff --git a/lib/Magento/Framework/View/Design/ThemeInterface.php b/lib/internal/Magento/Framework/View/Design/ThemeInterface.php similarity index 100% rename from lib/Magento/Framework/View/Design/ThemeInterface.php rename to lib/internal/Magento/Framework/View/Design/ThemeInterface.php diff --git a/lib/Magento/Framework/View/DesignExceptions.php b/lib/internal/Magento/Framework/View/DesignExceptions.php similarity index 100% rename from lib/Magento/Framework/View/DesignExceptions.php rename to lib/internal/Magento/Framework/View/DesignExceptions.php diff --git a/lib/Magento/Framework/View/DesignInterface.php b/lib/internal/Magento/Framework/View/DesignInterface.php similarity index 83% rename from lib/Magento/Framework/View/DesignInterface.php rename to lib/internal/Magento/Framework/View/DesignInterface.php index b6865ab9f5d33bca1514f3f7858d9673a96efd0a..4a5a95b176ecb1bae78c4605b95ef5c47cf4df5f 100644 --- a/lib/Magento/Framework/View/DesignInterface.php +++ b/lib/internal/Magento/Framework/View/DesignInterface.php @@ -33,6 +33,13 @@ interface DesignInterface */ const DEFAULT_AREA = 'frontend'; + /**#@+ + * Public directories prefix group + */ + const PUBLIC_VIEW_DIR = '_view'; + const PUBLIC_THEME_DIR = '_theme'; + /**#@-*/ + /** * Common node path to theme design configuration */ @@ -86,6 +93,21 @@ interface DesignInterface */ public function getDesignTheme(); + /** + * Convert theme model into a theme path literal + * + * @param Design\ThemeInterface $theme + * @return string + */ + public function getThemePath(Design\ThemeInterface $theme); + + /** + * Get locale + * + * @return string + */ + public function getLocale(); + /** * Get design settings for current request * diff --git a/lib/Magento/Framework/View/DesignLoader.php b/lib/internal/Magento/Framework/View/DesignLoader.php similarity index 100% rename from lib/Magento/Framework/View/DesignLoader.php rename to lib/internal/Magento/Framework/View/DesignLoader.php diff --git a/lib/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php similarity index 98% rename from lib/Magento/Framework/View/Element/AbstractBlock.php rename to lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 40835052286074ec306c0bc15730c82869463617..e84a5d090897e811ede2925d5bca0b074a868480 100644 --- a/lib/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -113,11 +113,11 @@ abstract class AbstractBlock extends \Magento\Framework\Object implements BlockI protected $_frontController; /** - * View URL + * Asset service * - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * View config model @@ -195,7 +195,7 @@ abstract class AbstractBlock extends \Magento\Framework\Object implements BlockI $this->_session = $context->getSession(); $this->_sidResolver = $context->getSidResolver(); $this->_scopeConfig = $context->getScopeConfig(); - $this->_viewUrl = $context->getViewUrl(); + $this->_assetRepo = $context->getAssetRepository(); $this->_viewConfig = $context->getViewConfig(); $this->_cacheState = $context->getCacheState(); $this->_logger = $context->getLogger(); @@ -719,17 +719,17 @@ abstract class AbstractBlock extends \Magento\Framework\Object implements BlockI } /** - * Retrieve url of themes file + * Retrieve url of a view file * - * @param string $file path to file in theme + * @param string $fileId * @param array $params * @return string */ - public function getViewFileUrl($file = null, array $params = array()) + public function getViewFileUrl($fileId, array $params = array()) { try { $params = array_merge(array('_secure' => $this->getRequest()->isSecure()), $params); - return $this->_viewUrl->getViewFileUrl($file, $params); + return $this->_assetRepo->getUrlWithParams($fileId, $params); } catch (\Magento\Framework\Exception $e) { $this->_logger->logException($e); return $this->_getNotFoundUrl(); diff --git a/lib/Magento/Framework/View/Element/BlockFactory.php b/lib/internal/Magento/Framework/View/Element/BlockFactory.php similarity index 100% rename from lib/Magento/Framework/View/Element/BlockFactory.php rename to lib/internal/Magento/Framework/View/Element/BlockFactory.php diff --git a/lib/Magento/Framework/View/Element/BlockInterface.php b/lib/internal/Magento/Framework/View/Element/BlockInterface.php similarity index 100% rename from lib/Magento/Framework/View/Element/BlockInterface.php rename to lib/internal/Magento/Framework/View/Element/BlockInterface.php diff --git a/lib/Magento/Framework/View/Element/Context.php b/lib/internal/Magento/Framework/View/Element/Context.php similarity index 95% rename from lib/Magento/Framework/View/Element/Context.php rename to lib/internal/Magento/Framework/View/Element/Context.php index 465942f2ad2f21db93f4619991698546c1c53ebd..b704a00cc40dd5a785878405f9b4d35332570df1 100644 --- a/lib/Magento/Framework/View/Element/Context.php +++ b/lib/internal/Magento/Framework/View/Element/Context.php @@ -105,11 +105,9 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface protected $_scopeConfig; /** - * View URL - * - * @var \Magento\Framework\View\Url + * @var \Magento\Framework\View\Asset\Repository */ - protected $_viewUrl; + protected $_assetRepo; /** * View config model @@ -167,7 +165,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface * @param \Magento\Framework\Session\SessionManagerInterface $session * @param \Magento\Framework\Session\SidResolverInterface $sidResolver * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\ConfigInterface $viewConfig * @param \Magento\Framework\App\Cache\StateInterface $cacheState * @param \Magento\Framework\Logger $logger @@ -189,7 +187,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\Logger $logger, @@ -208,7 +206,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface $this->_session = $session; $this->_sidResolver = $sidResolver; $this->_scopeConfig = $scopeConfig; - $this->_viewUrl = $viewUrl; + $this->_assetRepo = $assetRepo; $this->_viewConfig = $viewConfig; $this->_cacheState = $cacheState; $this->_logger = $logger; @@ -329,13 +327,13 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface } /** - * Get view URL + * Get asset service * - * @return \Magento\Framework\View\Url + * @return \Magento\Framework\View\Asset\Repository */ - public function getViewUrl() + public function getAssetRepository() { - return $this->_viewUrl; + return $this->_assetRepo; } /** diff --git a/lib/Magento/Framework/View/Element/FormKey.php b/lib/internal/Magento/Framework/View/Element/FormKey.php similarity index 100% rename from lib/Magento/Framework/View/Element/FormKey.php rename to lib/internal/Magento/Framework/View/Element/FormKey.php diff --git a/lib/Magento/Framework/View/Element/Html/Calendar.php b/lib/internal/Magento/Framework/View/Element/Html/Calendar.php similarity index 100% rename from lib/Magento/Framework/View/Element/Html/Calendar.php rename to lib/internal/Magento/Framework/View/Element/Html/Calendar.php diff --git a/lib/Magento/Framework/View/Element/Html/Date.php b/lib/internal/Magento/Framework/View/Element/Html/Date.php similarity index 100% rename from lib/Magento/Framework/View/Element/Html/Date.php rename to lib/internal/Magento/Framework/View/Element/Html/Date.php diff --git a/lib/Magento/Framework/View/Element/Html/Link.php b/lib/internal/Magento/Framework/View/Element/Html/Link.php similarity index 100% rename from lib/Magento/Framework/View/Element/Html/Link.php rename to lib/internal/Magento/Framework/View/Element/Html/Link.php diff --git a/lib/Magento/Framework/View/Element/Html/Link/Current.php b/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php similarity index 100% rename from lib/Magento/Framework/View/Element/Html/Link/Current.php rename to lib/internal/Magento/Framework/View/Element/Html/Link/Current.php diff --git a/lib/Magento/Framework/View/Element/Html/Links.php b/lib/internal/Magento/Framework/View/Element/Html/Links.php similarity index 100% rename from lib/Magento/Framework/View/Element/Html/Links.php rename to lib/internal/Magento/Framework/View/Element/Html/Links.php diff --git a/lib/Magento/Framework/View/Element/Html/Select.php b/lib/internal/Magento/Framework/View/Element/Html/Select.php similarity index 100% rename from lib/Magento/Framework/View/Element/Html/Select.php rename to lib/internal/Magento/Framework/View/Element/Html/Select.php diff --git a/lib/Magento/Framework/View/Element/Js/Components.php b/lib/internal/Magento/Framework/View/Element/Js/Components.php similarity index 100% rename from lib/Magento/Framework/View/Element/Js/Components.php rename to lib/internal/Magento/Framework/View/Element/Js/Components.php diff --git a/lib/Magento/Framework/View/Element/Js/Cookie.php b/lib/internal/Magento/Framework/View/Element/Js/Cookie.php similarity index 100% rename from lib/Magento/Framework/View/Element/Js/Cookie.php rename to lib/internal/Magento/Framework/View/Element/Js/Cookie.php diff --git a/lib/Magento/Framework/View/Element/Messages.php b/lib/internal/Magento/Framework/View/Element/Messages.php similarity index 100% rename from lib/Magento/Framework/View/Element/Messages.php rename to lib/internal/Magento/Framework/View/Element/Messages.php diff --git a/lib/Magento/Framework/View/Element/Redirect.php b/lib/internal/Magento/Framework/View/Element/Redirect.php similarity index 100% rename from lib/Magento/Framework/View/Element/Redirect.php rename to lib/internal/Magento/Framework/View/Element/Redirect.php diff --git a/lib/Magento/Framework/View/Element/RendererInterface.php b/lib/internal/Magento/Framework/View/Element/RendererInterface.php similarity index 100% rename from lib/Magento/Framework/View/Element/RendererInterface.php rename to lib/internal/Magento/Framework/View/Element/RendererInterface.php diff --git a/lib/Magento/Framework/View/Element/RendererList.php b/lib/internal/Magento/Framework/View/Element/RendererList.php similarity index 100% rename from lib/Magento/Framework/View/Element/RendererList.php rename to lib/internal/Magento/Framework/View/Element/RendererList.php diff --git a/lib/Magento/Framework/View/Element/Template.php b/lib/internal/Magento/Framework/View/Element/Template.php similarity index 99% rename from lib/Magento/Framework/View/Element/Template.php rename to lib/internal/Magento/Framework/View/Element/Template.php index ed5dfa921d3f2080d584be77ba180f3f92fb173e..6f735ca19873bc3735548330de8a15522afe6cf2 100644 --- a/lib/Magento/Framework/View/Element/Template.php +++ b/lib/internal/Magento/Framework/View/Element/Template.php @@ -208,7 +208,7 @@ class Template extends AbstractBlock if ($area) { $params['area'] = $area; } - $templateName = $this->_viewFileSystem->getFilename($this->getTemplate(), $params); + $templateName = $this->_viewFileSystem->getTemplateFileName($this->getTemplate(), $params); return $templateName; } diff --git a/lib/Magento/Framework/View/Element/Template/Context.php b/lib/internal/Magento/Framework/View/Element/Template/Context.php similarity index 97% rename from lib/Magento/Framework/View/Element/Template/Context.php rename to lib/internal/Magento/Framework/View/Element/Template/Context.php index e2615526195ee931f6ca7c020c957fba87fac172..b19e30b060d233805ed7b1b60cf30b082061c3a0 100644 --- a/lib/Magento/Framework/View/Element/Template/Context.php +++ b/lib/internal/Magento/Framework/View/Element/Template/Context.php @@ -69,7 +69,7 @@ class Context extends \Magento\Framework\View\Element\Context * @param \Magento\Framework\Session\SessionManagerInterface $session * @param \Magento\Framework\Session\SidResolverInterface $sidResolver * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\ConfigInterface $viewConfig * @param \Magento\Framework\App\Cache\StateInterface $cacheState * @param \Magento\Framework\Logger $logger @@ -96,7 +96,7 @@ class Context extends \Magento\Framework\View\Element\Context \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\Logger $logger, @@ -121,7 +121,7 @@ class Context extends \Magento\Framework\View\Element\Context $session, $sidResolver, $scopeConfig, - $viewUrl, + $assetRepo, $viewConfig, $cacheState, $logger, diff --git a/lib/Magento/Framework/View/Element/Text.php b/lib/internal/Magento/Framework/View/Element/Text.php similarity index 100% rename from lib/Magento/Framework/View/Element/Text.php rename to lib/internal/Magento/Framework/View/Element/Text.php diff --git a/lib/Magento/Framework/View/Element/Text/ListText.php b/lib/internal/Magento/Framework/View/Element/Text/ListText.php similarity index 100% rename from lib/Magento/Framework/View/Element/Text/ListText.php rename to lib/internal/Magento/Framework/View/Element/Text/ListText.php diff --git a/lib/Magento/Framework/View/Element/Text/TextList/Item.php b/lib/internal/Magento/Framework/View/Element/Text/TextList/Item.php similarity index 100% rename from lib/Magento/Framework/View/Element/Text/TextList/Item.php rename to lib/internal/Magento/Framework/View/Element/Text/TextList/Item.php diff --git a/lib/Magento/Framework/View/Element/Text/TextList/Link.php b/lib/internal/Magento/Framework/View/Element/Text/TextList/Link.php similarity index 100% rename from lib/Magento/Framework/View/Element/Text/TextList/Link.php rename to lib/internal/Magento/Framework/View/Element/Text/TextList/Link.php diff --git a/lib/Magento/Framework/View/Layout/File.php b/lib/internal/Magento/Framework/View/File.php similarity index 95% rename from lib/Magento/Framework/View/Layout/File.php rename to lib/internal/Magento/Framework/View/File.php index 7d4def29ba34fad6d460bdf037b8ca5479cd3181..a5818402b236843f9b1b4084949db963cb72b8d9 100644 --- a/lib/Magento/Framework/View/Layout/File.php +++ b/lib/internal/Magento/Framework/View/File.php @@ -21,12 +21,13 @@ * @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) */ -namespace Magento\Framework\View\Layout; + +namespace Magento\Framework\View; use Magento\Framework\View\Design\ThemeInterface; /** - * Layout file in the file system with context of its identity + * View file in the file system with context of its identity */ class File { @@ -132,7 +133,7 @@ class File } /** - * Calculate unique identifier for a layout file + * Calculate unique identifier for a view file * * @return string */ diff --git a/lib/Magento/Framework/View/Layout/File/Source/Base.php b/lib/internal/Magento/Framework/View/File/Collector/Base.php similarity index 76% rename from lib/Magento/Framework/View/Layout/File/Source/Base.php rename to lib/internal/Magento/Framework/View/File/Collector/Base.php index 0a01eeab4125a654506765b8661818cb2f1dee2c..0ca54a869ab93ebcd97863f55383d479ec8535c4 100644 --- a/lib/Magento/Framework/View/Layout/File/Source/Base.php +++ b/lib/internal/Magento/Framework/View/File/Collector/Base.php @@ -21,18 +21,18 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source; +namespace Magento\Framework\View\File\Collector; -use Magento\Framework\View\Layout\File\SourceInterface; +use Magento\Framework\View\File\CollectorInterface; use Magento\Framework\View\Design\ThemeInterface; use Magento\Framework\App\Filesystem; use Magento\Framework\Filesystem\Directory\ReadInterface; -use Magento\Framework\View\Layout\File\Factory; +use Magento\Framework\View\File\Factory; /** - * Source of base layout files introduced by modules + * Source of base files introduced by modules */ -class Base implements SourceInterface +class Base implements CollectorInterface { /** * File factory @@ -48,16 +48,28 @@ class Base implements SourceInterface */ protected $modulesDirectory; + /** + * Subdirectory where the files are located + * + * @var string + */ + protected $subDir; + /** * Constructor * * @param Filesystem $filesystem * @param Factory $fileFactory + * @param string $subDir */ - public function __construct(Filesystem $filesystem, Factory $fileFactory) - { + public function __construct( + Filesystem $filesystem, + Factory $fileFactory, + $subDir = '' + ) { $this->modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR); $this->fileFactory = $fileFactory; + $this->subDir = $subDir ? $subDir . '/' : ''; } /** @@ -65,16 +77,16 @@ class Base implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] + * @return array|\Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $result = []; $namespace = $module = '*'; - $sharedFiles = $this->modulesDirectory->search("{$namespace}/{$module}/view/base/layout/{$filePath}.xml"); + $sharedFiles = $this->modulesDirectory->search("{$namespace}/{$module}/view/base/{$this->subDir}{$filePath}"); $filePathPtn = strtr(preg_quote($filePath), array('\*' => '[^/]+')); - $pattern = "#(?<namespace>[^/]+)/(?<module>[^/]+)/view/base/layout/" . $filePathPtn . "\.xml$#i"; + $pattern = "#(?<namespace>[^/]+)/(?<module>[^/]+)/view/base/{$this->subDir}" . $filePathPtn . "$#i"; foreach ($sharedFiles as $file) { $filename = $this->modulesDirectory->getAbsolutePath($file); if (!preg_match($pattern, $filename, $matches)) { @@ -84,8 +96,8 @@ class Base implements SourceInterface $result[] = $this->fileFactory->create($filename, $moduleFull, null, true); } $area = $theme->getArea(); - $themeFiles = $this->modulesDirectory->search("{$namespace}/{$module}/view/{$area}/layout/{$filePath}.xml"); - $pattern = "#(?<namespace>[^/]+)/(?<module>[^/]+)/view/{$area}/layout/" . $filePathPtn . "\.xml$#i"; + $themeFiles = $this->modulesDirectory->search("{$namespace}/{$module}/view/{$area}/{$this->subDir}{$filePath}"); + $pattern = "#(?<namespace>[^/]+)/(?<module>[^/]+)/view/{$area}/{$this->subDir}" . $filePathPtn . "$#i"; foreach ($themeFiles as $file) { $filename = $this->modulesDirectory->getAbsolutePath($file); if (!preg_match($pattern, $filename, $matches)) { diff --git a/lib/Magento/Framework/View/Layout/File/Source/Decorator/ModuleDependency.php b/lib/internal/Magento/Framework/View/File/Collector/Decorator/ModuleDependency.php similarity index 78% rename from lib/Magento/Framework/View/Layout/File/Source/Decorator/ModuleDependency.php rename to lib/internal/Magento/Framework/View/File/Collector/Decorator/ModuleDependency.php index 0f6997f9d9d197a2e35d17f42b33a50eb9903fef..3325ed64990c8f381f3042c2ad4fbe62d8fa1b6d 100644 --- a/lib/Magento/Framework/View/Layout/File/Source/Decorator/ModuleDependency.php +++ b/lib/internal/Magento/Framework/View/File/Collector/Decorator/ModuleDependency.php @@ -21,22 +21,23 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Decorator; -use Magento\Framework\View\Layout\File\SourceInterface; -use Magento\Framework\View\Layout\File; +namespace Magento\Framework\View\File\Collector\Decorator; + +use Magento\Framework\View\File\CollectorInterface; +use Magento\Framework\View\File; use Magento\Framework\Module\ModuleListInterface; use Magento\Framework\View\Design\ThemeInterface; /** - * Decorator that sorts layout files according to dependencies between modules they belong to + * Decorator that sorts view files according to dependencies between modules they belong to */ -class ModuleDependency implements SourceInterface +class ModuleDependency implements CollectorInterface { /** * Subject * - * @var SourceInterface + * @var CollectorInterface */ private $subject; @@ -57,23 +58,25 @@ class ModuleDependency implements SourceInterface /** * Constructor * - * @param SourceInterface $subject + * @param CollectorInterface $subject * @param ModuleListInterface $listInterface */ - public function __construct(SourceInterface $subject, ModuleListInterface $listInterface) - { + public function __construct( + CollectorInterface $subject, + ModuleListInterface $listInterface + ) { $this->subject = $subject; $this->moduleList = $listInterface; } /** - * Retrieve layout files, sorted by the priority of modules they belong to + * Retrieve view files, sorted by the priority of modules they belong to * * @param ThemeInterface $theme * @param string $filePath - * @return \Magento\Framework\View\Layout\File[] + * @return \Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $result = $this->subject->getFiles($theme, $filePath); usort($result, array($this, 'compareFiles')); @@ -81,7 +84,7 @@ class ModuleDependency implements SourceInterface } /** - * Compare layout files according to the priority of modules they belong to. To be used as a callback for sorting. + * Compare view files according to the priority of modules they belong to. To be used as a callback for sorting. * * @param File $fileOne * @param File $fileTwo @@ -97,7 +100,7 @@ class ModuleDependency implements SourceInterface if ($moduleOnePriority == $moduleTwoPriority) { return strcmp($fileOne->getModule(), $fileTwo->getModule()); } - return $moduleOnePriority < $moduleTwoPriority ? -1 : 1; + return ($moduleOnePriority < $moduleTwoPriority ? -1 : 1); } /** diff --git a/lib/Magento/Framework/View/Layout/File/Source/Decorator/ModuleOutput.php b/lib/internal/Magento/Framework/View/File/Collector/Decorator/ModuleOutput.php similarity index 76% rename from lib/Magento/Framework/View/Layout/File/Source/Decorator/ModuleOutput.php rename to lib/internal/Magento/Framework/View/File/Collector/Decorator/ModuleOutput.php index af6b57c674e4d1c66adca38dee4ebf0589112bbf..621d75a3c617b19969cbbf16dc7f1562ac8e0434 100644 --- a/lib/Magento/Framework/View/Layout/File/Source/Decorator/ModuleOutput.php +++ b/lib/internal/Magento/Framework/View/File/Collector/Decorator/ModuleOutput.php @@ -21,22 +21,23 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Decorator; -use Magento\Framework\View\Layout\File\SourceInterface; -use Magento\Framework\View\Layout\File; +namespace Magento\Framework\View\File\Collector\Decorator; + +use Magento\Framework\View\File\CollectorInterface; +use Magento\Framework\View\File; use Magento\Framework\Module\Manager; use Magento\Framework\View\Design\ThemeInterface; /** - * Decorator that filters out layout files that belong to modules, output of which is prohibited + * Decorator that filters out view files that belong to modules, output of which is prohibited */ -class ModuleOutput implements SourceInterface +class ModuleOutput implements CollectorInterface { /** * Subject * - * @var SourceInterface + * @var CollectorInterface */ private $subject; @@ -50,11 +51,13 @@ class ModuleOutput implements SourceInterface /** * Constructor * - * @param SourceInterface $subject + * @param CollectorInterface $subject * @param Manager $moduleManager */ - public function __construct(SourceInterface $subject, Manager $moduleManager) - { + public function __construct( + CollectorInterface $subject, + Manager $moduleManager + ) { $this->subject = $subject; $this->moduleManager = $moduleManager; } @@ -66,9 +69,9 @@ class ModuleOutput implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] + * @return array|\Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $result = array(); foreach ($this->subject->getFiles($theme, $filePath) as $file) { diff --git a/lib/Magento/Framework/View/Layout/File/Source/Override/Base.php b/lib/internal/Magento/Framework/View/File/Collector/Override/Base.php similarity index 69% rename from lib/Magento/Framework/View/Layout/File/Source/Override/Base.php rename to lib/internal/Magento/Framework/View/File/Collector/Override/Base.php index 6c8becff28e2d0d8662e116a5828860145bfd96c..6cad352478651c94b357e89828b04db96dd0edc9 100644 --- a/lib/Magento/Framework/View/Layout/File/Source/Override/Base.php +++ b/lib/internal/Magento/Framework/View/File/Collector/Override/Base.php @@ -21,23 +21,24 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Override; -use Magento\Framework\View\Layout\File\SourceInterface; +namespace Magento\Framework\View\File\Collector\Override; + +use Magento\Framework\View\File\CollectorInterface; use Magento\Framework\View\Design\ThemeInterface; use Magento\Framework\App\Filesystem; use Magento\Framework\Filesystem\Directory\ReadInterface; -use Magento\Framework\View\Layout\File\Factory; +use Magento\Framework\View\File\Factory; /** - * Source of layout files that explicitly override base files introduced by modules + * Source of view files that explicitly override base files introduced by modules */ -class Base implements SourceInterface +class Base implements CollectorInterface { /** * File factory * - * @var Factory + * @var \Magento\Framework\View\File\Factory */ private $fileFactory; @@ -48,16 +49,26 @@ class Base implements SourceInterface */ protected $themesDirectory; + /** + * @var string + */ + protected $subDir; + /** * Constructor * * @param Filesystem $filesystem * @param Factory $fileFactory + * @param string $subDir */ - public function __construct(Filesystem $filesystem, Factory $fileFactory) - { + public function __construct( + Filesystem $filesystem, + Factory $fileFactory, + $subDir = '' + ) { $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR); $this->fileFactory = $fileFactory; + $this->subDir = $subDir ? $subDir . '/' : ''; } /** @@ -65,19 +76,17 @@ class Base implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] + * @return array|\Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $namespace = $module = '*'; $themePath = $theme->getFullPath(); - $searchPattern = "{$themePath}/{$namespace}_{$module}/layout/override/base/{$filePath}.xml"; + $searchPattern = "{$themePath}/{$namespace}_{$module}/{$this->subDir}{$filePath}"; $files = $this->themesDirectory->search($searchPattern); $result = array(); - $pattern = "#(?<moduleName>[^/]+)/layout/override/base/" . strtr( - preg_quote($filePath), - array('\*' => '[^/]+') - ) . "\.xml$#i"; + $pattern = "#(?<moduleName>[^/]+)/{$this->subDir}" . strtr(preg_quote($filePath), array('\*' => '[^/]+')) + . "$#i"; foreach ($files as $file) { $filename = $this->themesDirectory->getAbsolutePath($file); if (!preg_match($pattern, $filename, $matches)) { diff --git a/lib/Magento/Framework/View/Layout/File/Source/Override/Theme.php b/lib/internal/Magento/Framework/View/File/Collector/Override/ThemeModular.php similarity index 71% rename from lib/Magento/Framework/View/Layout/File/Source/Override/Theme.php rename to lib/internal/Magento/Framework/View/File/Collector/Override/ThemeModular.php index 1c76ffc3c18ae1f386032d467d0f16ea3fac12a5..403c259c84ba17d5b628e1d76761568d1f9fc524 100644 --- a/lib/Magento/Framework/View/Layout/File/Source/Override/Theme.php +++ b/lib/internal/Magento/Framework/View/File/Collector/Override/ThemeModular.php @@ -21,19 +21,20 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source\Override; -use Magento\Framework\View\Layout\File\SourceInterface; +namespace Magento\Framework\View\File\Collector\Override; + +use Magento\Framework\View\File\CollectorInterface; use Magento\Framework\View\Design\ThemeInterface; use Magento\Framework\App\Filesystem; use Magento\Framework\Filesystem\Directory\ReadInterface; -use Magento\Framework\View\Layout\File\Factory; +use Magento\Framework\View\File\Factory; use Magento\Framework\Exception; /** - * Source of layout files that explicitly override files of ancestor themes + * Source of view files that explicitly override modular files of ancestor themes */ -class Theme implements SourceInterface +class ThemeModular implements CollectorInterface { /** * Themes directory @@ -47,18 +48,28 @@ class Theme implements SourceInterface * * @var Factory */ - private $fileFactory; + protected $fileFactory; + + /** + * @var string + */ + protected $subDir; /** * Constructor * * @param Filesystem $filesystem - * @param Factory $fileFactory + * @param \Magento\Framework\View\File\Factory $fileFactory + * @param string $subDir */ - public function __construct(Filesystem $filesystem, Factory $fileFactory) - { + public function __construct( + Filesystem $filesystem, + Factory $fileFactory, + $subDir = '' + ) { $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR); $this->fileFactory = $fileFactory; + $this->subDir = $subDir ? $subDir . '/' : ''; } /** @@ -66,14 +77,14 @@ class Theme implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] + * @return array|\Magento\Framework\View\File[] * @throws \Magento\Framework\Exception */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $namespace = $module = '*'; $themePath = $theme->getFullPath(); - $searchPattern = "{$themePath}/{$namespace}_{$module}/layout/override/theme/*/{$filePath}.xml"; + $searchPattern = "{$themePath}/{$namespace}_{$module}/{$this->subDir}*/{$filePath}"; $files = $this->themesDirectory->search($searchPattern); if (empty($files)) { @@ -86,10 +97,8 @@ class Theme implements SourceInterface $themes[$currentTheme->getCode()] = $currentTheme; } $result = array(); - $pattern = "#/(?<module>[^/]+)/layout/override/theme/(?<themeName>[^/]+)/" . strtr( - preg_quote($filePath), - array('\*' => '[^/]+') - ) . "\.xml$#i"; + $pattern = "#/(?<module>[^/]+)/{$this->subDir}(?<themeName>[^/]+)/" + . strtr(preg_quote($filePath), array('\*' => '[^/]+')) . "$#i"; foreach ($files as $file) { $filename = $this->themesDirectory->getAbsolutePath($file); if (!preg_match($pattern, $filename, $matches)) { @@ -100,7 +109,7 @@ class Theme implements SourceInterface if (!isset($themes[$ancestorThemeCode])) { throw new Exception( sprintf( - "Trying to override layout file '%s' for theme '%s', which is not ancestor of theme '%s'", + "Trying to override modular view file '%s' for theme '%s', which is not ancestor of theme '%s'", $filename, $ancestorThemeCode, $theme->getCode() diff --git a/lib/Magento/Framework/Less/File/Source/Theme.php b/lib/internal/Magento/Framework/View/File/Collector/Theme.php similarity index 63% rename from lib/Magento/Framework/Less/File/Source/Theme.php rename to lib/internal/Magento/Framework/View/File/Collector/Theme.php index 8f76b7c0fc0a3b399396d213fe8fad4659e556c2..b8ac9c03325f8a3ee3fb7f02217a78c03a61ec7e 100644 --- a/lib/Magento/Framework/Less/File/Source/Theme.php +++ b/lib/internal/Magento/Framework/View/File/Collector/Theme.php @@ -21,37 +21,53 @@ * @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) */ -namespace Magento\Framework\Less\File\Source; +namespace Magento\Framework\View\File\Collector; -use Magento\Framework\View\Layout\File\SourceInterface; +use Magento\Framework\View\File\CollectorInterface; use Magento\Framework\View\Design\ThemeInterface; use Magento\Framework\App\Filesystem; use Magento\Framework\Filesystem\Directory\ReadInterface; -use Magento\Framework\View\Layout\File\Factory; +use Magento\Framework\View\File\Factory; /** - * Source of non-overriding layout files introduced by a theme + * Source of view files introduced by a theme */ -class Theme implements SourceInterface +class Theme implements CollectorInterface { /** - * @var Factory + * File factory + * + * @var \Magento\Framework\View\File\Factory */ - protected $fileFactory; + private $fileFactory; /** + * Themes directory + * * @var ReadInterface */ protected $themesDirectory; /** + * @var string + */ + protected $subDir; + + /** + * Constructor + * * @param Filesystem $filesystem - * @param Factory $fileFactory + * @param \Magento\Framework\View\File\Factory $fileFactory + * @param string $subDir */ - public function __construct(Filesystem $filesystem, Factory $fileFactory) - { + public function __construct( + Filesystem $filesystem, + Factory $fileFactory, + $subDir = '' + ) { $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR); $this->fileFactory = $fileFactory; + $this->subDir = $subDir ? $subDir . '/' : ''; } /** @@ -59,25 +75,17 @@ class Theme implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] + * @return array|\Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { - $filePath = pathinfo($filePath, PATHINFO_EXTENSION) ? $filePath : rtrim($filePath, '.') . '.less'; - - $namespace = $module = '*'; $themePath = $theme->getFullPath(); - $files = $this->themesDirectory->search("{$themePath}/{$namespace}_{$module}/{$filePath}"); + $files = $this->themesDirectory->search("{$themePath}/{$this->subDir}{$filePath}"); $result = array(); - $pattern = "#/(?<moduleName>[^/]+)/" . strtr(preg_quote($filePath), array('\*' => '[^/]+')) . "#i"; foreach ($files as $file) { $filename = $this->themesDirectory->getAbsolutePath($file); - if (!preg_match($pattern, $filename, $matches)) { - continue; - } - $result[] = $this->fileFactory->create($filename, $matches['moduleName']); + $result[] = $this->fileFactory->create($filename, null, $theme); } - return $result; } } diff --git a/lib/Magento/Framework/View/Layout/File/Source/Theme.php b/lib/internal/Magento/Framework/View/File/Collector/ThemeModular.php similarity index 72% rename from lib/Magento/Framework/View/Layout/File/Source/Theme.php rename to lib/internal/Magento/Framework/View/File/Collector/ThemeModular.php index e92b4058cd3f2f5040a254bc5be17f726f6bb0c6..b7272c78b4b96785a3cc38689c81153cc9fa13e0 100644 --- a/lib/Magento/Framework/View/Layout/File/Source/Theme.php +++ b/lib/internal/Magento/Framework/View/File/Collector/ThemeModular.php @@ -21,18 +21,19 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source; -use Magento\Framework\View\Layout\File\SourceInterface; +namespace Magento\Framework\View\File\Collector; + +use Magento\Framework\View\File\CollectorInterface; use Magento\Framework\View\Design\ThemeInterface; use Magento\Framework\App\Filesystem; use Magento\Framework\Filesystem\Directory\ReadInterface; -use Magento\Framework\View\Layout\File\Factory; +use Magento\Framework\View\File\Factory; /** - * Source of non-overriding layout files introduced by a theme + * Source of modular view files introduced by a theme */ -class Theme implements SourceInterface +class ThemeModular implements CollectorInterface { /** * File factory @@ -48,16 +49,26 @@ class Theme implements SourceInterface */ protected $themesDirectory; + /** + * @var string + */ + protected $subDir; + /** * Constructor * * @param Filesystem $filesystem * @param Factory $fileFactory + * @param string $subDir */ - public function __construct(Filesystem $filesystem, Factory $fileFactory) - { + public function __construct( + Filesystem $filesystem, + Factory $fileFactory, + $subDir = '' + ) { $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR); $this->fileFactory = $fileFactory; + $this->subDir = $subDir ? $subDir . '/' : ''; } /** @@ -65,18 +76,16 @@ class Theme implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return array|\Magento\Framework\View\Layout\File[] + * @return array|\Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $namespace = $module = '*'; $themePath = $theme->getFullPath(); - $files = $this->themesDirectory->search("{$themePath}/{$namespace}_{$module}/layout/{$filePath}.xml"); + $files = $this->themesDirectory->search("{$themePath}/{$namespace}_{$module}/{$this->subDir}{$filePath}"); $result = array(); - $pattern = "#/(?<moduleName>[^/]+)/layout/" . strtr( - preg_quote($filePath), - array('\*' => '[^/]+') - ) . "\.xml$#i"; + $pattern = "#/(?<moduleName>[^/]+)/{$this->subDir}" + . strtr(preg_quote($filePath), array('\*' => '[^/]+')) . "$#i"; foreach ($files as $file) { $filename = $this->themesDirectory->getAbsolutePath($file); if (!preg_match($pattern, $filename, $matches)) { diff --git a/lib/Magento/Framework/View/Layout/File/SourceInterface.php b/lib/internal/Magento/Framework/View/File/CollectorInterface.php similarity index 76% rename from lib/Magento/Framework/View/Layout/File/SourceInterface.php rename to lib/internal/Magento/Framework/View/File/CollectorInterface.php index 170cee79f16ab9896180379916f1732e6474c68b..861b048f97386ff0b7c7f0406203dfb5917a0825 100644 --- a/lib/Magento/Framework/View/Layout/File/SourceInterface.php +++ b/lib/internal/Magento/Framework/View/File/CollectorInterface.php @@ -21,21 +21,22 @@ * @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) */ -namespace Magento\Framework\View\Layout\File; + +namespace Magento\Framework\View\File; use Magento\Framework\View\Design\ThemeInterface; /** - * Interface of locating layout files in the file system + * Interface of locating view files in the file system */ -interface SourceInterface +interface CollectorInterface { /** - * Retrieve instances of layout files + * Retrieve instances of view files * * @param ThemeInterface $theme Theme that defines the design context - * @param string $filePath [optional] - * @return \Magento\Framework\View\Layout\File[] + * @param string $filePath + * @return \Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*'); + public function getFiles(ThemeInterface $theme, $filePath); } diff --git a/lib/Magento/Framework/View/Layout/File/Factory.php b/lib/internal/Magento/Framework/View/File/Factory.php similarity index 82% rename from lib/Magento/Framework/View/Layout/File/Factory.php rename to lib/internal/Magento/Framework/View/File/Factory.php index cc5c65ab5d5c95c8140211a60f3d94f4639fe48a..75d8e4dc1a96ec42b9b119e93597770dd0be7ef6 100644 --- a/lib/Magento/Framework/View/Layout/File/Factory.php +++ b/lib/internal/Magento/Framework/View/File/Factory.php @@ -21,13 +21,14 @@ * @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) */ -namespace Magento\Framework\View\Layout\File; + +namespace Magento\Framework\View\File; use Magento\Framework\ObjectManager; use Magento\Framework\View\Design\ThemeInterface; /** - * Factory that produces layout file instances + * Factory that produces view file instances */ class Factory { @@ -49,18 +50,18 @@ class Factory } /** - * Return newly created instance of a layout file + * Return newly created instance of a view file * * @param string $filename * @param string $module * @param ThemeInterface|null $theme * @param bool $isBase - * @return \Magento\Framework\View\Layout\File + * @return \Magento\Framework\View\File */ - public function create($filename, $module, ThemeInterface $theme = null, $isBase = false) + public function create($filename, $module = '', ThemeInterface $theme = null, $isBase = false) { return $this->objectManager->create( - 'Magento\Framework\View\Layout\File', + 'Magento\Framework\View\File', array('filename' => $filename, 'module' => $module, 'theme' => $theme, 'isBase' => $isBase) ); } diff --git a/lib/Magento/Framework/View/Layout/File/FileList.php b/lib/internal/Magento/Framework/View/File/FileList.php similarity index 74% rename from lib/Magento/Framework/View/Layout/File/FileList.php rename to lib/internal/Magento/Framework/View/File/FileList.php index 3cf1399e829ff2f60c76d4db910f3f4ddde60972..01052a14b0085cfe437e2dbe88fe0d68eb4530a5 100644 --- a/lib/Magento/Framework/View/Layout/File/FileList.php +++ b/lib/internal/Magento/Framework/View/File/FileList.php @@ -21,13 +21,14 @@ * @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) */ -namespace Magento\Framework\View\Layout\File; -use Magento\Framework\View\Layout\File; -use Magento\Framework\View\Layout\File\FileList\CollateInterface; +namespace Magento\Framework\View\File; + +use Magento\Framework\View\File; +use Magento\Framework\View\File\FileList\CollateInterface; /** - * Unordered list of layout file instances with awareness of layout file identity + * Unordered list of view file instances with awareness of view file identity */ class FileList { @@ -41,14 +42,14 @@ class FileList /** * Collator * - * @var CollateInterface + * @var \Magento\Framework\View\File\FileList\CollateInterface */ protected $collator; /** * Constructor * - * @param CollateInterface $collator + * @param \Magento\Framework\View\File\FileList\CollateInterface $collator */ public function __construct(CollateInterface $collator) { @@ -56,7 +57,7 @@ class FileList } /** - * Retrieve all layout file instances + * Retrieve all view file instances * * @return File[] */ @@ -66,9 +67,9 @@ class FileList } /** - * Add layout file instances to the list, preventing identity coincidence + * Add view file instances to the list, preventing identity coincidence * - * @param File[] $files + * @param \Magento\Framework\View\File[] $files * @return void * @throws \LogicException */ @@ -79,7 +80,7 @@ class FileList if (array_key_exists($identifier, $this->files)) { $filename = $this->files[$identifier]->getFilename(); throw new \LogicException( - "Layout file '{$file->getFilename()}' is indistinguishable from the file '{$filename}'." + "View file '{$file->getFilename()}' is indistinguishable from the file '{$filename}'." ); } $this->files[$identifier] = $file; @@ -87,7 +88,7 @@ class FileList } /** - * Replace already added layout files with specified ones, checking for identity match + * Replace already added view files with specified ones, checking for identity match * * @param File[] $files * @return void diff --git a/lib/Magento/Framework/View/Layout/File/FileList/CollateInterface.php b/lib/internal/Magento/Framework/View/File/FileList/CollateInterface.php similarity index 77% rename from lib/Magento/Framework/View/Layout/File/FileList/CollateInterface.php rename to lib/internal/Magento/Framework/View/File/FileList/CollateInterface.php index d1c9a6213b2cf70c12366c1256b91f473cf6c89a..dbbdaef47e21fce3e175895537cc908a91d00831 100644 --- a/lib/Magento/Framework/View/Layout/File/FileList/CollateInterface.php +++ b/lib/internal/Magento/Framework/View/File/FileList/CollateInterface.php @@ -21,19 +21,20 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\FileList; + +namespace Magento\Framework\View\File\FileList; /** - * Layout file list collate interface + * View file list collate interface */ interface CollateInterface { /** - * Collate layout files + * Collate view files * - * @param \Magento\Framework\View\Layout\File[] $files - * @param \Magento\Framework\View\Layout\File[] $filesOrigin - * @return \Magento\Framework\View\Layout\File[] + * @param \Magento\Framework\View\File[] $files + * @param \Magento\Framework\View\File[] $filesOrigin + * @return \Magento\Framework\View\File[] */ public function collate($files, $filesOrigin); } diff --git a/lib/Magento/Framework/View/Layout/File/FileList/Collator.php b/lib/internal/Magento/Framework/View/File/FileList/Collator.php similarity index 78% rename from lib/Magento/Framework/View/Layout/File/FileList/Collator.php rename to lib/internal/Magento/Framework/View/File/FileList/Collator.php index 0f1d94ca477cd7a513383b96c4fe74666445ce4d..399de31d3ebfd331eae94e183c22e057817f758c 100644 --- a/lib/Magento/Framework/View/Layout/File/FileList/Collator.php +++ b/lib/internal/Magento/Framework/View/File/FileList/Collator.php @@ -21,19 +21,20 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\FileList; + +namespace Magento\Framework\View\File\FileList; /** - * Layout file list collator + * View file list collator */ class Collator implements CollateInterface { /** - * Collate layout files + * Collate view files * - * @param \Magento\Framework\View\Layout\File[] $files - * @param \Magento\Framework\View\Layout\File[] $filesOrigin - * @return \Magento\Framework\View\Layout\File[] + * @param \Magento\Framework\View\File[] $files + * @param \Magento\Framework\View\File[] $filesOrigin + * @return \Magento\Framework\View\File[] * @throws \LogicException */ public function collate($files, $filesOrigin) @@ -42,7 +43,7 @@ class Collator implements CollateInterface $identifier = $file->getFileIdentifier(); if (!array_key_exists($identifier, $filesOrigin)) { throw new \LogicException( - "Overriding layout file '{$file->getFilename()}' does not match to any of the files." + "Overriding view file '{$file->getFilename()}' does not match to any of the files." ); } $filesOrigin[$identifier] = $file; diff --git a/lib/Magento/Framework/View/Layout/File/FileList/Factory.php b/lib/internal/Magento/Framework/View/File/FileList/Factory.php similarity index 74% rename from lib/Magento/Framework/View/Layout/File/FileList/Factory.php rename to lib/internal/Magento/Framework/View/File/FileList/Factory.php index 029df8b88c3b283687a8c791168452b3c6a047fd..1db4a4a67a65be00a6bc38c096588391675beb19 100644 --- a/lib/Magento/Framework/View/Layout/File/FileList/Factory.php +++ b/lib/internal/Magento/Framework/View/File/FileList/Factory.php @@ -21,19 +21,20 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\FileList; + +namespace Magento\Framework\View\File\FileList; use Magento\Framework\ObjectManager; /** - * Factory that produces layout file list instances + * Factory that produces view file list instances */ class Factory { /** * Default file list collator */ - const FILE_LIST_COLLATOR = 'Magento\Framework\View\Layout\File\FileList\Collator'; + const FILE_LIST_COLLATOR = 'Magento\Framework\View\File\FileList\Collator'; /** * Object manager @@ -53,21 +54,18 @@ class Factory } /** - * Return newly created instance of a layout file list + * Return newly created instance of a view file list * * @param string $instanceName - * @return \Magento\Framework\View\Layout\File\FileList + * @return \Magento\Framework\View\File\FileList * @throws \UnexpectedValueException */ public function create($instanceName = self::FILE_LIST_COLLATOR) { $collator = $this->objectManager->get($instanceName); if (!$collator instanceof CollateInterface) { - throw new \UnexpectedValueException("{$instanceName} has to implement the collate interface."); + throw new \UnexpectedValueException("$instanceName has to implement the collate interface."); } - return $this->objectManager->create( - 'Magento\Framework\View\Layout\File\FileList', - array('collator' => $collator) - ); + return $this->objectManager->create('Magento\Framework\View\File\FileList', array('collator' => $collator)); } } diff --git a/lib/internal/Magento/Framework/View/FileSystem.php b/lib/internal/Magento/Framework/View/FileSystem.php new file mode 100644 index 0000000000000000000000000000000000000000..28fed1c43328c367e3011c1b3a76264ac323be29 --- /dev/null +++ b/lib/internal/Magento/Framework/View/FileSystem.php @@ -0,0 +1,244 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\View; + +/** + * Model that finds file paths by their fileId + */ +class FileSystem +{ + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\File + */ + protected $_fileResolution; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile + */ + protected $_templateFileResolution; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile + */ + protected $_localeFileResolution; + + /** + * @var \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile + */ + protected $_staticFileResolution; + + /** + * View service + * + * @var \Magento\Framework\View\Asset\Repository + */ + protected $_assetRepo; + + /** + * Constructor + * + * @param \Magento\Framework\View\Design\FileResolution\Fallback\File $fallbackFile + * @param \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile $fallbackTemplateFile + * @param \Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile $fallbackLocaleFile + * @param \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallbackStaticFile + * @param \Magento\Framework\View\Asset\Repository $assetRepo + */ + public function __construct( + \Magento\Framework\View\Design\FileResolution\Fallback\File $fallbackFile, + \Magento\Framework\View\Design\FileResolution\Fallback\TemplateFile $fallbackTemplateFile, + \Magento\Framework\View\Design\FileResolution\Fallback\LocaleFile $fallbackLocaleFile, + \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallbackStaticFile, + \Magento\Framework\View\Asset\Repository $assetRepo + ) { + $this->_fileResolution = $fallbackFile; + $this->_templateFileResolution = $fallbackTemplateFile; + $this->_localeFileResolution = $fallbackLocaleFile; + $this->_staticFileResolution = $fallbackStaticFile; + $this->_assetRepo = $assetRepo; + } + + /** + * Get existing file name with fallback to default + * + * @param string $fileId + * @param array $params + * @return string + */ + public function getFilename($fileId, array $params = array()) + { + list($module, $filePath) = \Magento\Framework\View\Asset\Repository::extractModule( + $this->normalizePath($fileId) + ); + if ($module) { + $params['module'] = $module; + } + $this->_assetRepo->updateDesignParams($params); + $file = $this->_fileResolution + ->getFile($params['area'], $params['themeModel'], $filePath, $params['module']); + return $file; + } + + /** + * Get a locale file + * + * @param string $file + * @param array $params + * @return string + */ + public function getLocaleFileName($file, array $params = array()) + { + $this->_assetRepo->updateDesignParams($params); + return $this->_localeFileResolution + ->getFile($params['area'], $params['themeModel'], $params['locale'], $file); + } + + /** + * Get a template file + * + * @param string $fileId + * @param array $params + * @return string + */ + public function getTemplateFileName($fileId, array $params = array()) + { + list($module, $filePath) = \Magento\Framework\View\Asset\Repository::extractModule( + $this->normalizePath($fileId) + ); + if ($module) { + $params['module'] = $module; + } + $this->_assetRepo->updateDesignParams($params); + return $this->_templateFileResolution + ->getFile($params['area'], $params['themeModel'], $filePath, $params['module']); + } + + /** + * Find a static view file using fallback mechanism + * + * @param string $fileId + * @param array $params + * @return string + */ + public function getStaticFileName($fileId, array $params = array()) + { + list($module, $filePath) = \Magento\Framework\View\Asset\Repository::extractModule( + $this->normalizePath($fileId) + ); + if ($module) { + $params['module'] = $module; + } + $this->_assetRepo->updateDesignParams($params); + return $this->_staticFileResolution + ->getFile($params['area'], $params['themeModel'], $params['locale'], $filePath, $params['module']); + } + + /** + * Remove excessive "." and ".." parts from a path + * + * For example foo/bar/../file.ext -> foo/file.ext + * + * @param string $path + * @return string + */ + public static function normalizePath($path) + { + $parts = explode('/', $path); + $result = array(); + + foreach ($parts as $part) { + if ('..' === $part) { + if (!count($result) || ($result[count($result) - 1] == '..')) { + $result[] = $part; + } else { + array_pop($result); + } + } elseif ('.' !== $part) { + $result[] = $part; + } + } + return implode('/', $result); + } + + /** + * Get a relative path between $relatedPath and $path paths as if $path was to refer to $relatedPath + * relatively of itself + * + * Returns new calculated relative path. + * Examples: + * $path: /some/directory/one/file.ext + * $relatedPath: /some/directory/two/another/file.ext + * Result: ../two/another + * + * $path: http://example.com/themes/demo/css/styles.css + * $relatedPath: http://example.com/images/logo.gif + * Result: ../../../images + * + * @param string $relatedPath + * @param string $path + * @return string + */ + public static function offsetPath($relatedPath, $path) + { + $relatedPath = self::normalizePath($relatedPath); + $path = self::normalizePath($path); + list($relatedPath, $path) = self::ltrimSamePart($relatedPath, $path); + $toDir = ltrim(dirname($path), '/'); + if ($toDir == '.') { + $offset = ''; + } else { + $offset = str_repeat('../', count(explode('/', $toDir))); + } + return rtrim($offset . dirname($relatedPath), '/'); + } + + /** + * Concatenate/normalize a path to another path as a relative, assuming it will be relative to its directory + * + * @param string $relativeTo + * @param string $path + * @return string + */ + public static function getRelatedPath($relativeTo, $path) + { + return self::normalizePath(dirname($relativeTo) . '/' . $path); + } + + /** + * Left-trim same part of two paths + * + * @param string $pathOne + * @param string $pathTwo + * @return array + */ + private static function ltrimSamePart($pathOne, $pathTwo) + { + $one = explode('/', $pathOne); + $two = explode('/', $pathTwo); + while (isset($one[0]) && isset($two[0]) && $one[0] == $two[0]) { + array_shift($one); + array_shift($two); + } + return array(implode('/', $one), implode('/', $two)); + } +} diff --git a/lib/Magento/Framework/View/Helper/Js.php b/lib/internal/Magento/Framework/View/Helper/Js.php similarity index 100% rename from lib/Magento/Framework/View/Helper/Js.php rename to lib/internal/Magento/Framework/View/Helper/Js.php diff --git a/lib/Magento/Framework/View/Layout.php b/lib/internal/Magento/Framework/View/Layout.php similarity index 100% rename from lib/Magento/Framework/View/Layout.php rename to lib/internal/Magento/Framework/View/Layout.php diff --git a/lib/Magento/Framework/View/Layout/Argument/Interpreter/Decorator/Updater.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Decorator/Updater.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/Interpreter/Decorator/Updater.php rename to lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Decorator/Updater.php diff --git a/lib/Magento/Framework/View/Layout/Argument/Interpreter/HelperMethod.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/HelperMethod.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/Interpreter/HelperMethod.php rename to lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/HelperMethod.php diff --git a/lib/Magento/Framework/View/Layout/Argument/Interpreter/NamedParams.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/NamedParams.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/Interpreter/NamedParams.php rename to lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/NamedParams.php diff --git a/lib/Magento/Framework/View/Layout/Argument/Interpreter/Object.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Object.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/Interpreter/Object.php rename to lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Object.php diff --git a/lib/Magento/Framework/View/Layout/Argument/Interpreter/Options.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Options.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/Interpreter/Options.php rename to lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Options.php diff --git a/lib/Magento/Framework/View/Layout/Argument/Interpreter/Url.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Url.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/Interpreter/Url.php rename to lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Url.php diff --git a/lib/Magento/Framework/View/Layout/Argument/Parser.php b/lib/internal/Magento/Framework/View/Layout/Argument/Parser.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/Parser.php rename to lib/internal/Magento/Framework/View/Layout/Argument/Parser.php diff --git a/lib/Magento/Framework/View/Layout/Argument/UpdaterInterface.php b/lib/internal/Magento/Framework/View/Layout/Argument/UpdaterInterface.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Argument/UpdaterInterface.php rename to lib/internal/Magento/Framework/View/Layout/Argument/UpdaterInterface.php diff --git a/lib/Magento/Framework/View/Layout/Element.php b/lib/internal/Magento/Framework/View/Layout/Element.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Element.php rename to lib/internal/Magento/Framework/View/Layout/Element.php diff --git a/lib/Magento/Framework/View/Layout/Factory.php b/lib/internal/Magento/Framework/View/Layout/Factory.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Factory.php rename to lib/internal/Magento/Framework/View/Layout/Factory.php diff --git a/lib/Magento/Framework/View/Layout/File/Source/Aggregated.php b/lib/internal/Magento/Framework/View/Layout/File/Collector/Aggregated.php similarity index 72% rename from lib/Magento/Framework/View/Layout/File/Source/Aggregated.php rename to lib/internal/Magento/Framework/View/Layout/File/Collector/Aggregated.php index e201f9979552034a2c164e358bf51f52d316eb56..dad6dcacbc754d512670ffb543b4b2d8a08ebf83 100644 --- a/lib/Magento/Framework/View/Layout/File/Source/Aggregated.php +++ b/lib/internal/Magento/Framework/View/Layout/File/Collector/Aggregated.php @@ -21,16 +21,17 @@ * @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) */ -namespace Magento\Framework\View\Layout\File\Source; -use Magento\Framework\View\Layout\File\SourceInterface; +namespace Magento\Framework\View\Layout\File\Collector; + +use Magento\Framework\View\File\CollectorInterface; use Magento\Framework\View\Design\ThemeInterface; -use Magento\Framework\View\Layout\File\FileList\Factory; +use Magento\Framework\View\File\FileList\Factory; /** * Source of layout files aggregated from a theme and its parents according to merging and overriding conventions */ -class Aggregated implements SourceInterface +class Aggregated implements CollectorInterface { /** * File list factory @@ -42,46 +43,46 @@ class Aggregated implements SourceInterface /** * Base files * - * @var SourceInterface + * @var CollectorInterface */ protected $baseFiles; /** * Theme files * - * @var SourceInterface + * @var CollectorInterface */ protected $themeFiles; /** * Overridden base files * - * @var SourceInterface + * @var CollectorInterface */ protected $overrideBaseFiles; /** * Overridden theme files * - * @var SourceInterface + * @var \Magento\Framework\View\File\CollectorInterface */ protected $overrideThemeFiles; /** * Constructor * - * @param Factory $fileListFactory - * @param SourceInterface $baseFiles - * @param SourceInterface $themeFiles - * @param SourceInterface $overrideBaseFiles - * @param SourceInterface $overrideThemeFiles + * @param \Magento\Framework\View\File\FileList\Factory $fileListFactory + * @param \Magento\Framework\View\File\CollectorInterface $baseFiles + * @param CollectorInterface $themeFiles + * @param \Magento\Framework\View\File\CollectorInterface $overrideBaseFiles + * @param CollectorInterface $overrideThemeFiles */ public function __construct( Factory $fileListFactory, - SourceInterface $baseFiles, - SourceInterface $themeFiles, - SourceInterface $overrideBaseFiles, - SourceInterface $overrideThemeFiles + CollectorInterface $baseFiles, + CollectorInterface $themeFiles, + CollectorInterface $overrideBaseFiles, + CollectorInterface $overrideThemeFiles ) { $this->fileListFactory = $fileListFactory; $this->baseFiles = $baseFiles; @@ -97,9 +98,9 @@ class Aggregated implements SourceInterface * * @param ThemeInterface $theme * @param string $filePath - * @return \Magento\Framework\View\Layout\File[] + * @return \Magento\Framework\View\File[] */ - public function getFiles(ThemeInterface $theme, $filePath = '*') + public function getFiles(ThemeInterface $theme, $filePath) { $list = $this->fileListFactory->create(); $list->add($this->baseFiles->getFiles($theme, $filePath)); diff --git a/lib/Magento/Framework/View/Layout/PageType/Config.php b/lib/internal/Magento/Framework/View/Layout/PageType/Config.php similarity index 100% rename from lib/Magento/Framework/View/Layout/PageType/Config.php rename to lib/internal/Magento/Framework/View/Layout/PageType/Config.php diff --git a/lib/Magento/Framework/View/Layout/PageType/Config/Converter.php b/lib/internal/Magento/Framework/View/Layout/PageType/Config/Converter.php similarity index 100% rename from lib/Magento/Framework/View/Layout/PageType/Config/Converter.php rename to lib/internal/Magento/Framework/View/Layout/PageType/Config/Converter.php diff --git a/lib/Magento/Framework/View/Layout/PageType/Config/Reader.php b/lib/internal/Magento/Framework/View/Layout/PageType/Config/Reader.php similarity index 100% rename from lib/Magento/Framework/View/Layout/PageType/Config/Reader.php rename to lib/internal/Magento/Framework/View/Layout/PageType/Config/Reader.php diff --git a/lib/Magento/Framework/View/Layout/PageType/Config/SchemaLocator.php b/lib/internal/Magento/Framework/View/Layout/PageType/Config/SchemaLocator.php similarity index 100% rename from lib/Magento/Framework/View/Layout/PageType/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/View/Layout/PageType/Config/SchemaLocator.php diff --git a/lib/Magento/Framework/View/Layout/ProcessorFactory.php b/lib/internal/Magento/Framework/View/Layout/ProcessorFactory.php similarity index 100% rename from lib/Magento/Framework/View/Layout/ProcessorFactory.php rename to lib/internal/Magento/Framework/View/Layout/ProcessorFactory.php diff --git a/lib/Magento/Framework/View/Layout/ProcessorInterface.php b/lib/internal/Magento/Framework/View/Layout/ProcessorInterface.php similarity index 100% rename from lib/Magento/Framework/View/Layout/ProcessorInterface.php rename to lib/internal/Magento/Framework/View/Layout/ProcessorInterface.php diff --git a/lib/Magento/Framework/View/Layout/Proxy.php b/lib/internal/Magento/Framework/View/Layout/Proxy.php similarity index 100% rename from lib/Magento/Framework/View/Layout/Proxy.php rename to lib/internal/Magento/Framework/View/Layout/Proxy.php diff --git a/lib/Magento/Framework/View/Layout/ScheduledStructure.php b/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php similarity index 100% rename from lib/Magento/Framework/View/Layout/ScheduledStructure.php rename to lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php diff --git a/lib/Magento/Framework/View/LayoutFactory.php b/lib/internal/Magento/Framework/View/LayoutFactory.php similarity index 100% rename from lib/Magento/Framework/View/LayoutFactory.php rename to lib/internal/Magento/Framework/View/LayoutFactory.php diff --git a/lib/Magento/Framework/View/LayoutInterface.php b/lib/internal/Magento/Framework/View/LayoutInterface.php similarity index 100% rename from lib/Magento/Framework/View/LayoutInterface.php rename to lib/internal/Magento/Framework/View/LayoutInterface.php diff --git a/lib/Magento/Framework/View/Render/RenderFactory.php b/lib/internal/Magento/Framework/View/Render/RenderFactory.php similarity index 100% rename from lib/Magento/Framework/View/Render/RenderFactory.php rename to lib/internal/Magento/Framework/View/Render/RenderFactory.php diff --git a/lib/Magento/Framework/View/RenderInterface.php b/lib/internal/Magento/Framework/View/RenderInterface.php similarity index 100% rename from lib/Magento/Framework/View/RenderInterface.php rename to lib/internal/Magento/Framework/View/RenderInterface.php diff --git a/lib/Magento/Framework/View/TemplateEngine/Php.php b/lib/internal/Magento/Framework/View/TemplateEngine/Php.php similarity index 100% rename from lib/Magento/Framework/View/TemplateEngine/Php.php rename to lib/internal/Magento/Framework/View/TemplateEngine/Php.php diff --git a/lib/Magento/Framework/View/TemplateEngineFactory.php b/lib/internal/Magento/Framework/View/TemplateEngineFactory.php similarity index 100% rename from lib/Magento/Framework/View/TemplateEngineFactory.php rename to lib/internal/Magento/Framework/View/TemplateEngineFactory.php diff --git a/lib/Magento/Framework/View/TemplateEngineInterface.php b/lib/internal/Magento/Framework/View/TemplateEngineInterface.php similarity index 100% rename from lib/Magento/Framework/View/TemplateEngineInterface.php rename to lib/internal/Magento/Framework/View/TemplateEngineInterface.php diff --git a/lib/Magento/Framework/View/TemplateEnginePool.php b/lib/internal/Magento/Framework/View/TemplateEnginePool.php similarity index 100% rename from lib/Magento/Framework/View/TemplateEnginePool.php rename to lib/internal/Magento/Framework/View/TemplateEnginePool.php diff --git a/lib/Magento/Framework/View/Url/ConfigInterface.php b/lib/internal/Magento/Framework/View/Url/ConfigInterface.php similarity index 100% rename from lib/Magento/Framework/View/Url/ConfigInterface.php rename to lib/internal/Magento/Framework/View/Url/ConfigInterface.php diff --git a/lib/internal/Magento/Framework/View/Url/CssResolver.php b/lib/internal/Magento/Framework/View/Url/CssResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..bf34e4dd2ad59e22dd827abf2e52b33272327c1c --- /dev/null +++ b/lib/internal/Magento/Framework/View/Url/CssResolver.php @@ -0,0 +1,128 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @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) + */ +namespace Magento\Framework\View\Url; + +use Magento\Framework\View\FileSystem; + +/** + * Helper to work with CSS files + */ +class CssResolver +{ + /** + * PCRE that matches non-absolute URLs in CSS content + */ + const REGEX_CSS_RELATIVE_URLS = + '#url\s*\(\s*(?(?=\'|").)(?!http\://|https\://|/|data\:)(.+?)(?:[\#\?].*?|[\'"])?\s*\)#'; + + /** + * Adjust relative URLs in CSS content as if the file with this content is to be moved to new location + * + * @param string $cssContent + * @param string $relatedPath + * @param string $filePath + * @return mixed + */ + public function relocateRelativeUrls($cssContent, $relatedPath, $filePath) + { + $offset = FileSystem::offsetPath($relatedPath, $filePath); + $callback = function ($path) use ($offset) { + return FileSystem::normalizePath($offset . '/' . $path); + }; + return $this->replaceRelativeUrls($cssContent, $callback); + } + + /** + * A generic method for applying certain callback to all found relative URLs in CSS content + * + * Traverse through all relative URLs and apply a callback to each path + * The $inlineCallback is a user function that obtains the URL value and must return a replacement + * + * @param string $cssContent + * @param callback $inlineCallback + * @return string + */ + public function replaceRelativeUrls($cssContent, $inlineCallback) + { + $patterns = self::extractRelativeUrls($cssContent); + if ($patterns) { + $replace = array(); + foreach ($patterns as $pattern => $path) { + if (!isset($replace[$pattern])) { + $newPath = call_user_func($inlineCallback, $path); + $newPattern = str_replace($path, $newPath, $pattern); + $replace[$pattern] = $newPattern; + } + } + if ($replace) { + $cssContent = str_replace(array_keys($replace), array_values($replace), $cssContent); + } + } + return $cssContent; + } + + /** + * Extract all "import" directives from CSS-content and put them to the top of document + * + * @param string $cssContent + * @return string + */ + public function aggregateImportDirectives($cssContent) + { + $parts = preg_split('/(@import\s.+?;\s*)/', $cssContent, -1, PREG_SPLIT_DELIM_CAPTURE); + $imports = array(); + $css = array(); + foreach ($parts as $part) { + if (0 === strpos($part, '@import', 0)) { + $imports[] = trim($part); + } else { + $css[] = $part; + } + } + + $result = implode($css); + if ($imports) { + $result = implode("\n", $imports) + . "\n/* The above import directives are aggregated from content. */\n" + . $result + ; + } + return $result; + } + + /** + * Subroutine for obtaining url() fragments from the CSS content + * + * @param string $cssContent + * @return array + */ + private static function extractRelativeUrls($cssContent) + { + preg_match_all(self::REGEX_CSS_RELATIVE_URLS, $cssContent, $matches); + if (!empty($matches[0]) && !empty($matches[1])) { + return array_combine($matches[0], $matches[1]); + } + return array(); + } +} diff --git a/lib/Magento/Framework/Xml/Generator.php b/lib/internal/Magento/Framework/Xml/Generator.php similarity index 100% rename from lib/Magento/Framework/Xml/Generator.php rename to lib/internal/Magento/Framework/Xml/Generator.php diff --git a/lib/Magento/Framework/Xml/Parser.php b/lib/internal/Magento/Framework/Xml/Parser.php similarity index 100% rename from lib/Magento/Framework/Xml/Parser.php rename to lib/internal/Magento/Framework/Xml/Parser.php diff --git a/lib/PEAR/HTTP/HTTP.php b/lib/internal/PEAR/HTTP/HTTP.php similarity index 100% rename from lib/PEAR/HTTP/HTTP.php rename to lib/internal/PEAR/HTTP/HTTP.php diff --git a/lib/PEAR/HTTP/Request.php b/lib/internal/PEAR/HTTP/Request.php similarity index 100% rename from lib/PEAR/HTTP/Request.php rename to lib/internal/PEAR/HTTP/Request.php diff --git a/lib/PEAR/HTTP/Request/Listener.php b/lib/internal/PEAR/HTTP/Request/Listener.php similarity index 100% rename from lib/PEAR/HTTP/Request/Listener.php rename to lib/internal/PEAR/HTTP/Request/Listener.php diff --git a/lib/PEAR/Mail/mime.php b/lib/internal/PEAR/Mail/mime.php similarity index 100% rename from lib/PEAR/Mail/mime.php rename to lib/internal/PEAR/Mail/mime.php diff --git a/lib/PEAR/Mail/mimeDecode.php b/lib/internal/PEAR/Mail/mimeDecode.php similarity index 100% rename from lib/PEAR/Mail/mimeDecode.php rename to lib/internal/PEAR/Mail/mimeDecode.php diff --git a/lib/PEAR/Mail/mimePart.php b/lib/internal/PEAR/Mail/mimePart.php similarity index 100% rename from lib/PEAR/Mail/mimePart.php rename to lib/internal/PEAR/Mail/mimePart.php diff --git a/lib/PEAR/Mail/xmail.dtd b/lib/internal/PEAR/Mail/xmail.dtd similarity index 100% rename from lib/PEAR/Mail/xmail.dtd rename to lib/internal/PEAR/Mail/xmail.dtd diff --git a/lib/PEAR/Mail/xmail.xsl b/lib/internal/PEAR/Mail/xmail.xsl similarity index 100% rename from lib/PEAR/Mail/xmail.xsl rename to lib/internal/PEAR/Mail/xmail.xsl diff --git a/lib/PEAR/Net/Socket.php b/lib/internal/PEAR/Net/Socket.php similarity index 100% rename from lib/PEAR/Net/Socket.php rename to lib/internal/PEAR/Net/Socket.php diff --git a/lib/PEAR/Net/URL.php b/lib/internal/PEAR/Net/URL.php similarity index 100% rename from lib/PEAR/Net/URL.php rename to lib/internal/PEAR/Net/URL.php diff --git a/lib/PEAR/PEAR.php b/lib/internal/PEAR/PEAR.php similarity index 100% rename from lib/PEAR/PEAR.php rename to lib/internal/PEAR/PEAR.php diff --git a/lib/PEAR/PEAR/PEAR.php b/lib/internal/PEAR/PEAR/PEAR.php similarity index 100% rename from lib/PEAR/PEAR/PEAR.php rename to lib/internal/PEAR/PEAR/PEAR.php diff --git a/lib/PEAR/SOAP/Base.php b/lib/internal/PEAR/SOAP/Base.php similarity index 100% rename from lib/PEAR/SOAP/Base.php rename to lib/internal/PEAR/SOAP/Base.php diff --git a/lib/PEAR/SOAP/Client.php b/lib/internal/PEAR/SOAP/Client.php similarity index 100% rename from lib/PEAR/SOAP/Client.php rename to lib/internal/PEAR/SOAP/Client.php diff --git a/lib/PEAR/SOAP/Fault.php b/lib/internal/PEAR/SOAP/Fault.php similarity index 100% rename from lib/PEAR/SOAP/Fault.php rename to lib/internal/PEAR/SOAP/Fault.php diff --git a/lib/PEAR/SOAP/Parser.php b/lib/internal/PEAR/SOAP/Parser.php similarity index 100% rename from lib/PEAR/SOAP/Parser.php rename to lib/internal/PEAR/SOAP/Parser.php diff --git a/lib/PEAR/SOAP/Transport.php b/lib/internal/PEAR/SOAP/Transport.php similarity index 100% rename from lib/PEAR/SOAP/Transport.php rename to lib/internal/PEAR/SOAP/Transport.php diff --git a/lib/PEAR/SOAP/Transport/HTTP.php b/lib/internal/PEAR/SOAP/Transport/HTTP.php similarity index 100% rename from lib/PEAR/SOAP/Transport/HTTP.php rename to lib/internal/PEAR/SOAP/Transport/HTTP.php diff --git a/lib/PEAR/SOAP/Value.php b/lib/internal/PEAR/SOAP/Value.php similarity index 100% rename from lib/PEAR/SOAP/Value.php rename to lib/internal/PEAR/SOAP/Value.php diff --git a/lib/PEAR/SOAP/WSDL.php b/lib/internal/PEAR/SOAP/WSDL.php similarity index 100% rename from lib/PEAR/SOAP/WSDL.php rename to lib/internal/PEAR/SOAP/WSDL.php diff --git a/lib/PEAR/XML/Parser.php b/lib/internal/PEAR/XML/Parser.php similarity index 100% rename from lib/PEAR/XML/Parser.php rename to lib/internal/PEAR/XML/Parser.php diff --git a/lib/PEAR/XML/Parser/Simple.php b/lib/internal/PEAR/XML/Parser/Simple.php similarity index 100% rename from lib/PEAR/XML/Parser/Simple.php rename to lib/internal/PEAR/XML/Parser/Simple.php diff --git a/lib/PEAR/XML/Serializer.php b/lib/internal/PEAR/XML/Serializer.php similarity index 100% rename from lib/PEAR/XML/Serializer.php rename to lib/internal/PEAR/XML/Serializer.php diff --git a/lib/PEAR/XML/Unserializer.php b/lib/internal/PEAR/XML/Unserializer.php similarity index 100% rename from lib/PEAR/XML/Unserializer.php rename to lib/internal/PEAR/XML/Unserializer.php diff --git a/lib/Symfony/Component/Yaml/.gitignore b/lib/internal/Symfony/Component/Yaml/.gitignore similarity index 100% rename from lib/Symfony/Component/Yaml/.gitignore rename to lib/internal/Symfony/Component/Yaml/.gitignore diff --git a/lib/Symfony/Component/Yaml/CHANGELOG.md b/lib/internal/Symfony/Component/Yaml/CHANGELOG.md similarity index 100% rename from lib/Symfony/Component/Yaml/CHANGELOG.md rename to lib/internal/Symfony/Component/Yaml/CHANGELOG.md diff --git a/lib/Symfony/Component/Yaml/Dumper.php b/lib/internal/Symfony/Component/Yaml/Dumper.php similarity index 100% rename from lib/Symfony/Component/Yaml/Dumper.php rename to lib/internal/Symfony/Component/Yaml/Dumper.php diff --git a/lib/Symfony/Component/Yaml/Escaper.php b/lib/internal/Symfony/Component/Yaml/Escaper.php similarity index 100% rename from lib/Symfony/Component/Yaml/Escaper.php rename to lib/internal/Symfony/Component/Yaml/Escaper.php diff --git a/lib/Symfony/Component/Yaml/Exception/DumpException.php b/lib/internal/Symfony/Component/Yaml/Exception/DumpException.php similarity index 100% rename from lib/Symfony/Component/Yaml/Exception/DumpException.php rename to lib/internal/Symfony/Component/Yaml/Exception/DumpException.php diff --git a/lib/Symfony/Component/Yaml/Exception/ExceptionInterface.php b/lib/internal/Symfony/Component/Yaml/Exception/ExceptionInterface.php similarity index 100% rename from lib/Symfony/Component/Yaml/Exception/ExceptionInterface.php rename to lib/internal/Symfony/Component/Yaml/Exception/ExceptionInterface.php diff --git a/lib/Symfony/Component/Yaml/Exception/ParseException.php b/lib/internal/Symfony/Component/Yaml/Exception/ParseException.php similarity index 100% rename from lib/Symfony/Component/Yaml/Exception/ParseException.php rename to lib/internal/Symfony/Component/Yaml/Exception/ParseException.php diff --git a/lib/Symfony/Component/Yaml/Exception/RuntimeException.php b/lib/internal/Symfony/Component/Yaml/Exception/RuntimeException.php similarity index 100% rename from lib/Symfony/Component/Yaml/Exception/RuntimeException.php rename to lib/internal/Symfony/Component/Yaml/Exception/RuntimeException.php diff --git a/lib/Symfony/Component/Yaml/Inline.php b/lib/internal/Symfony/Component/Yaml/Inline.php similarity index 100% rename from lib/Symfony/Component/Yaml/Inline.php rename to lib/internal/Symfony/Component/Yaml/Inline.php diff --git a/lib/Symfony/Component/Yaml/LICENSE b/lib/internal/Symfony/Component/Yaml/LICENSE similarity index 100% rename from lib/Symfony/Component/Yaml/LICENSE rename to lib/internal/Symfony/Component/Yaml/LICENSE diff --git a/lib/Symfony/Component/Yaml/Parser.php b/lib/internal/Symfony/Component/Yaml/Parser.php similarity index 100% rename from lib/Symfony/Component/Yaml/Parser.php rename to lib/internal/Symfony/Component/Yaml/Parser.php diff --git a/lib/Symfony/Component/Yaml/README.md b/lib/internal/Symfony/Component/Yaml/README.md similarity index 100% rename from lib/Symfony/Component/Yaml/README.md rename to lib/internal/Symfony/Component/Yaml/README.md diff --git a/lib/Symfony/Component/Yaml/Tests/DumperTest.php b/lib/internal/Symfony/Component/Yaml/Tests/DumperTest.php similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/DumperTest.php rename to lib/internal/Symfony/Component/Yaml/Tests/DumperTest.php diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/index.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/index.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/index.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/index.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml diff --git a/lib/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml b/lib/internal/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml rename to lib/internal/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml diff --git a/lib/Symfony/Component/Yaml/Tests/InlineTest.php b/lib/internal/Symfony/Component/Yaml/Tests/InlineTest.php similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/InlineTest.php rename to lib/internal/Symfony/Component/Yaml/Tests/InlineTest.php diff --git a/lib/Symfony/Component/Yaml/Tests/ParserTest.php b/lib/internal/Symfony/Component/Yaml/Tests/ParserTest.php similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/ParserTest.php rename to lib/internal/Symfony/Component/Yaml/Tests/ParserTest.php diff --git a/lib/Symfony/Component/Yaml/Tests/YamlTest.php b/lib/internal/Symfony/Component/Yaml/Tests/YamlTest.php similarity index 100% rename from lib/Symfony/Component/Yaml/Tests/YamlTest.php rename to lib/internal/Symfony/Component/Yaml/Tests/YamlTest.php diff --git a/lib/Symfony/Component/Yaml/Unescaper.php b/lib/internal/Symfony/Component/Yaml/Unescaper.php similarity index 100% rename from lib/Symfony/Component/Yaml/Unescaper.php rename to lib/internal/Symfony/Component/Yaml/Unescaper.php diff --git a/lib/Symfony/Component/Yaml/Yaml.php b/lib/internal/Symfony/Component/Yaml/Yaml.php similarity index 100% rename from lib/Symfony/Component/Yaml/Yaml.php rename to lib/internal/Symfony/Component/Yaml/Yaml.php diff --git a/lib/Symfony/Component/Yaml/composer.json b/lib/internal/Symfony/Component/Yaml/composer.json similarity index 100% rename from lib/Symfony/Component/Yaml/composer.json rename to lib/internal/Symfony/Component/Yaml/composer.json diff --git a/lib/Symfony/Component/Yaml/phpunit.xml.dist b/lib/internal/Symfony/Component/Yaml/phpunit.xml.dist similarity index 100% rename from lib/Symfony/Component/Yaml/phpunit.xml.dist rename to lib/internal/Symfony/Component/Yaml/phpunit.xml.dist diff --git a/lib/Zend/Acl.php b/lib/internal/Zend/Acl.php similarity index 100% rename from lib/Zend/Acl.php rename to lib/internal/Zend/Acl.php diff --git a/lib/Zend/Acl/Assert/Interface.php b/lib/internal/Zend/Acl/Assert/Interface.php similarity index 100% rename from lib/Zend/Acl/Assert/Interface.php rename to lib/internal/Zend/Acl/Assert/Interface.php diff --git a/lib/Zend/Acl/Exception.php b/lib/internal/Zend/Acl/Exception.php similarity index 100% rename from lib/Zend/Acl/Exception.php rename to lib/internal/Zend/Acl/Exception.php diff --git a/lib/Zend/Acl/Resource.php b/lib/internal/Zend/Acl/Resource.php similarity index 100% rename from lib/Zend/Acl/Resource.php rename to lib/internal/Zend/Acl/Resource.php diff --git a/lib/Zend/Acl/Resource/Interface.php b/lib/internal/Zend/Acl/Resource/Interface.php similarity index 100% rename from lib/Zend/Acl/Resource/Interface.php rename to lib/internal/Zend/Acl/Resource/Interface.php diff --git a/lib/Zend/Acl/Role.php b/lib/internal/Zend/Acl/Role.php similarity index 100% rename from lib/Zend/Acl/Role.php rename to lib/internal/Zend/Acl/Role.php diff --git a/lib/Zend/Acl/Role/Interface.php b/lib/internal/Zend/Acl/Role/Interface.php similarity index 100% rename from lib/Zend/Acl/Role/Interface.php rename to lib/internal/Zend/Acl/Role/Interface.php diff --git a/lib/Zend/Acl/Role/Registry.php b/lib/internal/Zend/Acl/Role/Registry.php similarity index 100% rename from lib/Zend/Acl/Role/Registry.php rename to lib/internal/Zend/Acl/Role/Registry.php diff --git a/lib/Zend/Acl/Role/Registry/Exception.php b/lib/internal/Zend/Acl/Role/Registry/Exception.php similarity index 100% rename from lib/Zend/Acl/Role/Registry/Exception.php rename to lib/internal/Zend/Acl/Role/Registry/Exception.php diff --git a/lib/Zend/Amf/Adobe/Auth.php b/lib/internal/Zend/Amf/Adobe/Auth.php similarity index 100% rename from lib/Zend/Amf/Adobe/Auth.php rename to lib/internal/Zend/Amf/Adobe/Auth.php diff --git a/lib/Zend/Amf/Adobe/DbInspector.php b/lib/internal/Zend/Amf/Adobe/DbInspector.php similarity index 100% rename from lib/Zend/Amf/Adobe/DbInspector.php rename to lib/internal/Zend/Amf/Adobe/DbInspector.php diff --git a/lib/Zend/Amf/Adobe/Introspector.php b/lib/internal/Zend/Amf/Adobe/Introspector.php similarity index 100% rename from lib/Zend/Amf/Adobe/Introspector.php rename to lib/internal/Zend/Amf/Adobe/Introspector.php diff --git a/lib/Zend/Amf/Auth/Abstract.php b/lib/internal/Zend/Amf/Auth/Abstract.php similarity index 100% rename from lib/Zend/Amf/Auth/Abstract.php rename to lib/internal/Zend/Amf/Auth/Abstract.php diff --git a/lib/Zend/Amf/Constants.php b/lib/internal/Zend/Amf/Constants.php similarity index 100% rename from lib/Zend/Amf/Constants.php rename to lib/internal/Zend/Amf/Constants.php diff --git a/lib/Zend/Amf/Exception.php b/lib/internal/Zend/Amf/Exception.php similarity index 100% rename from lib/Zend/Amf/Exception.php rename to lib/internal/Zend/Amf/Exception.php diff --git a/lib/Zend/Amf/Parse/Amf0/Deserializer.php b/lib/internal/Zend/Amf/Parse/Amf0/Deserializer.php similarity index 100% rename from lib/Zend/Amf/Parse/Amf0/Deserializer.php rename to lib/internal/Zend/Amf/Parse/Amf0/Deserializer.php diff --git a/lib/Zend/Amf/Parse/Amf0/Serializer.php b/lib/internal/Zend/Amf/Parse/Amf0/Serializer.php similarity index 100% rename from lib/Zend/Amf/Parse/Amf0/Serializer.php rename to lib/internal/Zend/Amf/Parse/Amf0/Serializer.php diff --git a/lib/Zend/Amf/Parse/Amf3/Deserializer.php b/lib/internal/Zend/Amf/Parse/Amf3/Deserializer.php similarity index 100% rename from lib/Zend/Amf/Parse/Amf3/Deserializer.php rename to lib/internal/Zend/Amf/Parse/Amf3/Deserializer.php diff --git a/lib/Zend/Amf/Parse/Amf3/Serializer.php b/lib/internal/Zend/Amf/Parse/Amf3/Serializer.php similarity index 100% rename from lib/Zend/Amf/Parse/Amf3/Serializer.php rename to lib/internal/Zend/Amf/Parse/Amf3/Serializer.php diff --git a/lib/Zend/Amf/Parse/Deserializer.php b/lib/internal/Zend/Amf/Parse/Deserializer.php similarity index 100% rename from lib/Zend/Amf/Parse/Deserializer.php rename to lib/internal/Zend/Amf/Parse/Deserializer.php diff --git a/lib/Zend/Amf/Parse/InputStream.php b/lib/internal/Zend/Amf/Parse/InputStream.php similarity index 100% rename from lib/Zend/Amf/Parse/InputStream.php rename to lib/internal/Zend/Amf/Parse/InputStream.php diff --git a/lib/Zend/Amf/Parse/OutputStream.php b/lib/internal/Zend/Amf/Parse/OutputStream.php similarity index 100% rename from lib/Zend/Amf/Parse/OutputStream.php rename to lib/internal/Zend/Amf/Parse/OutputStream.php diff --git a/lib/Zend/Amf/Parse/Resource/MysqlResult.php b/lib/internal/Zend/Amf/Parse/Resource/MysqlResult.php similarity index 100% rename from lib/Zend/Amf/Parse/Resource/MysqlResult.php rename to lib/internal/Zend/Amf/Parse/Resource/MysqlResult.php diff --git a/lib/Zend/Amf/Parse/Resource/MysqliResult.php b/lib/internal/Zend/Amf/Parse/Resource/MysqliResult.php similarity index 100% rename from lib/Zend/Amf/Parse/Resource/MysqliResult.php rename to lib/internal/Zend/Amf/Parse/Resource/MysqliResult.php diff --git a/lib/Zend/Amf/Parse/Resource/Stream.php b/lib/internal/Zend/Amf/Parse/Resource/Stream.php similarity index 100% rename from lib/Zend/Amf/Parse/Resource/Stream.php rename to lib/internal/Zend/Amf/Parse/Resource/Stream.php diff --git a/lib/Zend/Amf/Parse/Serializer.php b/lib/internal/Zend/Amf/Parse/Serializer.php similarity index 100% rename from lib/Zend/Amf/Parse/Serializer.php rename to lib/internal/Zend/Amf/Parse/Serializer.php diff --git a/lib/Zend/Amf/Parse/TypeLoader.php b/lib/internal/Zend/Amf/Parse/TypeLoader.php similarity index 100% rename from lib/Zend/Amf/Parse/TypeLoader.php rename to lib/internal/Zend/Amf/Parse/TypeLoader.php diff --git a/lib/Zend/Amf/Request.php b/lib/internal/Zend/Amf/Request.php similarity index 100% rename from lib/Zend/Amf/Request.php rename to lib/internal/Zend/Amf/Request.php diff --git a/lib/Zend/Amf/Request/Http.php b/lib/internal/Zend/Amf/Request/Http.php similarity index 100% rename from lib/Zend/Amf/Request/Http.php rename to lib/internal/Zend/Amf/Request/Http.php diff --git a/lib/Zend/Amf/Response.php b/lib/internal/Zend/Amf/Response.php similarity index 100% rename from lib/Zend/Amf/Response.php rename to lib/internal/Zend/Amf/Response.php diff --git a/lib/Zend/Amf/Response/Http.php b/lib/internal/Zend/Amf/Response/Http.php similarity index 100% rename from lib/Zend/Amf/Response/Http.php rename to lib/internal/Zend/Amf/Response/Http.php diff --git a/lib/Zend/Amf/Server.php b/lib/internal/Zend/Amf/Server.php similarity index 100% rename from lib/Zend/Amf/Server.php rename to lib/internal/Zend/Amf/Server.php diff --git a/lib/Zend/Amf/Server/Exception.php b/lib/internal/Zend/Amf/Server/Exception.php similarity index 100% rename from lib/Zend/Amf/Server/Exception.php rename to lib/internal/Zend/Amf/Server/Exception.php diff --git a/lib/Zend/Amf/Util/BinaryStream.php b/lib/internal/Zend/Amf/Util/BinaryStream.php similarity index 100% rename from lib/Zend/Amf/Util/BinaryStream.php rename to lib/internal/Zend/Amf/Util/BinaryStream.php diff --git a/lib/Zend/Amf/Value/ByteArray.php b/lib/internal/Zend/Amf/Value/ByteArray.php similarity index 100% rename from lib/Zend/Amf/Value/ByteArray.php rename to lib/internal/Zend/Amf/Value/ByteArray.php diff --git a/lib/Zend/Amf/Value/MessageBody.php b/lib/internal/Zend/Amf/Value/MessageBody.php similarity index 100% rename from lib/Zend/Amf/Value/MessageBody.php rename to lib/internal/Zend/Amf/Value/MessageBody.php diff --git a/lib/Zend/Amf/Value/MessageHeader.php b/lib/internal/Zend/Amf/Value/MessageHeader.php similarity index 100% rename from lib/Zend/Amf/Value/MessageHeader.php rename to lib/internal/Zend/Amf/Value/MessageHeader.php diff --git a/lib/Zend/Amf/Value/Messaging/AbstractMessage.php b/lib/internal/Zend/Amf/Value/Messaging/AbstractMessage.php similarity index 100% rename from lib/Zend/Amf/Value/Messaging/AbstractMessage.php rename to lib/internal/Zend/Amf/Value/Messaging/AbstractMessage.php diff --git a/lib/Zend/Amf/Value/Messaging/AcknowledgeMessage.php b/lib/internal/Zend/Amf/Value/Messaging/AcknowledgeMessage.php similarity index 100% rename from lib/Zend/Amf/Value/Messaging/AcknowledgeMessage.php rename to lib/internal/Zend/Amf/Value/Messaging/AcknowledgeMessage.php diff --git a/lib/Zend/Amf/Value/Messaging/ArrayCollection.php b/lib/internal/Zend/Amf/Value/Messaging/ArrayCollection.php similarity index 100% rename from lib/Zend/Amf/Value/Messaging/ArrayCollection.php rename to lib/internal/Zend/Amf/Value/Messaging/ArrayCollection.php diff --git a/lib/Zend/Amf/Value/Messaging/AsyncMessage.php b/lib/internal/Zend/Amf/Value/Messaging/AsyncMessage.php similarity index 100% rename from lib/Zend/Amf/Value/Messaging/AsyncMessage.php rename to lib/internal/Zend/Amf/Value/Messaging/AsyncMessage.php diff --git a/lib/Zend/Amf/Value/Messaging/CommandMessage.php b/lib/internal/Zend/Amf/Value/Messaging/CommandMessage.php similarity index 100% rename from lib/Zend/Amf/Value/Messaging/CommandMessage.php rename to lib/internal/Zend/Amf/Value/Messaging/CommandMessage.php diff --git a/lib/Zend/Amf/Value/Messaging/ErrorMessage.php b/lib/internal/Zend/Amf/Value/Messaging/ErrorMessage.php similarity index 100% rename from lib/Zend/Amf/Value/Messaging/ErrorMessage.php rename to lib/internal/Zend/Amf/Value/Messaging/ErrorMessage.php diff --git a/lib/Zend/Amf/Value/Messaging/RemotingMessage.php b/lib/internal/Zend/Amf/Value/Messaging/RemotingMessage.php similarity index 100% rename from lib/Zend/Amf/Value/Messaging/RemotingMessage.php rename to lib/internal/Zend/Amf/Value/Messaging/RemotingMessage.php diff --git a/lib/Zend/Amf/Value/TraitsInfo.php b/lib/internal/Zend/Amf/Value/TraitsInfo.php similarity index 100% rename from lib/Zend/Amf/Value/TraitsInfo.php rename to lib/internal/Zend/Amf/Value/TraitsInfo.php diff --git a/lib/Zend/Application.php b/lib/internal/Zend/Application.php similarity index 100% rename from lib/Zend/Application.php rename to lib/internal/Zend/Application.php diff --git a/lib/Zend/Application/Bootstrap/Bootstrap.php b/lib/internal/Zend/Application/Bootstrap/Bootstrap.php similarity index 100% rename from lib/Zend/Application/Bootstrap/Bootstrap.php rename to lib/internal/Zend/Application/Bootstrap/Bootstrap.php diff --git a/lib/Zend/Application/Bootstrap/BootstrapAbstract.php b/lib/internal/Zend/Application/Bootstrap/BootstrapAbstract.php similarity index 100% rename from lib/Zend/Application/Bootstrap/BootstrapAbstract.php rename to lib/internal/Zend/Application/Bootstrap/BootstrapAbstract.php diff --git a/lib/Zend/Application/Bootstrap/Bootstrapper.php b/lib/internal/Zend/Application/Bootstrap/Bootstrapper.php similarity index 100% rename from lib/Zend/Application/Bootstrap/Bootstrapper.php rename to lib/internal/Zend/Application/Bootstrap/Bootstrapper.php diff --git a/lib/Zend/Application/Bootstrap/Exception.php b/lib/internal/Zend/Application/Bootstrap/Exception.php similarity index 100% rename from lib/Zend/Application/Bootstrap/Exception.php rename to lib/internal/Zend/Application/Bootstrap/Exception.php diff --git a/lib/Zend/Application/Bootstrap/ResourceBootstrapper.php b/lib/internal/Zend/Application/Bootstrap/ResourceBootstrapper.php similarity index 100% rename from lib/Zend/Application/Bootstrap/ResourceBootstrapper.php rename to lib/internal/Zend/Application/Bootstrap/ResourceBootstrapper.php diff --git a/lib/Zend/Application/Exception.php b/lib/internal/Zend/Application/Exception.php similarity index 100% rename from lib/Zend/Application/Exception.php rename to lib/internal/Zend/Application/Exception.php diff --git a/lib/Zend/Application/Module/Autoloader.php b/lib/internal/Zend/Application/Module/Autoloader.php similarity index 100% rename from lib/Zend/Application/Module/Autoloader.php rename to lib/internal/Zend/Application/Module/Autoloader.php diff --git a/lib/Zend/Application/Module/Bootstrap.php b/lib/internal/Zend/Application/Module/Bootstrap.php similarity index 100% rename from lib/Zend/Application/Module/Bootstrap.php rename to lib/internal/Zend/Application/Module/Bootstrap.php diff --git a/lib/Zend/Application/Resource/Cachemanager.php b/lib/internal/Zend/Application/Resource/Cachemanager.php similarity index 100% rename from lib/Zend/Application/Resource/Cachemanager.php rename to lib/internal/Zend/Application/Resource/Cachemanager.php diff --git a/lib/Zend/Application/Resource/Db.php b/lib/internal/Zend/Application/Resource/Db.php similarity index 100% rename from lib/Zend/Application/Resource/Db.php rename to lib/internal/Zend/Application/Resource/Db.php diff --git a/lib/Zend/Application/Resource/Dojo.php b/lib/internal/Zend/Application/Resource/Dojo.php similarity index 100% rename from lib/Zend/Application/Resource/Dojo.php rename to lib/internal/Zend/Application/Resource/Dojo.php diff --git a/lib/Zend/Application/Resource/Exception.php b/lib/internal/Zend/Application/Resource/Exception.php similarity index 100% rename from lib/Zend/Application/Resource/Exception.php rename to lib/internal/Zend/Application/Resource/Exception.php diff --git a/lib/Zend/Application/Resource/Frontcontroller.php b/lib/internal/Zend/Application/Resource/Frontcontroller.php similarity index 100% rename from lib/Zend/Application/Resource/Frontcontroller.php rename to lib/internal/Zend/Application/Resource/Frontcontroller.php diff --git a/lib/Zend/Application/Resource/Layout.php b/lib/internal/Zend/Application/Resource/Layout.php similarity index 100% rename from lib/Zend/Application/Resource/Layout.php rename to lib/internal/Zend/Application/Resource/Layout.php diff --git a/lib/Zend/Application/Resource/Locale.php b/lib/internal/Zend/Application/Resource/Locale.php similarity index 100% rename from lib/Zend/Application/Resource/Locale.php rename to lib/internal/Zend/Application/Resource/Locale.php diff --git a/lib/Zend/Application/Resource/Log.php b/lib/internal/Zend/Application/Resource/Log.php similarity index 100% rename from lib/Zend/Application/Resource/Log.php rename to lib/internal/Zend/Application/Resource/Log.php diff --git a/lib/Zend/Application/Resource/Mail.php b/lib/internal/Zend/Application/Resource/Mail.php similarity index 100% rename from lib/Zend/Application/Resource/Mail.php rename to lib/internal/Zend/Application/Resource/Mail.php diff --git a/lib/Zend/Application/Resource/Modules.php b/lib/internal/Zend/Application/Resource/Modules.php similarity index 100% rename from lib/Zend/Application/Resource/Modules.php rename to lib/internal/Zend/Application/Resource/Modules.php diff --git a/lib/Zend/Application/Resource/Multidb.php b/lib/internal/Zend/Application/Resource/Multidb.php similarity index 100% rename from lib/Zend/Application/Resource/Multidb.php rename to lib/internal/Zend/Application/Resource/Multidb.php diff --git a/lib/Zend/Application/Resource/Navigation.php b/lib/internal/Zend/Application/Resource/Navigation.php similarity index 100% rename from lib/Zend/Application/Resource/Navigation.php rename to lib/internal/Zend/Application/Resource/Navigation.php diff --git a/lib/Zend/Application/Resource/Resource.php b/lib/internal/Zend/Application/Resource/Resource.php similarity index 100% rename from lib/Zend/Application/Resource/Resource.php rename to lib/internal/Zend/Application/Resource/Resource.php diff --git a/lib/Zend/Application/Resource/ResourceAbstract.php b/lib/internal/Zend/Application/Resource/ResourceAbstract.php similarity index 100% rename from lib/Zend/Application/Resource/ResourceAbstract.php rename to lib/internal/Zend/Application/Resource/ResourceAbstract.php diff --git a/lib/Zend/Application/Resource/Router.php b/lib/internal/Zend/Application/Resource/Router.php similarity index 100% rename from lib/Zend/Application/Resource/Router.php rename to lib/internal/Zend/Application/Resource/Router.php diff --git a/lib/Zend/Application/Resource/Session.php b/lib/internal/Zend/Application/Resource/Session.php similarity index 100% rename from lib/Zend/Application/Resource/Session.php rename to lib/internal/Zend/Application/Resource/Session.php diff --git a/lib/Zend/Application/Resource/Translate.php b/lib/internal/Zend/Application/Resource/Translate.php similarity index 100% rename from lib/Zend/Application/Resource/Translate.php rename to lib/internal/Zend/Application/Resource/Translate.php diff --git a/lib/Zend/Application/Resource/Useragent.php b/lib/internal/Zend/Application/Resource/Useragent.php similarity index 100% rename from lib/Zend/Application/Resource/Useragent.php rename to lib/internal/Zend/Application/Resource/Useragent.php diff --git a/lib/Zend/Application/Resource/View.php b/lib/internal/Zend/Application/Resource/View.php similarity index 100% rename from lib/Zend/Application/Resource/View.php rename to lib/internal/Zend/Application/Resource/View.php diff --git a/lib/Zend/Auth.php b/lib/internal/Zend/Auth.php similarity index 100% rename from lib/Zend/Auth.php rename to lib/internal/Zend/Auth.php diff --git a/lib/Zend/Auth/Adapter/DbTable.php b/lib/internal/Zend/Auth/Adapter/DbTable.php similarity index 100% rename from lib/Zend/Auth/Adapter/DbTable.php rename to lib/internal/Zend/Auth/Adapter/DbTable.php diff --git a/lib/Zend/Auth/Adapter/Digest.php b/lib/internal/Zend/Auth/Adapter/Digest.php similarity index 100% rename from lib/Zend/Auth/Adapter/Digest.php rename to lib/internal/Zend/Auth/Adapter/Digest.php diff --git a/lib/Zend/Auth/Adapter/Exception.php b/lib/internal/Zend/Auth/Adapter/Exception.php similarity index 100% rename from lib/Zend/Auth/Adapter/Exception.php rename to lib/internal/Zend/Auth/Adapter/Exception.php diff --git a/lib/Zend/Auth/Adapter/Http.php b/lib/internal/Zend/Auth/Adapter/Http.php similarity index 100% rename from lib/Zend/Auth/Adapter/Http.php rename to lib/internal/Zend/Auth/Adapter/Http.php diff --git a/lib/Zend/Auth/Adapter/Http/Resolver/Exception.php b/lib/internal/Zend/Auth/Adapter/Http/Resolver/Exception.php similarity index 100% rename from lib/Zend/Auth/Adapter/Http/Resolver/Exception.php rename to lib/internal/Zend/Auth/Adapter/Http/Resolver/Exception.php diff --git a/lib/Zend/Auth/Adapter/Http/Resolver/File.php b/lib/internal/Zend/Auth/Adapter/Http/Resolver/File.php similarity index 100% rename from lib/Zend/Auth/Adapter/Http/Resolver/File.php rename to lib/internal/Zend/Auth/Adapter/Http/Resolver/File.php diff --git a/lib/Zend/Auth/Adapter/Http/Resolver/Interface.php b/lib/internal/Zend/Auth/Adapter/Http/Resolver/Interface.php similarity index 100% rename from lib/Zend/Auth/Adapter/Http/Resolver/Interface.php rename to lib/internal/Zend/Auth/Adapter/Http/Resolver/Interface.php diff --git a/lib/Zend/Auth/Adapter/InfoCard.php b/lib/internal/Zend/Auth/Adapter/InfoCard.php similarity index 100% rename from lib/Zend/Auth/Adapter/InfoCard.php rename to lib/internal/Zend/Auth/Adapter/InfoCard.php diff --git a/lib/Zend/Auth/Adapter/Interface.php b/lib/internal/Zend/Auth/Adapter/Interface.php similarity index 100% rename from lib/Zend/Auth/Adapter/Interface.php rename to lib/internal/Zend/Auth/Adapter/Interface.php diff --git a/lib/Zend/Auth/Adapter/Ldap.php b/lib/internal/Zend/Auth/Adapter/Ldap.php similarity index 100% rename from lib/Zend/Auth/Adapter/Ldap.php rename to lib/internal/Zend/Auth/Adapter/Ldap.php diff --git a/lib/Zend/Auth/Adapter/OpenId.php b/lib/internal/Zend/Auth/Adapter/OpenId.php similarity index 100% rename from lib/Zend/Auth/Adapter/OpenId.php rename to lib/internal/Zend/Auth/Adapter/OpenId.php diff --git a/lib/Zend/Auth/Exception.php b/lib/internal/Zend/Auth/Exception.php similarity index 100% rename from lib/Zend/Auth/Exception.php rename to lib/internal/Zend/Auth/Exception.php diff --git a/lib/Zend/Auth/Result.php b/lib/internal/Zend/Auth/Result.php similarity index 100% rename from lib/Zend/Auth/Result.php rename to lib/internal/Zend/Auth/Result.php diff --git a/lib/Zend/Auth/Storage/Exception.php b/lib/internal/Zend/Auth/Storage/Exception.php similarity index 100% rename from lib/Zend/Auth/Storage/Exception.php rename to lib/internal/Zend/Auth/Storage/Exception.php diff --git a/lib/Zend/Auth/Storage/Interface.php b/lib/internal/Zend/Auth/Storage/Interface.php similarity index 100% rename from lib/Zend/Auth/Storage/Interface.php rename to lib/internal/Zend/Auth/Storage/Interface.php diff --git a/lib/Zend/Auth/Storage/NonPersistent.php b/lib/internal/Zend/Auth/Storage/NonPersistent.php similarity index 100% rename from lib/Zend/Auth/Storage/NonPersistent.php rename to lib/internal/Zend/Auth/Storage/NonPersistent.php diff --git a/lib/Zend/Auth/Storage/Session.php b/lib/internal/Zend/Auth/Storage/Session.php similarity index 100% rename from lib/Zend/Auth/Storage/Session.php rename to lib/internal/Zend/Auth/Storage/Session.php diff --git a/lib/Zend/Barcode.php b/lib/internal/Zend/Barcode.php similarity index 100% rename from lib/Zend/Barcode.php rename to lib/internal/Zend/Barcode.php diff --git a/lib/Zend/Barcode/Exception.php b/lib/internal/Zend/Barcode/Exception.php similarity index 100% rename from lib/Zend/Barcode/Exception.php rename to lib/internal/Zend/Barcode/Exception.php diff --git a/lib/Zend/Barcode/Object/Code128.php b/lib/internal/Zend/Barcode/Object/Code128.php similarity index 100% rename from lib/Zend/Barcode/Object/Code128.php rename to lib/internal/Zend/Barcode/Object/Code128.php diff --git a/lib/Zend/Barcode/Object/Code25.php b/lib/internal/Zend/Barcode/Object/Code25.php similarity index 100% rename from lib/Zend/Barcode/Object/Code25.php rename to lib/internal/Zend/Barcode/Object/Code25.php diff --git a/lib/Zend/Barcode/Object/Code25interleaved.php b/lib/internal/Zend/Barcode/Object/Code25interleaved.php similarity index 100% rename from lib/Zend/Barcode/Object/Code25interleaved.php rename to lib/internal/Zend/Barcode/Object/Code25interleaved.php diff --git a/lib/Zend/Barcode/Object/Code39.php b/lib/internal/Zend/Barcode/Object/Code39.php similarity index 100% rename from lib/Zend/Barcode/Object/Code39.php rename to lib/internal/Zend/Barcode/Object/Code39.php diff --git a/lib/Zend/Barcode/Object/Ean13.php b/lib/internal/Zend/Barcode/Object/Ean13.php similarity index 100% rename from lib/Zend/Barcode/Object/Ean13.php rename to lib/internal/Zend/Barcode/Object/Ean13.php diff --git a/lib/Zend/Barcode/Object/Ean2.php b/lib/internal/Zend/Barcode/Object/Ean2.php similarity index 100% rename from lib/Zend/Barcode/Object/Ean2.php rename to lib/internal/Zend/Barcode/Object/Ean2.php diff --git a/lib/Zend/Barcode/Object/Ean5.php b/lib/internal/Zend/Barcode/Object/Ean5.php similarity index 100% rename from lib/Zend/Barcode/Object/Ean5.php rename to lib/internal/Zend/Barcode/Object/Ean5.php diff --git a/lib/Zend/Barcode/Object/Ean8.php b/lib/internal/Zend/Barcode/Object/Ean8.php similarity index 100% rename from lib/Zend/Barcode/Object/Ean8.php rename to lib/internal/Zend/Barcode/Object/Ean8.php diff --git a/lib/Zend/Barcode/Object/Error.php b/lib/internal/Zend/Barcode/Object/Error.php similarity index 100% rename from lib/Zend/Barcode/Object/Error.php rename to lib/internal/Zend/Barcode/Object/Error.php diff --git a/lib/Zend/Barcode/Object/Exception.php b/lib/internal/Zend/Barcode/Object/Exception.php similarity index 100% rename from lib/Zend/Barcode/Object/Exception.php rename to lib/internal/Zend/Barcode/Object/Exception.php diff --git a/lib/Zend/Barcode/Object/Identcode.php b/lib/internal/Zend/Barcode/Object/Identcode.php similarity index 100% rename from lib/Zend/Barcode/Object/Identcode.php rename to lib/internal/Zend/Barcode/Object/Identcode.php diff --git a/lib/Zend/Barcode/Object/Itf14.php b/lib/internal/Zend/Barcode/Object/Itf14.php similarity index 100% rename from lib/Zend/Barcode/Object/Itf14.php rename to lib/internal/Zend/Barcode/Object/Itf14.php diff --git a/lib/Zend/Barcode/Object/Leitcode.php b/lib/internal/Zend/Barcode/Object/Leitcode.php similarity index 100% rename from lib/Zend/Barcode/Object/Leitcode.php rename to lib/internal/Zend/Barcode/Object/Leitcode.php diff --git a/lib/Zend/Barcode/Object/ObjectAbstract.php b/lib/internal/Zend/Barcode/Object/ObjectAbstract.php similarity index 100% rename from lib/Zend/Barcode/Object/ObjectAbstract.php rename to lib/internal/Zend/Barcode/Object/ObjectAbstract.php diff --git a/lib/Zend/Barcode/Object/Planet.php b/lib/internal/Zend/Barcode/Object/Planet.php similarity index 100% rename from lib/Zend/Barcode/Object/Planet.php rename to lib/internal/Zend/Barcode/Object/Planet.php diff --git a/lib/Zend/Barcode/Object/Postnet.php b/lib/internal/Zend/Barcode/Object/Postnet.php similarity index 100% rename from lib/Zend/Barcode/Object/Postnet.php rename to lib/internal/Zend/Barcode/Object/Postnet.php diff --git a/lib/Zend/Barcode/Object/Royalmail.php b/lib/internal/Zend/Barcode/Object/Royalmail.php similarity index 100% rename from lib/Zend/Barcode/Object/Royalmail.php rename to lib/internal/Zend/Barcode/Object/Royalmail.php diff --git a/lib/Zend/Barcode/Object/Upca.php b/lib/internal/Zend/Barcode/Object/Upca.php similarity index 100% rename from lib/Zend/Barcode/Object/Upca.php rename to lib/internal/Zend/Barcode/Object/Upca.php diff --git a/lib/Zend/Barcode/Object/Upce.php b/lib/internal/Zend/Barcode/Object/Upce.php similarity index 100% rename from lib/Zend/Barcode/Object/Upce.php rename to lib/internal/Zend/Barcode/Object/Upce.php diff --git a/lib/Zend/Barcode/Renderer/Exception.php b/lib/internal/Zend/Barcode/Renderer/Exception.php similarity index 100% rename from lib/Zend/Barcode/Renderer/Exception.php rename to lib/internal/Zend/Barcode/Renderer/Exception.php diff --git a/lib/Zend/Barcode/Renderer/Image.php b/lib/internal/Zend/Barcode/Renderer/Image.php similarity index 100% rename from lib/Zend/Barcode/Renderer/Image.php rename to lib/internal/Zend/Barcode/Renderer/Image.php diff --git a/lib/Zend/Barcode/Renderer/Pdf.php b/lib/internal/Zend/Barcode/Renderer/Pdf.php similarity index 100% rename from lib/Zend/Barcode/Renderer/Pdf.php rename to lib/internal/Zend/Barcode/Renderer/Pdf.php diff --git a/lib/Zend/Barcode/Renderer/RendererAbstract.php b/lib/internal/Zend/Barcode/Renderer/RendererAbstract.php similarity index 100% rename from lib/Zend/Barcode/Renderer/RendererAbstract.php rename to lib/internal/Zend/Barcode/Renderer/RendererAbstract.php diff --git a/lib/Zend/Barcode/Renderer/Svg.php b/lib/internal/Zend/Barcode/Renderer/Svg.php similarity index 100% rename from lib/Zend/Barcode/Renderer/Svg.php rename to lib/internal/Zend/Barcode/Renderer/Svg.php diff --git a/lib/Zend/Cache.php b/lib/internal/Zend/Cache.php similarity index 100% rename from lib/Zend/Cache.php rename to lib/internal/Zend/Cache.php diff --git a/lib/Zend/Cache/Backend.php b/lib/internal/Zend/Cache/Backend.php similarity index 100% rename from lib/Zend/Cache/Backend.php rename to lib/internal/Zend/Cache/Backend.php diff --git a/lib/Zend/Cache/Backend/Apc.php b/lib/internal/Zend/Cache/Backend/Apc.php similarity index 100% rename from lib/Zend/Cache/Backend/Apc.php rename to lib/internal/Zend/Cache/Backend/Apc.php diff --git a/lib/Zend/Cache/Backend/BlackHole.php b/lib/internal/Zend/Cache/Backend/BlackHole.php similarity index 100% rename from lib/Zend/Cache/Backend/BlackHole.php rename to lib/internal/Zend/Cache/Backend/BlackHole.php diff --git a/lib/Zend/Cache/Backend/ExtendedInterface.php b/lib/internal/Zend/Cache/Backend/ExtendedInterface.php similarity index 100% rename from lib/Zend/Cache/Backend/ExtendedInterface.php rename to lib/internal/Zend/Cache/Backend/ExtendedInterface.php diff --git a/lib/Zend/Cache/Backend/File.php b/lib/internal/Zend/Cache/Backend/File.php similarity index 100% rename from lib/Zend/Cache/Backend/File.php rename to lib/internal/Zend/Cache/Backend/File.php diff --git a/lib/Zend/Cache/Backend/Interface.php b/lib/internal/Zend/Cache/Backend/Interface.php similarity index 100% rename from lib/Zend/Cache/Backend/Interface.php rename to lib/internal/Zend/Cache/Backend/Interface.php diff --git a/lib/Zend/Cache/Backend/Libmemcached.php b/lib/internal/Zend/Cache/Backend/Libmemcached.php similarity index 100% rename from lib/Zend/Cache/Backend/Libmemcached.php rename to lib/internal/Zend/Cache/Backend/Libmemcached.php diff --git a/lib/Zend/Cache/Backend/Memcached.php b/lib/internal/Zend/Cache/Backend/Memcached.php similarity index 100% rename from lib/Zend/Cache/Backend/Memcached.php rename to lib/internal/Zend/Cache/Backend/Memcached.php diff --git a/lib/Zend/Cache/Backend/Sqlite.php b/lib/internal/Zend/Cache/Backend/Sqlite.php similarity index 100% rename from lib/Zend/Cache/Backend/Sqlite.php rename to lib/internal/Zend/Cache/Backend/Sqlite.php diff --git a/lib/Zend/Cache/Backend/Static.php b/lib/internal/Zend/Cache/Backend/Static.php similarity index 100% rename from lib/Zend/Cache/Backend/Static.php rename to lib/internal/Zend/Cache/Backend/Static.php diff --git a/lib/Zend/Cache/Backend/Test.php b/lib/internal/Zend/Cache/Backend/Test.php similarity index 100% rename from lib/Zend/Cache/Backend/Test.php rename to lib/internal/Zend/Cache/Backend/Test.php diff --git a/lib/Zend/Cache/Backend/TwoLevels.php b/lib/internal/Zend/Cache/Backend/TwoLevels.php similarity index 100% rename from lib/Zend/Cache/Backend/TwoLevels.php rename to lib/internal/Zend/Cache/Backend/TwoLevels.php diff --git a/lib/Zend/Cache/Backend/Xcache.php b/lib/internal/Zend/Cache/Backend/Xcache.php similarity index 100% rename from lib/Zend/Cache/Backend/Xcache.php rename to lib/internal/Zend/Cache/Backend/Xcache.php diff --git a/lib/Zend/Cache/Backend/ZendPlatform.php b/lib/internal/Zend/Cache/Backend/ZendPlatform.php similarity index 100% rename from lib/Zend/Cache/Backend/ZendPlatform.php rename to lib/internal/Zend/Cache/Backend/ZendPlatform.php diff --git a/lib/Zend/Cache/Backend/ZendServer.php b/lib/internal/Zend/Cache/Backend/ZendServer.php similarity index 100% rename from lib/Zend/Cache/Backend/ZendServer.php rename to lib/internal/Zend/Cache/Backend/ZendServer.php diff --git a/lib/Zend/Cache/Backend/ZendServer/Disk.php b/lib/internal/Zend/Cache/Backend/ZendServer/Disk.php similarity index 100% rename from lib/Zend/Cache/Backend/ZendServer/Disk.php rename to lib/internal/Zend/Cache/Backend/ZendServer/Disk.php diff --git a/lib/Zend/Cache/Backend/ZendServer/ShMem.php b/lib/internal/Zend/Cache/Backend/ZendServer/ShMem.php similarity index 100% rename from lib/Zend/Cache/Backend/ZendServer/ShMem.php rename to lib/internal/Zend/Cache/Backend/ZendServer/ShMem.php diff --git a/lib/Zend/Cache/Core.php b/lib/internal/Zend/Cache/Core.php similarity index 100% rename from lib/Zend/Cache/Core.php rename to lib/internal/Zend/Cache/Core.php diff --git a/lib/Zend/Cache/Exception.php b/lib/internal/Zend/Cache/Exception.php similarity index 100% rename from lib/Zend/Cache/Exception.php rename to lib/internal/Zend/Cache/Exception.php diff --git a/lib/Zend/Cache/Frontend/Capture.php b/lib/internal/Zend/Cache/Frontend/Capture.php similarity index 100% rename from lib/Zend/Cache/Frontend/Capture.php rename to lib/internal/Zend/Cache/Frontend/Capture.php diff --git a/lib/Zend/Cache/Frontend/Class.php b/lib/internal/Zend/Cache/Frontend/Class.php similarity index 100% rename from lib/Zend/Cache/Frontend/Class.php rename to lib/internal/Zend/Cache/Frontend/Class.php diff --git a/lib/Zend/Cache/Frontend/File.php b/lib/internal/Zend/Cache/Frontend/File.php similarity index 100% rename from lib/Zend/Cache/Frontend/File.php rename to lib/internal/Zend/Cache/Frontend/File.php diff --git a/lib/Zend/Cache/Frontend/Function.php b/lib/internal/Zend/Cache/Frontend/Function.php similarity index 100% rename from lib/Zend/Cache/Frontend/Function.php rename to lib/internal/Zend/Cache/Frontend/Function.php diff --git a/lib/Zend/Cache/Frontend/Output.php b/lib/internal/Zend/Cache/Frontend/Output.php similarity index 100% rename from lib/Zend/Cache/Frontend/Output.php rename to lib/internal/Zend/Cache/Frontend/Output.php diff --git a/lib/Zend/Cache/Frontend/Page.php b/lib/internal/Zend/Cache/Frontend/Page.php similarity index 100% rename from lib/Zend/Cache/Frontend/Page.php rename to lib/internal/Zend/Cache/Frontend/Page.php diff --git a/lib/Zend/Cache/Manager.php b/lib/internal/Zend/Cache/Manager.php similarity index 100% rename from lib/Zend/Cache/Manager.php rename to lib/internal/Zend/Cache/Manager.php diff --git a/lib/Zend/Captcha/Adapter.php b/lib/internal/Zend/Captcha/Adapter.php similarity index 100% rename from lib/Zend/Captcha/Adapter.php rename to lib/internal/Zend/Captcha/Adapter.php diff --git a/lib/Zend/Captcha/Base.php b/lib/internal/Zend/Captcha/Base.php similarity index 100% rename from lib/Zend/Captcha/Base.php rename to lib/internal/Zend/Captcha/Base.php diff --git a/lib/Zend/Captcha/Dumb.php b/lib/internal/Zend/Captcha/Dumb.php similarity index 100% rename from lib/Zend/Captcha/Dumb.php rename to lib/internal/Zend/Captcha/Dumb.php diff --git a/lib/Zend/Captcha/Exception.php b/lib/internal/Zend/Captcha/Exception.php similarity index 100% rename from lib/Zend/Captcha/Exception.php rename to lib/internal/Zend/Captcha/Exception.php diff --git a/lib/Zend/Captcha/Figlet.php b/lib/internal/Zend/Captcha/Figlet.php similarity index 100% rename from lib/Zend/Captcha/Figlet.php rename to lib/internal/Zend/Captcha/Figlet.php diff --git a/lib/Zend/Captcha/Image.php b/lib/internal/Zend/Captcha/Image.php similarity index 100% rename from lib/Zend/Captcha/Image.php rename to lib/internal/Zend/Captcha/Image.php diff --git a/lib/Zend/Captcha/ReCaptcha.php b/lib/internal/Zend/Captcha/ReCaptcha.php similarity index 100% rename from lib/Zend/Captcha/ReCaptcha.php rename to lib/internal/Zend/Captcha/ReCaptcha.php diff --git a/lib/Zend/Captcha/Word.php b/lib/internal/Zend/Captcha/Word.php similarity index 100% rename from lib/Zend/Captcha/Word.php rename to lib/internal/Zend/Captcha/Word.php diff --git a/lib/Zend/Cloud/AbstractFactory.php b/lib/internal/Zend/Cloud/AbstractFactory.php similarity index 100% rename from lib/Zend/Cloud/AbstractFactory.php rename to lib/internal/Zend/Cloud/AbstractFactory.php diff --git a/lib/Zend/Cloud/DocumentService/Adapter.php b/lib/internal/Zend/Cloud/DocumentService/Adapter.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Adapter.php rename to lib/internal/Zend/Cloud/DocumentService/Adapter.php diff --git a/lib/Zend/Cloud/DocumentService/Adapter/AbstractAdapter.php b/lib/internal/Zend/Cloud/DocumentService/Adapter/AbstractAdapter.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Adapter/AbstractAdapter.php rename to lib/internal/Zend/Cloud/DocumentService/Adapter/AbstractAdapter.php diff --git a/lib/Zend/Cloud/DocumentService/Adapter/SimpleDb.php b/lib/internal/Zend/Cloud/DocumentService/Adapter/SimpleDb.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Adapter/SimpleDb.php rename to lib/internal/Zend/Cloud/DocumentService/Adapter/SimpleDb.php diff --git a/lib/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php b/lib/internal/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php rename to lib/internal/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php diff --git a/lib/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php b/lib/internal/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php rename to lib/internal/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php diff --git a/lib/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php b/lib/internal/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php rename to lib/internal/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php diff --git a/lib/Zend/Cloud/DocumentService/Document.php b/lib/internal/Zend/Cloud/DocumentService/Document.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Document.php rename to lib/internal/Zend/Cloud/DocumentService/Document.php diff --git a/lib/Zend/Cloud/DocumentService/DocumentSet.php b/lib/internal/Zend/Cloud/DocumentService/DocumentSet.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/DocumentSet.php rename to lib/internal/Zend/Cloud/DocumentService/DocumentSet.php diff --git a/lib/Zend/Cloud/DocumentService/Exception.php b/lib/internal/Zend/Cloud/DocumentService/Exception.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Exception.php rename to lib/internal/Zend/Cloud/DocumentService/Exception.php diff --git a/lib/Zend/Cloud/DocumentService/Factory.php b/lib/internal/Zend/Cloud/DocumentService/Factory.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Factory.php rename to lib/internal/Zend/Cloud/DocumentService/Factory.php diff --git a/lib/Zend/Cloud/DocumentService/Query.php b/lib/internal/Zend/Cloud/DocumentService/Query.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/Query.php rename to lib/internal/Zend/Cloud/DocumentService/Query.php diff --git a/lib/Zend/Cloud/DocumentService/QueryAdapter.php b/lib/internal/Zend/Cloud/DocumentService/QueryAdapter.php similarity index 100% rename from lib/Zend/Cloud/DocumentService/QueryAdapter.php rename to lib/internal/Zend/Cloud/DocumentService/QueryAdapter.php diff --git a/lib/Zend/Cloud/Exception.php b/lib/internal/Zend/Cloud/Exception.php similarity index 100% rename from lib/Zend/Cloud/Exception.php rename to lib/internal/Zend/Cloud/Exception.php diff --git a/lib/Zend/Cloud/OperationNotAvailableException.php b/lib/internal/Zend/Cloud/OperationNotAvailableException.php similarity index 100% rename from lib/Zend/Cloud/OperationNotAvailableException.php rename to lib/internal/Zend/Cloud/OperationNotAvailableException.php diff --git a/lib/Zend/Cloud/QueueService/Adapter.php b/lib/internal/Zend/Cloud/QueueService/Adapter.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Adapter.php rename to lib/internal/Zend/Cloud/QueueService/Adapter.php diff --git a/lib/Zend/Cloud/QueueService/Adapter/AbstractAdapter.php b/lib/internal/Zend/Cloud/QueueService/Adapter/AbstractAdapter.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Adapter/AbstractAdapter.php rename to lib/internal/Zend/Cloud/QueueService/Adapter/AbstractAdapter.php diff --git a/lib/Zend/Cloud/QueueService/Adapter/Sqs.php b/lib/internal/Zend/Cloud/QueueService/Adapter/Sqs.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Adapter/Sqs.php rename to lib/internal/Zend/Cloud/QueueService/Adapter/Sqs.php diff --git a/lib/Zend/Cloud/QueueService/Adapter/WindowsAzure.php b/lib/internal/Zend/Cloud/QueueService/Adapter/WindowsAzure.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Adapter/WindowsAzure.php rename to lib/internal/Zend/Cloud/QueueService/Adapter/WindowsAzure.php diff --git a/lib/Zend/Cloud/QueueService/Adapter/ZendQueue.php b/lib/internal/Zend/Cloud/QueueService/Adapter/ZendQueue.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Adapter/ZendQueue.php rename to lib/internal/Zend/Cloud/QueueService/Adapter/ZendQueue.php diff --git a/lib/Zend/Cloud/QueueService/Exception.php b/lib/internal/Zend/Cloud/QueueService/Exception.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Exception.php rename to lib/internal/Zend/Cloud/QueueService/Exception.php diff --git a/lib/Zend/Cloud/QueueService/Factory.php b/lib/internal/Zend/Cloud/QueueService/Factory.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Factory.php rename to lib/internal/Zend/Cloud/QueueService/Factory.php diff --git a/lib/Zend/Cloud/QueueService/Message.php b/lib/internal/Zend/Cloud/QueueService/Message.php similarity index 100% rename from lib/Zend/Cloud/QueueService/Message.php rename to lib/internal/Zend/Cloud/QueueService/Message.php diff --git a/lib/Zend/Cloud/QueueService/MessageSet.php b/lib/internal/Zend/Cloud/QueueService/MessageSet.php similarity index 100% rename from lib/Zend/Cloud/QueueService/MessageSet.php rename to lib/internal/Zend/Cloud/QueueService/MessageSet.php diff --git a/lib/Zend/Cloud/StorageService/Adapter.php b/lib/internal/Zend/Cloud/StorageService/Adapter.php similarity index 100% rename from lib/Zend/Cloud/StorageService/Adapter.php rename to lib/internal/Zend/Cloud/StorageService/Adapter.php diff --git a/lib/Zend/Cloud/StorageService/Adapter/FileSystem.php b/lib/internal/Zend/Cloud/StorageService/Adapter/FileSystem.php similarity index 100% rename from lib/Zend/Cloud/StorageService/Adapter/FileSystem.php rename to lib/internal/Zend/Cloud/StorageService/Adapter/FileSystem.php diff --git a/lib/Zend/Cloud/StorageService/Adapter/Nirvanix.php b/lib/internal/Zend/Cloud/StorageService/Adapter/Nirvanix.php similarity index 100% rename from lib/Zend/Cloud/StorageService/Adapter/Nirvanix.php rename to lib/internal/Zend/Cloud/StorageService/Adapter/Nirvanix.php diff --git a/lib/Zend/Cloud/StorageService/Adapter/S3.php b/lib/internal/Zend/Cloud/StorageService/Adapter/S3.php similarity index 100% rename from lib/Zend/Cloud/StorageService/Adapter/S3.php rename to lib/internal/Zend/Cloud/StorageService/Adapter/S3.php diff --git a/lib/Zend/Cloud/StorageService/Adapter/WindowsAzure.php b/lib/internal/Zend/Cloud/StorageService/Adapter/WindowsAzure.php similarity index 100% rename from lib/Zend/Cloud/StorageService/Adapter/WindowsAzure.php rename to lib/internal/Zend/Cloud/StorageService/Adapter/WindowsAzure.php diff --git a/lib/Zend/Cloud/StorageService/Exception.php b/lib/internal/Zend/Cloud/StorageService/Exception.php similarity index 100% rename from lib/Zend/Cloud/StorageService/Exception.php rename to lib/internal/Zend/Cloud/StorageService/Exception.php diff --git a/lib/Zend/Cloud/StorageService/Factory.php b/lib/internal/Zend/Cloud/StorageService/Factory.php similarity index 100% rename from lib/Zend/Cloud/StorageService/Factory.php rename to lib/internal/Zend/Cloud/StorageService/Factory.php diff --git a/lib/Zend/Code/Annotation/AnnotationCollection.php b/lib/internal/Zend/Code/Annotation/AnnotationCollection.php similarity index 100% rename from lib/Zend/Code/Annotation/AnnotationCollection.php rename to lib/internal/Zend/Code/Annotation/AnnotationCollection.php diff --git a/lib/Zend/Code/Annotation/AnnotationInterface.php b/lib/internal/Zend/Code/Annotation/AnnotationInterface.php similarity index 100% rename from lib/Zend/Code/Annotation/AnnotationInterface.php rename to lib/internal/Zend/Code/Annotation/AnnotationInterface.php diff --git a/lib/Zend/Code/Annotation/AnnotationManager.php b/lib/internal/Zend/Code/Annotation/AnnotationManager.php similarity index 100% rename from lib/Zend/Code/Annotation/AnnotationManager.php rename to lib/internal/Zend/Code/Annotation/AnnotationManager.php diff --git a/lib/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php b/lib/internal/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php similarity index 100% rename from lib/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php rename to lib/internal/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php diff --git a/lib/Zend/Code/Annotation/Parser/GenericAnnotationParser.php b/lib/internal/Zend/Code/Annotation/Parser/GenericAnnotationParser.php similarity index 100% rename from lib/Zend/Code/Annotation/Parser/GenericAnnotationParser.php rename to lib/internal/Zend/Code/Annotation/Parser/GenericAnnotationParser.php diff --git a/lib/Zend/Code/Annotation/Parser/ParserInterface.php b/lib/internal/Zend/Code/Annotation/Parser/ParserInterface.php similarity index 100% rename from lib/Zend/Code/Annotation/Parser/ParserInterface.php rename to lib/internal/Zend/Code/Annotation/Parser/ParserInterface.php diff --git a/lib/Zend/Code/Exception/BadMethodCallException.php b/lib/internal/Zend/Code/Exception/BadMethodCallException.php similarity index 100% rename from lib/Zend/Code/Exception/BadMethodCallException.php rename to lib/internal/Zend/Code/Exception/BadMethodCallException.php diff --git a/lib/Zend/Code/Exception/ExceptionInterface.php b/lib/internal/Zend/Code/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Code/Exception/ExceptionInterface.php rename to lib/internal/Zend/Code/Exception/ExceptionInterface.php diff --git a/lib/Zend/Code/Exception/InvalidArgumentException.php b/lib/internal/Zend/Code/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Code/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Code/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Code/Exception/RuntimeException.php b/lib/internal/Zend/Code/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Code/Exception/RuntimeException.php rename to lib/internal/Zend/Code/Exception/RuntimeException.php diff --git a/lib/Zend/Code/Generator/AbstractGenerator.php b/lib/internal/Zend/Code/Generator/AbstractGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/AbstractGenerator.php rename to lib/internal/Zend/Code/Generator/AbstractGenerator.php diff --git a/lib/Zend/Code/Generator/AbstractMemberGenerator.php b/lib/internal/Zend/Code/Generator/AbstractMemberGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/AbstractMemberGenerator.php rename to lib/internal/Zend/Code/Generator/AbstractMemberGenerator.php diff --git a/lib/Zend/Code/Generator/BodyGenerator.php b/lib/internal/Zend/Code/Generator/BodyGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/BodyGenerator.php rename to lib/internal/Zend/Code/Generator/BodyGenerator.php diff --git a/lib/Zend/Code/Generator/ClassGenerator.php b/lib/internal/Zend/Code/Generator/ClassGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/ClassGenerator.php rename to lib/internal/Zend/Code/Generator/ClassGenerator.php diff --git a/lib/Zend/Code/Generator/DocBlock/Tag.php b/lib/internal/Zend/Code/Generator/DocBlock/Tag.php similarity index 100% rename from lib/Zend/Code/Generator/DocBlock/Tag.php rename to lib/internal/Zend/Code/Generator/DocBlock/Tag.php diff --git a/lib/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php b/lib/internal/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php similarity index 100% rename from lib/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php rename to lib/internal/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php diff --git a/lib/Zend/Code/Generator/DocBlock/Tag/ParamTag.php b/lib/internal/Zend/Code/Generator/DocBlock/Tag/ParamTag.php similarity index 100% rename from lib/Zend/Code/Generator/DocBlock/Tag/ParamTag.php rename to lib/internal/Zend/Code/Generator/DocBlock/Tag/ParamTag.php diff --git a/lib/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php b/lib/internal/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php similarity index 100% rename from lib/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php rename to lib/internal/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php diff --git a/lib/Zend/Code/Generator/DocBlockGenerator.php b/lib/internal/Zend/Code/Generator/DocBlockGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/DocBlockGenerator.php rename to lib/internal/Zend/Code/Generator/DocBlockGenerator.php diff --git a/lib/Zend/Code/Generator/Exception/ExceptionInterface.php b/lib/internal/Zend/Code/Generator/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Code/Generator/Exception/ExceptionInterface.php rename to lib/internal/Zend/Code/Generator/Exception/ExceptionInterface.php diff --git a/lib/Zend/Code/Generator/Exception/InvalidArgumentException.php b/lib/internal/Zend/Code/Generator/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Code/Generator/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Code/Generator/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Code/Generator/Exception/RuntimeException.php b/lib/internal/Zend/Code/Generator/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Code/Generator/Exception/RuntimeException.php rename to lib/internal/Zend/Code/Generator/Exception/RuntimeException.php diff --git a/lib/Zend/Code/Generator/FileGenerator.php b/lib/internal/Zend/Code/Generator/FileGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/FileGenerator.php rename to lib/internal/Zend/Code/Generator/FileGenerator.php diff --git a/lib/Zend/Code/Generator/FileGeneratorRegistry.php b/lib/internal/Zend/Code/Generator/FileGeneratorRegistry.php similarity index 100% rename from lib/Zend/Code/Generator/FileGeneratorRegistry.php rename to lib/internal/Zend/Code/Generator/FileGeneratorRegistry.php diff --git a/lib/Zend/Code/Generator/GeneratorInterface.php b/lib/internal/Zend/Code/Generator/GeneratorInterface.php similarity index 100% rename from lib/Zend/Code/Generator/GeneratorInterface.php rename to lib/internal/Zend/Code/Generator/GeneratorInterface.php diff --git a/lib/Zend/Code/Generator/MethodGenerator.php b/lib/internal/Zend/Code/Generator/MethodGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/MethodGenerator.php rename to lib/internal/Zend/Code/Generator/MethodGenerator.php diff --git a/lib/Zend/Code/Generator/ParameterGenerator.php b/lib/internal/Zend/Code/Generator/ParameterGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/ParameterGenerator.php rename to lib/internal/Zend/Code/Generator/ParameterGenerator.php diff --git a/lib/Zend/Code/Generator/PropertyGenerator.php b/lib/internal/Zend/Code/Generator/PropertyGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/PropertyGenerator.php rename to lib/internal/Zend/Code/Generator/PropertyGenerator.php diff --git a/lib/Zend/Code/Generator/PropertyValueGenerator.php b/lib/internal/Zend/Code/Generator/PropertyValueGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/PropertyValueGenerator.php rename to lib/internal/Zend/Code/Generator/PropertyValueGenerator.php diff --git a/lib/Zend/Code/Generator/ValueGenerator.php b/lib/internal/Zend/Code/Generator/ValueGenerator.php similarity index 100% rename from lib/Zend/Code/Generator/ValueGenerator.php rename to lib/internal/Zend/Code/Generator/ValueGenerator.php diff --git a/lib/Zend/Code/NameInformation.php b/lib/internal/Zend/Code/NameInformation.php similarity index 100% rename from lib/Zend/Code/NameInformation.php rename to lib/internal/Zend/Code/NameInformation.php diff --git a/lib/Zend/Code/Reflection/ClassReflection.php b/lib/internal/Zend/Code/Reflection/ClassReflection.php similarity index 100% rename from lib/Zend/Code/Reflection/ClassReflection.php rename to lib/internal/Zend/Code/Reflection/ClassReflection.php diff --git a/lib/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php b/lib/internal/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php rename to lib/internal/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php diff --git a/lib/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php b/lib/internal/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php rename to lib/internal/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php diff --git a/lib/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php b/lib/internal/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php rename to lib/internal/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php diff --git a/lib/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php b/lib/internal/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php rename to lib/internal/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php diff --git a/lib/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php b/lib/internal/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php rename to lib/internal/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php diff --git a/lib/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php b/lib/internal/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php rename to lib/internal/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php diff --git a/lib/Zend/Code/Reflection/DocBlock/TagManager.php b/lib/internal/Zend/Code/Reflection/DocBlock/TagManager.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlock/TagManager.php rename to lib/internal/Zend/Code/Reflection/DocBlock/TagManager.php diff --git a/lib/Zend/Code/Reflection/DocBlockReflection.php b/lib/internal/Zend/Code/Reflection/DocBlockReflection.php similarity index 100% rename from lib/Zend/Code/Reflection/DocBlockReflection.php rename to lib/internal/Zend/Code/Reflection/DocBlockReflection.php diff --git a/lib/Zend/Code/Reflection/Exception/BadMethodCallException.php b/lib/internal/Zend/Code/Reflection/Exception/BadMethodCallException.php similarity index 100% rename from lib/Zend/Code/Reflection/Exception/BadMethodCallException.php rename to lib/internal/Zend/Code/Reflection/Exception/BadMethodCallException.php diff --git a/lib/Zend/Code/Reflection/Exception/ExceptionInterface.php b/lib/internal/Zend/Code/Reflection/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Code/Reflection/Exception/ExceptionInterface.php rename to lib/internal/Zend/Code/Reflection/Exception/ExceptionInterface.php diff --git a/lib/Zend/Code/Reflection/Exception/InvalidArgumentException.php b/lib/internal/Zend/Code/Reflection/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Code/Reflection/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Code/Reflection/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Code/Reflection/Exception/RuntimeException.php b/lib/internal/Zend/Code/Reflection/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Code/Reflection/Exception/RuntimeException.php rename to lib/internal/Zend/Code/Reflection/Exception/RuntimeException.php diff --git a/lib/Zend/Code/Reflection/FileReflection.php b/lib/internal/Zend/Code/Reflection/FileReflection.php similarity index 100% rename from lib/Zend/Code/Reflection/FileReflection.php rename to lib/internal/Zend/Code/Reflection/FileReflection.php diff --git a/lib/Zend/Code/Reflection/FunctionReflection.php b/lib/internal/Zend/Code/Reflection/FunctionReflection.php similarity index 100% rename from lib/Zend/Code/Reflection/FunctionReflection.php rename to lib/internal/Zend/Code/Reflection/FunctionReflection.php diff --git a/lib/Zend/Code/Reflection/MethodReflection.php b/lib/internal/Zend/Code/Reflection/MethodReflection.php similarity index 100% rename from lib/Zend/Code/Reflection/MethodReflection.php rename to lib/internal/Zend/Code/Reflection/MethodReflection.php diff --git a/lib/Zend/Code/Reflection/ParameterReflection.php b/lib/internal/Zend/Code/Reflection/ParameterReflection.php similarity index 100% rename from lib/Zend/Code/Reflection/ParameterReflection.php rename to lib/internal/Zend/Code/Reflection/ParameterReflection.php diff --git a/lib/Zend/Code/Reflection/PropertyReflection.php b/lib/internal/Zend/Code/Reflection/PropertyReflection.php similarity index 100% rename from lib/Zend/Code/Reflection/PropertyReflection.php rename to lib/internal/Zend/Code/Reflection/PropertyReflection.php diff --git a/lib/Zend/Code/Reflection/ReflectionInterface.php b/lib/internal/Zend/Code/Reflection/ReflectionInterface.php similarity index 100% rename from lib/Zend/Code/Reflection/ReflectionInterface.php rename to lib/internal/Zend/Code/Reflection/ReflectionInterface.php diff --git a/lib/Zend/Code/Scanner/AggregateDirectoryScanner.php b/lib/internal/Zend/Code/Scanner/AggregateDirectoryScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/AggregateDirectoryScanner.php rename to lib/internal/Zend/Code/Scanner/AggregateDirectoryScanner.php diff --git a/lib/Zend/Code/Scanner/AnnotationScanner.php b/lib/internal/Zend/Code/Scanner/AnnotationScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/AnnotationScanner.php rename to lib/internal/Zend/Code/Scanner/AnnotationScanner.php diff --git a/lib/Zend/Code/Scanner/CachingFileScanner.php b/lib/internal/Zend/Code/Scanner/CachingFileScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/CachingFileScanner.php rename to lib/internal/Zend/Code/Scanner/CachingFileScanner.php diff --git a/lib/Zend/Code/Scanner/ClassScanner.php b/lib/internal/Zend/Code/Scanner/ClassScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/ClassScanner.php rename to lib/internal/Zend/Code/Scanner/ClassScanner.php diff --git a/lib/Zend/Code/Scanner/DerivedClassScanner.php b/lib/internal/Zend/Code/Scanner/DerivedClassScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/DerivedClassScanner.php rename to lib/internal/Zend/Code/Scanner/DerivedClassScanner.php diff --git a/lib/Zend/Code/Scanner/DirectoryScanner.php b/lib/internal/Zend/Code/Scanner/DirectoryScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/DirectoryScanner.php rename to lib/internal/Zend/Code/Scanner/DirectoryScanner.php diff --git a/lib/Zend/Code/Scanner/DocBlockScanner.php b/lib/internal/Zend/Code/Scanner/DocBlockScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/DocBlockScanner.php rename to lib/internal/Zend/Code/Scanner/DocBlockScanner.php diff --git a/lib/Zend/Code/Scanner/FileScanner.php b/lib/internal/Zend/Code/Scanner/FileScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/FileScanner.php rename to lib/internal/Zend/Code/Scanner/FileScanner.php diff --git a/lib/Zend/Code/Scanner/FunctionScanner.php b/lib/internal/Zend/Code/Scanner/FunctionScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/FunctionScanner.php rename to lib/internal/Zend/Code/Scanner/FunctionScanner.php diff --git a/lib/Zend/Code/Scanner/MethodScanner.php b/lib/internal/Zend/Code/Scanner/MethodScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/MethodScanner.php rename to lib/internal/Zend/Code/Scanner/MethodScanner.php diff --git a/lib/Zend/Code/Scanner/ParameterScanner.php b/lib/internal/Zend/Code/Scanner/ParameterScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/ParameterScanner.php rename to lib/internal/Zend/Code/Scanner/ParameterScanner.php diff --git a/lib/Zend/Code/Scanner/PropertyScanner.php b/lib/internal/Zend/Code/Scanner/PropertyScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/PropertyScanner.php rename to lib/internal/Zend/Code/Scanner/PropertyScanner.php diff --git a/lib/Zend/Code/Scanner/ScannerInterface.php b/lib/internal/Zend/Code/Scanner/ScannerInterface.php similarity index 100% rename from lib/Zend/Code/Scanner/ScannerInterface.php rename to lib/internal/Zend/Code/Scanner/ScannerInterface.php diff --git a/lib/Zend/Code/Scanner/TokenArrayScanner.php b/lib/internal/Zend/Code/Scanner/TokenArrayScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/TokenArrayScanner.php rename to lib/internal/Zend/Code/Scanner/TokenArrayScanner.php diff --git a/lib/Zend/Code/Scanner/Util.php b/lib/internal/Zend/Code/Scanner/Util.php similarity index 100% rename from lib/Zend/Code/Scanner/Util.php rename to lib/internal/Zend/Code/Scanner/Util.php diff --git a/lib/Zend/Code/Scanner/ValueScanner.php b/lib/internal/Zend/Code/Scanner/ValueScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/ValueScanner.php rename to lib/internal/Zend/Code/Scanner/ValueScanner.php diff --git a/lib/Zend/Code/Scanner/VariableScanner.php b/lib/internal/Zend/Code/Scanner/VariableScanner.php similarity index 100% rename from lib/Zend/Code/Scanner/VariableScanner.php rename to lib/internal/Zend/Code/Scanner/VariableScanner.php diff --git a/lib/Zend/Code/composer.json b/lib/internal/Zend/Code/composer.json similarity index 100% rename from lib/Zend/Code/composer.json rename to lib/internal/Zend/Code/composer.json diff --git a/lib/Zend/CodeGenerator/Abstract.php b/lib/internal/Zend/CodeGenerator/Abstract.php similarity index 100% rename from lib/Zend/CodeGenerator/Abstract.php rename to lib/internal/Zend/CodeGenerator/Abstract.php diff --git a/lib/Zend/CodeGenerator/Exception.php b/lib/internal/Zend/CodeGenerator/Exception.php similarity index 100% rename from lib/Zend/CodeGenerator/Exception.php rename to lib/internal/Zend/CodeGenerator/Exception.php diff --git a/lib/Zend/CodeGenerator/Php/Abstract.php b/lib/internal/Zend/CodeGenerator/Php/Abstract.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Abstract.php rename to lib/internal/Zend/CodeGenerator/Php/Abstract.php diff --git a/lib/Zend/CodeGenerator/Php/Body.php b/lib/internal/Zend/CodeGenerator/Php/Body.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Body.php rename to lib/internal/Zend/CodeGenerator/Php/Body.php diff --git a/lib/Zend/CodeGenerator/Php/Class.php b/lib/internal/Zend/CodeGenerator/Php/Class.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Class.php rename to lib/internal/Zend/CodeGenerator/Php/Class.php diff --git a/lib/Zend/CodeGenerator/Php/Docblock.php b/lib/internal/Zend/CodeGenerator/Php/Docblock.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Docblock.php rename to lib/internal/Zend/CodeGenerator/Php/Docblock.php diff --git a/lib/Zend/CodeGenerator/Php/Docblock/Tag.php b/lib/internal/Zend/CodeGenerator/Php/Docblock/Tag.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Docblock/Tag.php rename to lib/internal/Zend/CodeGenerator/Php/Docblock/Tag.php diff --git a/lib/Zend/CodeGenerator/Php/Docblock/Tag/License.php b/lib/internal/Zend/CodeGenerator/Php/Docblock/Tag/License.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Docblock/Tag/License.php rename to lib/internal/Zend/CodeGenerator/Php/Docblock/Tag/License.php diff --git a/lib/Zend/CodeGenerator/Php/Docblock/Tag/Param.php b/lib/internal/Zend/CodeGenerator/Php/Docblock/Tag/Param.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Docblock/Tag/Param.php rename to lib/internal/Zend/CodeGenerator/Php/Docblock/Tag/Param.php diff --git a/lib/Zend/CodeGenerator/Php/Docblock/Tag/Return.php b/lib/internal/Zend/CodeGenerator/Php/Docblock/Tag/Return.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Docblock/Tag/Return.php rename to lib/internal/Zend/CodeGenerator/Php/Docblock/Tag/Return.php diff --git a/lib/Zend/CodeGenerator/Php/Exception.php b/lib/internal/Zend/CodeGenerator/Php/Exception.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Exception.php rename to lib/internal/Zend/CodeGenerator/Php/Exception.php diff --git a/lib/Zend/CodeGenerator/Php/File.php b/lib/internal/Zend/CodeGenerator/Php/File.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/File.php rename to lib/internal/Zend/CodeGenerator/Php/File.php diff --git a/lib/Zend/CodeGenerator/Php/Member/Abstract.php b/lib/internal/Zend/CodeGenerator/Php/Member/Abstract.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Member/Abstract.php rename to lib/internal/Zend/CodeGenerator/Php/Member/Abstract.php diff --git a/lib/Zend/CodeGenerator/Php/Member/Container.php b/lib/internal/Zend/CodeGenerator/Php/Member/Container.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Member/Container.php rename to lib/internal/Zend/CodeGenerator/Php/Member/Container.php diff --git a/lib/Zend/CodeGenerator/Php/Method.php b/lib/internal/Zend/CodeGenerator/Php/Method.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Method.php rename to lib/internal/Zend/CodeGenerator/Php/Method.php diff --git a/lib/Zend/CodeGenerator/Php/Parameter.php b/lib/internal/Zend/CodeGenerator/Php/Parameter.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Parameter.php rename to lib/internal/Zend/CodeGenerator/Php/Parameter.php diff --git a/lib/Zend/CodeGenerator/Php/Parameter/DefaultValue.php b/lib/internal/Zend/CodeGenerator/Php/Parameter/DefaultValue.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Parameter/DefaultValue.php rename to lib/internal/Zend/CodeGenerator/Php/Parameter/DefaultValue.php diff --git a/lib/Zend/CodeGenerator/Php/Property.php b/lib/internal/Zend/CodeGenerator/Php/Property.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Property.php rename to lib/internal/Zend/CodeGenerator/Php/Property.php diff --git a/lib/Zend/CodeGenerator/Php/Property/DefaultValue.php b/lib/internal/Zend/CodeGenerator/Php/Property/DefaultValue.php similarity index 100% rename from lib/Zend/CodeGenerator/Php/Property/DefaultValue.php rename to lib/internal/Zend/CodeGenerator/Php/Property/DefaultValue.php diff --git a/lib/Zend/Config.php b/lib/internal/Zend/Config.php similarity index 100% rename from lib/Zend/Config.php rename to lib/internal/Zend/Config.php diff --git a/lib/Zend/Config/Exception.php b/lib/internal/Zend/Config/Exception.php similarity index 100% rename from lib/Zend/Config/Exception.php rename to lib/internal/Zend/Config/Exception.php diff --git a/lib/Zend/Config/Ini.php b/lib/internal/Zend/Config/Ini.php similarity index 100% rename from lib/Zend/Config/Ini.php rename to lib/internal/Zend/Config/Ini.php diff --git a/lib/Zend/Config/Json.php b/lib/internal/Zend/Config/Json.php similarity index 100% rename from lib/Zend/Config/Json.php rename to lib/internal/Zend/Config/Json.php diff --git a/lib/Zend/Config/Writer.php b/lib/internal/Zend/Config/Writer.php similarity index 100% rename from lib/Zend/Config/Writer.php rename to lib/internal/Zend/Config/Writer.php diff --git a/lib/Zend/Config/Writer/Array.php b/lib/internal/Zend/Config/Writer/Array.php similarity index 100% rename from lib/Zend/Config/Writer/Array.php rename to lib/internal/Zend/Config/Writer/Array.php diff --git a/lib/Zend/Config/Writer/FileAbstract.php b/lib/internal/Zend/Config/Writer/FileAbstract.php similarity index 100% rename from lib/Zend/Config/Writer/FileAbstract.php rename to lib/internal/Zend/Config/Writer/FileAbstract.php diff --git a/lib/Zend/Config/Writer/Ini.php b/lib/internal/Zend/Config/Writer/Ini.php similarity index 100% rename from lib/Zend/Config/Writer/Ini.php rename to lib/internal/Zend/Config/Writer/Ini.php diff --git a/lib/Zend/Config/Writer/Json.php b/lib/internal/Zend/Config/Writer/Json.php similarity index 100% rename from lib/Zend/Config/Writer/Json.php rename to lib/internal/Zend/Config/Writer/Json.php diff --git a/lib/Zend/Config/Writer/Xml.php b/lib/internal/Zend/Config/Writer/Xml.php similarity index 100% rename from lib/Zend/Config/Writer/Xml.php rename to lib/internal/Zend/Config/Writer/Xml.php diff --git a/lib/Zend/Config/Writer/Yaml.php b/lib/internal/Zend/Config/Writer/Yaml.php similarity index 100% rename from lib/Zend/Config/Writer/Yaml.php rename to lib/internal/Zend/Config/Writer/Yaml.php diff --git a/lib/Zend/Config/Xml.php b/lib/internal/Zend/Config/Xml.php similarity index 100% rename from lib/Zend/Config/Xml.php rename to lib/internal/Zend/Config/Xml.php diff --git a/lib/Zend/Config/Yaml.php b/lib/internal/Zend/Config/Yaml.php similarity index 100% rename from lib/Zend/Config/Yaml.php rename to lib/internal/Zend/Config/Yaml.php diff --git a/lib/Zend/Console/Getopt.php b/lib/internal/Zend/Console/Getopt.php similarity index 100% rename from lib/Zend/Console/Getopt.php rename to lib/internal/Zend/Console/Getopt.php diff --git a/lib/Zend/Console/Getopt/Exception.php b/lib/internal/Zend/Console/Getopt/Exception.php similarity index 100% rename from lib/Zend/Console/Getopt/Exception.php rename to lib/internal/Zend/Console/Getopt/Exception.php diff --git a/lib/Zend/Controller/Action.php b/lib/internal/Zend/Controller/Action.php similarity index 100% rename from lib/Zend/Controller/Action.php rename to lib/internal/Zend/Controller/Action.php diff --git a/lib/Zend/Controller/Action/Exception.php b/lib/internal/Zend/Controller/Action/Exception.php similarity index 100% rename from lib/Zend/Controller/Action/Exception.php rename to lib/internal/Zend/Controller/Action/Exception.php diff --git a/lib/Zend/Controller/Action/Helper/Abstract.php b/lib/internal/Zend/Controller/Action/Helper/Abstract.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/Abstract.php rename to lib/internal/Zend/Controller/Action/Helper/Abstract.php diff --git a/lib/Zend/Controller/Action/Helper/ActionStack.php b/lib/internal/Zend/Controller/Action/Helper/ActionStack.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/ActionStack.php rename to lib/internal/Zend/Controller/Action/Helper/ActionStack.php diff --git a/lib/Zend/Controller/Action/Helper/AjaxContext.php b/lib/internal/Zend/Controller/Action/Helper/AjaxContext.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/AjaxContext.php rename to lib/internal/Zend/Controller/Action/Helper/AjaxContext.php diff --git a/lib/Zend/Controller/Action/Helper/AutoComplete/Abstract.php b/lib/internal/Zend/Controller/Action/Helper/AutoComplete/Abstract.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/AutoComplete/Abstract.php rename to lib/internal/Zend/Controller/Action/Helper/AutoComplete/Abstract.php diff --git a/lib/Zend/Controller/Action/Helper/AutoCompleteDojo.php b/lib/internal/Zend/Controller/Action/Helper/AutoCompleteDojo.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/AutoCompleteDojo.php rename to lib/internal/Zend/Controller/Action/Helper/AutoCompleteDojo.php diff --git a/lib/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php b/lib/internal/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php rename to lib/internal/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php diff --git a/lib/Zend/Controller/Action/Helper/Cache.php b/lib/internal/Zend/Controller/Action/Helper/Cache.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/Cache.php rename to lib/internal/Zend/Controller/Action/Helper/Cache.php diff --git a/lib/Zend/Controller/Action/Helper/ContextSwitch.php b/lib/internal/Zend/Controller/Action/Helper/ContextSwitch.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/ContextSwitch.php rename to lib/internal/Zend/Controller/Action/Helper/ContextSwitch.php diff --git a/lib/Zend/Controller/Action/Helper/FlashMessenger.php b/lib/internal/Zend/Controller/Action/Helper/FlashMessenger.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/FlashMessenger.php rename to lib/internal/Zend/Controller/Action/Helper/FlashMessenger.php diff --git a/lib/Zend/Controller/Action/Helper/Json.php b/lib/internal/Zend/Controller/Action/Helper/Json.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/Json.php rename to lib/internal/Zend/Controller/Action/Helper/Json.php diff --git a/lib/Zend/Controller/Action/Helper/Redirector.php b/lib/internal/Zend/Controller/Action/Helper/Redirector.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/Redirector.php rename to lib/internal/Zend/Controller/Action/Helper/Redirector.php diff --git a/lib/Zend/Controller/Action/Helper/Url.php b/lib/internal/Zend/Controller/Action/Helper/Url.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/Url.php rename to lib/internal/Zend/Controller/Action/Helper/Url.php diff --git a/lib/Zend/Controller/Action/Helper/ViewRenderer.php b/lib/internal/Zend/Controller/Action/Helper/ViewRenderer.php similarity index 100% rename from lib/Zend/Controller/Action/Helper/ViewRenderer.php rename to lib/internal/Zend/Controller/Action/Helper/ViewRenderer.php diff --git a/lib/Zend/Controller/Action/HelperBroker.php b/lib/internal/Zend/Controller/Action/HelperBroker.php similarity index 100% rename from lib/Zend/Controller/Action/HelperBroker.php rename to lib/internal/Zend/Controller/Action/HelperBroker.php diff --git a/lib/Zend/Controller/Action/HelperBroker/PriorityStack.php b/lib/internal/Zend/Controller/Action/HelperBroker/PriorityStack.php similarity index 100% rename from lib/Zend/Controller/Action/HelperBroker/PriorityStack.php rename to lib/internal/Zend/Controller/Action/HelperBroker/PriorityStack.php diff --git a/lib/Zend/Controller/Action/Interface.php b/lib/internal/Zend/Controller/Action/Interface.php similarity index 100% rename from lib/Zend/Controller/Action/Interface.php rename to lib/internal/Zend/Controller/Action/Interface.php diff --git a/lib/Zend/Controller/Dispatcher/Abstract.php b/lib/internal/Zend/Controller/Dispatcher/Abstract.php similarity index 100% rename from lib/Zend/Controller/Dispatcher/Abstract.php rename to lib/internal/Zend/Controller/Dispatcher/Abstract.php diff --git a/lib/Zend/Controller/Dispatcher/Exception.php b/lib/internal/Zend/Controller/Dispatcher/Exception.php similarity index 100% rename from lib/Zend/Controller/Dispatcher/Exception.php rename to lib/internal/Zend/Controller/Dispatcher/Exception.php diff --git a/lib/Zend/Controller/Dispatcher/Interface.php b/lib/internal/Zend/Controller/Dispatcher/Interface.php similarity index 100% rename from lib/Zend/Controller/Dispatcher/Interface.php rename to lib/internal/Zend/Controller/Dispatcher/Interface.php diff --git a/lib/Zend/Controller/Dispatcher/Standard.php b/lib/internal/Zend/Controller/Dispatcher/Standard.php similarity index 100% rename from lib/Zend/Controller/Dispatcher/Standard.php rename to lib/internal/Zend/Controller/Dispatcher/Standard.php diff --git a/lib/Zend/Controller/Exception.php b/lib/internal/Zend/Controller/Exception.php similarity index 100% rename from lib/Zend/Controller/Exception.php rename to lib/internal/Zend/Controller/Exception.php diff --git a/lib/Zend/Controller/Front.php b/lib/internal/Zend/Controller/Front.php similarity index 100% rename from lib/Zend/Controller/Front.php rename to lib/internal/Zend/Controller/Front.php diff --git a/lib/Zend/Controller/Plugin/Abstract.php b/lib/internal/Zend/Controller/Plugin/Abstract.php similarity index 100% rename from lib/Zend/Controller/Plugin/Abstract.php rename to lib/internal/Zend/Controller/Plugin/Abstract.php diff --git a/lib/Zend/Controller/Plugin/ActionStack.php b/lib/internal/Zend/Controller/Plugin/ActionStack.php similarity index 100% rename from lib/Zend/Controller/Plugin/ActionStack.php rename to lib/internal/Zend/Controller/Plugin/ActionStack.php diff --git a/lib/Zend/Controller/Plugin/Broker.php b/lib/internal/Zend/Controller/Plugin/Broker.php similarity index 100% rename from lib/Zend/Controller/Plugin/Broker.php rename to lib/internal/Zend/Controller/Plugin/Broker.php diff --git a/lib/Zend/Controller/Plugin/ErrorHandler.php b/lib/internal/Zend/Controller/Plugin/ErrorHandler.php similarity index 100% rename from lib/Zend/Controller/Plugin/ErrorHandler.php rename to lib/internal/Zend/Controller/Plugin/ErrorHandler.php diff --git a/lib/Zend/Controller/Plugin/PutHandler.php b/lib/internal/Zend/Controller/Plugin/PutHandler.php similarity index 100% rename from lib/Zend/Controller/Plugin/PutHandler.php rename to lib/internal/Zend/Controller/Plugin/PutHandler.php diff --git a/lib/Zend/Controller/Request/Abstract.php b/lib/internal/Zend/Controller/Request/Abstract.php similarity index 100% rename from lib/Zend/Controller/Request/Abstract.php rename to lib/internal/Zend/Controller/Request/Abstract.php diff --git a/lib/Zend/Controller/Request/Apache404.php b/lib/internal/Zend/Controller/Request/Apache404.php similarity index 100% rename from lib/Zend/Controller/Request/Apache404.php rename to lib/internal/Zend/Controller/Request/Apache404.php diff --git a/lib/Zend/Controller/Request/Exception.php b/lib/internal/Zend/Controller/Request/Exception.php similarity index 100% rename from lib/Zend/Controller/Request/Exception.php rename to lib/internal/Zend/Controller/Request/Exception.php diff --git a/lib/Zend/Controller/Request/Http.php b/lib/internal/Zend/Controller/Request/Http.php similarity index 100% rename from lib/Zend/Controller/Request/Http.php rename to lib/internal/Zend/Controller/Request/Http.php diff --git a/lib/Zend/Controller/Request/HttpTestCase.php b/lib/internal/Zend/Controller/Request/HttpTestCase.php similarity index 100% rename from lib/Zend/Controller/Request/HttpTestCase.php rename to lib/internal/Zend/Controller/Request/HttpTestCase.php diff --git a/lib/Zend/Controller/Request/Simple.php b/lib/internal/Zend/Controller/Request/Simple.php similarity index 100% rename from lib/Zend/Controller/Request/Simple.php rename to lib/internal/Zend/Controller/Request/Simple.php diff --git a/lib/Zend/Controller/Response/Abstract.php b/lib/internal/Zend/Controller/Response/Abstract.php similarity index 100% rename from lib/Zend/Controller/Response/Abstract.php rename to lib/internal/Zend/Controller/Response/Abstract.php diff --git a/lib/Zend/Controller/Response/Cli.php b/lib/internal/Zend/Controller/Response/Cli.php similarity index 100% rename from lib/Zend/Controller/Response/Cli.php rename to lib/internal/Zend/Controller/Response/Cli.php diff --git a/lib/Zend/Controller/Response/Exception.php b/lib/internal/Zend/Controller/Response/Exception.php similarity index 100% rename from lib/Zend/Controller/Response/Exception.php rename to lib/internal/Zend/Controller/Response/Exception.php diff --git a/lib/Zend/Controller/Response/Http.php b/lib/internal/Zend/Controller/Response/Http.php similarity index 100% rename from lib/Zend/Controller/Response/Http.php rename to lib/internal/Zend/Controller/Response/Http.php diff --git a/lib/Zend/Controller/Response/HttpTestCase.php b/lib/internal/Zend/Controller/Response/HttpTestCase.php similarity index 100% rename from lib/Zend/Controller/Response/HttpTestCase.php rename to lib/internal/Zend/Controller/Response/HttpTestCase.php diff --git a/lib/Zend/Controller/Router/Abstract.php b/lib/internal/Zend/Controller/Router/Abstract.php similarity index 100% rename from lib/Zend/Controller/Router/Abstract.php rename to lib/internal/Zend/Controller/Router/Abstract.php diff --git a/lib/Zend/Controller/Router/Exception.php b/lib/internal/Zend/Controller/Router/Exception.php similarity index 100% rename from lib/Zend/Controller/Router/Exception.php rename to lib/internal/Zend/Controller/Router/Exception.php diff --git a/lib/Zend/Controller/Router/Interface.php b/lib/internal/Zend/Controller/Router/Interface.php similarity index 100% rename from lib/Zend/Controller/Router/Interface.php rename to lib/internal/Zend/Controller/Router/Interface.php diff --git a/lib/Zend/Controller/Router/Rewrite.php b/lib/internal/Zend/Controller/Router/Rewrite.php similarity index 100% rename from lib/Zend/Controller/Router/Rewrite.php rename to lib/internal/Zend/Controller/Router/Rewrite.php diff --git a/lib/Zend/Controller/Router/Route.php b/lib/internal/Zend/Controller/Router/Route.php similarity index 100% rename from lib/Zend/Controller/Router/Route.php rename to lib/internal/Zend/Controller/Router/Route.php diff --git a/lib/Zend/Controller/Router/Route/Abstract.php b/lib/internal/Zend/Controller/Router/Route/Abstract.php similarity index 100% rename from lib/Zend/Controller/Router/Route/Abstract.php rename to lib/internal/Zend/Controller/Router/Route/Abstract.php diff --git a/lib/Zend/Controller/Router/Route/Chain.php b/lib/internal/Zend/Controller/Router/Route/Chain.php similarity index 100% rename from lib/Zend/Controller/Router/Route/Chain.php rename to lib/internal/Zend/Controller/Router/Route/Chain.php diff --git a/lib/Zend/Controller/Router/Route/Hostname.php b/lib/internal/Zend/Controller/Router/Route/Hostname.php similarity index 100% rename from lib/Zend/Controller/Router/Route/Hostname.php rename to lib/internal/Zend/Controller/Router/Route/Hostname.php diff --git a/lib/Zend/Controller/Router/Route/Interface.php b/lib/internal/Zend/Controller/Router/Route/Interface.php similarity index 100% rename from lib/Zend/Controller/Router/Route/Interface.php rename to lib/internal/Zend/Controller/Router/Route/Interface.php diff --git a/lib/Zend/Controller/Router/Route/Module.php b/lib/internal/Zend/Controller/Router/Route/Module.php similarity index 100% rename from lib/Zend/Controller/Router/Route/Module.php rename to lib/internal/Zend/Controller/Router/Route/Module.php diff --git a/lib/Zend/Controller/Router/Route/Regex.php b/lib/internal/Zend/Controller/Router/Route/Regex.php similarity index 100% rename from lib/Zend/Controller/Router/Route/Regex.php rename to lib/internal/Zend/Controller/Router/Route/Regex.php diff --git a/lib/Zend/Controller/Router/Route/Static.php b/lib/internal/Zend/Controller/Router/Route/Static.php similarity index 100% rename from lib/Zend/Controller/Router/Route/Static.php rename to lib/internal/Zend/Controller/Router/Route/Static.php diff --git a/lib/Zend/Crypt.php b/lib/internal/Zend/Crypt.php similarity index 100% rename from lib/Zend/Crypt.php rename to lib/internal/Zend/Crypt.php diff --git a/lib/Zend/Crypt/DiffieHellman.php b/lib/internal/Zend/Crypt/DiffieHellman.php similarity index 100% rename from lib/Zend/Crypt/DiffieHellman.php rename to lib/internal/Zend/Crypt/DiffieHellman.php diff --git a/lib/Zend/Crypt/DiffieHellman/Exception.php b/lib/internal/Zend/Crypt/DiffieHellman/Exception.php similarity index 100% rename from lib/Zend/Crypt/DiffieHellman/Exception.php rename to lib/internal/Zend/Crypt/DiffieHellman/Exception.php diff --git a/lib/Zend/Crypt/Exception.php b/lib/internal/Zend/Crypt/Exception.php similarity index 100% rename from lib/Zend/Crypt/Exception.php rename to lib/internal/Zend/Crypt/Exception.php diff --git a/lib/Zend/Crypt/Hmac.php b/lib/internal/Zend/Crypt/Hmac.php similarity index 100% rename from lib/Zend/Crypt/Hmac.php rename to lib/internal/Zend/Crypt/Hmac.php diff --git a/lib/Zend/Crypt/Hmac/Exception.php b/lib/internal/Zend/Crypt/Hmac/Exception.php similarity index 100% rename from lib/Zend/Crypt/Hmac/Exception.php rename to lib/internal/Zend/Crypt/Hmac/Exception.php diff --git a/lib/Zend/Crypt/Math.php b/lib/internal/Zend/Crypt/Math.php similarity index 100% rename from lib/Zend/Crypt/Math.php rename to lib/internal/Zend/Crypt/Math.php diff --git a/lib/Zend/Crypt/Math/BigInteger.php b/lib/internal/Zend/Crypt/Math/BigInteger.php similarity index 100% rename from lib/Zend/Crypt/Math/BigInteger.php rename to lib/internal/Zend/Crypt/Math/BigInteger.php diff --git a/lib/Zend/Crypt/Math/BigInteger/Bcmath.php b/lib/internal/Zend/Crypt/Math/BigInteger/Bcmath.php similarity index 100% rename from lib/Zend/Crypt/Math/BigInteger/Bcmath.php rename to lib/internal/Zend/Crypt/Math/BigInteger/Bcmath.php diff --git a/lib/Zend/Crypt/Math/BigInteger/Exception.php b/lib/internal/Zend/Crypt/Math/BigInteger/Exception.php similarity index 100% rename from lib/Zend/Crypt/Math/BigInteger/Exception.php rename to lib/internal/Zend/Crypt/Math/BigInteger/Exception.php diff --git a/lib/Zend/Crypt/Math/BigInteger/Gmp.php b/lib/internal/Zend/Crypt/Math/BigInteger/Gmp.php similarity index 100% rename from lib/Zend/Crypt/Math/BigInteger/Gmp.php rename to lib/internal/Zend/Crypt/Math/BigInteger/Gmp.php diff --git a/lib/Zend/Crypt/Math/BigInteger/Interface.php b/lib/internal/Zend/Crypt/Math/BigInteger/Interface.php similarity index 100% rename from lib/Zend/Crypt/Math/BigInteger/Interface.php rename to lib/internal/Zend/Crypt/Math/BigInteger/Interface.php diff --git a/lib/Zend/Crypt/Math/Exception.php b/lib/internal/Zend/Crypt/Math/Exception.php similarity index 100% rename from lib/Zend/Crypt/Math/Exception.php rename to lib/internal/Zend/Crypt/Math/Exception.php diff --git a/lib/Zend/Crypt/Rsa.php b/lib/internal/Zend/Crypt/Rsa.php similarity index 100% rename from lib/Zend/Crypt/Rsa.php rename to lib/internal/Zend/Crypt/Rsa.php diff --git a/lib/Zend/Crypt/Rsa/Exception.php b/lib/internal/Zend/Crypt/Rsa/Exception.php similarity index 100% rename from lib/Zend/Crypt/Rsa/Exception.php rename to lib/internal/Zend/Crypt/Rsa/Exception.php diff --git a/lib/Zend/Crypt/Rsa/Key.php b/lib/internal/Zend/Crypt/Rsa/Key.php similarity index 100% rename from lib/Zend/Crypt/Rsa/Key.php rename to lib/internal/Zend/Crypt/Rsa/Key.php diff --git a/lib/Zend/Crypt/Rsa/Key/Private.php b/lib/internal/Zend/Crypt/Rsa/Key/Private.php similarity index 100% rename from lib/Zend/Crypt/Rsa/Key/Private.php rename to lib/internal/Zend/Crypt/Rsa/Key/Private.php diff --git a/lib/Zend/Crypt/Rsa/Key/Public.php b/lib/internal/Zend/Crypt/Rsa/Key/Public.php similarity index 100% rename from lib/Zend/Crypt/Rsa/Key/Public.php rename to lib/internal/Zend/Crypt/Rsa/Key/Public.php diff --git a/lib/Zend/Currency.php b/lib/internal/Zend/Currency.php similarity index 100% rename from lib/Zend/Currency.php rename to lib/internal/Zend/Currency.php diff --git a/lib/Zend/Currency/CurrencyInterface.php b/lib/internal/Zend/Currency/CurrencyInterface.php similarity index 100% rename from lib/Zend/Currency/CurrencyInterface.php rename to lib/internal/Zend/Currency/CurrencyInterface.php diff --git a/lib/Zend/Currency/Exception.php b/lib/internal/Zend/Currency/Exception.php similarity index 100% rename from lib/Zend/Currency/Exception.php rename to lib/internal/Zend/Currency/Exception.php diff --git a/lib/Zend/Date.php b/lib/internal/Zend/Date.php similarity index 100% rename from lib/Zend/Date.php rename to lib/internal/Zend/Date.php diff --git a/lib/Zend/Date/Cities.php b/lib/internal/Zend/Date/Cities.php similarity index 100% rename from lib/Zend/Date/Cities.php rename to lib/internal/Zend/Date/Cities.php diff --git a/lib/Zend/Date/DateObject.php b/lib/internal/Zend/Date/DateObject.php similarity index 100% rename from lib/Zend/Date/DateObject.php rename to lib/internal/Zend/Date/DateObject.php diff --git a/lib/Zend/Date/Exception.php b/lib/internal/Zend/Date/Exception.php similarity index 100% rename from lib/Zend/Date/Exception.php rename to lib/internal/Zend/Date/Exception.php diff --git a/lib/Zend/Db.php b/lib/internal/Zend/Db.php similarity index 100% rename from lib/Zend/Db.php rename to lib/internal/Zend/Db.php diff --git a/lib/Zend/Db/Adapter/Abstract.php b/lib/internal/Zend/Db/Adapter/Abstract.php similarity index 100% rename from lib/Zend/Db/Adapter/Abstract.php rename to lib/internal/Zend/Db/Adapter/Abstract.php diff --git a/lib/Zend/Db/Adapter/Db2.php b/lib/internal/Zend/Db/Adapter/Db2.php similarity index 100% rename from lib/Zend/Db/Adapter/Db2.php rename to lib/internal/Zend/Db/Adapter/Db2.php diff --git a/lib/Zend/Db/Adapter/Db2/Exception.php b/lib/internal/Zend/Db/Adapter/Db2/Exception.php similarity index 100% rename from lib/Zend/Db/Adapter/Db2/Exception.php rename to lib/internal/Zend/Db/Adapter/Db2/Exception.php diff --git a/lib/Zend/Db/Adapter/Exception.php b/lib/internal/Zend/Db/Adapter/Exception.php similarity index 100% rename from lib/Zend/Db/Adapter/Exception.php rename to lib/internal/Zend/Db/Adapter/Exception.php diff --git a/lib/Zend/Db/Adapter/Mysqli.php b/lib/internal/Zend/Db/Adapter/Mysqli.php similarity index 100% rename from lib/Zend/Db/Adapter/Mysqli.php rename to lib/internal/Zend/Db/Adapter/Mysqli.php diff --git a/lib/Zend/Db/Adapter/Mysqli/Exception.php b/lib/internal/Zend/Db/Adapter/Mysqli/Exception.php similarity index 100% rename from lib/Zend/Db/Adapter/Mysqli/Exception.php rename to lib/internal/Zend/Db/Adapter/Mysqli/Exception.php diff --git a/lib/Zend/Db/Adapter/Oracle.php b/lib/internal/Zend/Db/Adapter/Oracle.php similarity index 100% rename from lib/Zend/Db/Adapter/Oracle.php rename to lib/internal/Zend/Db/Adapter/Oracle.php diff --git a/lib/Zend/Db/Adapter/Oracle/Exception.php b/lib/internal/Zend/Db/Adapter/Oracle/Exception.php similarity index 100% rename from lib/Zend/Db/Adapter/Oracle/Exception.php rename to lib/internal/Zend/Db/Adapter/Oracle/Exception.php diff --git a/lib/Zend/Db/Adapter/Pdo/Abstract.php b/lib/internal/Zend/Db/Adapter/Pdo/Abstract.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Abstract.php rename to lib/internal/Zend/Db/Adapter/Pdo/Abstract.php diff --git a/lib/Zend/Db/Adapter/Pdo/Ibm.php b/lib/internal/Zend/Db/Adapter/Pdo/Ibm.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Ibm.php rename to lib/internal/Zend/Db/Adapter/Pdo/Ibm.php diff --git a/lib/Zend/Db/Adapter/Pdo/Ibm/Db2.php b/lib/internal/Zend/Db/Adapter/Pdo/Ibm/Db2.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Ibm/Db2.php rename to lib/internal/Zend/Db/Adapter/Pdo/Ibm/Db2.php diff --git a/lib/Zend/Db/Adapter/Pdo/Ibm/Ids.php b/lib/internal/Zend/Db/Adapter/Pdo/Ibm/Ids.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Ibm/Ids.php rename to lib/internal/Zend/Db/Adapter/Pdo/Ibm/Ids.php diff --git a/lib/Zend/Db/Adapter/Pdo/Mssql.php b/lib/internal/Zend/Db/Adapter/Pdo/Mssql.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Mssql.php rename to lib/internal/Zend/Db/Adapter/Pdo/Mssql.php diff --git a/lib/Zend/Db/Adapter/Pdo/Mysql.php b/lib/internal/Zend/Db/Adapter/Pdo/Mysql.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Mysql.php rename to lib/internal/Zend/Db/Adapter/Pdo/Mysql.php diff --git a/lib/Zend/Db/Adapter/Pdo/Oci.php b/lib/internal/Zend/Db/Adapter/Pdo/Oci.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Oci.php rename to lib/internal/Zend/Db/Adapter/Pdo/Oci.php diff --git a/lib/Zend/Db/Adapter/Pdo/Pgsql.php b/lib/internal/Zend/Db/Adapter/Pdo/Pgsql.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Pgsql.php rename to lib/internal/Zend/Db/Adapter/Pdo/Pgsql.php diff --git a/lib/Zend/Db/Adapter/Pdo/Sqlite.php b/lib/internal/Zend/Db/Adapter/Pdo/Sqlite.php similarity index 100% rename from lib/Zend/Db/Adapter/Pdo/Sqlite.php rename to lib/internal/Zend/Db/Adapter/Pdo/Sqlite.php diff --git a/lib/Zend/Db/Adapter/Sqlsrv.php b/lib/internal/Zend/Db/Adapter/Sqlsrv.php similarity index 100% rename from lib/Zend/Db/Adapter/Sqlsrv.php rename to lib/internal/Zend/Db/Adapter/Sqlsrv.php diff --git a/lib/Zend/Db/Adapter/Sqlsrv/Exception.php b/lib/internal/Zend/Db/Adapter/Sqlsrv/Exception.php similarity index 100% rename from lib/Zend/Db/Adapter/Sqlsrv/Exception.php rename to lib/internal/Zend/Db/Adapter/Sqlsrv/Exception.php diff --git a/lib/Zend/Db/Exception.php b/lib/internal/Zend/Db/Exception.php similarity index 100% rename from lib/Zend/Db/Exception.php rename to lib/internal/Zend/Db/Exception.php diff --git a/lib/Zend/Db/Expr.php b/lib/internal/Zend/Db/Expr.php similarity index 100% rename from lib/Zend/Db/Expr.php rename to lib/internal/Zend/Db/Expr.php diff --git a/lib/Zend/Db/Profiler.php b/lib/internal/Zend/Db/Profiler.php similarity index 100% rename from lib/Zend/Db/Profiler.php rename to lib/internal/Zend/Db/Profiler.php diff --git a/lib/Zend/Db/Profiler/Exception.php b/lib/internal/Zend/Db/Profiler/Exception.php similarity index 100% rename from lib/Zend/Db/Profiler/Exception.php rename to lib/internal/Zend/Db/Profiler/Exception.php diff --git a/lib/Zend/Db/Profiler/Firebug.php b/lib/internal/Zend/Db/Profiler/Firebug.php similarity index 100% rename from lib/Zend/Db/Profiler/Firebug.php rename to lib/internal/Zend/Db/Profiler/Firebug.php diff --git a/lib/Zend/Db/Profiler/Query.php b/lib/internal/Zend/Db/Profiler/Query.php similarity index 100% rename from lib/Zend/Db/Profiler/Query.php rename to lib/internal/Zend/Db/Profiler/Query.php diff --git a/lib/Zend/Db/Select.php b/lib/internal/Zend/Db/Select.php similarity index 100% rename from lib/Zend/Db/Select.php rename to lib/internal/Zend/Db/Select.php diff --git a/lib/Zend/Db/Select/Exception.php b/lib/internal/Zend/Db/Select/Exception.php similarity index 100% rename from lib/Zend/Db/Select/Exception.php rename to lib/internal/Zend/Db/Select/Exception.php diff --git a/lib/Zend/Db/Statement.php b/lib/internal/Zend/Db/Statement.php similarity index 100% rename from lib/Zend/Db/Statement.php rename to lib/internal/Zend/Db/Statement.php diff --git a/lib/Zend/Db/Statement/Db2.php b/lib/internal/Zend/Db/Statement/Db2.php similarity index 100% rename from lib/Zend/Db/Statement/Db2.php rename to lib/internal/Zend/Db/Statement/Db2.php diff --git a/lib/Zend/Db/Statement/Db2/Exception.php b/lib/internal/Zend/Db/Statement/Db2/Exception.php similarity index 100% rename from lib/Zend/Db/Statement/Db2/Exception.php rename to lib/internal/Zend/Db/Statement/Db2/Exception.php diff --git a/lib/Zend/Db/Statement/Exception.php b/lib/internal/Zend/Db/Statement/Exception.php similarity index 100% rename from lib/Zend/Db/Statement/Exception.php rename to lib/internal/Zend/Db/Statement/Exception.php diff --git a/lib/Zend/Db/Statement/Interface.php b/lib/internal/Zend/Db/Statement/Interface.php similarity index 100% rename from lib/Zend/Db/Statement/Interface.php rename to lib/internal/Zend/Db/Statement/Interface.php diff --git a/lib/Zend/Db/Statement/Mysqli.php b/lib/internal/Zend/Db/Statement/Mysqli.php similarity index 100% rename from lib/Zend/Db/Statement/Mysqli.php rename to lib/internal/Zend/Db/Statement/Mysqli.php diff --git a/lib/Zend/Db/Statement/Mysqli/Exception.php b/lib/internal/Zend/Db/Statement/Mysqli/Exception.php similarity index 100% rename from lib/Zend/Db/Statement/Mysqli/Exception.php rename to lib/internal/Zend/Db/Statement/Mysqli/Exception.php diff --git a/lib/Zend/Db/Statement/Oracle.php b/lib/internal/Zend/Db/Statement/Oracle.php similarity index 100% rename from lib/Zend/Db/Statement/Oracle.php rename to lib/internal/Zend/Db/Statement/Oracle.php diff --git a/lib/Zend/Db/Statement/Oracle/Exception.php b/lib/internal/Zend/Db/Statement/Oracle/Exception.php similarity index 100% rename from lib/Zend/Db/Statement/Oracle/Exception.php rename to lib/internal/Zend/Db/Statement/Oracle/Exception.php diff --git a/lib/Zend/Db/Statement/Pdo.php b/lib/internal/Zend/Db/Statement/Pdo.php similarity index 100% rename from lib/Zend/Db/Statement/Pdo.php rename to lib/internal/Zend/Db/Statement/Pdo.php diff --git a/lib/Zend/Db/Statement/Pdo/Ibm.php b/lib/internal/Zend/Db/Statement/Pdo/Ibm.php similarity index 100% rename from lib/Zend/Db/Statement/Pdo/Ibm.php rename to lib/internal/Zend/Db/Statement/Pdo/Ibm.php diff --git a/lib/Zend/Db/Statement/Pdo/Oci.php b/lib/internal/Zend/Db/Statement/Pdo/Oci.php similarity index 100% rename from lib/Zend/Db/Statement/Pdo/Oci.php rename to lib/internal/Zend/Db/Statement/Pdo/Oci.php diff --git a/lib/Zend/Db/Statement/Sqlsrv.php b/lib/internal/Zend/Db/Statement/Sqlsrv.php similarity index 100% rename from lib/Zend/Db/Statement/Sqlsrv.php rename to lib/internal/Zend/Db/Statement/Sqlsrv.php diff --git a/lib/Zend/Db/Statement/Sqlsrv/Exception.php b/lib/internal/Zend/Db/Statement/Sqlsrv/Exception.php similarity index 100% rename from lib/Zend/Db/Statement/Sqlsrv/Exception.php rename to lib/internal/Zend/Db/Statement/Sqlsrv/Exception.php diff --git a/lib/Zend/Db/Table.php b/lib/internal/Zend/Db/Table.php similarity index 100% rename from lib/Zend/Db/Table.php rename to lib/internal/Zend/Db/Table.php diff --git a/lib/Zend/Db/Table/Abstract.php b/lib/internal/Zend/Db/Table/Abstract.php similarity index 100% rename from lib/Zend/Db/Table/Abstract.php rename to lib/internal/Zend/Db/Table/Abstract.php diff --git a/lib/Zend/Db/Table/Definition.php b/lib/internal/Zend/Db/Table/Definition.php similarity index 100% rename from lib/Zend/Db/Table/Definition.php rename to lib/internal/Zend/Db/Table/Definition.php diff --git a/lib/Zend/Db/Table/Exception.php b/lib/internal/Zend/Db/Table/Exception.php similarity index 100% rename from lib/Zend/Db/Table/Exception.php rename to lib/internal/Zend/Db/Table/Exception.php diff --git a/lib/Zend/Db/Table/Row.php b/lib/internal/Zend/Db/Table/Row.php similarity index 100% rename from lib/Zend/Db/Table/Row.php rename to lib/internal/Zend/Db/Table/Row.php diff --git a/lib/Zend/Db/Table/Row/Abstract.php b/lib/internal/Zend/Db/Table/Row/Abstract.php similarity index 100% rename from lib/Zend/Db/Table/Row/Abstract.php rename to lib/internal/Zend/Db/Table/Row/Abstract.php diff --git a/lib/Zend/Db/Table/Row/Exception.php b/lib/internal/Zend/Db/Table/Row/Exception.php similarity index 100% rename from lib/Zend/Db/Table/Row/Exception.php rename to lib/internal/Zend/Db/Table/Row/Exception.php diff --git a/lib/Zend/Db/Table/Rowset.php b/lib/internal/Zend/Db/Table/Rowset.php similarity index 100% rename from lib/Zend/Db/Table/Rowset.php rename to lib/internal/Zend/Db/Table/Rowset.php diff --git a/lib/Zend/Db/Table/Rowset/Abstract.php b/lib/internal/Zend/Db/Table/Rowset/Abstract.php similarity index 100% rename from lib/Zend/Db/Table/Rowset/Abstract.php rename to lib/internal/Zend/Db/Table/Rowset/Abstract.php diff --git a/lib/Zend/Db/Table/Rowset/Exception.php b/lib/internal/Zend/Db/Table/Rowset/Exception.php similarity index 100% rename from lib/Zend/Db/Table/Rowset/Exception.php rename to lib/internal/Zend/Db/Table/Rowset/Exception.php diff --git a/lib/Zend/Db/Table/Select.php b/lib/internal/Zend/Db/Table/Select.php similarity index 100% rename from lib/Zend/Db/Table/Select.php rename to lib/internal/Zend/Db/Table/Select.php diff --git a/lib/Zend/Db/Table/Select/Exception.php b/lib/internal/Zend/Db/Table/Select/Exception.php similarity index 100% rename from lib/Zend/Db/Table/Select/Exception.php rename to lib/internal/Zend/Db/Table/Select/Exception.php diff --git a/lib/Zend/Debug.php b/lib/internal/Zend/Debug.php similarity index 100% rename from lib/Zend/Debug.php rename to lib/internal/Zend/Debug.php diff --git a/lib/Zend/Di/Config.php b/lib/internal/Zend/Di/Config.php similarity index 100% rename from lib/Zend/Di/Config.php rename to lib/internal/Zend/Di/Config.php diff --git a/lib/Zend/Di/Definition/Annotation/Inject.php b/lib/internal/Zend/Di/Definition/Annotation/Inject.php similarity index 100% rename from lib/Zend/Di/Definition/Annotation/Inject.php rename to lib/internal/Zend/Di/Definition/Annotation/Inject.php diff --git a/lib/Zend/Di/Definition/Annotation/Instantiator.php b/lib/internal/Zend/Di/Definition/Annotation/Instantiator.php similarity index 100% rename from lib/Zend/Di/Definition/Annotation/Instantiator.php rename to lib/internal/Zend/Di/Definition/Annotation/Instantiator.php diff --git a/lib/Zend/Di/Definition/ArrayDefinition.php b/lib/internal/Zend/Di/Definition/ArrayDefinition.php similarity index 100% rename from lib/Zend/Di/Definition/ArrayDefinition.php rename to lib/internal/Zend/Di/Definition/ArrayDefinition.php diff --git a/lib/Zend/Di/Definition/Builder/InjectionMethod.php b/lib/internal/Zend/Di/Definition/Builder/InjectionMethod.php similarity index 100% rename from lib/Zend/Di/Definition/Builder/InjectionMethod.php rename to lib/internal/Zend/Di/Definition/Builder/InjectionMethod.php diff --git a/lib/Zend/Di/Definition/Builder/PhpClass.php b/lib/internal/Zend/Di/Definition/Builder/PhpClass.php similarity index 100% rename from lib/Zend/Di/Definition/Builder/PhpClass.php rename to lib/internal/Zend/Di/Definition/Builder/PhpClass.php diff --git a/lib/Zend/Di/Definition/BuilderDefinition.php b/lib/internal/Zend/Di/Definition/BuilderDefinition.php similarity index 100% rename from lib/Zend/Di/Definition/BuilderDefinition.php rename to lib/internal/Zend/Di/Definition/BuilderDefinition.php diff --git a/lib/Zend/Di/Definition/ClassDefinition.php b/lib/internal/Zend/Di/Definition/ClassDefinition.php similarity index 100% rename from lib/Zend/Di/Definition/ClassDefinition.php rename to lib/internal/Zend/Di/Definition/ClassDefinition.php diff --git a/lib/Zend/Di/Definition/CompilerDefinition.php b/lib/internal/Zend/Di/Definition/CompilerDefinition.php similarity index 100% rename from lib/Zend/Di/Definition/CompilerDefinition.php rename to lib/internal/Zend/Di/Definition/CompilerDefinition.php diff --git a/lib/Zend/Di/Definition/DefinitionInterface.php b/lib/internal/Zend/Di/Definition/DefinitionInterface.php similarity index 100% rename from lib/Zend/Di/Definition/DefinitionInterface.php rename to lib/internal/Zend/Di/Definition/DefinitionInterface.php diff --git a/lib/Zend/Di/Definition/IntrospectionStrategy.php b/lib/internal/Zend/Di/Definition/IntrospectionStrategy.php similarity index 100% rename from lib/Zend/Di/Definition/IntrospectionStrategy.php rename to lib/internal/Zend/Di/Definition/IntrospectionStrategy.php diff --git a/lib/Zend/Di/Definition/PartialMarker.php b/lib/internal/Zend/Di/Definition/PartialMarker.php similarity index 100% rename from lib/Zend/Di/Definition/PartialMarker.php rename to lib/internal/Zend/Di/Definition/PartialMarker.php diff --git a/lib/Zend/Di/Definition/RuntimeDefinition.php b/lib/internal/Zend/Di/Definition/RuntimeDefinition.php similarity index 100% rename from lib/Zend/Di/Definition/RuntimeDefinition.php rename to lib/internal/Zend/Di/Definition/RuntimeDefinition.php diff --git a/lib/Zend/Di/DefinitionList.php b/lib/internal/Zend/Di/DefinitionList.php similarity index 100% rename from lib/Zend/Di/DefinitionList.php rename to lib/internal/Zend/Di/DefinitionList.php diff --git a/lib/Zend/Di/DependencyInjectionInterface.php b/lib/internal/Zend/Di/DependencyInjectionInterface.php similarity index 100% rename from lib/Zend/Di/DependencyInjectionInterface.php rename to lib/internal/Zend/Di/DependencyInjectionInterface.php diff --git a/lib/Zend/Di/Di.php b/lib/internal/Zend/Di/Di.php similarity index 100% rename from lib/Zend/Di/Di.php rename to lib/internal/Zend/Di/Di.php diff --git a/lib/Zend/Di/Display/Console.php b/lib/internal/Zend/Di/Display/Console.php similarity index 100% rename from lib/Zend/Di/Display/Console.php rename to lib/internal/Zend/Di/Display/Console.php diff --git a/lib/Zend/Di/Exception/CircularDependencyException.php b/lib/internal/Zend/Di/Exception/CircularDependencyException.php similarity index 100% rename from lib/Zend/Di/Exception/CircularDependencyException.php rename to lib/internal/Zend/Di/Exception/CircularDependencyException.php diff --git a/lib/Zend/Di/Exception/ClassNotFoundException.php b/lib/internal/Zend/Di/Exception/ClassNotFoundException.php similarity index 100% rename from lib/Zend/Di/Exception/ClassNotFoundException.php rename to lib/internal/Zend/Di/Exception/ClassNotFoundException.php diff --git a/lib/Zend/Di/Exception/ExceptionInterface.php b/lib/internal/Zend/Di/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Di/Exception/ExceptionInterface.php rename to lib/internal/Zend/Di/Exception/ExceptionInterface.php diff --git a/lib/Zend/Di/Exception/InvalidArgumentException.php b/lib/internal/Zend/Di/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Di/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Di/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Di/Exception/InvalidCallbackException.php b/lib/internal/Zend/Di/Exception/InvalidCallbackException.php similarity index 100% rename from lib/Zend/Di/Exception/InvalidCallbackException.php rename to lib/internal/Zend/Di/Exception/InvalidCallbackException.php diff --git a/lib/Zend/Di/Exception/InvalidParamNameException.php b/lib/internal/Zend/Di/Exception/InvalidParamNameException.php similarity index 100% rename from lib/Zend/Di/Exception/InvalidParamNameException.php rename to lib/internal/Zend/Di/Exception/InvalidParamNameException.php diff --git a/lib/Zend/Di/Exception/InvalidPositionException.php b/lib/internal/Zend/Di/Exception/InvalidPositionException.php similarity index 100% rename from lib/Zend/Di/Exception/InvalidPositionException.php rename to lib/internal/Zend/Di/Exception/InvalidPositionException.php diff --git a/lib/Zend/Di/Exception/MissingPropertyException.php b/lib/internal/Zend/Di/Exception/MissingPropertyException.php similarity index 100% rename from lib/Zend/Di/Exception/MissingPropertyException.php rename to lib/internal/Zend/Di/Exception/MissingPropertyException.php diff --git a/lib/Zend/Di/Exception/RuntimeException.php b/lib/internal/Zend/Di/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Di/Exception/RuntimeException.php rename to lib/internal/Zend/Di/Exception/RuntimeException.php diff --git a/lib/Zend/Di/Exception/UndefinedReferenceException.php b/lib/internal/Zend/Di/Exception/UndefinedReferenceException.php similarity index 100% rename from lib/Zend/Di/Exception/UndefinedReferenceException.php rename to lib/internal/Zend/Di/Exception/UndefinedReferenceException.php diff --git a/lib/Zend/Di/InstanceManager.php b/lib/internal/Zend/Di/InstanceManager.php similarity index 100% rename from lib/Zend/Di/InstanceManager.php rename to lib/internal/Zend/Di/InstanceManager.php diff --git a/lib/Zend/Di/LocatorInterface.php b/lib/internal/Zend/Di/LocatorInterface.php similarity index 100% rename from lib/Zend/Di/LocatorInterface.php rename to lib/internal/Zend/Di/LocatorInterface.php diff --git a/lib/Zend/Di/ServiceLocator.php b/lib/internal/Zend/Di/ServiceLocator.php similarity index 100% rename from lib/Zend/Di/ServiceLocator.php rename to lib/internal/Zend/Di/ServiceLocator.php diff --git a/lib/Zend/Di/ServiceLocator/DependencyInjectorProxy.php b/lib/internal/Zend/Di/ServiceLocator/DependencyInjectorProxy.php similarity index 100% rename from lib/Zend/Di/ServiceLocator/DependencyInjectorProxy.php rename to lib/internal/Zend/Di/ServiceLocator/DependencyInjectorProxy.php diff --git a/lib/Zend/Di/ServiceLocator/Generator.php b/lib/internal/Zend/Di/ServiceLocator/Generator.php similarity index 100% rename from lib/Zend/Di/ServiceLocator/Generator.php rename to lib/internal/Zend/Di/ServiceLocator/Generator.php diff --git a/lib/Zend/Di/ServiceLocator/GeneratorInstance.php b/lib/internal/Zend/Di/ServiceLocator/GeneratorInstance.php similarity index 100% rename from lib/Zend/Di/ServiceLocator/GeneratorInstance.php rename to lib/internal/Zend/Di/ServiceLocator/GeneratorInstance.php diff --git a/lib/Zend/Di/ServiceLocatorInterface.php b/lib/internal/Zend/Di/ServiceLocatorInterface.php similarity index 100% rename from lib/Zend/Di/ServiceLocatorInterface.php rename to lib/internal/Zend/Di/ServiceLocatorInterface.php diff --git a/lib/Zend/Di/TODO b/lib/internal/Zend/Di/TODO similarity index 100% rename from lib/Zend/Di/TODO rename to lib/internal/Zend/Di/TODO diff --git a/lib/Zend/Di/composer.json b/lib/internal/Zend/Di/composer.json similarity index 100% rename from lib/Zend/Di/composer.json rename to lib/internal/Zend/Di/composer.json diff --git a/lib/Zend/Dojo.php b/lib/internal/Zend/Dojo.php similarity index 100% rename from lib/Zend/Dojo.php rename to lib/internal/Zend/Dojo.php diff --git a/lib/Zend/Dojo/BuildLayer.php b/lib/internal/Zend/Dojo/BuildLayer.php similarity index 100% rename from lib/Zend/Dojo/BuildLayer.php rename to lib/internal/Zend/Dojo/BuildLayer.php diff --git a/lib/Zend/Dojo/Data.php b/lib/internal/Zend/Dojo/Data.php similarity index 100% rename from lib/Zend/Dojo/Data.php rename to lib/internal/Zend/Dojo/Data.php diff --git a/lib/Zend/Dojo/Exception.php b/lib/internal/Zend/Dojo/Exception.php similarity index 100% rename from lib/Zend/Dojo/Exception.php rename to lib/internal/Zend/Dojo/Exception.php diff --git a/lib/Zend/Dojo/Form.php b/lib/internal/Zend/Dojo/Form.php similarity index 100% rename from lib/Zend/Dojo/Form.php rename to lib/internal/Zend/Dojo/Form.php diff --git a/lib/Zend/Dojo/Form/Decorator/AccordionContainer.php b/lib/internal/Zend/Dojo/Form/Decorator/AccordionContainer.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/AccordionContainer.php rename to lib/internal/Zend/Dojo/Form/Decorator/AccordionContainer.php diff --git a/lib/Zend/Dojo/Form/Decorator/AccordionPane.php b/lib/internal/Zend/Dojo/Form/Decorator/AccordionPane.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/AccordionPane.php rename to lib/internal/Zend/Dojo/Form/Decorator/AccordionPane.php diff --git a/lib/Zend/Dojo/Form/Decorator/BorderContainer.php b/lib/internal/Zend/Dojo/Form/Decorator/BorderContainer.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/BorderContainer.php rename to lib/internal/Zend/Dojo/Form/Decorator/BorderContainer.php diff --git a/lib/Zend/Dojo/Form/Decorator/ContentPane.php b/lib/internal/Zend/Dojo/Form/Decorator/ContentPane.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/ContentPane.php rename to lib/internal/Zend/Dojo/Form/Decorator/ContentPane.php diff --git a/lib/Zend/Dojo/Form/Decorator/DijitContainer.php b/lib/internal/Zend/Dojo/Form/Decorator/DijitContainer.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/DijitContainer.php rename to lib/internal/Zend/Dojo/Form/Decorator/DijitContainer.php diff --git a/lib/Zend/Dojo/Form/Decorator/DijitElement.php b/lib/internal/Zend/Dojo/Form/Decorator/DijitElement.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/DijitElement.php rename to lib/internal/Zend/Dojo/Form/Decorator/DijitElement.php diff --git a/lib/Zend/Dojo/Form/Decorator/DijitForm.php b/lib/internal/Zend/Dojo/Form/Decorator/DijitForm.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/DijitForm.php rename to lib/internal/Zend/Dojo/Form/Decorator/DijitForm.php diff --git a/lib/Zend/Dojo/Form/Decorator/SplitContainer.php b/lib/internal/Zend/Dojo/Form/Decorator/SplitContainer.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/SplitContainer.php rename to lib/internal/Zend/Dojo/Form/Decorator/SplitContainer.php diff --git a/lib/Zend/Dojo/Form/Decorator/StackContainer.php b/lib/internal/Zend/Dojo/Form/Decorator/StackContainer.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/StackContainer.php rename to lib/internal/Zend/Dojo/Form/Decorator/StackContainer.php diff --git a/lib/Zend/Dojo/Form/Decorator/TabContainer.php b/lib/internal/Zend/Dojo/Form/Decorator/TabContainer.php similarity index 100% rename from lib/Zend/Dojo/Form/Decorator/TabContainer.php rename to lib/internal/Zend/Dojo/Form/Decorator/TabContainer.php diff --git a/lib/Zend/Dojo/Form/DisplayGroup.php b/lib/internal/Zend/Dojo/Form/DisplayGroup.php similarity index 100% rename from lib/Zend/Dojo/Form/DisplayGroup.php rename to lib/internal/Zend/Dojo/Form/DisplayGroup.php diff --git a/lib/Zend/Dojo/Form/Element/Button.php b/lib/internal/Zend/Dojo/Form/Element/Button.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/Button.php rename to lib/internal/Zend/Dojo/Form/Element/Button.php diff --git a/lib/Zend/Dojo/Form/Element/CheckBox.php b/lib/internal/Zend/Dojo/Form/Element/CheckBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/CheckBox.php rename to lib/internal/Zend/Dojo/Form/Element/CheckBox.php diff --git a/lib/Zend/Dojo/Form/Element/ComboBox.php b/lib/internal/Zend/Dojo/Form/Element/ComboBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/ComboBox.php rename to lib/internal/Zend/Dojo/Form/Element/ComboBox.php diff --git a/lib/Zend/Dojo/Form/Element/CurrencyTextBox.php b/lib/internal/Zend/Dojo/Form/Element/CurrencyTextBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/CurrencyTextBox.php rename to lib/internal/Zend/Dojo/Form/Element/CurrencyTextBox.php diff --git a/lib/Zend/Dojo/Form/Element/DateTextBox.php b/lib/internal/Zend/Dojo/Form/Element/DateTextBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/DateTextBox.php rename to lib/internal/Zend/Dojo/Form/Element/DateTextBox.php diff --git a/lib/Zend/Dojo/Form/Element/Dijit.php b/lib/internal/Zend/Dojo/Form/Element/Dijit.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/Dijit.php rename to lib/internal/Zend/Dojo/Form/Element/Dijit.php diff --git a/lib/Zend/Dojo/Form/Element/DijitMulti.php b/lib/internal/Zend/Dojo/Form/Element/DijitMulti.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/DijitMulti.php rename to lib/internal/Zend/Dojo/Form/Element/DijitMulti.php diff --git a/lib/Zend/Dojo/Form/Element/Editor.php b/lib/internal/Zend/Dojo/Form/Element/Editor.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/Editor.php rename to lib/internal/Zend/Dojo/Form/Element/Editor.php diff --git a/lib/Zend/Dojo/Form/Element/FilteringSelect.php b/lib/internal/Zend/Dojo/Form/Element/FilteringSelect.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/FilteringSelect.php rename to lib/internal/Zend/Dojo/Form/Element/FilteringSelect.php diff --git a/lib/Zend/Dojo/Form/Element/HorizontalSlider.php b/lib/internal/Zend/Dojo/Form/Element/HorizontalSlider.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/HorizontalSlider.php rename to lib/internal/Zend/Dojo/Form/Element/HorizontalSlider.php diff --git a/lib/Zend/Dojo/Form/Element/NumberSpinner.php b/lib/internal/Zend/Dojo/Form/Element/NumberSpinner.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/NumberSpinner.php rename to lib/internal/Zend/Dojo/Form/Element/NumberSpinner.php diff --git a/lib/Zend/Dojo/Form/Element/NumberTextBox.php b/lib/internal/Zend/Dojo/Form/Element/NumberTextBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/NumberTextBox.php rename to lib/internal/Zend/Dojo/Form/Element/NumberTextBox.php diff --git a/lib/Zend/Dojo/Form/Element/PasswordTextBox.php b/lib/internal/Zend/Dojo/Form/Element/PasswordTextBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/PasswordTextBox.php rename to lib/internal/Zend/Dojo/Form/Element/PasswordTextBox.php diff --git a/lib/Zend/Dojo/Form/Element/RadioButton.php b/lib/internal/Zend/Dojo/Form/Element/RadioButton.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/RadioButton.php rename to lib/internal/Zend/Dojo/Form/Element/RadioButton.php diff --git a/lib/Zend/Dojo/Form/Element/SimpleTextarea.php b/lib/internal/Zend/Dojo/Form/Element/SimpleTextarea.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/SimpleTextarea.php rename to lib/internal/Zend/Dojo/Form/Element/SimpleTextarea.php diff --git a/lib/Zend/Dojo/Form/Element/Slider.php b/lib/internal/Zend/Dojo/Form/Element/Slider.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/Slider.php rename to lib/internal/Zend/Dojo/Form/Element/Slider.php diff --git a/lib/Zend/Dojo/Form/Element/SubmitButton.php b/lib/internal/Zend/Dojo/Form/Element/SubmitButton.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/SubmitButton.php rename to lib/internal/Zend/Dojo/Form/Element/SubmitButton.php diff --git a/lib/Zend/Dojo/Form/Element/TextBox.php b/lib/internal/Zend/Dojo/Form/Element/TextBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/TextBox.php rename to lib/internal/Zend/Dojo/Form/Element/TextBox.php diff --git a/lib/Zend/Dojo/Form/Element/Textarea.php b/lib/internal/Zend/Dojo/Form/Element/Textarea.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/Textarea.php rename to lib/internal/Zend/Dojo/Form/Element/Textarea.php diff --git a/lib/Zend/Dojo/Form/Element/TimeTextBox.php b/lib/internal/Zend/Dojo/Form/Element/TimeTextBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/TimeTextBox.php rename to lib/internal/Zend/Dojo/Form/Element/TimeTextBox.php diff --git a/lib/Zend/Dojo/Form/Element/ValidationTextBox.php b/lib/internal/Zend/Dojo/Form/Element/ValidationTextBox.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/ValidationTextBox.php rename to lib/internal/Zend/Dojo/Form/Element/ValidationTextBox.php diff --git a/lib/Zend/Dojo/Form/Element/VerticalSlider.php b/lib/internal/Zend/Dojo/Form/Element/VerticalSlider.php similarity index 100% rename from lib/Zend/Dojo/Form/Element/VerticalSlider.php rename to lib/internal/Zend/Dojo/Form/Element/VerticalSlider.php diff --git a/lib/Zend/Dojo/Form/SubForm.php b/lib/internal/Zend/Dojo/Form/SubForm.php similarity index 100% rename from lib/Zend/Dojo/Form/SubForm.php rename to lib/internal/Zend/Dojo/Form/SubForm.php diff --git a/lib/Zend/Dojo/View/Exception.php b/lib/internal/Zend/Dojo/View/Exception.php similarity index 100% rename from lib/Zend/Dojo/View/Exception.php rename to lib/internal/Zend/Dojo/View/Exception.php diff --git a/lib/Zend/Dojo/View/Helper/AccordionContainer.php b/lib/internal/Zend/Dojo/View/Helper/AccordionContainer.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/AccordionContainer.php rename to lib/internal/Zend/Dojo/View/Helper/AccordionContainer.php diff --git a/lib/Zend/Dojo/View/Helper/AccordionPane.php b/lib/internal/Zend/Dojo/View/Helper/AccordionPane.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/AccordionPane.php rename to lib/internal/Zend/Dojo/View/Helper/AccordionPane.php diff --git a/lib/Zend/Dojo/View/Helper/BorderContainer.php b/lib/internal/Zend/Dojo/View/Helper/BorderContainer.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/BorderContainer.php rename to lib/internal/Zend/Dojo/View/Helper/BorderContainer.php diff --git a/lib/Zend/Dojo/View/Helper/Button.php b/lib/internal/Zend/Dojo/View/Helper/Button.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Button.php rename to lib/internal/Zend/Dojo/View/Helper/Button.php diff --git a/lib/Zend/Dojo/View/Helper/CheckBox.php b/lib/internal/Zend/Dojo/View/Helper/CheckBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/CheckBox.php rename to lib/internal/Zend/Dojo/View/Helper/CheckBox.php diff --git a/lib/Zend/Dojo/View/Helper/ComboBox.php b/lib/internal/Zend/Dojo/View/Helper/ComboBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/ComboBox.php rename to lib/internal/Zend/Dojo/View/Helper/ComboBox.php diff --git a/lib/Zend/Dojo/View/Helper/ContentPane.php b/lib/internal/Zend/Dojo/View/Helper/ContentPane.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/ContentPane.php rename to lib/internal/Zend/Dojo/View/Helper/ContentPane.php diff --git a/lib/Zend/Dojo/View/Helper/CurrencyTextBox.php b/lib/internal/Zend/Dojo/View/Helper/CurrencyTextBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/CurrencyTextBox.php rename to lib/internal/Zend/Dojo/View/Helper/CurrencyTextBox.php diff --git a/lib/Zend/Dojo/View/Helper/CustomDijit.php b/lib/internal/Zend/Dojo/View/Helper/CustomDijit.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/CustomDijit.php rename to lib/internal/Zend/Dojo/View/Helper/CustomDijit.php diff --git a/lib/Zend/Dojo/View/Helper/DateTextBox.php b/lib/internal/Zend/Dojo/View/Helper/DateTextBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/DateTextBox.php rename to lib/internal/Zend/Dojo/View/Helper/DateTextBox.php diff --git a/lib/Zend/Dojo/View/Helper/Dijit.php b/lib/internal/Zend/Dojo/View/Helper/Dijit.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Dijit.php rename to lib/internal/Zend/Dojo/View/Helper/Dijit.php diff --git a/lib/Zend/Dojo/View/Helper/DijitContainer.php b/lib/internal/Zend/Dojo/View/Helper/DijitContainer.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/DijitContainer.php rename to lib/internal/Zend/Dojo/View/Helper/DijitContainer.php diff --git a/lib/Zend/Dojo/View/Helper/Dojo.php b/lib/internal/Zend/Dojo/View/Helper/Dojo.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Dojo.php rename to lib/internal/Zend/Dojo/View/Helper/Dojo.php diff --git a/lib/Zend/Dojo/View/Helper/Dojo/Container.php b/lib/internal/Zend/Dojo/View/Helper/Dojo/Container.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Dojo/Container.php rename to lib/internal/Zend/Dojo/View/Helper/Dojo/Container.php diff --git a/lib/Zend/Dojo/View/Helper/Editor.php b/lib/internal/Zend/Dojo/View/Helper/Editor.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Editor.php rename to lib/internal/Zend/Dojo/View/Helper/Editor.php diff --git a/lib/Zend/Dojo/View/Helper/FilteringSelect.php b/lib/internal/Zend/Dojo/View/Helper/FilteringSelect.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/FilteringSelect.php rename to lib/internal/Zend/Dojo/View/Helper/FilteringSelect.php diff --git a/lib/Zend/Dojo/View/Helper/Form.php b/lib/internal/Zend/Dojo/View/Helper/Form.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Form.php rename to lib/internal/Zend/Dojo/View/Helper/Form.php diff --git a/lib/Zend/Dojo/View/Helper/HorizontalSlider.php b/lib/internal/Zend/Dojo/View/Helper/HorizontalSlider.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/HorizontalSlider.php rename to lib/internal/Zend/Dojo/View/Helper/HorizontalSlider.php diff --git a/lib/Zend/Dojo/View/Helper/NumberSpinner.php b/lib/internal/Zend/Dojo/View/Helper/NumberSpinner.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/NumberSpinner.php rename to lib/internal/Zend/Dojo/View/Helper/NumberSpinner.php diff --git a/lib/Zend/Dojo/View/Helper/NumberTextBox.php b/lib/internal/Zend/Dojo/View/Helper/NumberTextBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/NumberTextBox.php rename to lib/internal/Zend/Dojo/View/Helper/NumberTextBox.php diff --git a/lib/Zend/Dojo/View/Helper/PasswordTextBox.php b/lib/internal/Zend/Dojo/View/Helper/PasswordTextBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/PasswordTextBox.php rename to lib/internal/Zend/Dojo/View/Helper/PasswordTextBox.php diff --git a/lib/Zend/Dojo/View/Helper/RadioButton.php b/lib/internal/Zend/Dojo/View/Helper/RadioButton.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/RadioButton.php rename to lib/internal/Zend/Dojo/View/Helper/RadioButton.php diff --git a/lib/Zend/Dojo/View/Helper/SimpleTextarea.php b/lib/internal/Zend/Dojo/View/Helper/SimpleTextarea.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/SimpleTextarea.php rename to lib/internal/Zend/Dojo/View/Helper/SimpleTextarea.php diff --git a/lib/Zend/Dojo/View/Helper/Slider.php b/lib/internal/Zend/Dojo/View/Helper/Slider.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Slider.php rename to lib/internal/Zend/Dojo/View/Helper/Slider.php diff --git a/lib/Zend/Dojo/View/Helper/SplitContainer.php b/lib/internal/Zend/Dojo/View/Helper/SplitContainer.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/SplitContainer.php rename to lib/internal/Zend/Dojo/View/Helper/SplitContainer.php diff --git a/lib/Zend/Dojo/View/Helper/StackContainer.php b/lib/internal/Zend/Dojo/View/Helper/StackContainer.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/StackContainer.php rename to lib/internal/Zend/Dojo/View/Helper/StackContainer.php diff --git a/lib/Zend/Dojo/View/Helper/SubmitButton.php b/lib/internal/Zend/Dojo/View/Helper/SubmitButton.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/SubmitButton.php rename to lib/internal/Zend/Dojo/View/Helper/SubmitButton.php diff --git a/lib/Zend/Dojo/View/Helper/TabContainer.php b/lib/internal/Zend/Dojo/View/Helper/TabContainer.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/TabContainer.php rename to lib/internal/Zend/Dojo/View/Helper/TabContainer.php diff --git a/lib/Zend/Dojo/View/Helper/TextBox.php b/lib/internal/Zend/Dojo/View/Helper/TextBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/TextBox.php rename to lib/internal/Zend/Dojo/View/Helper/TextBox.php diff --git a/lib/Zend/Dojo/View/Helper/Textarea.php b/lib/internal/Zend/Dojo/View/Helper/Textarea.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/Textarea.php rename to lib/internal/Zend/Dojo/View/Helper/Textarea.php diff --git a/lib/Zend/Dojo/View/Helper/TimeTextBox.php b/lib/internal/Zend/Dojo/View/Helper/TimeTextBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/TimeTextBox.php rename to lib/internal/Zend/Dojo/View/Helper/TimeTextBox.php diff --git a/lib/Zend/Dojo/View/Helper/ValidationTextBox.php b/lib/internal/Zend/Dojo/View/Helper/ValidationTextBox.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/ValidationTextBox.php rename to lib/internal/Zend/Dojo/View/Helper/ValidationTextBox.php diff --git a/lib/Zend/Dojo/View/Helper/VerticalSlider.php b/lib/internal/Zend/Dojo/View/Helper/VerticalSlider.php similarity index 100% rename from lib/Zend/Dojo/View/Helper/VerticalSlider.php rename to lib/internal/Zend/Dojo/View/Helper/VerticalSlider.php diff --git a/lib/Zend/Dom/Exception.php b/lib/internal/Zend/Dom/Exception.php similarity index 100% rename from lib/Zend/Dom/Exception.php rename to lib/internal/Zend/Dom/Exception.php diff --git a/lib/Zend/Dom/Query.php b/lib/internal/Zend/Dom/Query.php similarity index 100% rename from lib/Zend/Dom/Query.php rename to lib/internal/Zend/Dom/Query.php diff --git a/lib/Zend/Dom/Query/Css2Xpath.php b/lib/internal/Zend/Dom/Query/Css2Xpath.php similarity index 100% rename from lib/Zend/Dom/Query/Css2Xpath.php rename to lib/internal/Zend/Dom/Query/Css2Xpath.php diff --git a/lib/Zend/Dom/Query/Result.php b/lib/internal/Zend/Dom/Query/Result.php similarity index 100% rename from lib/Zend/Dom/Query/Result.php rename to lib/internal/Zend/Dom/Query/Result.php diff --git a/lib/Zend/Escaper/Escaper.php b/lib/internal/Zend/Escaper/Escaper.php similarity index 100% rename from lib/Zend/Escaper/Escaper.php rename to lib/internal/Zend/Escaper/Escaper.php diff --git a/lib/Zend/Escaper/Exception/ExceptionInterface.php b/lib/internal/Zend/Escaper/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Escaper/Exception/ExceptionInterface.php rename to lib/internal/Zend/Escaper/Exception/ExceptionInterface.php diff --git a/lib/Zend/Escaper/Exception/InvalidArgumentException.php b/lib/internal/Zend/Escaper/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Escaper/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Escaper/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Escaper/Exception/RuntimeException.php b/lib/internal/Zend/Escaper/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Escaper/Exception/RuntimeException.php rename to lib/internal/Zend/Escaper/Exception/RuntimeException.php diff --git a/lib/Zend/Escaper/composer.json b/lib/internal/Zend/Escaper/composer.json similarity index 100% rename from lib/Zend/Escaper/composer.json rename to lib/internal/Zend/Escaper/composer.json diff --git a/lib/Zend/EventManager/Event.php b/lib/internal/Zend/EventManager/Event.php similarity index 100% rename from lib/Zend/EventManager/Event.php rename to lib/internal/Zend/EventManager/Event.php diff --git a/lib/Zend/EventManager/EventInterface.php b/lib/internal/Zend/EventManager/EventInterface.php similarity index 100% rename from lib/Zend/EventManager/EventInterface.php rename to lib/internal/Zend/EventManager/EventInterface.php diff --git a/lib/Zend/EventManager/EventManager.php b/lib/internal/Zend/EventManager/EventManager.php similarity index 100% rename from lib/Zend/EventManager/EventManager.php rename to lib/internal/Zend/EventManager/EventManager.php diff --git a/lib/Zend/EventManager/EventManagerAwareInterface.php b/lib/internal/Zend/EventManager/EventManagerAwareInterface.php similarity index 100% rename from lib/Zend/EventManager/EventManagerAwareInterface.php rename to lib/internal/Zend/EventManager/EventManagerAwareInterface.php diff --git a/lib/Zend/EventManager/EventManagerInterface.php b/lib/internal/Zend/EventManager/EventManagerInterface.php similarity index 100% rename from lib/Zend/EventManager/EventManagerInterface.php rename to lib/internal/Zend/EventManager/EventManagerInterface.php diff --git a/lib/Zend/EventManager/EventsCapableInterface.php b/lib/internal/Zend/EventManager/EventsCapableInterface.php similarity index 100% rename from lib/Zend/EventManager/EventsCapableInterface.php rename to lib/internal/Zend/EventManager/EventsCapableInterface.php diff --git a/lib/Zend/EventManager/Exception/DomainException.php b/lib/internal/Zend/EventManager/Exception/DomainException.php similarity index 100% rename from lib/Zend/EventManager/Exception/DomainException.php rename to lib/internal/Zend/EventManager/Exception/DomainException.php diff --git a/lib/Zend/EventManager/Exception/ExceptionInterface.php b/lib/internal/Zend/EventManager/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/EventManager/Exception/ExceptionInterface.php rename to lib/internal/Zend/EventManager/Exception/ExceptionInterface.php diff --git a/lib/Zend/EventManager/Exception/InvalidArgumentException.php b/lib/internal/Zend/EventManager/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/EventManager/Exception/InvalidArgumentException.php rename to lib/internal/Zend/EventManager/Exception/InvalidArgumentException.php diff --git a/lib/Zend/EventManager/Exception/InvalidCallbackException.php b/lib/internal/Zend/EventManager/Exception/InvalidCallbackException.php similarity index 100% rename from lib/Zend/EventManager/Exception/InvalidCallbackException.php rename to lib/internal/Zend/EventManager/Exception/InvalidCallbackException.php diff --git a/lib/Zend/EventManager/Filter/FilterInterface.php b/lib/internal/Zend/EventManager/Filter/FilterInterface.php similarity index 100% rename from lib/Zend/EventManager/Filter/FilterInterface.php rename to lib/internal/Zend/EventManager/Filter/FilterInterface.php diff --git a/lib/Zend/EventManager/Filter/FilterIterator.php b/lib/internal/Zend/EventManager/Filter/FilterIterator.php similarity index 100% rename from lib/Zend/EventManager/Filter/FilterIterator.php rename to lib/internal/Zend/EventManager/Filter/FilterIterator.php diff --git a/lib/Zend/EventManager/FilterChain.php b/lib/internal/Zend/EventManager/FilterChain.php similarity index 100% rename from lib/Zend/EventManager/FilterChain.php rename to lib/internal/Zend/EventManager/FilterChain.php diff --git a/lib/Zend/EventManager/GlobalEventManager.php b/lib/internal/Zend/EventManager/GlobalEventManager.php similarity index 100% rename from lib/Zend/EventManager/GlobalEventManager.php rename to lib/internal/Zend/EventManager/GlobalEventManager.php diff --git a/lib/Zend/EventManager/ListenerAggregateInterface.php b/lib/internal/Zend/EventManager/ListenerAggregateInterface.php similarity index 100% rename from lib/Zend/EventManager/ListenerAggregateInterface.php rename to lib/internal/Zend/EventManager/ListenerAggregateInterface.php diff --git a/lib/Zend/EventManager/ProvidesEvents.php b/lib/internal/Zend/EventManager/ProvidesEvents.php similarity index 100% rename from lib/Zend/EventManager/ProvidesEvents.php rename to lib/internal/Zend/EventManager/ProvidesEvents.php diff --git a/lib/Zend/EventManager/ResponseCollection.php b/lib/internal/Zend/EventManager/ResponseCollection.php similarity index 100% rename from lib/Zend/EventManager/ResponseCollection.php rename to lib/internal/Zend/EventManager/ResponseCollection.php diff --git a/lib/Zend/EventManager/SharedEventManager.php b/lib/internal/Zend/EventManager/SharedEventManager.php similarity index 100% rename from lib/Zend/EventManager/SharedEventManager.php rename to lib/internal/Zend/EventManager/SharedEventManager.php diff --git a/lib/Zend/EventManager/SharedEventManagerAwareInterface.php b/lib/internal/Zend/EventManager/SharedEventManagerAwareInterface.php similarity index 100% rename from lib/Zend/EventManager/SharedEventManagerAwareInterface.php rename to lib/internal/Zend/EventManager/SharedEventManagerAwareInterface.php diff --git a/lib/Zend/EventManager/SharedEventManagerInterface.php b/lib/internal/Zend/EventManager/SharedEventManagerInterface.php similarity index 100% rename from lib/Zend/EventManager/SharedEventManagerInterface.php rename to lib/internal/Zend/EventManager/SharedEventManagerInterface.php diff --git a/lib/Zend/EventManager/StaticEventManager.php b/lib/internal/Zend/EventManager/StaticEventManager.php similarity index 100% rename from lib/Zend/EventManager/StaticEventManager.php rename to lib/internal/Zend/EventManager/StaticEventManager.php diff --git a/lib/Zend/EventManager/composer.json b/lib/internal/Zend/EventManager/composer.json similarity index 100% rename from lib/Zend/EventManager/composer.json rename to lib/internal/Zend/EventManager/composer.json diff --git a/lib/Zend/Exception.php b/lib/internal/Zend/Exception.php similarity index 100% rename from lib/Zend/Exception.php rename to lib/internal/Zend/Exception.php diff --git a/lib/Zend/Feed.php b/lib/internal/Zend/Feed.php similarity index 100% rename from lib/Zend/Feed.php rename to lib/internal/Zend/Feed.php diff --git a/lib/Zend/Feed/Abstract.php b/lib/internal/Zend/Feed/Abstract.php similarity index 100% rename from lib/Zend/Feed/Abstract.php rename to lib/internal/Zend/Feed/Abstract.php diff --git a/lib/Zend/Feed/Atom.php b/lib/internal/Zend/Feed/Atom.php similarity index 100% rename from lib/Zend/Feed/Atom.php rename to lib/internal/Zend/Feed/Atom.php diff --git a/lib/Zend/Feed/Builder.php b/lib/internal/Zend/Feed/Builder.php similarity index 100% rename from lib/Zend/Feed/Builder.php rename to lib/internal/Zend/Feed/Builder.php diff --git a/lib/Zend/Feed/Builder/Entry.php b/lib/internal/Zend/Feed/Builder/Entry.php similarity index 100% rename from lib/Zend/Feed/Builder/Entry.php rename to lib/internal/Zend/Feed/Builder/Entry.php diff --git a/lib/Zend/Feed/Builder/Exception.php b/lib/internal/Zend/Feed/Builder/Exception.php similarity index 100% rename from lib/Zend/Feed/Builder/Exception.php rename to lib/internal/Zend/Feed/Builder/Exception.php diff --git a/lib/Zend/Feed/Builder/Header.php b/lib/internal/Zend/Feed/Builder/Header.php similarity index 100% rename from lib/Zend/Feed/Builder/Header.php rename to lib/internal/Zend/Feed/Builder/Header.php diff --git a/lib/Zend/Feed/Builder/Header/Itunes.php b/lib/internal/Zend/Feed/Builder/Header/Itunes.php similarity index 100% rename from lib/Zend/Feed/Builder/Header/Itunes.php rename to lib/internal/Zend/Feed/Builder/Header/Itunes.php diff --git a/lib/Zend/Feed/Builder/Interface.php b/lib/internal/Zend/Feed/Builder/Interface.php similarity index 100% rename from lib/Zend/Feed/Builder/Interface.php rename to lib/internal/Zend/Feed/Builder/Interface.php diff --git a/lib/Zend/Feed/Element.php b/lib/internal/Zend/Feed/Element.php similarity index 100% rename from lib/Zend/Feed/Element.php rename to lib/internal/Zend/Feed/Element.php diff --git a/lib/Zend/Feed/Entry/Abstract.php b/lib/internal/Zend/Feed/Entry/Abstract.php similarity index 100% rename from lib/Zend/Feed/Entry/Abstract.php rename to lib/internal/Zend/Feed/Entry/Abstract.php diff --git a/lib/Zend/Feed/Entry/Atom.php b/lib/internal/Zend/Feed/Entry/Atom.php similarity index 100% rename from lib/Zend/Feed/Entry/Atom.php rename to lib/internal/Zend/Feed/Entry/Atom.php diff --git a/lib/Zend/Feed/Entry/Rss.php b/lib/internal/Zend/Feed/Entry/Rss.php similarity index 100% rename from lib/Zend/Feed/Entry/Rss.php rename to lib/internal/Zend/Feed/Entry/Rss.php diff --git a/lib/Zend/Feed/Exception.php b/lib/internal/Zend/Feed/Exception.php similarity index 100% rename from lib/Zend/Feed/Exception.php rename to lib/internal/Zend/Feed/Exception.php diff --git a/lib/Zend/Feed/Pubsubhubbub.php b/lib/internal/Zend/Feed/Pubsubhubbub.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub.php rename to lib/internal/Zend/Feed/Pubsubhubbub.php diff --git a/lib/Zend/Feed/Pubsubhubbub/CallbackAbstract.php b/lib/internal/Zend/Feed/Pubsubhubbub/CallbackAbstract.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/CallbackAbstract.php rename to lib/internal/Zend/Feed/Pubsubhubbub/CallbackAbstract.php diff --git a/lib/Zend/Feed/Pubsubhubbub/CallbackInterface.php b/lib/internal/Zend/Feed/Pubsubhubbub/CallbackInterface.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/CallbackInterface.php rename to lib/internal/Zend/Feed/Pubsubhubbub/CallbackInterface.php diff --git a/lib/Zend/Feed/Pubsubhubbub/Exception.php b/lib/internal/Zend/Feed/Pubsubhubbub/Exception.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/Exception.php rename to lib/internal/Zend/Feed/Pubsubhubbub/Exception.php diff --git a/lib/Zend/Feed/Pubsubhubbub/HttpResponse.php b/lib/internal/Zend/Feed/Pubsubhubbub/HttpResponse.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/HttpResponse.php rename to lib/internal/Zend/Feed/Pubsubhubbub/HttpResponse.php diff --git a/lib/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php b/lib/internal/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php rename to lib/internal/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php diff --git a/lib/Zend/Feed/Pubsubhubbub/Model/Subscription.php b/lib/internal/Zend/Feed/Pubsubhubbub/Model/Subscription.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/Model/Subscription.php rename to lib/internal/Zend/Feed/Pubsubhubbub/Model/Subscription.php diff --git a/lib/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php b/lib/internal/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php rename to lib/internal/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php diff --git a/lib/Zend/Feed/Pubsubhubbub/Publisher.php b/lib/internal/Zend/Feed/Pubsubhubbub/Publisher.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/Publisher.php rename to lib/internal/Zend/Feed/Pubsubhubbub/Publisher.php diff --git a/lib/Zend/Feed/Pubsubhubbub/Subscriber.php b/lib/internal/Zend/Feed/Pubsubhubbub/Subscriber.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/Subscriber.php rename to lib/internal/Zend/Feed/Pubsubhubbub/Subscriber.php diff --git a/lib/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php b/lib/internal/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php similarity index 100% rename from lib/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php rename to lib/internal/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php diff --git a/lib/Zend/Feed/Reader.php b/lib/internal/Zend/Feed/Reader.php similarity index 100% rename from lib/Zend/Feed/Reader.php rename to lib/internal/Zend/Feed/Reader.php diff --git a/lib/Zend/Feed/Reader/Collection.php b/lib/internal/Zend/Feed/Reader/Collection.php similarity index 100% rename from lib/Zend/Feed/Reader/Collection.php rename to lib/internal/Zend/Feed/Reader/Collection.php diff --git a/lib/Zend/Feed/Reader/Collection/Author.php b/lib/internal/Zend/Feed/Reader/Collection/Author.php similarity index 100% rename from lib/Zend/Feed/Reader/Collection/Author.php rename to lib/internal/Zend/Feed/Reader/Collection/Author.php diff --git a/lib/Zend/Feed/Reader/Collection/Category.php b/lib/internal/Zend/Feed/Reader/Collection/Category.php similarity index 100% rename from lib/Zend/Feed/Reader/Collection/Category.php rename to lib/internal/Zend/Feed/Reader/Collection/Category.php diff --git a/lib/Zend/Feed/Reader/Collection/CollectionAbstract.php b/lib/internal/Zend/Feed/Reader/Collection/CollectionAbstract.php similarity index 100% rename from lib/Zend/Feed/Reader/Collection/CollectionAbstract.php rename to lib/internal/Zend/Feed/Reader/Collection/CollectionAbstract.php diff --git a/lib/Zend/Feed/Reader/Entry/Atom.php b/lib/internal/Zend/Feed/Reader/Entry/Atom.php similarity index 100% rename from lib/Zend/Feed/Reader/Entry/Atom.php rename to lib/internal/Zend/Feed/Reader/Entry/Atom.php diff --git a/lib/Zend/Feed/Reader/Entry/Rss.php b/lib/internal/Zend/Feed/Reader/Entry/Rss.php similarity index 100% rename from lib/Zend/Feed/Reader/Entry/Rss.php rename to lib/internal/Zend/Feed/Reader/Entry/Rss.php diff --git a/lib/Zend/Feed/Reader/EntryAbstract.php b/lib/internal/Zend/Feed/Reader/EntryAbstract.php similarity index 100% rename from lib/Zend/Feed/Reader/EntryAbstract.php rename to lib/internal/Zend/Feed/Reader/EntryAbstract.php diff --git a/lib/Zend/Feed/Reader/EntryInterface.php b/lib/internal/Zend/Feed/Reader/EntryInterface.php similarity index 100% rename from lib/Zend/Feed/Reader/EntryInterface.php rename to lib/internal/Zend/Feed/Reader/EntryInterface.php diff --git a/lib/Zend/Feed/Reader/Extension/Atom/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/Atom/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Atom/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/Atom/Entry.php diff --git a/lib/Zend/Feed/Reader/Extension/Atom/Feed.php b/lib/internal/Zend/Feed/Reader/Extension/Atom/Feed.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Atom/Feed.php rename to lib/internal/Zend/Feed/Reader/Extension/Atom/Feed.php diff --git a/lib/Zend/Feed/Reader/Extension/Content/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/Content/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Content/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/Content/Entry.php diff --git a/lib/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php diff --git a/lib/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php b/lib/internal/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php rename to lib/internal/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php diff --git a/lib/Zend/Feed/Reader/Extension/DublinCore/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/DublinCore/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/DublinCore/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/DublinCore/Entry.php diff --git a/lib/Zend/Feed/Reader/Extension/DublinCore/Feed.php b/lib/internal/Zend/Feed/Reader/Extension/DublinCore/Feed.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/DublinCore/Feed.php rename to lib/internal/Zend/Feed/Reader/Extension/DublinCore/Feed.php diff --git a/lib/Zend/Feed/Reader/Extension/EntryAbstract.php b/lib/internal/Zend/Feed/Reader/Extension/EntryAbstract.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/EntryAbstract.php rename to lib/internal/Zend/Feed/Reader/Extension/EntryAbstract.php diff --git a/lib/Zend/Feed/Reader/Extension/FeedAbstract.php b/lib/internal/Zend/Feed/Reader/Extension/FeedAbstract.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/FeedAbstract.php rename to lib/internal/Zend/Feed/Reader/Extension/FeedAbstract.php diff --git a/lib/Zend/Feed/Reader/Extension/Podcast/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/Podcast/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Podcast/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/Podcast/Entry.php diff --git a/lib/Zend/Feed/Reader/Extension/Podcast/Feed.php b/lib/internal/Zend/Feed/Reader/Extension/Podcast/Feed.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Podcast/Feed.php rename to lib/internal/Zend/Feed/Reader/Extension/Podcast/Feed.php diff --git a/lib/Zend/Feed/Reader/Extension/Slash/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/Slash/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Slash/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/Slash/Entry.php diff --git a/lib/Zend/Feed/Reader/Extension/Syndication/Feed.php b/lib/internal/Zend/Feed/Reader/Extension/Syndication/Feed.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Syndication/Feed.php rename to lib/internal/Zend/Feed/Reader/Extension/Syndication/Feed.php diff --git a/lib/Zend/Feed/Reader/Extension/Thread/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/Thread/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/Thread/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/Thread/Entry.php diff --git a/lib/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php b/lib/internal/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php similarity index 100% rename from lib/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php rename to lib/internal/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php diff --git a/lib/Zend/Feed/Reader/Feed/Atom.php b/lib/internal/Zend/Feed/Reader/Feed/Atom.php similarity index 100% rename from lib/Zend/Feed/Reader/Feed/Atom.php rename to lib/internal/Zend/Feed/Reader/Feed/Atom.php diff --git a/lib/Zend/Feed/Reader/Feed/Atom/Source.php b/lib/internal/Zend/Feed/Reader/Feed/Atom/Source.php similarity index 100% rename from lib/Zend/Feed/Reader/Feed/Atom/Source.php rename to lib/internal/Zend/Feed/Reader/Feed/Atom/Source.php diff --git a/lib/Zend/Feed/Reader/Feed/Rss.php b/lib/internal/Zend/Feed/Reader/Feed/Rss.php similarity index 100% rename from lib/Zend/Feed/Reader/Feed/Rss.php rename to lib/internal/Zend/Feed/Reader/Feed/Rss.php diff --git a/lib/Zend/Feed/Reader/FeedAbstract.php b/lib/internal/Zend/Feed/Reader/FeedAbstract.php similarity index 100% rename from lib/Zend/Feed/Reader/FeedAbstract.php rename to lib/internal/Zend/Feed/Reader/FeedAbstract.php diff --git a/lib/Zend/Feed/Reader/FeedInterface.php b/lib/internal/Zend/Feed/Reader/FeedInterface.php similarity index 100% rename from lib/Zend/Feed/Reader/FeedInterface.php rename to lib/internal/Zend/Feed/Reader/FeedInterface.php diff --git a/lib/Zend/Feed/Reader/FeedSet.php b/lib/internal/Zend/Feed/Reader/FeedSet.php similarity index 100% rename from lib/Zend/Feed/Reader/FeedSet.php rename to lib/internal/Zend/Feed/Reader/FeedSet.php diff --git a/lib/Zend/Feed/Rss.php b/lib/internal/Zend/Feed/Rss.php similarity index 100% rename from lib/Zend/Feed/Rss.php rename to lib/internal/Zend/Feed/Rss.php diff --git a/lib/Zend/Feed/Writer.php b/lib/internal/Zend/Feed/Writer.php similarity index 100% rename from lib/Zend/Feed/Writer.php rename to lib/internal/Zend/Feed/Writer.php diff --git a/lib/Zend/Feed/Writer/Deleted.php b/lib/internal/Zend/Feed/Writer/Deleted.php similarity index 100% rename from lib/Zend/Feed/Writer/Deleted.php rename to lib/internal/Zend/Feed/Writer/Deleted.php diff --git a/lib/Zend/Feed/Writer/Entry.php b/lib/internal/Zend/Feed/Writer/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Entry.php rename to lib/internal/Zend/Feed/Writer/Entry.php diff --git a/lib/Zend/Feed/Writer/Exception/InvalidMethodException.php b/lib/internal/Zend/Feed/Writer/Exception/InvalidMethodException.php similarity index 100% rename from lib/Zend/Feed/Writer/Exception/InvalidMethodException.php rename to lib/internal/Zend/Feed/Writer/Exception/InvalidMethodException.php diff --git a/lib/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php b/lib/internal/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php rename to lib/internal/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php diff --git a/lib/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php b/lib/internal/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php rename to lib/internal/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php diff --git a/lib/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php b/lib/internal/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php rename to lib/internal/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php diff --git a/lib/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php b/lib/internal/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php rename to lib/internal/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php diff --git a/lib/Zend/Feed/Writer/Extension/ITunes/Entry.php b/lib/internal/Zend/Feed/Writer/Extension/ITunes/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/ITunes/Entry.php rename to lib/internal/Zend/Feed/Writer/Extension/ITunes/Entry.php diff --git a/lib/Zend/Feed/Writer/Extension/ITunes/Feed.php b/lib/internal/Zend/Feed/Writer/Extension/ITunes/Feed.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/ITunes/Feed.php rename to lib/internal/Zend/Feed/Writer/Extension/ITunes/Feed.php diff --git a/lib/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php b/lib/internal/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php rename to lib/internal/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php diff --git a/lib/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php b/lib/internal/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php rename to lib/internal/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php diff --git a/lib/Zend/Feed/Writer/Extension/RendererAbstract.php b/lib/internal/Zend/Feed/Writer/Extension/RendererAbstract.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/RendererAbstract.php rename to lib/internal/Zend/Feed/Writer/Extension/RendererAbstract.php diff --git a/lib/Zend/Feed/Writer/Extension/RendererInterface.php b/lib/internal/Zend/Feed/Writer/Extension/RendererInterface.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/RendererInterface.php rename to lib/internal/Zend/Feed/Writer/Extension/RendererInterface.php diff --git a/lib/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php b/lib/internal/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php rename to lib/internal/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php diff --git a/lib/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php b/lib/internal/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php rename to lib/internal/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php diff --git a/lib/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php b/lib/internal/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php similarity index 100% rename from lib/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php rename to lib/internal/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php diff --git a/lib/Zend/Feed/Writer/Feed.php b/lib/internal/Zend/Feed/Writer/Feed.php similarity index 100% rename from lib/Zend/Feed/Writer/Feed.php rename to lib/internal/Zend/Feed/Writer/Feed.php diff --git a/lib/Zend/Feed/Writer/Feed/FeedAbstract.php b/lib/internal/Zend/Feed/Writer/Feed/FeedAbstract.php similarity index 100% rename from lib/Zend/Feed/Writer/Feed/FeedAbstract.php rename to lib/internal/Zend/Feed/Writer/Feed/FeedAbstract.php diff --git a/lib/Zend/Feed/Writer/Renderer/Entry/Atom.php b/lib/internal/Zend/Feed/Writer/Renderer/Entry/Atom.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/Entry/Atom.php rename to lib/internal/Zend/Feed/Writer/Renderer/Entry/Atom.php diff --git a/lib/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php b/lib/internal/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php rename to lib/internal/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php diff --git a/lib/Zend/Feed/Writer/Renderer/Entry/Rss.php b/lib/internal/Zend/Feed/Writer/Renderer/Entry/Rss.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/Entry/Rss.php rename to lib/internal/Zend/Feed/Writer/Renderer/Entry/Rss.php diff --git a/lib/Zend/Feed/Writer/Renderer/Feed/Atom.php b/lib/internal/Zend/Feed/Writer/Renderer/Feed/Atom.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/Feed/Atom.php rename to lib/internal/Zend/Feed/Writer/Renderer/Feed/Atom.php diff --git a/lib/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php b/lib/internal/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php rename to lib/internal/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php diff --git a/lib/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php b/lib/internal/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php rename to lib/internal/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php diff --git a/lib/Zend/Feed/Writer/Renderer/Feed/Rss.php b/lib/internal/Zend/Feed/Writer/Renderer/Feed/Rss.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/Feed/Rss.php rename to lib/internal/Zend/Feed/Writer/Renderer/Feed/Rss.php diff --git a/lib/Zend/Feed/Writer/Renderer/RendererAbstract.php b/lib/internal/Zend/Feed/Writer/Renderer/RendererAbstract.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/RendererAbstract.php rename to lib/internal/Zend/Feed/Writer/Renderer/RendererAbstract.php diff --git a/lib/Zend/Feed/Writer/Renderer/RendererInterface.php b/lib/internal/Zend/Feed/Writer/Renderer/RendererInterface.php similarity index 100% rename from lib/Zend/Feed/Writer/Renderer/RendererInterface.php rename to lib/internal/Zend/Feed/Writer/Renderer/RendererInterface.php diff --git a/lib/Zend/Feed/Writer/Source.php b/lib/internal/Zend/Feed/Writer/Source.php similarity index 100% rename from lib/Zend/Feed/Writer/Source.php rename to lib/internal/Zend/Feed/Writer/Source.php diff --git a/lib/Zend/File/Transfer.php b/lib/internal/Zend/File/Transfer.php similarity index 100% rename from lib/Zend/File/Transfer.php rename to lib/internal/Zend/File/Transfer.php diff --git a/lib/Zend/File/Transfer/Adapter/Abstract.php b/lib/internal/Zend/File/Transfer/Adapter/Abstract.php similarity index 100% rename from lib/Zend/File/Transfer/Adapter/Abstract.php rename to lib/internal/Zend/File/Transfer/Adapter/Abstract.php diff --git a/lib/Zend/File/Transfer/Adapter/Http.php b/lib/internal/Zend/File/Transfer/Adapter/Http.php similarity index 100% rename from lib/Zend/File/Transfer/Adapter/Http.php rename to lib/internal/Zend/File/Transfer/Adapter/Http.php diff --git a/lib/Zend/File/Transfer/Exception.php b/lib/internal/Zend/File/Transfer/Exception.php similarity index 100% rename from lib/Zend/File/Transfer/Exception.php rename to lib/internal/Zend/File/Transfer/Exception.php diff --git a/lib/Zend/Filter.php b/lib/internal/Zend/Filter.php similarity index 100% rename from lib/Zend/Filter.php rename to lib/internal/Zend/Filter.php diff --git a/lib/Zend/Filter/Alnum.php b/lib/internal/Zend/Filter/Alnum.php similarity index 100% rename from lib/Zend/Filter/Alnum.php rename to lib/internal/Zend/Filter/Alnum.php diff --git a/lib/Zend/Filter/Alpha.php b/lib/internal/Zend/Filter/Alpha.php similarity index 100% rename from lib/Zend/Filter/Alpha.php rename to lib/internal/Zend/Filter/Alpha.php diff --git a/lib/Zend/Filter/BaseName.php b/lib/internal/Zend/Filter/BaseName.php similarity index 100% rename from lib/Zend/Filter/BaseName.php rename to lib/internal/Zend/Filter/BaseName.php diff --git a/lib/Zend/Filter/Boolean.php b/lib/internal/Zend/Filter/Boolean.php similarity index 100% rename from lib/Zend/Filter/Boolean.php rename to lib/internal/Zend/Filter/Boolean.php diff --git a/lib/Zend/Filter/Callback.php b/lib/internal/Zend/Filter/Callback.php similarity index 100% rename from lib/Zend/Filter/Callback.php rename to lib/internal/Zend/Filter/Callback.php diff --git a/lib/Zend/Filter/Compress.php b/lib/internal/Zend/Filter/Compress.php similarity index 100% rename from lib/Zend/Filter/Compress.php rename to lib/internal/Zend/Filter/Compress.php diff --git a/lib/Zend/Filter/Compress/Bz2.php b/lib/internal/Zend/Filter/Compress/Bz2.php similarity index 100% rename from lib/Zend/Filter/Compress/Bz2.php rename to lib/internal/Zend/Filter/Compress/Bz2.php diff --git a/lib/Zend/Filter/Compress/CompressAbstract.php b/lib/internal/Zend/Filter/Compress/CompressAbstract.php similarity index 100% rename from lib/Zend/Filter/Compress/CompressAbstract.php rename to lib/internal/Zend/Filter/Compress/CompressAbstract.php diff --git a/lib/Zend/Filter/Compress/CompressInterface.php b/lib/internal/Zend/Filter/Compress/CompressInterface.php similarity index 100% rename from lib/Zend/Filter/Compress/CompressInterface.php rename to lib/internal/Zend/Filter/Compress/CompressInterface.php diff --git a/lib/Zend/Filter/Compress/Gz.php b/lib/internal/Zend/Filter/Compress/Gz.php similarity index 100% rename from lib/Zend/Filter/Compress/Gz.php rename to lib/internal/Zend/Filter/Compress/Gz.php diff --git a/lib/Zend/Filter/Compress/Lzf.php b/lib/internal/Zend/Filter/Compress/Lzf.php similarity index 100% rename from lib/Zend/Filter/Compress/Lzf.php rename to lib/internal/Zend/Filter/Compress/Lzf.php diff --git a/lib/Zend/Filter/Compress/Rar.php b/lib/internal/Zend/Filter/Compress/Rar.php similarity index 100% rename from lib/Zend/Filter/Compress/Rar.php rename to lib/internal/Zend/Filter/Compress/Rar.php diff --git a/lib/Zend/Filter/Compress/Tar.php b/lib/internal/Zend/Filter/Compress/Tar.php similarity index 100% rename from lib/Zend/Filter/Compress/Tar.php rename to lib/internal/Zend/Filter/Compress/Tar.php diff --git a/lib/Zend/Filter/Compress/Zip.php b/lib/internal/Zend/Filter/Compress/Zip.php similarity index 100% rename from lib/Zend/Filter/Compress/Zip.php rename to lib/internal/Zend/Filter/Compress/Zip.php diff --git a/lib/Zend/Filter/Decompress.php b/lib/internal/Zend/Filter/Decompress.php similarity index 100% rename from lib/Zend/Filter/Decompress.php rename to lib/internal/Zend/Filter/Decompress.php diff --git a/lib/Zend/Filter/Decrypt.php b/lib/internal/Zend/Filter/Decrypt.php similarity index 100% rename from lib/Zend/Filter/Decrypt.php rename to lib/internal/Zend/Filter/Decrypt.php diff --git a/lib/Zend/Filter/Digits.php b/lib/internal/Zend/Filter/Digits.php similarity index 100% rename from lib/Zend/Filter/Digits.php rename to lib/internal/Zend/Filter/Digits.php diff --git a/lib/Zend/Filter/Dir.php b/lib/internal/Zend/Filter/Dir.php similarity index 100% rename from lib/Zend/Filter/Dir.php rename to lib/internal/Zend/Filter/Dir.php diff --git a/lib/Zend/Filter/Encrypt.php b/lib/internal/Zend/Filter/Encrypt.php similarity index 100% rename from lib/Zend/Filter/Encrypt.php rename to lib/internal/Zend/Filter/Encrypt.php diff --git a/lib/Zend/Filter/Encrypt/Interface.php b/lib/internal/Zend/Filter/Encrypt/Interface.php similarity index 100% rename from lib/Zend/Filter/Encrypt/Interface.php rename to lib/internal/Zend/Filter/Encrypt/Interface.php diff --git a/lib/Zend/Filter/Encrypt/Mcrypt.php b/lib/internal/Zend/Filter/Encrypt/Mcrypt.php similarity index 100% rename from lib/Zend/Filter/Encrypt/Mcrypt.php rename to lib/internal/Zend/Filter/Encrypt/Mcrypt.php diff --git a/lib/Zend/Filter/Encrypt/Openssl.php b/lib/internal/Zend/Filter/Encrypt/Openssl.php similarity index 100% rename from lib/Zend/Filter/Encrypt/Openssl.php rename to lib/internal/Zend/Filter/Encrypt/Openssl.php diff --git a/lib/Zend/Filter/Exception.php b/lib/internal/Zend/Filter/Exception.php similarity index 100% rename from lib/Zend/Filter/Exception.php rename to lib/internal/Zend/Filter/Exception.php diff --git a/lib/Zend/Filter/File/Decrypt.php b/lib/internal/Zend/Filter/File/Decrypt.php similarity index 100% rename from lib/Zend/Filter/File/Decrypt.php rename to lib/internal/Zend/Filter/File/Decrypt.php diff --git a/lib/Zend/Filter/File/Encrypt.php b/lib/internal/Zend/Filter/File/Encrypt.php similarity index 100% rename from lib/Zend/Filter/File/Encrypt.php rename to lib/internal/Zend/Filter/File/Encrypt.php diff --git a/lib/Zend/Filter/File/LowerCase.php b/lib/internal/Zend/Filter/File/LowerCase.php similarity index 100% rename from lib/Zend/Filter/File/LowerCase.php rename to lib/internal/Zend/Filter/File/LowerCase.php diff --git a/lib/Zend/Filter/File/Rename.php b/lib/internal/Zend/Filter/File/Rename.php similarity index 100% rename from lib/Zend/Filter/File/Rename.php rename to lib/internal/Zend/Filter/File/Rename.php diff --git a/lib/Zend/Filter/File/UpperCase.php b/lib/internal/Zend/Filter/File/UpperCase.php similarity index 100% rename from lib/Zend/Filter/File/UpperCase.php rename to lib/internal/Zend/Filter/File/UpperCase.php diff --git a/lib/Zend/Filter/HtmlEntities.php b/lib/internal/Zend/Filter/HtmlEntities.php similarity index 100% rename from lib/Zend/Filter/HtmlEntities.php rename to lib/internal/Zend/Filter/HtmlEntities.php diff --git a/lib/Zend/Filter/Inflector.php b/lib/internal/Zend/Filter/Inflector.php similarity index 100% rename from lib/Zend/Filter/Inflector.php rename to lib/internal/Zend/Filter/Inflector.php diff --git a/lib/Zend/Filter/Input.php b/lib/internal/Zend/Filter/Input.php similarity index 100% rename from lib/Zend/Filter/Input.php rename to lib/internal/Zend/Filter/Input.php diff --git a/lib/Zend/Filter/Int.php b/lib/internal/Zend/Filter/Int.php similarity index 100% rename from lib/Zend/Filter/Int.php rename to lib/internal/Zend/Filter/Int.php diff --git a/lib/Zend/Filter/Interface.php b/lib/internal/Zend/Filter/Interface.php similarity index 100% rename from lib/Zend/Filter/Interface.php rename to lib/internal/Zend/Filter/Interface.php diff --git a/lib/Zend/Filter/LocalizedToNormalized.php b/lib/internal/Zend/Filter/LocalizedToNormalized.php similarity index 100% rename from lib/Zend/Filter/LocalizedToNormalized.php rename to lib/internal/Zend/Filter/LocalizedToNormalized.php diff --git a/lib/Zend/Filter/NormalizedToLocalized.php b/lib/internal/Zend/Filter/NormalizedToLocalized.php similarity index 100% rename from lib/Zend/Filter/NormalizedToLocalized.php rename to lib/internal/Zend/Filter/NormalizedToLocalized.php diff --git a/lib/Zend/Filter/Null.php b/lib/internal/Zend/Filter/Null.php similarity index 100% rename from lib/Zend/Filter/Null.php rename to lib/internal/Zend/Filter/Null.php diff --git a/lib/Zend/Filter/PregReplace.php b/lib/internal/Zend/Filter/PregReplace.php similarity index 100% rename from lib/Zend/Filter/PregReplace.php rename to lib/internal/Zend/Filter/PregReplace.php diff --git a/lib/Zend/Filter/RealPath.php b/lib/internal/Zend/Filter/RealPath.php similarity index 100% rename from lib/Zend/Filter/RealPath.php rename to lib/internal/Zend/Filter/RealPath.php diff --git a/lib/Zend/Filter/StringToLower.php b/lib/internal/Zend/Filter/StringToLower.php similarity index 100% rename from lib/Zend/Filter/StringToLower.php rename to lib/internal/Zend/Filter/StringToLower.php diff --git a/lib/Zend/Filter/StringToUpper.php b/lib/internal/Zend/Filter/StringToUpper.php similarity index 100% rename from lib/Zend/Filter/StringToUpper.php rename to lib/internal/Zend/Filter/StringToUpper.php diff --git a/lib/Zend/Filter/StringTrim.php b/lib/internal/Zend/Filter/StringTrim.php similarity index 100% rename from lib/Zend/Filter/StringTrim.php rename to lib/internal/Zend/Filter/StringTrim.php diff --git a/lib/Zend/Filter/StripNewlines.php b/lib/internal/Zend/Filter/StripNewlines.php similarity index 100% rename from lib/Zend/Filter/StripNewlines.php rename to lib/internal/Zend/Filter/StripNewlines.php diff --git a/lib/Zend/Filter/StripTags.php b/lib/internal/Zend/Filter/StripTags.php similarity index 100% rename from lib/Zend/Filter/StripTags.php rename to lib/internal/Zend/Filter/StripTags.php diff --git a/lib/Zend/Filter/Word/CamelCaseToDash.php b/lib/internal/Zend/Filter/Word/CamelCaseToDash.php similarity index 100% rename from lib/Zend/Filter/Word/CamelCaseToDash.php rename to lib/internal/Zend/Filter/Word/CamelCaseToDash.php diff --git a/lib/Zend/Filter/Word/CamelCaseToSeparator.php b/lib/internal/Zend/Filter/Word/CamelCaseToSeparator.php similarity index 100% rename from lib/Zend/Filter/Word/CamelCaseToSeparator.php rename to lib/internal/Zend/Filter/Word/CamelCaseToSeparator.php diff --git a/lib/Zend/Filter/Word/CamelCaseToUnderscore.php b/lib/internal/Zend/Filter/Word/CamelCaseToUnderscore.php similarity index 100% rename from lib/Zend/Filter/Word/CamelCaseToUnderscore.php rename to lib/internal/Zend/Filter/Word/CamelCaseToUnderscore.php diff --git a/lib/Zend/Filter/Word/DashToCamelCase.php b/lib/internal/Zend/Filter/Word/DashToCamelCase.php similarity index 100% rename from lib/Zend/Filter/Word/DashToCamelCase.php rename to lib/internal/Zend/Filter/Word/DashToCamelCase.php diff --git a/lib/Zend/Filter/Word/DashToSeparator.php b/lib/internal/Zend/Filter/Word/DashToSeparator.php similarity index 100% rename from lib/Zend/Filter/Word/DashToSeparator.php rename to lib/internal/Zend/Filter/Word/DashToSeparator.php diff --git a/lib/Zend/Filter/Word/DashToUnderscore.php b/lib/internal/Zend/Filter/Word/DashToUnderscore.php similarity index 100% rename from lib/Zend/Filter/Word/DashToUnderscore.php rename to lib/internal/Zend/Filter/Word/DashToUnderscore.php diff --git a/lib/Zend/Filter/Word/Separator/Abstract.php b/lib/internal/Zend/Filter/Word/Separator/Abstract.php similarity index 100% rename from lib/Zend/Filter/Word/Separator/Abstract.php rename to lib/internal/Zend/Filter/Word/Separator/Abstract.php diff --git a/lib/Zend/Filter/Word/SeparatorToCamelCase.php b/lib/internal/Zend/Filter/Word/SeparatorToCamelCase.php similarity index 100% rename from lib/Zend/Filter/Word/SeparatorToCamelCase.php rename to lib/internal/Zend/Filter/Word/SeparatorToCamelCase.php diff --git a/lib/Zend/Filter/Word/SeparatorToDash.php b/lib/internal/Zend/Filter/Word/SeparatorToDash.php similarity index 100% rename from lib/Zend/Filter/Word/SeparatorToDash.php rename to lib/internal/Zend/Filter/Word/SeparatorToDash.php diff --git a/lib/Zend/Filter/Word/SeparatorToSeparator.php b/lib/internal/Zend/Filter/Word/SeparatorToSeparator.php similarity index 100% rename from lib/Zend/Filter/Word/SeparatorToSeparator.php rename to lib/internal/Zend/Filter/Word/SeparatorToSeparator.php diff --git a/lib/Zend/Filter/Word/UnderscoreToCamelCase.php b/lib/internal/Zend/Filter/Word/UnderscoreToCamelCase.php similarity index 100% rename from lib/Zend/Filter/Word/UnderscoreToCamelCase.php rename to lib/internal/Zend/Filter/Word/UnderscoreToCamelCase.php diff --git a/lib/Zend/Filter/Word/UnderscoreToDash.php b/lib/internal/Zend/Filter/Word/UnderscoreToDash.php similarity index 100% rename from lib/Zend/Filter/Word/UnderscoreToDash.php rename to lib/internal/Zend/Filter/Word/UnderscoreToDash.php diff --git a/lib/Zend/Filter/Word/UnderscoreToSeparator.php b/lib/internal/Zend/Filter/Word/UnderscoreToSeparator.php similarity index 100% rename from lib/Zend/Filter/Word/UnderscoreToSeparator.php rename to lib/internal/Zend/Filter/Word/UnderscoreToSeparator.php diff --git a/lib/Zend/Form.php b/lib/internal/Zend/Form.php similarity index 100% rename from lib/Zend/Form.php rename to lib/internal/Zend/Form.php diff --git a/lib/Zend/Form/Decorator/Abstract.php b/lib/internal/Zend/Form/Decorator/Abstract.php similarity index 100% rename from lib/Zend/Form/Decorator/Abstract.php rename to lib/internal/Zend/Form/Decorator/Abstract.php diff --git a/lib/Zend/Form/Decorator/Callback.php b/lib/internal/Zend/Form/Decorator/Callback.php similarity index 100% rename from lib/Zend/Form/Decorator/Callback.php rename to lib/internal/Zend/Form/Decorator/Callback.php diff --git a/lib/Zend/Form/Decorator/Captcha.php b/lib/internal/Zend/Form/Decorator/Captcha.php similarity index 100% rename from lib/Zend/Form/Decorator/Captcha.php rename to lib/internal/Zend/Form/Decorator/Captcha.php diff --git a/lib/Zend/Form/Decorator/Captcha/Word.php b/lib/internal/Zend/Form/Decorator/Captcha/Word.php similarity index 100% rename from lib/Zend/Form/Decorator/Captcha/Word.php rename to lib/internal/Zend/Form/Decorator/Captcha/Word.php diff --git a/lib/Zend/Form/Decorator/Description.php b/lib/internal/Zend/Form/Decorator/Description.php similarity index 100% rename from lib/Zend/Form/Decorator/Description.php rename to lib/internal/Zend/Form/Decorator/Description.php diff --git a/lib/Zend/Form/Decorator/DtDdWrapper.php b/lib/internal/Zend/Form/Decorator/DtDdWrapper.php similarity index 100% rename from lib/Zend/Form/Decorator/DtDdWrapper.php rename to lib/internal/Zend/Form/Decorator/DtDdWrapper.php diff --git a/lib/Zend/Form/Decorator/Errors.php b/lib/internal/Zend/Form/Decorator/Errors.php similarity index 100% rename from lib/Zend/Form/Decorator/Errors.php rename to lib/internal/Zend/Form/Decorator/Errors.php diff --git a/lib/Zend/Form/Decorator/Exception.php b/lib/internal/Zend/Form/Decorator/Exception.php similarity index 100% rename from lib/Zend/Form/Decorator/Exception.php rename to lib/internal/Zend/Form/Decorator/Exception.php diff --git a/lib/Zend/Form/Decorator/Fieldset.php b/lib/internal/Zend/Form/Decorator/Fieldset.php similarity index 100% rename from lib/Zend/Form/Decorator/Fieldset.php rename to lib/internal/Zend/Form/Decorator/Fieldset.php diff --git a/lib/Zend/Form/Decorator/File.php b/lib/internal/Zend/Form/Decorator/File.php similarity index 100% rename from lib/Zend/Form/Decorator/File.php rename to lib/internal/Zend/Form/Decorator/File.php diff --git a/lib/Zend/Form/Decorator/Form.php b/lib/internal/Zend/Form/Decorator/Form.php similarity index 100% rename from lib/Zend/Form/Decorator/Form.php rename to lib/internal/Zend/Form/Decorator/Form.php diff --git a/lib/Zend/Form/Decorator/FormElements.php b/lib/internal/Zend/Form/Decorator/FormElements.php similarity index 100% rename from lib/Zend/Form/Decorator/FormElements.php rename to lib/internal/Zend/Form/Decorator/FormElements.php diff --git a/lib/Zend/Form/Decorator/FormErrors.php b/lib/internal/Zend/Form/Decorator/FormErrors.php similarity index 100% rename from lib/Zend/Form/Decorator/FormErrors.php rename to lib/internal/Zend/Form/Decorator/FormErrors.php diff --git a/lib/Zend/Form/Decorator/HtmlTag.php b/lib/internal/Zend/Form/Decorator/HtmlTag.php similarity index 100% rename from lib/Zend/Form/Decorator/HtmlTag.php rename to lib/internal/Zend/Form/Decorator/HtmlTag.php diff --git a/lib/Zend/Form/Decorator/Image.php b/lib/internal/Zend/Form/Decorator/Image.php similarity index 100% rename from lib/Zend/Form/Decorator/Image.php rename to lib/internal/Zend/Form/Decorator/Image.php diff --git a/lib/Zend/Form/Decorator/Interface.php b/lib/internal/Zend/Form/Decorator/Interface.php similarity index 100% rename from lib/Zend/Form/Decorator/Interface.php rename to lib/internal/Zend/Form/Decorator/Interface.php diff --git a/lib/Zend/Form/Decorator/Label.php b/lib/internal/Zend/Form/Decorator/Label.php similarity index 100% rename from lib/Zend/Form/Decorator/Label.php rename to lib/internal/Zend/Form/Decorator/Label.php diff --git a/lib/Zend/Form/Decorator/Marker/File/Interface.php b/lib/internal/Zend/Form/Decorator/Marker/File/Interface.php similarity index 100% rename from lib/Zend/Form/Decorator/Marker/File/Interface.php rename to lib/internal/Zend/Form/Decorator/Marker/File/Interface.php diff --git a/lib/Zend/Form/Decorator/PrepareElements.php b/lib/internal/Zend/Form/Decorator/PrepareElements.php similarity index 100% rename from lib/Zend/Form/Decorator/PrepareElements.php rename to lib/internal/Zend/Form/Decorator/PrepareElements.php diff --git a/lib/Zend/Form/Decorator/Tooltip.php b/lib/internal/Zend/Form/Decorator/Tooltip.php similarity index 100% rename from lib/Zend/Form/Decorator/Tooltip.php rename to lib/internal/Zend/Form/Decorator/Tooltip.php diff --git a/lib/Zend/Form/Decorator/ViewHelper.php b/lib/internal/Zend/Form/Decorator/ViewHelper.php similarity index 100% rename from lib/Zend/Form/Decorator/ViewHelper.php rename to lib/internal/Zend/Form/Decorator/ViewHelper.php diff --git a/lib/Zend/Form/Decorator/ViewScript.php b/lib/internal/Zend/Form/Decorator/ViewScript.php similarity index 100% rename from lib/Zend/Form/Decorator/ViewScript.php rename to lib/internal/Zend/Form/Decorator/ViewScript.php diff --git a/lib/Zend/Form/DisplayGroup.php b/lib/internal/Zend/Form/DisplayGroup.php similarity index 100% rename from lib/Zend/Form/DisplayGroup.php rename to lib/internal/Zend/Form/DisplayGroup.php diff --git a/lib/Zend/Form/Element.php b/lib/internal/Zend/Form/Element.php similarity index 100% rename from lib/Zend/Form/Element.php rename to lib/internal/Zend/Form/Element.php diff --git a/lib/Zend/Form/Element/Button.php b/lib/internal/Zend/Form/Element/Button.php similarity index 100% rename from lib/Zend/Form/Element/Button.php rename to lib/internal/Zend/Form/Element/Button.php diff --git a/lib/Zend/Form/Element/Captcha.php b/lib/internal/Zend/Form/Element/Captcha.php similarity index 100% rename from lib/Zend/Form/Element/Captcha.php rename to lib/internal/Zend/Form/Element/Captcha.php diff --git a/lib/Zend/Form/Element/Checkbox.php b/lib/internal/Zend/Form/Element/Checkbox.php similarity index 100% rename from lib/Zend/Form/Element/Checkbox.php rename to lib/internal/Zend/Form/Element/Checkbox.php diff --git a/lib/Zend/Form/Element/Exception.php b/lib/internal/Zend/Form/Element/Exception.php similarity index 100% rename from lib/Zend/Form/Element/Exception.php rename to lib/internal/Zend/Form/Element/Exception.php diff --git a/lib/Zend/Form/Element/File.php b/lib/internal/Zend/Form/Element/File.php similarity index 100% rename from lib/Zend/Form/Element/File.php rename to lib/internal/Zend/Form/Element/File.php diff --git a/lib/Zend/Form/Element/Hash.php b/lib/internal/Zend/Form/Element/Hash.php similarity index 100% rename from lib/Zend/Form/Element/Hash.php rename to lib/internal/Zend/Form/Element/Hash.php diff --git a/lib/Zend/Form/Element/Hidden.php b/lib/internal/Zend/Form/Element/Hidden.php similarity index 100% rename from lib/Zend/Form/Element/Hidden.php rename to lib/internal/Zend/Form/Element/Hidden.php diff --git a/lib/Zend/Form/Element/Image.php b/lib/internal/Zend/Form/Element/Image.php similarity index 100% rename from lib/Zend/Form/Element/Image.php rename to lib/internal/Zend/Form/Element/Image.php diff --git a/lib/Zend/Form/Element/Multi.php b/lib/internal/Zend/Form/Element/Multi.php similarity index 100% rename from lib/Zend/Form/Element/Multi.php rename to lib/internal/Zend/Form/Element/Multi.php diff --git a/lib/Zend/Form/Element/MultiCheckbox.php b/lib/internal/Zend/Form/Element/MultiCheckbox.php similarity index 100% rename from lib/Zend/Form/Element/MultiCheckbox.php rename to lib/internal/Zend/Form/Element/MultiCheckbox.php diff --git a/lib/Zend/Form/Element/Multiselect.php b/lib/internal/Zend/Form/Element/Multiselect.php similarity index 100% rename from lib/Zend/Form/Element/Multiselect.php rename to lib/internal/Zend/Form/Element/Multiselect.php diff --git a/lib/Zend/Form/Element/Password.php b/lib/internal/Zend/Form/Element/Password.php similarity index 100% rename from lib/Zend/Form/Element/Password.php rename to lib/internal/Zend/Form/Element/Password.php diff --git a/lib/Zend/Form/Element/Radio.php b/lib/internal/Zend/Form/Element/Radio.php similarity index 100% rename from lib/Zend/Form/Element/Radio.php rename to lib/internal/Zend/Form/Element/Radio.php diff --git a/lib/Zend/Form/Element/Reset.php b/lib/internal/Zend/Form/Element/Reset.php similarity index 100% rename from lib/Zend/Form/Element/Reset.php rename to lib/internal/Zend/Form/Element/Reset.php diff --git a/lib/Zend/Form/Element/Select.php b/lib/internal/Zend/Form/Element/Select.php similarity index 100% rename from lib/Zend/Form/Element/Select.php rename to lib/internal/Zend/Form/Element/Select.php diff --git a/lib/Zend/Form/Element/Submit.php b/lib/internal/Zend/Form/Element/Submit.php similarity index 100% rename from lib/Zend/Form/Element/Submit.php rename to lib/internal/Zend/Form/Element/Submit.php diff --git a/lib/Zend/Form/Element/Text.php b/lib/internal/Zend/Form/Element/Text.php similarity index 100% rename from lib/Zend/Form/Element/Text.php rename to lib/internal/Zend/Form/Element/Text.php diff --git a/lib/Zend/Form/Element/Textarea.php b/lib/internal/Zend/Form/Element/Textarea.php similarity index 100% rename from lib/Zend/Form/Element/Textarea.php rename to lib/internal/Zend/Form/Element/Textarea.php diff --git a/lib/Zend/Form/Element/Xhtml.php b/lib/internal/Zend/Form/Element/Xhtml.php similarity index 100% rename from lib/Zend/Form/Element/Xhtml.php rename to lib/internal/Zend/Form/Element/Xhtml.php diff --git a/lib/Zend/Form/Exception.php b/lib/internal/Zend/Form/Exception.php similarity index 100% rename from lib/Zend/Form/Exception.php rename to lib/internal/Zend/Form/Exception.php diff --git a/lib/Zend/Form/SubForm.php b/lib/internal/Zend/Form/SubForm.php similarity index 100% rename from lib/Zend/Form/SubForm.php rename to lib/internal/Zend/Form/SubForm.php diff --git a/lib/Zend/Gdata.php b/lib/internal/Zend/Gdata.php similarity index 100% rename from lib/Zend/Gdata.php rename to lib/internal/Zend/Gdata.php diff --git a/lib/Zend/Gdata/App.php b/lib/internal/Zend/Gdata/App.php similarity index 100% rename from lib/Zend/Gdata/App.php rename to lib/internal/Zend/Gdata/App.php diff --git a/lib/Zend/Gdata/App/AuthException.php b/lib/internal/Zend/Gdata/App/AuthException.php similarity index 100% rename from lib/Zend/Gdata/App/AuthException.php rename to lib/internal/Zend/Gdata/App/AuthException.php diff --git a/lib/Zend/Gdata/App/BadMethodCallException.php b/lib/internal/Zend/Gdata/App/BadMethodCallException.php similarity index 100% rename from lib/Zend/Gdata/App/BadMethodCallException.php rename to lib/internal/Zend/Gdata/App/BadMethodCallException.php diff --git a/lib/Zend/Gdata/App/Base.php b/lib/internal/Zend/Gdata/App/Base.php similarity index 100% rename from lib/Zend/Gdata/App/Base.php rename to lib/internal/Zend/Gdata/App/Base.php diff --git a/lib/Zend/Gdata/App/BaseMediaSource.php b/lib/internal/Zend/Gdata/App/BaseMediaSource.php similarity index 100% rename from lib/Zend/Gdata/App/BaseMediaSource.php rename to lib/internal/Zend/Gdata/App/BaseMediaSource.php diff --git a/lib/Zend/Gdata/App/CaptchaRequiredException.php b/lib/internal/Zend/Gdata/App/CaptchaRequiredException.php similarity index 100% rename from lib/Zend/Gdata/App/CaptchaRequiredException.php rename to lib/internal/Zend/Gdata/App/CaptchaRequiredException.php diff --git a/lib/Zend/Gdata/App/Entry.php b/lib/internal/Zend/Gdata/App/Entry.php similarity index 100% rename from lib/Zend/Gdata/App/Entry.php rename to lib/internal/Zend/Gdata/App/Entry.php diff --git a/lib/Zend/Gdata/App/Exception.php b/lib/internal/Zend/Gdata/App/Exception.php similarity index 100% rename from lib/Zend/Gdata/App/Exception.php rename to lib/internal/Zend/Gdata/App/Exception.php diff --git a/lib/Zend/Gdata/App/Extension.php b/lib/internal/Zend/Gdata/App/Extension.php similarity index 100% rename from lib/Zend/Gdata/App/Extension.php rename to lib/internal/Zend/Gdata/App/Extension.php diff --git a/lib/Zend/Gdata/App/Extension/Author.php b/lib/internal/Zend/Gdata/App/Extension/Author.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Author.php rename to lib/internal/Zend/Gdata/App/Extension/Author.php diff --git a/lib/Zend/Gdata/App/Extension/Category.php b/lib/internal/Zend/Gdata/App/Extension/Category.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Category.php rename to lib/internal/Zend/Gdata/App/Extension/Category.php diff --git a/lib/Zend/Gdata/App/Extension/Content.php b/lib/internal/Zend/Gdata/App/Extension/Content.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Content.php rename to lib/internal/Zend/Gdata/App/Extension/Content.php diff --git a/lib/Zend/Gdata/App/Extension/Contributor.php b/lib/internal/Zend/Gdata/App/Extension/Contributor.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Contributor.php rename to lib/internal/Zend/Gdata/App/Extension/Contributor.php diff --git a/lib/Zend/Gdata/App/Extension/Control.php b/lib/internal/Zend/Gdata/App/Extension/Control.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Control.php rename to lib/internal/Zend/Gdata/App/Extension/Control.php diff --git a/lib/Zend/Gdata/App/Extension/Draft.php b/lib/internal/Zend/Gdata/App/Extension/Draft.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Draft.php rename to lib/internal/Zend/Gdata/App/Extension/Draft.php diff --git a/lib/Zend/Gdata/App/Extension/Edited.php b/lib/internal/Zend/Gdata/App/Extension/Edited.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Edited.php rename to lib/internal/Zend/Gdata/App/Extension/Edited.php diff --git a/lib/Zend/Gdata/App/Extension/Element.php b/lib/internal/Zend/Gdata/App/Extension/Element.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Element.php rename to lib/internal/Zend/Gdata/App/Extension/Element.php diff --git a/lib/Zend/Gdata/App/Extension/Email.php b/lib/internal/Zend/Gdata/App/Extension/Email.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Email.php rename to lib/internal/Zend/Gdata/App/Extension/Email.php diff --git a/lib/Zend/Gdata/App/Extension/Generator.php b/lib/internal/Zend/Gdata/App/Extension/Generator.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Generator.php rename to lib/internal/Zend/Gdata/App/Extension/Generator.php diff --git a/lib/Zend/Gdata/App/Extension/Icon.php b/lib/internal/Zend/Gdata/App/Extension/Icon.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Icon.php rename to lib/internal/Zend/Gdata/App/Extension/Icon.php diff --git a/lib/Zend/Gdata/App/Extension/Id.php b/lib/internal/Zend/Gdata/App/Extension/Id.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Id.php rename to lib/internal/Zend/Gdata/App/Extension/Id.php diff --git a/lib/Zend/Gdata/App/Extension/Link.php b/lib/internal/Zend/Gdata/App/Extension/Link.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Link.php rename to lib/internal/Zend/Gdata/App/Extension/Link.php diff --git a/lib/Zend/Gdata/App/Extension/Logo.php b/lib/internal/Zend/Gdata/App/Extension/Logo.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Logo.php rename to lib/internal/Zend/Gdata/App/Extension/Logo.php diff --git a/lib/Zend/Gdata/App/Extension/Name.php b/lib/internal/Zend/Gdata/App/Extension/Name.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Name.php rename to lib/internal/Zend/Gdata/App/Extension/Name.php diff --git a/lib/Zend/Gdata/App/Extension/Person.php b/lib/internal/Zend/Gdata/App/Extension/Person.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Person.php rename to lib/internal/Zend/Gdata/App/Extension/Person.php diff --git a/lib/Zend/Gdata/App/Extension/Published.php b/lib/internal/Zend/Gdata/App/Extension/Published.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Published.php rename to lib/internal/Zend/Gdata/App/Extension/Published.php diff --git a/lib/Zend/Gdata/App/Extension/Rights.php b/lib/internal/Zend/Gdata/App/Extension/Rights.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Rights.php rename to lib/internal/Zend/Gdata/App/Extension/Rights.php diff --git a/lib/Zend/Gdata/App/Extension/Source.php b/lib/internal/Zend/Gdata/App/Extension/Source.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Source.php rename to lib/internal/Zend/Gdata/App/Extension/Source.php diff --git a/lib/Zend/Gdata/App/Extension/Subtitle.php b/lib/internal/Zend/Gdata/App/Extension/Subtitle.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Subtitle.php rename to lib/internal/Zend/Gdata/App/Extension/Subtitle.php diff --git a/lib/Zend/Gdata/App/Extension/Summary.php b/lib/internal/Zend/Gdata/App/Extension/Summary.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Summary.php rename to lib/internal/Zend/Gdata/App/Extension/Summary.php diff --git a/lib/Zend/Gdata/App/Extension/Text.php b/lib/internal/Zend/Gdata/App/Extension/Text.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Text.php rename to lib/internal/Zend/Gdata/App/Extension/Text.php diff --git a/lib/Zend/Gdata/App/Extension/Title.php b/lib/internal/Zend/Gdata/App/Extension/Title.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Title.php rename to lib/internal/Zend/Gdata/App/Extension/Title.php diff --git a/lib/Zend/Gdata/App/Extension/Updated.php b/lib/internal/Zend/Gdata/App/Extension/Updated.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Updated.php rename to lib/internal/Zend/Gdata/App/Extension/Updated.php diff --git a/lib/Zend/Gdata/App/Extension/Uri.php b/lib/internal/Zend/Gdata/App/Extension/Uri.php similarity index 100% rename from lib/Zend/Gdata/App/Extension/Uri.php rename to lib/internal/Zend/Gdata/App/Extension/Uri.php diff --git a/lib/Zend/Gdata/App/Feed.php b/lib/internal/Zend/Gdata/App/Feed.php similarity index 100% rename from lib/Zend/Gdata/App/Feed.php rename to lib/internal/Zend/Gdata/App/Feed.php diff --git a/lib/Zend/Gdata/App/FeedEntryParent.php b/lib/internal/Zend/Gdata/App/FeedEntryParent.php similarity index 100% rename from lib/Zend/Gdata/App/FeedEntryParent.php rename to lib/internal/Zend/Gdata/App/FeedEntryParent.php diff --git a/lib/Zend/Gdata/App/FeedSourceParent.php b/lib/internal/Zend/Gdata/App/FeedSourceParent.php similarity index 100% rename from lib/Zend/Gdata/App/FeedSourceParent.php rename to lib/internal/Zend/Gdata/App/FeedSourceParent.php diff --git a/lib/Zend/Gdata/App/HttpException.php b/lib/internal/Zend/Gdata/App/HttpException.php similarity index 100% rename from lib/Zend/Gdata/App/HttpException.php rename to lib/internal/Zend/Gdata/App/HttpException.php diff --git a/lib/Zend/Gdata/App/IOException.php b/lib/internal/Zend/Gdata/App/IOException.php similarity index 100% rename from lib/Zend/Gdata/App/IOException.php rename to lib/internal/Zend/Gdata/App/IOException.php diff --git a/lib/Zend/Gdata/App/InvalidArgumentException.php b/lib/internal/Zend/Gdata/App/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Gdata/App/InvalidArgumentException.php rename to lib/internal/Zend/Gdata/App/InvalidArgumentException.php diff --git a/lib/Zend/Gdata/App/LoggingHttpClientAdapterSocket.php b/lib/internal/Zend/Gdata/App/LoggingHttpClientAdapterSocket.php similarity index 100% rename from lib/Zend/Gdata/App/LoggingHttpClientAdapterSocket.php rename to lib/internal/Zend/Gdata/App/LoggingHttpClientAdapterSocket.php diff --git a/lib/Zend/Gdata/App/MediaEntry.php b/lib/internal/Zend/Gdata/App/MediaEntry.php similarity index 100% rename from lib/Zend/Gdata/App/MediaEntry.php rename to lib/internal/Zend/Gdata/App/MediaEntry.php diff --git a/lib/Zend/Gdata/App/MediaFileSource.php b/lib/internal/Zend/Gdata/App/MediaFileSource.php similarity index 100% rename from lib/Zend/Gdata/App/MediaFileSource.php rename to lib/internal/Zend/Gdata/App/MediaFileSource.php diff --git a/lib/Zend/Gdata/App/MediaSource.php b/lib/internal/Zend/Gdata/App/MediaSource.php similarity index 100% rename from lib/Zend/Gdata/App/MediaSource.php rename to lib/internal/Zend/Gdata/App/MediaSource.php diff --git a/lib/Zend/Gdata/App/Util.php b/lib/internal/Zend/Gdata/App/Util.php similarity index 100% rename from lib/Zend/Gdata/App/Util.php rename to lib/internal/Zend/Gdata/App/Util.php diff --git a/lib/Zend/Gdata/App/VersionException.php b/lib/internal/Zend/Gdata/App/VersionException.php similarity index 100% rename from lib/Zend/Gdata/App/VersionException.php rename to lib/internal/Zend/Gdata/App/VersionException.php diff --git a/lib/Zend/Gdata/AuthSub.php b/lib/internal/Zend/Gdata/AuthSub.php similarity index 100% rename from lib/Zend/Gdata/AuthSub.php rename to lib/internal/Zend/Gdata/AuthSub.php diff --git a/lib/Zend/Gdata/Books.php b/lib/internal/Zend/Gdata/Books.php similarity index 100% rename from lib/Zend/Gdata/Books.php rename to lib/internal/Zend/Gdata/Books.php diff --git a/lib/Zend/Gdata/Books/CollectionEntry.php b/lib/internal/Zend/Gdata/Books/CollectionEntry.php similarity index 100% rename from lib/Zend/Gdata/Books/CollectionEntry.php rename to lib/internal/Zend/Gdata/Books/CollectionEntry.php diff --git a/lib/Zend/Gdata/Books/CollectionFeed.php b/lib/internal/Zend/Gdata/Books/CollectionFeed.php similarity index 100% rename from lib/Zend/Gdata/Books/CollectionFeed.php rename to lib/internal/Zend/Gdata/Books/CollectionFeed.php diff --git a/lib/Zend/Gdata/Books/Extension/AnnotationLink.php b/lib/internal/Zend/Gdata/Books/Extension/AnnotationLink.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/AnnotationLink.php rename to lib/internal/Zend/Gdata/Books/Extension/AnnotationLink.php diff --git a/lib/Zend/Gdata/Books/Extension/BooksCategory.php b/lib/internal/Zend/Gdata/Books/Extension/BooksCategory.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/BooksCategory.php rename to lib/internal/Zend/Gdata/Books/Extension/BooksCategory.php diff --git a/lib/Zend/Gdata/Books/Extension/BooksLink.php b/lib/internal/Zend/Gdata/Books/Extension/BooksLink.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/BooksLink.php rename to lib/internal/Zend/Gdata/Books/Extension/BooksLink.php diff --git a/lib/Zend/Gdata/Books/Extension/Embeddability.php b/lib/internal/Zend/Gdata/Books/Extension/Embeddability.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/Embeddability.php rename to lib/internal/Zend/Gdata/Books/Extension/Embeddability.php diff --git a/lib/Zend/Gdata/Books/Extension/InfoLink.php b/lib/internal/Zend/Gdata/Books/Extension/InfoLink.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/InfoLink.php rename to lib/internal/Zend/Gdata/Books/Extension/InfoLink.php diff --git a/lib/Zend/Gdata/Books/Extension/PreviewLink.php b/lib/internal/Zend/Gdata/Books/Extension/PreviewLink.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/PreviewLink.php rename to lib/internal/Zend/Gdata/Books/Extension/PreviewLink.php diff --git a/lib/Zend/Gdata/Books/Extension/Review.php b/lib/internal/Zend/Gdata/Books/Extension/Review.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/Review.php rename to lib/internal/Zend/Gdata/Books/Extension/Review.php diff --git a/lib/Zend/Gdata/Books/Extension/ThumbnailLink.php b/lib/internal/Zend/Gdata/Books/Extension/ThumbnailLink.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/ThumbnailLink.php rename to lib/internal/Zend/Gdata/Books/Extension/ThumbnailLink.php diff --git a/lib/Zend/Gdata/Books/Extension/Viewability.php b/lib/internal/Zend/Gdata/Books/Extension/Viewability.php similarity index 100% rename from lib/Zend/Gdata/Books/Extension/Viewability.php rename to lib/internal/Zend/Gdata/Books/Extension/Viewability.php diff --git a/lib/Zend/Gdata/Books/VolumeEntry.php b/lib/internal/Zend/Gdata/Books/VolumeEntry.php similarity index 100% rename from lib/Zend/Gdata/Books/VolumeEntry.php rename to lib/internal/Zend/Gdata/Books/VolumeEntry.php diff --git a/lib/Zend/Gdata/Books/VolumeFeed.php b/lib/internal/Zend/Gdata/Books/VolumeFeed.php similarity index 100% rename from lib/Zend/Gdata/Books/VolumeFeed.php rename to lib/internal/Zend/Gdata/Books/VolumeFeed.php diff --git a/lib/Zend/Gdata/Books/VolumeQuery.php b/lib/internal/Zend/Gdata/Books/VolumeQuery.php similarity index 100% rename from lib/Zend/Gdata/Books/VolumeQuery.php rename to lib/internal/Zend/Gdata/Books/VolumeQuery.php diff --git a/lib/Zend/Gdata/Calendar.php b/lib/internal/Zend/Gdata/Calendar.php similarity index 100% rename from lib/Zend/Gdata/Calendar.php rename to lib/internal/Zend/Gdata/Calendar.php diff --git a/lib/Zend/Gdata/Calendar/EventEntry.php b/lib/internal/Zend/Gdata/Calendar/EventEntry.php similarity index 100% rename from lib/Zend/Gdata/Calendar/EventEntry.php rename to lib/internal/Zend/Gdata/Calendar/EventEntry.php diff --git a/lib/Zend/Gdata/Calendar/EventFeed.php b/lib/internal/Zend/Gdata/Calendar/EventFeed.php similarity index 100% rename from lib/Zend/Gdata/Calendar/EventFeed.php rename to lib/internal/Zend/Gdata/Calendar/EventFeed.php diff --git a/lib/Zend/Gdata/Calendar/EventQuery.php b/lib/internal/Zend/Gdata/Calendar/EventQuery.php similarity index 100% rename from lib/Zend/Gdata/Calendar/EventQuery.php rename to lib/internal/Zend/Gdata/Calendar/EventQuery.php diff --git a/lib/Zend/Gdata/Calendar/Extension/AccessLevel.php b/lib/internal/Zend/Gdata/Calendar/Extension/AccessLevel.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/AccessLevel.php rename to lib/internal/Zend/Gdata/Calendar/Extension/AccessLevel.php diff --git a/lib/Zend/Gdata/Calendar/Extension/Color.php b/lib/internal/Zend/Gdata/Calendar/Extension/Color.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/Color.php rename to lib/internal/Zend/Gdata/Calendar/Extension/Color.php diff --git a/lib/Zend/Gdata/Calendar/Extension/Hidden.php b/lib/internal/Zend/Gdata/Calendar/Extension/Hidden.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/Hidden.php rename to lib/internal/Zend/Gdata/Calendar/Extension/Hidden.php diff --git a/lib/Zend/Gdata/Calendar/Extension/Link.php b/lib/internal/Zend/Gdata/Calendar/Extension/Link.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/Link.php rename to lib/internal/Zend/Gdata/Calendar/Extension/Link.php diff --git a/lib/Zend/Gdata/Calendar/Extension/QuickAdd.php b/lib/internal/Zend/Gdata/Calendar/Extension/QuickAdd.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/QuickAdd.php rename to lib/internal/Zend/Gdata/Calendar/Extension/QuickAdd.php diff --git a/lib/Zend/Gdata/Calendar/Extension/Selected.php b/lib/internal/Zend/Gdata/Calendar/Extension/Selected.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/Selected.php rename to lib/internal/Zend/Gdata/Calendar/Extension/Selected.php diff --git a/lib/Zend/Gdata/Calendar/Extension/SendEventNotifications.php b/lib/internal/Zend/Gdata/Calendar/Extension/SendEventNotifications.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/SendEventNotifications.php rename to lib/internal/Zend/Gdata/Calendar/Extension/SendEventNotifications.php diff --git a/lib/Zend/Gdata/Calendar/Extension/Timezone.php b/lib/internal/Zend/Gdata/Calendar/Extension/Timezone.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/Timezone.php rename to lib/internal/Zend/Gdata/Calendar/Extension/Timezone.php diff --git a/lib/Zend/Gdata/Calendar/Extension/WebContent.php b/lib/internal/Zend/Gdata/Calendar/Extension/WebContent.php similarity index 100% rename from lib/Zend/Gdata/Calendar/Extension/WebContent.php rename to lib/internal/Zend/Gdata/Calendar/Extension/WebContent.php diff --git a/lib/Zend/Gdata/Calendar/ListEntry.php b/lib/internal/Zend/Gdata/Calendar/ListEntry.php similarity index 100% rename from lib/Zend/Gdata/Calendar/ListEntry.php rename to lib/internal/Zend/Gdata/Calendar/ListEntry.php diff --git a/lib/Zend/Gdata/Calendar/ListFeed.php b/lib/internal/Zend/Gdata/Calendar/ListFeed.php similarity index 100% rename from lib/Zend/Gdata/Calendar/ListFeed.php rename to lib/internal/Zend/Gdata/Calendar/ListFeed.php diff --git a/lib/Zend/Gdata/ClientLogin.php b/lib/internal/Zend/Gdata/ClientLogin.php similarity index 100% rename from lib/Zend/Gdata/ClientLogin.php rename to lib/internal/Zend/Gdata/ClientLogin.php diff --git a/lib/Zend/Gdata/Docs.php b/lib/internal/Zend/Gdata/Docs.php similarity index 100% rename from lib/Zend/Gdata/Docs.php rename to lib/internal/Zend/Gdata/Docs.php diff --git a/lib/Zend/Gdata/Docs/DocumentListEntry.php b/lib/internal/Zend/Gdata/Docs/DocumentListEntry.php similarity index 100% rename from lib/Zend/Gdata/Docs/DocumentListEntry.php rename to lib/internal/Zend/Gdata/Docs/DocumentListEntry.php diff --git a/lib/Zend/Gdata/Docs/DocumentListFeed.php b/lib/internal/Zend/Gdata/Docs/DocumentListFeed.php similarity index 100% rename from lib/Zend/Gdata/Docs/DocumentListFeed.php rename to lib/internal/Zend/Gdata/Docs/DocumentListFeed.php diff --git a/lib/Zend/Gdata/Docs/Query.php b/lib/internal/Zend/Gdata/Docs/Query.php similarity index 100% rename from lib/Zend/Gdata/Docs/Query.php rename to lib/internal/Zend/Gdata/Docs/Query.php diff --git a/lib/Zend/Gdata/DublinCore.php b/lib/internal/Zend/Gdata/DublinCore.php similarity index 100% rename from lib/Zend/Gdata/DublinCore.php rename to lib/internal/Zend/Gdata/DublinCore.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Creator.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Creator.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Creator.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Creator.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Date.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Date.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Date.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Date.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Description.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Description.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Description.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Description.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Format.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Format.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Format.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Format.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Identifier.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Identifier.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Identifier.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Identifier.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Language.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Language.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Language.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Language.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Publisher.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Publisher.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Publisher.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Publisher.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Rights.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Rights.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Rights.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Rights.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Subject.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Subject.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Subject.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Subject.php diff --git a/lib/Zend/Gdata/DublinCore/Extension/Title.php b/lib/internal/Zend/Gdata/DublinCore/Extension/Title.php similarity index 100% rename from lib/Zend/Gdata/DublinCore/Extension/Title.php rename to lib/internal/Zend/Gdata/DublinCore/Extension/Title.php diff --git a/lib/Zend/Gdata/Entry.php b/lib/internal/Zend/Gdata/Entry.php similarity index 100% rename from lib/Zend/Gdata/Entry.php rename to lib/internal/Zend/Gdata/Entry.php diff --git a/lib/Zend/Gdata/Exif.php b/lib/internal/Zend/Gdata/Exif.php similarity index 100% rename from lib/Zend/Gdata/Exif.php rename to lib/internal/Zend/Gdata/Exif.php diff --git a/lib/Zend/Gdata/Exif/Entry.php b/lib/internal/Zend/Gdata/Exif/Entry.php similarity index 100% rename from lib/Zend/Gdata/Exif/Entry.php rename to lib/internal/Zend/Gdata/Exif/Entry.php diff --git a/lib/Zend/Gdata/Exif/Extension/Distance.php b/lib/internal/Zend/Gdata/Exif/Extension/Distance.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Distance.php rename to lib/internal/Zend/Gdata/Exif/Extension/Distance.php diff --git a/lib/Zend/Gdata/Exif/Extension/Exposure.php b/lib/internal/Zend/Gdata/Exif/Extension/Exposure.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Exposure.php rename to lib/internal/Zend/Gdata/Exif/Extension/Exposure.php diff --git a/lib/Zend/Gdata/Exif/Extension/FStop.php b/lib/internal/Zend/Gdata/Exif/Extension/FStop.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/FStop.php rename to lib/internal/Zend/Gdata/Exif/Extension/FStop.php diff --git a/lib/Zend/Gdata/Exif/Extension/Flash.php b/lib/internal/Zend/Gdata/Exif/Extension/Flash.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Flash.php rename to lib/internal/Zend/Gdata/Exif/Extension/Flash.php diff --git a/lib/Zend/Gdata/Exif/Extension/FocalLength.php b/lib/internal/Zend/Gdata/Exif/Extension/FocalLength.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/FocalLength.php rename to lib/internal/Zend/Gdata/Exif/Extension/FocalLength.php diff --git a/lib/Zend/Gdata/Exif/Extension/ImageUniqueId.php b/lib/internal/Zend/Gdata/Exif/Extension/ImageUniqueId.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/ImageUniqueId.php rename to lib/internal/Zend/Gdata/Exif/Extension/ImageUniqueId.php diff --git a/lib/Zend/Gdata/Exif/Extension/Iso.php b/lib/internal/Zend/Gdata/Exif/Extension/Iso.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Iso.php rename to lib/internal/Zend/Gdata/Exif/Extension/Iso.php diff --git a/lib/Zend/Gdata/Exif/Extension/Make.php b/lib/internal/Zend/Gdata/Exif/Extension/Make.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Make.php rename to lib/internal/Zend/Gdata/Exif/Extension/Make.php diff --git a/lib/Zend/Gdata/Exif/Extension/Model.php b/lib/internal/Zend/Gdata/Exif/Extension/Model.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Model.php rename to lib/internal/Zend/Gdata/Exif/Extension/Model.php diff --git a/lib/Zend/Gdata/Exif/Extension/Tags.php b/lib/internal/Zend/Gdata/Exif/Extension/Tags.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Tags.php rename to lib/internal/Zend/Gdata/Exif/Extension/Tags.php diff --git a/lib/Zend/Gdata/Exif/Extension/Time.php b/lib/internal/Zend/Gdata/Exif/Extension/Time.php similarity index 100% rename from lib/Zend/Gdata/Exif/Extension/Time.php rename to lib/internal/Zend/Gdata/Exif/Extension/Time.php diff --git a/lib/Zend/Gdata/Exif/Feed.php b/lib/internal/Zend/Gdata/Exif/Feed.php similarity index 100% rename from lib/Zend/Gdata/Exif/Feed.php rename to lib/internal/Zend/Gdata/Exif/Feed.php diff --git a/lib/Zend/Gdata/Extension.php b/lib/internal/Zend/Gdata/Extension.php similarity index 100% rename from lib/Zend/Gdata/Extension.php rename to lib/internal/Zend/Gdata/Extension.php diff --git a/lib/Zend/Gdata/Extension/AttendeeStatus.php b/lib/internal/Zend/Gdata/Extension/AttendeeStatus.php similarity index 100% rename from lib/Zend/Gdata/Extension/AttendeeStatus.php rename to lib/internal/Zend/Gdata/Extension/AttendeeStatus.php diff --git a/lib/Zend/Gdata/Extension/AttendeeType.php b/lib/internal/Zend/Gdata/Extension/AttendeeType.php similarity index 100% rename from lib/Zend/Gdata/Extension/AttendeeType.php rename to lib/internal/Zend/Gdata/Extension/AttendeeType.php diff --git a/lib/Zend/Gdata/Extension/Comments.php b/lib/internal/Zend/Gdata/Extension/Comments.php similarity index 100% rename from lib/Zend/Gdata/Extension/Comments.php rename to lib/internal/Zend/Gdata/Extension/Comments.php diff --git a/lib/Zend/Gdata/Extension/EntryLink.php b/lib/internal/Zend/Gdata/Extension/EntryLink.php similarity index 100% rename from lib/Zend/Gdata/Extension/EntryLink.php rename to lib/internal/Zend/Gdata/Extension/EntryLink.php diff --git a/lib/Zend/Gdata/Extension/EventStatus.php b/lib/internal/Zend/Gdata/Extension/EventStatus.php similarity index 100% rename from lib/Zend/Gdata/Extension/EventStatus.php rename to lib/internal/Zend/Gdata/Extension/EventStatus.php diff --git a/lib/Zend/Gdata/Extension/ExtendedProperty.php b/lib/internal/Zend/Gdata/Extension/ExtendedProperty.php similarity index 100% rename from lib/Zend/Gdata/Extension/ExtendedProperty.php rename to lib/internal/Zend/Gdata/Extension/ExtendedProperty.php diff --git a/lib/Zend/Gdata/Extension/FeedLink.php b/lib/internal/Zend/Gdata/Extension/FeedLink.php similarity index 100% rename from lib/Zend/Gdata/Extension/FeedLink.php rename to lib/internal/Zend/Gdata/Extension/FeedLink.php diff --git a/lib/Zend/Gdata/Extension/OpenSearchItemsPerPage.php b/lib/internal/Zend/Gdata/Extension/OpenSearchItemsPerPage.php similarity index 100% rename from lib/Zend/Gdata/Extension/OpenSearchItemsPerPage.php rename to lib/internal/Zend/Gdata/Extension/OpenSearchItemsPerPage.php diff --git a/lib/Zend/Gdata/Extension/OpenSearchStartIndex.php b/lib/internal/Zend/Gdata/Extension/OpenSearchStartIndex.php similarity index 100% rename from lib/Zend/Gdata/Extension/OpenSearchStartIndex.php rename to lib/internal/Zend/Gdata/Extension/OpenSearchStartIndex.php diff --git a/lib/Zend/Gdata/Extension/OpenSearchTotalResults.php b/lib/internal/Zend/Gdata/Extension/OpenSearchTotalResults.php similarity index 100% rename from lib/Zend/Gdata/Extension/OpenSearchTotalResults.php rename to lib/internal/Zend/Gdata/Extension/OpenSearchTotalResults.php diff --git a/lib/Zend/Gdata/Extension/OriginalEvent.php b/lib/internal/Zend/Gdata/Extension/OriginalEvent.php similarity index 100% rename from lib/Zend/Gdata/Extension/OriginalEvent.php rename to lib/internal/Zend/Gdata/Extension/OriginalEvent.php diff --git a/lib/Zend/Gdata/Extension/Rating.php b/lib/internal/Zend/Gdata/Extension/Rating.php similarity index 100% rename from lib/Zend/Gdata/Extension/Rating.php rename to lib/internal/Zend/Gdata/Extension/Rating.php diff --git a/lib/Zend/Gdata/Extension/Recurrence.php b/lib/internal/Zend/Gdata/Extension/Recurrence.php similarity index 100% rename from lib/Zend/Gdata/Extension/Recurrence.php rename to lib/internal/Zend/Gdata/Extension/Recurrence.php diff --git a/lib/Zend/Gdata/Extension/RecurrenceException.php b/lib/internal/Zend/Gdata/Extension/RecurrenceException.php similarity index 100% rename from lib/Zend/Gdata/Extension/RecurrenceException.php rename to lib/internal/Zend/Gdata/Extension/RecurrenceException.php diff --git a/lib/Zend/Gdata/Extension/Reminder.php b/lib/internal/Zend/Gdata/Extension/Reminder.php similarity index 100% rename from lib/Zend/Gdata/Extension/Reminder.php rename to lib/internal/Zend/Gdata/Extension/Reminder.php diff --git a/lib/Zend/Gdata/Extension/Transparency.php b/lib/internal/Zend/Gdata/Extension/Transparency.php similarity index 100% rename from lib/Zend/Gdata/Extension/Transparency.php rename to lib/internal/Zend/Gdata/Extension/Transparency.php diff --git a/lib/Zend/Gdata/Extension/Visibility.php b/lib/internal/Zend/Gdata/Extension/Visibility.php similarity index 100% rename from lib/Zend/Gdata/Extension/Visibility.php rename to lib/internal/Zend/Gdata/Extension/Visibility.php diff --git a/lib/Zend/Gdata/Extension/When.php b/lib/internal/Zend/Gdata/Extension/When.php similarity index 100% rename from lib/Zend/Gdata/Extension/When.php rename to lib/internal/Zend/Gdata/Extension/When.php diff --git a/lib/Zend/Gdata/Extension/Where.php b/lib/internal/Zend/Gdata/Extension/Where.php similarity index 100% rename from lib/Zend/Gdata/Extension/Where.php rename to lib/internal/Zend/Gdata/Extension/Where.php diff --git a/lib/Zend/Gdata/Extension/Who.php b/lib/internal/Zend/Gdata/Extension/Who.php similarity index 100% rename from lib/Zend/Gdata/Extension/Who.php rename to lib/internal/Zend/Gdata/Extension/Who.php diff --git a/lib/Zend/Gdata/Feed.php b/lib/internal/Zend/Gdata/Feed.php similarity index 100% rename from lib/Zend/Gdata/Feed.php rename to lib/internal/Zend/Gdata/Feed.php diff --git a/lib/Zend/Gdata/Gapps.php b/lib/internal/Zend/Gdata/Gapps.php similarity index 100% rename from lib/Zend/Gdata/Gapps.php rename to lib/internal/Zend/Gdata/Gapps.php diff --git a/lib/Zend/Gdata/Gapps/EmailListEntry.php b/lib/internal/Zend/Gdata/Gapps/EmailListEntry.php similarity index 100% rename from lib/Zend/Gdata/Gapps/EmailListEntry.php rename to lib/internal/Zend/Gdata/Gapps/EmailListEntry.php diff --git a/lib/Zend/Gdata/Gapps/EmailListFeed.php b/lib/internal/Zend/Gdata/Gapps/EmailListFeed.php similarity index 100% rename from lib/Zend/Gdata/Gapps/EmailListFeed.php rename to lib/internal/Zend/Gdata/Gapps/EmailListFeed.php diff --git a/lib/Zend/Gdata/Gapps/EmailListQuery.php b/lib/internal/Zend/Gdata/Gapps/EmailListQuery.php similarity index 100% rename from lib/Zend/Gdata/Gapps/EmailListQuery.php rename to lib/internal/Zend/Gdata/Gapps/EmailListQuery.php diff --git a/lib/Zend/Gdata/Gapps/EmailListRecipientEntry.php b/lib/internal/Zend/Gdata/Gapps/EmailListRecipientEntry.php similarity index 100% rename from lib/Zend/Gdata/Gapps/EmailListRecipientEntry.php rename to lib/internal/Zend/Gdata/Gapps/EmailListRecipientEntry.php diff --git a/lib/Zend/Gdata/Gapps/EmailListRecipientFeed.php b/lib/internal/Zend/Gdata/Gapps/EmailListRecipientFeed.php similarity index 100% rename from lib/Zend/Gdata/Gapps/EmailListRecipientFeed.php rename to lib/internal/Zend/Gdata/Gapps/EmailListRecipientFeed.php diff --git a/lib/Zend/Gdata/Gapps/EmailListRecipientQuery.php b/lib/internal/Zend/Gdata/Gapps/EmailListRecipientQuery.php similarity index 100% rename from lib/Zend/Gdata/Gapps/EmailListRecipientQuery.php rename to lib/internal/Zend/Gdata/Gapps/EmailListRecipientQuery.php diff --git a/lib/Zend/Gdata/Gapps/Error.php b/lib/internal/Zend/Gdata/Gapps/Error.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Error.php rename to lib/internal/Zend/Gdata/Gapps/Error.php diff --git a/lib/Zend/Gdata/Gapps/Extension/EmailList.php b/lib/internal/Zend/Gdata/Gapps/Extension/EmailList.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Extension/EmailList.php rename to lib/internal/Zend/Gdata/Gapps/Extension/EmailList.php diff --git a/lib/Zend/Gdata/Gapps/Extension/Login.php b/lib/internal/Zend/Gdata/Gapps/Extension/Login.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Extension/Login.php rename to lib/internal/Zend/Gdata/Gapps/Extension/Login.php diff --git a/lib/Zend/Gdata/Gapps/Extension/Name.php b/lib/internal/Zend/Gdata/Gapps/Extension/Name.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Extension/Name.php rename to lib/internal/Zend/Gdata/Gapps/Extension/Name.php diff --git a/lib/Zend/Gdata/Gapps/Extension/Nickname.php b/lib/internal/Zend/Gdata/Gapps/Extension/Nickname.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Extension/Nickname.php rename to lib/internal/Zend/Gdata/Gapps/Extension/Nickname.php diff --git a/lib/Zend/Gdata/Gapps/Extension/Property.php b/lib/internal/Zend/Gdata/Gapps/Extension/Property.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Extension/Property.php rename to lib/internal/Zend/Gdata/Gapps/Extension/Property.php diff --git a/lib/Zend/Gdata/Gapps/Extension/Quota.php b/lib/internal/Zend/Gdata/Gapps/Extension/Quota.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Extension/Quota.php rename to lib/internal/Zend/Gdata/Gapps/Extension/Quota.php diff --git a/lib/Zend/Gdata/Gapps/GroupEntry.php b/lib/internal/Zend/Gdata/Gapps/GroupEntry.php similarity index 100% rename from lib/Zend/Gdata/Gapps/GroupEntry.php rename to lib/internal/Zend/Gdata/Gapps/GroupEntry.php diff --git a/lib/Zend/Gdata/Gapps/GroupFeed.php b/lib/internal/Zend/Gdata/Gapps/GroupFeed.php similarity index 100% rename from lib/Zend/Gdata/Gapps/GroupFeed.php rename to lib/internal/Zend/Gdata/Gapps/GroupFeed.php diff --git a/lib/Zend/Gdata/Gapps/GroupQuery.php b/lib/internal/Zend/Gdata/Gapps/GroupQuery.php similarity index 100% rename from lib/Zend/Gdata/Gapps/GroupQuery.php rename to lib/internal/Zend/Gdata/Gapps/GroupQuery.php diff --git a/lib/Zend/Gdata/Gapps/MemberEntry.php b/lib/internal/Zend/Gdata/Gapps/MemberEntry.php similarity index 100% rename from lib/Zend/Gdata/Gapps/MemberEntry.php rename to lib/internal/Zend/Gdata/Gapps/MemberEntry.php diff --git a/lib/Zend/Gdata/Gapps/MemberFeed.php b/lib/internal/Zend/Gdata/Gapps/MemberFeed.php similarity index 100% rename from lib/Zend/Gdata/Gapps/MemberFeed.php rename to lib/internal/Zend/Gdata/Gapps/MemberFeed.php diff --git a/lib/Zend/Gdata/Gapps/MemberQuery.php b/lib/internal/Zend/Gdata/Gapps/MemberQuery.php similarity index 100% rename from lib/Zend/Gdata/Gapps/MemberQuery.php rename to lib/internal/Zend/Gdata/Gapps/MemberQuery.php diff --git a/lib/Zend/Gdata/Gapps/NicknameEntry.php b/lib/internal/Zend/Gdata/Gapps/NicknameEntry.php similarity index 100% rename from lib/Zend/Gdata/Gapps/NicknameEntry.php rename to lib/internal/Zend/Gdata/Gapps/NicknameEntry.php diff --git a/lib/Zend/Gdata/Gapps/NicknameFeed.php b/lib/internal/Zend/Gdata/Gapps/NicknameFeed.php similarity index 100% rename from lib/Zend/Gdata/Gapps/NicknameFeed.php rename to lib/internal/Zend/Gdata/Gapps/NicknameFeed.php diff --git a/lib/Zend/Gdata/Gapps/NicknameQuery.php b/lib/internal/Zend/Gdata/Gapps/NicknameQuery.php similarity index 100% rename from lib/Zend/Gdata/Gapps/NicknameQuery.php rename to lib/internal/Zend/Gdata/Gapps/NicknameQuery.php diff --git a/lib/Zend/Gdata/Gapps/OwnerEntry.php b/lib/internal/Zend/Gdata/Gapps/OwnerEntry.php similarity index 100% rename from lib/Zend/Gdata/Gapps/OwnerEntry.php rename to lib/internal/Zend/Gdata/Gapps/OwnerEntry.php diff --git a/lib/Zend/Gdata/Gapps/OwnerFeed.php b/lib/internal/Zend/Gdata/Gapps/OwnerFeed.php similarity index 100% rename from lib/Zend/Gdata/Gapps/OwnerFeed.php rename to lib/internal/Zend/Gdata/Gapps/OwnerFeed.php diff --git a/lib/Zend/Gdata/Gapps/OwnerQuery.php b/lib/internal/Zend/Gdata/Gapps/OwnerQuery.php similarity index 100% rename from lib/Zend/Gdata/Gapps/OwnerQuery.php rename to lib/internal/Zend/Gdata/Gapps/OwnerQuery.php diff --git a/lib/Zend/Gdata/Gapps/Query.php b/lib/internal/Zend/Gdata/Gapps/Query.php similarity index 100% rename from lib/Zend/Gdata/Gapps/Query.php rename to lib/internal/Zend/Gdata/Gapps/Query.php diff --git a/lib/Zend/Gdata/Gapps/ServiceException.php b/lib/internal/Zend/Gdata/Gapps/ServiceException.php similarity index 100% rename from lib/Zend/Gdata/Gapps/ServiceException.php rename to lib/internal/Zend/Gdata/Gapps/ServiceException.php diff --git a/lib/Zend/Gdata/Gapps/UserEntry.php b/lib/internal/Zend/Gdata/Gapps/UserEntry.php similarity index 100% rename from lib/Zend/Gdata/Gapps/UserEntry.php rename to lib/internal/Zend/Gdata/Gapps/UserEntry.php diff --git a/lib/Zend/Gdata/Gapps/UserFeed.php b/lib/internal/Zend/Gdata/Gapps/UserFeed.php similarity index 100% rename from lib/Zend/Gdata/Gapps/UserFeed.php rename to lib/internal/Zend/Gdata/Gapps/UserFeed.php diff --git a/lib/Zend/Gdata/Gapps/UserQuery.php b/lib/internal/Zend/Gdata/Gapps/UserQuery.php similarity index 100% rename from lib/Zend/Gdata/Gapps/UserQuery.php rename to lib/internal/Zend/Gdata/Gapps/UserQuery.php diff --git a/lib/Zend/Gdata/Gbase.php b/lib/internal/Zend/Gdata/Gbase.php similarity index 100% rename from lib/Zend/Gdata/Gbase.php rename to lib/internal/Zend/Gdata/Gbase.php diff --git a/lib/Zend/Gdata/Gbase/Entry.php b/lib/internal/Zend/Gdata/Gbase/Entry.php similarity index 100% rename from lib/Zend/Gdata/Gbase/Entry.php rename to lib/internal/Zend/Gdata/Gbase/Entry.php diff --git a/lib/Zend/Gdata/Gbase/Extension/BaseAttribute.php b/lib/internal/Zend/Gdata/Gbase/Extension/BaseAttribute.php similarity index 100% rename from lib/Zend/Gdata/Gbase/Extension/BaseAttribute.php rename to lib/internal/Zend/Gdata/Gbase/Extension/BaseAttribute.php diff --git a/lib/Zend/Gdata/Gbase/Feed.php b/lib/internal/Zend/Gdata/Gbase/Feed.php similarity index 100% rename from lib/Zend/Gdata/Gbase/Feed.php rename to lib/internal/Zend/Gdata/Gbase/Feed.php diff --git a/lib/Zend/Gdata/Gbase/ItemEntry.php b/lib/internal/Zend/Gdata/Gbase/ItemEntry.php similarity index 100% rename from lib/Zend/Gdata/Gbase/ItemEntry.php rename to lib/internal/Zend/Gdata/Gbase/ItemEntry.php diff --git a/lib/Zend/Gdata/Gbase/ItemFeed.php b/lib/internal/Zend/Gdata/Gbase/ItemFeed.php similarity index 100% rename from lib/Zend/Gdata/Gbase/ItemFeed.php rename to lib/internal/Zend/Gdata/Gbase/ItemFeed.php diff --git a/lib/Zend/Gdata/Gbase/ItemQuery.php b/lib/internal/Zend/Gdata/Gbase/ItemQuery.php similarity index 100% rename from lib/Zend/Gdata/Gbase/ItemQuery.php rename to lib/internal/Zend/Gdata/Gbase/ItemQuery.php diff --git a/lib/Zend/Gdata/Gbase/Query.php b/lib/internal/Zend/Gdata/Gbase/Query.php similarity index 100% rename from lib/Zend/Gdata/Gbase/Query.php rename to lib/internal/Zend/Gdata/Gbase/Query.php diff --git a/lib/Zend/Gdata/Gbase/SnippetEntry.php b/lib/internal/Zend/Gdata/Gbase/SnippetEntry.php similarity index 100% rename from lib/Zend/Gdata/Gbase/SnippetEntry.php rename to lib/internal/Zend/Gdata/Gbase/SnippetEntry.php diff --git a/lib/Zend/Gdata/Gbase/SnippetFeed.php b/lib/internal/Zend/Gdata/Gbase/SnippetFeed.php similarity index 100% rename from lib/Zend/Gdata/Gbase/SnippetFeed.php rename to lib/internal/Zend/Gdata/Gbase/SnippetFeed.php diff --git a/lib/Zend/Gdata/Gbase/SnippetQuery.php b/lib/internal/Zend/Gdata/Gbase/SnippetQuery.php similarity index 100% rename from lib/Zend/Gdata/Gbase/SnippetQuery.php rename to lib/internal/Zend/Gdata/Gbase/SnippetQuery.php diff --git a/lib/Zend/Gdata/Geo.php b/lib/internal/Zend/Gdata/Geo.php similarity index 100% rename from lib/Zend/Gdata/Geo.php rename to lib/internal/Zend/Gdata/Geo.php diff --git a/lib/Zend/Gdata/Geo/Entry.php b/lib/internal/Zend/Gdata/Geo/Entry.php similarity index 100% rename from lib/Zend/Gdata/Geo/Entry.php rename to lib/internal/Zend/Gdata/Geo/Entry.php diff --git a/lib/Zend/Gdata/Geo/Extension/GeoRssWhere.php b/lib/internal/Zend/Gdata/Geo/Extension/GeoRssWhere.php similarity index 100% rename from lib/Zend/Gdata/Geo/Extension/GeoRssWhere.php rename to lib/internal/Zend/Gdata/Geo/Extension/GeoRssWhere.php diff --git a/lib/Zend/Gdata/Geo/Extension/GmlPoint.php b/lib/internal/Zend/Gdata/Geo/Extension/GmlPoint.php similarity index 100% rename from lib/Zend/Gdata/Geo/Extension/GmlPoint.php rename to lib/internal/Zend/Gdata/Geo/Extension/GmlPoint.php diff --git a/lib/Zend/Gdata/Geo/Extension/GmlPos.php b/lib/internal/Zend/Gdata/Geo/Extension/GmlPos.php similarity index 100% rename from lib/Zend/Gdata/Geo/Extension/GmlPos.php rename to lib/internal/Zend/Gdata/Geo/Extension/GmlPos.php diff --git a/lib/Zend/Gdata/Geo/Feed.php b/lib/internal/Zend/Gdata/Geo/Feed.php similarity index 100% rename from lib/Zend/Gdata/Geo/Feed.php rename to lib/internal/Zend/Gdata/Geo/Feed.php diff --git a/lib/Zend/Gdata/Health.php b/lib/internal/Zend/Gdata/Health.php similarity index 100% rename from lib/Zend/Gdata/Health.php rename to lib/internal/Zend/Gdata/Health.php diff --git a/lib/Zend/Gdata/Health/Extension/Ccr.php b/lib/internal/Zend/Gdata/Health/Extension/Ccr.php similarity index 100% rename from lib/Zend/Gdata/Health/Extension/Ccr.php rename to lib/internal/Zend/Gdata/Health/Extension/Ccr.php diff --git a/lib/Zend/Gdata/Health/ProfileEntry.php b/lib/internal/Zend/Gdata/Health/ProfileEntry.php similarity index 100% rename from lib/Zend/Gdata/Health/ProfileEntry.php rename to lib/internal/Zend/Gdata/Health/ProfileEntry.php diff --git a/lib/Zend/Gdata/Health/ProfileFeed.php b/lib/internal/Zend/Gdata/Health/ProfileFeed.php similarity index 100% rename from lib/Zend/Gdata/Health/ProfileFeed.php rename to lib/internal/Zend/Gdata/Health/ProfileFeed.php diff --git a/lib/Zend/Gdata/Health/ProfileListEntry.php b/lib/internal/Zend/Gdata/Health/ProfileListEntry.php similarity index 100% rename from lib/Zend/Gdata/Health/ProfileListEntry.php rename to lib/internal/Zend/Gdata/Health/ProfileListEntry.php diff --git a/lib/Zend/Gdata/Health/ProfileListFeed.php b/lib/internal/Zend/Gdata/Health/ProfileListFeed.php similarity index 100% rename from lib/Zend/Gdata/Health/ProfileListFeed.php rename to lib/internal/Zend/Gdata/Health/ProfileListFeed.php diff --git a/lib/Zend/Gdata/Health/Query.php b/lib/internal/Zend/Gdata/Health/Query.php similarity index 100% rename from lib/Zend/Gdata/Health/Query.php rename to lib/internal/Zend/Gdata/Health/Query.php diff --git a/lib/Zend/Gdata/HttpAdapterStreamingProxy.php b/lib/internal/Zend/Gdata/HttpAdapterStreamingProxy.php similarity index 100% rename from lib/Zend/Gdata/HttpAdapterStreamingProxy.php rename to lib/internal/Zend/Gdata/HttpAdapterStreamingProxy.php diff --git a/lib/Zend/Gdata/HttpAdapterStreamingSocket.php b/lib/internal/Zend/Gdata/HttpAdapterStreamingSocket.php similarity index 100% rename from lib/Zend/Gdata/HttpAdapterStreamingSocket.php rename to lib/internal/Zend/Gdata/HttpAdapterStreamingSocket.php diff --git a/lib/Zend/Gdata/HttpClient.php b/lib/internal/Zend/Gdata/HttpClient.php similarity index 100% rename from lib/Zend/Gdata/HttpClient.php rename to lib/internal/Zend/Gdata/HttpClient.php diff --git a/lib/Zend/Gdata/Kind/EventEntry.php b/lib/internal/Zend/Gdata/Kind/EventEntry.php similarity index 100% rename from lib/Zend/Gdata/Kind/EventEntry.php rename to lib/internal/Zend/Gdata/Kind/EventEntry.php diff --git a/lib/Zend/Gdata/Media.php b/lib/internal/Zend/Gdata/Media.php similarity index 100% rename from lib/Zend/Gdata/Media.php rename to lib/internal/Zend/Gdata/Media.php diff --git a/lib/Zend/Gdata/Media/Entry.php b/lib/internal/Zend/Gdata/Media/Entry.php similarity index 100% rename from lib/Zend/Gdata/Media/Entry.php rename to lib/internal/Zend/Gdata/Media/Entry.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaCategory.php b/lib/internal/Zend/Gdata/Media/Extension/MediaCategory.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaCategory.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaCategory.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaContent.php b/lib/internal/Zend/Gdata/Media/Extension/MediaContent.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaContent.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaContent.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaCopyright.php b/lib/internal/Zend/Gdata/Media/Extension/MediaCopyright.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaCopyright.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaCopyright.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaCredit.php b/lib/internal/Zend/Gdata/Media/Extension/MediaCredit.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaCredit.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaCredit.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaDescription.php b/lib/internal/Zend/Gdata/Media/Extension/MediaDescription.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaDescription.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaDescription.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaGroup.php b/lib/internal/Zend/Gdata/Media/Extension/MediaGroup.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaGroup.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaGroup.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaHash.php b/lib/internal/Zend/Gdata/Media/Extension/MediaHash.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaHash.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaHash.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaKeywords.php b/lib/internal/Zend/Gdata/Media/Extension/MediaKeywords.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaKeywords.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaKeywords.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaPlayer.php b/lib/internal/Zend/Gdata/Media/Extension/MediaPlayer.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaPlayer.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaPlayer.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaRating.php b/lib/internal/Zend/Gdata/Media/Extension/MediaRating.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaRating.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaRating.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaRestriction.php b/lib/internal/Zend/Gdata/Media/Extension/MediaRestriction.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaRestriction.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaRestriction.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaText.php b/lib/internal/Zend/Gdata/Media/Extension/MediaText.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaText.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaText.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaThumbnail.php b/lib/internal/Zend/Gdata/Media/Extension/MediaThumbnail.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaThumbnail.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaThumbnail.php diff --git a/lib/Zend/Gdata/Media/Extension/MediaTitle.php b/lib/internal/Zend/Gdata/Media/Extension/MediaTitle.php similarity index 100% rename from lib/Zend/Gdata/Media/Extension/MediaTitle.php rename to lib/internal/Zend/Gdata/Media/Extension/MediaTitle.php diff --git a/lib/Zend/Gdata/Media/Feed.php b/lib/internal/Zend/Gdata/Media/Feed.php similarity index 100% rename from lib/Zend/Gdata/Media/Feed.php rename to lib/internal/Zend/Gdata/Media/Feed.php diff --git a/lib/Zend/Gdata/MediaMimeStream.php b/lib/internal/Zend/Gdata/MediaMimeStream.php similarity index 100% rename from lib/Zend/Gdata/MediaMimeStream.php rename to lib/internal/Zend/Gdata/MediaMimeStream.php diff --git a/lib/Zend/Gdata/MimeBodyString.php b/lib/internal/Zend/Gdata/MimeBodyString.php similarity index 100% rename from lib/Zend/Gdata/MimeBodyString.php rename to lib/internal/Zend/Gdata/MimeBodyString.php diff --git a/lib/Zend/Gdata/MimeFile.php b/lib/internal/Zend/Gdata/MimeFile.php similarity index 100% rename from lib/Zend/Gdata/MimeFile.php rename to lib/internal/Zend/Gdata/MimeFile.php diff --git a/lib/Zend/Gdata/Photos.php b/lib/internal/Zend/Gdata/Photos.php similarity index 100% rename from lib/Zend/Gdata/Photos.php rename to lib/internal/Zend/Gdata/Photos.php diff --git a/lib/Zend/Gdata/Photos/AlbumEntry.php b/lib/internal/Zend/Gdata/Photos/AlbumEntry.php similarity index 100% rename from lib/Zend/Gdata/Photos/AlbumEntry.php rename to lib/internal/Zend/Gdata/Photos/AlbumEntry.php diff --git a/lib/Zend/Gdata/Photos/AlbumFeed.php b/lib/internal/Zend/Gdata/Photos/AlbumFeed.php similarity index 100% rename from lib/Zend/Gdata/Photos/AlbumFeed.php rename to lib/internal/Zend/Gdata/Photos/AlbumFeed.php diff --git a/lib/Zend/Gdata/Photos/AlbumQuery.php b/lib/internal/Zend/Gdata/Photos/AlbumQuery.php similarity index 100% rename from lib/Zend/Gdata/Photos/AlbumQuery.php rename to lib/internal/Zend/Gdata/Photos/AlbumQuery.php diff --git a/lib/Zend/Gdata/Photos/CommentEntry.php b/lib/internal/Zend/Gdata/Photos/CommentEntry.php similarity index 100% rename from lib/Zend/Gdata/Photos/CommentEntry.php rename to lib/internal/Zend/Gdata/Photos/CommentEntry.php diff --git a/lib/Zend/Gdata/Photos/Extension/Access.php b/lib/internal/Zend/Gdata/Photos/Extension/Access.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Access.php rename to lib/internal/Zend/Gdata/Photos/Extension/Access.php diff --git a/lib/Zend/Gdata/Photos/Extension/AlbumId.php b/lib/internal/Zend/Gdata/Photos/Extension/AlbumId.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/AlbumId.php rename to lib/internal/Zend/Gdata/Photos/Extension/AlbumId.php diff --git a/lib/Zend/Gdata/Photos/Extension/BytesUsed.php b/lib/internal/Zend/Gdata/Photos/Extension/BytesUsed.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/BytesUsed.php rename to lib/internal/Zend/Gdata/Photos/Extension/BytesUsed.php diff --git a/lib/Zend/Gdata/Photos/Extension/Checksum.php b/lib/internal/Zend/Gdata/Photos/Extension/Checksum.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Checksum.php rename to lib/internal/Zend/Gdata/Photos/Extension/Checksum.php diff --git a/lib/Zend/Gdata/Photos/Extension/Client.php b/lib/internal/Zend/Gdata/Photos/Extension/Client.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Client.php rename to lib/internal/Zend/Gdata/Photos/Extension/Client.php diff --git a/lib/Zend/Gdata/Photos/Extension/CommentCount.php b/lib/internal/Zend/Gdata/Photos/Extension/CommentCount.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/CommentCount.php rename to lib/internal/Zend/Gdata/Photos/Extension/CommentCount.php diff --git a/lib/Zend/Gdata/Photos/Extension/CommentingEnabled.php b/lib/internal/Zend/Gdata/Photos/Extension/CommentingEnabled.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/CommentingEnabled.php rename to lib/internal/Zend/Gdata/Photos/Extension/CommentingEnabled.php diff --git a/lib/Zend/Gdata/Photos/Extension/Height.php b/lib/internal/Zend/Gdata/Photos/Extension/Height.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Height.php rename to lib/internal/Zend/Gdata/Photos/Extension/Height.php diff --git a/lib/Zend/Gdata/Photos/Extension/Id.php b/lib/internal/Zend/Gdata/Photos/Extension/Id.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Id.php rename to lib/internal/Zend/Gdata/Photos/Extension/Id.php diff --git a/lib/Zend/Gdata/Photos/Extension/Location.php b/lib/internal/Zend/Gdata/Photos/Extension/Location.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Location.php rename to lib/internal/Zend/Gdata/Photos/Extension/Location.php diff --git a/lib/Zend/Gdata/Photos/Extension/MaxPhotosPerAlbum.php b/lib/internal/Zend/Gdata/Photos/Extension/MaxPhotosPerAlbum.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/MaxPhotosPerAlbum.php rename to lib/internal/Zend/Gdata/Photos/Extension/MaxPhotosPerAlbum.php diff --git a/lib/Zend/Gdata/Photos/Extension/Name.php b/lib/internal/Zend/Gdata/Photos/Extension/Name.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Name.php rename to lib/internal/Zend/Gdata/Photos/Extension/Name.php diff --git a/lib/Zend/Gdata/Photos/Extension/Nickname.php b/lib/internal/Zend/Gdata/Photos/Extension/Nickname.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Nickname.php rename to lib/internal/Zend/Gdata/Photos/Extension/Nickname.php diff --git a/lib/Zend/Gdata/Photos/Extension/NumPhotos.php b/lib/internal/Zend/Gdata/Photos/Extension/NumPhotos.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/NumPhotos.php rename to lib/internal/Zend/Gdata/Photos/Extension/NumPhotos.php diff --git a/lib/Zend/Gdata/Photos/Extension/NumPhotosRemaining.php b/lib/internal/Zend/Gdata/Photos/Extension/NumPhotosRemaining.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/NumPhotosRemaining.php rename to lib/internal/Zend/Gdata/Photos/Extension/NumPhotosRemaining.php diff --git a/lib/Zend/Gdata/Photos/Extension/PhotoId.php b/lib/internal/Zend/Gdata/Photos/Extension/PhotoId.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/PhotoId.php rename to lib/internal/Zend/Gdata/Photos/Extension/PhotoId.php diff --git a/lib/Zend/Gdata/Photos/Extension/Position.php b/lib/internal/Zend/Gdata/Photos/Extension/Position.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Position.php rename to lib/internal/Zend/Gdata/Photos/Extension/Position.php diff --git a/lib/Zend/Gdata/Photos/Extension/QuotaCurrent.php b/lib/internal/Zend/Gdata/Photos/Extension/QuotaCurrent.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/QuotaCurrent.php rename to lib/internal/Zend/Gdata/Photos/Extension/QuotaCurrent.php diff --git a/lib/Zend/Gdata/Photos/Extension/QuotaLimit.php b/lib/internal/Zend/Gdata/Photos/Extension/QuotaLimit.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/QuotaLimit.php rename to lib/internal/Zend/Gdata/Photos/Extension/QuotaLimit.php diff --git a/lib/Zend/Gdata/Photos/Extension/Rotation.php b/lib/internal/Zend/Gdata/Photos/Extension/Rotation.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Rotation.php rename to lib/internal/Zend/Gdata/Photos/Extension/Rotation.php diff --git a/lib/Zend/Gdata/Photos/Extension/Size.php b/lib/internal/Zend/Gdata/Photos/Extension/Size.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Size.php rename to lib/internal/Zend/Gdata/Photos/Extension/Size.php diff --git a/lib/Zend/Gdata/Photos/Extension/Thumbnail.php b/lib/internal/Zend/Gdata/Photos/Extension/Thumbnail.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Thumbnail.php rename to lib/internal/Zend/Gdata/Photos/Extension/Thumbnail.php diff --git a/lib/Zend/Gdata/Photos/Extension/Timestamp.php b/lib/internal/Zend/Gdata/Photos/Extension/Timestamp.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Timestamp.php rename to lib/internal/Zend/Gdata/Photos/Extension/Timestamp.php diff --git a/lib/Zend/Gdata/Photos/Extension/User.php b/lib/internal/Zend/Gdata/Photos/Extension/User.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/User.php rename to lib/internal/Zend/Gdata/Photos/Extension/User.php diff --git a/lib/Zend/Gdata/Photos/Extension/Version.php b/lib/internal/Zend/Gdata/Photos/Extension/Version.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Version.php rename to lib/internal/Zend/Gdata/Photos/Extension/Version.php diff --git a/lib/Zend/Gdata/Photos/Extension/Weight.php b/lib/internal/Zend/Gdata/Photos/Extension/Weight.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Weight.php rename to lib/internal/Zend/Gdata/Photos/Extension/Weight.php diff --git a/lib/Zend/Gdata/Photos/Extension/Width.php b/lib/internal/Zend/Gdata/Photos/Extension/Width.php similarity index 100% rename from lib/Zend/Gdata/Photos/Extension/Width.php rename to lib/internal/Zend/Gdata/Photos/Extension/Width.php diff --git a/lib/Zend/Gdata/Photos/PhotoEntry.php b/lib/internal/Zend/Gdata/Photos/PhotoEntry.php similarity index 100% rename from lib/Zend/Gdata/Photos/PhotoEntry.php rename to lib/internal/Zend/Gdata/Photos/PhotoEntry.php diff --git a/lib/Zend/Gdata/Photos/PhotoFeed.php b/lib/internal/Zend/Gdata/Photos/PhotoFeed.php similarity index 100% rename from lib/Zend/Gdata/Photos/PhotoFeed.php rename to lib/internal/Zend/Gdata/Photos/PhotoFeed.php diff --git a/lib/Zend/Gdata/Photos/PhotoQuery.php b/lib/internal/Zend/Gdata/Photos/PhotoQuery.php similarity index 100% rename from lib/Zend/Gdata/Photos/PhotoQuery.php rename to lib/internal/Zend/Gdata/Photos/PhotoQuery.php diff --git a/lib/Zend/Gdata/Photos/TagEntry.php b/lib/internal/Zend/Gdata/Photos/TagEntry.php similarity index 100% rename from lib/Zend/Gdata/Photos/TagEntry.php rename to lib/internal/Zend/Gdata/Photos/TagEntry.php diff --git a/lib/Zend/Gdata/Photos/UserEntry.php b/lib/internal/Zend/Gdata/Photos/UserEntry.php similarity index 100% rename from lib/Zend/Gdata/Photos/UserEntry.php rename to lib/internal/Zend/Gdata/Photos/UserEntry.php diff --git a/lib/Zend/Gdata/Photos/UserFeed.php b/lib/internal/Zend/Gdata/Photos/UserFeed.php similarity index 100% rename from lib/Zend/Gdata/Photos/UserFeed.php rename to lib/internal/Zend/Gdata/Photos/UserFeed.php diff --git a/lib/Zend/Gdata/Photos/UserQuery.php b/lib/internal/Zend/Gdata/Photos/UserQuery.php similarity index 100% rename from lib/Zend/Gdata/Photos/UserQuery.php rename to lib/internal/Zend/Gdata/Photos/UserQuery.php diff --git a/lib/Zend/Gdata/Query.php b/lib/internal/Zend/Gdata/Query.php similarity index 100% rename from lib/Zend/Gdata/Query.php rename to lib/internal/Zend/Gdata/Query.php diff --git a/lib/Zend/Gdata/Spreadsheets.php b/lib/internal/Zend/Gdata/Spreadsheets.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets.php rename to lib/internal/Zend/Gdata/Spreadsheets.php diff --git a/lib/Zend/Gdata/Spreadsheets/CellEntry.php b/lib/internal/Zend/Gdata/Spreadsheets/CellEntry.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/CellEntry.php rename to lib/internal/Zend/Gdata/Spreadsheets/CellEntry.php diff --git a/lib/Zend/Gdata/Spreadsheets/CellFeed.php b/lib/internal/Zend/Gdata/Spreadsheets/CellFeed.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/CellFeed.php rename to lib/internal/Zend/Gdata/Spreadsheets/CellFeed.php diff --git a/lib/Zend/Gdata/Spreadsheets/CellQuery.php b/lib/internal/Zend/Gdata/Spreadsheets/CellQuery.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/CellQuery.php rename to lib/internal/Zend/Gdata/Spreadsheets/CellQuery.php diff --git a/lib/Zend/Gdata/Spreadsheets/DocumentQuery.php b/lib/internal/Zend/Gdata/Spreadsheets/DocumentQuery.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/DocumentQuery.php rename to lib/internal/Zend/Gdata/Spreadsheets/DocumentQuery.php diff --git a/lib/Zend/Gdata/Spreadsheets/Extension/Cell.php b/lib/internal/Zend/Gdata/Spreadsheets/Extension/Cell.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/Extension/Cell.php rename to lib/internal/Zend/Gdata/Spreadsheets/Extension/Cell.php diff --git a/lib/Zend/Gdata/Spreadsheets/Extension/ColCount.php b/lib/internal/Zend/Gdata/Spreadsheets/Extension/ColCount.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/Extension/ColCount.php rename to lib/internal/Zend/Gdata/Spreadsheets/Extension/ColCount.php diff --git a/lib/Zend/Gdata/Spreadsheets/Extension/Custom.php b/lib/internal/Zend/Gdata/Spreadsheets/Extension/Custom.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/Extension/Custom.php rename to lib/internal/Zend/Gdata/Spreadsheets/Extension/Custom.php diff --git a/lib/Zend/Gdata/Spreadsheets/Extension/RowCount.php b/lib/internal/Zend/Gdata/Spreadsheets/Extension/RowCount.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/Extension/RowCount.php rename to lib/internal/Zend/Gdata/Spreadsheets/Extension/RowCount.php diff --git a/lib/Zend/Gdata/Spreadsheets/ListEntry.php b/lib/internal/Zend/Gdata/Spreadsheets/ListEntry.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/ListEntry.php rename to lib/internal/Zend/Gdata/Spreadsheets/ListEntry.php diff --git a/lib/Zend/Gdata/Spreadsheets/ListFeed.php b/lib/internal/Zend/Gdata/Spreadsheets/ListFeed.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/ListFeed.php rename to lib/internal/Zend/Gdata/Spreadsheets/ListFeed.php diff --git a/lib/Zend/Gdata/Spreadsheets/ListQuery.php b/lib/internal/Zend/Gdata/Spreadsheets/ListQuery.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/ListQuery.php rename to lib/internal/Zend/Gdata/Spreadsheets/ListQuery.php diff --git a/lib/Zend/Gdata/Spreadsheets/SpreadsheetEntry.php b/lib/internal/Zend/Gdata/Spreadsheets/SpreadsheetEntry.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/SpreadsheetEntry.php rename to lib/internal/Zend/Gdata/Spreadsheets/SpreadsheetEntry.php diff --git a/lib/Zend/Gdata/Spreadsheets/SpreadsheetFeed.php b/lib/internal/Zend/Gdata/Spreadsheets/SpreadsheetFeed.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/SpreadsheetFeed.php rename to lib/internal/Zend/Gdata/Spreadsheets/SpreadsheetFeed.php diff --git a/lib/Zend/Gdata/Spreadsheets/WorksheetEntry.php b/lib/internal/Zend/Gdata/Spreadsheets/WorksheetEntry.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/WorksheetEntry.php rename to lib/internal/Zend/Gdata/Spreadsheets/WorksheetEntry.php diff --git a/lib/Zend/Gdata/Spreadsheets/WorksheetFeed.php b/lib/internal/Zend/Gdata/Spreadsheets/WorksheetFeed.php similarity index 100% rename from lib/Zend/Gdata/Spreadsheets/WorksheetFeed.php rename to lib/internal/Zend/Gdata/Spreadsheets/WorksheetFeed.php diff --git a/lib/Zend/Gdata/YouTube.php b/lib/internal/Zend/Gdata/YouTube.php similarity index 100% rename from lib/Zend/Gdata/YouTube.php rename to lib/internal/Zend/Gdata/YouTube.php diff --git a/lib/Zend/Gdata/YouTube/ActivityEntry.php b/lib/internal/Zend/Gdata/YouTube/ActivityEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/ActivityEntry.php rename to lib/internal/Zend/Gdata/YouTube/ActivityEntry.php diff --git a/lib/Zend/Gdata/YouTube/ActivityFeed.php b/lib/internal/Zend/Gdata/YouTube/ActivityFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/ActivityFeed.php rename to lib/internal/Zend/Gdata/YouTube/ActivityFeed.php diff --git a/lib/Zend/Gdata/YouTube/CommentEntry.php b/lib/internal/Zend/Gdata/YouTube/CommentEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/CommentEntry.php rename to lib/internal/Zend/Gdata/YouTube/CommentEntry.php diff --git a/lib/Zend/Gdata/YouTube/CommentFeed.php b/lib/internal/Zend/Gdata/YouTube/CommentFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/CommentFeed.php rename to lib/internal/Zend/Gdata/YouTube/CommentFeed.php diff --git a/lib/Zend/Gdata/YouTube/ContactEntry.php b/lib/internal/Zend/Gdata/YouTube/ContactEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/ContactEntry.php rename to lib/internal/Zend/Gdata/YouTube/ContactEntry.php diff --git a/lib/Zend/Gdata/YouTube/ContactFeed.php b/lib/internal/Zend/Gdata/YouTube/ContactFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/ContactFeed.php rename to lib/internal/Zend/Gdata/YouTube/ContactFeed.php diff --git a/lib/Zend/Gdata/YouTube/Extension/AboutMe.php b/lib/internal/Zend/Gdata/YouTube/Extension/AboutMe.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/AboutMe.php rename to lib/internal/Zend/Gdata/YouTube/Extension/AboutMe.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Age.php b/lib/internal/Zend/Gdata/YouTube/Extension/Age.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Age.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Age.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Books.php b/lib/internal/Zend/Gdata/YouTube/Extension/Books.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Books.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Books.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Company.php b/lib/internal/Zend/Gdata/YouTube/Extension/Company.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Company.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Company.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Control.php b/lib/internal/Zend/Gdata/YouTube/Extension/Control.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Control.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Control.php diff --git a/lib/Zend/Gdata/YouTube/Extension/CountHint.php b/lib/internal/Zend/Gdata/YouTube/Extension/CountHint.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/CountHint.php rename to lib/internal/Zend/Gdata/YouTube/Extension/CountHint.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Description.php b/lib/internal/Zend/Gdata/YouTube/Extension/Description.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Description.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Description.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Duration.php b/lib/internal/Zend/Gdata/YouTube/Extension/Duration.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Duration.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Duration.php diff --git a/lib/Zend/Gdata/YouTube/Extension/FirstName.php b/lib/internal/Zend/Gdata/YouTube/Extension/FirstName.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/FirstName.php rename to lib/internal/Zend/Gdata/YouTube/Extension/FirstName.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Gender.php b/lib/internal/Zend/Gdata/YouTube/Extension/Gender.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Gender.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Gender.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Hobbies.php b/lib/internal/Zend/Gdata/YouTube/Extension/Hobbies.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Hobbies.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Hobbies.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Hometown.php b/lib/internal/Zend/Gdata/YouTube/Extension/Hometown.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Hometown.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Hometown.php diff --git a/lib/Zend/Gdata/YouTube/Extension/LastName.php b/lib/internal/Zend/Gdata/YouTube/Extension/LastName.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/LastName.php rename to lib/internal/Zend/Gdata/YouTube/Extension/LastName.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Link.php b/lib/internal/Zend/Gdata/YouTube/Extension/Link.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Link.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Link.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Location.php b/lib/internal/Zend/Gdata/YouTube/Extension/Location.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Location.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Location.php diff --git a/lib/Zend/Gdata/YouTube/Extension/MediaContent.php b/lib/internal/Zend/Gdata/YouTube/Extension/MediaContent.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/MediaContent.php rename to lib/internal/Zend/Gdata/YouTube/Extension/MediaContent.php diff --git a/lib/Zend/Gdata/YouTube/Extension/MediaCredit.php b/lib/internal/Zend/Gdata/YouTube/Extension/MediaCredit.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/MediaCredit.php rename to lib/internal/Zend/Gdata/YouTube/Extension/MediaCredit.php diff --git a/lib/Zend/Gdata/YouTube/Extension/MediaGroup.php b/lib/internal/Zend/Gdata/YouTube/Extension/MediaGroup.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/MediaGroup.php rename to lib/internal/Zend/Gdata/YouTube/Extension/MediaGroup.php diff --git a/lib/Zend/Gdata/YouTube/Extension/MediaRating.php b/lib/internal/Zend/Gdata/YouTube/Extension/MediaRating.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/MediaRating.php rename to lib/internal/Zend/Gdata/YouTube/Extension/MediaRating.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Movies.php b/lib/internal/Zend/Gdata/YouTube/Extension/Movies.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Movies.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Movies.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Music.php b/lib/internal/Zend/Gdata/YouTube/Extension/Music.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Music.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Music.php diff --git a/lib/Zend/Gdata/YouTube/Extension/NoEmbed.php b/lib/internal/Zend/Gdata/YouTube/Extension/NoEmbed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/NoEmbed.php rename to lib/internal/Zend/Gdata/YouTube/Extension/NoEmbed.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Occupation.php b/lib/internal/Zend/Gdata/YouTube/Extension/Occupation.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Occupation.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Occupation.php diff --git a/lib/Zend/Gdata/YouTube/Extension/PlaylistId.php b/lib/internal/Zend/Gdata/YouTube/Extension/PlaylistId.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/PlaylistId.php rename to lib/internal/Zend/Gdata/YouTube/Extension/PlaylistId.php diff --git a/lib/Zend/Gdata/YouTube/Extension/PlaylistTitle.php b/lib/internal/Zend/Gdata/YouTube/Extension/PlaylistTitle.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/PlaylistTitle.php rename to lib/internal/Zend/Gdata/YouTube/Extension/PlaylistTitle.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Position.php b/lib/internal/Zend/Gdata/YouTube/Extension/Position.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Position.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Position.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Private.php b/lib/internal/Zend/Gdata/YouTube/Extension/Private.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Private.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Private.php diff --git a/lib/Zend/Gdata/YouTube/Extension/QueryString.php b/lib/internal/Zend/Gdata/YouTube/Extension/QueryString.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/QueryString.php rename to lib/internal/Zend/Gdata/YouTube/Extension/QueryString.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Racy.php b/lib/internal/Zend/Gdata/YouTube/Extension/Racy.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Racy.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Racy.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Recorded.php b/lib/internal/Zend/Gdata/YouTube/Extension/Recorded.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Recorded.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Recorded.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Relationship.php b/lib/internal/Zend/Gdata/YouTube/Extension/Relationship.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Relationship.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Relationship.php diff --git a/lib/Zend/Gdata/YouTube/Extension/ReleaseDate.php b/lib/internal/Zend/Gdata/YouTube/Extension/ReleaseDate.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/ReleaseDate.php rename to lib/internal/Zend/Gdata/YouTube/Extension/ReleaseDate.php diff --git a/lib/Zend/Gdata/YouTube/Extension/School.php b/lib/internal/Zend/Gdata/YouTube/Extension/School.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/School.php rename to lib/internal/Zend/Gdata/YouTube/Extension/School.php diff --git a/lib/Zend/Gdata/YouTube/Extension/State.php b/lib/internal/Zend/Gdata/YouTube/Extension/State.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/State.php rename to lib/internal/Zend/Gdata/YouTube/Extension/State.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Statistics.php b/lib/internal/Zend/Gdata/YouTube/Extension/Statistics.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Statistics.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Statistics.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Status.php b/lib/internal/Zend/Gdata/YouTube/Extension/Status.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Status.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Status.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Token.php b/lib/internal/Zend/Gdata/YouTube/Extension/Token.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Token.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Token.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Uploaded.php b/lib/internal/Zend/Gdata/YouTube/Extension/Uploaded.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Uploaded.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Uploaded.php diff --git a/lib/Zend/Gdata/YouTube/Extension/Username.php b/lib/internal/Zend/Gdata/YouTube/Extension/Username.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/Username.php rename to lib/internal/Zend/Gdata/YouTube/Extension/Username.php diff --git a/lib/Zend/Gdata/YouTube/Extension/VideoId.php b/lib/internal/Zend/Gdata/YouTube/Extension/VideoId.php similarity index 100% rename from lib/Zend/Gdata/YouTube/Extension/VideoId.php rename to lib/internal/Zend/Gdata/YouTube/Extension/VideoId.php diff --git a/lib/Zend/Gdata/YouTube/InboxEntry.php b/lib/internal/Zend/Gdata/YouTube/InboxEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/InboxEntry.php rename to lib/internal/Zend/Gdata/YouTube/InboxEntry.php diff --git a/lib/Zend/Gdata/YouTube/InboxFeed.php b/lib/internal/Zend/Gdata/YouTube/InboxFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/InboxFeed.php rename to lib/internal/Zend/Gdata/YouTube/InboxFeed.php diff --git a/lib/Zend/Gdata/YouTube/MediaEntry.php b/lib/internal/Zend/Gdata/YouTube/MediaEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/MediaEntry.php rename to lib/internal/Zend/Gdata/YouTube/MediaEntry.php diff --git a/lib/Zend/Gdata/YouTube/PlaylistListEntry.php b/lib/internal/Zend/Gdata/YouTube/PlaylistListEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/PlaylistListEntry.php rename to lib/internal/Zend/Gdata/YouTube/PlaylistListEntry.php diff --git a/lib/Zend/Gdata/YouTube/PlaylistListFeed.php b/lib/internal/Zend/Gdata/YouTube/PlaylistListFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/PlaylistListFeed.php rename to lib/internal/Zend/Gdata/YouTube/PlaylistListFeed.php diff --git a/lib/Zend/Gdata/YouTube/PlaylistVideoEntry.php b/lib/internal/Zend/Gdata/YouTube/PlaylistVideoEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/PlaylistVideoEntry.php rename to lib/internal/Zend/Gdata/YouTube/PlaylistVideoEntry.php diff --git a/lib/Zend/Gdata/YouTube/PlaylistVideoFeed.php b/lib/internal/Zend/Gdata/YouTube/PlaylistVideoFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/PlaylistVideoFeed.php rename to lib/internal/Zend/Gdata/YouTube/PlaylistVideoFeed.php diff --git a/lib/Zend/Gdata/YouTube/SubscriptionEntry.php b/lib/internal/Zend/Gdata/YouTube/SubscriptionEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/SubscriptionEntry.php rename to lib/internal/Zend/Gdata/YouTube/SubscriptionEntry.php diff --git a/lib/Zend/Gdata/YouTube/SubscriptionFeed.php b/lib/internal/Zend/Gdata/YouTube/SubscriptionFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/SubscriptionFeed.php rename to lib/internal/Zend/Gdata/YouTube/SubscriptionFeed.php diff --git a/lib/Zend/Gdata/YouTube/UserProfileEntry.php b/lib/internal/Zend/Gdata/YouTube/UserProfileEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/UserProfileEntry.php rename to lib/internal/Zend/Gdata/YouTube/UserProfileEntry.php diff --git a/lib/Zend/Gdata/YouTube/VideoEntry.php b/lib/internal/Zend/Gdata/YouTube/VideoEntry.php similarity index 100% rename from lib/Zend/Gdata/YouTube/VideoEntry.php rename to lib/internal/Zend/Gdata/YouTube/VideoEntry.php diff --git a/lib/Zend/Gdata/YouTube/VideoFeed.php b/lib/internal/Zend/Gdata/YouTube/VideoFeed.php similarity index 100% rename from lib/Zend/Gdata/YouTube/VideoFeed.php rename to lib/internal/Zend/Gdata/YouTube/VideoFeed.php diff --git a/lib/Zend/Gdata/YouTube/VideoQuery.php b/lib/internal/Zend/Gdata/YouTube/VideoQuery.php similarity index 100% rename from lib/Zend/Gdata/YouTube/VideoQuery.php rename to lib/internal/Zend/Gdata/YouTube/VideoQuery.php diff --git a/lib/Zend/Http/Client.php b/lib/internal/Zend/Http/Client.php similarity index 100% rename from lib/Zend/Http/Client.php rename to lib/internal/Zend/Http/Client.php diff --git a/lib/Zend/Http/Client/Adapter/Curl.php b/lib/internal/Zend/Http/Client/Adapter/Curl.php similarity index 100% rename from lib/Zend/Http/Client/Adapter/Curl.php rename to lib/internal/Zend/Http/Client/Adapter/Curl.php diff --git a/lib/Zend/Http/Client/Adapter/Exception.php b/lib/internal/Zend/Http/Client/Adapter/Exception.php similarity index 100% rename from lib/Zend/Http/Client/Adapter/Exception.php rename to lib/internal/Zend/Http/Client/Adapter/Exception.php diff --git a/lib/Zend/Http/Client/Adapter/Interface.php b/lib/internal/Zend/Http/Client/Adapter/Interface.php similarity index 100% rename from lib/Zend/Http/Client/Adapter/Interface.php rename to lib/internal/Zend/Http/Client/Adapter/Interface.php diff --git a/lib/Zend/Http/Client/Adapter/Proxy.php b/lib/internal/Zend/Http/Client/Adapter/Proxy.php similarity index 100% rename from lib/Zend/Http/Client/Adapter/Proxy.php rename to lib/internal/Zend/Http/Client/Adapter/Proxy.php diff --git a/lib/Zend/Http/Client/Adapter/Socket.php b/lib/internal/Zend/Http/Client/Adapter/Socket.php similarity index 100% rename from lib/Zend/Http/Client/Adapter/Socket.php rename to lib/internal/Zend/Http/Client/Adapter/Socket.php diff --git a/lib/Zend/Http/Client/Adapter/Stream.php b/lib/internal/Zend/Http/Client/Adapter/Stream.php similarity index 100% rename from lib/Zend/Http/Client/Adapter/Stream.php rename to lib/internal/Zend/Http/Client/Adapter/Stream.php diff --git a/lib/Zend/Http/Client/Adapter/Test.php b/lib/internal/Zend/Http/Client/Adapter/Test.php similarity index 100% rename from lib/Zend/Http/Client/Adapter/Test.php rename to lib/internal/Zend/Http/Client/Adapter/Test.php diff --git a/lib/Zend/Http/Client/Exception.php b/lib/internal/Zend/Http/Client/Exception.php similarity index 100% rename from lib/Zend/Http/Client/Exception.php rename to lib/internal/Zend/Http/Client/Exception.php diff --git a/lib/Zend/Http/Cookie.php b/lib/internal/Zend/Http/Cookie.php similarity index 100% rename from lib/Zend/Http/Cookie.php rename to lib/internal/Zend/Http/Cookie.php diff --git a/lib/Zend/Http/CookieJar.php b/lib/internal/Zend/Http/CookieJar.php similarity index 100% rename from lib/Zend/Http/CookieJar.php rename to lib/internal/Zend/Http/CookieJar.php diff --git a/lib/Zend/Http/Exception.php b/lib/internal/Zend/Http/Exception.php similarity index 100% rename from lib/Zend/Http/Exception.php rename to lib/internal/Zend/Http/Exception.php diff --git a/lib/Zend/Http/Response.php b/lib/internal/Zend/Http/Response.php similarity index 100% rename from lib/Zend/Http/Response.php rename to lib/internal/Zend/Http/Response.php diff --git a/lib/Zend/Http/Response/Stream.php b/lib/internal/Zend/Http/Response/Stream.php similarity index 100% rename from lib/Zend/Http/Response/Stream.php rename to lib/internal/Zend/Http/Response/Stream.php diff --git a/lib/Zend/Http/UserAgent.php b/lib/internal/Zend/Http/UserAgent.php similarity index 100% rename from lib/Zend/Http/UserAgent.php rename to lib/internal/Zend/Http/UserAgent.php diff --git a/lib/Zend/Http/UserAgent/AbstractDevice.php b/lib/internal/Zend/Http/UserAgent/AbstractDevice.php similarity index 100% rename from lib/Zend/Http/UserAgent/AbstractDevice.php rename to lib/internal/Zend/Http/UserAgent/AbstractDevice.php diff --git a/lib/Zend/Http/UserAgent/Bot.php b/lib/internal/Zend/Http/UserAgent/Bot.php similarity index 100% rename from lib/Zend/Http/UserAgent/Bot.php rename to lib/internal/Zend/Http/UserAgent/Bot.php diff --git a/lib/Zend/Http/UserAgent/Checker.php b/lib/internal/Zend/Http/UserAgent/Checker.php similarity index 100% rename from lib/Zend/Http/UserAgent/Checker.php rename to lib/internal/Zend/Http/UserAgent/Checker.php diff --git a/lib/Zend/Http/UserAgent/Console.php b/lib/internal/Zend/Http/UserAgent/Console.php similarity index 100% rename from lib/Zend/Http/UserAgent/Console.php rename to lib/internal/Zend/Http/UserAgent/Console.php diff --git a/lib/Zend/Http/UserAgent/Desktop.php b/lib/internal/Zend/Http/UserAgent/Desktop.php similarity index 100% rename from lib/Zend/Http/UserAgent/Desktop.php rename to lib/internal/Zend/Http/UserAgent/Desktop.php diff --git a/lib/Zend/Http/UserAgent/Device.php b/lib/internal/Zend/Http/UserAgent/Device.php similarity index 100% rename from lib/Zend/Http/UserAgent/Device.php rename to lib/internal/Zend/Http/UserAgent/Device.php diff --git a/lib/Zend/Http/UserAgent/Email.php b/lib/internal/Zend/Http/UserAgent/Email.php similarity index 100% rename from lib/Zend/Http/UserAgent/Email.php rename to lib/internal/Zend/Http/UserAgent/Email.php diff --git a/lib/Zend/Http/UserAgent/Exception.php b/lib/internal/Zend/Http/UserAgent/Exception.php similarity index 100% rename from lib/Zend/Http/UserAgent/Exception.php rename to lib/internal/Zend/Http/UserAgent/Exception.php diff --git a/lib/Zend/Http/UserAgent/Features/Adapter.php b/lib/internal/Zend/Http/UserAgent/Features/Adapter.php similarity index 100% rename from lib/Zend/Http/UserAgent/Features/Adapter.php rename to lib/internal/Zend/Http/UserAgent/Features/Adapter.php diff --git a/lib/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php b/lib/internal/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php similarity index 100% rename from lib/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php rename to lib/internal/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php diff --git a/lib/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php b/lib/internal/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php similarity index 100% rename from lib/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php rename to lib/internal/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php diff --git a/lib/Zend/Http/UserAgent/Features/Adapter/WurflApi.php b/lib/internal/Zend/Http/UserAgent/Features/Adapter/WurflApi.php similarity index 100% rename from lib/Zend/Http/UserAgent/Features/Adapter/WurflApi.php rename to lib/internal/Zend/Http/UserAgent/Features/Adapter/WurflApi.php diff --git a/lib/Zend/Http/UserAgent/Features/Exception.php b/lib/internal/Zend/Http/UserAgent/Features/Exception.php similarity index 100% rename from lib/Zend/Http/UserAgent/Features/Exception.php rename to lib/internal/Zend/Http/UserAgent/Features/Exception.php diff --git a/lib/Zend/Http/UserAgent/Feed.php b/lib/internal/Zend/Http/UserAgent/Feed.php similarity index 100% rename from lib/Zend/Http/UserAgent/Feed.php rename to lib/internal/Zend/Http/UserAgent/Feed.php diff --git a/lib/Zend/Http/UserAgent/Mobile.php b/lib/internal/Zend/Http/UserAgent/Mobile.php similarity index 100% rename from lib/Zend/Http/UserAgent/Mobile.php rename to lib/internal/Zend/Http/UserAgent/Mobile.php diff --git a/lib/Zend/Http/UserAgent/Offline.php b/lib/internal/Zend/Http/UserAgent/Offline.php similarity index 100% rename from lib/Zend/Http/UserAgent/Offline.php rename to lib/internal/Zend/Http/UserAgent/Offline.php diff --git a/lib/Zend/Http/UserAgent/Probe.php b/lib/internal/Zend/Http/UserAgent/Probe.php similarity index 100% rename from lib/Zend/Http/UserAgent/Probe.php rename to lib/internal/Zend/Http/UserAgent/Probe.php diff --git a/lib/Zend/Http/UserAgent/Spam.php b/lib/internal/Zend/Http/UserAgent/Spam.php similarity index 100% rename from lib/Zend/Http/UserAgent/Spam.php rename to lib/internal/Zend/Http/UserAgent/Spam.php diff --git a/lib/Zend/Http/UserAgent/Storage.php b/lib/internal/Zend/Http/UserAgent/Storage.php similarity index 100% rename from lib/Zend/Http/UserAgent/Storage.php rename to lib/internal/Zend/Http/UserAgent/Storage.php diff --git a/lib/Zend/Http/UserAgent/Storage/Exception.php b/lib/internal/Zend/Http/UserAgent/Storage/Exception.php similarity index 100% rename from lib/Zend/Http/UserAgent/Storage/Exception.php rename to lib/internal/Zend/Http/UserAgent/Storage/Exception.php diff --git a/lib/Zend/Http/UserAgent/Storage/NonPersistent.php b/lib/internal/Zend/Http/UserAgent/Storage/NonPersistent.php similarity index 100% rename from lib/Zend/Http/UserAgent/Storage/NonPersistent.php rename to lib/internal/Zend/Http/UserAgent/Storage/NonPersistent.php diff --git a/lib/Zend/Http/UserAgent/Storage/Session.php b/lib/internal/Zend/Http/UserAgent/Storage/Session.php similarity index 100% rename from lib/Zend/Http/UserAgent/Storage/Session.php rename to lib/internal/Zend/Http/UserAgent/Storage/Session.php diff --git a/lib/Zend/Http/UserAgent/Text.php b/lib/internal/Zend/Http/UserAgent/Text.php similarity index 100% rename from lib/Zend/Http/UserAgent/Text.php rename to lib/internal/Zend/Http/UserAgent/Text.php diff --git a/lib/Zend/Http/UserAgent/Validator.php b/lib/internal/Zend/Http/UserAgent/Validator.php similarity index 100% rename from lib/Zend/Http/UserAgent/Validator.php rename to lib/internal/Zend/Http/UserAgent/Validator.php diff --git a/lib/Zend/I18n/Exception/ExceptionInterface.php b/lib/internal/Zend/I18n/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/I18n/Exception/ExceptionInterface.php rename to lib/internal/Zend/I18n/Exception/ExceptionInterface.php diff --git a/lib/Zend/I18n/Exception/InvalidArgumentException.php b/lib/internal/Zend/I18n/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/I18n/Exception/InvalidArgumentException.php rename to lib/internal/Zend/I18n/Exception/InvalidArgumentException.php diff --git a/lib/Zend/I18n/Exception/OutOfBoundsException.php b/lib/internal/Zend/I18n/Exception/OutOfBoundsException.php similarity index 100% rename from lib/Zend/I18n/Exception/OutOfBoundsException.php rename to lib/internal/Zend/I18n/Exception/OutOfBoundsException.php diff --git a/lib/Zend/I18n/Exception/ParseException.php b/lib/internal/Zend/I18n/Exception/ParseException.php similarity index 100% rename from lib/Zend/I18n/Exception/ParseException.php rename to lib/internal/Zend/I18n/Exception/ParseException.php diff --git a/lib/Zend/I18n/Exception/RangeException.php b/lib/internal/Zend/I18n/Exception/RangeException.php similarity index 100% rename from lib/Zend/I18n/Exception/RangeException.php rename to lib/internal/Zend/I18n/Exception/RangeException.php diff --git a/lib/Zend/I18n/Exception/RuntimeException.php b/lib/internal/Zend/I18n/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/I18n/Exception/RuntimeException.php rename to lib/internal/Zend/I18n/Exception/RuntimeException.php diff --git a/lib/Zend/I18n/Filter/AbstractLocale.php b/lib/internal/Zend/I18n/Filter/AbstractLocale.php similarity index 100% rename from lib/Zend/I18n/Filter/AbstractLocale.php rename to lib/internal/Zend/I18n/Filter/AbstractLocale.php diff --git a/lib/Zend/I18n/Filter/Alnum.php b/lib/internal/Zend/I18n/Filter/Alnum.php similarity index 100% rename from lib/Zend/I18n/Filter/Alnum.php rename to lib/internal/Zend/I18n/Filter/Alnum.php diff --git a/lib/Zend/I18n/Filter/Alpha.php b/lib/internal/Zend/I18n/Filter/Alpha.php similarity index 100% rename from lib/Zend/I18n/Filter/Alpha.php rename to lib/internal/Zend/I18n/Filter/Alpha.php diff --git a/lib/Zend/I18n/Filter/NumberFormat.php b/lib/internal/Zend/I18n/Filter/NumberFormat.php similarity index 100% rename from lib/Zend/I18n/Filter/NumberFormat.php rename to lib/internal/Zend/I18n/Filter/NumberFormat.php diff --git a/lib/Zend/I18n/Translator/Loader/FileLoaderInterface.php b/lib/internal/Zend/I18n/Translator/Loader/FileLoaderInterface.php similarity index 100% rename from lib/Zend/I18n/Translator/Loader/FileLoaderInterface.php rename to lib/internal/Zend/I18n/Translator/Loader/FileLoaderInterface.php diff --git a/lib/Zend/I18n/Translator/Loader/Gettext.php b/lib/internal/Zend/I18n/Translator/Loader/Gettext.php similarity index 100% rename from lib/Zend/I18n/Translator/Loader/Gettext.php rename to lib/internal/Zend/I18n/Translator/Loader/Gettext.php diff --git a/lib/Zend/I18n/Translator/Loader/PhpArray.php b/lib/internal/Zend/I18n/Translator/Loader/PhpArray.php similarity index 100% rename from lib/Zend/I18n/Translator/Loader/PhpArray.php rename to lib/internal/Zend/I18n/Translator/Loader/PhpArray.php diff --git a/lib/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php b/lib/internal/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php similarity index 100% rename from lib/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php rename to lib/internal/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php diff --git a/lib/Zend/I18n/Translator/LoaderPluginManager.php b/lib/internal/Zend/I18n/Translator/LoaderPluginManager.php similarity index 100% rename from lib/Zend/I18n/Translator/LoaderPluginManager.php rename to lib/internal/Zend/I18n/Translator/LoaderPluginManager.php diff --git a/lib/Zend/I18n/Translator/Plural/Parser.php b/lib/internal/Zend/I18n/Translator/Plural/Parser.php similarity index 100% rename from lib/Zend/I18n/Translator/Plural/Parser.php rename to lib/internal/Zend/I18n/Translator/Plural/Parser.php diff --git a/lib/Zend/I18n/Translator/Plural/Rule.php b/lib/internal/Zend/I18n/Translator/Plural/Rule.php similarity index 100% rename from lib/Zend/I18n/Translator/Plural/Rule.php rename to lib/internal/Zend/I18n/Translator/Plural/Rule.php diff --git a/lib/Zend/I18n/Translator/Plural/Symbol.php b/lib/internal/Zend/I18n/Translator/Plural/Symbol.php similarity index 100% rename from lib/Zend/I18n/Translator/Plural/Symbol.php rename to lib/internal/Zend/I18n/Translator/Plural/Symbol.php diff --git a/lib/Zend/I18n/Translator/TextDomain.php b/lib/internal/Zend/I18n/Translator/TextDomain.php similarity index 100% rename from lib/Zend/I18n/Translator/TextDomain.php rename to lib/internal/Zend/I18n/Translator/TextDomain.php diff --git a/lib/Zend/I18n/Translator/Translator.php b/lib/internal/Zend/I18n/Translator/Translator.php similarity index 100% rename from lib/Zend/I18n/Translator/Translator.php rename to lib/internal/Zend/I18n/Translator/Translator.php diff --git a/lib/Zend/I18n/Translator/TranslatorAwareInterface.php b/lib/internal/Zend/I18n/Translator/TranslatorAwareInterface.php similarity index 100% rename from lib/Zend/I18n/Translator/TranslatorAwareInterface.php rename to lib/internal/Zend/I18n/Translator/TranslatorAwareInterface.php diff --git a/lib/Zend/I18n/Translator/TranslatorServiceFactory.php b/lib/internal/Zend/I18n/Translator/TranslatorServiceFactory.php similarity index 100% rename from lib/Zend/I18n/Translator/TranslatorServiceFactory.php rename to lib/internal/Zend/I18n/Translator/TranslatorServiceFactory.php diff --git a/lib/Zend/I18n/Validator/Alnum.php b/lib/internal/Zend/I18n/Validator/Alnum.php similarity index 100% rename from lib/Zend/I18n/Validator/Alnum.php rename to lib/internal/Zend/I18n/Validator/Alnum.php diff --git a/lib/Zend/I18n/Validator/Alpha.php b/lib/internal/Zend/I18n/Validator/Alpha.php similarity index 100% rename from lib/Zend/I18n/Validator/Alpha.php rename to lib/internal/Zend/I18n/Validator/Alpha.php diff --git a/lib/Zend/I18n/Validator/Float.php b/lib/internal/Zend/I18n/Validator/Float.php similarity index 100% rename from lib/Zend/I18n/Validator/Float.php rename to lib/internal/Zend/I18n/Validator/Float.php diff --git a/lib/Zend/I18n/Validator/Int.php b/lib/internal/Zend/I18n/Validator/Int.php similarity index 100% rename from lib/Zend/I18n/Validator/Int.php rename to lib/internal/Zend/I18n/Validator/Int.php diff --git a/lib/Zend/I18n/Validator/PostCode.php b/lib/internal/Zend/I18n/Validator/PostCode.php similarity index 100% rename from lib/Zend/I18n/Validator/PostCode.php rename to lib/internal/Zend/I18n/Validator/PostCode.php diff --git a/lib/Zend/I18n/View/Helper/AbstractTranslatorHelper.php b/lib/internal/Zend/I18n/View/Helper/AbstractTranslatorHelper.php similarity index 100% rename from lib/Zend/I18n/View/Helper/AbstractTranslatorHelper.php rename to lib/internal/Zend/I18n/View/Helper/AbstractTranslatorHelper.php diff --git a/lib/Zend/I18n/View/Helper/CurrencyFormat.php b/lib/internal/Zend/I18n/View/Helper/CurrencyFormat.php similarity index 100% rename from lib/Zend/I18n/View/Helper/CurrencyFormat.php rename to lib/internal/Zend/I18n/View/Helper/CurrencyFormat.php diff --git a/lib/Zend/I18n/View/Helper/DateFormat.php b/lib/internal/Zend/I18n/View/Helper/DateFormat.php similarity index 100% rename from lib/Zend/I18n/View/Helper/DateFormat.php rename to lib/internal/Zend/I18n/View/Helper/DateFormat.php diff --git a/lib/Zend/I18n/View/Helper/NumberFormat.php b/lib/internal/Zend/I18n/View/Helper/NumberFormat.php similarity index 100% rename from lib/Zend/I18n/View/Helper/NumberFormat.php rename to lib/internal/Zend/I18n/View/Helper/NumberFormat.php diff --git a/lib/Zend/I18n/View/Helper/Translate.php b/lib/internal/Zend/I18n/View/Helper/Translate.php similarity index 100% rename from lib/Zend/I18n/View/Helper/Translate.php rename to lib/internal/Zend/I18n/View/Helper/Translate.php diff --git a/lib/Zend/I18n/View/Helper/TranslatePlural.php b/lib/internal/Zend/I18n/View/Helper/TranslatePlural.php similarity index 100% rename from lib/Zend/I18n/View/Helper/TranslatePlural.php rename to lib/internal/Zend/I18n/View/Helper/TranslatePlural.php diff --git a/lib/Zend/I18n/View/HelperConfig.php b/lib/internal/Zend/I18n/View/HelperConfig.php similarity index 100% rename from lib/Zend/I18n/View/HelperConfig.php rename to lib/internal/Zend/I18n/View/HelperConfig.php diff --git a/lib/Zend/I18n/composer.json b/lib/internal/Zend/I18n/composer.json similarity index 100% rename from lib/Zend/I18n/composer.json rename to lib/internal/Zend/I18n/composer.json diff --git a/lib/Zend/InfoCard.php b/lib/internal/Zend/InfoCard.php similarity index 100% rename from lib/Zend/InfoCard.php rename to lib/internal/Zend/InfoCard.php diff --git a/lib/Zend/InfoCard/Adapter/Default.php b/lib/internal/Zend/InfoCard/Adapter/Default.php similarity index 100% rename from lib/Zend/InfoCard/Adapter/Default.php rename to lib/internal/Zend/InfoCard/Adapter/Default.php diff --git a/lib/Zend/InfoCard/Adapter/Exception.php b/lib/internal/Zend/InfoCard/Adapter/Exception.php similarity index 100% rename from lib/Zend/InfoCard/Adapter/Exception.php rename to lib/internal/Zend/InfoCard/Adapter/Exception.php diff --git a/lib/Zend/InfoCard/Adapter/Interface.php b/lib/internal/Zend/InfoCard/Adapter/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Adapter/Interface.php rename to lib/internal/Zend/InfoCard/Adapter/Interface.php diff --git a/lib/Zend/InfoCard/Cipher.php b/lib/internal/Zend/InfoCard/Cipher.php similarity index 100% rename from lib/Zend/InfoCard/Cipher.php rename to lib/internal/Zend/InfoCard/Cipher.php diff --git a/lib/Zend/InfoCard/Cipher/Exception.php b/lib/internal/Zend/InfoCard/Cipher/Exception.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Exception.php rename to lib/internal/Zend/InfoCard/Cipher/Exception.php diff --git a/lib/Zend/InfoCard/Cipher/Pki/Adapter/Abstract.php b/lib/internal/Zend/InfoCard/Cipher/Pki/Adapter/Abstract.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Pki/Adapter/Abstract.php rename to lib/internal/Zend/InfoCard/Cipher/Pki/Adapter/Abstract.php diff --git a/lib/Zend/InfoCard/Cipher/Pki/Adapter/Rsa.php b/lib/internal/Zend/InfoCard/Cipher/Pki/Adapter/Rsa.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Pki/Adapter/Rsa.php rename to lib/internal/Zend/InfoCard/Cipher/Pki/Adapter/Rsa.php diff --git a/lib/Zend/InfoCard/Cipher/Pki/Interface.php b/lib/internal/Zend/InfoCard/Cipher/Pki/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Pki/Interface.php rename to lib/internal/Zend/InfoCard/Cipher/Pki/Interface.php diff --git a/lib/Zend/InfoCard/Cipher/Pki/Rsa/Interface.php b/lib/internal/Zend/InfoCard/Cipher/Pki/Rsa/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Pki/Rsa/Interface.php rename to lib/internal/Zend/InfoCard/Cipher/Pki/Rsa/Interface.php diff --git a/lib/Zend/InfoCard/Cipher/Symmetric/Adapter/Abstract.php b/lib/internal/Zend/InfoCard/Cipher/Symmetric/Adapter/Abstract.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Symmetric/Adapter/Abstract.php rename to lib/internal/Zend/InfoCard/Cipher/Symmetric/Adapter/Abstract.php diff --git a/lib/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes128cbc.php b/lib/internal/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes128cbc.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes128cbc.php rename to lib/internal/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes128cbc.php diff --git a/lib/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes256cbc.php b/lib/internal/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes256cbc.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes256cbc.php rename to lib/internal/Zend/InfoCard/Cipher/Symmetric/Adapter/Aes256cbc.php diff --git a/lib/Zend/InfoCard/Cipher/Symmetric/Aes128cbc/Interface.php b/lib/internal/Zend/InfoCard/Cipher/Symmetric/Aes128cbc/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Symmetric/Aes128cbc/Interface.php rename to lib/internal/Zend/InfoCard/Cipher/Symmetric/Aes128cbc/Interface.php diff --git a/lib/Zend/InfoCard/Cipher/Symmetric/Aes256cbc/Interface.php b/lib/internal/Zend/InfoCard/Cipher/Symmetric/Aes256cbc/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Symmetric/Aes256cbc/Interface.php rename to lib/internal/Zend/InfoCard/Cipher/Symmetric/Aes256cbc/Interface.php diff --git a/lib/Zend/InfoCard/Cipher/Symmetric/Interface.php b/lib/internal/Zend/InfoCard/Cipher/Symmetric/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Cipher/Symmetric/Interface.php rename to lib/internal/Zend/InfoCard/Cipher/Symmetric/Interface.php diff --git a/lib/Zend/InfoCard/Claims.php b/lib/internal/Zend/InfoCard/Claims.php similarity index 100% rename from lib/Zend/InfoCard/Claims.php rename to lib/internal/Zend/InfoCard/Claims.php diff --git a/lib/Zend/InfoCard/Exception.php b/lib/internal/Zend/InfoCard/Exception.php similarity index 100% rename from lib/Zend/InfoCard/Exception.php rename to lib/internal/Zend/InfoCard/Exception.php diff --git a/lib/Zend/InfoCard/Xml/Assertion.php b/lib/internal/Zend/InfoCard/Xml/Assertion.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Assertion.php rename to lib/internal/Zend/InfoCard/Xml/Assertion.php diff --git a/lib/Zend/InfoCard/Xml/Assertion/Interface.php b/lib/internal/Zend/InfoCard/Xml/Assertion/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Assertion/Interface.php rename to lib/internal/Zend/InfoCard/Xml/Assertion/Interface.php diff --git a/lib/Zend/InfoCard/Xml/Assertion/Saml.php b/lib/internal/Zend/InfoCard/Xml/Assertion/Saml.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Assertion/Saml.php rename to lib/internal/Zend/InfoCard/Xml/Assertion/Saml.php diff --git a/lib/Zend/InfoCard/Xml/Element.php b/lib/internal/Zend/InfoCard/Xml/Element.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Element.php rename to lib/internal/Zend/InfoCard/Xml/Element.php diff --git a/lib/Zend/InfoCard/Xml/Element/Interface.php b/lib/internal/Zend/InfoCard/Xml/Element/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Element/Interface.php rename to lib/internal/Zend/InfoCard/Xml/Element/Interface.php diff --git a/lib/Zend/InfoCard/Xml/EncryptedData.php b/lib/internal/Zend/InfoCard/Xml/EncryptedData.php similarity index 100% rename from lib/Zend/InfoCard/Xml/EncryptedData.php rename to lib/internal/Zend/InfoCard/Xml/EncryptedData.php diff --git a/lib/Zend/InfoCard/Xml/EncryptedData/Abstract.php b/lib/internal/Zend/InfoCard/Xml/EncryptedData/Abstract.php similarity index 100% rename from lib/Zend/InfoCard/Xml/EncryptedData/Abstract.php rename to lib/internal/Zend/InfoCard/Xml/EncryptedData/Abstract.php diff --git a/lib/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php b/lib/internal/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php similarity index 100% rename from lib/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php rename to lib/internal/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php diff --git a/lib/Zend/InfoCard/Xml/EncryptedKey.php b/lib/internal/Zend/InfoCard/Xml/EncryptedKey.php similarity index 100% rename from lib/Zend/InfoCard/Xml/EncryptedKey.php rename to lib/internal/Zend/InfoCard/Xml/EncryptedKey.php diff --git a/lib/Zend/InfoCard/Xml/Exception.php b/lib/internal/Zend/InfoCard/Xml/Exception.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Exception.php rename to lib/internal/Zend/InfoCard/Xml/Exception.php diff --git a/lib/Zend/InfoCard/Xml/KeyInfo.php b/lib/internal/Zend/InfoCard/Xml/KeyInfo.php similarity index 100% rename from lib/Zend/InfoCard/Xml/KeyInfo.php rename to lib/internal/Zend/InfoCard/Xml/KeyInfo.php diff --git a/lib/Zend/InfoCard/Xml/KeyInfo/Abstract.php b/lib/internal/Zend/InfoCard/Xml/KeyInfo/Abstract.php similarity index 100% rename from lib/Zend/InfoCard/Xml/KeyInfo/Abstract.php rename to lib/internal/Zend/InfoCard/Xml/KeyInfo/Abstract.php diff --git a/lib/Zend/InfoCard/Xml/KeyInfo/Default.php b/lib/internal/Zend/InfoCard/Xml/KeyInfo/Default.php similarity index 100% rename from lib/Zend/InfoCard/Xml/KeyInfo/Default.php rename to lib/internal/Zend/InfoCard/Xml/KeyInfo/Default.php diff --git a/lib/Zend/InfoCard/Xml/KeyInfo/Interface.php b/lib/internal/Zend/InfoCard/Xml/KeyInfo/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Xml/KeyInfo/Interface.php rename to lib/internal/Zend/InfoCard/Xml/KeyInfo/Interface.php diff --git a/lib/Zend/InfoCard/Xml/KeyInfo/XmlDSig.php b/lib/internal/Zend/InfoCard/Xml/KeyInfo/XmlDSig.php similarity index 100% rename from lib/Zend/InfoCard/Xml/KeyInfo/XmlDSig.php rename to lib/internal/Zend/InfoCard/Xml/KeyInfo/XmlDSig.php diff --git a/lib/Zend/InfoCard/Xml/Security.php b/lib/internal/Zend/InfoCard/Xml/Security.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Security.php rename to lib/internal/Zend/InfoCard/Xml/Security.php diff --git a/lib/Zend/InfoCard/Xml/Security/Exception.php b/lib/internal/Zend/InfoCard/Xml/Security/Exception.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Security/Exception.php rename to lib/internal/Zend/InfoCard/Xml/Security/Exception.php diff --git a/lib/Zend/InfoCard/Xml/Security/Transform.php b/lib/internal/Zend/InfoCard/Xml/Security/Transform.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Security/Transform.php rename to lib/internal/Zend/InfoCard/Xml/Security/Transform.php diff --git a/lib/Zend/InfoCard/Xml/Security/Transform/EnvelopedSignature.php b/lib/internal/Zend/InfoCard/Xml/Security/Transform/EnvelopedSignature.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Security/Transform/EnvelopedSignature.php rename to lib/internal/Zend/InfoCard/Xml/Security/Transform/EnvelopedSignature.php diff --git a/lib/Zend/InfoCard/Xml/Security/Transform/Exception.php b/lib/internal/Zend/InfoCard/Xml/Security/Transform/Exception.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Security/Transform/Exception.php rename to lib/internal/Zend/InfoCard/Xml/Security/Transform/Exception.php diff --git a/lib/Zend/InfoCard/Xml/Security/Transform/Interface.php b/lib/internal/Zend/InfoCard/Xml/Security/Transform/Interface.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Security/Transform/Interface.php rename to lib/internal/Zend/InfoCard/Xml/Security/Transform/Interface.php diff --git a/lib/Zend/InfoCard/Xml/Security/Transform/XmlExcC14N.php b/lib/internal/Zend/InfoCard/Xml/Security/Transform/XmlExcC14N.php similarity index 100% rename from lib/Zend/InfoCard/Xml/Security/Transform/XmlExcC14N.php rename to lib/internal/Zend/InfoCard/Xml/Security/Transform/XmlExcC14N.php diff --git a/lib/Zend/InfoCard/Xml/SecurityTokenReference.php b/lib/internal/Zend/InfoCard/Xml/SecurityTokenReference.php similarity index 100% rename from lib/Zend/InfoCard/Xml/SecurityTokenReference.php rename to lib/internal/Zend/InfoCard/Xml/SecurityTokenReference.php diff --git a/lib/Zend/Json.php b/lib/internal/Zend/Json.php similarity index 100% rename from lib/Zend/Json.php rename to lib/internal/Zend/Json.php diff --git a/lib/Zend/Json/Decoder.php b/lib/internal/Zend/Json/Decoder.php similarity index 100% rename from lib/Zend/Json/Decoder.php rename to lib/internal/Zend/Json/Decoder.php diff --git a/lib/Zend/Json/Encoder.php b/lib/internal/Zend/Json/Encoder.php similarity index 100% rename from lib/Zend/Json/Encoder.php rename to lib/internal/Zend/Json/Encoder.php diff --git a/lib/Zend/Json/Exception.php b/lib/internal/Zend/Json/Exception.php similarity index 100% rename from lib/Zend/Json/Exception.php rename to lib/internal/Zend/Json/Exception.php diff --git a/lib/Zend/Json/Expr.php b/lib/internal/Zend/Json/Expr.php similarity index 100% rename from lib/Zend/Json/Expr.php rename to lib/internal/Zend/Json/Expr.php diff --git a/lib/Zend/Json/Server.php b/lib/internal/Zend/Json/Server.php similarity index 100% rename from lib/Zend/Json/Server.php rename to lib/internal/Zend/Json/Server.php diff --git a/lib/Zend/Json/Server/Cache.php b/lib/internal/Zend/Json/Server/Cache.php similarity index 100% rename from lib/Zend/Json/Server/Cache.php rename to lib/internal/Zend/Json/Server/Cache.php diff --git a/lib/Zend/Json/Server/Error.php b/lib/internal/Zend/Json/Server/Error.php similarity index 100% rename from lib/Zend/Json/Server/Error.php rename to lib/internal/Zend/Json/Server/Error.php diff --git a/lib/Zend/Json/Server/Exception.php b/lib/internal/Zend/Json/Server/Exception.php similarity index 100% rename from lib/Zend/Json/Server/Exception.php rename to lib/internal/Zend/Json/Server/Exception.php diff --git a/lib/Zend/Json/Server/Request.php b/lib/internal/Zend/Json/Server/Request.php similarity index 100% rename from lib/Zend/Json/Server/Request.php rename to lib/internal/Zend/Json/Server/Request.php diff --git a/lib/Zend/Json/Server/Request/Http.php b/lib/internal/Zend/Json/Server/Request/Http.php similarity index 100% rename from lib/Zend/Json/Server/Request/Http.php rename to lib/internal/Zend/Json/Server/Request/Http.php diff --git a/lib/Zend/Json/Server/Response.php b/lib/internal/Zend/Json/Server/Response.php similarity index 100% rename from lib/Zend/Json/Server/Response.php rename to lib/internal/Zend/Json/Server/Response.php diff --git a/lib/Zend/Json/Server/Response/Http.php b/lib/internal/Zend/Json/Server/Response/Http.php similarity index 100% rename from lib/Zend/Json/Server/Response/Http.php rename to lib/internal/Zend/Json/Server/Response/Http.php diff --git a/lib/Zend/Json/Server/Smd.php b/lib/internal/Zend/Json/Server/Smd.php similarity index 100% rename from lib/Zend/Json/Server/Smd.php rename to lib/internal/Zend/Json/Server/Smd.php diff --git a/lib/Zend/Json/Server/Smd/Service.php b/lib/internal/Zend/Json/Server/Smd/Service.php similarity index 100% rename from lib/Zend/Json/Server/Smd/Service.php rename to lib/internal/Zend/Json/Server/Smd/Service.php diff --git a/lib/Zend/LICENSE.txt b/lib/internal/Zend/LICENSE.txt similarity index 100% rename from lib/Zend/LICENSE.txt rename to lib/internal/Zend/LICENSE.txt diff --git a/lib/Zend/Layout.php b/lib/internal/Zend/Layout.php similarity index 100% rename from lib/Zend/Layout.php rename to lib/internal/Zend/Layout.php diff --git a/lib/Zend/Layout/Controller/Action/Helper/Layout.php b/lib/internal/Zend/Layout/Controller/Action/Helper/Layout.php similarity index 100% rename from lib/Zend/Layout/Controller/Action/Helper/Layout.php rename to lib/internal/Zend/Layout/Controller/Action/Helper/Layout.php diff --git a/lib/Zend/Layout/Controller/Plugin/Layout.php b/lib/internal/Zend/Layout/Controller/Plugin/Layout.php similarity index 100% rename from lib/Zend/Layout/Controller/Plugin/Layout.php rename to lib/internal/Zend/Layout/Controller/Plugin/Layout.php diff --git a/lib/Zend/Layout/Exception.php b/lib/internal/Zend/Layout/Exception.php similarity index 100% rename from lib/Zend/Layout/Exception.php rename to lib/internal/Zend/Layout/Exception.php diff --git a/lib/Zend/Ldap.php b/lib/internal/Zend/Ldap.php similarity index 100% rename from lib/Zend/Ldap.php rename to lib/internal/Zend/Ldap.php diff --git a/lib/Zend/Ldap/Attribute.php b/lib/internal/Zend/Ldap/Attribute.php similarity index 100% rename from lib/Zend/Ldap/Attribute.php rename to lib/internal/Zend/Ldap/Attribute.php diff --git a/lib/Zend/Ldap/Collection.php b/lib/internal/Zend/Ldap/Collection.php similarity index 100% rename from lib/Zend/Ldap/Collection.php rename to lib/internal/Zend/Ldap/Collection.php diff --git a/lib/Zend/Ldap/Collection/Iterator/Default.php b/lib/internal/Zend/Ldap/Collection/Iterator/Default.php similarity index 100% rename from lib/Zend/Ldap/Collection/Iterator/Default.php rename to lib/internal/Zend/Ldap/Collection/Iterator/Default.php diff --git a/lib/Zend/Ldap/Converter.php b/lib/internal/Zend/Ldap/Converter.php similarity index 100% rename from lib/Zend/Ldap/Converter.php rename to lib/internal/Zend/Ldap/Converter.php diff --git a/lib/Zend/Ldap/Converter/Exception.php b/lib/internal/Zend/Ldap/Converter/Exception.php similarity index 100% rename from lib/Zend/Ldap/Converter/Exception.php rename to lib/internal/Zend/Ldap/Converter/Exception.php diff --git a/lib/Zend/Ldap/Dn.php b/lib/internal/Zend/Ldap/Dn.php similarity index 100% rename from lib/Zend/Ldap/Dn.php rename to lib/internal/Zend/Ldap/Dn.php diff --git a/lib/Zend/Ldap/Exception.php b/lib/internal/Zend/Ldap/Exception.php similarity index 100% rename from lib/Zend/Ldap/Exception.php rename to lib/internal/Zend/Ldap/Exception.php diff --git a/lib/Zend/Ldap/Filter.php b/lib/internal/Zend/Ldap/Filter.php similarity index 100% rename from lib/Zend/Ldap/Filter.php rename to lib/internal/Zend/Ldap/Filter.php diff --git a/lib/Zend/Ldap/Filter/Abstract.php b/lib/internal/Zend/Ldap/Filter/Abstract.php similarity index 100% rename from lib/Zend/Ldap/Filter/Abstract.php rename to lib/internal/Zend/Ldap/Filter/Abstract.php diff --git a/lib/Zend/Ldap/Filter/And.php b/lib/internal/Zend/Ldap/Filter/And.php similarity index 100% rename from lib/Zend/Ldap/Filter/And.php rename to lib/internal/Zend/Ldap/Filter/And.php diff --git a/lib/Zend/Ldap/Filter/Exception.php b/lib/internal/Zend/Ldap/Filter/Exception.php similarity index 100% rename from lib/Zend/Ldap/Filter/Exception.php rename to lib/internal/Zend/Ldap/Filter/Exception.php diff --git a/lib/Zend/Ldap/Filter/Logical.php b/lib/internal/Zend/Ldap/Filter/Logical.php similarity index 100% rename from lib/Zend/Ldap/Filter/Logical.php rename to lib/internal/Zend/Ldap/Filter/Logical.php diff --git a/lib/Zend/Ldap/Filter/Mask.php b/lib/internal/Zend/Ldap/Filter/Mask.php similarity index 100% rename from lib/Zend/Ldap/Filter/Mask.php rename to lib/internal/Zend/Ldap/Filter/Mask.php diff --git a/lib/Zend/Ldap/Filter/Not.php b/lib/internal/Zend/Ldap/Filter/Not.php similarity index 100% rename from lib/Zend/Ldap/Filter/Not.php rename to lib/internal/Zend/Ldap/Filter/Not.php diff --git a/lib/Zend/Ldap/Filter/Or.php b/lib/internal/Zend/Ldap/Filter/Or.php similarity index 100% rename from lib/Zend/Ldap/Filter/Or.php rename to lib/internal/Zend/Ldap/Filter/Or.php diff --git a/lib/Zend/Ldap/Filter/String.php b/lib/internal/Zend/Ldap/Filter/String.php similarity index 100% rename from lib/Zend/Ldap/Filter/String.php rename to lib/internal/Zend/Ldap/Filter/String.php diff --git a/lib/Zend/Ldap/Ldif/Encoder.php b/lib/internal/Zend/Ldap/Ldif/Encoder.php similarity index 100% rename from lib/Zend/Ldap/Ldif/Encoder.php rename to lib/internal/Zend/Ldap/Ldif/Encoder.php diff --git a/lib/Zend/Ldap/Node.php b/lib/internal/Zend/Ldap/Node.php similarity index 100% rename from lib/Zend/Ldap/Node.php rename to lib/internal/Zend/Ldap/Node.php diff --git a/lib/Zend/Ldap/Node/Abstract.php b/lib/internal/Zend/Ldap/Node/Abstract.php similarity index 100% rename from lib/Zend/Ldap/Node/Abstract.php rename to lib/internal/Zend/Ldap/Node/Abstract.php diff --git a/lib/Zend/Ldap/Node/ChildrenIterator.php b/lib/internal/Zend/Ldap/Node/ChildrenIterator.php similarity index 100% rename from lib/Zend/Ldap/Node/ChildrenIterator.php rename to lib/internal/Zend/Ldap/Node/ChildrenIterator.php diff --git a/lib/Zend/Ldap/Node/Collection.php b/lib/internal/Zend/Ldap/Node/Collection.php similarity index 100% rename from lib/Zend/Ldap/Node/Collection.php rename to lib/internal/Zend/Ldap/Node/Collection.php diff --git a/lib/Zend/Ldap/Node/RootDse.php b/lib/internal/Zend/Ldap/Node/RootDse.php similarity index 100% rename from lib/Zend/Ldap/Node/RootDse.php rename to lib/internal/Zend/Ldap/Node/RootDse.php diff --git a/lib/Zend/Ldap/Node/RootDse/ActiveDirectory.php b/lib/internal/Zend/Ldap/Node/RootDse/ActiveDirectory.php similarity index 100% rename from lib/Zend/Ldap/Node/RootDse/ActiveDirectory.php rename to lib/internal/Zend/Ldap/Node/RootDse/ActiveDirectory.php diff --git a/lib/Zend/Ldap/Node/RootDse/OpenLdap.php b/lib/internal/Zend/Ldap/Node/RootDse/OpenLdap.php similarity index 100% rename from lib/Zend/Ldap/Node/RootDse/OpenLdap.php rename to lib/internal/Zend/Ldap/Node/RootDse/OpenLdap.php diff --git a/lib/Zend/Ldap/Node/RootDse/eDirectory.php b/lib/internal/Zend/Ldap/Node/RootDse/eDirectory.php similarity index 100% rename from lib/Zend/Ldap/Node/RootDse/eDirectory.php rename to lib/internal/Zend/Ldap/Node/RootDse/eDirectory.php diff --git a/lib/Zend/Ldap/Node/Schema.php b/lib/internal/Zend/Ldap/Node/Schema.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema.php rename to lib/internal/Zend/Ldap/Node/Schema.php diff --git a/lib/Zend/Ldap/Node/Schema/ActiveDirectory.php b/lib/internal/Zend/Ldap/Node/Schema/ActiveDirectory.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/ActiveDirectory.php rename to lib/internal/Zend/Ldap/Node/Schema/ActiveDirectory.php diff --git a/lib/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php b/lib/internal/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php rename to lib/internal/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php diff --git a/lib/Zend/Ldap/Node/Schema/AttributeType/Interface.php b/lib/internal/Zend/Ldap/Node/Schema/AttributeType/Interface.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/AttributeType/Interface.php rename to lib/internal/Zend/Ldap/Node/Schema/AttributeType/Interface.php diff --git a/lib/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php b/lib/internal/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php rename to lib/internal/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php diff --git a/lib/Zend/Ldap/Node/Schema/Item.php b/lib/internal/Zend/Ldap/Node/Schema/Item.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/Item.php rename to lib/internal/Zend/Ldap/Node/Schema/Item.php diff --git a/lib/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php b/lib/internal/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php rename to lib/internal/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php diff --git a/lib/Zend/Ldap/Node/Schema/ObjectClass/Interface.php b/lib/internal/Zend/Ldap/Node/Schema/ObjectClass/Interface.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/ObjectClass/Interface.php rename to lib/internal/Zend/Ldap/Node/Schema/ObjectClass/Interface.php diff --git a/lib/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php b/lib/internal/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php rename to lib/internal/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php diff --git a/lib/Zend/Ldap/Node/Schema/OpenLdap.php b/lib/internal/Zend/Ldap/Node/Schema/OpenLdap.php similarity index 100% rename from lib/Zend/Ldap/Node/Schema/OpenLdap.php rename to lib/internal/Zend/Ldap/Node/Schema/OpenLdap.php diff --git a/lib/Zend/Loader.php b/lib/internal/Zend/Loader.php similarity index 100% rename from lib/Zend/Loader.php rename to lib/internal/Zend/Loader.php diff --git a/lib/Zend/Loader/Autoloader.php b/lib/internal/Zend/Loader/Autoloader.php similarity index 100% rename from lib/Zend/Loader/Autoloader.php rename to lib/internal/Zend/Loader/Autoloader.php diff --git a/lib/Zend/Loader/Autoloader/Interface.php b/lib/internal/Zend/Loader/Autoloader/Interface.php similarity index 100% rename from lib/Zend/Loader/Autoloader/Interface.php rename to lib/internal/Zend/Loader/Autoloader/Interface.php diff --git a/lib/Zend/Loader/Autoloader/Resource.php b/lib/internal/Zend/Loader/Autoloader/Resource.php similarity index 100% rename from lib/Zend/Loader/Autoloader/Resource.php rename to lib/internal/Zend/Loader/Autoloader/Resource.php diff --git a/lib/Zend/Loader/Exception.php b/lib/internal/Zend/Loader/Exception.php similarity index 100% rename from lib/Zend/Loader/Exception.php rename to lib/internal/Zend/Loader/Exception.php diff --git a/lib/Zend/Loader/PluginLoader.php b/lib/internal/Zend/Loader/PluginLoader.php similarity index 100% rename from lib/Zend/Loader/PluginLoader.php rename to lib/internal/Zend/Loader/PluginLoader.php diff --git a/lib/Zend/Loader/PluginLoader/Exception.php b/lib/internal/Zend/Loader/PluginLoader/Exception.php similarity index 100% rename from lib/Zend/Loader/PluginLoader/Exception.php rename to lib/internal/Zend/Loader/PluginLoader/Exception.php diff --git a/lib/Zend/Loader/PluginLoader/Interface.php b/lib/internal/Zend/Loader/PluginLoader/Interface.php similarity index 100% rename from lib/Zend/Loader/PluginLoader/Interface.php rename to lib/internal/Zend/Loader/PluginLoader/Interface.php diff --git a/lib/Zend/Locale.php b/lib/internal/Zend/Locale.php similarity index 100% rename from lib/Zend/Locale.php rename to lib/internal/Zend/Locale.php diff --git a/lib/Zend/Locale/Data.php b/lib/internal/Zend/Locale/Data.php similarity index 100% rename from lib/Zend/Locale/Data.php rename to lib/internal/Zend/Locale/Data.php diff --git a/lib/Zend/Locale/Data/Translation.php b/lib/internal/Zend/Locale/Data/Translation.php similarity index 100% rename from lib/Zend/Locale/Data/Translation.php rename to lib/internal/Zend/Locale/Data/Translation.php diff --git a/lib/Zend/Locale/Data/aa.xml b/lib/internal/Zend/Locale/Data/aa.xml similarity index 100% rename from lib/Zend/Locale/Data/aa.xml rename to lib/internal/Zend/Locale/Data/aa.xml diff --git a/lib/Zend/Locale/Data/aa_DJ.xml b/lib/internal/Zend/Locale/Data/aa_DJ.xml similarity index 100% rename from lib/Zend/Locale/Data/aa_DJ.xml rename to lib/internal/Zend/Locale/Data/aa_DJ.xml diff --git a/lib/Zend/Locale/Data/aa_ER.xml b/lib/internal/Zend/Locale/Data/aa_ER.xml similarity index 100% rename from lib/Zend/Locale/Data/aa_ER.xml rename to lib/internal/Zend/Locale/Data/aa_ER.xml diff --git a/lib/Zend/Locale/Data/aa_ER_SAAHO.xml b/lib/internal/Zend/Locale/Data/aa_ER_SAAHO.xml similarity index 100% rename from lib/Zend/Locale/Data/aa_ER_SAAHO.xml rename to lib/internal/Zend/Locale/Data/aa_ER_SAAHO.xml diff --git a/lib/Zend/Locale/Data/aa_ET.xml b/lib/internal/Zend/Locale/Data/aa_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/aa_ET.xml rename to lib/internal/Zend/Locale/Data/aa_ET.xml diff --git a/lib/Zend/Locale/Data/af.xml b/lib/internal/Zend/Locale/Data/af.xml similarity index 100% rename from lib/Zend/Locale/Data/af.xml rename to lib/internal/Zend/Locale/Data/af.xml diff --git a/lib/Zend/Locale/Data/af_NA.xml b/lib/internal/Zend/Locale/Data/af_NA.xml similarity index 100% rename from lib/Zend/Locale/Data/af_NA.xml rename to lib/internal/Zend/Locale/Data/af_NA.xml diff --git a/lib/Zend/Locale/Data/af_ZA.xml b/lib/internal/Zend/Locale/Data/af_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/af_ZA.xml rename to lib/internal/Zend/Locale/Data/af_ZA.xml diff --git a/lib/Zend/Locale/Data/ak.xml b/lib/internal/Zend/Locale/Data/ak.xml similarity index 100% rename from lib/Zend/Locale/Data/ak.xml rename to lib/internal/Zend/Locale/Data/ak.xml diff --git a/lib/Zend/Locale/Data/ak_GH.xml b/lib/internal/Zend/Locale/Data/ak_GH.xml similarity index 100% rename from lib/Zend/Locale/Data/ak_GH.xml rename to lib/internal/Zend/Locale/Data/ak_GH.xml diff --git a/lib/Zend/Locale/Data/am.xml b/lib/internal/Zend/Locale/Data/am.xml similarity index 100% rename from lib/Zend/Locale/Data/am.xml rename to lib/internal/Zend/Locale/Data/am.xml diff --git a/lib/Zend/Locale/Data/am_ET.xml b/lib/internal/Zend/Locale/Data/am_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/am_ET.xml rename to lib/internal/Zend/Locale/Data/am_ET.xml diff --git a/lib/Zend/Locale/Data/ar.xml b/lib/internal/Zend/Locale/Data/ar.xml similarity index 100% rename from lib/Zend/Locale/Data/ar.xml rename to lib/internal/Zend/Locale/Data/ar.xml diff --git a/lib/Zend/Locale/Data/ar_AE.xml b/lib/internal/Zend/Locale/Data/ar_AE.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_AE.xml rename to lib/internal/Zend/Locale/Data/ar_AE.xml diff --git a/lib/Zend/Locale/Data/ar_BH.xml b/lib/internal/Zend/Locale/Data/ar_BH.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_BH.xml rename to lib/internal/Zend/Locale/Data/ar_BH.xml diff --git a/lib/Zend/Locale/Data/ar_DZ.xml b/lib/internal/Zend/Locale/Data/ar_DZ.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_DZ.xml rename to lib/internal/Zend/Locale/Data/ar_DZ.xml diff --git a/lib/Zend/Locale/Data/ar_EG.xml b/lib/internal/Zend/Locale/Data/ar_EG.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_EG.xml rename to lib/internal/Zend/Locale/Data/ar_EG.xml diff --git a/lib/Zend/Locale/Data/ar_IQ.xml b/lib/internal/Zend/Locale/Data/ar_IQ.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_IQ.xml rename to lib/internal/Zend/Locale/Data/ar_IQ.xml diff --git a/lib/Zend/Locale/Data/ar_JO.xml b/lib/internal/Zend/Locale/Data/ar_JO.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_JO.xml rename to lib/internal/Zend/Locale/Data/ar_JO.xml diff --git a/lib/Zend/Locale/Data/ar_KW.xml b/lib/internal/Zend/Locale/Data/ar_KW.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_KW.xml rename to lib/internal/Zend/Locale/Data/ar_KW.xml diff --git a/lib/Zend/Locale/Data/ar_LB.xml b/lib/internal/Zend/Locale/Data/ar_LB.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_LB.xml rename to lib/internal/Zend/Locale/Data/ar_LB.xml diff --git a/lib/Zend/Locale/Data/ar_LY.xml b/lib/internal/Zend/Locale/Data/ar_LY.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_LY.xml rename to lib/internal/Zend/Locale/Data/ar_LY.xml diff --git a/lib/Zend/Locale/Data/ar_MA.xml b/lib/internal/Zend/Locale/Data/ar_MA.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_MA.xml rename to lib/internal/Zend/Locale/Data/ar_MA.xml diff --git a/lib/Zend/Locale/Data/ar_OM.xml b/lib/internal/Zend/Locale/Data/ar_OM.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_OM.xml rename to lib/internal/Zend/Locale/Data/ar_OM.xml diff --git a/lib/Zend/Locale/Data/ar_QA.xml b/lib/internal/Zend/Locale/Data/ar_QA.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_QA.xml rename to lib/internal/Zend/Locale/Data/ar_QA.xml diff --git a/lib/Zend/Locale/Data/ar_SA.xml b/lib/internal/Zend/Locale/Data/ar_SA.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_SA.xml rename to lib/internal/Zend/Locale/Data/ar_SA.xml diff --git a/lib/Zend/Locale/Data/ar_SD.xml b/lib/internal/Zend/Locale/Data/ar_SD.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_SD.xml rename to lib/internal/Zend/Locale/Data/ar_SD.xml diff --git a/lib/Zend/Locale/Data/ar_SY.xml b/lib/internal/Zend/Locale/Data/ar_SY.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_SY.xml rename to lib/internal/Zend/Locale/Data/ar_SY.xml diff --git a/lib/Zend/Locale/Data/ar_TN.xml b/lib/internal/Zend/Locale/Data/ar_TN.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_TN.xml rename to lib/internal/Zend/Locale/Data/ar_TN.xml diff --git a/lib/Zend/Locale/Data/ar_YE.xml b/lib/internal/Zend/Locale/Data/ar_YE.xml similarity index 100% rename from lib/Zend/Locale/Data/ar_YE.xml rename to lib/internal/Zend/Locale/Data/ar_YE.xml diff --git a/lib/Zend/Locale/Data/as.xml b/lib/internal/Zend/Locale/Data/as.xml similarity index 100% rename from lib/Zend/Locale/Data/as.xml rename to lib/internal/Zend/Locale/Data/as.xml diff --git a/lib/Zend/Locale/Data/as_IN.xml b/lib/internal/Zend/Locale/Data/as_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/as_IN.xml rename to lib/internal/Zend/Locale/Data/as_IN.xml diff --git a/lib/Zend/Locale/Data/az.xml b/lib/internal/Zend/Locale/Data/az.xml similarity index 100% rename from lib/Zend/Locale/Data/az.xml rename to lib/internal/Zend/Locale/Data/az.xml diff --git a/lib/Zend/Locale/Data/az_AZ.xml b/lib/internal/Zend/Locale/Data/az_AZ.xml similarity index 100% rename from lib/Zend/Locale/Data/az_AZ.xml rename to lib/internal/Zend/Locale/Data/az_AZ.xml diff --git a/lib/Zend/Locale/Data/az_Cyrl.xml b/lib/internal/Zend/Locale/Data/az_Cyrl.xml similarity index 100% rename from lib/Zend/Locale/Data/az_Cyrl.xml rename to lib/internal/Zend/Locale/Data/az_Cyrl.xml diff --git a/lib/Zend/Locale/Data/az_Cyrl_AZ.xml b/lib/internal/Zend/Locale/Data/az_Cyrl_AZ.xml similarity index 100% rename from lib/Zend/Locale/Data/az_Cyrl_AZ.xml rename to lib/internal/Zend/Locale/Data/az_Cyrl_AZ.xml diff --git a/lib/Zend/Locale/Data/az_Latn.xml b/lib/internal/Zend/Locale/Data/az_Latn.xml similarity index 100% rename from lib/Zend/Locale/Data/az_Latn.xml rename to lib/internal/Zend/Locale/Data/az_Latn.xml diff --git a/lib/Zend/Locale/Data/az_Latn_AZ.xml b/lib/internal/Zend/Locale/Data/az_Latn_AZ.xml similarity index 100% rename from lib/Zend/Locale/Data/az_Latn_AZ.xml rename to lib/internal/Zend/Locale/Data/az_Latn_AZ.xml diff --git a/lib/Zend/Locale/Data/be.xml b/lib/internal/Zend/Locale/Data/be.xml similarity index 100% rename from lib/Zend/Locale/Data/be.xml rename to lib/internal/Zend/Locale/Data/be.xml diff --git a/lib/Zend/Locale/Data/be_BY.xml b/lib/internal/Zend/Locale/Data/be_BY.xml similarity index 100% rename from lib/Zend/Locale/Data/be_BY.xml rename to lib/internal/Zend/Locale/Data/be_BY.xml diff --git a/lib/Zend/Locale/Data/bg.xml b/lib/internal/Zend/Locale/Data/bg.xml similarity index 100% rename from lib/Zend/Locale/Data/bg.xml rename to lib/internal/Zend/Locale/Data/bg.xml diff --git a/lib/Zend/Locale/Data/bg_BG.xml b/lib/internal/Zend/Locale/Data/bg_BG.xml similarity index 100% rename from lib/Zend/Locale/Data/bg_BG.xml rename to lib/internal/Zend/Locale/Data/bg_BG.xml diff --git a/lib/Zend/Locale/Data/bn.xml b/lib/internal/Zend/Locale/Data/bn.xml similarity index 100% rename from lib/Zend/Locale/Data/bn.xml rename to lib/internal/Zend/Locale/Data/bn.xml diff --git a/lib/Zend/Locale/Data/bn_BD.xml b/lib/internal/Zend/Locale/Data/bn_BD.xml similarity index 100% rename from lib/Zend/Locale/Data/bn_BD.xml rename to lib/internal/Zend/Locale/Data/bn_BD.xml diff --git a/lib/Zend/Locale/Data/bn_IN.xml b/lib/internal/Zend/Locale/Data/bn_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/bn_IN.xml rename to lib/internal/Zend/Locale/Data/bn_IN.xml diff --git a/lib/Zend/Locale/Data/bo.xml b/lib/internal/Zend/Locale/Data/bo.xml similarity index 100% rename from lib/Zend/Locale/Data/bo.xml rename to lib/internal/Zend/Locale/Data/bo.xml diff --git a/lib/Zend/Locale/Data/bo_CN.xml b/lib/internal/Zend/Locale/Data/bo_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/bo_CN.xml rename to lib/internal/Zend/Locale/Data/bo_CN.xml diff --git a/lib/Zend/Locale/Data/bo_IN.xml b/lib/internal/Zend/Locale/Data/bo_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/bo_IN.xml rename to lib/internal/Zend/Locale/Data/bo_IN.xml diff --git a/lib/Zend/Locale/Data/bs.xml b/lib/internal/Zend/Locale/Data/bs.xml similarity index 100% rename from lib/Zend/Locale/Data/bs.xml rename to lib/internal/Zend/Locale/Data/bs.xml diff --git a/lib/Zend/Locale/Data/bs_BA.xml b/lib/internal/Zend/Locale/Data/bs_BA.xml similarity index 100% rename from lib/Zend/Locale/Data/bs_BA.xml rename to lib/internal/Zend/Locale/Data/bs_BA.xml diff --git a/lib/Zend/Locale/Data/byn.xml b/lib/internal/Zend/Locale/Data/byn.xml similarity index 100% rename from lib/Zend/Locale/Data/byn.xml rename to lib/internal/Zend/Locale/Data/byn.xml diff --git a/lib/Zend/Locale/Data/byn_ER.xml b/lib/internal/Zend/Locale/Data/byn_ER.xml similarity index 100% rename from lib/Zend/Locale/Data/byn_ER.xml rename to lib/internal/Zend/Locale/Data/byn_ER.xml diff --git a/lib/Zend/Locale/Data/ca.xml b/lib/internal/Zend/Locale/Data/ca.xml similarity index 100% rename from lib/Zend/Locale/Data/ca.xml rename to lib/internal/Zend/Locale/Data/ca.xml diff --git a/lib/Zend/Locale/Data/ca_ES.xml b/lib/internal/Zend/Locale/Data/ca_ES.xml similarity index 100% rename from lib/Zend/Locale/Data/ca_ES.xml rename to lib/internal/Zend/Locale/Data/ca_ES.xml diff --git a/lib/Zend/Locale/Data/cch.xml b/lib/internal/Zend/Locale/Data/cch.xml similarity index 100% rename from lib/Zend/Locale/Data/cch.xml rename to lib/internal/Zend/Locale/Data/cch.xml diff --git a/lib/Zend/Locale/Data/cch_NG.xml b/lib/internal/Zend/Locale/Data/cch_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/cch_NG.xml rename to lib/internal/Zend/Locale/Data/cch_NG.xml diff --git a/lib/Zend/Locale/Data/characters.xml b/lib/internal/Zend/Locale/Data/characters.xml similarity index 100% rename from lib/Zend/Locale/Data/characters.xml rename to lib/internal/Zend/Locale/Data/characters.xml diff --git a/lib/Zend/Locale/Data/cop.xml b/lib/internal/Zend/Locale/Data/cop.xml similarity index 100% rename from lib/Zend/Locale/Data/cop.xml rename to lib/internal/Zend/Locale/Data/cop.xml diff --git a/lib/Zend/Locale/Data/cs.xml b/lib/internal/Zend/Locale/Data/cs.xml similarity index 100% rename from lib/Zend/Locale/Data/cs.xml rename to lib/internal/Zend/Locale/Data/cs.xml diff --git a/lib/Zend/Locale/Data/cs_CZ.xml b/lib/internal/Zend/Locale/Data/cs_CZ.xml similarity index 100% rename from lib/Zend/Locale/Data/cs_CZ.xml rename to lib/internal/Zend/Locale/Data/cs_CZ.xml diff --git a/lib/Zend/Locale/Data/cy.xml b/lib/internal/Zend/Locale/Data/cy.xml similarity index 100% rename from lib/Zend/Locale/Data/cy.xml rename to lib/internal/Zend/Locale/Data/cy.xml diff --git a/lib/Zend/Locale/Data/cy_GB.xml b/lib/internal/Zend/Locale/Data/cy_GB.xml similarity index 100% rename from lib/Zend/Locale/Data/cy_GB.xml rename to lib/internal/Zend/Locale/Data/cy_GB.xml diff --git a/lib/Zend/Locale/Data/da.xml b/lib/internal/Zend/Locale/Data/da.xml similarity index 100% rename from lib/Zend/Locale/Data/da.xml rename to lib/internal/Zend/Locale/Data/da.xml diff --git a/lib/Zend/Locale/Data/da_DK.xml b/lib/internal/Zend/Locale/Data/da_DK.xml similarity index 100% rename from lib/Zend/Locale/Data/da_DK.xml rename to lib/internal/Zend/Locale/Data/da_DK.xml diff --git a/lib/Zend/Locale/Data/de.xml b/lib/internal/Zend/Locale/Data/de.xml similarity index 100% rename from lib/Zend/Locale/Data/de.xml rename to lib/internal/Zend/Locale/Data/de.xml diff --git a/lib/Zend/Locale/Data/de_AT.xml b/lib/internal/Zend/Locale/Data/de_AT.xml similarity index 100% rename from lib/Zend/Locale/Data/de_AT.xml rename to lib/internal/Zend/Locale/Data/de_AT.xml diff --git a/lib/Zend/Locale/Data/de_BE.xml b/lib/internal/Zend/Locale/Data/de_BE.xml similarity index 100% rename from lib/Zend/Locale/Data/de_BE.xml rename to lib/internal/Zend/Locale/Data/de_BE.xml diff --git a/lib/Zend/Locale/Data/de_CH.xml b/lib/internal/Zend/Locale/Data/de_CH.xml similarity index 100% rename from lib/Zend/Locale/Data/de_CH.xml rename to lib/internal/Zend/Locale/Data/de_CH.xml diff --git a/lib/Zend/Locale/Data/de_DE.xml b/lib/internal/Zend/Locale/Data/de_DE.xml similarity index 100% rename from lib/Zend/Locale/Data/de_DE.xml rename to lib/internal/Zend/Locale/Data/de_DE.xml diff --git a/lib/Zend/Locale/Data/de_LI.xml b/lib/internal/Zend/Locale/Data/de_LI.xml similarity index 100% rename from lib/Zend/Locale/Data/de_LI.xml rename to lib/internal/Zend/Locale/Data/de_LI.xml diff --git a/lib/Zend/Locale/Data/de_LU.xml b/lib/internal/Zend/Locale/Data/de_LU.xml similarity index 100% rename from lib/Zend/Locale/Data/de_LU.xml rename to lib/internal/Zend/Locale/Data/de_LU.xml diff --git a/lib/Zend/Locale/Data/dv.xml b/lib/internal/Zend/Locale/Data/dv.xml similarity index 100% rename from lib/Zend/Locale/Data/dv.xml rename to lib/internal/Zend/Locale/Data/dv.xml diff --git a/lib/Zend/Locale/Data/dv_MV.xml b/lib/internal/Zend/Locale/Data/dv_MV.xml similarity index 100% rename from lib/Zend/Locale/Data/dv_MV.xml rename to lib/internal/Zend/Locale/Data/dv_MV.xml diff --git a/lib/Zend/Locale/Data/dz.xml b/lib/internal/Zend/Locale/Data/dz.xml similarity index 100% rename from lib/Zend/Locale/Data/dz.xml rename to lib/internal/Zend/Locale/Data/dz.xml diff --git a/lib/Zend/Locale/Data/dz_BT.xml b/lib/internal/Zend/Locale/Data/dz_BT.xml similarity index 100% rename from lib/Zend/Locale/Data/dz_BT.xml rename to lib/internal/Zend/Locale/Data/dz_BT.xml diff --git a/lib/Zend/Locale/Data/ee.xml b/lib/internal/Zend/Locale/Data/ee.xml similarity index 100% rename from lib/Zend/Locale/Data/ee.xml rename to lib/internal/Zend/Locale/Data/ee.xml diff --git a/lib/Zend/Locale/Data/ee_GH.xml b/lib/internal/Zend/Locale/Data/ee_GH.xml similarity index 100% rename from lib/Zend/Locale/Data/ee_GH.xml rename to lib/internal/Zend/Locale/Data/ee_GH.xml diff --git a/lib/Zend/Locale/Data/ee_TG.xml b/lib/internal/Zend/Locale/Data/ee_TG.xml similarity index 100% rename from lib/Zend/Locale/Data/ee_TG.xml rename to lib/internal/Zend/Locale/Data/ee_TG.xml diff --git a/lib/Zend/Locale/Data/el.xml b/lib/internal/Zend/Locale/Data/el.xml similarity index 100% rename from lib/Zend/Locale/Data/el.xml rename to lib/internal/Zend/Locale/Data/el.xml diff --git a/lib/Zend/Locale/Data/el_CY.xml b/lib/internal/Zend/Locale/Data/el_CY.xml similarity index 100% rename from lib/Zend/Locale/Data/el_CY.xml rename to lib/internal/Zend/Locale/Data/el_CY.xml diff --git a/lib/Zend/Locale/Data/el_GR.xml b/lib/internal/Zend/Locale/Data/el_GR.xml similarity index 100% rename from lib/Zend/Locale/Data/el_GR.xml rename to lib/internal/Zend/Locale/Data/el_GR.xml diff --git a/lib/Zend/Locale/Data/el_POLYTON.xml b/lib/internal/Zend/Locale/Data/el_POLYTON.xml similarity index 100% rename from lib/Zend/Locale/Data/el_POLYTON.xml rename to lib/internal/Zend/Locale/Data/el_POLYTON.xml diff --git a/lib/Zend/Locale/Data/en.xml b/lib/internal/Zend/Locale/Data/en.xml similarity index 100% rename from lib/Zend/Locale/Data/en.xml rename to lib/internal/Zend/Locale/Data/en.xml diff --git a/lib/Zend/Locale/Data/en_AS.xml b/lib/internal/Zend/Locale/Data/en_AS.xml similarity index 100% rename from lib/Zend/Locale/Data/en_AS.xml rename to lib/internal/Zend/Locale/Data/en_AS.xml diff --git a/lib/Zend/Locale/Data/en_AU.xml b/lib/internal/Zend/Locale/Data/en_AU.xml similarity index 100% rename from lib/Zend/Locale/Data/en_AU.xml rename to lib/internal/Zend/Locale/Data/en_AU.xml diff --git a/lib/Zend/Locale/Data/en_BE.xml b/lib/internal/Zend/Locale/Data/en_BE.xml similarity index 100% rename from lib/Zend/Locale/Data/en_BE.xml rename to lib/internal/Zend/Locale/Data/en_BE.xml diff --git a/lib/Zend/Locale/Data/en_BW.xml b/lib/internal/Zend/Locale/Data/en_BW.xml similarity index 100% rename from lib/Zend/Locale/Data/en_BW.xml rename to lib/internal/Zend/Locale/Data/en_BW.xml diff --git a/lib/Zend/Locale/Data/en_BZ.xml b/lib/internal/Zend/Locale/Data/en_BZ.xml similarity index 100% rename from lib/Zend/Locale/Data/en_BZ.xml rename to lib/internal/Zend/Locale/Data/en_BZ.xml diff --git a/lib/Zend/Locale/Data/en_CA.xml b/lib/internal/Zend/Locale/Data/en_CA.xml similarity index 100% rename from lib/Zend/Locale/Data/en_CA.xml rename to lib/internal/Zend/Locale/Data/en_CA.xml diff --git a/lib/Zend/Locale/Data/en_Dsrt.xml b/lib/internal/Zend/Locale/Data/en_Dsrt.xml similarity index 100% rename from lib/Zend/Locale/Data/en_Dsrt.xml rename to lib/internal/Zend/Locale/Data/en_Dsrt.xml diff --git a/lib/Zend/Locale/Data/en_Dsrt_US.xml b/lib/internal/Zend/Locale/Data/en_Dsrt_US.xml similarity index 100% rename from lib/Zend/Locale/Data/en_Dsrt_US.xml rename to lib/internal/Zend/Locale/Data/en_Dsrt_US.xml diff --git a/lib/Zend/Locale/Data/en_GB.xml b/lib/internal/Zend/Locale/Data/en_GB.xml similarity index 100% rename from lib/Zend/Locale/Data/en_GB.xml rename to lib/internal/Zend/Locale/Data/en_GB.xml diff --git a/lib/Zend/Locale/Data/en_GU.xml b/lib/internal/Zend/Locale/Data/en_GU.xml similarity index 100% rename from lib/Zend/Locale/Data/en_GU.xml rename to lib/internal/Zend/Locale/Data/en_GU.xml diff --git a/lib/Zend/Locale/Data/en_HK.xml b/lib/internal/Zend/Locale/Data/en_HK.xml similarity index 100% rename from lib/Zend/Locale/Data/en_HK.xml rename to lib/internal/Zend/Locale/Data/en_HK.xml diff --git a/lib/Zend/Locale/Data/en_IE.xml b/lib/internal/Zend/Locale/Data/en_IE.xml similarity index 100% rename from lib/Zend/Locale/Data/en_IE.xml rename to lib/internal/Zend/Locale/Data/en_IE.xml diff --git a/lib/Zend/Locale/Data/en_IN.xml b/lib/internal/Zend/Locale/Data/en_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/en_IN.xml rename to lib/internal/Zend/Locale/Data/en_IN.xml diff --git a/lib/Zend/Locale/Data/en_JM.xml b/lib/internal/Zend/Locale/Data/en_JM.xml similarity index 100% rename from lib/Zend/Locale/Data/en_JM.xml rename to lib/internal/Zend/Locale/Data/en_JM.xml diff --git a/lib/Zend/Locale/Data/en_MH.xml b/lib/internal/Zend/Locale/Data/en_MH.xml similarity index 100% rename from lib/Zend/Locale/Data/en_MH.xml rename to lib/internal/Zend/Locale/Data/en_MH.xml diff --git a/lib/Zend/Locale/Data/en_MP.xml b/lib/internal/Zend/Locale/Data/en_MP.xml similarity index 100% rename from lib/Zend/Locale/Data/en_MP.xml rename to lib/internal/Zend/Locale/Data/en_MP.xml diff --git a/lib/Zend/Locale/Data/en_MT.xml b/lib/internal/Zend/Locale/Data/en_MT.xml similarity index 100% rename from lib/Zend/Locale/Data/en_MT.xml rename to lib/internal/Zend/Locale/Data/en_MT.xml diff --git a/lib/Zend/Locale/Data/en_NA.xml b/lib/internal/Zend/Locale/Data/en_NA.xml similarity index 100% rename from lib/Zend/Locale/Data/en_NA.xml rename to lib/internal/Zend/Locale/Data/en_NA.xml diff --git a/lib/Zend/Locale/Data/en_NZ.xml b/lib/internal/Zend/Locale/Data/en_NZ.xml similarity index 100% rename from lib/Zend/Locale/Data/en_NZ.xml rename to lib/internal/Zend/Locale/Data/en_NZ.xml diff --git a/lib/Zend/Locale/Data/en_PH.xml b/lib/internal/Zend/Locale/Data/en_PH.xml similarity index 100% rename from lib/Zend/Locale/Data/en_PH.xml rename to lib/internal/Zend/Locale/Data/en_PH.xml diff --git a/lib/Zend/Locale/Data/en_PK.xml b/lib/internal/Zend/Locale/Data/en_PK.xml similarity index 100% rename from lib/Zend/Locale/Data/en_PK.xml rename to lib/internal/Zend/Locale/Data/en_PK.xml diff --git a/lib/Zend/Locale/Data/en_SG.xml b/lib/internal/Zend/Locale/Data/en_SG.xml similarity index 100% rename from lib/Zend/Locale/Data/en_SG.xml rename to lib/internal/Zend/Locale/Data/en_SG.xml diff --git a/lib/Zend/Locale/Data/en_Shaw.xml b/lib/internal/Zend/Locale/Data/en_Shaw.xml similarity index 100% rename from lib/Zend/Locale/Data/en_Shaw.xml rename to lib/internal/Zend/Locale/Data/en_Shaw.xml diff --git a/lib/Zend/Locale/Data/en_TT.xml b/lib/internal/Zend/Locale/Data/en_TT.xml similarity index 100% rename from lib/Zend/Locale/Data/en_TT.xml rename to lib/internal/Zend/Locale/Data/en_TT.xml diff --git a/lib/Zend/Locale/Data/en_UM.xml b/lib/internal/Zend/Locale/Data/en_UM.xml similarity index 100% rename from lib/Zend/Locale/Data/en_UM.xml rename to lib/internal/Zend/Locale/Data/en_UM.xml diff --git a/lib/Zend/Locale/Data/en_US.xml b/lib/internal/Zend/Locale/Data/en_US.xml similarity index 100% rename from lib/Zend/Locale/Data/en_US.xml rename to lib/internal/Zend/Locale/Data/en_US.xml diff --git a/lib/Zend/Locale/Data/en_US_POSIX.xml b/lib/internal/Zend/Locale/Data/en_US_POSIX.xml similarity index 100% rename from lib/Zend/Locale/Data/en_US_POSIX.xml rename to lib/internal/Zend/Locale/Data/en_US_POSIX.xml diff --git a/lib/Zend/Locale/Data/en_VI.xml b/lib/internal/Zend/Locale/Data/en_VI.xml similarity index 100% rename from lib/Zend/Locale/Data/en_VI.xml rename to lib/internal/Zend/Locale/Data/en_VI.xml diff --git a/lib/Zend/Locale/Data/en_ZA.xml b/lib/internal/Zend/Locale/Data/en_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/en_ZA.xml rename to lib/internal/Zend/Locale/Data/en_ZA.xml diff --git a/lib/Zend/Locale/Data/en_ZW.xml b/lib/internal/Zend/Locale/Data/en_ZW.xml similarity index 100% rename from lib/Zend/Locale/Data/en_ZW.xml rename to lib/internal/Zend/Locale/Data/en_ZW.xml diff --git a/lib/Zend/Locale/Data/eo.xml b/lib/internal/Zend/Locale/Data/eo.xml similarity index 100% rename from lib/Zend/Locale/Data/eo.xml rename to lib/internal/Zend/Locale/Data/eo.xml diff --git a/lib/Zend/Locale/Data/es.xml b/lib/internal/Zend/Locale/Data/es.xml similarity index 100% rename from lib/Zend/Locale/Data/es.xml rename to lib/internal/Zend/Locale/Data/es.xml diff --git a/lib/Zend/Locale/Data/es_AR.xml b/lib/internal/Zend/Locale/Data/es_AR.xml similarity index 100% rename from lib/Zend/Locale/Data/es_AR.xml rename to lib/internal/Zend/Locale/Data/es_AR.xml diff --git a/lib/Zend/Locale/Data/es_BO.xml b/lib/internal/Zend/Locale/Data/es_BO.xml similarity index 100% rename from lib/Zend/Locale/Data/es_BO.xml rename to lib/internal/Zend/Locale/Data/es_BO.xml diff --git a/lib/Zend/Locale/Data/es_CL.xml b/lib/internal/Zend/Locale/Data/es_CL.xml similarity index 100% rename from lib/Zend/Locale/Data/es_CL.xml rename to lib/internal/Zend/Locale/Data/es_CL.xml diff --git a/lib/Zend/Locale/Data/es_CO.xml b/lib/internal/Zend/Locale/Data/es_CO.xml similarity index 100% rename from lib/Zend/Locale/Data/es_CO.xml rename to lib/internal/Zend/Locale/Data/es_CO.xml diff --git a/lib/Zend/Locale/Data/es_CR.xml b/lib/internal/Zend/Locale/Data/es_CR.xml similarity index 100% rename from lib/Zend/Locale/Data/es_CR.xml rename to lib/internal/Zend/Locale/Data/es_CR.xml diff --git a/lib/Zend/Locale/Data/es_DO.xml b/lib/internal/Zend/Locale/Data/es_DO.xml similarity index 100% rename from lib/Zend/Locale/Data/es_DO.xml rename to lib/internal/Zend/Locale/Data/es_DO.xml diff --git a/lib/Zend/Locale/Data/es_EC.xml b/lib/internal/Zend/Locale/Data/es_EC.xml similarity index 100% rename from lib/Zend/Locale/Data/es_EC.xml rename to lib/internal/Zend/Locale/Data/es_EC.xml diff --git a/lib/Zend/Locale/Data/es_ES.xml b/lib/internal/Zend/Locale/Data/es_ES.xml similarity index 100% rename from lib/Zend/Locale/Data/es_ES.xml rename to lib/internal/Zend/Locale/Data/es_ES.xml diff --git a/lib/Zend/Locale/Data/es_GT.xml b/lib/internal/Zend/Locale/Data/es_GT.xml similarity index 100% rename from lib/Zend/Locale/Data/es_GT.xml rename to lib/internal/Zend/Locale/Data/es_GT.xml diff --git a/lib/Zend/Locale/Data/es_HN.xml b/lib/internal/Zend/Locale/Data/es_HN.xml similarity index 100% rename from lib/Zend/Locale/Data/es_HN.xml rename to lib/internal/Zend/Locale/Data/es_HN.xml diff --git a/lib/Zend/Locale/Data/es_MX.xml b/lib/internal/Zend/Locale/Data/es_MX.xml similarity index 100% rename from lib/Zend/Locale/Data/es_MX.xml rename to lib/internal/Zend/Locale/Data/es_MX.xml diff --git a/lib/Zend/Locale/Data/es_NI.xml b/lib/internal/Zend/Locale/Data/es_NI.xml similarity index 100% rename from lib/Zend/Locale/Data/es_NI.xml rename to lib/internal/Zend/Locale/Data/es_NI.xml diff --git a/lib/Zend/Locale/Data/es_PA.xml b/lib/internal/Zend/Locale/Data/es_PA.xml similarity index 100% rename from lib/Zend/Locale/Data/es_PA.xml rename to lib/internal/Zend/Locale/Data/es_PA.xml diff --git a/lib/Zend/Locale/Data/es_PE.xml b/lib/internal/Zend/Locale/Data/es_PE.xml similarity index 100% rename from lib/Zend/Locale/Data/es_PE.xml rename to lib/internal/Zend/Locale/Data/es_PE.xml diff --git a/lib/Zend/Locale/Data/es_PR.xml b/lib/internal/Zend/Locale/Data/es_PR.xml similarity index 100% rename from lib/Zend/Locale/Data/es_PR.xml rename to lib/internal/Zend/Locale/Data/es_PR.xml diff --git a/lib/Zend/Locale/Data/es_PY.xml b/lib/internal/Zend/Locale/Data/es_PY.xml similarity index 100% rename from lib/Zend/Locale/Data/es_PY.xml rename to lib/internal/Zend/Locale/Data/es_PY.xml diff --git a/lib/Zend/Locale/Data/es_SV.xml b/lib/internal/Zend/Locale/Data/es_SV.xml similarity index 100% rename from lib/Zend/Locale/Data/es_SV.xml rename to lib/internal/Zend/Locale/Data/es_SV.xml diff --git a/lib/Zend/Locale/Data/es_US.xml b/lib/internal/Zend/Locale/Data/es_US.xml similarity index 100% rename from lib/Zend/Locale/Data/es_US.xml rename to lib/internal/Zend/Locale/Data/es_US.xml diff --git a/lib/Zend/Locale/Data/es_UY.xml b/lib/internal/Zend/Locale/Data/es_UY.xml similarity index 100% rename from lib/Zend/Locale/Data/es_UY.xml rename to lib/internal/Zend/Locale/Data/es_UY.xml diff --git a/lib/Zend/Locale/Data/es_VE.xml b/lib/internal/Zend/Locale/Data/es_VE.xml similarity index 100% rename from lib/Zend/Locale/Data/es_VE.xml rename to lib/internal/Zend/Locale/Data/es_VE.xml diff --git a/lib/Zend/Locale/Data/et.xml b/lib/internal/Zend/Locale/Data/et.xml similarity index 100% rename from lib/Zend/Locale/Data/et.xml rename to lib/internal/Zend/Locale/Data/et.xml diff --git a/lib/Zend/Locale/Data/et_EE.xml b/lib/internal/Zend/Locale/Data/et_EE.xml similarity index 100% rename from lib/Zend/Locale/Data/et_EE.xml rename to lib/internal/Zend/Locale/Data/et_EE.xml diff --git a/lib/Zend/Locale/Data/eu.xml b/lib/internal/Zend/Locale/Data/eu.xml similarity index 100% rename from lib/Zend/Locale/Data/eu.xml rename to lib/internal/Zend/Locale/Data/eu.xml diff --git a/lib/Zend/Locale/Data/eu_ES.xml b/lib/internal/Zend/Locale/Data/eu_ES.xml similarity index 100% rename from lib/Zend/Locale/Data/eu_ES.xml rename to lib/internal/Zend/Locale/Data/eu_ES.xml diff --git a/lib/Zend/Locale/Data/fa.xml b/lib/internal/Zend/Locale/Data/fa.xml similarity index 100% rename from lib/Zend/Locale/Data/fa.xml rename to lib/internal/Zend/Locale/Data/fa.xml diff --git a/lib/Zend/Locale/Data/fa_AF.xml b/lib/internal/Zend/Locale/Data/fa_AF.xml similarity index 100% rename from lib/Zend/Locale/Data/fa_AF.xml rename to lib/internal/Zend/Locale/Data/fa_AF.xml diff --git a/lib/Zend/Locale/Data/fa_IR.xml b/lib/internal/Zend/Locale/Data/fa_IR.xml similarity index 100% rename from lib/Zend/Locale/Data/fa_IR.xml rename to lib/internal/Zend/Locale/Data/fa_IR.xml diff --git a/lib/Zend/Locale/Data/fi.xml b/lib/internal/Zend/Locale/Data/fi.xml similarity index 100% rename from lib/Zend/Locale/Data/fi.xml rename to lib/internal/Zend/Locale/Data/fi.xml diff --git a/lib/Zend/Locale/Data/fi_FI.xml b/lib/internal/Zend/Locale/Data/fi_FI.xml similarity index 100% rename from lib/Zend/Locale/Data/fi_FI.xml rename to lib/internal/Zend/Locale/Data/fi_FI.xml diff --git a/lib/Zend/Locale/Data/fil.xml b/lib/internal/Zend/Locale/Data/fil.xml similarity index 100% rename from lib/Zend/Locale/Data/fil.xml rename to lib/internal/Zend/Locale/Data/fil.xml diff --git a/lib/Zend/Locale/Data/fil_PH.xml b/lib/internal/Zend/Locale/Data/fil_PH.xml similarity index 100% rename from lib/Zend/Locale/Data/fil_PH.xml rename to lib/internal/Zend/Locale/Data/fil_PH.xml diff --git a/lib/Zend/Locale/Data/fo.xml b/lib/internal/Zend/Locale/Data/fo.xml similarity index 100% rename from lib/Zend/Locale/Data/fo.xml rename to lib/internal/Zend/Locale/Data/fo.xml diff --git a/lib/Zend/Locale/Data/fo_FO.xml b/lib/internal/Zend/Locale/Data/fo_FO.xml similarity index 100% rename from lib/Zend/Locale/Data/fo_FO.xml rename to lib/internal/Zend/Locale/Data/fo_FO.xml diff --git a/lib/Zend/Locale/Data/fr.xml b/lib/internal/Zend/Locale/Data/fr.xml similarity index 100% rename from lib/Zend/Locale/Data/fr.xml rename to lib/internal/Zend/Locale/Data/fr.xml diff --git a/lib/Zend/Locale/Data/fr_BE.xml b/lib/internal/Zend/Locale/Data/fr_BE.xml similarity index 100% rename from lib/Zend/Locale/Data/fr_BE.xml rename to lib/internal/Zend/Locale/Data/fr_BE.xml diff --git a/lib/Zend/Locale/Data/fr_CA.xml b/lib/internal/Zend/Locale/Data/fr_CA.xml similarity index 100% rename from lib/Zend/Locale/Data/fr_CA.xml rename to lib/internal/Zend/Locale/Data/fr_CA.xml diff --git a/lib/Zend/Locale/Data/fr_CH.xml b/lib/internal/Zend/Locale/Data/fr_CH.xml similarity index 100% rename from lib/Zend/Locale/Data/fr_CH.xml rename to lib/internal/Zend/Locale/Data/fr_CH.xml diff --git a/lib/Zend/Locale/Data/fr_FR.xml b/lib/internal/Zend/Locale/Data/fr_FR.xml similarity index 100% rename from lib/Zend/Locale/Data/fr_FR.xml rename to lib/internal/Zend/Locale/Data/fr_FR.xml diff --git a/lib/Zend/Locale/Data/fr_LU.xml b/lib/internal/Zend/Locale/Data/fr_LU.xml similarity index 100% rename from lib/Zend/Locale/Data/fr_LU.xml rename to lib/internal/Zend/Locale/Data/fr_LU.xml diff --git a/lib/Zend/Locale/Data/fr_MC.xml b/lib/internal/Zend/Locale/Data/fr_MC.xml similarity index 100% rename from lib/Zend/Locale/Data/fr_MC.xml rename to lib/internal/Zend/Locale/Data/fr_MC.xml diff --git a/lib/Zend/Locale/Data/fr_SN.xml b/lib/internal/Zend/Locale/Data/fr_SN.xml similarity index 100% rename from lib/Zend/Locale/Data/fr_SN.xml rename to lib/internal/Zend/Locale/Data/fr_SN.xml diff --git a/lib/Zend/Locale/Data/fur.xml b/lib/internal/Zend/Locale/Data/fur.xml similarity index 100% rename from lib/Zend/Locale/Data/fur.xml rename to lib/internal/Zend/Locale/Data/fur.xml diff --git a/lib/Zend/Locale/Data/fur_IT.xml b/lib/internal/Zend/Locale/Data/fur_IT.xml similarity index 100% rename from lib/Zend/Locale/Data/fur_IT.xml rename to lib/internal/Zend/Locale/Data/fur_IT.xml diff --git a/lib/Zend/Locale/Data/ga.xml b/lib/internal/Zend/Locale/Data/ga.xml similarity index 100% rename from lib/Zend/Locale/Data/ga.xml rename to lib/internal/Zend/Locale/Data/ga.xml diff --git a/lib/Zend/Locale/Data/ga_IE.xml b/lib/internal/Zend/Locale/Data/ga_IE.xml similarity index 100% rename from lib/Zend/Locale/Data/ga_IE.xml rename to lib/internal/Zend/Locale/Data/ga_IE.xml diff --git a/lib/Zend/Locale/Data/gaa.xml b/lib/internal/Zend/Locale/Data/gaa.xml similarity index 100% rename from lib/Zend/Locale/Data/gaa.xml rename to lib/internal/Zend/Locale/Data/gaa.xml diff --git a/lib/Zend/Locale/Data/gaa_GH.xml b/lib/internal/Zend/Locale/Data/gaa_GH.xml similarity index 100% rename from lib/Zend/Locale/Data/gaa_GH.xml rename to lib/internal/Zend/Locale/Data/gaa_GH.xml diff --git a/lib/Zend/Locale/Data/gez.xml b/lib/internal/Zend/Locale/Data/gez.xml similarity index 100% rename from lib/Zend/Locale/Data/gez.xml rename to lib/internal/Zend/Locale/Data/gez.xml diff --git a/lib/Zend/Locale/Data/gez_ER.xml b/lib/internal/Zend/Locale/Data/gez_ER.xml similarity index 100% rename from lib/Zend/Locale/Data/gez_ER.xml rename to lib/internal/Zend/Locale/Data/gez_ER.xml diff --git a/lib/Zend/Locale/Data/gez_ET.xml b/lib/internal/Zend/Locale/Data/gez_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/gez_ET.xml rename to lib/internal/Zend/Locale/Data/gez_ET.xml diff --git a/lib/Zend/Locale/Data/gl.xml b/lib/internal/Zend/Locale/Data/gl.xml similarity index 100% rename from lib/Zend/Locale/Data/gl.xml rename to lib/internal/Zend/Locale/Data/gl.xml diff --git a/lib/Zend/Locale/Data/gl_ES.xml b/lib/internal/Zend/Locale/Data/gl_ES.xml similarity index 100% rename from lib/Zend/Locale/Data/gl_ES.xml rename to lib/internal/Zend/Locale/Data/gl_ES.xml diff --git a/lib/Zend/Locale/Data/gsw.xml b/lib/internal/Zend/Locale/Data/gsw.xml similarity index 100% rename from lib/Zend/Locale/Data/gsw.xml rename to lib/internal/Zend/Locale/Data/gsw.xml diff --git a/lib/Zend/Locale/Data/gsw_CH.xml b/lib/internal/Zend/Locale/Data/gsw_CH.xml similarity index 100% rename from lib/Zend/Locale/Data/gsw_CH.xml rename to lib/internal/Zend/Locale/Data/gsw_CH.xml diff --git a/lib/Zend/Locale/Data/gu.xml b/lib/internal/Zend/Locale/Data/gu.xml similarity index 100% rename from lib/Zend/Locale/Data/gu.xml rename to lib/internal/Zend/Locale/Data/gu.xml diff --git a/lib/Zend/Locale/Data/gu_IN.xml b/lib/internal/Zend/Locale/Data/gu_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/gu_IN.xml rename to lib/internal/Zend/Locale/Data/gu_IN.xml diff --git a/lib/Zend/Locale/Data/gv.xml b/lib/internal/Zend/Locale/Data/gv.xml similarity index 100% rename from lib/Zend/Locale/Data/gv.xml rename to lib/internal/Zend/Locale/Data/gv.xml diff --git a/lib/Zend/Locale/Data/gv_GB.xml b/lib/internal/Zend/Locale/Data/gv_GB.xml similarity index 100% rename from lib/Zend/Locale/Data/gv_GB.xml rename to lib/internal/Zend/Locale/Data/gv_GB.xml diff --git a/lib/Zend/Locale/Data/ha.xml b/lib/internal/Zend/Locale/Data/ha.xml similarity index 100% rename from lib/Zend/Locale/Data/ha.xml rename to lib/internal/Zend/Locale/Data/ha.xml diff --git a/lib/Zend/Locale/Data/ha_Arab.xml b/lib/internal/Zend/Locale/Data/ha_Arab.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_Arab.xml rename to lib/internal/Zend/Locale/Data/ha_Arab.xml diff --git a/lib/Zend/Locale/Data/ha_Arab_NG.xml b/lib/internal/Zend/Locale/Data/ha_Arab_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_Arab_NG.xml rename to lib/internal/Zend/Locale/Data/ha_Arab_NG.xml diff --git a/lib/Zend/Locale/Data/ha_Arab_SD.xml b/lib/internal/Zend/Locale/Data/ha_Arab_SD.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_Arab_SD.xml rename to lib/internal/Zend/Locale/Data/ha_Arab_SD.xml diff --git a/lib/Zend/Locale/Data/ha_GH.xml b/lib/internal/Zend/Locale/Data/ha_GH.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_GH.xml rename to lib/internal/Zend/Locale/Data/ha_GH.xml diff --git a/lib/Zend/Locale/Data/ha_Latn.xml b/lib/internal/Zend/Locale/Data/ha_Latn.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_Latn.xml rename to lib/internal/Zend/Locale/Data/ha_Latn.xml diff --git a/lib/Zend/Locale/Data/ha_Latn_GH.xml b/lib/internal/Zend/Locale/Data/ha_Latn_GH.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_Latn_GH.xml rename to lib/internal/Zend/Locale/Data/ha_Latn_GH.xml diff --git a/lib/Zend/Locale/Data/ha_Latn_NE.xml b/lib/internal/Zend/Locale/Data/ha_Latn_NE.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_Latn_NE.xml rename to lib/internal/Zend/Locale/Data/ha_Latn_NE.xml diff --git a/lib/Zend/Locale/Data/ha_Latn_NG.xml b/lib/internal/Zend/Locale/Data/ha_Latn_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_Latn_NG.xml rename to lib/internal/Zend/Locale/Data/ha_Latn_NG.xml diff --git a/lib/Zend/Locale/Data/ha_NE.xml b/lib/internal/Zend/Locale/Data/ha_NE.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_NE.xml rename to lib/internal/Zend/Locale/Data/ha_NE.xml diff --git a/lib/Zend/Locale/Data/ha_NG.xml b/lib/internal/Zend/Locale/Data/ha_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_NG.xml rename to lib/internal/Zend/Locale/Data/ha_NG.xml diff --git a/lib/Zend/Locale/Data/ha_SD.xml b/lib/internal/Zend/Locale/Data/ha_SD.xml similarity index 100% rename from lib/Zend/Locale/Data/ha_SD.xml rename to lib/internal/Zend/Locale/Data/ha_SD.xml diff --git a/lib/Zend/Locale/Data/haw.xml b/lib/internal/Zend/Locale/Data/haw.xml similarity index 100% rename from lib/Zend/Locale/Data/haw.xml rename to lib/internal/Zend/Locale/Data/haw.xml diff --git a/lib/Zend/Locale/Data/haw_US.xml b/lib/internal/Zend/Locale/Data/haw_US.xml similarity index 100% rename from lib/Zend/Locale/Data/haw_US.xml rename to lib/internal/Zend/Locale/Data/haw_US.xml diff --git a/lib/Zend/Locale/Data/he.xml b/lib/internal/Zend/Locale/Data/he.xml similarity index 100% rename from lib/Zend/Locale/Data/he.xml rename to lib/internal/Zend/Locale/Data/he.xml diff --git a/lib/Zend/Locale/Data/he_IL.xml b/lib/internal/Zend/Locale/Data/he_IL.xml similarity index 100% rename from lib/Zend/Locale/Data/he_IL.xml rename to lib/internal/Zend/Locale/Data/he_IL.xml diff --git a/lib/Zend/Locale/Data/hi.xml b/lib/internal/Zend/Locale/Data/hi.xml similarity index 100% rename from lib/Zend/Locale/Data/hi.xml rename to lib/internal/Zend/Locale/Data/hi.xml diff --git a/lib/Zend/Locale/Data/hi_IN.xml b/lib/internal/Zend/Locale/Data/hi_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/hi_IN.xml rename to lib/internal/Zend/Locale/Data/hi_IN.xml diff --git a/lib/Zend/Locale/Data/hr.xml b/lib/internal/Zend/Locale/Data/hr.xml similarity index 100% rename from lib/Zend/Locale/Data/hr.xml rename to lib/internal/Zend/Locale/Data/hr.xml diff --git a/lib/Zend/Locale/Data/hr_HR.xml b/lib/internal/Zend/Locale/Data/hr_HR.xml similarity index 100% rename from lib/Zend/Locale/Data/hr_HR.xml rename to lib/internal/Zend/Locale/Data/hr_HR.xml diff --git a/lib/Zend/Locale/Data/hu.xml b/lib/internal/Zend/Locale/Data/hu.xml similarity index 100% rename from lib/Zend/Locale/Data/hu.xml rename to lib/internal/Zend/Locale/Data/hu.xml diff --git a/lib/Zend/Locale/Data/hu_HU.xml b/lib/internal/Zend/Locale/Data/hu_HU.xml similarity index 100% rename from lib/Zend/Locale/Data/hu_HU.xml rename to lib/internal/Zend/Locale/Data/hu_HU.xml diff --git a/lib/Zend/Locale/Data/hy.xml b/lib/internal/Zend/Locale/Data/hy.xml similarity index 100% rename from lib/Zend/Locale/Data/hy.xml rename to lib/internal/Zend/Locale/Data/hy.xml diff --git a/lib/Zend/Locale/Data/hy_AM.xml b/lib/internal/Zend/Locale/Data/hy_AM.xml similarity index 100% rename from lib/Zend/Locale/Data/hy_AM.xml rename to lib/internal/Zend/Locale/Data/hy_AM.xml diff --git a/lib/Zend/Locale/Data/hy_AM_REVISED.xml b/lib/internal/Zend/Locale/Data/hy_AM_REVISED.xml similarity index 100% rename from lib/Zend/Locale/Data/hy_AM_REVISED.xml rename to lib/internal/Zend/Locale/Data/hy_AM_REVISED.xml diff --git a/lib/Zend/Locale/Data/ia.xml b/lib/internal/Zend/Locale/Data/ia.xml similarity index 100% rename from lib/Zend/Locale/Data/ia.xml rename to lib/internal/Zend/Locale/Data/ia.xml diff --git a/lib/Zend/Locale/Data/id.xml b/lib/internal/Zend/Locale/Data/id.xml similarity index 100% rename from lib/Zend/Locale/Data/id.xml rename to lib/internal/Zend/Locale/Data/id.xml diff --git a/lib/Zend/Locale/Data/id_ID.xml b/lib/internal/Zend/Locale/Data/id_ID.xml similarity index 100% rename from lib/Zend/Locale/Data/id_ID.xml rename to lib/internal/Zend/Locale/Data/id_ID.xml diff --git a/lib/Zend/Locale/Data/ig.xml b/lib/internal/Zend/Locale/Data/ig.xml similarity index 100% rename from lib/Zend/Locale/Data/ig.xml rename to lib/internal/Zend/Locale/Data/ig.xml diff --git a/lib/Zend/Locale/Data/ig_NG.xml b/lib/internal/Zend/Locale/Data/ig_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/ig_NG.xml rename to lib/internal/Zend/Locale/Data/ig_NG.xml diff --git a/lib/Zend/Locale/Data/ii.xml b/lib/internal/Zend/Locale/Data/ii.xml similarity index 100% rename from lib/Zend/Locale/Data/ii.xml rename to lib/internal/Zend/Locale/Data/ii.xml diff --git a/lib/Zend/Locale/Data/ii_CN.xml b/lib/internal/Zend/Locale/Data/ii_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/ii_CN.xml rename to lib/internal/Zend/Locale/Data/ii_CN.xml diff --git a/lib/Zend/Locale/Data/in.xml b/lib/internal/Zend/Locale/Data/in.xml similarity index 100% rename from lib/Zend/Locale/Data/in.xml rename to lib/internal/Zend/Locale/Data/in.xml diff --git a/lib/Zend/Locale/Data/is.xml b/lib/internal/Zend/Locale/Data/is.xml similarity index 100% rename from lib/Zend/Locale/Data/is.xml rename to lib/internal/Zend/Locale/Data/is.xml diff --git a/lib/Zend/Locale/Data/is_IS.xml b/lib/internal/Zend/Locale/Data/is_IS.xml similarity index 100% rename from lib/Zend/Locale/Data/is_IS.xml rename to lib/internal/Zend/Locale/Data/is_IS.xml diff --git a/lib/Zend/Locale/Data/it.xml b/lib/internal/Zend/Locale/Data/it.xml similarity index 100% rename from lib/Zend/Locale/Data/it.xml rename to lib/internal/Zend/Locale/Data/it.xml diff --git a/lib/Zend/Locale/Data/it_CH.xml b/lib/internal/Zend/Locale/Data/it_CH.xml similarity index 100% rename from lib/Zend/Locale/Data/it_CH.xml rename to lib/internal/Zend/Locale/Data/it_CH.xml diff --git a/lib/Zend/Locale/Data/it_IT.xml b/lib/internal/Zend/Locale/Data/it_IT.xml similarity index 100% rename from lib/Zend/Locale/Data/it_IT.xml rename to lib/internal/Zend/Locale/Data/it_IT.xml diff --git a/lib/Zend/Locale/Data/iu.xml b/lib/internal/Zend/Locale/Data/iu.xml similarity index 100% rename from lib/Zend/Locale/Data/iu.xml rename to lib/internal/Zend/Locale/Data/iu.xml diff --git a/lib/Zend/Locale/Data/iw.xml b/lib/internal/Zend/Locale/Data/iw.xml similarity index 100% rename from lib/Zend/Locale/Data/iw.xml rename to lib/internal/Zend/Locale/Data/iw.xml diff --git a/lib/Zend/Locale/Data/ja.xml b/lib/internal/Zend/Locale/Data/ja.xml similarity index 100% rename from lib/Zend/Locale/Data/ja.xml rename to lib/internal/Zend/Locale/Data/ja.xml diff --git a/lib/Zend/Locale/Data/ja_JP.xml b/lib/internal/Zend/Locale/Data/ja_JP.xml similarity index 100% rename from lib/Zend/Locale/Data/ja_JP.xml rename to lib/internal/Zend/Locale/Data/ja_JP.xml diff --git a/lib/Zend/Locale/Data/ka.xml b/lib/internal/Zend/Locale/Data/ka.xml similarity index 100% rename from lib/Zend/Locale/Data/ka.xml rename to lib/internal/Zend/Locale/Data/ka.xml diff --git a/lib/Zend/Locale/Data/ka_GE.xml b/lib/internal/Zend/Locale/Data/ka_GE.xml similarity index 100% rename from lib/Zend/Locale/Data/ka_GE.xml rename to lib/internal/Zend/Locale/Data/ka_GE.xml diff --git a/lib/Zend/Locale/Data/kaj.xml b/lib/internal/Zend/Locale/Data/kaj.xml similarity index 100% rename from lib/Zend/Locale/Data/kaj.xml rename to lib/internal/Zend/Locale/Data/kaj.xml diff --git a/lib/Zend/Locale/Data/kaj_NG.xml b/lib/internal/Zend/Locale/Data/kaj_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/kaj_NG.xml rename to lib/internal/Zend/Locale/Data/kaj_NG.xml diff --git a/lib/Zend/Locale/Data/kam.xml b/lib/internal/Zend/Locale/Data/kam.xml similarity index 100% rename from lib/Zend/Locale/Data/kam.xml rename to lib/internal/Zend/Locale/Data/kam.xml diff --git a/lib/Zend/Locale/Data/kam_KE.xml b/lib/internal/Zend/Locale/Data/kam_KE.xml similarity index 100% rename from lib/Zend/Locale/Data/kam_KE.xml rename to lib/internal/Zend/Locale/Data/kam_KE.xml diff --git a/lib/Zend/Locale/Data/kcg.xml b/lib/internal/Zend/Locale/Data/kcg.xml similarity index 100% rename from lib/Zend/Locale/Data/kcg.xml rename to lib/internal/Zend/Locale/Data/kcg.xml diff --git a/lib/Zend/Locale/Data/kcg_NG.xml b/lib/internal/Zend/Locale/Data/kcg_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/kcg_NG.xml rename to lib/internal/Zend/Locale/Data/kcg_NG.xml diff --git a/lib/Zend/Locale/Data/kfo.xml b/lib/internal/Zend/Locale/Data/kfo.xml similarity index 100% rename from lib/Zend/Locale/Data/kfo.xml rename to lib/internal/Zend/Locale/Data/kfo.xml diff --git a/lib/Zend/Locale/Data/kfo_CI.xml b/lib/internal/Zend/Locale/Data/kfo_CI.xml similarity index 100% rename from lib/Zend/Locale/Data/kfo_CI.xml rename to lib/internal/Zend/Locale/Data/kfo_CI.xml diff --git a/lib/Zend/Locale/Data/kk.xml b/lib/internal/Zend/Locale/Data/kk.xml similarity index 100% rename from lib/Zend/Locale/Data/kk.xml rename to lib/internal/Zend/Locale/Data/kk.xml diff --git a/lib/Zend/Locale/Data/kk_Cyrl.xml b/lib/internal/Zend/Locale/Data/kk_Cyrl.xml similarity index 100% rename from lib/Zend/Locale/Data/kk_Cyrl.xml rename to lib/internal/Zend/Locale/Data/kk_Cyrl.xml diff --git a/lib/Zend/Locale/Data/kk_Cyrl_KZ.xml b/lib/internal/Zend/Locale/Data/kk_Cyrl_KZ.xml similarity index 100% rename from lib/Zend/Locale/Data/kk_Cyrl_KZ.xml rename to lib/internal/Zend/Locale/Data/kk_Cyrl_KZ.xml diff --git a/lib/Zend/Locale/Data/kk_KZ.xml b/lib/internal/Zend/Locale/Data/kk_KZ.xml similarity index 100% rename from lib/Zend/Locale/Data/kk_KZ.xml rename to lib/internal/Zend/Locale/Data/kk_KZ.xml diff --git a/lib/Zend/Locale/Data/kl.xml b/lib/internal/Zend/Locale/Data/kl.xml similarity index 100% rename from lib/Zend/Locale/Data/kl.xml rename to lib/internal/Zend/Locale/Data/kl.xml diff --git a/lib/Zend/Locale/Data/kl_GL.xml b/lib/internal/Zend/Locale/Data/kl_GL.xml similarity index 100% rename from lib/Zend/Locale/Data/kl_GL.xml rename to lib/internal/Zend/Locale/Data/kl_GL.xml diff --git a/lib/Zend/Locale/Data/km.xml b/lib/internal/Zend/Locale/Data/km.xml similarity index 100% rename from lib/Zend/Locale/Data/km.xml rename to lib/internal/Zend/Locale/Data/km.xml diff --git a/lib/Zend/Locale/Data/km_KH.xml b/lib/internal/Zend/Locale/Data/km_KH.xml similarity index 100% rename from lib/Zend/Locale/Data/km_KH.xml rename to lib/internal/Zend/Locale/Data/km_KH.xml diff --git a/lib/Zend/Locale/Data/kn.xml b/lib/internal/Zend/Locale/Data/kn.xml similarity index 100% rename from lib/Zend/Locale/Data/kn.xml rename to lib/internal/Zend/Locale/Data/kn.xml diff --git a/lib/Zend/Locale/Data/kn_IN.xml b/lib/internal/Zend/Locale/Data/kn_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/kn_IN.xml rename to lib/internal/Zend/Locale/Data/kn_IN.xml diff --git a/lib/Zend/Locale/Data/ko.xml b/lib/internal/Zend/Locale/Data/ko.xml similarity index 100% rename from lib/Zend/Locale/Data/ko.xml rename to lib/internal/Zend/Locale/Data/ko.xml diff --git a/lib/Zend/Locale/Data/ko_KR.xml b/lib/internal/Zend/Locale/Data/ko_KR.xml similarity index 100% rename from lib/Zend/Locale/Data/ko_KR.xml rename to lib/internal/Zend/Locale/Data/ko_KR.xml diff --git a/lib/Zend/Locale/Data/kok.xml b/lib/internal/Zend/Locale/Data/kok.xml similarity index 100% rename from lib/Zend/Locale/Data/kok.xml rename to lib/internal/Zend/Locale/Data/kok.xml diff --git a/lib/Zend/Locale/Data/kok_IN.xml b/lib/internal/Zend/Locale/Data/kok_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/kok_IN.xml rename to lib/internal/Zend/Locale/Data/kok_IN.xml diff --git a/lib/Zend/Locale/Data/kpe.xml b/lib/internal/Zend/Locale/Data/kpe.xml similarity index 100% rename from lib/Zend/Locale/Data/kpe.xml rename to lib/internal/Zend/Locale/Data/kpe.xml diff --git a/lib/Zend/Locale/Data/kpe_GN.xml b/lib/internal/Zend/Locale/Data/kpe_GN.xml similarity index 100% rename from lib/Zend/Locale/Data/kpe_GN.xml rename to lib/internal/Zend/Locale/Data/kpe_GN.xml diff --git a/lib/Zend/Locale/Data/kpe_LR.xml b/lib/internal/Zend/Locale/Data/kpe_LR.xml similarity index 100% rename from lib/Zend/Locale/Data/kpe_LR.xml rename to lib/internal/Zend/Locale/Data/kpe_LR.xml diff --git a/lib/Zend/Locale/Data/ku.xml b/lib/internal/Zend/Locale/Data/ku.xml similarity index 100% rename from lib/Zend/Locale/Data/ku.xml rename to lib/internal/Zend/Locale/Data/ku.xml diff --git a/lib/Zend/Locale/Data/ku_Arab.xml b/lib/internal/Zend/Locale/Data/ku_Arab.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_Arab.xml rename to lib/internal/Zend/Locale/Data/ku_Arab.xml diff --git a/lib/Zend/Locale/Data/ku_Arab_IQ.xml b/lib/internal/Zend/Locale/Data/ku_Arab_IQ.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_Arab_IQ.xml rename to lib/internal/Zend/Locale/Data/ku_Arab_IQ.xml diff --git a/lib/Zend/Locale/Data/ku_Arab_IR.xml b/lib/internal/Zend/Locale/Data/ku_Arab_IR.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_Arab_IR.xml rename to lib/internal/Zend/Locale/Data/ku_Arab_IR.xml diff --git a/lib/Zend/Locale/Data/ku_Arab_SY.xml b/lib/internal/Zend/Locale/Data/ku_Arab_SY.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_Arab_SY.xml rename to lib/internal/Zend/Locale/Data/ku_Arab_SY.xml diff --git a/lib/Zend/Locale/Data/ku_IQ.xml b/lib/internal/Zend/Locale/Data/ku_IQ.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_IQ.xml rename to lib/internal/Zend/Locale/Data/ku_IQ.xml diff --git a/lib/Zend/Locale/Data/ku_IR.xml b/lib/internal/Zend/Locale/Data/ku_IR.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_IR.xml rename to lib/internal/Zend/Locale/Data/ku_IR.xml diff --git a/lib/Zend/Locale/Data/ku_Latn.xml b/lib/internal/Zend/Locale/Data/ku_Latn.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_Latn.xml rename to lib/internal/Zend/Locale/Data/ku_Latn.xml diff --git a/lib/Zend/Locale/Data/ku_Latn_TR.xml b/lib/internal/Zend/Locale/Data/ku_Latn_TR.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_Latn_TR.xml rename to lib/internal/Zend/Locale/Data/ku_Latn_TR.xml diff --git a/lib/Zend/Locale/Data/ku_SY.xml b/lib/internal/Zend/Locale/Data/ku_SY.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_SY.xml rename to lib/internal/Zend/Locale/Data/ku_SY.xml diff --git a/lib/Zend/Locale/Data/ku_TR.xml b/lib/internal/Zend/Locale/Data/ku_TR.xml similarity index 100% rename from lib/Zend/Locale/Data/ku_TR.xml rename to lib/internal/Zend/Locale/Data/ku_TR.xml diff --git a/lib/Zend/Locale/Data/kw.xml b/lib/internal/Zend/Locale/Data/kw.xml similarity index 100% rename from lib/Zend/Locale/Data/kw.xml rename to lib/internal/Zend/Locale/Data/kw.xml diff --git a/lib/Zend/Locale/Data/kw_GB.xml b/lib/internal/Zend/Locale/Data/kw_GB.xml similarity index 100% rename from lib/Zend/Locale/Data/kw_GB.xml rename to lib/internal/Zend/Locale/Data/kw_GB.xml diff --git a/lib/Zend/Locale/Data/ky.xml b/lib/internal/Zend/Locale/Data/ky.xml similarity index 100% rename from lib/Zend/Locale/Data/ky.xml rename to lib/internal/Zend/Locale/Data/ky.xml diff --git a/lib/Zend/Locale/Data/ky_KG.xml b/lib/internal/Zend/Locale/Data/ky_KG.xml similarity index 100% rename from lib/Zend/Locale/Data/ky_KG.xml rename to lib/internal/Zend/Locale/Data/ky_KG.xml diff --git a/lib/Zend/Locale/Data/likelySubtags.xml b/lib/internal/Zend/Locale/Data/likelySubtags.xml similarity index 100% rename from lib/Zend/Locale/Data/likelySubtags.xml rename to lib/internal/Zend/Locale/Data/likelySubtags.xml diff --git a/lib/Zend/Locale/Data/ln.xml b/lib/internal/Zend/Locale/Data/ln.xml similarity index 100% rename from lib/Zend/Locale/Data/ln.xml rename to lib/internal/Zend/Locale/Data/ln.xml diff --git a/lib/Zend/Locale/Data/ln_CD.xml b/lib/internal/Zend/Locale/Data/ln_CD.xml similarity index 100% rename from lib/Zend/Locale/Data/ln_CD.xml rename to lib/internal/Zend/Locale/Data/ln_CD.xml diff --git a/lib/Zend/Locale/Data/ln_CG.xml b/lib/internal/Zend/Locale/Data/ln_CG.xml similarity index 100% rename from lib/Zend/Locale/Data/ln_CG.xml rename to lib/internal/Zend/Locale/Data/ln_CG.xml diff --git a/lib/Zend/Locale/Data/lo.xml b/lib/internal/Zend/Locale/Data/lo.xml similarity index 100% rename from lib/Zend/Locale/Data/lo.xml rename to lib/internal/Zend/Locale/Data/lo.xml diff --git a/lib/Zend/Locale/Data/lo_LA.xml b/lib/internal/Zend/Locale/Data/lo_LA.xml similarity index 100% rename from lib/Zend/Locale/Data/lo_LA.xml rename to lib/internal/Zend/Locale/Data/lo_LA.xml diff --git a/lib/Zend/Locale/Data/lt.xml b/lib/internal/Zend/Locale/Data/lt.xml similarity index 100% rename from lib/Zend/Locale/Data/lt.xml rename to lib/internal/Zend/Locale/Data/lt.xml diff --git a/lib/Zend/Locale/Data/lt_LT.xml b/lib/internal/Zend/Locale/Data/lt_LT.xml similarity index 100% rename from lib/Zend/Locale/Data/lt_LT.xml rename to lib/internal/Zend/Locale/Data/lt_LT.xml diff --git a/lib/Zend/Locale/Data/lv.xml b/lib/internal/Zend/Locale/Data/lv.xml similarity index 100% rename from lib/Zend/Locale/Data/lv.xml rename to lib/internal/Zend/Locale/Data/lv.xml diff --git a/lib/Zend/Locale/Data/lv_LV.xml b/lib/internal/Zend/Locale/Data/lv_LV.xml similarity index 100% rename from lib/Zend/Locale/Data/lv_LV.xml rename to lib/internal/Zend/Locale/Data/lv_LV.xml diff --git a/lib/Zend/Locale/Data/metazoneInfo.xml b/lib/internal/Zend/Locale/Data/metazoneInfo.xml similarity index 100% rename from lib/Zend/Locale/Data/metazoneInfo.xml rename to lib/internal/Zend/Locale/Data/metazoneInfo.xml diff --git a/lib/Zend/Locale/Data/mk.xml b/lib/internal/Zend/Locale/Data/mk.xml similarity index 100% rename from lib/Zend/Locale/Data/mk.xml rename to lib/internal/Zend/Locale/Data/mk.xml diff --git a/lib/Zend/Locale/Data/mk_MK.xml b/lib/internal/Zend/Locale/Data/mk_MK.xml similarity index 100% rename from lib/Zend/Locale/Data/mk_MK.xml rename to lib/internal/Zend/Locale/Data/mk_MK.xml diff --git a/lib/Zend/Locale/Data/ml.xml b/lib/internal/Zend/Locale/Data/ml.xml similarity index 100% rename from lib/Zend/Locale/Data/ml.xml rename to lib/internal/Zend/Locale/Data/ml.xml diff --git a/lib/Zend/Locale/Data/ml_IN.xml b/lib/internal/Zend/Locale/Data/ml_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/ml_IN.xml rename to lib/internal/Zend/Locale/Data/ml_IN.xml diff --git a/lib/Zend/Locale/Data/mn.xml b/lib/internal/Zend/Locale/Data/mn.xml similarity index 100% rename from lib/Zend/Locale/Data/mn.xml rename to lib/internal/Zend/Locale/Data/mn.xml diff --git a/lib/Zend/Locale/Data/mn_CN.xml b/lib/internal/Zend/Locale/Data/mn_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/mn_CN.xml rename to lib/internal/Zend/Locale/Data/mn_CN.xml diff --git a/lib/Zend/Locale/Data/mn_Cyrl.xml b/lib/internal/Zend/Locale/Data/mn_Cyrl.xml similarity index 100% rename from lib/Zend/Locale/Data/mn_Cyrl.xml rename to lib/internal/Zend/Locale/Data/mn_Cyrl.xml diff --git a/lib/Zend/Locale/Data/mn_Cyrl_MN.xml b/lib/internal/Zend/Locale/Data/mn_Cyrl_MN.xml similarity index 100% rename from lib/Zend/Locale/Data/mn_Cyrl_MN.xml rename to lib/internal/Zend/Locale/Data/mn_Cyrl_MN.xml diff --git a/lib/Zend/Locale/Data/mn_MN.xml b/lib/internal/Zend/Locale/Data/mn_MN.xml similarity index 100% rename from lib/Zend/Locale/Data/mn_MN.xml rename to lib/internal/Zend/Locale/Data/mn_MN.xml diff --git a/lib/Zend/Locale/Data/mn_Mong.xml b/lib/internal/Zend/Locale/Data/mn_Mong.xml similarity index 100% rename from lib/Zend/Locale/Data/mn_Mong.xml rename to lib/internal/Zend/Locale/Data/mn_Mong.xml diff --git a/lib/Zend/Locale/Data/mn_Mong_CN.xml b/lib/internal/Zend/Locale/Data/mn_Mong_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/mn_Mong_CN.xml rename to lib/internal/Zend/Locale/Data/mn_Mong_CN.xml diff --git a/lib/Zend/Locale/Data/mo.xml b/lib/internal/Zend/Locale/Data/mo.xml similarity index 100% rename from lib/Zend/Locale/Data/mo.xml rename to lib/internal/Zend/Locale/Data/mo.xml diff --git a/lib/Zend/Locale/Data/mr.xml b/lib/internal/Zend/Locale/Data/mr.xml similarity index 100% rename from lib/Zend/Locale/Data/mr.xml rename to lib/internal/Zend/Locale/Data/mr.xml diff --git a/lib/Zend/Locale/Data/mr_IN.xml b/lib/internal/Zend/Locale/Data/mr_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/mr_IN.xml rename to lib/internal/Zend/Locale/Data/mr_IN.xml diff --git a/lib/Zend/Locale/Data/ms.xml b/lib/internal/Zend/Locale/Data/ms.xml similarity index 100% rename from lib/Zend/Locale/Data/ms.xml rename to lib/internal/Zend/Locale/Data/ms.xml diff --git a/lib/Zend/Locale/Data/ms_BN.xml b/lib/internal/Zend/Locale/Data/ms_BN.xml similarity index 100% rename from lib/Zend/Locale/Data/ms_BN.xml rename to lib/internal/Zend/Locale/Data/ms_BN.xml diff --git a/lib/Zend/Locale/Data/ms_MY.xml b/lib/internal/Zend/Locale/Data/ms_MY.xml similarity index 100% rename from lib/Zend/Locale/Data/ms_MY.xml rename to lib/internal/Zend/Locale/Data/ms_MY.xml diff --git a/lib/Zend/Locale/Data/mt.xml b/lib/internal/Zend/Locale/Data/mt.xml similarity index 100% rename from lib/Zend/Locale/Data/mt.xml rename to lib/internal/Zend/Locale/Data/mt.xml diff --git a/lib/Zend/Locale/Data/mt_MT.xml b/lib/internal/Zend/Locale/Data/mt_MT.xml similarity index 100% rename from lib/Zend/Locale/Data/mt_MT.xml rename to lib/internal/Zend/Locale/Data/mt_MT.xml diff --git a/lib/Zend/Locale/Data/my.xml b/lib/internal/Zend/Locale/Data/my.xml similarity index 100% rename from lib/Zend/Locale/Data/my.xml rename to lib/internal/Zend/Locale/Data/my.xml diff --git a/lib/Zend/Locale/Data/my_MM.xml b/lib/internal/Zend/Locale/Data/my_MM.xml similarity index 100% rename from lib/Zend/Locale/Data/my_MM.xml rename to lib/internal/Zend/Locale/Data/my_MM.xml diff --git a/lib/Zend/Locale/Data/nb.xml b/lib/internal/Zend/Locale/Data/nb.xml similarity index 100% rename from lib/Zend/Locale/Data/nb.xml rename to lib/internal/Zend/Locale/Data/nb.xml diff --git a/lib/Zend/Locale/Data/nb_NO.xml b/lib/internal/Zend/Locale/Data/nb_NO.xml similarity index 100% rename from lib/Zend/Locale/Data/nb_NO.xml rename to lib/internal/Zend/Locale/Data/nb_NO.xml diff --git a/lib/Zend/Locale/Data/nds.xml b/lib/internal/Zend/Locale/Data/nds.xml similarity index 100% rename from lib/Zend/Locale/Data/nds.xml rename to lib/internal/Zend/Locale/Data/nds.xml diff --git a/lib/Zend/Locale/Data/nds_DE.xml b/lib/internal/Zend/Locale/Data/nds_DE.xml similarity index 100% rename from lib/Zend/Locale/Data/nds_DE.xml rename to lib/internal/Zend/Locale/Data/nds_DE.xml diff --git a/lib/Zend/Locale/Data/ne.xml b/lib/internal/Zend/Locale/Data/ne.xml similarity index 100% rename from lib/Zend/Locale/Data/ne.xml rename to lib/internal/Zend/Locale/Data/ne.xml diff --git a/lib/Zend/Locale/Data/ne_IN.xml b/lib/internal/Zend/Locale/Data/ne_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/ne_IN.xml rename to lib/internal/Zend/Locale/Data/ne_IN.xml diff --git a/lib/Zend/Locale/Data/ne_NP.xml b/lib/internal/Zend/Locale/Data/ne_NP.xml similarity index 100% rename from lib/Zend/Locale/Data/ne_NP.xml rename to lib/internal/Zend/Locale/Data/ne_NP.xml diff --git a/lib/Zend/Locale/Data/nl.xml b/lib/internal/Zend/Locale/Data/nl.xml similarity index 100% rename from lib/Zend/Locale/Data/nl.xml rename to lib/internal/Zend/Locale/Data/nl.xml diff --git a/lib/Zend/Locale/Data/nl_BE.xml b/lib/internal/Zend/Locale/Data/nl_BE.xml similarity index 100% rename from lib/Zend/Locale/Data/nl_BE.xml rename to lib/internal/Zend/Locale/Data/nl_BE.xml diff --git a/lib/Zend/Locale/Data/nl_NL.xml b/lib/internal/Zend/Locale/Data/nl_NL.xml similarity index 100% rename from lib/Zend/Locale/Data/nl_NL.xml rename to lib/internal/Zend/Locale/Data/nl_NL.xml diff --git a/lib/Zend/Locale/Data/nn.xml b/lib/internal/Zend/Locale/Data/nn.xml similarity index 100% rename from lib/Zend/Locale/Data/nn.xml rename to lib/internal/Zend/Locale/Data/nn.xml diff --git a/lib/Zend/Locale/Data/nn_NO.xml b/lib/internal/Zend/Locale/Data/nn_NO.xml similarity index 100% rename from lib/Zend/Locale/Data/nn_NO.xml rename to lib/internal/Zend/Locale/Data/nn_NO.xml diff --git a/lib/Zend/Locale/Data/no.xml b/lib/internal/Zend/Locale/Data/no.xml similarity index 100% rename from lib/Zend/Locale/Data/no.xml rename to lib/internal/Zend/Locale/Data/no.xml diff --git a/lib/Zend/Locale/Data/nr.xml b/lib/internal/Zend/Locale/Data/nr.xml similarity index 100% rename from lib/Zend/Locale/Data/nr.xml rename to lib/internal/Zend/Locale/Data/nr.xml diff --git a/lib/Zend/Locale/Data/nr_ZA.xml b/lib/internal/Zend/Locale/Data/nr_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/nr_ZA.xml rename to lib/internal/Zend/Locale/Data/nr_ZA.xml diff --git a/lib/Zend/Locale/Data/nso.xml b/lib/internal/Zend/Locale/Data/nso.xml similarity index 100% rename from lib/Zend/Locale/Data/nso.xml rename to lib/internal/Zend/Locale/Data/nso.xml diff --git a/lib/Zend/Locale/Data/nso_ZA.xml b/lib/internal/Zend/Locale/Data/nso_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/nso_ZA.xml rename to lib/internal/Zend/Locale/Data/nso_ZA.xml diff --git a/lib/Zend/Locale/Data/numberingSystems.xml b/lib/internal/Zend/Locale/Data/numberingSystems.xml similarity index 100% rename from lib/Zend/Locale/Data/numberingSystems.xml rename to lib/internal/Zend/Locale/Data/numberingSystems.xml diff --git a/lib/Zend/Locale/Data/ny.xml b/lib/internal/Zend/Locale/Data/ny.xml similarity index 100% rename from lib/Zend/Locale/Data/ny.xml rename to lib/internal/Zend/Locale/Data/ny.xml diff --git a/lib/Zend/Locale/Data/ny_MW.xml b/lib/internal/Zend/Locale/Data/ny_MW.xml similarity index 100% rename from lib/Zend/Locale/Data/ny_MW.xml rename to lib/internal/Zend/Locale/Data/ny_MW.xml diff --git a/lib/Zend/Locale/Data/oc.xml b/lib/internal/Zend/Locale/Data/oc.xml similarity index 100% rename from lib/Zend/Locale/Data/oc.xml rename to lib/internal/Zend/Locale/Data/oc.xml diff --git a/lib/Zend/Locale/Data/oc_FR.xml b/lib/internal/Zend/Locale/Data/oc_FR.xml similarity index 100% rename from lib/Zend/Locale/Data/oc_FR.xml rename to lib/internal/Zend/Locale/Data/oc_FR.xml diff --git a/lib/Zend/Locale/Data/om.xml b/lib/internal/Zend/Locale/Data/om.xml similarity index 100% rename from lib/Zend/Locale/Data/om.xml rename to lib/internal/Zend/Locale/Data/om.xml diff --git a/lib/Zend/Locale/Data/om_ET.xml b/lib/internal/Zend/Locale/Data/om_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/om_ET.xml rename to lib/internal/Zend/Locale/Data/om_ET.xml diff --git a/lib/Zend/Locale/Data/om_KE.xml b/lib/internal/Zend/Locale/Data/om_KE.xml similarity index 100% rename from lib/Zend/Locale/Data/om_KE.xml rename to lib/internal/Zend/Locale/Data/om_KE.xml diff --git a/lib/Zend/Locale/Data/or.xml b/lib/internal/Zend/Locale/Data/or.xml similarity index 100% rename from lib/Zend/Locale/Data/or.xml rename to lib/internal/Zend/Locale/Data/or.xml diff --git a/lib/Zend/Locale/Data/or_IN.xml b/lib/internal/Zend/Locale/Data/or_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/or_IN.xml rename to lib/internal/Zend/Locale/Data/or_IN.xml diff --git a/lib/Zend/Locale/Data/pa.xml b/lib/internal/Zend/Locale/Data/pa.xml similarity index 100% rename from lib/Zend/Locale/Data/pa.xml rename to lib/internal/Zend/Locale/Data/pa.xml diff --git a/lib/Zend/Locale/Data/pa_Arab.xml b/lib/internal/Zend/Locale/Data/pa_Arab.xml similarity index 100% rename from lib/Zend/Locale/Data/pa_Arab.xml rename to lib/internal/Zend/Locale/Data/pa_Arab.xml diff --git a/lib/Zend/Locale/Data/pa_Arab_PK.xml b/lib/internal/Zend/Locale/Data/pa_Arab_PK.xml similarity index 100% rename from lib/Zend/Locale/Data/pa_Arab_PK.xml rename to lib/internal/Zend/Locale/Data/pa_Arab_PK.xml diff --git a/lib/Zend/Locale/Data/pa_Guru.xml b/lib/internal/Zend/Locale/Data/pa_Guru.xml similarity index 100% rename from lib/Zend/Locale/Data/pa_Guru.xml rename to lib/internal/Zend/Locale/Data/pa_Guru.xml diff --git a/lib/Zend/Locale/Data/pa_Guru_IN.xml b/lib/internal/Zend/Locale/Data/pa_Guru_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/pa_Guru_IN.xml rename to lib/internal/Zend/Locale/Data/pa_Guru_IN.xml diff --git a/lib/Zend/Locale/Data/pa_IN.xml b/lib/internal/Zend/Locale/Data/pa_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/pa_IN.xml rename to lib/internal/Zend/Locale/Data/pa_IN.xml diff --git a/lib/Zend/Locale/Data/pa_PK.xml b/lib/internal/Zend/Locale/Data/pa_PK.xml similarity index 100% rename from lib/Zend/Locale/Data/pa_PK.xml rename to lib/internal/Zend/Locale/Data/pa_PK.xml diff --git a/lib/Zend/Locale/Data/pl.xml b/lib/internal/Zend/Locale/Data/pl.xml similarity index 100% rename from lib/Zend/Locale/Data/pl.xml rename to lib/internal/Zend/Locale/Data/pl.xml diff --git a/lib/Zend/Locale/Data/pl_PL.xml b/lib/internal/Zend/Locale/Data/pl_PL.xml similarity index 100% rename from lib/Zend/Locale/Data/pl_PL.xml rename to lib/internal/Zend/Locale/Data/pl_PL.xml diff --git a/lib/Zend/Locale/Data/postalCodeData.xml b/lib/internal/Zend/Locale/Data/postalCodeData.xml similarity index 100% rename from lib/Zend/Locale/Data/postalCodeData.xml rename to lib/internal/Zend/Locale/Data/postalCodeData.xml diff --git a/lib/Zend/Locale/Data/ps.xml b/lib/internal/Zend/Locale/Data/ps.xml similarity index 100% rename from lib/Zend/Locale/Data/ps.xml rename to lib/internal/Zend/Locale/Data/ps.xml diff --git a/lib/Zend/Locale/Data/ps_AF.xml b/lib/internal/Zend/Locale/Data/ps_AF.xml similarity index 100% rename from lib/Zend/Locale/Data/ps_AF.xml rename to lib/internal/Zend/Locale/Data/ps_AF.xml diff --git a/lib/Zend/Locale/Data/pt.xml b/lib/internal/Zend/Locale/Data/pt.xml similarity index 100% rename from lib/Zend/Locale/Data/pt.xml rename to lib/internal/Zend/Locale/Data/pt.xml diff --git a/lib/Zend/Locale/Data/pt_BR.xml b/lib/internal/Zend/Locale/Data/pt_BR.xml similarity index 100% rename from lib/Zend/Locale/Data/pt_BR.xml rename to lib/internal/Zend/Locale/Data/pt_BR.xml diff --git a/lib/Zend/Locale/Data/pt_PT.xml b/lib/internal/Zend/Locale/Data/pt_PT.xml similarity index 100% rename from lib/Zend/Locale/Data/pt_PT.xml rename to lib/internal/Zend/Locale/Data/pt_PT.xml diff --git a/lib/Zend/Locale/Data/ro.xml b/lib/internal/Zend/Locale/Data/ro.xml similarity index 100% rename from lib/Zend/Locale/Data/ro.xml rename to lib/internal/Zend/Locale/Data/ro.xml diff --git a/lib/Zend/Locale/Data/ro_MD.xml b/lib/internal/Zend/Locale/Data/ro_MD.xml similarity index 100% rename from lib/Zend/Locale/Data/ro_MD.xml rename to lib/internal/Zend/Locale/Data/ro_MD.xml diff --git a/lib/Zend/Locale/Data/ro_RO.xml b/lib/internal/Zend/Locale/Data/ro_RO.xml similarity index 100% rename from lib/Zend/Locale/Data/ro_RO.xml rename to lib/internal/Zend/Locale/Data/ro_RO.xml diff --git a/lib/Zend/Locale/Data/root.xml b/lib/internal/Zend/Locale/Data/root.xml similarity index 100% rename from lib/Zend/Locale/Data/root.xml rename to lib/internal/Zend/Locale/Data/root.xml diff --git a/lib/Zend/Locale/Data/ru.xml b/lib/internal/Zend/Locale/Data/ru.xml similarity index 100% rename from lib/Zend/Locale/Data/ru.xml rename to lib/internal/Zend/Locale/Data/ru.xml diff --git a/lib/Zend/Locale/Data/ru_RU.xml b/lib/internal/Zend/Locale/Data/ru_RU.xml similarity index 100% rename from lib/Zend/Locale/Data/ru_RU.xml rename to lib/internal/Zend/Locale/Data/ru_RU.xml diff --git a/lib/Zend/Locale/Data/ru_UA.xml b/lib/internal/Zend/Locale/Data/ru_UA.xml similarity index 100% rename from lib/Zend/Locale/Data/ru_UA.xml rename to lib/internal/Zend/Locale/Data/ru_UA.xml diff --git a/lib/Zend/Locale/Data/rw.xml b/lib/internal/Zend/Locale/Data/rw.xml similarity index 100% rename from lib/Zend/Locale/Data/rw.xml rename to lib/internal/Zend/Locale/Data/rw.xml diff --git a/lib/Zend/Locale/Data/rw_RW.xml b/lib/internal/Zend/Locale/Data/rw_RW.xml similarity index 100% rename from lib/Zend/Locale/Data/rw_RW.xml rename to lib/internal/Zend/Locale/Data/rw_RW.xml diff --git a/lib/Zend/Locale/Data/sa.xml b/lib/internal/Zend/Locale/Data/sa.xml similarity index 100% rename from lib/Zend/Locale/Data/sa.xml rename to lib/internal/Zend/Locale/Data/sa.xml diff --git a/lib/Zend/Locale/Data/sa_IN.xml b/lib/internal/Zend/Locale/Data/sa_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/sa_IN.xml rename to lib/internal/Zend/Locale/Data/sa_IN.xml diff --git a/lib/Zend/Locale/Data/se.xml b/lib/internal/Zend/Locale/Data/se.xml similarity index 100% rename from lib/Zend/Locale/Data/se.xml rename to lib/internal/Zend/Locale/Data/se.xml diff --git a/lib/Zend/Locale/Data/se_FI.xml b/lib/internal/Zend/Locale/Data/se_FI.xml similarity index 100% rename from lib/Zend/Locale/Data/se_FI.xml rename to lib/internal/Zend/Locale/Data/se_FI.xml diff --git a/lib/Zend/Locale/Data/se_NO.xml b/lib/internal/Zend/Locale/Data/se_NO.xml similarity index 100% rename from lib/Zend/Locale/Data/se_NO.xml rename to lib/internal/Zend/Locale/Data/se_NO.xml diff --git a/lib/Zend/Locale/Data/sh.xml b/lib/internal/Zend/Locale/Data/sh.xml similarity index 100% rename from lib/Zend/Locale/Data/sh.xml rename to lib/internal/Zend/Locale/Data/sh.xml diff --git a/lib/Zend/Locale/Data/sh_BA.xml b/lib/internal/Zend/Locale/Data/sh_BA.xml similarity index 100% rename from lib/Zend/Locale/Data/sh_BA.xml rename to lib/internal/Zend/Locale/Data/sh_BA.xml diff --git a/lib/Zend/Locale/Data/sh_CS.xml b/lib/internal/Zend/Locale/Data/sh_CS.xml similarity index 100% rename from lib/Zend/Locale/Data/sh_CS.xml rename to lib/internal/Zend/Locale/Data/sh_CS.xml diff --git a/lib/Zend/Locale/Data/sh_YU.xml b/lib/internal/Zend/Locale/Data/sh_YU.xml similarity index 100% rename from lib/Zend/Locale/Data/sh_YU.xml rename to lib/internal/Zend/Locale/Data/sh_YU.xml diff --git a/lib/Zend/Locale/Data/si.xml b/lib/internal/Zend/Locale/Data/si.xml similarity index 100% rename from lib/Zend/Locale/Data/si.xml rename to lib/internal/Zend/Locale/Data/si.xml diff --git a/lib/Zend/Locale/Data/si_LK.xml b/lib/internal/Zend/Locale/Data/si_LK.xml similarity index 100% rename from lib/Zend/Locale/Data/si_LK.xml rename to lib/internal/Zend/Locale/Data/si_LK.xml diff --git a/lib/Zend/Locale/Data/sid.xml b/lib/internal/Zend/Locale/Data/sid.xml similarity index 100% rename from lib/Zend/Locale/Data/sid.xml rename to lib/internal/Zend/Locale/Data/sid.xml diff --git a/lib/Zend/Locale/Data/sid_ET.xml b/lib/internal/Zend/Locale/Data/sid_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/sid_ET.xml rename to lib/internal/Zend/Locale/Data/sid_ET.xml diff --git a/lib/Zend/Locale/Data/sk.xml b/lib/internal/Zend/Locale/Data/sk.xml similarity index 100% rename from lib/Zend/Locale/Data/sk.xml rename to lib/internal/Zend/Locale/Data/sk.xml diff --git a/lib/Zend/Locale/Data/sk_SK.xml b/lib/internal/Zend/Locale/Data/sk_SK.xml similarity index 100% rename from lib/Zend/Locale/Data/sk_SK.xml rename to lib/internal/Zend/Locale/Data/sk_SK.xml diff --git a/lib/Zend/Locale/Data/sl.xml b/lib/internal/Zend/Locale/Data/sl.xml similarity index 100% rename from lib/Zend/Locale/Data/sl.xml rename to lib/internal/Zend/Locale/Data/sl.xml diff --git a/lib/Zend/Locale/Data/sl_SI.xml b/lib/internal/Zend/Locale/Data/sl_SI.xml similarity index 100% rename from lib/Zend/Locale/Data/sl_SI.xml rename to lib/internal/Zend/Locale/Data/sl_SI.xml diff --git a/lib/Zend/Locale/Data/so.xml b/lib/internal/Zend/Locale/Data/so.xml similarity index 100% rename from lib/Zend/Locale/Data/so.xml rename to lib/internal/Zend/Locale/Data/so.xml diff --git a/lib/Zend/Locale/Data/so_DJ.xml b/lib/internal/Zend/Locale/Data/so_DJ.xml similarity index 100% rename from lib/Zend/Locale/Data/so_DJ.xml rename to lib/internal/Zend/Locale/Data/so_DJ.xml diff --git a/lib/Zend/Locale/Data/so_ET.xml b/lib/internal/Zend/Locale/Data/so_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/so_ET.xml rename to lib/internal/Zend/Locale/Data/so_ET.xml diff --git a/lib/Zend/Locale/Data/so_KE.xml b/lib/internal/Zend/Locale/Data/so_KE.xml similarity index 100% rename from lib/Zend/Locale/Data/so_KE.xml rename to lib/internal/Zend/Locale/Data/so_KE.xml diff --git a/lib/Zend/Locale/Data/so_SO.xml b/lib/internal/Zend/Locale/Data/so_SO.xml similarity index 100% rename from lib/Zend/Locale/Data/so_SO.xml rename to lib/internal/Zend/Locale/Data/so_SO.xml diff --git a/lib/Zend/Locale/Data/sq.xml b/lib/internal/Zend/Locale/Data/sq.xml similarity index 100% rename from lib/Zend/Locale/Data/sq.xml rename to lib/internal/Zend/Locale/Data/sq.xml diff --git a/lib/Zend/Locale/Data/sq_AL.xml b/lib/internal/Zend/Locale/Data/sq_AL.xml similarity index 100% rename from lib/Zend/Locale/Data/sq_AL.xml rename to lib/internal/Zend/Locale/Data/sq_AL.xml diff --git a/lib/Zend/Locale/Data/sr.xml b/lib/internal/Zend/Locale/Data/sr.xml similarity index 100% rename from lib/Zend/Locale/Data/sr.xml rename to lib/internal/Zend/Locale/Data/sr.xml diff --git a/lib/Zend/Locale/Data/sr_BA.xml b/lib/internal/Zend/Locale/Data/sr_BA.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_BA.xml rename to lib/internal/Zend/Locale/Data/sr_BA.xml diff --git a/lib/Zend/Locale/Data/sr_CS.xml b/lib/internal/Zend/Locale/Data/sr_CS.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_CS.xml rename to lib/internal/Zend/Locale/Data/sr_CS.xml diff --git a/lib/Zend/Locale/Data/sr_Cyrl.xml b/lib/internal/Zend/Locale/Data/sr_Cyrl.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Cyrl.xml rename to lib/internal/Zend/Locale/Data/sr_Cyrl.xml diff --git a/lib/Zend/Locale/Data/sr_Cyrl_BA.xml b/lib/internal/Zend/Locale/Data/sr_Cyrl_BA.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Cyrl_BA.xml rename to lib/internal/Zend/Locale/Data/sr_Cyrl_BA.xml diff --git a/lib/Zend/Locale/Data/sr_Cyrl_CS.xml b/lib/internal/Zend/Locale/Data/sr_Cyrl_CS.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Cyrl_CS.xml rename to lib/internal/Zend/Locale/Data/sr_Cyrl_CS.xml diff --git a/lib/Zend/Locale/Data/sr_Cyrl_ME.xml b/lib/internal/Zend/Locale/Data/sr_Cyrl_ME.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Cyrl_ME.xml rename to lib/internal/Zend/Locale/Data/sr_Cyrl_ME.xml diff --git a/lib/Zend/Locale/Data/sr_Cyrl_RS.xml b/lib/internal/Zend/Locale/Data/sr_Cyrl_RS.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Cyrl_RS.xml rename to lib/internal/Zend/Locale/Data/sr_Cyrl_RS.xml diff --git a/lib/Zend/Locale/Data/sr_Cyrl_YU.xml b/lib/internal/Zend/Locale/Data/sr_Cyrl_YU.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Cyrl_YU.xml rename to lib/internal/Zend/Locale/Data/sr_Cyrl_YU.xml diff --git a/lib/Zend/Locale/Data/sr_Latn.xml b/lib/internal/Zend/Locale/Data/sr_Latn.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Latn.xml rename to lib/internal/Zend/Locale/Data/sr_Latn.xml diff --git a/lib/Zend/Locale/Data/sr_Latn_BA.xml b/lib/internal/Zend/Locale/Data/sr_Latn_BA.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Latn_BA.xml rename to lib/internal/Zend/Locale/Data/sr_Latn_BA.xml diff --git a/lib/Zend/Locale/Data/sr_Latn_CS.xml b/lib/internal/Zend/Locale/Data/sr_Latn_CS.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Latn_CS.xml rename to lib/internal/Zend/Locale/Data/sr_Latn_CS.xml diff --git a/lib/Zend/Locale/Data/sr_Latn_ME.xml b/lib/internal/Zend/Locale/Data/sr_Latn_ME.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Latn_ME.xml rename to lib/internal/Zend/Locale/Data/sr_Latn_ME.xml diff --git a/lib/Zend/Locale/Data/sr_Latn_RS.xml b/lib/internal/Zend/Locale/Data/sr_Latn_RS.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Latn_RS.xml rename to lib/internal/Zend/Locale/Data/sr_Latn_RS.xml diff --git a/lib/Zend/Locale/Data/sr_Latn_YU.xml b/lib/internal/Zend/Locale/Data/sr_Latn_YU.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_Latn_YU.xml rename to lib/internal/Zend/Locale/Data/sr_Latn_YU.xml diff --git a/lib/Zend/Locale/Data/sr_ME.xml b/lib/internal/Zend/Locale/Data/sr_ME.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_ME.xml rename to lib/internal/Zend/Locale/Data/sr_ME.xml diff --git a/lib/Zend/Locale/Data/sr_RS.xml b/lib/internal/Zend/Locale/Data/sr_RS.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_RS.xml rename to lib/internal/Zend/Locale/Data/sr_RS.xml diff --git a/lib/Zend/Locale/Data/sr_YU.xml b/lib/internal/Zend/Locale/Data/sr_YU.xml similarity index 100% rename from lib/Zend/Locale/Data/sr_YU.xml rename to lib/internal/Zend/Locale/Data/sr_YU.xml diff --git a/lib/Zend/Locale/Data/ss.xml b/lib/internal/Zend/Locale/Data/ss.xml similarity index 100% rename from lib/Zend/Locale/Data/ss.xml rename to lib/internal/Zend/Locale/Data/ss.xml diff --git a/lib/Zend/Locale/Data/ss_SZ.xml b/lib/internal/Zend/Locale/Data/ss_SZ.xml similarity index 100% rename from lib/Zend/Locale/Data/ss_SZ.xml rename to lib/internal/Zend/Locale/Data/ss_SZ.xml diff --git a/lib/Zend/Locale/Data/ss_ZA.xml b/lib/internal/Zend/Locale/Data/ss_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/ss_ZA.xml rename to lib/internal/Zend/Locale/Data/ss_ZA.xml diff --git a/lib/Zend/Locale/Data/st.xml b/lib/internal/Zend/Locale/Data/st.xml similarity index 100% rename from lib/Zend/Locale/Data/st.xml rename to lib/internal/Zend/Locale/Data/st.xml diff --git a/lib/Zend/Locale/Data/st_LS.xml b/lib/internal/Zend/Locale/Data/st_LS.xml similarity index 100% rename from lib/Zend/Locale/Data/st_LS.xml rename to lib/internal/Zend/Locale/Data/st_LS.xml diff --git a/lib/Zend/Locale/Data/st_ZA.xml b/lib/internal/Zend/Locale/Data/st_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/st_ZA.xml rename to lib/internal/Zend/Locale/Data/st_ZA.xml diff --git a/lib/Zend/Locale/Data/supplementalData.xml b/lib/internal/Zend/Locale/Data/supplementalData.xml similarity index 100% rename from lib/Zend/Locale/Data/supplementalData.xml rename to lib/internal/Zend/Locale/Data/supplementalData.xml diff --git a/lib/Zend/Locale/Data/sv.xml b/lib/internal/Zend/Locale/Data/sv.xml similarity index 100% rename from lib/Zend/Locale/Data/sv.xml rename to lib/internal/Zend/Locale/Data/sv.xml diff --git a/lib/Zend/Locale/Data/sv_FI.xml b/lib/internal/Zend/Locale/Data/sv_FI.xml similarity index 100% rename from lib/Zend/Locale/Data/sv_FI.xml rename to lib/internal/Zend/Locale/Data/sv_FI.xml diff --git a/lib/Zend/Locale/Data/sv_SE.xml b/lib/internal/Zend/Locale/Data/sv_SE.xml similarity index 100% rename from lib/Zend/Locale/Data/sv_SE.xml rename to lib/internal/Zend/Locale/Data/sv_SE.xml diff --git a/lib/Zend/Locale/Data/sw.xml b/lib/internal/Zend/Locale/Data/sw.xml similarity index 100% rename from lib/Zend/Locale/Data/sw.xml rename to lib/internal/Zend/Locale/Data/sw.xml diff --git a/lib/Zend/Locale/Data/sw_KE.xml b/lib/internal/Zend/Locale/Data/sw_KE.xml similarity index 100% rename from lib/Zend/Locale/Data/sw_KE.xml rename to lib/internal/Zend/Locale/Data/sw_KE.xml diff --git a/lib/Zend/Locale/Data/sw_TZ.xml b/lib/internal/Zend/Locale/Data/sw_TZ.xml similarity index 100% rename from lib/Zend/Locale/Data/sw_TZ.xml rename to lib/internal/Zend/Locale/Data/sw_TZ.xml diff --git a/lib/Zend/Locale/Data/syr.xml b/lib/internal/Zend/Locale/Data/syr.xml similarity index 100% rename from lib/Zend/Locale/Data/syr.xml rename to lib/internal/Zend/Locale/Data/syr.xml diff --git a/lib/Zend/Locale/Data/syr_SY.xml b/lib/internal/Zend/Locale/Data/syr_SY.xml similarity index 100% rename from lib/Zend/Locale/Data/syr_SY.xml rename to lib/internal/Zend/Locale/Data/syr_SY.xml diff --git a/lib/Zend/Locale/Data/ta.xml b/lib/internal/Zend/Locale/Data/ta.xml similarity index 100% rename from lib/Zend/Locale/Data/ta.xml rename to lib/internal/Zend/Locale/Data/ta.xml diff --git a/lib/Zend/Locale/Data/ta_IN.xml b/lib/internal/Zend/Locale/Data/ta_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/ta_IN.xml rename to lib/internal/Zend/Locale/Data/ta_IN.xml diff --git a/lib/Zend/Locale/Data/te.xml b/lib/internal/Zend/Locale/Data/te.xml similarity index 100% rename from lib/Zend/Locale/Data/te.xml rename to lib/internal/Zend/Locale/Data/te.xml diff --git a/lib/Zend/Locale/Data/te_IN.xml b/lib/internal/Zend/Locale/Data/te_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/te_IN.xml rename to lib/internal/Zend/Locale/Data/te_IN.xml diff --git a/lib/Zend/Locale/Data/telephoneCodeData.xml b/lib/internal/Zend/Locale/Data/telephoneCodeData.xml similarity index 100% rename from lib/Zend/Locale/Data/telephoneCodeData.xml rename to lib/internal/Zend/Locale/Data/telephoneCodeData.xml diff --git a/lib/Zend/Locale/Data/tg.xml b/lib/internal/Zend/Locale/Data/tg.xml similarity index 100% rename from lib/Zend/Locale/Data/tg.xml rename to lib/internal/Zend/Locale/Data/tg.xml diff --git a/lib/Zend/Locale/Data/tg_Cyrl.xml b/lib/internal/Zend/Locale/Data/tg_Cyrl.xml similarity index 100% rename from lib/Zend/Locale/Data/tg_Cyrl.xml rename to lib/internal/Zend/Locale/Data/tg_Cyrl.xml diff --git a/lib/Zend/Locale/Data/tg_Cyrl_TJ.xml b/lib/internal/Zend/Locale/Data/tg_Cyrl_TJ.xml similarity index 100% rename from lib/Zend/Locale/Data/tg_Cyrl_TJ.xml rename to lib/internal/Zend/Locale/Data/tg_Cyrl_TJ.xml diff --git a/lib/Zend/Locale/Data/tg_TJ.xml b/lib/internal/Zend/Locale/Data/tg_TJ.xml similarity index 100% rename from lib/Zend/Locale/Data/tg_TJ.xml rename to lib/internal/Zend/Locale/Data/tg_TJ.xml diff --git a/lib/Zend/Locale/Data/th.xml b/lib/internal/Zend/Locale/Data/th.xml similarity index 100% rename from lib/Zend/Locale/Data/th.xml rename to lib/internal/Zend/Locale/Data/th.xml diff --git a/lib/Zend/Locale/Data/th_TH.xml b/lib/internal/Zend/Locale/Data/th_TH.xml similarity index 100% rename from lib/Zend/Locale/Data/th_TH.xml rename to lib/internal/Zend/Locale/Data/th_TH.xml diff --git a/lib/Zend/Locale/Data/ti.xml b/lib/internal/Zend/Locale/Data/ti.xml similarity index 100% rename from lib/Zend/Locale/Data/ti.xml rename to lib/internal/Zend/Locale/Data/ti.xml diff --git a/lib/Zend/Locale/Data/ti_ER.xml b/lib/internal/Zend/Locale/Data/ti_ER.xml similarity index 100% rename from lib/Zend/Locale/Data/ti_ER.xml rename to lib/internal/Zend/Locale/Data/ti_ER.xml diff --git a/lib/Zend/Locale/Data/ti_ET.xml b/lib/internal/Zend/Locale/Data/ti_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/ti_ET.xml rename to lib/internal/Zend/Locale/Data/ti_ET.xml diff --git a/lib/Zend/Locale/Data/tig.xml b/lib/internal/Zend/Locale/Data/tig.xml similarity index 100% rename from lib/Zend/Locale/Data/tig.xml rename to lib/internal/Zend/Locale/Data/tig.xml diff --git a/lib/Zend/Locale/Data/tig_ER.xml b/lib/internal/Zend/Locale/Data/tig_ER.xml similarity index 100% rename from lib/Zend/Locale/Data/tig_ER.xml rename to lib/internal/Zend/Locale/Data/tig_ER.xml diff --git a/lib/Zend/Locale/Data/tl.xml b/lib/internal/Zend/Locale/Data/tl.xml similarity index 100% rename from lib/Zend/Locale/Data/tl.xml rename to lib/internal/Zend/Locale/Data/tl.xml diff --git a/lib/Zend/Locale/Data/tn.xml b/lib/internal/Zend/Locale/Data/tn.xml similarity index 100% rename from lib/Zend/Locale/Data/tn.xml rename to lib/internal/Zend/Locale/Data/tn.xml diff --git a/lib/Zend/Locale/Data/tn_ZA.xml b/lib/internal/Zend/Locale/Data/tn_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/tn_ZA.xml rename to lib/internal/Zend/Locale/Data/tn_ZA.xml diff --git a/lib/Zend/Locale/Data/to.xml b/lib/internal/Zend/Locale/Data/to.xml similarity index 100% rename from lib/Zend/Locale/Data/to.xml rename to lib/internal/Zend/Locale/Data/to.xml diff --git a/lib/Zend/Locale/Data/to_TO.xml b/lib/internal/Zend/Locale/Data/to_TO.xml similarity index 100% rename from lib/Zend/Locale/Data/to_TO.xml rename to lib/internal/Zend/Locale/Data/to_TO.xml diff --git a/lib/Zend/Locale/Data/tr.xml b/lib/internal/Zend/Locale/Data/tr.xml similarity index 100% rename from lib/Zend/Locale/Data/tr.xml rename to lib/internal/Zend/Locale/Data/tr.xml diff --git a/lib/Zend/Locale/Data/tr_TR.xml b/lib/internal/Zend/Locale/Data/tr_TR.xml similarity index 100% rename from lib/Zend/Locale/Data/tr_TR.xml rename to lib/internal/Zend/Locale/Data/tr_TR.xml diff --git a/lib/Zend/Locale/Data/trv.xml b/lib/internal/Zend/Locale/Data/trv.xml similarity index 100% rename from lib/Zend/Locale/Data/trv.xml rename to lib/internal/Zend/Locale/Data/trv.xml diff --git a/lib/Zend/Locale/Data/trv_TW.xml b/lib/internal/Zend/Locale/Data/trv_TW.xml similarity index 100% rename from lib/Zend/Locale/Data/trv_TW.xml rename to lib/internal/Zend/Locale/Data/trv_TW.xml diff --git a/lib/Zend/Locale/Data/ts.xml b/lib/internal/Zend/Locale/Data/ts.xml similarity index 100% rename from lib/Zend/Locale/Data/ts.xml rename to lib/internal/Zend/Locale/Data/ts.xml diff --git a/lib/Zend/Locale/Data/ts_ZA.xml b/lib/internal/Zend/Locale/Data/ts_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/ts_ZA.xml rename to lib/internal/Zend/Locale/Data/ts_ZA.xml diff --git a/lib/Zend/Locale/Data/tt.xml b/lib/internal/Zend/Locale/Data/tt.xml similarity index 100% rename from lib/Zend/Locale/Data/tt.xml rename to lib/internal/Zend/Locale/Data/tt.xml diff --git a/lib/Zend/Locale/Data/tt_RU.xml b/lib/internal/Zend/Locale/Data/tt_RU.xml similarity index 100% rename from lib/Zend/Locale/Data/tt_RU.xml rename to lib/internal/Zend/Locale/Data/tt_RU.xml diff --git a/lib/Zend/Locale/Data/ug.xml b/lib/internal/Zend/Locale/Data/ug.xml similarity index 100% rename from lib/Zend/Locale/Data/ug.xml rename to lib/internal/Zend/Locale/Data/ug.xml diff --git a/lib/Zend/Locale/Data/ug_Arab.xml b/lib/internal/Zend/Locale/Data/ug_Arab.xml similarity index 100% rename from lib/Zend/Locale/Data/ug_Arab.xml rename to lib/internal/Zend/Locale/Data/ug_Arab.xml diff --git a/lib/Zend/Locale/Data/ug_Arab_CN.xml b/lib/internal/Zend/Locale/Data/ug_Arab_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/ug_Arab_CN.xml rename to lib/internal/Zend/Locale/Data/ug_Arab_CN.xml diff --git a/lib/Zend/Locale/Data/ug_CN.xml b/lib/internal/Zend/Locale/Data/ug_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/ug_CN.xml rename to lib/internal/Zend/Locale/Data/ug_CN.xml diff --git a/lib/Zend/Locale/Data/uk.xml b/lib/internal/Zend/Locale/Data/uk.xml similarity index 100% rename from lib/Zend/Locale/Data/uk.xml rename to lib/internal/Zend/Locale/Data/uk.xml diff --git a/lib/Zend/Locale/Data/uk_UA.xml b/lib/internal/Zend/Locale/Data/uk_UA.xml similarity index 100% rename from lib/Zend/Locale/Data/uk_UA.xml rename to lib/internal/Zend/Locale/Data/uk_UA.xml diff --git a/lib/Zend/Locale/Data/ur.xml b/lib/internal/Zend/Locale/Data/ur.xml similarity index 100% rename from lib/Zend/Locale/Data/ur.xml rename to lib/internal/Zend/Locale/Data/ur.xml diff --git a/lib/Zend/Locale/Data/ur_IN.xml b/lib/internal/Zend/Locale/Data/ur_IN.xml similarity index 100% rename from lib/Zend/Locale/Data/ur_IN.xml rename to lib/internal/Zend/Locale/Data/ur_IN.xml diff --git a/lib/Zend/Locale/Data/ur_PK.xml b/lib/internal/Zend/Locale/Data/ur_PK.xml similarity index 100% rename from lib/Zend/Locale/Data/ur_PK.xml rename to lib/internal/Zend/Locale/Data/ur_PK.xml diff --git a/lib/Zend/Locale/Data/uz.xml b/lib/internal/Zend/Locale/Data/uz.xml similarity index 100% rename from lib/Zend/Locale/Data/uz.xml rename to lib/internal/Zend/Locale/Data/uz.xml diff --git a/lib/Zend/Locale/Data/uz_AF.xml b/lib/internal/Zend/Locale/Data/uz_AF.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_AF.xml rename to lib/internal/Zend/Locale/Data/uz_AF.xml diff --git a/lib/Zend/Locale/Data/uz_Arab.xml b/lib/internal/Zend/Locale/Data/uz_Arab.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_Arab.xml rename to lib/internal/Zend/Locale/Data/uz_Arab.xml diff --git a/lib/Zend/Locale/Data/uz_Arab_AF.xml b/lib/internal/Zend/Locale/Data/uz_Arab_AF.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_Arab_AF.xml rename to lib/internal/Zend/Locale/Data/uz_Arab_AF.xml diff --git a/lib/Zend/Locale/Data/uz_Cyrl.xml b/lib/internal/Zend/Locale/Data/uz_Cyrl.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_Cyrl.xml rename to lib/internal/Zend/Locale/Data/uz_Cyrl.xml diff --git a/lib/Zend/Locale/Data/uz_Cyrl_UZ.xml b/lib/internal/Zend/Locale/Data/uz_Cyrl_UZ.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_Cyrl_UZ.xml rename to lib/internal/Zend/Locale/Data/uz_Cyrl_UZ.xml diff --git a/lib/Zend/Locale/Data/uz_Latn.xml b/lib/internal/Zend/Locale/Data/uz_Latn.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_Latn.xml rename to lib/internal/Zend/Locale/Data/uz_Latn.xml diff --git a/lib/Zend/Locale/Data/uz_Latn_UZ.xml b/lib/internal/Zend/Locale/Data/uz_Latn_UZ.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_Latn_UZ.xml rename to lib/internal/Zend/Locale/Data/uz_Latn_UZ.xml diff --git a/lib/Zend/Locale/Data/uz_UZ.xml b/lib/internal/Zend/Locale/Data/uz_UZ.xml similarity index 100% rename from lib/Zend/Locale/Data/uz_UZ.xml rename to lib/internal/Zend/Locale/Data/uz_UZ.xml diff --git a/lib/Zend/Locale/Data/ve.xml b/lib/internal/Zend/Locale/Data/ve.xml similarity index 100% rename from lib/Zend/Locale/Data/ve.xml rename to lib/internal/Zend/Locale/Data/ve.xml diff --git a/lib/Zend/Locale/Data/ve_ZA.xml b/lib/internal/Zend/Locale/Data/ve_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/ve_ZA.xml rename to lib/internal/Zend/Locale/Data/ve_ZA.xml diff --git a/lib/Zend/Locale/Data/vi.xml b/lib/internal/Zend/Locale/Data/vi.xml similarity index 100% rename from lib/Zend/Locale/Data/vi.xml rename to lib/internal/Zend/Locale/Data/vi.xml diff --git a/lib/Zend/Locale/Data/vi_VN.xml b/lib/internal/Zend/Locale/Data/vi_VN.xml similarity index 100% rename from lib/Zend/Locale/Data/vi_VN.xml rename to lib/internal/Zend/Locale/Data/vi_VN.xml diff --git a/lib/Zend/Locale/Data/wal.xml b/lib/internal/Zend/Locale/Data/wal.xml similarity index 100% rename from lib/Zend/Locale/Data/wal.xml rename to lib/internal/Zend/Locale/Data/wal.xml diff --git a/lib/Zend/Locale/Data/wal_ET.xml b/lib/internal/Zend/Locale/Data/wal_ET.xml similarity index 100% rename from lib/Zend/Locale/Data/wal_ET.xml rename to lib/internal/Zend/Locale/Data/wal_ET.xml diff --git a/lib/Zend/Locale/Data/wo.xml b/lib/internal/Zend/Locale/Data/wo.xml similarity index 100% rename from lib/Zend/Locale/Data/wo.xml rename to lib/internal/Zend/Locale/Data/wo.xml diff --git a/lib/Zend/Locale/Data/wo_Latn.xml b/lib/internal/Zend/Locale/Data/wo_Latn.xml similarity index 100% rename from lib/Zend/Locale/Data/wo_Latn.xml rename to lib/internal/Zend/Locale/Data/wo_Latn.xml diff --git a/lib/Zend/Locale/Data/wo_Latn_SN.xml b/lib/internal/Zend/Locale/Data/wo_Latn_SN.xml similarity index 100% rename from lib/Zend/Locale/Data/wo_Latn_SN.xml rename to lib/internal/Zend/Locale/Data/wo_Latn_SN.xml diff --git a/lib/Zend/Locale/Data/wo_SN.xml b/lib/internal/Zend/Locale/Data/wo_SN.xml similarity index 100% rename from lib/Zend/Locale/Data/wo_SN.xml rename to lib/internal/Zend/Locale/Data/wo_SN.xml diff --git a/lib/Zend/Locale/Data/xh.xml b/lib/internal/Zend/Locale/Data/xh.xml similarity index 100% rename from lib/Zend/Locale/Data/xh.xml rename to lib/internal/Zend/Locale/Data/xh.xml diff --git a/lib/Zend/Locale/Data/xh_ZA.xml b/lib/internal/Zend/Locale/Data/xh_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/xh_ZA.xml rename to lib/internal/Zend/Locale/Data/xh_ZA.xml diff --git a/lib/Zend/Locale/Data/yo.xml b/lib/internal/Zend/Locale/Data/yo.xml similarity index 100% rename from lib/Zend/Locale/Data/yo.xml rename to lib/internal/Zend/Locale/Data/yo.xml diff --git a/lib/Zend/Locale/Data/yo_NG.xml b/lib/internal/Zend/Locale/Data/yo_NG.xml similarity index 100% rename from lib/Zend/Locale/Data/yo_NG.xml rename to lib/internal/Zend/Locale/Data/yo_NG.xml diff --git a/lib/Zend/Locale/Data/zh.xml b/lib/internal/Zend/Locale/Data/zh.xml similarity index 100% rename from lib/Zend/Locale/Data/zh.xml rename to lib/internal/Zend/Locale/Data/zh.xml diff --git a/lib/Zend/Locale/Data/zh_CN.xml b/lib/internal/Zend/Locale/Data/zh_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_CN.xml rename to lib/internal/Zend/Locale/Data/zh_CN.xml diff --git a/lib/Zend/Locale/Data/zh_HK.xml b/lib/internal/Zend/Locale/Data/zh_HK.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_HK.xml rename to lib/internal/Zend/Locale/Data/zh_HK.xml diff --git a/lib/Zend/Locale/Data/zh_Hans.xml b/lib/internal/Zend/Locale/Data/zh_Hans.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hans.xml rename to lib/internal/Zend/Locale/Data/zh_Hans.xml diff --git a/lib/Zend/Locale/Data/zh_Hans_CN.xml b/lib/internal/Zend/Locale/Data/zh_Hans_CN.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hans_CN.xml rename to lib/internal/Zend/Locale/Data/zh_Hans_CN.xml diff --git a/lib/Zend/Locale/Data/zh_Hans_HK.xml b/lib/internal/Zend/Locale/Data/zh_Hans_HK.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hans_HK.xml rename to lib/internal/Zend/Locale/Data/zh_Hans_HK.xml diff --git a/lib/Zend/Locale/Data/zh_Hans_MO.xml b/lib/internal/Zend/Locale/Data/zh_Hans_MO.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hans_MO.xml rename to lib/internal/Zend/Locale/Data/zh_Hans_MO.xml diff --git a/lib/Zend/Locale/Data/zh_Hans_SG.xml b/lib/internal/Zend/Locale/Data/zh_Hans_SG.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hans_SG.xml rename to lib/internal/Zend/Locale/Data/zh_Hans_SG.xml diff --git a/lib/Zend/Locale/Data/zh_Hant.xml b/lib/internal/Zend/Locale/Data/zh_Hant.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hant.xml rename to lib/internal/Zend/Locale/Data/zh_Hant.xml diff --git a/lib/Zend/Locale/Data/zh_Hant_HK.xml b/lib/internal/Zend/Locale/Data/zh_Hant_HK.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hant_HK.xml rename to lib/internal/Zend/Locale/Data/zh_Hant_HK.xml diff --git a/lib/Zend/Locale/Data/zh_Hant_MO.xml b/lib/internal/Zend/Locale/Data/zh_Hant_MO.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hant_MO.xml rename to lib/internal/Zend/Locale/Data/zh_Hant_MO.xml diff --git a/lib/Zend/Locale/Data/zh_Hant_TW.xml b/lib/internal/Zend/Locale/Data/zh_Hant_TW.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_Hant_TW.xml rename to lib/internal/Zend/Locale/Data/zh_Hant_TW.xml diff --git a/lib/Zend/Locale/Data/zh_MO.xml b/lib/internal/Zend/Locale/Data/zh_MO.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_MO.xml rename to lib/internal/Zend/Locale/Data/zh_MO.xml diff --git a/lib/Zend/Locale/Data/zh_SG.xml b/lib/internal/Zend/Locale/Data/zh_SG.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_SG.xml rename to lib/internal/Zend/Locale/Data/zh_SG.xml diff --git a/lib/Zend/Locale/Data/zh_TW.xml b/lib/internal/Zend/Locale/Data/zh_TW.xml similarity index 100% rename from lib/Zend/Locale/Data/zh_TW.xml rename to lib/internal/Zend/Locale/Data/zh_TW.xml diff --git a/lib/Zend/Locale/Data/zu.xml b/lib/internal/Zend/Locale/Data/zu.xml similarity index 100% rename from lib/Zend/Locale/Data/zu.xml rename to lib/internal/Zend/Locale/Data/zu.xml diff --git a/lib/Zend/Locale/Data/zu_ZA.xml b/lib/internal/Zend/Locale/Data/zu_ZA.xml similarity index 100% rename from lib/Zend/Locale/Data/zu_ZA.xml rename to lib/internal/Zend/Locale/Data/zu_ZA.xml diff --git a/lib/Zend/Locale/Exception.php b/lib/internal/Zend/Locale/Exception.php similarity index 100% rename from lib/Zend/Locale/Exception.php rename to lib/internal/Zend/Locale/Exception.php diff --git a/lib/Zend/Locale/Format.php b/lib/internal/Zend/Locale/Format.php similarity index 100% rename from lib/Zend/Locale/Format.php rename to lib/internal/Zend/Locale/Format.php diff --git a/lib/Zend/Locale/Math.php b/lib/internal/Zend/Locale/Math.php similarity index 100% rename from lib/Zend/Locale/Math.php rename to lib/internal/Zend/Locale/Math.php diff --git a/lib/Zend/Locale/Math/Exception.php b/lib/internal/Zend/Locale/Math/Exception.php similarity index 100% rename from lib/Zend/Locale/Math/Exception.php rename to lib/internal/Zend/Locale/Math/Exception.php diff --git a/lib/Zend/Locale/Math/PhpMath.php b/lib/internal/Zend/Locale/Math/PhpMath.php similarity index 100% rename from lib/Zend/Locale/Math/PhpMath.php rename to lib/internal/Zend/Locale/Math/PhpMath.php diff --git a/lib/Zend/Log.php b/lib/internal/Zend/Log.php similarity index 100% rename from lib/Zend/Log.php rename to lib/internal/Zend/Log.php diff --git a/lib/Zend/Log/Exception.php b/lib/internal/Zend/Log/Exception.php similarity index 100% rename from lib/Zend/Log/Exception.php rename to lib/internal/Zend/Log/Exception.php diff --git a/lib/Zend/Log/FactoryInterface.php b/lib/internal/Zend/Log/FactoryInterface.php similarity index 100% rename from lib/Zend/Log/FactoryInterface.php rename to lib/internal/Zend/Log/FactoryInterface.php diff --git a/lib/Zend/Log/Filter/Abstract.php b/lib/internal/Zend/Log/Filter/Abstract.php similarity index 100% rename from lib/Zend/Log/Filter/Abstract.php rename to lib/internal/Zend/Log/Filter/Abstract.php diff --git a/lib/Zend/Log/Filter/Interface.php b/lib/internal/Zend/Log/Filter/Interface.php similarity index 100% rename from lib/Zend/Log/Filter/Interface.php rename to lib/internal/Zend/Log/Filter/Interface.php diff --git a/lib/Zend/Log/Filter/Message.php b/lib/internal/Zend/Log/Filter/Message.php similarity index 100% rename from lib/Zend/Log/Filter/Message.php rename to lib/internal/Zend/Log/Filter/Message.php diff --git a/lib/Zend/Log/Filter/Priority.php b/lib/internal/Zend/Log/Filter/Priority.php similarity index 100% rename from lib/Zend/Log/Filter/Priority.php rename to lib/internal/Zend/Log/Filter/Priority.php diff --git a/lib/Zend/Log/Filter/Suppress.php b/lib/internal/Zend/Log/Filter/Suppress.php similarity index 100% rename from lib/Zend/Log/Filter/Suppress.php rename to lib/internal/Zend/Log/Filter/Suppress.php diff --git a/lib/Zend/Log/Formatter/Firebug.php b/lib/internal/Zend/Log/Formatter/Firebug.php similarity index 100% rename from lib/Zend/Log/Formatter/Firebug.php rename to lib/internal/Zend/Log/Formatter/Firebug.php diff --git a/lib/Zend/Log/Formatter/Interface.php b/lib/internal/Zend/Log/Formatter/Interface.php similarity index 100% rename from lib/Zend/Log/Formatter/Interface.php rename to lib/internal/Zend/Log/Formatter/Interface.php diff --git a/lib/Zend/Log/Formatter/Simple.php b/lib/internal/Zend/Log/Formatter/Simple.php similarity index 100% rename from lib/Zend/Log/Formatter/Simple.php rename to lib/internal/Zend/Log/Formatter/Simple.php diff --git a/lib/Zend/Log/Formatter/Xml.php b/lib/internal/Zend/Log/Formatter/Xml.php similarity index 100% rename from lib/Zend/Log/Formatter/Xml.php rename to lib/internal/Zend/Log/Formatter/Xml.php diff --git a/lib/Zend/Log/Writer/Abstract.php b/lib/internal/Zend/Log/Writer/Abstract.php similarity index 100% rename from lib/Zend/Log/Writer/Abstract.php rename to lib/internal/Zend/Log/Writer/Abstract.php diff --git a/lib/Zend/Log/Writer/Db.php b/lib/internal/Zend/Log/Writer/Db.php similarity index 100% rename from lib/Zend/Log/Writer/Db.php rename to lib/internal/Zend/Log/Writer/Db.php diff --git a/lib/Zend/Log/Writer/Firebug.php b/lib/internal/Zend/Log/Writer/Firebug.php similarity index 100% rename from lib/Zend/Log/Writer/Firebug.php rename to lib/internal/Zend/Log/Writer/Firebug.php diff --git a/lib/Zend/Log/Writer/Mail.php b/lib/internal/Zend/Log/Writer/Mail.php similarity index 100% rename from lib/Zend/Log/Writer/Mail.php rename to lib/internal/Zend/Log/Writer/Mail.php diff --git a/lib/Zend/Log/Writer/Mock.php b/lib/internal/Zend/Log/Writer/Mock.php similarity index 100% rename from lib/Zend/Log/Writer/Mock.php rename to lib/internal/Zend/Log/Writer/Mock.php diff --git a/lib/Zend/Log/Writer/Null.php b/lib/internal/Zend/Log/Writer/Null.php similarity index 100% rename from lib/Zend/Log/Writer/Null.php rename to lib/internal/Zend/Log/Writer/Null.php diff --git a/lib/Zend/Log/Writer/Stream.php b/lib/internal/Zend/Log/Writer/Stream.php similarity index 100% rename from lib/Zend/Log/Writer/Stream.php rename to lib/internal/Zend/Log/Writer/Stream.php diff --git a/lib/Zend/Log/Writer/Syslog.php b/lib/internal/Zend/Log/Writer/Syslog.php similarity index 100% rename from lib/Zend/Log/Writer/Syslog.php rename to lib/internal/Zend/Log/Writer/Syslog.php diff --git a/lib/Zend/Log/Writer/ZendMonitor.php b/lib/internal/Zend/Log/Writer/ZendMonitor.php similarity index 100% rename from lib/Zend/Log/Writer/ZendMonitor.php rename to lib/internal/Zend/Log/Writer/ZendMonitor.php diff --git a/lib/Zend/Mail.php b/lib/internal/Zend/Mail.php similarity index 100% rename from lib/Zend/Mail.php rename to lib/internal/Zend/Mail.php diff --git a/lib/Zend/Mail/Exception.php b/lib/internal/Zend/Mail/Exception.php similarity index 100% rename from lib/Zend/Mail/Exception.php rename to lib/internal/Zend/Mail/Exception.php diff --git a/lib/Zend/Mail/Message.php b/lib/internal/Zend/Mail/Message.php similarity index 100% rename from lib/Zend/Mail/Message.php rename to lib/internal/Zend/Mail/Message.php diff --git a/lib/Zend/Mail/Message/File.php b/lib/internal/Zend/Mail/Message/File.php similarity index 100% rename from lib/Zend/Mail/Message/File.php rename to lib/internal/Zend/Mail/Message/File.php diff --git a/lib/Zend/Mail/Message/Interface.php b/lib/internal/Zend/Mail/Message/Interface.php similarity index 100% rename from lib/Zend/Mail/Message/Interface.php rename to lib/internal/Zend/Mail/Message/Interface.php diff --git a/lib/Zend/Mail/Part.php b/lib/internal/Zend/Mail/Part.php similarity index 100% rename from lib/Zend/Mail/Part.php rename to lib/internal/Zend/Mail/Part.php diff --git a/lib/Zend/Mail/Part/File.php b/lib/internal/Zend/Mail/Part/File.php similarity index 100% rename from lib/Zend/Mail/Part/File.php rename to lib/internal/Zend/Mail/Part/File.php diff --git a/lib/Zend/Mail/Part/Interface.php b/lib/internal/Zend/Mail/Part/Interface.php similarity index 100% rename from lib/Zend/Mail/Part/Interface.php rename to lib/internal/Zend/Mail/Part/Interface.php diff --git a/lib/Zend/Mail/Protocol/Abstract.php b/lib/internal/Zend/Mail/Protocol/Abstract.php similarity index 100% rename from lib/Zend/Mail/Protocol/Abstract.php rename to lib/internal/Zend/Mail/Protocol/Abstract.php diff --git a/lib/Zend/Mail/Protocol/Exception.php b/lib/internal/Zend/Mail/Protocol/Exception.php similarity index 100% rename from lib/Zend/Mail/Protocol/Exception.php rename to lib/internal/Zend/Mail/Protocol/Exception.php diff --git a/lib/Zend/Mail/Protocol/Imap.php b/lib/internal/Zend/Mail/Protocol/Imap.php similarity index 100% rename from lib/Zend/Mail/Protocol/Imap.php rename to lib/internal/Zend/Mail/Protocol/Imap.php diff --git a/lib/Zend/Mail/Protocol/Pop3.php b/lib/internal/Zend/Mail/Protocol/Pop3.php similarity index 100% rename from lib/Zend/Mail/Protocol/Pop3.php rename to lib/internal/Zend/Mail/Protocol/Pop3.php diff --git a/lib/Zend/Mail/Protocol/Smtp.php b/lib/internal/Zend/Mail/Protocol/Smtp.php similarity index 100% rename from lib/Zend/Mail/Protocol/Smtp.php rename to lib/internal/Zend/Mail/Protocol/Smtp.php diff --git a/lib/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php b/lib/internal/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php similarity index 100% rename from lib/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php rename to lib/internal/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php diff --git a/lib/Zend/Mail/Protocol/Smtp/Auth/Login.php b/lib/internal/Zend/Mail/Protocol/Smtp/Auth/Login.php similarity index 100% rename from lib/Zend/Mail/Protocol/Smtp/Auth/Login.php rename to lib/internal/Zend/Mail/Protocol/Smtp/Auth/Login.php diff --git a/lib/Zend/Mail/Protocol/Smtp/Auth/Plain.php b/lib/internal/Zend/Mail/Protocol/Smtp/Auth/Plain.php similarity index 100% rename from lib/Zend/Mail/Protocol/Smtp/Auth/Plain.php rename to lib/internal/Zend/Mail/Protocol/Smtp/Auth/Plain.php diff --git a/lib/Zend/Mail/Storage.php b/lib/internal/Zend/Mail/Storage.php similarity index 100% rename from lib/Zend/Mail/Storage.php rename to lib/internal/Zend/Mail/Storage.php diff --git a/lib/Zend/Mail/Storage/Abstract.php b/lib/internal/Zend/Mail/Storage/Abstract.php similarity index 100% rename from lib/Zend/Mail/Storage/Abstract.php rename to lib/internal/Zend/Mail/Storage/Abstract.php diff --git a/lib/Zend/Mail/Storage/Exception.php b/lib/internal/Zend/Mail/Storage/Exception.php similarity index 100% rename from lib/Zend/Mail/Storage/Exception.php rename to lib/internal/Zend/Mail/Storage/Exception.php diff --git a/lib/Zend/Mail/Storage/Folder.php b/lib/internal/Zend/Mail/Storage/Folder.php similarity index 100% rename from lib/Zend/Mail/Storage/Folder.php rename to lib/internal/Zend/Mail/Storage/Folder.php diff --git a/lib/Zend/Mail/Storage/Folder/Interface.php b/lib/internal/Zend/Mail/Storage/Folder/Interface.php similarity index 100% rename from lib/Zend/Mail/Storage/Folder/Interface.php rename to lib/internal/Zend/Mail/Storage/Folder/Interface.php diff --git a/lib/Zend/Mail/Storage/Folder/Maildir.php b/lib/internal/Zend/Mail/Storage/Folder/Maildir.php similarity index 100% rename from lib/Zend/Mail/Storage/Folder/Maildir.php rename to lib/internal/Zend/Mail/Storage/Folder/Maildir.php diff --git a/lib/Zend/Mail/Storage/Folder/Mbox.php b/lib/internal/Zend/Mail/Storage/Folder/Mbox.php similarity index 100% rename from lib/Zend/Mail/Storage/Folder/Mbox.php rename to lib/internal/Zend/Mail/Storage/Folder/Mbox.php diff --git a/lib/Zend/Mail/Storage/Imap.php b/lib/internal/Zend/Mail/Storage/Imap.php similarity index 100% rename from lib/Zend/Mail/Storage/Imap.php rename to lib/internal/Zend/Mail/Storage/Imap.php diff --git a/lib/Zend/Mail/Storage/Maildir.php b/lib/internal/Zend/Mail/Storage/Maildir.php similarity index 100% rename from lib/Zend/Mail/Storage/Maildir.php rename to lib/internal/Zend/Mail/Storage/Maildir.php diff --git a/lib/Zend/Mail/Storage/Mbox.php b/lib/internal/Zend/Mail/Storage/Mbox.php similarity index 100% rename from lib/Zend/Mail/Storage/Mbox.php rename to lib/internal/Zend/Mail/Storage/Mbox.php diff --git a/lib/Zend/Mail/Storage/Pop3.php b/lib/internal/Zend/Mail/Storage/Pop3.php similarity index 100% rename from lib/Zend/Mail/Storage/Pop3.php rename to lib/internal/Zend/Mail/Storage/Pop3.php diff --git a/lib/Zend/Mail/Storage/Writable/Interface.php b/lib/internal/Zend/Mail/Storage/Writable/Interface.php similarity index 100% rename from lib/Zend/Mail/Storage/Writable/Interface.php rename to lib/internal/Zend/Mail/Storage/Writable/Interface.php diff --git a/lib/Zend/Mail/Storage/Writable/Maildir.php b/lib/internal/Zend/Mail/Storage/Writable/Maildir.php similarity index 100% rename from lib/Zend/Mail/Storage/Writable/Maildir.php rename to lib/internal/Zend/Mail/Storage/Writable/Maildir.php diff --git a/lib/Zend/Mail/Transport/Abstract.php b/lib/internal/Zend/Mail/Transport/Abstract.php similarity index 100% rename from lib/Zend/Mail/Transport/Abstract.php rename to lib/internal/Zend/Mail/Transport/Abstract.php diff --git a/lib/Zend/Mail/Transport/Exception.php b/lib/internal/Zend/Mail/Transport/Exception.php similarity index 100% rename from lib/Zend/Mail/Transport/Exception.php rename to lib/internal/Zend/Mail/Transport/Exception.php diff --git a/lib/Zend/Mail/Transport/File.php b/lib/internal/Zend/Mail/Transport/File.php similarity index 100% rename from lib/Zend/Mail/Transport/File.php rename to lib/internal/Zend/Mail/Transport/File.php diff --git a/lib/Zend/Mail/Transport/Sendmail.php b/lib/internal/Zend/Mail/Transport/Sendmail.php similarity index 100% rename from lib/Zend/Mail/Transport/Sendmail.php rename to lib/internal/Zend/Mail/Transport/Sendmail.php diff --git a/lib/Zend/Mail/Transport/Smtp.php b/lib/internal/Zend/Mail/Transport/Smtp.php similarity index 100% rename from lib/Zend/Mail/Transport/Smtp.php rename to lib/internal/Zend/Mail/Transport/Smtp.php diff --git a/lib/Zend/Markup.php b/lib/internal/Zend/Markup.php similarity index 100% rename from lib/Zend/Markup.php rename to lib/internal/Zend/Markup.php diff --git a/lib/Zend/Markup/Exception.php b/lib/internal/Zend/Markup/Exception.php similarity index 100% rename from lib/Zend/Markup/Exception.php rename to lib/internal/Zend/Markup/Exception.php diff --git a/lib/Zend/Markup/Parser/Bbcode.php b/lib/internal/Zend/Markup/Parser/Bbcode.php similarity index 100% rename from lib/Zend/Markup/Parser/Bbcode.php rename to lib/internal/Zend/Markup/Parser/Bbcode.php diff --git a/lib/Zend/Markup/Parser/Exception.php b/lib/internal/Zend/Markup/Parser/Exception.php similarity index 100% rename from lib/Zend/Markup/Parser/Exception.php rename to lib/internal/Zend/Markup/Parser/Exception.php diff --git a/lib/Zend/Markup/Parser/ParserInterface.php b/lib/internal/Zend/Markup/Parser/ParserInterface.php similarity index 100% rename from lib/Zend/Markup/Parser/ParserInterface.php rename to lib/internal/Zend/Markup/Parser/ParserInterface.php diff --git a/lib/Zend/Markup/Parser/Textile.php b/lib/internal/Zend/Markup/Parser/Textile.php similarity index 100% rename from lib/Zend/Markup/Parser/Textile.php rename to lib/internal/Zend/Markup/Parser/Textile.php diff --git a/lib/Zend/Markup/Renderer/Exception.php b/lib/internal/Zend/Markup/Renderer/Exception.php similarity index 100% rename from lib/Zend/Markup/Renderer/Exception.php rename to lib/internal/Zend/Markup/Renderer/Exception.php diff --git a/lib/Zend/Markup/Renderer/Html.php b/lib/internal/Zend/Markup/Renderer/Html.php similarity index 100% rename from lib/Zend/Markup/Renderer/Html.php rename to lib/internal/Zend/Markup/Renderer/Html.php diff --git a/lib/Zend/Markup/Renderer/Html/Code.php b/lib/internal/Zend/Markup/Renderer/Html/Code.php similarity index 100% rename from lib/Zend/Markup/Renderer/Html/Code.php rename to lib/internal/Zend/Markup/Renderer/Html/Code.php diff --git a/lib/Zend/Markup/Renderer/Html/HtmlAbstract.php b/lib/internal/Zend/Markup/Renderer/Html/HtmlAbstract.php similarity index 100% rename from lib/Zend/Markup/Renderer/Html/HtmlAbstract.php rename to lib/internal/Zend/Markup/Renderer/Html/HtmlAbstract.php diff --git a/lib/Zend/Markup/Renderer/Html/Img.php b/lib/internal/Zend/Markup/Renderer/Html/Img.php similarity index 100% rename from lib/Zend/Markup/Renderer/Html/Img.php rename to lib/internal/Zend/Markup/Renderer/Html/Img.php diff --git a/lib/Zend/Markup/Renderer/Html/List.php b/lib/internal/Zend/Markup/Renderer/Html/List.php similarity index 100% rename from lib/Zend/Markup/Renderer/Html/List.php rename to lib/internal/Zend/Markup/Renderer/Html/List.php diff --git a/lib/Zend/Markup/Renderer/Html/Url.php b/lib/internal/Zend/Markup/Renderer/Html/Url.php similarity index 100% rename from lib/Zend/Markup/Renderer/Html/Url.php rename to lib/internal/Zend/Markup/Renderer/Html/Url.php diff --git a/lib/Zend/Markup/Renderer/RendererAbstract.php b/lib/internal/Zend/Markup/Renderer/RendererAbstract.php similarity index 100% rename from lib/Zend/Markup/Renderer/RendererAbstract.php rename to lib/internal/Zend/Markup/Renderer/RendererAbstract.php diff --git a/lib/Zend/Markup/Renderer/TokenConverterInterface.php b/lib/internal/Zend/Markup/Renderer/TokenConverterInterface.php similarity index 100% rename from lib/Zend/Markup/Renderer/TokenConverterInterface.php rename to lib/internal/Zend/Markup/Renderer/TokenConverterInterface.php diff --git a/lib/Zend/Markup/Token.php b/lib/internal/Zend/Markup/Token.php similarity index 100% rename from lib/Zend/Markup/Token.php rename to lib/internal/Zend/Markup/Token.php diff --git a/lib/Zend/Markup/TokenList.php b/lib/internal/Zend/Markup/TokenList.php similarity index 100% rename from lib/Zend/Markup/TokenList.php rename to lib/internal/Zend/Markup/TokenList.php diff --git a/lib/Zend/Measure/Abstract.php b/lib/internal/Zend/Measure/Abstract.php similarity index 100% rename from lib/Zend/Measure/Abstract.php rename to lib/internal/Zend/Measure/Abstract.php diff --git a/lib/Zend/Measure/Acceleration.php b/lib/internal/Zend/Measure/Acceleration.php similarity index 100% rename from lib/Zend/Measure/Acceleration.php rename to lib/internal/Zend/Measure/Acceleration.php diff --git a/lib/Zend/Measure/Angle.php b/lib/internal/Zend/Measure/Angle.php similarity index 100% rename from lib/Zend/Measure/Angle.php rename to lib/internal/Zend/Measure/Angle.php diff --git a/lib/Zend/Measure/Area.php b/lib/internal/Zend/Measure/Area.php similarity index 100% rename from lib/Zend/Measure/Area.php rename to lib/internal/Zend/Measure/Area.php diff --git a/lib/Zend/Measure/Binary.php b/lib/internal/Zend/Measure/Binary.php similarity index 100% rename from lib/Zend/Measure/Binary.php rename to lib/internal/Zend/Measure/Binary.php diff --git a/lib/Zend/Measure/Capacitance.php b/lib/internal/Zend/Measure/Capacitance.php similarity index 100% rename from lib/Zend/Measure/Capacitance.php rename to lib/internal/Zend/Measure/Capacitance.php diff --git a/lib/Zend/Measure/Cooking/Volume.php b/lib/internal/Zend/Measure/Cooking/Volume.php similarity index 100% rename from lib/Zend/Measure/Cooking/Volume.php rename to lib/internal/Zend/Measure/Cooking/Volume.php diff --git a/lib/Zend/Measure/Cooking/Weight.php b/lib/internal/Zend/Measure/Cooking/Weight.php similarity index 100% rename from lib/Zend/Measure/Cooking/Weight.php rename to lib/internal/Zend/Measure/Cooking/Weight.php diff --git a/lib/Zend/Measure/Current.php b/lib/internal/Zend/Measure/Current.php similarity index 100% rename from lib/Zend/Measure/Current.php rename to lib/internal/Zend/Measure/Current.php diff --git a/lib/Zend/Measure/Density.php b/lib/internal/Zend/Measure/Density.php similarity index 100% rename from lib/Zend/Measure/Density.php rename to lib/internal/Zend/Measure/Density.php diff --git a/lib/Zend/Measure/Energy.php b/lib/internal/Zend/Measure/Energy.php similarity index 100% rename from lib/Zend/Measure/Energy.php rename to lib/internal/Zend/Measure/Energy.php diff --git a/lib/Zend/Measure/Exception.php b/lib/internal/Zend/Measure/Exception.php similarity index 100% rename from lib/Zend/Measure/Exception.php rename to lib/internal/Zend/Measure/Exception.php diff --git a/lib/Zend/Measure/Flow/Mass.php b/lib/internal/Zend/Measure/Flow/Mass.php similarity index 100% rename from lib/Zend/Measure/Flow/Mass.php rename to lib/internal/Zend/Measure/Flow/Mass.php diff --git a/lib/Zend/Measure/Flow/Mole.php b/lib/internal/Zend/Measure/Flow/Mole.php similarity index 100% rename from lib/Zend/Measure/Flow/Mole.php rename to lib/internal/Zend/Measure/Flow/Mole.php diff --git a/lib/Zend/Measure/Flow/Volume.php b/lib/internal/Zend/Measure/Flow/Volume.php similarity index 100% rename from lib/Zend/Measure/Flow/Volume.php rename to lib/internal/Zend/Measure/Flow/Volume.php diff --git a/lib/Zend/Measure/Force.php b/lib/internal/Zend/Measure/Force.php similarity index 100% rename from lib/Zend/Measure/Force.php rename to lib/internal/Zend/Measure/Force.php diff --git a/lib/Zend/Measure/Frequency.php b/lib/internal/Zend/Measure/Frequency.php similarity index 100% rename from lib/Zend/Measure/Frequency.php rename to lib/internal/Zend/Measure/Frequency.php diff --git a/lib/Zend/Measure/Illumination.php b/lib/internal/Zend/Measure/Illumination.php similarity index 100% rename from lib/Zend/Measure/Illumination.php rename to lib/internal/Zend/Measure/Illumination.php diff --git a/lib/Zend/Measure/Length.php b/lib/internal/Zend/Measure/Length.php similarity index 100% rename from lib/Zend/Measure/Length.php rename to lib/internal/Zend/Measure/Length.php diff --git a/lib/Zend/Measure/Lightness.php b/lib/internal/Zend/Measure/Lightness.php similarity index 100% rename from lib/Zend/Measure/Lightness.php rename to lib/internal/Zend/Measure/Lightness.php diff --git a/lib/Zend/Measure/Number.php b/lib/internal/Zend/Measure/Number.php similarity index 100% rename from lib/Zend/Measure/Number.php rename to lib/internal/Zend/Measure/Number.php diff --git a/lib/Zend/Measure/Power.php b/lib/internal/Zend/Measure/Power.php similarity index 100% rename from lib/Zend/Measure/Power.php rename to lib/internal/Zend/Measure/Power.php diff --git a/lib/Zend/Measure/Pressure.php b/lib/internal/Zend/Measure/Pressure.php similarity index 100% rename from lib/Zend/Measure/Pressure.php rename to lib/internal/Zend/Measure/Pressure.php diff --git a/lib/Zend/Measure/Speed.php b/lib/internal/Zend/Measure/Speed.php similarity index 100% rename from lib/Zend/Measure/Speed.php rename to lib/internal/Zend/Measure/Speed.php diff --git a/lib/Zend/Measure/Temperature.php b/lib/internal/Zend/Measure/Temperature.php similarity index 100% rename from lib/Zend/Measure/Temperature.php rename to lib/internal/Zend/Measure/Temperature.php diff --git a/lib/Zend/Measure/Time.php b/lib/internal/Zend/Measure/Time.php similarity index 100% rename from lib/Zend/Measure/Time.php rename to lib/internal/Zend/Measure/Time.php diff --git a/lib/Zend/Measure/Torque.php b/lib/internal/Zend/Measure/Torque.php similarity index 100% rename from lib/Zend/Measure/Torque.php rename to lib/internal/Zend/Measure/Torque.php diff --git a/lib/Zend/Measure/Viscosity/Dynamic.php b/lib/internal/Zend/Measure/Viscosity/Dynamic.php similarity index 100% rename from lib/Zend/Measure/Viscosity/Dynamic.php rename to lib/internal/Zend/Measure/Viscosity/Dynamic.php diff --git a/lib/Zend/Measure/Viscosity/Kinematic.php b/lib/internal/Zend/Measure/Viscosity/Kinematic.php similarity index 100% rename from lib/Zend/Measure/Viscosity/Kinematic.php rename to lib/internal/Zend/Measure/Viscosity/Kinematic.php diff --git a/lib/Zend/Measure/Volume.php b/lib/internal/Zend/Measure/Volume.php similarity index 100% rename from lib/Zend/Measure/Volume.php rename to lib/internal/Zend/Measure/Volume.php diff --git a/lib/Zend/Measure/Weight.php b/lib/internal/Zend/Measure/Weight.php similarity index 100% rename from lib/Zend/Measure/Weight.php rename to lib/internal/Zend/Measure/Weight.php diff --git a/lib/Zend/Memory.php b/lib/internal/Zend/Memory.php similarity index 100% rename from lib/Zend/Memory.php rename to lib/internal/Zend/Memory.php diff --git a/lib/Zend/Memory/AccessController.php b/lib/internal/Zend/Memory/AccessController.php similarity index 100% rename from lib/Zend/Memory/AccessController.php rename to lib/internal/Zend/Memory/AccessController.php diff --git a/lib/Zend/Memory/Container.php b/lib/internal/Zend/Memory/Container.php similarity index 100% rename from lib/Zend/Memory/Container.php rename to lib/internal/Zend/Memory/Container.php diff --git a/lib/Zend/Memory/Container/Interface.php b/lib/internal/Zend/Memory/Container/Interface.php similarity index 100% rename from lib/Zend/Memory/Container/Interface.php rename to lib/internal/Zend/Memory/Container/Interface.php diff --git a/lib/Zend/Memory/Container/Locked.php b/lib/internal/Zend/Memory/Container/Locked.php similarity index 100% rename from lib/Zend/Memory/Container/Locked.php rename to lib/internal/Zend/Memory/Container/Locked.php diff --git a/lib/Zend/Memory/Container/Movable.php b/lib/internal/Zend/Memory/Container/Movable.php similarity index 100% rename from lib/Zend/Memory/Container/Movable.php rename to lib/internal/Zend/Memory/Container/Movable.php diff --git a/lib/Zend/Memory/Exception.php b/lib/internal/Zend/Memory/Exception.php similarity index 100% rename from lib/Zend/Memory/Exception.php rename to lib/internal/Zend/Memory/Exception.php diff --git a/lib/Zend/Memory/Manager.php b/lib/internal/Zend/Memory/Manager.php similarity index 100% rename from lib/Zend/Memory/Manager.php rename to lib/internal/Zend/Memory/Manager.php diff --git a/lib/Zend/Memory/Value.php b/lib/internal/Zend/Memory/Value.php similarity index 100% rename from lib/Zend/Memory/Value.php rename to lib/internal/Zend/Memory/Value.php diff --git a/lib/Zend/Mime.php b/lib/internal/Zend/Mime.php similarity index 100% rename from lib/Zend/Mime.php rename to lib/internal/Zend/Mime.php diff --git a/lib/Zend/Mime/Decode.php b/lib/internal/Zend/Mime/Decode.php similarity index 100% rename from lib/Zend/Mime/Decode.php rename to lib/internal/Zend/Mime/Decode.php diff --git a/lib/Zend/Mime/Exception.php b/lib/internal/Zend/Mime/Exception.php similarity index 100% rename from lib/Zend/Mime/Exception.php rename to lib/internal/Zend/Mime/Exception.php diff --git a/lib/Zend/Mime/Message.php b/lib/internal/Zend/Mime/Message.php similarity index 100% rename from lib/Zend/Mime/Message.php rename to lib/internal/Zend/Mime/Message.php diff --git a/lib/Zend/Mime/Part.php b/lib/internal/Zend/Mime/Part.php similarity index 100% rename from lib/Zend/Mime/Part.php rename to lib/internal/Zend/Mime/Part.php diff --git a/lib/Zend/Navigation.php b/lib/internal/Zend/Navigation.php similarity index 100% rename from lib/Zend/Navigation.php rename to lib/internal/Zend/Navigation.php diff --git a/lib/Zend/Navigation/Container.php b/lib/internal/Zend/Navigation/Container.php similarity index 100% rename from lib/Zend/Navigation/Container.php rename to lib/internal/Zend/Navigation/Container.php diff --git a/lib/Zend/Navigation/Exception.php b/lib/internal/Zend/Navigation/Exception.php similarity index 100% rename from lib/Zend/Navigation/Exception.php rename to lib/internal/Zend/Navigation/Exception.php diff --git a/lib/Zend/Navigation/Page.php b/lib/internal/Zend/Navigation/Page.php similarity index 100% rename from lib/Zend/Navigation/Page.php rename to lib/internal/Zend/Navigation/Page.php diff --git a/lib/Zend/Navigation/Page/Mvc.php b/lib/internal/Zend/Navigation/Page/Mvc.php similarity index 100% rename from lib/Zend/Navigation/Page/Mvc.php rename to lib/internal/Zend/Navigation/Page/Mvc.php diff --git a/lib/Zend/Navigation/Page/Uri.php b/lib/internal/Zend/Navigation/Page/Uri.php similarity index 100% rename from lib/Zend/Navigation/Page/Uri.php rename to lib/internal/Zend/Navigation/Page/Uri.php diff --git a/lib/Zend/Oauth.php b/lib/internal/Zend/Oauth.php similarity index 100% rename from lib/Zend/Oauth.php rename to lib/internal/Zend/Oauth.php diff --git a/lib/Zend/Oauth/Client.php b/lib/internal/Zend/Oauth/Client.php similarity index 100% rename from lib/Zend/Oauth/Client.php rename to lib/internal/Zend/Oauth/Client.php diff --git a/lib/Zend/Oauth/Config.php b/lib/internal/Zend/Oauth/Config.php similarity index 100% rename from lib/Zend/Oauth/Config.php rename to lib/internal/Zend/Oauth/Config.php diff --git a/lib/Zend/Oauth/Config/ConfigInterface.php b/lib/internal/Zend/Oauth/Config/ConfigInterface.php similarity index 100% rename from lib/Zend/Oauth/Config/ConfigInterface.php rename to lib/internal/Zend/Oauth/Config/ConfigInterface.php diff --git a/lib/Zend/Oauth/Consumer.php b/lib/internal/Zend/Oauth/Consumer.php similarity index 100% rename from lib/Zend/Oauth/Consumer.php rename to lib/internal/Zend/Oauth/Consumer.php diff --git a/lib/Zend/Oauth/Exception.php b/lib/internal/Zend/Oauth/Exception.php similarity index 100% rename from lib/Zend/Oauth/Exception.php rename to lib/internal/Zend/Oauth/Exception.php diff --git a/lib/Zend/Oauth/Http.php b/lib/internal/Zend/Oauth/Http.php similarity index 100% rename from lib/Zend/Oauth/Http.php rename to lib/internal/Zend/Oauth/Http.php diff --git a/lib/Zend/Oauth/Http/AccessToken.php b/lib/internal/Zend/Oauth/Http/AccessToken.php similarity index 100% rename from lib/Zend/Oauth/Http/AccessToken.php rename to lib/internal/Zend/Oauth/Http/AccessToken.php diff --git a/lib/Zend/Oauth/Http/RequestToken.php b/lib/internal/Zend/Oauth/Http/RequestToken.php similarity index 100% rename from lib/Zend/Oauth/Http/RequestToken.php rename to lib/internal/Zend/Oauth/Http/RequestToken.php diff --git a/lib/Zend/Oauth/Http/UserAuthorization.php b/lib/internal/Zend/Oauth/Http/UserAuthorization.php similarity index 100% rename from lib/Zend/Oauth/Http/UserAuthorization.php rename to lib/internal/Zend/Oauth/Http/UserAuthorization.php diff --git a/lib/Zend/Oauth/Http/Utility.php b/lib/internal/Zend/Oauth/Http/Utility.php similarity index 100% rename from lib/Zend/Oauth/Http/Utility.php rename to lib/internal/Zend/Oauth/Http/Utility.php diff --git a/lib/Zend/Oauth/Signature/Hmac.php b/lib/internal/Zend/Oauth/Signature/Hmac.php similarity index 100% rename from lib/Zend/Oauth/Signature/Hmac.php rename to lib/internal/Zend/Oauth/Signature/Hmac.php diff --git a/lib/Zend/Oauth/Signature/Plaintext.php b/lib/internal/Zend/Oauth/Signature/Plaintext.php similarity index 100% rename from lib/Zend/Oauth/Signature/Plaintext.php rename to lib/internal/Zend/Oauth/Signature/Plaintext.php diff --git a/lib/Zend/Oauth/Signature/Rsa.php b/lib/internal/Zend/Oauth/Signature/Rsa.php similarity index 100% rename from lib/Zend/Oauth/Signature/Rsa.php rename to lib/internal/Zend/Oauth/Signature/Rsa.php diff --git a/lib/Zend/Oauth/Signature/SignatureAbstract.php b/lib/internal/Zend/Oauth/Signature/SignatureAbstract.php similarity index 100% rename from lib/Zend/Oauth/Signature/SignatureAbstract.php rename to lib/internal/Zend/Oauth/Signature/SignatureAbstract.php diff --git a/lib/Zend/Oauth/Token.php b/lib/internal/Zend/Oauth/Token.php similarity index 100% rename from lib/Zend/Oauth/Token.php rename to lib/internal/Zend/Oauth/Token.php diff --git a/lib/Zend/Oauth/Token/Access.php b/lib/internal/Zend/Oauth/Token/Access.php similarity index 100% rename from lib/Zend/Oauth/Token/Access.php rename to lib/internal/Zend/Oauth/Token/Access.php diff --git a/lib/Zend/Oauth/Token/AuthorizedRequest.php b/lib/internal/Zend/Oauth/Token/AuthorizedRequest.php similarity index 100% rename from lib/Zend/Oauth/Token/AuthorizedRequest.php rename to lib/internal/Zend/Oauth/Token/AuthorizedRequest.php diff --git a/lib/Zend/Oauth/Token/Request.php b/lib/internal/Zend/Oauth/Token/Request.php similarity index 100% rename from lib/Zend/Oauth/Token/Request.php rename to lib/internal/Zend/Oauth/Token/Request.php diff --git a/lib/Zend/OpenId.php b/lib/internal/Zend/OpenId.php similarity index 100% rename from lib/Zend/OpenId.php rename to lib/internal/Zend/OpenId.php diff --git a/lib/Zend/OpenId/Consumer.php b/lib/internal/Zend/OpenId/Consumer.php similarity index 100% rename from lib/Zend/OpenId/Consumer.php rename to lib/internal/Zend/OpenId/Consumer.php diff --git a/lib/Zend/OpenId/Consumer/Storage.php b/lib/internal/Zend/OpenId/Consumer/Storage.php similarity index 100% rename from lib/Zend/OpenId/Consumer/Storage.php rename to lib/internal/Zend/OpenId/Consumer/Storage.php diff --git a/lib/Zend/OpenId/Consumer/Storage/File.php b/lib/internal/Zend/OpenId/Consumer/Storage/File.php similarity index 100% rename from lib/Zend/OpenId/Consumer/Storage/File.php rename to lib/internal/Zend/OpenId/Consumer/Storage/File.php diff --git a/lib/Zend/OpenId/Exception.php b/lib/internal/Zend/OpenId/Exception.php similarity index 100% rename from lib/Zend/OpenId/Exception.php rename to lib/internal/Zend/OpenId/Exception.php diff --git a/lib/Zend/OpenId/Extension.php b/lib/internal/Zend/OpenId/Extension.php similarity index 100% rename from lib/Zend/OpenId/Extension.php rename to lib/internal/Zend/OpenId/Extension.php diff --git a/lib/Zend/OpenId/Extension/Sreg.php b/lib/internal/Zend/OpenId/Extension/Sreg.php similarity index 100% rename from lib/Zend/OpenId/Extension/Sreg.php rename to lib/internal/Zend/OpenId/Extension/Sreg.php diff --git a/lib/Zend/OpenId/Provider.php b/lib/internal/Zend/OpenId/Provider.php similarity index 100% rename from lib/Zend/OpenId/Provider.php rename to lib/internal/Zend/OpenId/Provider.php diff --git a/lib/Zend/OpenId/Provider/Storage.php b/lib/internal/Zend/OpenId/Provider/Storage.php similarity index 100% rename from lib/Zend/OpenId/Provider/Storage.php rename to lib/internal/Zend/OpenId/Provider/Storage.php diff --git a/lib/Zend/OpenId/Provider/Storage/File.php b/lib/internal/Zend/OpenId/Provider/Storage/File.php similarity index 100% rename from lib/Zend/OpenId/Provider/Storage/File.php rename to lib/internal/Zend/OpenId/Provider/Storage/File.php diff --git a/lib/Zend/OpenId/Provider/User.php b/lib/internal/Zend/OpenId/Provider/User.php similarity index 100% rename from lib/Zend/OpenId/Provider/User.php rename to lib/internal/Zend/OpenId/Provider/User.php diff --git a/lib/Zend/OpenId/Provider/User/Session.php b/lib/internal/Zend/OpenId/Provider/User/Session.php similarity index 100% rename from lib/Zend/OpenId/Provider/User/Session.php rename to lib/internal/Zend/OpenId/Provider/User/Session.php diff --git a/lib/Zend/Paginator.php b/lib/internal/Zend/Paginator.php similarity index 100% rename from lib/Zend/Paginator.php rename to lib/internal/Zend/Paginator.php diff --git a/lib/Zend/Paginator/Adapter/Array.php b/lib/internal/Zend/Paginator/Adapter/Array.php similarity index 100% rename from lib/Zend/Paginator/Adapter/Array.php rename to lib/internal/Zend/Paginator/Adapter/Array.php diff --git a/lib/Zend/Paginator/Adapter/DbSelect.php b/lib/internal/Zend/Paginator/Adapter/DbSelect.php similarity index 100% rename from lib/Zend/Paginator/Adapter/DbSelect.php rename to lib/internal/Zend/Paginator/Adapter/DbSelect.php diff --git a/lib/Zend/Paginator/Adapter/DbTableSelect.php b/lib/internal/Zend/Paginator/Adapter/DbTableSelect.php similarity index 100% rename from lib/Zend/Paginator/Adapter/DbTableSelect.php rename to lib/internal/Zend/Paginator/Adapter/DbTableSelect.php diff --git a/lib/Zend/Paginator/Adapter/Interface.php b/lib/internal/Zend/Paginator/Adapter/Interface.php similarity index 100% rename from lib/Zend/Paginator/Adapter/Interface.php rename to lib/internal/Zend/Paginator/Adapter/Interface.php diff --git a/lib/Zend/Paginator/Adapter/Iterator.php b/lib/internal/Zend/Paginator/Adapter/Iterator.php similarity index 100% rename from lib/Zend/Paginator/Adapter/Iterator.php rename to lib/internal/Zend/Paginator/Adapter/Iterator.php diff --git a/lib/Zend/Paginator/Adapter/Null.php b/lib/internal/Zend/Paginator/Adapter/Null.php similarity index 100% rename from lib/Zend/Paginator/Adapter/Null.php rename to lib/internal/Zend/Paginator/Adapter/Null.php diff --git a/lib/Zend/Paginator/AdapterAggregate.php b/lib/internal/Zend/Paginator/AdapterAggregate.php similarity index 100% rename from lib/Zend/Paginator/AdapterAggregate.php rename to lib/internal/Zend/Paginator/AdapterAggregate.php diff --git a/lib/Zend/Paginator/Exception.php b/lib/internal/Zend/Paginator/Exception.php similarity index 100% rename from lib/Zend/Paginator/Exception.php rename to lib/internal/Zend/Paginator/Exception.php diff --git a/lib/Zend/Paginator/ScrollingStyle/All.php b/lib/internal/Zend/Paginator/ScrollingStyle/All.php similarity index 100% rename from lib/Zend/Paginator/ScrollingStyle/All.php rename to lib/internal/Zend/Paginator/ScrollingStyle/All.php diff --git a/lib/Zend/Paginator/ScrollingStyle/Elastic.php b/lib/internal/Zend/Paginator/ScrollingStyle/Elastic.php similarity index 100% rename from lib/Zend/Paginator/ScrollingStyle/Elastic.php rename to lib/internal/Zend/Paginator/ScrollingStyle/Elastic.php diff --git a/lib/Zend/Paginator/ScrollingStyle/Interface.php b/lib/internal/Zend/Paginator/ScrollingStyle/Interface.php similarity index 100% rename from lib/Zend/Paginator/ScrollingStyle/Interface.php rename to lib/internal/Zend/Paginator/ScrollingStyle/Interface.php diff --git a/lib/Zend/Paginator/ScrollingStyle/Jumping.php b/lib/internal/Zend/Paginator/ScrollingStyle/Jumping.php similarity index 100% rename from lib/Zend/Paginator/ScrollingStyle/Jumping.php rename to lib/internal/Zend/Paginator/ScrollingStyle/Jumping.php diff --git a/lib/Zend/Paginator/ScrollingStyle/Sliding.php b/lib/internal/Zend/Paginator/ScrollingStyle/Sliding.php similarity index 100% rename from lib/Zend/Paginator/ScrollingStyle/Sliding.php rename to lib/internal/Zend/Paginator/ScrollingStyle/Sliding.php diff --git a/lib/Zend/Paginator/SerializableLimitIterator.php b/lib/internal/Zend/Paginator/SerializableLimitIterator.php similarity index 100% rename from lib/Zend/Paginator/SerializableLimitIterator.php rename to lib/internal/Zend/Paginator/SerializableLimitIterator.php diff --git a/lib/Zend/Pdf.php b/lib/internal/Zend/Pdf.php similarity index 100% rename from lib/Zend/Pdf.php rename to lib/internal/Zend/Pdf.php diff --git a/lib/Zend/Pdf/Action.php b/lib/internal/Zend/Pdf/Action.php similarity index 100% rename from lib/Zend/Pdf/Action.php rename to lib/internal/Zend/Pdf/Action.php diff --git a/lib/Zend/Pdf/Action/GoTo.php b/lib/internal/Zend/Pdf/Action/GoTo.php similarity index 100% rename from lib/Zend/Pdf/Action/GoTo.php rename to lib/internal/Zend/Pdf/Action/GoTo.php diff --git a/lib/Zend/Pdf/Action/GoTo3DView.php b/lib/internal/Zend/Pdf/Action/GoTo3DView.php similarity index 100% rename from lib/Zend/Pdf/Action/GoTo3DView.php rename to lib/internal/Zend/Pdf/Action/GoTo3DView.php diff --git a/lib/Zend/Pdf/Action/GoToE.php b/lib/internal/Zend/Pdf/Action/GoToE.php similarity index 100% rename from lib/Zend/Pdf/Action/GoToE.php rename to lib/internal/Zend/Pdf/Action/GoToE.php diff --git a/lib/Zend/Pdf/Action/GoToR.php b/lib/internal/Zend/Pdf/Action/GoToR.php similarity index 100% rename from lib/Zend/Pdf/Action/GoToR.php rename to lib/internal/Zend/Pdf/Action/GoToR.php diff --git a/lib/Zend/Pdf/Action/Hide.php b/lib/internal/Zend/Pdf/Action/Hide.php similarity index 100% rename from lib/Zend/Pdf/Action/Hide.php rename to lib/internal/Zend/Pdf/Action/Hide.php diff --git a/lib/Zend/Pdf/Action/ImportData.php b/lib/internal/Zend/Pdf/Action/ImportData.php similarity index 100% rename from lib/Zend/Pdf/Action/ImportData.php rename to lib/internal/Zend/Pdf/Action/ImportData.php diff --git a/lib/Zend/Pdf/Action/JavaScript.php b/lib/internal/Zend/Pdf/Action/JavaScript.php similarity index 100% rename from lib/Zend/Pdf/Action/JavaScript.php rename to lib/internal/Zend/Pdf/Action/JavaScript.php diff --git a/lib/Zend/Pdf/Action/Launch.php b/lib/internal/Zend/Pdf/Action/Launch.php similarity index 100% rename from lib/Zend/Pdf/Action/Launch.php rename to lib/internal/Zend/Pdf/Action/Launch.php diff --git a/lib/Zend/Pdf/Action/Movie.php b/lib/internal/Zend/Pdf/Action/Movie.php similarity index 100% rename from lib/Zend/Pdf/Action/Movie.php rename to lib/internal/Zend/Pdf/Action/Movie.php diff --git a/lib/Zend/Pdf/Action/Named.php b/lib/internal/Zend/Pdf/Action/Named.php similarity index 100% rename from lib/Zend/Pdf/Action/Named.php rename to lib/internal/Zend/Pdf/Action/Named.php diff --git a/lib/Zend/Pdf/Action/Rendition.php b/lib/internal/Zend/Pdf/Action/Rendition.php similarity index 100% rename from lib/Zend/Pdf/Action/Rendition.php rename to lib/internal/Zend/Pdf/Action/Rendition.php diff --git a/lib/Zend/Pdf/Action/ResetForm.php b/lib/internal/Zend/Pdf/Action/ResetForm.php similarity index 100% rename from lib/Zend/Pdf/Action/ResetForm.php rename to lib/internal/Zend/Pdf/Action/ResetForm.php diff --git a/lib/Zend/Pdf/Action/SetOCGState.php b/lib/internal/Zend/Pdf/Action/SetOCGState.php similarity index 100% rename from lib/Zend/Pdf/Action/SetOCGState.php rename to lib/internal/Zend/Pdf/Action/SetOCGState.php diff --git a/lib/Zend/Pdf/Action/Sound.php b/lib/internal/Zend/Pdf/Action/Sound.php similarity index 100% rename from lib/Zend/Pdf/Action/Sound.php rename to lib/internal/Zend/Pdf/Action/Sound.php diff --git a/lib/Zend/Pdf/Action/SubmitForm.php b/lib/internal/Zend/Pdf/Action/SubmitForm.php similarity index 100% rename from lib/Zend/Pdf/Action/SubmitForm.php rename to lib/internal/Zend/Pdf/Action/SubmitForm.php diff --git a/lib/Zend/Pdf/Action/Thread.php b/lib/internal/Zend/Pdf/Action/Thread.php similarity index 100% rename from lib/Zend/Pdf/Action/Thread.php rename to lib/internal/Zend/Pdf/Action/Thread.php diff --git a/lib/Zend/Pdf/Action/Trans.php b/lib/internal/Zend/Pdf/Action/Trans.php similarity index 100% rename from lib/Zend/Pdf/Action/Trans.php rename to lib/internal/Zend/Pdf/Action/Trans.php diff --git a/lib/Zend/Pdf/Action/URI.php b/lib/internal/Zend/Pdf/Action/URI.php similarity index 100% rename from lib/Zend/Pdf/Action/URI.php rename to lib/internal/Zend/Pdf/Action/URI.php diff --git a/lib/Zend/Pdf/Action/Unknown.php b/lib/internal/Zend/Pdf/Action/Unknown.php similarity index 100% rename from lib/Zend/Pdf/Action/Unknown.php rename to lib/internal/Zend/Pdf/Action/Unknown.php diff --git a/lib/Zend/Pdf/Annotation.php b/lib/internal/Zend/Pdf/Annotation.php similarity index 100% rename from lib/Zend/Pdf/Annotation.php rename to lib/internal/Zend/Pdf/Annotation.php diff --git a/lib/Zend/Pdf/Annotation/FileAttachment.php b/lib/internal/Zend/Pdf/Annotation/FileAttachment.php similarity index 100% rename from lib/Zend/Pdf/Annotation/FileAttachment.php rename to lib/internal/Zend/Pdf/Annotation/FileAttachment.php diff --git a/lib/Zend/Pdf/Annotation/Link.php b/lib/internal/Zend/Pdf/Annotation/Link.php similarity index 100% rename from lib/Zend/Pdf/Annotation/Link.php rename to lib/internal/Zend/Pdf/Annotation/Link.php diff --git a/lib/Zend/Pdf/Annotation/Markup.php b/lib/internal/Zend/Pdf/Annotation/Markup.php similarity index 100% rename from lib/Zend/Pdf/Annotation/Markup.php rename to lib/internal/Zend/Pdf/Annotation/Markup.php diff --git a/lib/Zend/Pdf/Annotation/Text.php b/lib/internal/Zend/Pdf/Annotation/Text.php similarity index 100% rename from lib/Zend/Pdf/Annotation/Text.php rename to lib/internal/Zend/Pdf/Annotation/Text.php diff --git a/lib/Zend/Pdf/Canvas.php b/lib/internal/Zend/Pdf/Canvas.php similarity index 100% rename from lib/Zend/Pdf/Canvas.php rename to lib/internal/Zend/Pdf/Canvas.php diff --git a/lib/Zend/Pdf/Canvas/Abstract.php b/lib/internal/Zend/Pdf/Canvas/Abstract.php similarity index 100% rename from lib/Zend/Pdf/Canvas/Abstract.php rename to lib/internal/Zend/Pdf/Canvas/Abstract.php diff --git a/lib/Zend/Pdf/Canvas/Interface.php b/lib/internal/Zend/Pdf/Canvas/Interface.php similarity index 100% rename from lib/Zend/Pdf/Canvas/Interface.php rename to lib/internal/Zend/Pdf/Canvas/Interface.php diff --git a/lib/Zend/Pdf/Cmap.php b/lib/internal/Zend/Pdf/Cmap.php similarity index 100% rename from lib/Zend/Pdf/Cmap.php rename to lib/internal/Zend/Pdf/Cmap.php diff --git a/lib/Zend/Pdf/Cmap/ByteEncoding.php b/lib/internal/Zend/Pdf/Cmap/ByteEncoding.php similarity index 100% rename from lib/Zend/Pdf/Cmap/ByteEncoding.php rename to lib/internal/Zend/Pdf/Cmap/ByteEncoding.php diff --git a/lib/Zend/Pdf/Cmap/ByteEncoding/Static.php b/lib/internal/Zend/Pdf/Cmap/ByteEncoding/Static.php similarity index 100% rename from lib/Zend/Pdf/Cmap/ByteEncoding/Static.php rename to lib/internal/Zend/Pdf/Cmap/ByteEncoding/Static.php diff --git a/lib/Zend/Pdf/Cmap/SegmentToDelta.php b/lib/internal/Zend/Pdf/Cmap/SegmentToDelta.php similarity index 100% rename from lib/Zend/Pdf/Cmap/SegmentToDelta.php rename to lib/internal/Zend/Pdf/Cmap/SegmentToDelta.php diff --git a/lib/Zend/Pdf/Cmap/TrimmedTable.php b/lib/internal/Zend/Pdf/Cmap/TrimmedTable.php similarity index 100% rename from lib/Zend/Pdf/Cmap/TrimmedTable.php rename to lib/internal/Zend/Pdf/Cmap/TrimmedTable.php diff --git a/lib/Zend/Pdf/Color.php b/lib/internal/Zend/Pdf/Color.php similarity index 100% rename from lib/Zend/Pdf/Color.php rename to lib/internal/Zend/Pdf/Color.php diff --git a/lib/Zend/Pdf/Color/Cmyk.php b/lib/internal/Zend/Pdf/Color/Cmyk.php similarity index 100% rename from lib/Zend/Pdf/Color/Cmyk.php rename to lib/internal/Zend/Pdf/Color/Cmyk.php diff --git a/lib/Zend/Pdf/Color/GrayScale.php b/lib/internal/Zend/Pdf/Color/GrayScale.php similarity index 100% rename from lib/Zend/Pdf/Color/GrayScale.php rename to lib/internal/Zend/Pdf/Color/GrayScale.php diff --git a/lib/Zend/Pdf/Color/Html.php b/lib/internal/Zend/Pdf/Color/Html.php similarity index 100% rename from lib/Zend/Pdf/Color/Html.php rename to lib/internal/Zend/Pdf/Color/Html.php diff --git a/lib/Zend/Pdf/Color/Rgb.php b/lib/internal/Zend/Pdf/Color/Rgb.php similarity index 100% rename from lib/Zend/Pdf/Color/Rgb.php rename to lib/internal/Zend/Pdf/Color/Rgb.php diff --git a/lib/Zend/Pdf/Destination.php b/lib/internal/Zend/Pdf/Destination.php similarity index 100% rename from lib/Zend/Pdf/Destination.php rename to lib/internal/Zend/Pdf/Destination.php diff --git a/lib/Zend/Pdf/Destination/Explicit.php b/lib/internal/Zend/Pdf/Destination/Explicit.php similarity index 100% rename from lib/Zend/Pdf/Destination/Explicit.php rename to lib/internal/Zend/Pdf/Destination/Explicit.php diff --git a/lib/Zend/Pdf/Destination/Fit.php b/lib/internal/Zend/Pdf/Destination/Fit.php similarity index 100% rename from lib/Zend/Pdf/Destination/Fit.php rename to lib/internal/Zend/Pdf/Destination/Fit.php diff --git a/lib/Zend/Pdf/Destination/FitBoundingBox.php b/lib/internal/Zend/Pdf/Destination/FitBoundingBox.php similarity index 100% rename from lib/Zend/Pdf/Destination/FitBoundingBox.php rename to lib/internal/Zend/Pdf/Destination/FitBoundingBox.php diff --git a/lib/Zend/Pdf/Destination/FitBoundingBoxHorizontally.php b/lib/internal/Zend/Pdf/Destination/FitBoundingBoxHorizontally.php similarity index 100% rename from lib/Zend/Pdf/Destination/FitBoundingBoxHorizontally.php rename to lib/internal/Zend/Pdf/Destination/FitBoundingBoxHorizontally.php diff --git a/lib/Zend/Pdf/Destination/FitBoundingBoxVertically.php b/lib/internal/Zend/Pdf/Destination/FitBoundingBoxVertically.php similarity index 100% rename from lib/Zend/Pdf/Destination/FitBoundingBoxVertically.php rename to lib/internal/Zend/Pdf/Destination/FitBoundingBoxVertically.php diff --git a/lib/Zend/Pdf/Destination/FitHorizontally.php b/lib/internal/Zend/Pdf/Destination/FitHorizontally.php similarity index 100% rename from lib/Zend/Pdf/Destination/FitHorizontally.php rename to lib/internal/Zend/Pdf/Destination/FitHorizontally.php diff --git a/lib/Zend/Pdf/Destination/FitRectangle.php b/lib/internal/Zend/Pdf/Destination/FitRectangle.php similarity index 100% rename from lib/Zend/Pdf/Destination/FitRectangle.php rename to lib/internal/Zend/Pdf/Destination/FitRectangle.php diff --git a/lib/Zend/Pdf/Destination/FitVertically.php b/lib/internal/Zend/Pdf/Destination/FitVertically.php similarity index 100% rename from lib/Zend/Pdf/Destination/FitVertically.php rename to lib/internal/Zend/Pdf/Destination/FitVertically.php diff --git a/lib/Zend/Pdf/Destination/Named.php b/lib/internal/Zend/Pdf/Destination/Named.php similarity index 100% rename from lib/Zend/Pdf/Destination/Named.php rename to lib/internal/Zend/Pdf/Destination/Named.php diff --git a/lib/Zend/Pdf/Destination/Unknown.php b/lib/internal/Zend/Pdf/Destination/Unknown.php similarity index 100% rename from lib/Zend/Pdf/Destination/Unknown.php rename to lib/internal/Zend/Pdf/Destination/Unknown.php diff --git a/lib/Zend/Pdf/Destination/Zoom.php b/lib/internal/Zend/Pdf/Destination/Zoom.php similarity index 100% rename from lib/Zend/Pdf/Destination/Zoom.php rename to lib/internal/Zend/Pdf/Destination/Zoom.php diff --git a/lib/Zend/Pdf/Element.php b/lib/internal/Zend/Pdf/Element.php similarity index 100% rename from lib/Zend/Pdf/Element.php rename to lib/internal/Zend/Pdf/Element.php diff --git a/lib/Zend/Pdf/Element/Array.php b/lib/internal/Zend/Pdf/Element/Array.php similarity index 100% rename from lib/Zend/Pdf/Element/Array.php rename to lib/internal/Zend/Pdf/Element/Array.php diff --git a/lib/Zend/Pdf/Element/Boolean.php b/lib/internal/Zend/Pdf/Element/Boolean.php similarity index 100% rename from lib/Zend/Pdf/Element/Boolean.php rename to lib/internal/Zend/Pdf/Element/Boolean.php diff --git a/lib/Zend/Pdf/Element/Dictionary.php b/lib/internal/Zend/Pdf/Element/Dictionary.php similarity index 100% rename from lib/Zend/Pdf/Element/Dictionary.php rename to lib/internal/Zend/Pdf/Element/Dictionary.php diff --git a/lib/Zend/Pdf/Element/Name.php b/lib/internal/Zend/Pdf/Element/Name.php similarity index 100% rename from lib/Zend/Pdf/Element/Name.php rename to lib/internal/Zend/Pdf/Element/Name.php diff --git a/lib/Zend/Pdf/Element/Null.php b/lib/internal/Zend/Pdf/Element/Null.php similarity index 100% rename from lib/Zend/Pdf/Element/Null.php rename to lib/internal/Zend/Pdf/Element/Null.php diff --git a/lib/Zend/Pdf/Element/Numeric.php b/lib/internal/Zend/Pdf/Element/Numeric.php similarity index 100% rename from lib/Zend/Pdf/Element/Numeric.php rename to lib/internal/Zend/Pdf/Element/Numeric.php diff --git a/lib/Zend/Pdf/Element/Object.php b/lib/internal/Zend/Pdf/Element/Object.php similarity index 100% rename from lib/Zend/Pdf/Element/Object.php rename to lib/internal/Zend/Pdf/Element/Object.php diff --git a/lib/Zend/Pdf/Element/Object/Stream.php b/lib/internal/Zend/Pdf/Element/Object/Stream.php similarity index 100% rename from lib/Zend/Pdf/Element/Object/Stream.php rename to lib/internal/Zend/Pdf/Element/Object/Stream.php diff --git a/lib/Zend/Pdf/Element/Reference.php b/lib/internal/Zend/Pdf/Element/Reference.php similarity index 100% rename from lib/Zend/Pdf/Element/Reference.php rename to lib/internal/Zend/Pdf/Element/Reference.php diff --git a/lib/Zend/Pdf/Element/Reference/Context.php b/lib/internal/Zend/Pdf/Element/Reference/Context.php similarity index 100% rename from lib/Zend/Pdf/Element/Reference/Context.php rename to lib/internal/Zend/Pdf/Element/Reference/Context.php diff --git a/lib/Zend/Pdf/Element/Reference/Table.php b/lib/internal/Zend/Pdf/Element/Reference/Table.php similarity index 100% rename from lib/Zend/Pdf/Element/Reference/Table.php rename to lib/internal/Zend/Pdf/Element/Reference/Table.php diff --git a/lib/Zend/Pdf/Element/Stream.php b/lib/internal/Zend/Pdf/Element/Stream.php similarity index 100% rename from lib/Zend/Pdf/Element/Stream.php rename to lib/internal/Zend/Pdf/Element/Stream.php diff --git a/lib/Zend/Pdf/Element/String.php b/lib/internal/Zend/Pdf/Element/String.php similarity index 100% rename from lib/Zend/Pdf/Element/String.php rename to lib/internal/Zend/Pdf/Element/String.php diff --git a/lib/Zend/Pdf/Element/String/Binary.php b/lib/internal/Zend/Pdf/Element/String/Binary.php similarity index 100% rename from lib/Zend/Pdf/Element/String/Binary.php rename to lib/internal/Zend/Pdf/Element/String/Binary.php diff --git a/lib/Zend/Pdf/ElementFactory.php b/lib/internal/Zend/Pdf/ElementFactory.php similarity index 100% rename from lib/Zend/Pdf/ElementFactory.php rename to lib/internal/Zend/Pdf/ElementFactory.php diff --git a/lib/Zend/Pdf/ElementFactory/Interface.php b/lib/internal/Zend/Pdf/ElementFactory/Interface.php similarity index 100% rename from lib/Zend/Pdf/ElementFactory/Interface.php rename to lib/internal/Zend/Pdf/ElementFactory/Interface.php diff --git a/lib/Zend/Pdf/ElementFactory/Proxy.php b/lib/internal/Zend/Pdf/ElementFactory/Proxy.php similarity index 100% rename from lib/Zend/Pdf/ElementFactory/Proxy.php rename to lib/internal/Zend/Pdf/ElementFactory/Proxy.php diff --git a/lib/Zend/Pdf/Exception.php b/lib/internal/Zend/Pdf/Exception.php similarity index 100% rename from lib/Zend/Pdf/Exception.php rename to lib/internal/Zend/Pdf/Exception.php diff --git a/lib/Zend/Pdf/FileParser.php b/lib/internal/Zend/Pdf/FileParser.php similarity index 100% rename from lib/Zend/Pdf/FileParser.php rename to lib/internal/Zend/Pdf/FileParser.php diff --git a/lib/Zend/Pdf/FileParser/Font.php b/lib/internal/Zend/Pdf/FileParser/Font.php similarity index 100% rename from lib/Zend/Pdf/FileParser/Font.php rename to lib/internal/Zend/Pdf/FileParser/Font.php diff --git a/lib/Zend/Pdf/FileParser/Font/OpenType.php b/lib/internal/Zend/Pdf/FileParser/Font/OpenType.php similarity index 100% rename from lib/Zend/Pdf/FileParser/Font/OpenType.php rename to lib/internal/Zend/Pdf/FileParser/Font/OpenType.php diff --git a/lib/Zend/Pdf/FileParser/Font/OpenType/TrueType.php b/lib/internal/Zend/Pdf/FileParser/Font/OpenType/TrueType.php similarity index 100% rename from lib/Zend/Pdf/FileParser/Font/OpenType/TrueType.php rename to lib/internal/Zend/Pdf/FileParser/Font/OpenType/TrueType.php diff --git a/lib/Zend/Pdf/FileParser/Image.php b/lib/internal/Zend/Pdf/FileParser/Image.php similarity index 100% rename from lib/Zend/Pdf/FileParser/Image.php rename to lib/internal/Zend/Pdf/FileParser/Image.php diff --git a/lib/Zend/Pdf/FileParser/Image/Png.php b/lib/internal/Zend/Pdf/FileParser/Image/Png.php similarity index 100% rename from lib/Zend/Pdf/FileParser/Image/Png.php rename to lib/internal/Zend/Pdf/FileParser/Image/Png.php diff --git a/lib/Zend/Pdf/FileParserDataSource.php b/lib/internal/Zend/Pdf/FileParserDataSource.php similarity index 100% rename from lib/Zend/Pdf/FileParserDataSource.php rename to lib/internal/Zend/Pdf/FileParserDataSource.php diff --git a/lib/Zend/Pdf/FileParserDataSource/File.php b/lib/internal/Zend/Pdf/FileParserDataSource/File.php similarity index 100% rename from lib/Zend/Pdf/FileParserDataSource/File.php rename to lib/internal/Zend/Pdf/FileParserDataSource/File.php diff --git a/lib/Zend/Pdf/FileParserDataSource/String.php b/lib/internal/Zend/Pdf/FileParserDataSource/String.php similarity index 100% rename from lib/Zend/Pdf/FileParserDataSource/String.php rename to lib/internal/Zend/Pdf/FileParserDataSource/String.php diff --git a/lib/Zend/Pdf/Filter/Ascii85.php b/lib/internal/Zend/Pdf/Filter/Ascii85.php similarity index 100% rename from lib/Zend/Pdf/Filter/Ascii85.php rename to lib/internal/Zend/Pdf/Filter/Ascii85.php diff --git a/lib/Zend/Pdf/Filter/AsciiHex.php b/lib/internal/Zend/Pdf/Filter/AsciiHex.php similarity index 100% rename from lib/Zend/Pdf/Filter/AsciiHex.php rename to lib/internal/Zend/Pdf/Filter/AsciiHex.php diff --git a/lib/Zend/Pdf/Filter/Compression.php b/lib/internal/Zend/Pdf/Filter/Compression.php similarity index 100% rename from lib/Zend/Pdf/Filter/Compression.php rename to lib/internal/Zend/Pdf/Filter/Compression.php diff --git a/lib/Zend/Pdf/Filter/Compression/Flate.php b/lib/internal/Zend/Pdf/Filter/Compression/Flate.php similarity index 100% rename from lib/Zend/Pdf/Filter/Compression/Flate.php rename to lib/internal/Zend/Pdf/Filter/Compression/Flate.php diff --git a/lib/Zend/Pdf/Filter/Compression/Lzw.php b/lib/internal/Zend/Pdf/Filter/Compression/Lzw.php similarity index 100% rename from lib/Zend/Pdf/Filter/Compression/Lzw.php rename to lib/internal/Zend/Pdf/Filter/Compression/Lzw.php diff --git a/lib/Zend/Pdf/Filter/Interface.php b/lib/internal/Zend/Pdf/Filter/Interface.php similarity index 100% rename from lib/Zend/Pdf/Filter/Interface.php rename to lib/internal/Zend/Pdf/Filter/Interface.php diff --git a/lib/Zend/Pdf/Filter/RunLength.php b/lib/internal/Zend/Pdf/Filter/RunLength.php similarity index 100% rename from lib/Zend/Pdf/Filter/RunLength.php rename to lib/internal/Zend/Pdf/Filter/RunLength.php diff --git a/lib/Zend/Pdf/Font.php b/lib/internal/Zend/Pdf/Font.php similarity index 100% rename from lib/Zend/Pdf/Font.php rename to lib/internal/Zend/Pdf/Font.php diff --git a/lib/Zend/Pdf/Image.php b/lib/internal/Zend/Pdf/Image.php similarity index 100% rename from lib/Zend/Pdf/Image.php rename to lib/internal/Zend/Pdf/Image.php diff --git a/lib/Zend/Pdf/NameTree.php b/lib/internal/Zend/Pdf/NameTree.php similarity index 100% rename from lib/Zend/Pdf/NameTree.php rename to lib/internal/Zend/Pdf/NameTree.php diff --git a/lib/Zend/Pdf/Outline.php b/lib/internal/Zend/Pdf/Outline.php similarity index 100% rename from lib/Zend/Pdf/Outline.php rename to lib/internal/Zend/Pdf/Outline.php diff --git a/lib/Zend/Pdf/Outline/Created.php b/lib/internal/Zend/Pdf/Outline/Created.php similarity index 100% rename from lib/Zend/Pdf/Outline/Created.php rename to lib/internal/Zend/Pdf/Outline/Created.php diff --git a/lib/Zend/Pdf/Outline/Loaded.php b/lib/internal/Zend/Pdf/Outline/Loaded.php similarity index 100% rename from lib/Zend/Pdf/Outline/Loaded.php rename to lib/internal/Zend/Pdf/Outline/Loaded.php diff --git a/lib/Zend/Pdf/Page.php b/lib/internal/Zend/Pdf/Page.php similarity index 100% rename from lib/Zend/Pdf/Page.php rename to lib/internal/Zend/Pdf/Page.php diff --git a/lib/Zend/Pdf/Parser.php b/lib/internal/Zend/Pdf/Parser.php similarity index 100% rename from lib/Zend/Pdf/Parser.php rename to lib/internal/Zend/Pdf/Parser.php diff --git a/lib/Zend/Pdf/RecursivelyIteratableObjectsContainer.php b/lib/internal/Zend/Pdf/RecursivelyIteratableObjectsContainer.php similarity index 100% rename from lib/Zend/Pdf/RecursivelyIteratableObjectsContainer.php rename to lib/internal/Zend/Pdf/RecursivelyIteratableObjectsContainer.php diff --git a/lib/Zend/Pdf/Resource.php b/lib/internal/Zend/Pdf/Resource.php similarity index 100% rename from lib/Zend/Pdf/Resource.php rename to lib/internal/Zend/Pdf/Resource.php diff --git a/lib/Zend/Pdf/Resource/ContentStream.php b/lib/internal/Zend/Pdf/Resource/ContentStream.php similarity index 100% rename from lib/Zend/Pdf/Resource/ContentStream.php rename to lib/internal/Zend/Pdf/Resource/ContentStream.php diff --git a/lib/Zend/Pdf/Resource/Extractor.php b/lib/internal/Zend/Pdf/Resource/Extractor.php similarity index 100% rename from lib/Zend/Pdf/Resource/Extractor.php rename to lib/internal/Zend/Pdf/Resource/Extractor.php diff --git a/lib/Zend/Pdf/Resource/Font.php b/lib/internal/Zend/Pdf/Resource/Font.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font.php rename to lib/internal/Zend/Pdf/Resource/Font.php diff --git a/lib/Zend/Pdf/Resource/Font/CidFont.php b/lib/internal/Zend/Pdf/Resource/Font/CidFont.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/CidFont.php rename to lib/internal/Zend/Pdf/Resource/Font/CidFont.php diff --git a/lib/Zend/Pdf/Resource/Font/CidFont/TrueType.php b/lib/internal/Zend/Pdf/Resource/Font/CidFont/TrueType.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/CidFont/TrueType.php rename to lib/internal/Zend/Pdf/Resource/Font/CidFont/TrueType.php diff --git a/lib/Zend/Pdf/Resource/Font/Extracted.php b/lib/internal/Zend/Pdf/Resource/Font/Extracted.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Extracted.php rename to lib/internal/Zend/Pdf/Resource/Font/Extracted.php diff --git a/lib/Zend/Pdf/Resource/Font/FontDescriptor.php b/lib/internal/Zend/Pdf/Resource/Font/FontDescriptor.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/FontDescriptor.php rename to lib/internal/Zend/Pdf/Resource/Font/FontDescriptor.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple.php b/lib/internal/Zend/Pdf/Resource/Font/Simple.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Parsed.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Parsed.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Parsed.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Parsed.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Parsed/TrueType.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Parsed/TrueType.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Parsed/TrueType.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Parsed/TrueType.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/Courier.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/Courier.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/Courier.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/Courier.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/CourierBold.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/CourierBold.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/CourierBold.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/CourierBold.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/CourierBoldOblique.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/CourierBoldOblique.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/CourierBoldOblique.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/CourierBoldOblique.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/CourierOblique.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/CourierOblique.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/CourierOblique.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/CourierOblique.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/Helvetica.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/Helvetica.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/Helvetica.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/Helvetica.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBold.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBold.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBold.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBold.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBoldOblique.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBoldOblique.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBoldOblique.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBoldOblique.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaOblique.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaOblique.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaOblique.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaOblique.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/Symbol.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/Symbol.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/Symbol.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/Symbol.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesBold.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesBold.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesBold.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesBold.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesBoldItalic.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesBoldItalic.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesBoldItalic.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesBoldItalic.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesItalic.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesItalic.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesItalic.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesItalic.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesRoman.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesRoman.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/TimesRoman.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/TimesRoman.php diff --git a/lib/Zend/Pdf/Resource/Font/Simple/Standard/ZapfDingbats.php b/lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/ZapfDingbats.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Simple/Standard/ZapfDingbats.php rename to lib/internal/Zend/Pdf/Resource/Font/Simple/Standard/ZapfDingbats.php diff --git a/lib/Zend/Pdf/Resource/Font/Type0.php b/lib/internal/Zend/Pdf/Resource/Font/Type0.php similarity index 100% rename from lib/Zend/Pdf/Resource/Font/Type0.php rename to lib/internal/Zend/Pdf/Resource/Font/Type0.php diff --git a/lib/Zend/Pdf/Resource/GraphicsState.php b/lib/internal/Zend/Pdf/Resource/GraphicsState.php similarity index 100% rename from lib/Zend/Pdf/Resource/GraphicsState.php rename to lib/internal/Zend/Pdf/Resource/GraphicsState.php diff --git a/lib/Zend/Pdf/Resource/Image.php b/lib/internal/Zend/Pdf/Resource/Image.php similarity index 100% rename from lib/Zend/Pdf/Resource/Image.php rename to lib/internal/Zend/Pdf/Resource/Image.php diff --git a/lib/Zend/Pdf/Resource/Image/Jpeg.php b/lib/internal/Zend/Pdf/Resource/Image/Jpeg.php similarity index 100% rename from lib/Zend/Pdf/Resource/Image/Jpeg.php rename to lib/internal/Zend/Pdf/Resource/Image/Jpeg.php diff --git a/lib/Zend/Pdf/Resource/Image/Png.php b/lib/internal/Zend/Pdf/Resource/Image/Png.php similarity index 100% rename from lib/Zend/Pdf/Resource/Image/Png.php rename to lib/internal/Zend/Pdf/Resource/Image/Png.php diff --git a/lib/Zend/Pdf/Resource/Image/Tiff.php b/lib/internal/Zend/Pdf/Resource/Image/Tiff.php similarity index 100% rename from lib/Zend/Pdf/Resource/Image/Tiff.php rename to lib/internal/Zend/Pdf/Resource/Image/Tiff.php diff --git a/lib/Zend/Pdf/Resource/ImageFactory.php b/lib/internal/Zend/Pdf/Resource/ImageFactory.php similarity index 100% rename from lib/Zend/Pdf/Resource/ImageFactory.php rename to lib/internal/Zend/Pdf/Resource/ImageFactory.php diff --git a/lib/Zend/Pdf/Resource/Unified.php b/lib/internal/Zend/Pdf/Resource/Unified.php similarity index 100% rename from lib/Zend/Pdf/Resource/Unified.php rename to lib/internal/Zend/Pdf/Resource/Unified.php diff --git a/lib/Zend/Pdf/StringParser.php b/lib/internal/Zend/Pdf/StringParser.php similarity index 100% rename from lib/Zend/Pdf/StringParser.php rename to lib/internal/Zend/Pdf/StringParser.php diff --git a/lib/Zend/Pdf/Style.php b/lib/internal/Zend/Pdf/Style.php similarity index 100% rename from lib/Zend/Pdf/Style.php rename to lib/internal/Zend/Pdf/Style.php diff --git a/lib/Zend/Pdf/Target.php b/lib/internal/Zend/Pdf/Target.php similarity index 100% rename from lib/Zend/Pdf/Target.php rename to lib/internal/Zend/Pdf/Target.php diff --git a/lib/Zend/Pdf/Trailer.php b/lib/internal/Zend/Pdf/Trailer.php similarity index 100% rename from lib/Zend/Pdf/Trailer.php rename to lib/internal/Zend/Pdf/Trailer.php diff --git a/lib/Zend/Pdf/Trailer/Generator.php b/lib/internal/Zend/Pdf/Trailer/Generator.php similarity index 100% rename from lib/Zend/Pdf/Trailer/Generator.php rename to lib/internal/Zend/Pdf/Trailer/Generator.php diff --git a/lib/Zend/Pdf/Trailer/Keeper.php b/lib/internal/Zend/Pdf/Trailer/Keeper.php similarity index 100% rename from lib/Zend/Pdf/Trailer/Keeper.php rename to lib/internal/Zend/Pdf/Trailer/Keeper.php diff --git a/lib/Zend/Pdf/UpdateInfoContainer.php b/lib/internal/Zend/Pdf/UpdateInfoContainer.php similarity index 100% rename from lib/Zend/Pdf/UpdateInfoContainer.php rename to lib/internal/Zend/Pdf/UpdateInfoContainer.php diff --git a/lib/Zend/ProgressBar.php b/lib/internal/Zend/ProgressBar.php similarity index 100% rename from lib/Zend/ProgressBar.php rename to lib/internal/Zend/ProgressBar.php diff --git a/lib/Zend/ProgressBar/Adapter.php b/lib/internal/Zend/ProgressBar/Adapter.php similarity index 100% rename from lib/Zend/ProgressBar/Adapter.php rename to lib/internal/Zend/ProgressBar/Adapter.php diff --git a/lib/Zend/ProgressBar/Adapter/Console.php b/lib/internal/Zend/ProgressBar/Adapter/Console.php similarity index 100% rename from lib/Zend/ProgressBar/Adapter/Console.php rename to lib/internal/Zend/ProgressBar/Adapter/Console.php diff --git a/lib/Zend/ProgressBar/Adapter/Exception.php b/lib/internal/Zend/ProgressBar/Adapter/Exception.php similarity index 100% rename from lib/Zend/ProgressBar/Adapter/Exception.php rename to lib/internal/Zend/ProgressBar/Adapter/Exception.php diff --git a/lib/Zend/ProgressBar/Adapter/JsPull.php b/lib/internal/Zend/ProgressBar/Adapter/JsPull.php similarity index 100% rename from lib/Zend/ProgressBar/Adapter/JsPull.php rename to lib/internal/Zend/ProgressBar/Adapter/JsPull.php diff --git a/lib/Zend/ProgressBar/Adapter/JsPush.php b/lib/internal/Zend/ProgressBar/Adapter/JsPush.php similarity index 100% rename from lib/Zend/ProgressBar/Adapter/JsPush.php rename to lib/internal/Zend/ProgressBar/Adapter/JsPush.php diff --git a/lib/Zend/ProgressBar/Exception.php b/lib/internal/Zend/ProgressBar/Exception.php similarity index 100% rename from lib/Zend/ProgressBar/Exception.php rename to lib/internal/Zend/ProgressBar/Exception.php diff --git a/lib/Zend/Queue.php b/lib/internal/Zend/Queue.php similarity index 100% rename from lib/Zend/Queue.php rename to lib/internal/Zend/Queue.php diff --git a/lib/Zend/Queue/Adapter/Activemq.php b/lib/internal/Zend/Queue/Adapter/Activemq.php similarity index 100% rename from lib/Zend/Queue/Adapter/Activemq.php rename to lib/internal/Zend/Queue/Adapter/Activemq.php diff --git a/lib/Zend/Queue/Adapter/AdapterAbstract.php b/lib/internal/Zend/Queue/Adapter/AdapterAbstract.php similarity index 100% rename from lib/Zend/Queue/Adapter/AdapterAbstract.php rename to lib/internal/Zend/Queue/Adapter/AdapterAbstract.php diff --git a/lib/Zend/Queue/Adapter/AdapterInterface.php b/lib/internal/Zend/Queue/Adapter/AdapterInterface.php similarity index 100% rename from lib/Zend/Queue/Adapter/AdapterInterface.php rename to lib/internal/Zend/Queue/Adapter/AdapterInterface.php diff --git a/lib/Zend/Queue/Adapter/Array.php b/lib/internal/Zend/Queue/Adapter/Array.php similarity index 100% rename from lib/Zend/Queue/Adapter/Array.php rename to lib/internal/Zend/Queue/Adapter/Array.php diff --git a/lib/Zend/Queue/Adapter/Db.php b/lib/internal/Zend/Queue/Adapter/Db.php similarity index 100% rename from lib/Zend/Queue/Adapter/Db.php rename to lib/internal/Zend/Queue/Adapter/Db.php diff --git a/lib/Zend/Queue/Adapter/Db/Message.php b/lib/internal/Zend/Queue/Adapter/Db/Message.php similarity index 100% rename from lib/Zend/Queue/Adapter/Db/Message.php rename to lib/internal/Zend/Queue/Adapter/Db/Message.php diff --git a/lib/Zend/Queue/Adapter/Db/Queue.php b/lib/internal/Zend/Queue/Adapter/Db/Queue.php similarity index 100% rename from lib/Zend/Queue/Adapter/Db/Queue.php rename to lib/internal/Zend/Queue/Adapter/Db/Queue.php diff --git a/lib/Zend/Queue/Adapter/Db/mysql.sql b/lib/internal/Zend/Queue/Adapter/Db/mysql.sql similarity index 100% rename from lib/Zend/Queue/Adapter/Db/mysql.sql rename to lib/internal/Zend/Queue/Adapter/Db/mysql.sql diff --git a/lib/Zend/Queue/Adapter/Db/postgresql.sql b/lib/internal/Zend/Queue/Adapter/Db/postgresql.sql similarity index 100% rename from lib/Zend/Queue/Adapter/Db/postgresql.sql rename to lib/internal/Zend/Queue/Adapter/Db/postgresql.sql diff --git a/lib/Zend/Queue/Adapter/Db/queue_sqlite.sql b/lib/internal/Zend/Queue/Adapter/Db/queue_sqlite.sql similarity index 100% rename from lib/Zend/Queue/Adapter/Db/queue_sqlite.sql rename to lib/internal/Zend/Queue/Adapter/Db/queue_sqlite.sql diff --git a/lib/Zend/Queue/Adapter/Db/sqlsrv.sql b/lib/internal/Zend/Queue/Adapter/Db/sqlsrv.sql similarity index 100% rename from lib/Zend/Queue/Adapter/Db/sqlsrv.sql rename to lib/internal/Zend/Queue/Adapter/Db/sqlsrv.sql diff --git a/lib/Zend/Queue/Adapter/Memcacheq.php b/lib/internal/Zend/Queue/Adapter/Memcacheq.php similarity index 100% rename from lib/Zend/Queue/Adapter/Memcacheq.php rename to lib/internal/Zend/Queue/Adapter/Memcacheq.php diff --git a/lib/Zend/Queue/Adapter/Null.php b/lib/internal/Zend/Queue/Adapter/Null.php similarity index 100% rename from lib/Zend/Queue/Adapter/Null.php rename to lib/internal/Zend/Queue/Adapter/Null.php diff --git a/lib/Zend/Queue/Adapter/PlatformJobQueue.php b/lib/internal/Zend/Queue/Adapter/PlatformJobQueue.php similarity index 100% rename from lib/Zend/Queue/Adapter/PlatformJobQueue.php rename to lib/internal/Zend/Queue/Adapter/PlatformJobQueue.php diff --git a/lib/Zend/Queue/Exception.php b/lib/internal/Zend/Queue/Exception.php similarity index 100% rename from lib/Zend/Queue/Exception.php rename to lib/internal/Zend/Queue/Exception.php diff --git a/lib/Zend/Queue/Message.php b/lib/internal/Zend/Queue/Message.php similarity index 100% rename from lib/Zend/Queue/Message.php rename to lib/internal/Zend/Queue/Message.php diff --git a/lib/Zend/Queue/Message/Iterator.php b/lib/internal/Zend/Queue/Message/Iterator.php similarity index 100% rename from lib/Zend/Queue/Message/Iterator.php rename to lib/internal/Zend/Queue/Message/Iterator.php diff --git a/lib/Zend/Queue/Message/PlatformJob.php b/lib/internal/Zend/Queue/Message/PlatformJob.php similarity index 100% rename from lib/Zend/Queue/Message/PlatformJob.php rename to lib/internal/Zend/Queue/Message/PlatformJob.php diff --git a/lib/Zend/Queue/Stomp/Client.php b/lib/internal/Zend/Queue/Stomp/Client.php similarity index 100% rename from lib/Zend/Queue/Stomp/Client.php rename to lib/internal/Zend/Queue/Stomp/Client.php diff --git a/lib/Zend/Queue/Stomp/Client/Connection.php b/lib/internal/Zend/Queue/Stomp/Client/Connection.php similarity index 100% rename from lib/Zend/Queue/Stomp/Client/Connection.php rename to lib/internal/Zend/Queue/Stomp/Client/Connection.php diff --git a/lib/Zend/Queue/Stomp/Client/ConnectionInterface.php b/lib/internal/Zend/Queue/Stomp/Client/ConnectionInterface.php similarity index 100% rename from lib/Zend/Queue/Stomp/Client/ConnectionInterface.php rename to lib/internal/Zend/Queue/Stomp/Client/ConnectionInterface.php diff --git a/lib/Zend/Queue/Stomp/Frame.php b/lib/internal/Zend/Queue/Stomp/Frame.php similarity index 100% rename from lib/Zend/Queue/Stomp/Frame.php rename to lib/internal/Zend/Queue/Stomp/Frame.php diff --git a/lib/Zend/Queue/Stomp/FrameInterface.php b/lib/internal/Zend/Queue/Stomp/FrameInterface.php similarity index 100% rename from lib/Zend/Queue/Stomp/FrameInterface.php rename to lib/internal/Zend/Queue/Stomp/FrameInterface.php diff --git a/lib/Zend/Reflection/Class.php b/lib/internal/Zend/Reflection/Class.php similarity index 100% rename from lib/Zend/Reflection/Class.php rename to lib/internal/Zend/Reflection/Class.php diff --git a/lib/Zend/Reflection/Docblock.php b/lib/internal/Zend/Reflection/Docblock.php similarity index 100% rename from lib/Zend/Reflection/Docblock.php rename to lib/internal/Zend/Reflection/Docblock.php diff --git a/lib/Zend/Reflection/Docblock/Tag.php b/lib/internal/Zend/Reflection/Docblock/Tag.php similarity index 100% rename from lib/Zend/Reflection/Docblock/Tag.php rename to lib/internal/Zend/Reflection/Docblock/Tag.php diff --git a/lib/Zend/Reflection/Docblock/Tag/Param.php b/lib/internal/Zend/Reflection/Docblock/Tag/Param.php similarity index 100% rename from lib/Zend/Reflection/Docblock/Tag/Param.php rename to lib/internal/Zend/Reflection/Docblock/Tag/Param.php diff --git a/lib/Zend/Reflection/Docblock/Tag/Return.php b/lib/internal/Zend/Reflection/Docblock/Tag/Return.php similarity index 100% rename from lib/Zend/Reflection/Docblock/Tag/Return.php rename to lib/internal/Zend/Reflection/Docblock/Tag/Return.php diff --git a/lib/Zend/Reflection/Exception.php b/lib/internal/Zend/Reflection/Exception.php similarity index 100% rename from lib/Zend/Reflection/Exception.php rename to lib/internal/Zend/Reflection/Exception.php diff --git a/lib/Zend/Reflection/Extension.php b/lib/internal/Zend/Reflection/Extension.php similarity index 100% rename from lib/Zend/Reflection/Extension.php rename to lib/internal/Zend/Reflection/Extension.php diff --git a/lib/Zend/Reflection/File.php b/lib/internal/Zend/Reflection/File.php similarity index 100% rename from lib/Zend/Reflection/File.php rename to lib/internal/Zend/Reflection/File.php diff --git a/lib/Zend/Reflection/Function.php b/lib/internal/Zend/Reflection/Function.php similarity index 100% rename from lib/Zend/Reflection/Function.php rename to lib/internal/Zend/Reflection/Function.php diff --git a/lib/Zend/Reflection/Method.php b/lib/internal/Zend/Reflection/Method.php similarity index 100% rename from lib/Zend/Reflection/Method.php rename to lib/internal/Zend/Reflection/Method.php diff --git a/lib/Zend/Reflection/Parameter.php b/lib/internal/Zend/Reflection/Parameter.php similarity index 100% rename from lib/Zend/Reflection/Parameter.php rename to lib/internal/Zend/Reflection/Parameter.php diff --git a/lib/Zend/Reflection/Property.php b/lib/internal/Zend/Reflection/Property.php similarity index 100% rename from lib/Zend/Reflection/Property.php rename to lib/internal/Zend/Reflection/Property.php diff --git a/lib/Zend/Registry.php b/lib/internal/Zend/Registry.php similarity index 100% rename from lib/Zend/Registry.php rename to lib/internal/Zend/Registry.php diff --git a/lib/Zend/Rest/Client.php b/lib/internal/Zend/Rest/Client.php similarity index 100% rename from lib/Zend/Rest/Client.php rename to lib/internal/Zend/Rest/Client.php diff --git a/lib/Zend/Rest/Client/Exception.php b/lib/internal/Zend/Rest/Client/Exception.php similarity index 100% rename from lib/Zend/Rest/Client/Exception.php rename to lib/internal/Zend/Rest/Client/Exception.php diff --git a/lib/Zend/Rest/Client/Result.php b/lib/internal/Zend/Rest/Client/Result.php similarity index 100% rename from lib/Zend/Rest/Client/Result.php rename to lib/internal/Zend/Rest/Client/Result.php diff --git a/lib/Zend/Rest/Client/Result/Exception.php b/lib/internal/Zend/Rest/Client/Result/Exception.php similarity index 100% rename from lib/Zend/Rest/Client/Result/Exception.php rename to lib/internal/Zend/Rest/Client/Result/Exception.php diff --git a/lib/Zend/Rest/Controller.php b/lib/internal/Zend/Rest/Controller.php similarity index 100% rename from lib/Zend/Rest/Controller.php rename to lib/internal/Zend/Rest/Controller.php diff --git a/lib/Zend/Rest/Exception.php b/lib/internal/Zend/Rest/Exception.php similarity index 100% rename from lib/Zend/Rest/Exception.php rename to lib/internal/Zend/Rest/Exception.php diff --git a/lib/Zend/Rest/Route.php b/lib/internal/Zend/Rest/Route.php similarity index 100% rename from lib/Zend/Rest/Route.php rename to lib/internal/Zend/Rest/Route.php diff --git a/lib/Zend/Rest/Server.php b/lib/internal/Zend/Rest/Server.php similarity index 100% rename from lib/Zend/Rest/Server.php rename to lib/internal/Zend/Rest/Server.php diff --git a/lib/Zend/Rest/Server/Exception.php b/lib/internal/Zend/Rest/Server/Exception.php similarity index 100% rename from lib/Zend/Rest/Server/Exception.php rename to lib/internal/Zend/Rest/Server/Exception.php diff --git a/lib/Zend/Search/Exception.php b/lib/internal/Zend/Search/Exception.php similarity index 100% rename from lib/Zend/Search/Exception.php rename to lib/internal/Zend/Search/Exception.php diff --git a/lib/Zend/Search/Lucene.php b/lib/internal/Zend/Search/Lucene.php similarity index 100% rename from lib/Zend/Search/Lucene.php rename to lib/internal/Zend/Search/Lucene.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php diff --git a/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php b/lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php rename to lib/internal/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php diff --git a/lib/Zend/Search/Lucene/Analysis/Token.php b/lib/internal/Zend/Search/Lucene/Analysis/Token.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/Token.php rename to lib/internal/Zend/Search/Lucene/Analysis/Token.php diff --git a/lib/Zend/Search/Lucene/Analysis/TokenFilter.php b/lib/internal/Zend/Search/Lucene/Analysis/TokenFilter.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/TokenFilter.php rename to lib/internal/Zend/Search/Lucene/Analysis/TokenFilter.php diff --git a/lib/Zend/Search/Lucene/Analysis/TokenFilter/LowerCase.php b/lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/LowerCase.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/TokenFilter/LowerCase.php rename to lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/LowerCase.php diff --git a/lib/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php b/lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php rename to lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php diff --git a/lib/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php b/lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php rename to lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php diff --git a/lib/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php b/lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php similarity index 100% rename from lib/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php rename to lib/internal/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php diff --git a/lib/Zend/Search/Lucene/Document.php b/lib/internal/Zend/Search/Lucene/Document.php similarity index 100% rename from lib/Zend/Search/Lucene/Document.php rename to lib/internal/Zend/Search/Lucene/Document.php diff --git a/lib/Zend/Search/Lucene/Document/Docx.php b/lib/internal/Zend/Search/Lucene/Document/Docx.php similarity index 100% rename from lib/Zend/Search/Lucene/Document/Docx.php rename to lib/internal/Zend/Search/Lucene/Document/Docx.php diff --git a/lib/Zend/Search/Lucene/Document/Exception.php b/lib/internal/Zend/Search/Lucene/Document/Exception.php similarity index 100% rename from lib/Zend/Search/Lucene/Document/Exception.php rename to lib/internal/Zend/Search/Lucene/Document/Exception.php diff --git a/lib/Zend/Search/Lucene/Document/Html.php b/lib/internal/Zend/Search/Lucene/Document/Html.php similarity index 100% rename from lib/Zend/Search/Lucene/Document/Html.php rename to lib/internal/Zend/Search/Lucene/Document/Html.php diff --git a/lib/Zend/Search/Lucene/Document/OpenXml.php b/lib/internal/Zend/Search/Lucene/Document/OpenXml.php similarity index 100% rename from lib/Zend/Search/Lucene/Document/OpenXml.php rename to lib/internal/Zend/Search/Lucene/Document/OpenXml.php diff --git a/lib/Zend/Search/Lucene/Document/Pptx.php b/lib/internal/Zend/Search/Lucene/Document/Pptx.php similarity index 100% rename from lib/Zend/Search/Lucene/Document/Pptx.php rename to lib/internal/Zend/Search/Lucene/Document/Pptx.php diff --git a/lib/Zend/Search/Lucene/Document/Xlsx.php b/lib/internal/Zend/Search/Lucene/Document/Xlsx.php similarity index 100% rename from lib/Zend/Search/Lucene/Document/Xlsx.php rename to lib/internal/Zend/Search/Lucene/Document/Xlsx.php diff --git a/lib/Zend/Search/Lucene/Exception.php b/lib/internal/Zend/Search/Lucene/Exception.php similarity index 100% rename from lib/Zend/Search/Lucene/Exception.php rename to lib/internal/Zend/Search/Lucene/Exception.php diff --git a/lib/Zend/Search/Lucene/FSM.php b/lib/internal/Zend/Search/Lucene/FSM.php similarity index 100% rename from lib/Zend/Search/Lucene/FSM.php rename to lib/internal/Zend/Search/Lucene/FSM.php diff --git a/lib/Zend/Search/Lucene/FSMAction.php b/lib/internal/Zend/Search/Lucene/FSMAction.php similarity index 100% rename from lib/Zend/Search/Lucene/FSMAction.php rename to lib/internal/Zend/Search/Lucene/FSMAction.php diff --git a/lib/Zend/Search/Lucene/Field.php b/lib/internal/Zend/Search/Lucene/Field.php similarity index 100% rename from lib/Zend/Search/Lucene/Field.php rename to lib/internal/Zend/Search/Lucene/Field.php diff --git a/lib/Zend/Search/Lucene/Index/DictionaryLoader.php b/lib/internal/Zend/Search/Lucene/Index/DictionaryLoader.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/DictionaryLoader.php rename to lib/internal/Zend/Search/Lucene/Index/DictionaryLoader.php diff --git a/lib/Zend/Search/Lucene/Index/DocsFilter.php b/lib/internal/Zend/Search/Lucene/Index/DocsFilter.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/DocsFilter.php rename to lib/internal/Zend/Search/Lucene/Index/DocsFilter.php diff --git a/lib/Zend/Search/Lucene/Index/FieldInfo.php b/lib/internal/Zend/Search/Lucene/Index/FieldInfo.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/FieldInfo.php rename to lib/internal/Zend/Search/Lucene/Index/FieldInfo.php diff --git a/lib/Zend/Search/Lucene/Index/SegmentInfo.php b/lib/internal/Zend/Search/Lucene/Index/SegmentInfo.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/SegmentInfo.php rename to lib/internal/Zend/Search/Lucene/Index/SegmentInfo.php diff --git a/lib/Zend/Search/Lucene/Index/SegmentMerger.php b/lib/internal/Zend/Search/Lucene/Index/SegmentMerger.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/SegmentMerger.php rename to lib/internal/Zend/Search/Lucene/Index/SegmentMerger.php diff --git a/lib/Zend/Search/Lucene/Index/SegmentWriter.php b/lib/internal/Zend/Search/Lucene/Index/SegmentWriter.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/SegmentWriter.php rename to lib/internal/Zend/Search/Lucene/Index/SegmentWriter.php diff --git a/lib/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php b/lib/internal/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php rename to lib/internal/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php diff --git a/lib/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php b/lib/internal/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php rename to lib/internal/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php diff --git a/lib/Zend/Search/Lucene/Index/Term.php b/lib/internal/Zend/Search/Lucene/Index/Term.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/Term.php rename to lib/internal/Zend/Search/Lucene/Index/Term.php diff --git a/lib/Zend/Search/Lucene/Index/TermInfo.php b/lib/internal/Zend/Search/Lucene/Index/TermInfo.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/TermInfo.php rename to lib/internal/Zend/Search/Lucene/Index/TermInfo.php diff --git a/lib/Zend/Search/Lucene/Index/TermsPriorityQueue.php b/lib/internal/Zend/Search/Lucene/Index/TermsPriorityQueue.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/TermsPriorityQueue.php rename to lib/internal/Zend/Search/Lucene/Index/TermsPriorityQueue.php diff --git a/lib/Zend/Search/Lucene/Index/TermsStream/Interface.php b/lib/internal/Zend/Search/Lucene/Index/TermsStream/Interface.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/TermsStream/Interface.php rename to lib/internal/Zend/Search/Lucene/Index/TermsStream/Interface.php diff --git a/lib/Zend/Search/Lucene/Index/Writer.php b/lib/internal/Zend/Search/Lucene/Index/Writer.php similarity index 100% rename from lib/Zend/Search/Lucene/Index/Writer.php rename to lib/internal/Zend/Search/Lucene/Index/Writer.php diff --git a/lib/Zend/Search/Lucene/Interface.php b/lib/internal/Zend/Search/Lucene/Interface.php similarity index 100% rename from lib/Zend/Search/Lucene/Interface.php rename to lib/internal/Zend/Search/Lucene/Interface.php diff --git a/lib/Zend/Search/Lucene/LockManager.php b/lib/internal/Zend/Search/Lucene/LockManager.php similarity index 100% rename from lib/Zend/Search/Lucene/LockManager.php rename to lib/internal/Zend/Search/Lucene/LockManager.php diff --git a/lib/Zend/Search/Lucene/MultiSearcher.php b/lib/internal/Zend/Search/Lucene/MultiSearcher.php similarity index 100% rename from lib/Zend/Search/Lucene/MultiSearcher.php rename to lib/internal/Zend/Search/Lucene/MultiSearcher.php diff --git a/lib/Zend/Search/Lucene/PriorityQueue.php b/lib/internal/Zend/Search/Lucene/PriorityQueue.php similarity index 100% rename from lib/Zend/Search/Lucene/PriorityQueue.php rename to lib/internal/Zend/Search/Lucene/PriorityQueue.php diff --git a/lib/Zend/Search/Lucene/Proxy.php b/lib/internal/Zend/Search/Lucene/Proxy.php similarity index 100% rename from lib/Zend/Search/Lucene/Proxy.php rename to lib/internal/Zend/Search/Lucene/Proxy.php diff --git a/lib/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php b/lib/internal/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php rename to lib/internal/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php diff --git a/lib/Zend/Search/Lucene/Search/Highlighter/Default.php b/lib/internal/Zend/Search/Lucene/Search/Highlighter/Default.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Highlighter/Default.php rename to lib/internal/Zend/Search/Lucene/Search/Highlighter/Default.php diff --git a/lib/Zend/Search/Lucene/Search/Highlighter/Interface.php b/lib/internal/Zend/Search/Lucene/Search/Highlighter/Interface.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Highlighter/Interface.php rename to lib/internal/Zend/Search/Lucene/Search/Highlighter/Interface.php diff --git a/lib/Zend/Search/Lucene/Search/Query.php b/lib/internal/Zend/Search/Lucene/Search/Query.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query.php rename to lib/internal/Zend/Search/Lucene/Search/Query.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Boolean.php b/lib/internal/Zend/Search/Lucene/Search/Query/Boolean.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Boolean.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Boolean.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Empty.php b/lib/internal/Zend/Search/Lucene/Search/Query/Empty.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Empty.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Empty.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Fuzzy.php b/lib/internal/Zend/Search/Lucene/Search/Query/Fuzzy.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Fuzzy.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Fuzzy.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Insignificant.php b/lib/internal/Zend/Search/Lucene/Search/Query/Insignificant.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Insignificant.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Insignificant.php diff --git a/lib/Zend/Search/Lucene/Search/Query/MultiTerm.php b/lib/internal/Zend/Search/Lucene/Search/Query/MultiTerm.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/MultiTerm.php rename to lib/internal/Zend/Search/Lucene/Search/Query/MultiTerm.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Phrase.php b/lib/internal/Zend/Search/Lucene/Search/Query/Phrase.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Phrase.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Phrase.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Preprocessing.php b/lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Preprocessing.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Preprocessing/Fuzzy.php b/lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing/Fuzzy.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Preprocessing/Fuzzy.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing/Fuzzy.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php b/lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php b/lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Range.php b/lib/internal/Zend/Search/Lucene/Search/Query/Range.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Range.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Range.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Term.php b/lib/internal/Zend/Search/Lucene/Search/Query/Term.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Term.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Term.php diff --git a/lib/Zend/Search/Lucene/Search/Query/Wildcard.php b/lib/internal/Zend/Search/Lucene/Search/Query/Wildcard.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Query/Wildcard.php rename to lib/internal/Zend/Search/Lucene/Search/Query/Wildcard.php diff --git a/lib/Zend/Search/Lucene/Search/QueryEntry.php b/lib/internal/Zend/Search/Lucene/Search/QueryEntry.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryEntry.php rename to lib/internal/Zend/Search/Lucene/Search/QueryEntry.php diff --git a/lib/Zend/Search/Lucene/Search/QueryEntry/Phrase.php b/lib/internal/Zend/Search/Lucene/Search/QueryEntry/Phrase.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryEntry/Phrase.php rename to lib/internal/Zend/Search/Lucene/Search/QueryEntry/Phrase.php diff --git a/lib/Zend/Search/Lucene/Search/QueryEntry/Subquery.php b/lib/internal/Zend/Search/Lucene/Search/QueryEntry/Subquery.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryEntry/Subquery.php rename to lib/internal/Zend/Search/Lucene/Search/QueryEntry/Subquery.php diff --git a/lib/Zend/Search/Lucene/Search/QueryEntry/Term.php b/lib/internal/Zend/Search/Lucene/Search/QueryEntry/Term.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryEntry/Term.php rename to lib/internal/Zend/Search/Lucene/Search/QueryEntry/Term.php diff --git a/lib/Zend/Search/Lucene/Search/QueryHit.php b/lib/internal/Zend/Search/Lucene/Search/QueryHit.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryHit.php rename to lib/internal/Zend/Search/Lucene/Search/QueryHit.php diff --git a/lib/Zend/Search/Lucene/Search/QueryLexer.php b/lib/internal/Zend/Search/Lucene/Search/QueryLexer.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryLexer.php rename to lib/internal/Zend/Search/Lucene/Search/QueryLexer.php diff --git a/lib/Zend/Search/Lucene/Search/QueryParser.php b/lib/internal/Zend/Search/Lucene/Search/QueryParser.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryParser.php rename to lib/internal/Zend/Search/Lucene/Search/QueryParser.php diff --git a/lib/Zend/Search/Lucene/Search/QueryParserContext.php b/lib/internal/Zend/Search/Lucene/Search/QueryParserContext.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryParserContext.php rename to lib/internal/Zend/Search/Lucene/Search/QueryParserContext.php diff --git a/lib/Zend/Search/Lucene/Search/QueryParserException.php b/lib/internal/Zend/Search/Lucene/Search/QueryParserException.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryParserException.php rename to lib/internal/Zend/Search/Lucene/Search/QueryParserException.php diff --git a/lib/Zend/Search/Lucene/Search/QueryToken.php b/lib/internal/Zend/Search/Lucene/Search/QueryToken.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/QueryToken.php rename to lib/internal/Zend/Search/Lucene/Search/QueryToken.php diff --git a/lib/Zend/Search/Lucene/Search/Similarity.php b/lib/internal/Zend/Search/Lucene/Search/Similarity.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Similarity.php rename to lib/internal/Zend/Search/Lucene/Search/Similarity.php diff --git a/lib/Zend/Search/Lucene/Search/Similarity/Default.php b/lib/internal/Zend/Search/Lucene/Search/Similarity/Default.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Similarity/Default.php rename to lib/internal/Zend/Search/Lucene/Search/Similarity/Default.php diff --git a/lib/Zend/Search/Lucene/Search/Weight.php b/lib/internal/Zend/Search/Lucene/Search/Weight.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Weight.php rename to lib/internal/Zend/Search/Lucene/Search/Weight.php diff --git a/lib/Zend/Search/Lucene/Search/Weight/Boolean.php b/lib/internal/Zend/Search/Lucene/Search/Weight/Boolean.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Weight/Boolean.php rename to lib/internal/Zend/Search/Lucene/Search/Weight/Boolean.php diff --git a/lib/Zend/Search/Lucene/Search/Weight/Empty.php b/lib/internal/Zend/Search/Lucene/Search/Weight/Empty.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Weight/Empty.php rename to lib/internal/Zend/Search/Lucene/Search/Weight/Empty.php diff --git a/lib/Zend/Search/Lucene/Search/Weight/MultiTerm.php b/lib/internal/Zend/Search/Lucene/Search/Weight/MultiTerm.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Weight/MultiTerm.php rename to lib/internal/Zend/Search/Lucene/Search/Weight/MultiTerm.php diff --git a/lib/Zend/Search/Lucene/Search/Weight/Phrase.php b/lib/internal/Zend/Search/Lucene/Search/Weight/Phrase.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Weight/Phrase.php rename to lib/internal/Zend/Search/Lucene/Search/Weight/Phrase.php diff --git a/lib/Zend/Search/Lucene/Search/Weight/Term.php b/lib/internal/Zend/Search/Lucene/Search/Weight/Term.php similarity index 100% rename from lib/Zend/Search/Lucene/Search/Weight/Term.php rename to lib/internal/Zend/Search/Lucene/Search/Weight/Term.php diff --git a/lib/Zend/Search/Lucene/Storage/Directory.php b/lib/internal/Zend/Search/Lucene/Storage/Directory.php similarity index 100% rename from lib/Zend/Search/Lucene/Storage/Directory.php rename to lib/internal/Zend/Search/Lucene/Storage/Directory.php diff --git a/lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php b/lib/internal/Zend/Search/Lucene/Storage/Directory/Filesystem.php similarity index 100% rename from lib/Zend/Search/Lucene/Storage/Directory/Filesystem.php rename to lib/internal/Zend/Search/Lucene/Storage/Directory/Filesystem.php diff --git a/lib/Zend/Search/Lucene/Storage/File.php b/lib/internal/Zend/Search/Lucene/Storage/File.php similarity index 100% rename from lib/Zend/Search/Lucene/Storage/File.php rename to lib/internal/Zend/Search/Lucene/Storage/File.php diff --git a/lib/Zend/Search/Lucene/Storage/File/Filesystem.php b/lib/internal/Zend/Search/Lucene/Storage/File/Filesystem.php similarity index 100% rename from lib/Zend/Search/Lucene/Storage/File/Filesystem.php rename to lib/internal/Zend/Search/Lucene/Storage/File/Filesystem.php diff --git a/lib/Zend/Search/Lucene/Storage/File/Memory.php b/lib/internal/Zend/Search/Lucene/Storage/File/Memory.php similarity index 100% rename from lib/Zend/Search/Lucene/Storage/File/Memory.php rename to lib/internal/Zend/Search/Lucene/Storage/File/Memory.php diff --git a/lib/Zend/Search/Lucene/TermStreamsPriorityQueue.php b/lib/internal/Zend/Search/Lucene/TermStreamsPriorityQueue.php similarity index 100% rename from lib/Zend/Search/Lucene/TermStreamsPriorityQueue.php rename to lib/internal/Zend/Search/Lucene/TermStreamsPriorityQueue.php diff --git a/lib/Zend/Serializer.php b/lib/internal/Zend/Serializer.php similarity index 100% rename from lib/Zend/Serializer.php rename to lib/internal/Zend/Serializer.php diff --git a/lib/Zend/Serializer/Adapter/AdapterAbstract.php b/lib/internal/Zend/Serializer/Adapter/AdapterAbstract.php similarity index 100% rename from lib/Zend/Serializer/Adapter/AdapterAbstract.php rename to lib/internal/Zend/Serializer/Adapter/AdapterAbstract.php diff --git a/lib/Zend/Serializer/Adapter/AdapterInterface.php b/lib/internal/Zend/Serializer/Adapter/AdapterInterface.php similarity index 100% rename from lib/Zend/Serializer/Adapter/AdapterInterface.php rename to lib/internal/Zend/Serializer/Adapter/AdapterInterface.php diff --git a/lib/Zend/Serializer/Adapter/Amf0.php b/lib/internal/Zend/Serializer/Adapter/Amf0.php similarity index 100% rename from lib/Zend/Serializer/Adapter/Amf0.php rename to lib/internal/Zend/Serializer/Adapter/Amf0.php diff --git a/lib/Zend/Serializer/Adapter/Amf3.php b/lib/internal/Zend/Serializer/Adapter/Amf3.php similarity index 100% rename from lib/Zend/Serializer/Adapter/Amf3.php rename to lib/internal/Zend/Serializer/Adapter/Amf3.php diff --git a/lib/Zend/Serializer/Adapter/Igbinary.php b/lib/internal/Zend/Serializer/Adapter/Igbinary.php similarity index 100% rename from lib/Zend/Serializer/Adapter/Igbinary.php rename to lib/internal/Zend/Serializer/Adapter/Igbinary.php diff --git a/lib/Zend/Serializer/Adapter/Json.php b/lib/internal/Zend/Serializer/Adapter/Json.php similarity index 100% rename from lib/Zend/Serializer/Adapter/Json.php rename to lib/internal/Zend/Serializer/Adapter/Json.php diff --git a/lib/Zend/Serializer/Adapter/PhpCode.php b/lib/internal/Zend/Serializer/Adapter/PhpCode.php similarity index 100% rename from lib/Zend/Serializer/Adapter/PhpCode.php rename to lib/internal/Zend/Serializer/Adapter/PhpCode.php diff --git a/lib/Zend/Serializer/Adapter/PhpSerialize.php b/lib/internal/Zend/Serializer/Adapter/PhpSerialize.php similarity index 100% rename from lib/Zend/Serializer/Adapter/PhpSerialize.php rename to lib/internal/Zend/Serializer/Adapter/PhpSerialize.php diff --git a/lib/Zend/Serializer/Adapter/PythonPickle.php b/lib/internal/Zend/Serializer/Adapter/PythonPickle.php similarity index 100% rename from lib/Zend/Serializer/Adapter/PythonPickle.php rename to lib/internal/Zend/Serializer/Adapter/PythonPickle.php diff --git a/lib/Zend/Serializer/Adapter/Wddx.php b/lib/internal/Zend/Serializer/Adapter/Wddx.php similarity index 100% rename from lib/Zend/Serializer/Adapter/Wddx.php rename to lib/internal/Zend/Serializer/Adapter/Wddx.php diff --git a/lib/Zend/Serializer/Exception.php b/lib/internal/Zend/Serializer/Exception.php similarity index 100% rename from lib/Zend/Serializer/Exception.php rename to lib/internal/Zend/Serializer/Exception.php diff --git a/lib/Zend/Server/AbstractServer.php b/lib/internal/Zend/Server/AbstractServer.php similarity index 100% rename from lib/Zend/Server/AbstractServer.php rename to lib/internal/Zend/Server/AbstractServer.php diff --git a/lib/Zend/Server/Cache.php b/lib/internal/Zend/Server/Cache.php similarity index 100% rename from lib/Zend/Server/Cache.php rename to lib/internal/Zend/Server/Cache.php diff --git a/lib/Zend/Server/Client.php b/lib/internal/Zend/Server/Client.php similarity index 100% rename from lib/Zend/Server/Client.php rename to lib/internal/Zend/Server/Client.php diff --git a/lib/Zend/Server/Definition.php b/lib/internal/Zend/Server/Definition.php similarity index 100% rename from lib/Zend/Server/Definition.php rename to lib/internal/Zend/Server/Definition.php diff --git a/lib/Zend/Server/Exception/BadMethodCallException.php b/lib/internal/Zend/Server/Exception/BadMethodCallException.php similarity index 100% rename from lib/Zend/Server/Exception/BadMethodCallException.php rename to lib/internal/Zend/Server/Exception/BadMethodCallException.php diff --git a/lib/Zend/Server/Exception/ExceptionInterface.php b/lib/internal/Zend/Server/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Server/Exception/ExceptionInterface.php rename to lib/internal/Zend/Server/Exception/ExceptionInterface.php diff --git a/lib/Zend/Server/Exception/InvalidArgumentException.php b/lib/internal/Zend/Server/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Server/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Server/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Server/Exception/RuntimeException.php b/lib/internal/Zend/Server/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Server/Exception/RuntimeException.php rename to lib/internal/Zend/Server/Exception/RuntimeException.php diff --git a/lib/Zend/Server/Method/Callback.php b/lib/internal/Zend/Server/Method/Callback.php similarity index 100% rename from lib/Zend/Server/Method/Callback.php rename to lib/internal/Zend/Server/Method/Callback.php diff --git a/lib/Zend/Server/Method/Definition.php b/lib/internal/Zend/Server/Method/Definition.php similarity index 100% rename from lib/Zend/Server/Method/Definition.php rename to lib/internal/Zend/Server/Method/Definition.php diff --git a/lib/Zend/Server/Method/Parameter.php b/lib/internal/Zend/Server/Method/Parameter.php similarity index 100% rename from lib/Zend/Server/Method/Parameter.php rename to lib/internal/Zend/Server/Method/Parameter.php diff --git a/lib/Zend/Server/Method/Prototype.php b/lib/internal/Zend/Server/Method/Prototype.php similarity index 100% rename from lib/Zend/Server/Method/Prototype.php rename to lib/internal/Zend/Server/Method/Prototype.php diff --git a/lib/Zend/Server/Reflection.php b/lib/internal/Zend/Server/Reflection.php similarity index 100% rename from lib/Zend/Server/Reflection.php rename to lib/internal/Zend/Server/Reflection.php diff --git a/lib/Zend/Server/Reflection/AbstractFunction.php b/lib/internal/Zend/Server/Reflection/AbstractFunction.php similarity index 100% rename from lib/Zend/Server/Reflection/AbstractFunction.php rename to lib/internal/Zend/Server/Reflection/AbstractFunction.php diff --git a/lib/Zend/Server/Reflection/Exception/BadMethodCallException.php b/lib/internal/Zend/Server/Reflection/Exception/BadMethodCallException.php similarity index 100% rename from lib/Zend/Server/Reflection/Exception/BadMethodCallException.php rename to lib/internal/Zend/Server/Reflection/Exception/BadMethodCallException.php diff --git a/lib/Zend/Server/Reflection/Exception/ExceptionInterface.php b/lib/internal/Zend/Server/Reflection/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Server/Reflection/Exception/ExceptionInterface.php rename to lib/internal/Zend/Server/Reflection/Exception/ExceptionInterface.php diff --git a/lib/Zend/Server/Reflection/Exception/InvalidArgumentException.php b/lib/internal/Zend/Server/Reflection/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Server/Reflection/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Server/Reflection/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Server/Reflection/Exception/RuntimeException.php b/lib/internal/Zend/Server/Reflection/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Server/Reflection/Exception/RuntimeException.php rename to lib/internal/Zend/Server/Reflection/Exception/RuntimeException.php diff --git a/lib/Zend/Server/Reflection/Node.php b/lib/internal/Zend/Server/Reflection/Node.php similarity index 100% rename from lib/Zend/Server/Reflection/Node.php rename to lib/internal/Zend/Server/Reflection/Node.php diff --git a/lib/Zend/Server/Reflection/Prototype.php b/lib/internal/Zend/Server/Reflection/Prototype.php similarity index 100% rename from lib/Zend/Server/Reflection/Prototype.php rename to lib/internal/Zend/Server/Reflection/Prototype.php diff --git a/lib/Zend/Server/Reflection/ReflectionClass.php b/lib/internal/Zend/Server/Reflection/ReflectionClass.php similarity index 100% rename from lib/Zend/Server/Reflection/ReflectionClass.php rename to lib/internal/Zend/Server/Reflection/ReflectionClass.php diff --git a/lib/Zend/Server/Reflection/ReflectionFunction.php b/lib/internal/Zend/Server/Reflection/ReflectionFunction.php similarity index 100% rename from lib/Zend/Server/Reflection/ReflectionFunction.php rename to lib/internal/Zend/Server/Reflection/ReflectionFunction.php diff --git a/lib/Zend/Server/Reflection/ReflectionMethod.php b/lib/internal/Zend/Server/Reflection/ReflectionMethod.php similarity index 100% rename from lib/Zend/Server/Reflection/ReflectionMethod.php rename to lib/internal/Zend/Server/Reflection/ReflectionMethod.php diff --git a/lib/Zend/Server/Reflection/ReflectionParameter.php b/lib/internal/Zend/Server/Reflection/ReflectionParameter.php similarity index 100% rename from lib/Zend/Server/Reflection/ReflectionParameter.php rename to lib/internal/Zend/Server/Reflection/ReflectionParameter.php diff --git a/lib/Zend/Server/Reflection/ReflectionReturnValue.php b/lib/internal/Zend/Server/Reflection/ReflectionReturnValue.php similarity index 100% rename from lib/Zend/Server/Reflection/ReflectionReturnValue.php rename to lib/internal/Zend/Server/Reflection/ReflectionReturnValue.php diff --git a/lib/Zend/Server/Server.php b/lib/internal/Zend/Server/Server.php similarity index 100% rename from lib/Zend/Server/Server.php rename to lib/internal/Zend/Server/Server.php diff --git a/lib/Zend/Server/composer.json b/lib/internal/Zend/Server/composer.json similarity index 100% rename from lib/Zend/Server/composer.json rename to lib/internal/Zend/Server/composer.json diff --git a/lib/Zend/Service/Abstract.php b/lib/internal/Zend/Service/Abstract.php similarity index 100% rename from lib/Zend/Service/Abstract.php rename to lib/internal/Zend/Service/Abstract.php diff --git a/lib/Zend/Service/Akismet.php b/lib/internal/Zend/Service/Akismet.php similarity index 100% rename from lib/Zend/Service/Akismet.php rename to lib/internal/Zend/Service/Akismet.php diff --git a/lib/Zend/Service/Amazon.php b/lib/internal/Zend/Service/Amazon.php similarity index 100% rename from lib/Zend/Service/Amazon.php rename to lib/internal/Zend/Service/Amazon.php diff --git a/lib/Zend/Service/Amazon/Abstract.php b/lib/internal/Zend/Service/Amazon/Abstract.php similarity index 100% rename from lib/Zend/Service/Amazon/Abstract.php rename to lib/internal/Zend/Service/Amazon/Abstract.php diff --git a/lib/Zend/Service/Amazon/Accessories.php b/lib/internal/Zend/Service/Amazon/Accessories.php similarity index 100% rename from lib/Zend/Service/Amazon/Accessories.php rename to lib/internal/Zend/Service/Amazon/Accessories.php diff --git a/lib/Zend/Service/Amazon/Authentication.php b/lib/internal/Zend/Service/Amazon/Authentication.php similarity index 100% rename from lib/Zend/Service/Amazon/Authentication.php rename to lib/internal/Zend/Service/Amazon/Authentication.php diff --git a/lib/Zend/Service/Amazon/Authentication/Exception.php b/lib/internal/Zend/Service/Amazon/Authentication/Exception.php similarity index 100% rename from lib/Zend/Service/Amazon/Authentication/Exception.php rename to lib/internal/Zend/Service/Amazon/Authentication/Exception.php diff --git a/lib/Zend/Service/Amazon/Authentication/S3.php b/lib/internal/Zend/Service/Amazon/Authentication/S3.php similarity index 100% rename from lib/Zend/Service/Amazon/Authentication/S3.php rename to lib/internal/Zend/Service/Amazon/Authentication/S3.php diff --git a/lib/Zend/Service/Amazon/Authentication/V1.php b/lib/internal/Zend/Service/Amazon/Authentication/V1.php similarity index 100% rename from lib/Zend/Service/Amazon/Authentication/V1.php rename to lib/internal/Zend/Service/Amazon/Authentication/V1.php diff --git a/lib/Zend/Service/Amazon/Authentication/V2.php b/lib/internal/Zend/Service/Amazon/Authentication/V2.php similarity index 100% rename from lib/Zend/Service/Amazon/Authentication/V2.php rename to lib/internal/Zend/Service/Amazon/Authentication/V2.php diff --git a/lib/Zend/Service/Amazon/CustomerReview.php b/lib/internal/Zend/Service/Amazon/CustomerReview.php similarity index 100% rename from lib/Zend/Service/Amazon/CustomerReview.php rename to lib/internal/Zend/Service/Amazon/CustomerReview.php diff --git a/lib/Zend/Service/Amazon/Ec2.php b/lib/internal/Zend/Service/Amazon/Ec2.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2.php rename to lib/internal/Zend/Service/Amazon/Ec2.php diff --git a/lib/Zend/Service/Amazon/Ec2/Abstract.php b/lib/internal/Zend/Service/Amazon/Ec2/Abstract.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Abstract.php rename to lib/internal/Zend/Service/Amazon/Ec2/Abstract.php diff --git a/lib/Zend/Service/Amazon/Ec2/Availabilityzones.php b/lib/internal/Zend/Service/Amazon/Ec2/Availabilityzones.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Availabilityzones.php rename to lib/internal/Zend/Service/Amazon/Ec2/Availabilityzones.php diff --git a/lib/Zend/Service/Amazon/Ec2/CloudWatch.php b/lib/internal/Zend/Service/Amazon/Ec2/CloudWatch.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/CloudWatch.php rename to lib/internal/Zend/Service/Amazon/Ec2/CloudWatch.php diff --git a/lib/Zend/Service/Amazon/Ec2/Ebs.php b/lib/internal/Zend/Service/Amazon/Ec2/Ebs.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Ebs.php rename to lib/internal/Zend/Service/Amazon/Ec2/Ebs.php diff --git a/lib/Zend/Service/Amazon/Ec2/Elasticip.php b/lib/internal/Zend/Service/Amazon/Ec2/Elasticip.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Elasticip.php rename to lib/internal/Zend/Service/Amazon/Ec2/Elasticip.php diff --git a/lib/Zend/Service/Amazon/Ec2/Exception.php b/lib/internal/Zend/Service/Amazon/Ec2/Exception.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Exception.php rename to lib/internal/Zend/Service/Amazon/Ec2/Exception.php diff --git a/lib/Zend/Service/Amazon/Ec2/Image.php b/lib/internal/Zend/Service/Amazon/Ec2/Image.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Image.php rename to lib/internal/Zend/Service/Amazon/Ec2/Image.php diff --git a/lib/Zend/Service/Amazon/Ec2/Instance.php b/lib/internal/Zend/Service/Amazon/Ec2/Instance.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Instance.php rename to lib/internal/Zend/Service/Amazon/Ec2/Instance.php diff --git a/lib/Zend/Service/Amazon/Ec2/Instance/Reserved.php b/lib/internal/Zend/Service/Amazon/Ec2/Instance/Reserved.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Instance/Reserved.php rename to lib/internal/Zend/Service/Amazon/Ec2/Instance/Reserved.php diff --git a/lib/Zend/Service/Amazon/Ec2/Instance/Windows.php b/lib/internal/Zend/Service/Amazon/Ec2/Instance/Windows.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Instance/Windows.php rename to lib/internal/Zend/Service/Amazon/Ec2/Instance/Windows.php diff --git a/lib/Zend/Service/Amazon/Ec2/Keypair.php b/lib/internal/Zend/Service/Amazon/Ec2/Keypair.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Keypair.php rename to lib/internal/Zend/Service/Amazon/Ec2/Keypair.php diff --git a/lib/Zend/Service/Amazon/Ec2/Region.php b/lib/internal/Zend/Service/Amazon/Ec2/Region.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Region.php rename to lib/internal/Zend/Service/Amazon/Ec2/Region.php diff --git a/lib/Zend/Service/Amazon/Ec2/Response.php b/lib/internal/Zend/Service/Amazon/Ec2/Response.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Response.php rename to lib/internal/Zend/Service/Amazon/Ec2/Response.php diff --git a/lib/Zend/Service/Amazon/Ec2/Securitygroups.php b/lib/internal/Zend/Service/Amazon/Ec2/Securitygroups.php similarity index 100% rename from lib/Zend/Service/Amazon/Ec2/Securitygroups.php rename to lib/internal/Zend/Service/Amazon/Ec2/Securitygroups.php diff --git a/lib/Zend/Service/Amazon/EditorialReview.php b/lib/internal/Zend/Service/Amazon/EditorialReview.php similarity index 100% rename from lib/Zend/Service/Amazon/EditorialReview.php rename to lib/internal/Zend/Service/Amazon/EditorialReview.php diff --git a/lib/Zend/Service/Amazon/Exception.php b/lib/internal/Zend/Service/Amazon/Exception.php similarity index 100% rename from lib/Zend/Service/Amazon/Exception.php rename to lib/internal/Zend/Service/Amazon/Exception.php diff --git a/lib/Zend/Service/Amazon/Image.php b/lib/internal/Zend/Service/Amazon/Image.php similarity index 100% rename from lib/Zend/Service/Amazon/Image.php rename to lib/internal/Zend/Service/Amazon/Image.php diff --git a/lib/Zend/Service/Amazon/Item.php b/lib/internal/Zend/Service/Amazon/Item.php similarity index 100% rename from lib/Zend/Service/Amazon/Item.php rename to lib/internal/Zend/Service/Amazon/Item.php diff --git a/lib/Zend/Service/Amazon/ListmaniaList.php b/lib/internal/Zend/Service/Amazon/ListmaniaList.php similarity index 100% rename from lib/Zend/Service/Amazon/ListmaniaList.php rename to lib/internal/Zend/Service/Amazon/ListmaniaList.php diff --git a/lib/Zend/Service/Amazon/Offer.php b/lib/internal/Zend/Service/Amazon/Offer.php similarity index 100% rename from lib/Zend/Service/Amazon/Offer.php rename to lib/internal/Zend/Service/Amazon/Offer.php diff --git a/lib/Zend/Service/Amazon/OfferSet.php b/lib/internal/Zend/Service/Amazon/OfferSet.php similarity index 100% rename from lib/Zend/Service/Amazon/OfferSet.php rename to lib/internal/Zend/Service/Amazon/OfferSet.php diff --git a/lib/Zend/Service/Amazon/Query.php b/lib/internal/Zend/Service/Amazon/Query.php similarity index 100% rename from lib/Zend/Service/Amazon/Query.php rename to lib/internal/Zend/Service/Amazon/Query.php diff --git a/lib/Zend/Service/Amazon/ResultSet.php b/lib/internal/Zend/Service/Amazon/ResultSet.php similarity index 100% rename from lib/Zend/Service/Amazon/ResultSet.php rename to lib/internal/Zend/Service/Amazon/ResultSet.php diff --git a/lib/Zend/Service/Amazon/S3.php b/lib/internal/Zend/Service/Amazon/S3.php similarity index 100% rename from lib/Zend/Service/Amazon/S3.php rename to lib/internal/Zend/Service/Amazon/S3.php diff --git a/lib/Zend/Service/Amazon/S3/Exception.php b/lib/internal/Zend/Service/Amazon/S3/Exception.php similarity index 100% rename from lib/Zend/Service/Amazon/S3/Exception.php rename to lib/internal/Zend/Service/Amazon/S3/Exception.php diff --git a/lib/Zend/Service/Amazon/S3/Stream.php b/lib/internal/Zend/Service/Amazon/S3/Stream.php similarity index 100% rename from lib/Zend/Service/Amazon/S3/Stream.php rename to lib/internal/Zend/Service/Amazon/S3/Stream.php diff --git a/lib/Zend/Service/Amazon/SimilarProduct.php b/lib/internal/Zend/Service/Amazon/SimilarProduct.php similarity index 100% rename from lib/Zend/Service/Amazon/SimilarProduct.php rename to lib/internal/Zend/Service/Amazon/SimilarProduct.php diff --git a/lib/Zend/Service/Amazon/SimpleDb.php b/lib/internal/Zend/Service/Amazon/SimpleDb.php similarity index 100% rename from lib/Zend/Service/Amazon/SimpleDb.php rename to lib/internal/Zend/Service/Amazon/SimpleDb.php diff --git a/lib/Zend/Service/Amazon/SimpleDb/Attribute.php b/lib/internal/Zend/Service/Amazon/SimpleDb/Attribute.php similarity index 100% rename from lib/Zend/Service/Amazon/SimpleDb/Attribute.php rename to lib/internal/Zend/Service/Amazon/SimpleDb/Attribute.php diff --git a/lib/Zend/Service/Amazon/SimpleDb/Exception.php b/lib/internal/Zend/Service/Amazon/SimpleDb/Exception.php similarity index 100% rename from lib/Zend/Service/Amazon/SimpleDb/Exception.php rename to lib/internal/Zend/Service/Amazon/SimpleDb/Exception.php diff --git a/lib/Zend/Service/Amazon/SimpleDb/Page.php b/lib/internal/Zend/Service/Amazon/SimpleDb/Page.php similarity index 100% rename from lib/Zend/Service/Amazon/SimpleDb/Page.php rename to lib/internal/Zend/Service/Amazon/SimpleDb/Page.php diff --git a/lib/Zend/Service/Amazon/SimpleDb/Response.php b/lib/internal/Zend/Service/Amazon/SimpleDb/Response.php similarity index 100% rename from lib/Zend/Service/Amazon/SimpleDb/Response.php rename to lib/internal/Zend/Service/Amazon/SimpleDb/Response.php diff --git a/lib/Zend/Service/Amazon/Sqs.php b/lib/internal/Zend/Service/Amazon/Sqs.php similarity index 100% rename from lib/Zend/Service/Amazon/Sqs.php rename to lib/internal/Zend/Service/Amazon/Sqs.php diff --git a/lib/Zend/Service/Amazon/Sqs/Exception.php b/lib/internal/Zend/Service/Amazon/Sqs/Exception.php similarity index 100% rename from lib/Zend/Service/Amazon/Sqs/Exception.php rename to lib/internal/Zend/Service/Amazon/Sqs/Exception.php diff --git a/lib/Zend/Service/Audioscrobbler.php b/lib/internal/Zend/Service/Audioscrobbler.php similarity index 100% rename from lib/Zend/Service/Audioscrobbler.php rename to lib/internal/Zend/Service/Audioscrobbler.php diff --git a/lib/Zend/Service/Delicious.php b/lib/internal/Zend/Service/Delicious.php similarity index 100% rename from lib/Zend/Service/Delicious.php rename to lib/internal/Zend/Service/Delicious.php diff --git a/lib/Zend/Service/Delicious/Exception.php b/lib/internal/Zend/Service/Delicious/Exception.php similarity index 100% rename from lib/Zend/Service/Delicious/Exception.php rename to lib/internal/Zend/Service/Delicious/Exception.php diff --git a/lib/Zend/Service/Delicious/Post.php b/lib/internal/Zend/Service/Delicious/Post.php similarity index 100% rename from lib/Zend/Service/Delicious/Post.php rename to lib/internal/Zend/Service/Delicious/Post.php diff --git a/lib/Zend/Service/Delicious/PostList.php b/lib/internal/Zend/Service/Delicious/PostList.php similarity index 100% rename from lib/Zend/Service/Delicious/PostList.php rename to lib/internal/Zend/Service/Delicious/PostList.php diff --git a/lib/Zend/Service/Delicious/SimplePost.php b/lib/internal/Zend/Service/Delicious/SimplePost.php similarity index 100% rename from lib/Zend/Service/Delicious/SimplePost.php rename to lib/internal/Zend/Service/Delicious/SimplePost.php diff --git a/lib/Zend/Service/DeveloperGarden/BaseUserService.php b/lib/internal/Zend/Service/DeveloperGarden/BaseUserService.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/BaseUserService.php rename to lib/internal/Zend/Service/DeveloperGarden/BaseUserService.php diff --git a/lib/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php b/lib/internal/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php rename to lib/internal/Zend/Service/DeveloperGarden/BaseUserService/AccountBalance.php diff --git a/lib/Zend/Service/DeveloperGarden/Client/ClientAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Client/ClientAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Client/ClientAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Client/ClientAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/Client/Exception.php b/lib/internal/Zend/Service/DeveloperGarden/Client/Exception.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Client/Exception.php rename to lib/internal/Zend/Service/DeveloperGarden/Client/Exception.php diff --git a/lib/Zend/Service/DeveloperGarden/Client/Soap.php b/lib/internal/Zend/Service/DeveloperGarden/Client/Soap.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Client/Soap.php rename to lib/internal/Zend/Service/DeveloperGarden/Client/Soap.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceAccount.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceDetail.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ConferenceSchedule.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/Exception.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/Participant.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/Participant.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall/Participant.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/Participant.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php diff --git a/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php b/lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php rename to lib/internal/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantStatus.php diff --git a/lib/Zend/Service/DeveloperGarden/Credential.php b/lib/internal/Zend/Service/DeveloperGarden/Credential.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Credential.php rename to lib/internal/Zend/Service/DeveloperGarden/Credential.php diff --git a/lib/Zend/Service/DeveloperGarden/Exception.php b/lib/internal/Zend/Service/DeveloperGarden/Exception.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Exception.php rename to lib/internal/Zend/Service/DeveloperGarden/Exception.php diff --git a/lib/Zend/Service/DeveloperGarden/IpLocation.php b/lib/internal/Zend/Service/DeveloperGarden/IpLocation.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/IpLocation.php rename to lib/internal/Zend/Service/DeveloperGarden/IpLocation.php diff --git a/lib/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php b/lib/internal/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php rename to lib/internal/Zend/Service/DeveloperGarden/IpLocation/IpAddress.php diff --git a/lib/Zend/Service/DeveloperGarden/LocalSearch.php b/lib/internal/Zend/Service/DeveloperGarden/LocalSearch.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/LocalSearch.php rename to lib/internal/Zend/Service/DeveloperGarden/LocalSearch.php diff --git a/lib/Zend/Service/DeveloperGarden/LocalSearch/Exception.php b/lib/internal/Zend/Service/DeveloperGarden/LocalSearch/Exception.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/LocalSearch/Exception.php rename to lib/internal/Zend/Service/DeveloperGarden/LocalSearch/Exception.php diff --git a/lib/Zend/Service/DeveloperGarden/LocalSearch/SearchParameters.php b/lib/internal/Zend/Service/DeveloperGarden/LocalSearch/SearchParameters.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/LocalSearch/SearchParameters.php rename to lib/internal/Zend/Service/DeveloperGarden/LocalSearch/SearchParameters.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php b/lib/internal/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/BaseUserService/ChangeQuotaPool.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php b/lib/internal/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/BaseUserService/GetAccountBalance.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php b/lib/internal/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/BaseUserService/GetQuotaInformation.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/AddConferenceTemplateParticipantRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/CommitConferenceRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/CreateConferenceTemplateRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceListRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceStatusRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateListRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateParticipantRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetConferenceTemplateRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetParticipantStatusRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/GetRunningConferenceRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/NewParticipantRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateParticipantRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveConferenceTemplateRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/RemoveParticipantRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateParticipantRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateConferenceTemplateRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/ConferenceCall/UpdateParticipantRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/Exception.php b/lib/internal/Zend/Service/DeveloperGarden/Request/Exception.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/Exception.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/Exception.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/IpLocation/LocateIPRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/IpLocation/LocateIPRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/IpLocation/LocateIPRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/IpLocation/LocateIPRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php b/lib/internal/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/LocalSearch/LocalSearchRequest.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/RequestAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Request/RequestAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/RequestAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/RequestAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php b/lib/internal/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/SendSms/SendFlashSMS.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/SendSms/SendSMS.php b/lib/internal/Zend/Service/DeveloperGarden/Request/SendSms/SendSMS.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/SendSms/SendSMS.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/SendSms/SendSMS.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/SendSms/SendSmsAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Request/SendSms/SendSmsAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/SendSms/SendSmsAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/SendSms/SendSmsAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php b/lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/GetValidatedNumbers.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/Invalidate.php b/lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/Invalidate.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/SmsValidation/Invalidate.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/Invalidate.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php b/lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/SendValidationKeyword.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/SmsValidation/Validate.php b/lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/Validate.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/SmsValidation/Validate.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/SmsValidation/Validate.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php b/lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/CallStatus.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php b/lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCall.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php b/lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/NewCallSequenced.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php b/lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/TearDownCall.php diff --git a/lib/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Request/VoiceButler/VoiceButlerAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/BaseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/BaseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/BaseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/BaseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/BaseUserService/ChangeQuotaPoolResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/BaseUserService/GetAccountBalanceResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/BaseUserService/GetAccountBalanceResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/BaseUserService/GetAccountBalanceResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/BaseUserService/GetAccountBalanceResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/BaseUserService/GetQuotaInformationResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/BaseUserService/GetQuotaInformationResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/BaseUserService/GetQuotaInformationResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/BaseUserService/GetQuotaInformationResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/AddConferenceTemplateParticipantResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CCSResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CommitConferenceResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CommitConferenceResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CommitConferenceResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CommitConferenceResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/ConferenceCallAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/ConferenceCallAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/ConferenceCallAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/ConferenceCallAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/CreateConferenceTemplateResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceListResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceStatusResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateListResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateParticipantResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetConferenceTemplateResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetParticipantStatusResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/GetRunningConferenceResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/NewParticipantResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateParticipantResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateParticipantResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateParticipantResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateParticipantResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveConferenceTemplateResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveParticipantResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveParticipantResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveParticipantResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/RemoveParticipantResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateParticipantResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateParticipantResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateParticipantResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateParticipantResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateConferenceTemplateResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateParticipantResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateParticipantResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateParticipantResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ConferenceCall/UpdateParticipantResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/Exception.php b/lib/internal/Zend/Service/DeveloperGarden/Response/Exception.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/Exception.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/Exception.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/CityType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/CityType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/IpLocation/CityType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/CityType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/GeoCoordinatesType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/IPAddressLocationType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/IpLocation/RegionType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/RegionType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/IpLocation/RegionType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/IpLocation/RegionType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php b/lib/internal/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/LocalSearch/LocalSearchResponseType.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/ResponseAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Response/ResponseAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/ResponseAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/ResponseAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Exception.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/GetTokensResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/GetTokensResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/GetTokensResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/GetTokensResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/Interface.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/SecurityTokenResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/SecurityTokenResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/SecurityTokenResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SecurityTokenServer/SecurityTokenResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SendSms/SendFlashSMSResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SendSms/SendSMSResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SendSms/SendSMSResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SendSms/SendSMSResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SendSms/SendSMSResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SendSms/SendSmsAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SendSms/SendSmsAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SendSms/SendSmsAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SendSms/SendSmsAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/GetValidatedNumbersResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/InvalidateResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/SendValidationKeywordResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/SendValidationKeywordResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SmsValidation/SendValidationKeywordResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/SendValidationKeywordResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidateResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidateResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidateResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidateResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidatedNumber.php b/lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidatedNumber.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidatedNumber.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/SmsValidation/ValidatedNumber.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php b/lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatus2Response.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/CallStatusResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/NewCallSequencedResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/TearDownCallResponse.php b/lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/TearDownCallResponse.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/VoiceButler/TearDownCallResponse.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/TearDownCallResponse.php diff --git a/lib/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php b/lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php rename to lib/internal/Zend/Service/DeveloperGarden/Response/VoiceButler/VoiceButlerAbstract.php diff --git a/lib/Zend/Service/DeveloperGarden/SecurityTokenServer.php b/lib/internal/Zend/Service/DeveloperGarden/SecurityTokenServer.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/SecurityTokenServer.php rename to lib/internal/Zend/Service/DeveloperGarden/SecurityTokenServer.php diff --git a/lib/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php b/lib/internal/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php rename to lib/internal/Zend/Service/DeveloperGarden/SecurityTokenServer/Cache.php diff --git a/lib/Zend/Service/DeveloperGarden/SendSms.php b/lib/internal/Zend/Service/DeveloperGarden/SendSms.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/SendSms.php rename to lib/internal/Zend/Service/DeveloperGarden/SendSms.php diff --git a/lib/Zend/Service/DeveloperGarden/SmsValidation.php b/lib/internal/Zend/Service/DeveloperGarden/SmsValidation.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/SmsValidation.php rename to lib/internal/Zend/Service/DeveloperGarden/SmsValidation.php diff --git a/lib/Zend/Service/DeveloperGarden/VoiceCall.php b/lib/internal/Zend/Service/DeveloperGarden/VoiceCall.php similarity index 100% rename from lib/Zend/Service/DeveloperGarden/VoiceCall.php rename to lib/internal/Zend/Service/DeveloperGarden/VoiceCall.php diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/IPLocation.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/IPLocation.xsd diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/ODGBaseUserService.xsd diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/SmsService.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/SmsValidationUserService.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/TokenService.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/VoiceButlerService.xsd diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/ccsPort.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/ccsPort.xsd diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/localsearch.wsdl diff --git a/lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd b/lib/internal/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd similarity index 100% rename from lib/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd rename to lib/internal/Zend/Service/DeveloperGarden/Wsdl/localsearch.xsd diff --git a/lib/Zend/Service/Ebay/Abstract.php b/lib/internal/Zend/Service/Ebay/Abstract.php similarity index 100% rename from lib/Zend/Service/Ebay/Abstract.php rename to lib/internal/Zend/Service/Ebay/Abstract.php diff --git a/lib/Zend/Service/Ebay/Exception.php b/lib/internal/Zend/Service/Ebay/Exception.php similarity index 100% rename from lib/Zend/Service/Ebay/Exception.php rename to lib/internal/Zend/Service/Ebay/Exception.php diff --git a/lib/Zend/Service/Ebay/Finding.php b/lib/internal/Zend/Service/Ebay/Finding.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding.php rename to lib/internal/Zend/Service/Ebay/Finding.php diff --git a/lib/Zend/Service/Ebay/Finding/Abstract.php b/lib/internal/Zend/Service/Ebay/Finding/Abstract.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Abstract.php rename to lib/internal/Zend/Service/Ebay/Finding/Abstract.php diff --git a/lib/Zend/Service/Ebay/Finding/Aspect.php b/lib/internal/Zend/Service/Ebay/Finding/Aspect.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Aspect.php rename to lib/internal/Zend/Service/Ebay/Finding/Aspect.php diff --git a/lib/Zend/Service/Ebay/Finding/Aspect/Histogram/Container.php b/lib/internal/Zend/Service/Ebay/Finding/Aspect/Histogram/Container.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Aspect/Histogram/Container.php rename to lib/internal/Zend/Service/Ebay/Finding/Aspect/Histogram/Container.php diff --git a/lib/Zend/Service/Ebay/Finding/Aspect/Histogram/Value.php b/lib/internal/Zend/Service/Ebay/Finding/Aspect/Histogram/Value.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Aspect/Histogram/Value.php rename to lib/internal/Zend/Service/Ebay/Finding/Aspect/Histogram/Value.php diff --git a/lib/Zend/Service/Ebay/Finding/Aspect/Histogram/Value/Set.php b/lib/internal/Zend/Service/Ebay/Finding/Aspect/Histogram/Value/Set.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Aspect/Histogram/Value/Set.php rename to lib/internal/Zend/Service/Ebay/Finding/Aspect/Histogram/Value/Set.php diff --git a/lib/Zend/Service/Ebay/Finding/Aspect/Set.php b/lib/internal/Zend/Service/Ebay/Finding/Aspect/Set.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Aspect/Set.php rename to lib/internal/Zend/Service/Ebay/Finding/Aspect/Set.php diff --git a/lib/Zend/Service/Ebay/Finding/Category.php b/lib/internal/Zend/Service/Ebay/Finding/Category.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Category.php rename to lib/internal/Zend/Service/Ebay/Finding/Category.php diff --git a/lib/Zend/Service/Ebay/Finding/Category/Histogram.php b/lib/internal/Zend/Service/Ebay/Finding/Category/Histogram.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Category/Histogram.php rename to lib/internal/Zend/Service/Ebay/Finding/Category/Histogram.php diff --git a/lib/Zend/Service/Ebay/Finding/Category/Histogram/Container.php b/lib/internal/Zend/Service/Ebay/Finding/Category/Histogram/Container.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Category/Histogram/Container.php rename to lib/internal/Zend/Service/Ebay/Finding/Category/Histogram/Container.php diff --git a/lib/Zend/Service/Ebay/Finding/Category/Histogram/Set.php b/lib/internal/Zend/Service/Ebay/Finding/Category/Histogram/Set.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Category/Histogram/Set.php rename to lib/internal/Zend/Service/Ebay/Finding/Category/Histogram/Set.php diff --git a/lib/Zend/Service/Ebay/Finding/Error/Data.php b/lib/internal/Zend/Service/Ebay/Finding/Error/Data.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Error/Data.php rename to lib/internal/Zend/Service/Ebay/Finding/Error/Data.php diff --git a/lib/Zend/Service/Ebay/Finding/Error/Data/Set.php b/lib/internal/Zend/Service/Ebay/Finding/Error/Data/Set.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Error/Data/Set.php rename to lib/internal/Zend/Service/Ebay/Finding/Error/Data/Set.php diff --git a/lib/Zend/Service/Ebay/Finding/Error/Message.php b/lib/internal/Zend/Service/Ebay/Finding/Error/Message.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Error/Message.php rename to lib/internal/Zend/Service/Ebay/Finding/Error/Message.php diff --git a/lib/Zend/Service/Ebay/Finding/Exception.php b/lib/internal/Zend/Service/Ebay/Finding/Exception.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Exception.php rename to lib/internal/Zend/Service/Ebay/Finding/Exception.php diff --git a/lib/Zend/Service/Ebay/Finding/ListingInfo.php b/lib/internal/Zend/Service/Ebay/Finding/ListingInfo.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/ListingInfo.php rename to lib/internal/Zend/Service/Ebay/Finding/ListingInfo.php diff --git a/lib/Zend/Service/Ebay/Finding/PaginationOutput.php b/lib/internal/Zend/Service/Ebay/Finding/PaginationOutput.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/PaginationOutput.php rename to lib/internal/Zend/Service/Ebay/Finding/PaginationOutput.php diff --git a/lib/Zend/Service/Ebay/Finding/Response/Abstract.php b/lib/internal/Zend/Service/Ebay/Finding/Response/Abstract.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Response/Abstract.php rename to lib/internal/Zend/Service/Ebay/Finding/Response/Abstract.php diff --git a/lib/Zend/Service/Ebay/Finding/Response/Histograms.php b/lib/internal/Zend/Service/Ebay/Finding/Response/Histograms.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Response/Histograms.php rename to lib/internal/Zend/Service/Ebay/Finding/Response/Histograms.php diff --git a/lib/Zend/Service/Ebay/Finding/Response/Items.php b/lib/internal/Zend/Service/Ebay/Finding/Response/Items.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Response/Items.php rename to lib/internal/Zend/Service/Ebay/Finding/Response/Items.php diff --git a/lib/Zend/Service/Ebay/Finding/Response/Keywords.php b/lib/internal/Zend/Service/Ebay/Finding/Response/Keywords.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Response/Keywords.php rename to lib/internal/Zend/Service/Ebay/Finding/Response/Keywords.php diff --git a/lib/Zend/Service/Ebay/Finding/Search/Item.php b/lib/internal/Zend/Service/Ebay/Finding/Search/Item.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Search/Item.php rename to lib/internal/Zend/Service/Ebay/Finding/Search/Item.php diff --git a/lib/Zend/Service/Ebay/Finding/Search/Item/Set.php b/lib/internal/Zend/Service/Ebay/Finding/Search/Item/Set.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Search/Item/Set.php rename to lib/internal/Zend/Service/Ebay/Finding/Search/Item/Set.php diff --git a/lib/Zend/Service/Ebay/Finding/Search/Result.php b/lib/internal/Zend/Service/Ebay/Finding/Search/Result.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Search/Result.php rename to lib/internal/Zend/Service/Ebay/Finding/Search/Result.php diff --git a/lib/Zend/Service/Ebay/Finding/SellerInfo.php b/lib/internal/Zend/Service/Ebay/Finding/SellerInfo.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/SellerInfo.php rename to lib/internal/Zend/Service/Ebay/Finding/SellerInfo.php diff --git a/lib/Zend/Service/Ebay/Finding/SellingStatus.php b/lib/internal/Zend/Service/Ebay/Finding/SellingStatus.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/SellingStatus.php rename to lib/internal/Zend/Service/Ebay/Finding/SellingStatus.php diff --git a/lib/Zend/Service/Ebay/Finding/Set/Abstract.php b/lib/internal/Zend/Service/Ebay/Finding/Set/Abstract.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Set/Abstract.php rename to lib/internal/Zend/Service/Ebay/Finding/Set/Abstract.php diff --git a/lib/Zend/Service/Ebay/Finding/ShippingInfo.php b/lib/internal/Zend/Service/Ebay/Finding/ShippingInfo.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/ShippingInfo.php rename to lib/internal/Zend/Service/Ebay/Finding/ShippingInfo.php diff --git a/lib/Zend/Service/Ebay/Finding/Storefront.php b/lib/internal/Zend/Service/Ebay/Finding/Storefront.php similarity index 100% rename from lib/Zend/Service/Ebay/Finding/Storefront.php rename to lib/internal/Zend/Service/Ebay/Finding/Storefront.php diff --git a/lib/Zend/Service/Exception.php b/lib/internal/Zend/Service/Exception.php similarity index 100% rename from lib/Zend/Service/Exception.php rename to lib/internal/Zend/Service/Exception.php diff --git a/lib/Zend/Service/Flickr.php b/lib/internal/Zend/Service/Flickr.php similarity index 100% rename from lib/Zend/Service/Flickr.php rename to lib/internal/Zend/Service/Flickr.php diff --git a/lib/Zend/Service/Flickr/Image.php b/lib/internal/Zend/Service/Flickr/Image.php similarity index 100% rename from lib/Zend/Service/Flickr/Image.php rename to lib/internal/Zend/Service/Flickr/Image.php diff --git a/lib/Zend/Service/Flickr/Result.php b/lib/internal/Zend/Service/Flickr/Result.php similarity index 100% rename from lib/Zend/Service/Flickr/Result.php rename to lib/internal/Zend/Service/Flickr/Result.php diff --git a/lib/Zend/Service/Flickr/ResultSet.php b/lib/internal/Zend/Service/Flickr/ResultSet.php similarity index 100% rename from lib/Zend/Service/Flickr/ResultSet.php rename to lib/internal/Zend/Service/Flickr/ResultSet.php diff --git a/lib/Zend/Service/LiveDocx.php b/lib/internal/Zend/Service/LiveDocx.php similarity index 100% rename from lib/Zend/Service/LiveDocx.php rename to lib/internal/Zend/Service/LiveDocx.php diff --git a/lib/Zend/Service/LiveDocx/Exception.php b/lib/internal/Zend/Service/LiveDocx/Exception.php similarity index 100% rename from lib/Zend/Service/LiveDocx/Exception.php rename to lib/internal/Zend/Service/LiveDocx/Exception.php diff --git a/lib/Zend/Service/LiveDocx/MailMerge.php b/lib/internal/Zend/Service/LiveDocx/MailMerge.php similarity index 100% rename from lib/Zend/Service/LiveDocx/MailMerge.php rename to lib/internal/Zend/Service/LiveDocx/MailMerge.php diff --git a/lib/Zend/Service/Nirvanix.php b/lib/internal/Zend/Service/Nirvanix.php similarity index 100% rename from lib/Zend/Service/Nirvanix.php rename to lib/internal/Zend/Service/Nirvanix.php diff --git a/lib/Zend/Service/Nirvanix/Exception.php b/lib/internal/Zend/Service/Nirvanix/Exception.php similarity index 100% rename from lib/Zend/Service/Nirvanix/Exception.php rename to lib/internal/Zend/Service/Nirvanix/Exception.php diff --git a/lib/Zend/Service/Nirvanix/Namespace/Base.php b/lib/internal/Zend/Service/Nirvanix/Namespace/Base.php similarity index 100% rename from lib/Zend/Service/Nirvanix/Namespace/Base.php rename to lib/internal/Zend/Service/Nirvanix/Namespace/Base.php diff --git a/lib/Zend/Service/Nirvanix/Namespace/Imfs.php b/lib/internal/Zend/Service/Nirvanix/Namespace/Imfs.php similarity index 100% rename from lib/Zend/Service/Nirvanix/Namespace/Imfs.php rename to lib/internal/Zend/Service/Nirvanix/Namespace/Imfs.php diff --git a/lib/Zend/Service/Nirvanix/Response.php b/lib/internal/Zend/Service/Nirvanix/Response.php similarity index 100% rename from lib/Zend/Service/Nirvanix/Response.php rename to lib/internal/Zend/Service/Nirvanix/Response.php diff --git a/lib/Zend/Service/ReCaptcha.php b/lib/internal/Zend/Service/ReCaptcha.php similarity index 100% rename from lib/Zend/Service/ReCaptcha.php rename to lib/internal/Zend/Service/ReCaptcha.php diff --git a/lib/Zend/Service/ReCaptcha/Exception.php b/lib/internal/Zend/Service/ReCaptcha/Exception.php similarity index 100% rename from lib/Zend/Service/ReCaptcha/Exception.php rename to lib/internal/Zend/Service/ReCaptcha/Exception.php diff --git a/lib/Zend/Service/ReCaptcha/MailHide.php b/lib/internal/Zend/Service/ReCaptcha/MailHide.php similarity index 100% rename from lib/Zend/Service/ReCaptcha/MailHide.php rename to lib/internal/Zend/Service/ReCaptcha/MailHide.php diff --git a/lib/Zend/Service/ReCaptcha/MailHide/Exception.php b/lib/internal/Zend/Service/ReCaptcha/MailHide/Exception.php similarity index 100% rename from lib/Zend/Service/ReCaptcha/MailHide/Exception.php rename to lib/internal/Zend/Service/ReCaptcha/MailHide/Exception.php diff --git a/lib/Zend/Service/ReCaptcha/Response.php b/lib/internal/Zend/Service/ReCaptcha/Response.php similarity index 100% rename from lib/Zend/Service/ReCaptcha/Response.php rename to lib/internal/Zend/Service/ReCaptcha/Response.php diff --git a/lib/Zend/Service/ShortUrl/AbstractShortener.php b/lib/internal/Zend/Service/ShortUrl/AbstractShortener.php similarity index 100% rename from lib/Zend/Service/ShortUrl/AbstractShortener.php rename to lib/internal/Zend/Service/ShortUrl/AbstractShortener.php diff --git a/lib/Zend/Service/ShortUrl/Exception.php b/lib/internal/Zend/Service/ShortUrl/Exception.php similarity index 100% rename from lib/Zend/Service/ShortUrl/Exception.php rename to lib/internal/Zend/Service/ShortUrl/Exception.php diff --git a/lib/Zend/Service/ShortUrl/IsGd.php b/lib/internal/Zend/Service/ShortUrl/IsGd.php similarity index 100% rename from lib/Zend/Service/ShortUrl/IsGd.php rename to lib/internal/Zend/Service/ShortUrl/IsGd.php diff --git a/lib/Zend/Service/ShortUrl/JdemCz.php b/lib/internal/Zend/Service/ShortUrl/JdemCz.php similarity index 100% rename from lib/Zend/Service/ShortUrl/JdemCz.php rename to lib/internal/Zend/Service/ShortUrl/JdemCz.php diff --git a/lib/Zend/Service/ShortUrl/MetamarkNet.php b/lib/internal/Zend/Service/ShortUrl/MetamarkNet.php similarity index 100% rename from lib/Zend/Service/ShortUrl/MetamarkNet.php rename to lib/internal/Zend/Service/ShortUrl/MetamarkNet.php diff --git a/lib/Zend/Service/ShortUrl/Shortener.php b/lib/internal/Zend/Service/ShortUrl/Shortener.php similarity index 100% rename from lib/Zend/Service/ShortUrl/Shortener.php rename to lib/internal/Zend/Service/ShortUrl/Shortener.php diff --git a/lib/Zend/Service/ShortUrl/TinyUrlCom.php b/lib/internal/Zend/Service/ShortUrl/TinyUrlCom.php similarity index 100% rename from lib/Zend/Service/ShortUrl/TinyUrlCom.php rename to lib/internal/Zend/Service/ShortUrl/TinyUrlCom.php diff --git a/lib/Zend/Service/Simpy.php b/lib/internal/Zend/Service/Simpy.php similarity index 100% rename from lib/Zend/Service/Simpy.php rename to lib/internal/Zend/Service/Simpy.php diff --git a/lib/Zend/Service/Simpy/Link.php b/lib/internal/Zend/Service/Simpy/Link.php similarity index 100% rename from lib/Zend/Service/Simpy/Link.php rename to lib/internal/Zend/Service/Simpy/Link.php diff --git a/lib/Zend/Service/Simpy/LinkQuery.php b/lib/internal/Zend/Service/Simpy/LinkQuery.php similarity index 100% rename from lib/Zend/Service/Simpy/LinkQuery.php rename to lib/internal/Zend/Service/Simpy/LinkQuery.php diff --git a/lib/Zend/Service/Simpy/LinkSet.php b/lib/internal/Zend/Service/Simpy/LinkSet.php similarity index 100% rename from lib/Zend/Service/Simpy/LinkSet.php rename to lib/internal/Zend/Service/Simpy/LinkSet.php diff --git a/lib/Zend/Service/Simpy/Note.php b/lib/internal/Zend/Service/Simpy/Note.php similarity index 100% rename from lib/Zend/Service/Simpy/Note.php rename to lib/internal/Zend/Service/Simpy/Note.php diff --git a/lib/Zend/Service/Simpy/NoteSet.php b/lib/internal/Zend/Service/Simpy/NoteSet.php similarity index 100% rename from lib/Zend/Service/Simpy/NoteSet.php rename to lib/internal/Zend/Service/Simpy/NoteSet.php diff --git a/lib/Zend/Service/Simpy/Tag.php b/lib/internal/Zend/Service/Simpy/Tag.php similarity index 100% rename from lib/Zend/Service/Simpy/Tag.php rename to lib/internal/Zend/Service/Simpy/Tag.php diff --git a/lib/Zend/Service/Simpy/TagSet.php b/lib/internal/Zend/Service/Simpy/TagSet.php similarity index 100% rename from lib/Zend/Service/Simpy/TagSet.php rename to lib/internal/Zend/Service/Simpy/TagSet.php diff --git a/lib/Zend/Service/Simpy/Watchlist.php b/lib/internal/Zend/Service/Simpy/Watchlist.php similarity index 100% rename from lib/Zend/Service/Simpy/Watchlist.php rename to lib/internal/Zend/Service/Simpy/Watchlist.php diff --git a/lib/Zend/Service/Simpy/WatchlistFilter.php b/lib/internal/Zend/Service/Simpy/WatchlistFilter.php similarity index 100% rename from lib/Zend/Service/Simpy/WatchlistFilter.php rename to lib/internal/Zend/Service/Simpy/WatchlistFilter.php diff --git a/lib/Zend/Service/Simpy/WatchlistFilterSet.php b/lib/internal/Zend/Service/Simpy/WatchlistFilterSet.php similarity index 100% rename from lib/Zend/Service/Simpy/WatchlistFilterSet.php rename to lib/internal/Zend/Service/Simpy/WatchlistFilterSet.php diff --git a/lib/Zend/Service/Simpy/WatchlistSet.php b/lib/internal/Zend/Service/Simpy/WatchlistSet.php similarity index 100% rename from lib/Zend/Service/Simpy/WatchlistSet.php rename to lib/internal/Zend/Service/Simpy/WatchlistSet.php diff --git a/lib/Zend/Service/SlideShare.php b/lib/internal/Zend/Service/SlideShare.php similarity index 100% rename from lib/Zend/Service/SlideShare.php rename to lib/internal/Zend/Service/SlideShare.php diff --git a/lib/Zend/Service/SlideShare/Exception.php b/lib/internal/Zend/Service/SlideShare/Exception.php similarity index 100% rename from lib/Zend/Service/SlideShare/Exception.php rename to lib/internal/Zend/Service/SlideShare/Exception.php diff --git a/lib/Zend/Service/SlideShare/SlideShow.php b/lib/internal/Zend/Service/SlideShare/SlideShow.php similarity index 100% rename from lib/Zend/Service/SlideShare/SlideShow.php rename to lib/internal/Zend/Service/SlideShare/SlideShow.php diff --git a/lib/Zend/Service/StrikeIron.php b/lib/internal/Zend/Service/StrikeIron.php similarity index 100% rename from lib/Zend/Service/StrikeIron.php rename to lib/internal/Zend/Service/StrikeIron.php diff --git a/lib/Zend/Service/StrikeIron/Base.php b/lib/internal/Zend/Service/StrikeIron/Base.php similarity index 100% rename from lib/Zend/Service/StrikeIron/Base.php rename to lib/internal/Zend/Service/StrikeIron/Base.php diff --git a/lib/Zend/Service/StrikeIron/Decorator.php b/lib/internal/Zend/Service/StrikeIron/Decorator.php similarity index 100% rename from lib/Zend/Service/StrikeIron/Decorator.php rename to lib/internal/Zend/Service/StrikeIron/Decorator.php diff --git a/lib/Zend/Service/StrikeIron/Exception.php b/lib/internal/Zend/Service/StrikeIron/Exception.php similarity index 100% rename from lib/Zend/Service/StrikeIron/Exception.php rename to lib/internal/Zend/Service/StrikeIron/Exception.php diff --git a/lib/Zend/Service/StrikeIron/SalesUseTaxBasic.php b/lib/internal/Zend/Service/StrikeIron/SalesUseTaxBasic.php similarity index 100% rename from lib/Zend/Service/StrikeIron/SalesUseTaxBasic.php rename to lib/internal/Zend/Service/StrikeIron/SalesUseTaxBasic.php diff --git a/lib/Zend/Service/StrikeIron/USAddressVerification.php b/lib/internal/Zend/Service/StrikeIron/USAddressVerification.php similarity index 100% rename from lib/Zend/Service/StrikeIron/USAddressVerification.php rename to lib/internal/Zend/Service/StrikeIron/USAddressVerification.php diff --git a/lib/Zend/Service/StrikeIron/ZipCodeInfo.php b/lib/internal/Zend/Service/StrikeIron/ZipCodeInfo.php similarity index 100% rename from lib/Zend/Service/StrikeIron/ZipCodeInfo.php rename to lib/internal/Zend/Service/StrikeIron/ZipCodeInfo.php diff --git a/lib/Zend/Service/Technorati.php b/lib/internal/Zend/Service/Technorati.php similarity index 100% rename from lib/Zend/Service/Technorati.php rename to lib/internal/Zend/Service/Technorati.php diff --git a/lib/Zend/Service/Technorati/Author.php b/lib/internal/Zend/Service/Technorati/Author.php similarity index 100% rename from lib/Zend/Service/Technorati/Author.php rename to lib/internal/Zend/Service/Technorati/Author.php diff --git a/lib/Zend/Service/Technorati/BlogInfoResult.php b/lib/internal/Zend/Service/Technorati/BlogInfoResult.php similarity index 100% rename from lib/Zend/Service/Technorati/BlogInfoResult.php rename to lib/internal/Zend/Service/Technorati/BlogInfoResult.php diff --git a/lib/Zend/Service/Technorati/CosmosResult.php b/lib/internal/Zend/Service/Technorati/CosmosResult.php similarity index 100% rename from lib/Zend/Service/Technorati/CosmosResult.php rename to lib/internal/Zend/Service/Technorati/CosmosResult.php diff --git a/lib/Zend/Service/Technorati/CosmosResultSet.php b/lib/internal/Zend/Service/Technorati/CosmosResultSet.php similarity index 100% rename from lib/Zend/Service/Technorati/CosmosResultSet.php rename to lib/internal/Zend/Service/Technorati/CosmosResultSet.php diff --git a/lib/Zend/Service/Technorati/DailyCountsResult.php b/lib/internal/Zend/Service/Technorati/DailyCountsResult.php similarity index 100% rename from lib/Zend/Service/Technorati/DailyCountsResult.php rename to lib/internal/Zend/Service/Technorati/DailyCountsResult.php diff --git a/lib/Zend/Service/Technorati/DailyCountsResultSet.php b/lib/internal/Zend/Service/Technorati/DailyCountsResultSet.php similarity index 100% rename from lib/Zend/Service/Technorati/DailyCountsResultSet.php rename to lib/internal/Zend/Service/Technorati/DailyCountsResultSet.php diff --git a/lib/Zend/Service/Technorati/Exception.php b/lib/internal/Zend/Service/Technorati/Exception.php similarity index 100% rename from lib/Zend/Service/Technorati/Exception.php rename to lib/internal/Zend/Service/Technorati/Exception.php diff --git a/lib/Zend/Service/Technorati/GetInfoResult.php b/lib/internal/Zend/Service/Technorati/GetInfoResult.php similarity index 100% rename from lib/Zend/Service/Technorati/GetInfoResult.php rename to lib/internal/Zend/Service/Technorati/GetInfoResult.php diff --git a/lib/Zend/Service/Technorati/KeyInfoResult.php b/lib/internal/Zend/Service/Technorati/KeyInfoResult.php similarity index 100% rename from lib/Zend/Service/Technorati/KeyInfoResult.php rename to lib/internal/Zend/Service/Technorati/KeyInfoResult.php diff --git a/lib/Zend/Service/Technorati/Result.php b/lib/internal/Zend/Service/Technorati/Result.php similarity index 100% rename from lib/Zend/Service/Technorati/Result.php rename to lib/internal/Zend/Service/Technorati/Result.php diff --git a/lib/Zend/Service/Technorati/ResultSet.php b/lib/internal/Zend/Service/Technorati/ResultSet.php similarity index 100% rename from lib/Zend/Service/Technorati/ResultSet.php rename to lib/internal/Zend/Service/Technorati/ResultSet.php diff --git a/lib/Zend/Service/Technorati/SearchResult.php b/lib/internal/Zend/Service/Technorati/SearchResult.php similarity index 100% rename from lib/Zend/Service/Technorati/SearchResult.php rename to lib/internal/Zend/Service/Technorati/SearchResult.php diff --git a/lib/Zend/Service/Technorati/SearchResultSet.php b/lib/internal/Zend/Service/Technorati/SearchResultSet.php similarity index 100% rename from lib/Zend/Service/Technorati/SearchResultSet.php rename to lib/internal/Zend/Service/Technorati/SearchResultSet.php diff --git a/lib/Zend/Service/Technorati/TagResult.php b/lib/internal/Zend/Service/Technorati/TagResult.php similarity index 100% rename from lib/Zend/Service/Technorati/TagResult.php rename to lib/internal/Zend/Service/Technorati/TagResult.php diff --git a/lib/Zend/Service/Technorati/TagResultSet.php b/lib/internal/Zend/Service/Technorati/TagResultSet.php similarity index 100% rename from lib/Zend/Service/Technorati/TagResultSet.php rename to lib/internal/Zend/Service/Technorati/TagResultSet.php diff --git a/lib/Zend/Service/Technorati/TagsResult.php b/lib/internal/Zend/Service/Technorati/TagsResult.php similarity index 100% rename from lib/Zend/Service/Technorati/TagsResult.php rename to lib/internal/Zend/Service/Technorati/TagsResult.php diff --git a/lib/Zend/Service/Technorati/TagsResultSet.php b/lib/internal/Zend/Service/Technorati/TagsResultSet.php similarity index 100% rename from lib/Zend/Service/Technorati/TagsResultSet.php rename to lib/internal/Zend/Service/Technorati/TagsResultSet.php diff --git a/lib/Zend/Service/Technorati/Utils.php b/lib/internal/Zend/Service/Technorati/Utils.php similarity index 100% rename from lib/Zend/Service/Technorati/Utils.php rename to lib/internal/Zend/Service/Technorati/Utils.php diff --git a/lib/Zend/Service/Technorati/Weblog.php b/lib/internal/Zend/Service/Technorati/Weblog.php similarity index 100% rename from lib/Zend/Service/Technorati/Weblog.php rename to lib/internal/Zend/Service/Technorati/Weblog.php diff --git a/lib/Zend/Service/Twitter.php b/lib/internal/Zend/Service/Twitter.php similarity index 100% rename from lib/Zend/Service/Twitter.php rename to lib/internal/Zend/Service/Twitter.php diff --git a/lib/Zend/Service/Twitter/Exception.php b/lib/internal/Zend/Service/Twitter/Exception.php similarity index 100% rename from lib/Zend/Service/Twitter/Exception.php rename to lib/internal/Zend/Service/Twitter/Exception.php diff --git a/lib/Zend/Service/Twitter/Search.php b/lib/internal/Zend/Service/Twitter/Search.php similarity index 100% rename from lib/Zend/Service/Twitter/Search.php rename to lib/internal/Zend/Service/Twitter/Search.php diff --git a/lib/Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php b/lib/internal/Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php rename to lib/internal/Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php diff --git a/lib/Zend/Service/WindowsAzure/Credentials/Exception.php b/lib/internal/Zend/Service/WindowsAzure/Credentials/Exception.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Credentials/Exception.php rename to lib/internal/Zend/Service/WindowsAzure/Credentials/Exception.php diff --git a/lib/Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php b/lib/internal/Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php rename to lib/internal/Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php diff --git a/lib/Zend/Service/WindowsAzure/Credentials/SharedKey.php b/lib/internal/Zend/Service/WindowsAzure/Credentials/SharedKey.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Credentials/SharedKey.php rename to lib/internal/Zend/Service/WindowsAzure/Credentials/SharedKey.php diff --git a/lib/Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php b/lib/internal/Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php rename to lib/internal/Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDataSources.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDataSources.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDataSources.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDataSources.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDiagnosticInfrastructureLogs.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDiagnosticInfrastructureLogs.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDiagnosticInfrastructureLogs.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDiagnosticInfrastructureLogs.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDirectories.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDirectories.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDirectories.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationDirectories.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationInstance.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationInstance.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationInstance.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationInstance.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationLogs.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationLogs.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationLogs.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationLogs.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationObjectBaseAbstract.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationObjectBaseAbstract.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationObjectBaseAbstract.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationObjectBaseAbstract.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationPerformanceCounters.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationPerformanceCounters.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationPerformanceCounters.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationPerformanceCounters.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationWindowsEventLog.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationWindowsEventLog.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/ConfigurationWindowsEventLog.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/ConfigurationWindowsEventLog.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/DirectoryConfigurationSubscription.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/DirectoryConfigurationSubscription.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/DirectoryConfigurationSubscription.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/DirectoryConfigurationSubscription.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/Exception.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/Exception.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/Exception.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/Exception.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/LogLevel.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/LogLevel.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/LogLevel.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/LogLevel.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/Manager.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/Manager.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/Manager.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/Manager.php diff --git a/lib/Zend/Service/WindowsAzure/Diagnostics/PerformanceCounterSubscription.php b/lib/internal/Zend/Service/WindowsAzure/Diagnostics/PerformanceCounterSubscription.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Diagnostics/PerformanceCounterSubscription.php rename to lib/internal/Zend/Service/WindowsAzure/Diagnostics/PerformanceCounterSubscription.php diff --git a/lib/Zend/Service/WindowsAzure/Exception.php b/lib/internal/Zend/Service/WindowsAzure/Exception.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Exception.php rename to lib/internal/Zend/Service/WindowsAzure/Exception.php diff --git a/lib/Zend/Service/WindowsAzure/RetryPolicy/Exception.php b/lib/internal/Zend/Service/WindowsAzure/RetryPolicy/Exception.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/RetryPolicy/Exception.php rename to lib/internal/Zend/Service/WindowsAzure/RetryPolicy/Exception.php diff --git a/lib/Zend/Service/WindowsAzure/RetryPolicy/NoRetry.php b/lib/internal/Zend/Service/WindowsAzure/RetryPolicy/NoRetry.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/RetryPolicy/NoRetry.php rename to lib/internal/Zend/Service/WindowsAzure/RetryPolicy/NoRetry.php diff --git a/lib/Zend/Service/WindowsAzure/RetryPolicy/RetryN.php b/lib/internal/Zend/Service/WindowsAzure/RetryPolicy/RetryN.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/RetryPolicy/RetryN.php rename to lib/internal/Zend/Service/WindowsAzure/RetryPolicy/RetryN.php diff --git a/lib/Zend/Service/WindowsAzure/RetryPolicy/RetryPolicyAbstract.php b/lib/internal/Zend/Service/WindowsAzure/RetryPolicy/RetryPolicyAbstract.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/RetryPolicy/RetryPolicyAbstract.php rename to lib/internal/Zend/Service/WindowsAzure/RetryPolicy/RetryPolicyAbstract.php diff --git a/lib/Zend/Service/WindowsAzure/SessionHandler.php b/lib/internal/Zend/Service/WindowsAzure/SessionHandler.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/SessionHandler.php rename to lib/internal/Zend/Service/WindowsAzure/SessionHandler.php diff --git a/lib/Zend/Service/WindowsAzure/Storage.php b/lib/internal/Zend/Service/WindowsAzure/Storage.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage.php rename to lib/internal/Zend/Service/WindowsAzure/Storage.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/Batch.php b/lib/internal/Zend/Service/WindowsAzure/Storage/Batch.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/Batch.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/Batch.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php b/lib/internal/Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/Blob.php b/lib/internal/Zend/Service/WindowsAzure/Storage/Blob.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/Blob.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/Blob.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/Blob/Stream.php b/lib/internal/Zend/Service/WindowsAzure/Storage/Blob/Stream.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/Blob/Stream.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/Blob/Stream.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/BlobContainer.php b/lib/internal/Zend/Service/WindowsAzure/Storage/BlobContainer.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/BlobContainer.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/BlobContainer.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/BlobInstance.php b/lib/internal/Zend/Service/WindowsAzure/Storage/BlobInstance.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/BlobInstance.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/BlobInstance.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/DynamicTableEntity.php b/lib/internal/Zend/Service/WindowsAzure/Storage/DynamicTableEntity.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/DynamicTableEntity.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/DynamicTableEntity.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/LeaseInstance.php b/lib/internal/Zend/Service/WindowsAzure/Storage/LeaseInstance.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/LeaseInstance.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/LeaseInstance.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/PageRegionInstance.php b/lib/internal/Zend/Service/WindowsAzure/Storage/PageRegionInstance.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/PageRegionInstance.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/PageRegionInstance.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/Queue.php b/lib/internal/Zend/Service/WindowsAzure/Storage/Queue.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/Queue.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/Queue.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/QueueInstance.php b/lib/internal/Zend/Service/WindowsAzure/Storage/QueueInstance.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/QueueInstance.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/QueueInstance.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/QueueMessage.php b/lib/internal/Zend/Service/WindowsAzure/Storage/QueueMessage.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/QueueMessage.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/QueueMessage.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/SignedIdentifier.php b/lib/internal/Zend/Service/WindowsAzure/Storage/SignedIdentifier.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/SignedIdentifier.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/SignedIdentifier.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/StorageEntityAbstract.php b/lib/internal/Zend/Service/WindowsAzure/Storage/StorageEntityAbstract.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/StorageEntityAbstract.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/StorageEntityAbstract.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/Table.php b/lib/internal/Zend/Service/WindowsAzure/Storage/Table.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/Table.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/Table.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/TableEntity.php b/lib/internal/Zend/Service/WindowsAzure/Storage/TableEntity.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/TableEntity.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/TableEntity.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/TableEntityQuery.php b/lib/internal/Zend/Service/WindowsAzure/Storage/TableEntityQuery.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/TableEntityQuery.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/TableEntityQuery.php diff --git a/lib/Zend/Service/WindowsAzure/Storage/TableInstance.php b/lib/internal/Zend/Service/WindowsAzure/Storage/TableInstance.php similarity index 100% rename from lib/Zend/Service/WindowsAzure/Storage/TableInstance.php rename to lib/internal/Zend/Service/WindowsAzure/Storage/TableInstance.php diff --git a/lib/Zend/Service/Yahoo.php b/lib/internal/Zend/Service/Yahoo.php similarity index 100% rename from lib/Zend/Service/Yahoo.php rename to lib/internal/Zend/Service/Yahoo.php diff --git a/lib/Zend/Service/Yahoo/Image.php b/lib/internal/Zend/Service/Yahoo/Image.php similarity index 100% rename from lib/Zend/Service/Yahoo/Image.php rename to lib/internal/Zend/Service/Yahoo/Image.php diff --git a/lib/Zend/Service/Yahoo/ImageResult.php b/lib/internal/Zend/Service/Yahoo/ImageResult.php similarity index 100% rename from lib/Zend/Service/Yahoo/ImageResult.php rename to lib/internal/Zend/Service/Yahoo/ImageResult.php diff --git a/lib/Zend/Service/Yahoo/ImageResultSet.php b/lib/internal/Zend/Service/Yahoo/ImageResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/ImageResultSet.php rename to lib/internal/Zend/Service/Yahoo/ImageResultSet.php diff --git a/lib/Zend/Service/Yahoo/InlinkDataResult.php b/lib/internal/Zend/Service/Yahoo/InlinkDataResult.php similarity index 100% rename from lib/Zend/Service/Yahoo/InlinkDataResult.php rename to lib/internal/Zend/Service/Yahoo/InlinkDataResult.php diff --git a/lib/Zend/Service/Yahoo/InlinkDataResultSet.php b/lib/internal/Zend/Service/Yahoo/InlinkDataResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/InlinkDataResultSet.php rename to lib/internal/Zend/Service/Yahoo/InlinkDataResultSet.php diff --git a/lib/Zend/Service/Yahoo/LocalResult.php b/lib/internal/Zend/Service/Yahoo/LocalResult.php similarity index 100% rename from lib/Zend/Service/Yahoo/LocalResult.php rename to lib/internal/Zend/Service/Yahoo/LocalResult.php diff --git a/lib/Zend/Service/Yahoo/LocalResultSet.php b/lib/internal/Zend/Service/Yahoo/LocalResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/LocalResultSet.php rename to lib/internal/Zend/Service/Yahoo/LocalResultSet.php diff --git a/lib/Zend/Service/Yahoo/NewsResult.php b/lib/internal/Zend/Service/Yahoo/NewsResult.php similarity index 100% rename from lib/Zend/Service/Yahoo/NewsResult.php rename to lib/internal/Zend/Service/Yahoo/NewsResult.php diff --git a/lib/Zend/Service/Yahoo/NewsResultSet.php b/lib/internal/Zend/Service/Yahoo/NewsResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/NewsResultSet.php rename to lib/internal/Zend/Service/Yahoo/NewsResultSet.php diff --git a/lib/Zend/Service/Yahoo/PageDataResult.php b/lib/internal/Zend/Service/Yahoo/PageDataResult.php similarity index 100% rename from lib/Zend/Service/Yahoo/PageDataResult.php rename to lib/internal/Zend/Service/Yahoo/PageDataResult.php diff --git a/lib/Zend/Service/Yahoo/PageDataResultSet.php b/lib/internal/Zend/Service/Yahoo/PageDataResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/PageDataResultSet.php rename to lib/internal/Zend/Service/Yahoo/PageDataResultSet.php diff --git a/lib/Zend/Service/Yahoo/Result.php b/lib/internal/Zend/Service/Yahoo/Result.php similarity index 100% rename from lib/Zend/Service/Yahoo/Result.php rename to lib/internal/Zend/Service/Yahoo/Result.php diff --git a/lib/Zend/Service/Yahoo/ResultSet.php b/lib/internal/Zend/Service/Yahoo/ResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/ResultSet.php rename to lib/internal/Zend/Service/Yahoo/ResultSet.php diff --git a/lib/Zend/Service/Yahoo/VideoResult.php b/lib/internal/Zend/Service/Yahoo/VideoResult.php similarity index 100% rename from lib/Zend/Service/Yahoo/VideoResult.php rename to lib/internal/Zend/Service/Yahoo/VideoResult.php diff --git a/lib/Zend/Service/Yahoo/VideoResultSet.php b/lib/internal/Zend/Service/Yahoo/VideoResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/VideoResultSet.php rename to lib/internal/Zend/Service/Yahoo/VideoResultSet.php diff --git a/lib/Zend/Service/Yahoo/WebResult.php b/lib/internal/Zend/Service/Yahoo/WebResult.php similarity index 100% rename from lib/Zend/Service/Yahoo/WebResult.php rename to lib/internal/Zend/Service/Yahoo/WebResult.php diff --git a/lib/Zend/Service/Yahoo/WebResultSet.php b/lib/internal/Zend/Service/Yahoo/WebResultSet.php similarity index 100% rename from lib/Zend/Service/Yahoo/WebResultSet.php rename to lib/internal/Zend/Service/Yahoo/WebResultSet.php diff --git a/lib/Zend/Session.php b/lib/internal/Zend/Session.php similarity index 100% rename from lib/Zend/Session.php rename to lib/internal/Zend/Session.php diff --git a/lib/Zend/Session/Abstract.php b/lib/internal/Zend/Session/Abstract.php similarity index 100% rename from lib/Zend/Session/Abstract.php rename to lib/internal/Zend/Session/Abstract.php diff --git a/lib/Zend/Session/Exception.php b/lib/internal/Zend/Session/Exception.php similarity index 100% rename from lib/Zend/Session/Exception.php rename to lib/internal/Zend/Session/Exception.php diff --git a/lib/Zend/Session/Namespace.php b/lib/internal/Zend/Session/Namespace.php similarity index 100% rename from lib/Zend/Session/Namespace.php rename to lib/internal/Zend/Session/Namespace.php diff --git a/lib/Zend/Session/SaveHandler/DbTable.php b/lib/internal/Zend/Session/SaveHandler/DbTable.php similarity index 100% rename from lib/Zend/Session/SaveHandler/DbTable.php rename to lib/internal/Zend/Session/SaveHandler/DbTable.php diff --git a/lib/Zend/Session/SaveHandler/Exception.php b/lib/internal/Zend/Session/SaveHandler/Exception.php similarity index 100% rename from lib/Zend/Session/SaveHandler/Exception.php rename to lib/internal/Zend/Session/SaveHandler/Exception.php diff --git a/lib/Zend/Session/SaveHandler/Interface.php b/lib/internal/Zend/Session/SaveHandler/Interface.php similarity index 100% rename from lib/Zend/Session/SaveHandler/Interface.php rename to lib/internal/Zend/Session/SaveHandler/Interface.php diff --git a/lib/Zend/Session/Validator/Abstract.php b/lib/internal/Zend/Session/Validator/Abstract.php similarity index 100% rename from lib/Zend/Session/Validator/Abstract.php rename to lib/internal/Zend/Session/Validator/Abstract.php diff --git a/lib/Zend/Session/Validator/HttpUserAgent.php b/lib/internal/Zend/Session/Validator/HttpUserAgent.php similarity index 100% rename from lib/Zend/Session/Validator/HttpUserAgent.php rename to lib/internal/Zend/Session/Validator/HttpUserAgent.php diff --git a/lib/Zend/Session/Validator/Interface.php b/lib/internal/Zend/Session/Validator/Interface.php similarity index 100% rename from lib/Zend/Session/Validator/Interface.php rename to lib/internal/Zend/Session/Validator/Interface.php diff --git a/lib/Zend/Soap/AutoDiscover.php b/lib/internal/Zend/Soap/AutoDiscover.php similarity index 100% rename from lib/Zend/Soap/AutoDiscover.php rename to lib/internal/Zend/Soap/AutoDiscover.php diff --git a/lib/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php b/lib/internal/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php similarity index 100% rename from lib/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php rename to lib/internal/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php diff --git a/lib/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php b/lib/internal/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php similarity index 100% rename from lib/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php rename to lib/internal/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php diff --git a/lib/Zend/Soap/Client.php b/lib/internal/Zend/Soap/Client.php similarity index 100% rename from lib/Zend/Soap/Client.php rename to lib/internal/Zend/Soap/Client.php diff --git a/lib/Zend/Soap/Client/Common.php b/lib/internal/Zend/Soap/Client/Common.php similarity index 100% rename from lib/Zend/Soap/Client/Common.php rename to lib/internal/Zend/Soap/Client/Common.php diff --git a/lib/Zend/Soap/Client/DotNet.php b/lib/internal/Zend/Soap/Client/DotNet.php similarity index 100% rename from lib/Zend/Soap/Client/DotNet.php rename to lib/internal/Zend/Soap/Client/DotNet.php diff --git a/lib/Zend/Soap/Client/Local.php b/lib/internal/Zend/Soap/Client/Local.php similarity index 100% rename from lib/Zend/Soap/Client/Local.php rename to lib/internal/Zend/Soap/Client/Local.php diff --git a/lib/Zend/Soap/Exception/BadMethodCallException.php b/lib/internal/Zend/Soap/Exception/BadMethodCallException.php similarity index 100% rename from lib/Zend/Soap/Exception/BadMethodCallException.php rename to lib/internal/Zend/Soap/Exception/BadMethodCallException.php diff --git a/lib/Zend/Soap/Exception/ExceptionInterface.php b/lib/internal/Zend/Soap/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Soap/Exception/ExceptionInterface.php rename to lib/internal/Zend/Soap/Exception/ExceptionInterface.php diff --git a/lib/Zend/Soap/Exception/ExtensionNotLoadedException.php b/lib/internal/Zend/Soap/Exception/ExtensionNotLoadedException.php similarity index 100% rename from lib/Zend/Soap/Exception/ExtensionNotLoadedException.php rename to lib/internal/Zend/Soap/Exception/ExtensionNotLoadedException.php diff --git a/lib/Zend/Soap/Exception/InvalidArgumentException.php b/lib/internal/Zend/Soap/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Soap/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Soap/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Soap/Exception/RuntimeException.php b/lib/internal/Zend/Soap/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Soap/Exception/RuntimeException.php rename to lib/internal/Zend/Soap/Exception/RuntimeException.php diff --git a/lib/Zend/Soap/Exception/UnexpectedValueException.php b/lib/internal/Zend/Soap/Exception/UnexpectedValueException.php similarity index 100% rename from lib/Zend/Soap/Exception/UnexpectedValueException.php rename to lib/internal/Zend/Soap/Exception/UnexpectedValueException.php diff --git a/lib/Zend/Soap/Server.php b/lib/internal/Zend/Soap/Server.php similarity index 100% rename from lib/Zend/Soap/Server.php rename to lib/internal/Zend/Soap/Server.php diff --git a/lib/Zend/Soap/Server/DocumentLiteralWrapper.php b/lib/internal/Zend/Soap/Server/DocumentLiteralWrapper.php similarity index 100% rename from lib/Zend/Soap/Server/DocumentLiteralWrapper.php rename to lib/internal/Zend/Soap/Server/DocumentLiteralWrapper.php diff --git a/lib/Zend/Soap/Wsdl.php b/lib/internal/Zend/Soap/Wsdl.php similarity index 100% rename from lib/Zend/Soap/Wsdl.php rename to lib/internal/Zend/Soap/Wsdl.php diff --git a/lib/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php b/lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php similarity index 100% rename from lib/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php rename to lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php diff --git a/lib/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php b/lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php similarity index 100% rename from lib/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php rename to lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php diff --git a/lib/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php b/lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php similarity index 100% rename from lib/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php rename to lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php diff --git a/lib/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php b/lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php similarity index 100% rename from lib/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php rename to lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php diff --git a/lib/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php b/lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php similarity index 100% rename from lib/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php rename to lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php diff --git a/lib/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php b/lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php similarity index 100% rename from lib/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php rename to lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php diff --git a/lib/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php b/lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php similarity index 100% rename from lib/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php rename to lib/internal/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php diff --git a/lib/Zend/Soap/composer.json b/lib/internal/Zend/Soap/composer.json similarity index 100% rename from lib/Zend/Soap/composer.json rename to lib/internal/Zend/Soap/composer.json diff --git a/lib/Zend/Stdlib/AbstractOptions.php b/lib/internal/Zend/Stdlib/AbstractOptions.php similarity index 100% rename from lib/Zend/Stdlib/AbstractOptions.php rename to lib/internal/Zend/Stdlib/AbstractOptions.php diff --git a/lib/Zend/Stdlib/ArraySerializableInterface.php b/lib/internal/Zend/Stdlib/ArraySerializableInterface.php similarity index 100% rename from lib/Zend/Stdlib/ArraySerializableInterface.php rename to lib/internal/Zend/Stdlib/ArraySerializableInterface.php diff --git a/lib/Zend/Stdlib/ArrayStack.php b/lib/internal/Zend/Stdlib/ArrayStack.php similarity index 100% rename from lib/Zend/Stdlib/ArrayStack.php rename to lib/internal/Zend/Stdlib/ArrayStack.php diff --git a/lib/Zend/Stdlib/ArrayUtils.php b/lib/internal/Zend/Stdlib/ArrayUtils.php similarity index 100% rename from lib/Zend/Stdlib/ArrayUtils.php rename to lib/internal/Zend/Stdlib/ArrayUtils.php diff --git a/lib/Zend/Stdlib/CallbackHandler.php b/lib/internal/Zend/Stdlib/CallbackHandler.php similarity index 100% rename from lib/Zend/Stdlib/CallbackHandler.php rename to lib/internal/Zend/Stdlib/CallbackHandler.php diff --git a/lib/Zend/Stdlib/DispatchableInterface.php b/lib/internal/Zend/Stdlib/DispatchableInterface.php similarity index 100% rename from lib/Zend/Stdlib/DispatchableInterface.php rename to lib/internal/Zend/Stdlib/DispatchableInterface.php diff --git a/lib/Zend/Stdlib/ErrorHandler.php b/lib/internal/Zend/Stdlib/ErrorHandler.php similarity index 100% rename from lib/Zend/Stdlib/ErrorHandler.php rename to lib/internal/Zend/Stdlib/ErrorHandler.php diff --git a/lib/Zend/Stdlib/Exception/BadMethodCallException.php b/lib/internal/Zend/Stdlib/Exception/BadMethodCallException.php similarity index 100% rename from lib/Zend/Stdlib/Exception/BadMethodCallException.php rename to lib/internal/Zend/Stdlib/Exception/BadMethodCallException.php diff --git a/lib/Zend/Stdlib/Exception/DomainException.php b/lib/internal/Zend/Stdlib/Exception/DomainException.php similarity index 100% rename from lib/Zend/Stdlib/Exception/DomainException.php rename to lib/internal/Zend/Stdlib/Exception/DomainException.php diff --git a/lib/Zend/Stdlib/Exception/ExceptionInterface.php b/lib/internal/Zend/Stdlib/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Stdlib/Exception/ExceptionInterface.php rename to lib/internal/Zend/Stdlib/Exception/ExceptionInterface.php diff --git a/lib/Zend/Stdlib/Exception/InvalidArgumentException.php b/lib/internal/Zend/Stdlib/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Stdlib/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Stdlib/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Stdlib/Exception/InvalidCallbackException.php b/lib/internal/Zend/Stdlib/Exception/InvalidCallbackException.php similarity index 100% rename from lib/Zend/Stdlib/Exception/InvalidCallbackException.php rename to lib/internal/Zend/Stdlib/Exception/InvalidCallbackException.php diff --git a/lib/Zend/Stdlib/Exception/LogicException.php b/lib/internal/Zend/Stdlib/Exception/LogicException.php similarity index 100% rename from lib/Zend/Stdlib/Exception/LogicException.php rename to lib/internal/Zend/Stdlib/Exception/LogicException.php diff --git a/lib/Zend/Stdlib/Glob.php b/lib/internal/Zend/Stdlib/Glob.php similarity index 100% rename from lib/Zend/Stdlib/Glob.php rename to lib/internal/Zend/Stdlib/Glob.php diff --git a/lib/Zend/Stdlib/Hydrator/AbstractHydrator.php b/lib/internal/Zend/Stdlib/Hydrator/AbstractHydrator.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/AbstractHydrator.php rename to lib/internal/Zend/Stdlib/Hydrator/AbstractHydrator.php diff --git a/lib/Zend/Stdlib/Hydrator/ArraySerializable.php b/lib/internal/Zend/Stdlib/Hydrator/ArraySerializable.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/ArraySerializable.php rename to lib/internal/Zend/Stdlib/Hydrator/ArraySerializable.php diff --git a/lib/Zend/Stdlib/Hydrator/ClassMethods.php b/lib/internal/Zend/Stdlib/Hydrator/ClassMethods.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/ClassMethods.php rename to lib/internal/Zend/Stdlib/Hydrator/ClassMethods.php diff --git a/lib/Zend/Stdlib/Hydrator/HydratorInterface.php b/lib/internal/Zend/Stdlib/Hydrator/HydratorInterface.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/HydratorInterface.php rename to lib/internal/Zend/Stdlib/Hydrator/HydratorInterface.php diff --git a/lib/Zend/Stdlib/Hydrator/ObjectProperty.php b/lib/internal/Zend/Stdlib/Hydrator/ObjectProperty.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/ObjectProperty.php rename to lib/internal/Zend/Stdlib/Hydrator/ObjectProperty.php diff --git a/lib/Zend/Stdlib/Hydrator/Reflection.php b/lib/internal/Zend/Stdlib/Hydrator/Reflection.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/Reflection.php rename to lib/internal/Zend/Stdlib/Hydrator/Reflection.php diff --git a/lib/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php b/lib/internal/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php rename to lib/internal/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php diff --git a/lib/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php b/lib/internal/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php rename to lib/internal/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php diff --git a/lib/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php b/lib/internal/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php similarity index 100% rename from lib/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php rename to lib/internal/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php diff --git a/lib/Zend/Stdlib/Message.php b/lib/internal/Zend/Stdlib/Message.php similarity index 100% rename from lib/Zend/Stdlib/Message.php rename to lib/internal/Zend/Stdlib/Message.php diff --git a/lib/Zend/Stdlib/MessageInterface.php b/lib/internal/Zend/Stdlib/MessageInterface.php similarity index 100% rename from lib/Zend/Stdlib/MessageInterface.php rename to lib/internal/Zend/Stdlib/MessageInterface.php diff --git a/lib/Zend/Stdlib/ParameterObjectInterface.php b/lib/internal/Zend/Stdlib/ParameterObjectInterface.php similarity index 100% rename from lib/Zend/Stdlib/ParameterObjectInterface.php rename to lib/internal/Zend/Stdlib/ParameterObjectInterface.php diff --git a/lib/Zend/Stdlib/Parameters.php b/lib/internal/Zend/Stdlib/Parameters.php similarity index 100% rename from lib/Zend/Stdlib/Parameters.php rename to lib/internal/Zend/Stdlib/Parameters.php diff --git a/lib/Zend/Stdlib/ParametersInterface.php b/lib/internal/Zend/Stdlib/ParametersInterface.php similarity index 100% rename from lib/Zend/Stdlib/ParametersInterface.php rename to lib/internal/Zend/Stdlib/ParametersInterface.php diff --git a/lib/Zend/Stdlib/PriorityQueue.php b/lib/internal/Zend/Stdlib/PriorityQueue.php similarity index 100% rename from lib/Zend/Stdlib/PriorityQueue.php rename to lib/internal/Zend/Stdlib/PriorityQueue.php diff --git a/lib/Zend/Stdlib/Request.php b/lib/internal/Zend/Stdlib/Request.php similarity index 100% rename from lib/Zend/Stdlib/Request.php rename to lib/internal/Zend/Stdlib/Request.php diff --git a/lib/Zend/Stdlib/RequestInterface.php b/lib/internal/Zend/Stdlib/RequestInterface.php similarity index 100% rename from lib/Zend/Stdlib/RequestInterface.php rename to lib/internal/Zend/Stdlib/RequestInterface.php diff --git a/lib/Zend/Stdlib/Response.php b/lib/internal/Zend/Stdlib/Response.php similarity index 100% rename from lib/Zend/Stdlib/Response.php rename to lib/internal/Zend/Stdlib/Response.php diff --git a/lib/Zend/Stdlib/ResponseInterface.php b/lib/internal/Zend/Stdlib/ResponseInterface.php similarity index 100% rename from lib/Zend/Stdlib/ResponseInterface.php rename to lib/internal/Zend/Stdlib/ResponseInterface.php diff --git a/lib/Zend/Stdlib/SplPriorityQueue.php b/lib/internal/Zend/Stdlib/SplPriorityQueue.php similarity index 100% rename from lib/Zend/Stdlib/SplPriorityQueue.php rename to lib/internal/Zend/Stdlib/SplPriorityQueue.php diff --git a/lib/Zend/Stdlib/SplQueue.php b/lib/internal/Zend/Stdlib/SplQueue.php similarity index 100% rename from lib/Zend/Stdlib/SplQueue.php rename to lib/internal/Zend/Stdlib/SplQueue.php diff --git a/lib/Zend/Stdlib/SplStack.php b/lib/internal/Zend/Stdlib/SplStack.php similarity index 100% rename from lib/Zend/Stdlib/SplStack.php rename to lib/internal/Zend/Stdlib/SplStack.php diff --git a/lib/Zend/Stdlib/composer.json b/lib/internal/Zend/Stdlib/composer.json similarity index 100% rename from lib/Zend/Stdlib/composer.json rename to lib/internal/Zend/Stdlib/composer.json diff --git a/lib/Zend/Tag/Cloud.php b/lib/internal/Zend/Tag/Cloud.php similarity index 100% rename from lib/Zend/Tag/Cloud.php rename to lib/internal/Zend/Tag/Cloud.php diff --git a/lib/Zend/Tag/Cloud/Decorator/Cloud.php b/lib/internal/Zend/Tag/Cloud/Decorator/Cloud.php similarity index 100% rename from lib/Zend/Tag/Cloud/Decorator/Cloud.php rename to lib/internal/Zend/Tag/Cloud/Decorator/Cloud.php diff --git a/lib/Zend/Tag/Cloud/Decorator/Exception.php b/lib/internal/Zend/Tag/Cloud/Decorator/Exception.php similarity index 100% rename from lib/Zend/Tag/Cloud/Decorator/Exception.php rename to lib/internal/Zend/Tag/Cloud/Decorator/Exception.php diff --git a/lib/Zend/Tag/Cloud/Decorator/HtmlCloud.php b/lib/internal/Zend/Tag/Cloud/Decorator/HtmlCloud.php similarity index 100% rename from lib/Zend/Tag/Cloud/Decorator/HtmlCloud.php rename to lib/internal/Zend/Tag/Cloud/Decorator/HtmlCloud.php diff --git a/lib/Zend/Tag/Cloud/Decorator/HtmlTag.php b/lib/internal/Zend/Tag/Cloud/Decorator/HtmlTag.php similarity index 100% rename from lib/Zend/Tag/Cloud/Decorator/HtmlTag.php rename to lib/internal/Zend/Tag/Cloud/Decorator/HtmlTag.php diff --git a/lib/Zend/Tag/Cloud/Decorator/Tag.php b/lib/internal/Zend/Tag/Cloud/Decorator/Tag.php similarity index 100% rename from lib/Zend/Tag/Cloud/Decorator/Tag.php rename to lib/internal/Zend/Tag/Cloud/Decorator/Tag.php diff --git a/lib/Zend/Tag/Cloud/Exception.php b/lib/internal/Zend/Tag/Cloud/Exception.php similarity index 100% rename from lib/Zend/Tag/Cloud/Exception.php rename to lib/internal/Zend/Tag/Cloud/Exception.php diff --git a/lib/Zend/Tag/Exception.php b/lib/internal/Zend/Tag/Exception.php similarity index 100% rename from lib/Zend/Tag/Exception.php rename to lib/internal/Zend/Tag/Exception.php diff --git a/lib/Zend/Tag/Item.php b/lib/internal/Zend/Tag/Item.php similarity index 100% rename from lib/Zend/Tag/Item.php rename to lib/internal/Zend/Tag/Item.php diff --git a/lib/Zend/Tag/ItemList.php b/lib/internal/Zend/Tag/ItemList.php similarity index 100% rename from lib/Zend/Tag/ItemList.php rename to lib/internal/Zend/Tag/ItemList.php diff --git a/lib/Zend/Tag/Taggable.php b/lib/internal/Zend/Tag/Taggable.php similarity index 100% rename from lib/Zend/Tag/Taggable.php rename to lib/internal/Zend/Tag/Taggable.php diff --git a/lib/Zend/Test/DbAdapter.php b/lib/internal/Zend/Test/DbAdapter.php similarity index 100% rename from lib/Zend/Test/DbAdapter.php rename to lib/internal/Zend/Test/DbAdapter.php diff --git a/lib/Zend/Test/DbStatement.php b/lib/internal/Zend/Test/DbStatement.php similarity index 100% rename from lib/Zend/Test/DbStatement.php rename to lib/internal/Zend/Test/DbStatement.php diff --git a/lib/Zend/Test/PHPUnit/Constraint/DomQuery.php b/lib/internal/Zend/Test/PHPUnit/Constraint/DomQuery.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Constraint/DomQuery.php rename to lib/internal/Zend/Test/PHPUnit/Constraint/DomQuery.php diff --git a/lib/Zend/Test/PHPUnit/Constraint/Exception.php b/lib/internal/Zend/Test/PHPUnit/Constraint/Exception.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Constraint/Exception.php rename to lib/internal/Zend/Test/PHPUnit/Constraint/Exception.php diff --git a/lib/Zend/Test/PHPUnit/Constraint/Redirect.php b/lib/internal/Zend/Test/PHPUnit/Constraint/Redirect.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Constraint/Redirect.php rename to lib/internal/Zend/Test/PHPUnit/Constraint/Redirect.php diff --git a/lib/Zend/Test/PHPUnit/Constraint/ResponseHeader.php b/lib/internal/Zend/Test/PHPUnit/Constraint/ResponseHeader.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Constraint/ResponseHeader.php rename to lib/internal/Zend/Test/PHPUnit/Constraint/ResponseHeader.php diff --git a/lib/Zend/Test/PHPUnit/ControllerTestCase.php b/lib/internal/Zend/Test/PHPUnit/ControllerTestCase.php similarity index 100% rename from lib/Zend/Test/PHPUnit/ControllerTestCase.php rename to lib/internal/Zend/Test/PHPUnit/ControllerTestCase.php diff --git a/lib/Zend/Test/PHPUnit/DatabaseTestCase.php b/lib/internal/Zend/Test/PHPUnit/DatabaseTestCase.php similarity index 100% rename from lib/Zend/Test/PHPUnit/DatabaseTestCase.php rename to lib/internal/Zend/Test/PHPUnit/DatabaseTestCase.php diff --git a/lib/Zend/Test/PHPUnit/Db/Connection.php b/lib/internal/Zend/Test/PHPUnit/Db/Connection.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/Connection.php rename to lib/internal/Zend/Test/PHPUnit/Db/Connection.php diff --git a/lib/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php b/lib/internal/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php rename to lib/internal/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php diff --git a/lib/Zend/Test/PHPUnit/Db/DataSet/DbTable.php b/lib/internal/Zend/Test/PHPUnit/Db/DataSet/DbTable.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/DataSet/DbTable.php rename to lib/internal/Zend/Test/PHPUnit/Db/DataSet/DbTable.php diff --git a/lib/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php b/lib/internal/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php rename to lib/internal/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php diff --git a/lib/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php b/lib/internal/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php rename to lib/internal/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php diff --git a/lib/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php b/lib/internal/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php rename to lib/internal/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php diff --git a/lib/Zend/Test/PHPUnit/Db/Exception.php b/lib/internal/Zend/Test/PHPUnit/Db/Exception.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/Exception.php rename to lib/internal/Zend/Test/PHPUnit/Db/Exception.php diff --git a/lib/Zend/Test/PHPUnit/Db/Metadata/Generic.php b/lib/internal/Zend/Test/PHPUnit/Db/Metadata/Generic.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/Metadata/Generic.php rename to lib/internal/Zend/Test/PHPUnit/Db/Metadata/Generic.php diff --git a/lib/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php b/lib/internal/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php rename to lib/internal/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php diff --git a/lib/Zend/Test/PHPUnit/Db/Operation/Insert.php b/lib/internal/Zend/Test/PHPUnit/Db/Operation/Insert.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/Operation/Insert.php rename to lib/internal/Zend/Test/PHPUnit/Db/Operation/Insert.php diff --git a/lib/Zend/Test/PHPUnit/Db/Operation/Truncate.php b/lib/internal/Zend/Test/PHPUnit/Db/Operation/Truncate.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/Operation/Truncate.php rename to lib/internal/Zend/Test/PHPUnit/Db/Operation/Truncate.php diff --git a/lib/Zend/Test/PHPUnit/Db/SimpleTester.php b/lib/internal/Zend/Test/PHPUnit/Db/SimpleTester.php similarity index 100% rename from lib/Zend/Test/PHPUnit/Db/SimpleTester.php rename to lib/internal/Zend/Test/PHPUnit/Db/SimpleTester.php diff --git a/lib/Zend/Text/Exception.php b/lib/internal/Zend/Text/Exception.php similarity index 100% rename from lib/Zend/Text/Exception.php rename to lib/internal/Zend/Text/Exception.php diff --git a/lib/Zend/Text/Figlet.php b/lib/internal/Zend/Text/Figlet.php similarity index 100% rename from lib/Zend/Text/Figlet.php rename to lib/internal/Zend/Text/Figlet.php diff --git a/lib/Zend/Text/Figlet/Exception.php b/lib/internal/Zend/Text/Figlet/Exception.php similarity index 100% rename from lib/Zend/Text/Figlet/Exception.php rename to lib/internal/Zend/Text/Figlet/Exception.php diff --git a/lib/Zend/Text/Figlet/zend-framework.flf b/lib/internal/Zend/Text/Figlet/zend-framework.flf similarity index 100% rename from lib/Zend/Text/Figlet/zend-framework.flf rename to lib/internal/Zend/Text/Figlet/zend-framework.flf diff --git a/lib/Zend/Text/MultiByte.php b/lib/internal/Zend/Text/MultiByte.php similarity index 100% rename from lib/Zend/Text/MultiByte.php rename to lib/internal/Zend/Text/MultiByte.php diff --git a/lib/Zend/Text/Table.php b/lib/internal/Zend/Text/Table.php similarity index 100% rename from lib/Zend/Text/Table.php rename to lib/internal/Zend/Text/Table.php diff --git a/lib/Zend/Text/Table/Column.php b/lib/internal/Zend/Text/Table/Column.php similarity index 100% rename from lib/Zend/Text/Table/Column.php rename to lib/internal/Zend/Text/Table/Column.php diff --git a/lib/Zend/Text/Table/Decorator/Ascii.php b/lib/internal/Zend/Text/Table/Decorator/Ascii.php similarity index 100% rename from lib/Zend/Text/Table/Decorator/Ascii.php rename to lib/internal/Zend/Text/Table/Decorator/Ascii.php diff --git a/lib/Zend/Text/Table/Decorator/Interface.php b/lib/internal/Zend/Text/Table/Decorator/Interface.php similarity index 100% rename from lib/Zend/Text/Table/Decorator/Interface.php rename to lib/internal/Zend/Text/Table/Decorator/Interface.php diff --git a/lib/Zend/Text/Table/Decorator/Unicode.php b/lib/internal/Zend/Text/Table/Decorator/Unicode.php similarity index 100% rename from lib/Zend/Text/Table/Decorator/Unicode.php rename to lib/internal/Zend/Text/Table/Decorator/Unicode.php diff --git a/lib/Zend/Text/Table/Exception.php b/lib/internal/Zend/Text/Table/Exception.php similarity index 100% rename from lib/Zend/Text/Table/Exception.php rename to lib/internal/Zend/Text/Table/Exception.php diff --git a/lib/Zend/Text/Table/Row.php b/lib/internal/Zend/Text/Table/Row.php similarity index 100% rename from lib/Zend/Text/Table/Row.php rename to lib/internal/Zend/Text/Table/Row.php diff --git a/lib/Zend/TimeSync.php b/lib/internal/Zend/TimeSync.php similarity index 100% rename from lib/Zend/TimeSync.php rename to lib/internal/Zend/TimeSync.php diff --git a/lib/Zend/TimeSync/Exception.php b/lib/internal/Zend/TimeSync/Exception.php similarity index 100% rename from lib/Zend/TimeSync/Exception.php rename to lib/internal/Zend/TimeSync/Exception.php diff --git a/lib/Zend/TimeSync/Ntp.php b/lib/internal/Zend/TimeSync/Ntp.php similarity index 100% rename from lib/Zend/TimeSync/Ntp.php rename to lib/internal/Zend/TimeSync/Ntp.php diff --git a/lib/Zend/TimeSync/Protocol.php b/lib/internal/Zend/TimeSync/Protocol.php similarity index 100% rename from lib/Zend/TimeSync/Protocol.php rename to lib/internal/Zend/TimeSync/Protocol.php diff --git a/lib/Zend/TimeSync/Sntp.php b/lib/internal/Zend/TimeSync/Sntp.php similarity index 100% rename from lib/Zend/TimeSync/Sntp.php rename to lib/internal/Zend/TimeSync/Sntp.php diff --git a/lib/Zend/Tool/Framework/Action/Base.php b/lib/internal/Zend/Tool/Framework/Action/Base.php similarity index 100% rename from lib/Zend/Tool/Framework/Action/Base.php rename to lib/internal/Zend/Tool/Framework/Action/Base.php diff --git a/lib/Zend/Tool/Framework/Action/Exception.php b/lib/internal/Zend/Tool/Framework/Action/Exception.php similarity index 100% rename from lib/Zend/Tool/Framework/Action/Exception.php rename to lib/internal/Zend/Tool/Framework/Action/Exception.php diff --git a/lib/Zend/Tool/Framework/Action/Interface.php b/lib/internal/Zend/Tool/Framework/Action/Interface.php similarity index 100% rename from lib/Zend/Tool/Framework/Action/Interface.php rename to lib/internal/Zend/Tool/Framework/Action/Interface.php diff --git a/lib/Zend/Tool/Framework/Action/Repository.php b/lib/internal/Zend/Tool/Framework/Action/Repository.php similarity index 100% rename from lib/Zend/Tool/Framework/Action/Repository.php rename to lib/internal/Zend/Tool/Framework/Action/Repository.php diff --git a/lib/Zend/Tool/Framework/Client/Abstract.php b/lib/internal/Zend/Tool/Framework/Client/Abstract.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Abstract.php rename to lib/internal/Zend/Tool/Framework/Client/Abstract.php diff --git a/lib/Zend/Tool/Framework/Client/Config.php b/lib/internal/Zend/Tool/Framework/Client/Config.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Config.php rename to lib/internal/Zend/Tool/Framework/Client/Config.php diff --git a/lib/Zend/Tool/Framework/Client/Console.php b/lib/internal/Zend/Tool/Framework/Client/Console.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console.php rename to lib/internal/Zend/Tool/Framework/Client/Console.php diff --git a/lib/Zend/Tool/Framework/Client/Console/ArgumentParser.php b/lib/internal/Zend/Tool/Framework/Client/Console/ArgumentParser.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console/ArgumentParser.php rename to lib/internal/Zend/Tool/Framework/Client/Console/ArgumentParser.php diff --git a/lib/Zend/Tool/Framework/Client/Console/HelpSystem.php b/lib/internal/Zend/Tool/Framework/Client/Console/HelpSystem.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console/HelpSystem.php rename to lib/internal/Zend/Tool/Framework/Client/Console/HelpSystem.php diff --git a/lib/Zend/Tool/Framework/Client/Console/Manifest.php b/lib/internal/Zend/Tool/Framework/Client/Console/Manifest.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console/Manifest.php rename to lib/internal/Zend/Tool/Framework/Client/Console/Manifest.php diff --git a/lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php b/lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php rename to lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php diff --git a/lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php b/lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php rename to lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php diff --git a/lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php b/lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php rename to lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php diff --git a/lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php b/lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php rename to lib/internal/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php diff --git a/lib/Zend/Tool/Framework/Client/Exception.php b/lib/internal/Zend/Tool/Framework/Client/Exception.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Exception.php rename to lib/internal/Zend/Tool/Framework/Client/Exception.php diff --git a/lib/Zend/Tool/Framework/Client/Interactive/InputHandler.php b/lib/internal/Zend/Tool/Framework/Client/Interactive/InputHandler.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Interactive/InputHandler.php rename to lib/internal/Zend/Tool/Framework/Client/Interactive/InputHandler.php diff --git a/lib/Zend/Tool/Framework/Client/Interactive/InputInterface.php b/lib/internal/Zend/Tool/Framework/Client/Interactive/InputInterface.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Interactive/InputInterface.php rename to lib/internal/Zend/Tool/Framework/Client/Interactive/InputInterface.php diff --git a/lib/Zend/Tool/Framework/Client/Interactive/InputRequest.php b/lib/internal/Zend/Tool/Framework/Client/Interactive/InputRequest.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Interactive/InputRequest.php rename to lib/internal/Zend/Tool/Framework/Client/Interactive/InputRequest.php diff --git a/lib/Zend/Tool/Framework/Client/Interactive/InputResponse.php b/lib/internal/Zend/Tool/Framework/Client/Interactive/InputResponse.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Interactive/InputResponse.php rename to lib/internal/Zend/Tool/Framework/Client/Interactive/InputResponse.php diff --git a/lib/Zend/Tool/Framework/Client/Interactive/OutputInterface.php b/lib/internal/Zend/Tool/Framework/Client/Interactive/OutputInterface.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Interactive/OutputInterface.php rename to lib/internal/Zend/Tool/Framework/Client/Interactive/OutputInterface.php diff --git a/lib/Zend/Tool/Framework/Client/Manifest.php b/lib/internal/Zend/Tool/Framework/Client/Manifest.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Manifest.php rename to lib/internal/Zend/Tool/Framework/Client/Manifest.php diff --git a/lib/Zend/Tool/Framework/Client/Request.php b/lib/internal/Zend/Tool/Framework/Client/Request.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Request.php rename to lib/internal/Zend/Tool/Framework/Client/Request.php diff --git a/lib/Zend/Tool/Framework/Client/Response.php b/lib/internal/Zend/Tool/Framework/Client/Response.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Response.php rename to lib/internal/Zend/Tool/Framework/Client/Response.php diff --git a/lib/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php b/lib/internal/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php rename to lib/internal/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php diff --git a/lib/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php b/lib/internal/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php rename to lib/internal/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php diff --git a/lib/Zend/Tool/Framework/Client/Storage.php b/lib/internal/Zend/Tool/Framework/Client/Storage.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Storage.php rename to lib/internal/Zend/Tool/Framework/Client/Storage.php diff --git a/lib/Zend/Tool/Framework/Client/Storage/AdapterInterface.php b/lib/internal/Zend/Tool/Framework/Client/Storage/AdapterInterface.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Storage/AdapterInterface.php rename to lib/internal/Zend/Tool/Framework/Client/Storage/AdapterInterface.php diff --git a/lib/Zend/Tool/Framework/Client/Storage/Directory.php b/lib/internal/Zend/Tool/Framework/Client/Storage/Directory.php similarity index 100% rename from lib/Zend/Tool/Framework/Client/Storage/Directory.php rename to lib/internal/Zend/Tool/Framework/Client/Storage/Directory.php diff --git a/lib/Zend/Tool/Framework/Exception.php b/lib/internal/Zend/Tool/Framework/Exception.php similarity index 100% rename from lib/Zend/Tool/Framework/Exception.php rename to lib/internal/Zend/Tool/Framework/Exception.php diff --git a/lib/Zend/Tool/Framework/Loader/Abstract.php b/lib/internal/Zend/Tool/Framework/Loader/Abstract.php similarity index 100% rename from lib/Zend/Tool/Framework/Loader/Abstract.php rename to lib/internal/Zend/Tool/Framework/Loader/Abstract.php diff --git a/lib/Zend/Tool/Framework/Loader/BasicLoader.php b/lib/internal/Zend/Tool/Framework/Loader/BasicLoader.php similarity index 100% rename from lib/Zend/Tool/Framework/Loader/BasicLoader.php rename to lib/internal/Zend/Tool/Framework/Loader/BasicLoader.php diff --git a/lib/Zend/Tool/Framework/Loader/IncludePathLoader.php b/lib/internal/Zend/Tool/Framework/Loader/IncludePathLoader.php similarity index 100% rename from lib/Zend/Tool/Framework/Loader/IncludePathLoader.php rename to lib/internal/Zend/Tool/Framework/Loader/IncludePathLoader.php diff --git a/lib/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php b/lib/internal/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php similarity index 100% rename from lib/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php rename to lib/internal/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php diff --git a/lib/Zend/Tool/Framework/Loader/Interface.php b/lib/internal/Zend/Tool/Framework/Loader/Interface.php similarity index 100% rename from lib/Zend/Tool/Framework/Loader/Interface.php rename to lib/internal/Zend/Tool/Framework/Loader/Interface.php diff --git a/lib/Zend/Tool/Framework/Manifest/ActionManifestable.php b/lib/internal/Zend/Tool/Framework/Manifest/ActionManifestable.php similarity index 100% rename from lib/Zend/Tool/Framework/Manifest/ActionManifestable.php rename to lib/internal/Zend/Tool/Framework/Manifest/ActionManifestable.php diff --git a/lib/Zend/Tool/Framework/Manifest/Exception.php b/lib/internal/Zend/Tool/Framework/Manifest/Exception.php similarity index 100% rename from lib/Zend/Tool/Framework/Manifest/Exception.php rename to lib/internal/Zend/Tool/Framework/Manifest/Exception.php diff --git a/lib/Zend/Tool/Framework/Manifest/Indexable.php b/lib/internal/Zend/Tool/Framework/Manifest/Indexable.php similarity index 100% rename from lib/Zend/Tool/Framework/Manifest/Indexable.php rename to lib/internal/Zend/Tool/Framework/Manifest/Indexable.php diff --git a/lib/Zend/Tool/Framework/Manifest/Interface.php b/lib/internal/Zend/Tool/Framework/Manifest/Interface.php similarity index 100% rename from lib/Zend/Tool/Framework/Manifest/Interface.php rename to lib/internal/Zend/Tool/Framework/Manifest/Interface.php diff --git a/lib/Zend/Tool/Framework/Manifest/MetadataManifestable.php b/lib/internal/Zend/Tool/Framework/Manifest/MetadataManifestable.php similarity index 100% rename from lib/Zend/Tool/Framework/Manifest/MetadataManifestable.php rename to lib/internal/Zend/Tool/Framework/Manifest/MetadataManifestable.php diff --git a/lib/Zend/Tool/Framework/Manifest/ProviderManifestable.php b/lib/internal/Zend/Tool/Framework/Manifest/ProviderManifestable.php similarity index 100% rename from lib/Zend/Tool/Framework/Manifest/ProviderManifestable.php rename to lib/internal/Zend/Tool/Framework/Manifest/ProviderManifestable.php diff --git a/lib/Zend/Tool/Framework/Manifest/Repository.php b/lib/internal/Zend/Tool/Framework/Manifest/Repository.php similarity index 100% rename from lib/Zend/Tool/Framework/Manifest/Repository.php rename to lib/internal/Zend/Tool/Framework/Manifest/Repository.php diff --git a/lib/Zend/Tool/Framework/Metadata/Attributable.php b/lib/internal/Zend/Tool/Framework/Metadata/Attributable.php similarity index 100% rename from lib/Zend/Tool/Framework/Metadata/Attributable.php rename to lib/internal/Zend/Tool/Framework/Metadata/Attributable.php diff --git a/lib/Zend/Tool/Framework/Metadata/Basic.php b/lib/internal/Zend/Tool/Framework/Metadata/Basic.php similarity index 100% rename from lib/Zend/Tool/Framework/Metadata/Basic.php rename to lib/internal/Zend/Tool/Framework/Metadata/Basic.php diff --git a/lib/Zend/Tool/Framework/Metadata/Dynamic.php b/lib/internal/Zend/Tool/Framework/Metadata/Dynamic.php similarity index 100% rename from lib/Zend/Tool/Framework/Metadata/Dynamic.php rename to lib/internal/Zend/Tool/Framework/Metadata/Dynamic.php diff --git a/lib/Zend/Tool/Framework/Metadata/Interface.php b/lib/internal/Zend/Tool/Framework/Metadata/Interface.php similarity index 100% rename from lib/Zend/Tool/Framework/Metadata/Interface.php rename to lib/internal/Zend/Tool/Framework/Metadata/Interface.php diff --git a/lib/Zend/Tool/Framework/Metadata/Tool.php b/lib/internal/Zend/Tool/Framework/Metadata/Tool.php similarity index 100% rename from lib/Zend/Tool/Framework/Metadata/Tool.php rename to lib/internal/Zend/Tool/Framework/Metadata/Tool.php diff --git a/lib/Zend/Tool/Framework/Provider/Abstract.php b/lib/internal/Zend/Tool/Framework/Provider/Abstract.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Abstract.php rename to lib/internal/Zend/Tool/Framework/Provider/Abstract.php diff --git a/lib/Zend/Tool/Framework/Provider/DocblockManifestable.php b/lib/internal/Zend/Tool/Framework/Provider/DocblockManifestable.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/DocblockManifestable.php rename to lib/internal/Zend/Tool/Framework/Provider/DocblockManifestable.php diff --git a/lib/Zend/Tool/Framework/Provider/Exception.php b/lib/internal/Zend/Tool/Framework/Provider/Exception.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Exception.php rename to lib/internal/Zend/Tool/Framework/Provider/Exception.php diff --git a/lib/Zend/Tool/Framework/Provider/Initializable.php b/lib/internal/Zend/Tool/Framework/Provider/Initializable.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Initializable.php rename to lib/internal/Zend/Tool/Framework/Provider/Initializable.php diff --git a/lib/Zend/Tool/Framework/Provider/Interactable.php b/lib/internal/Zend/Tool/Framework/Provider/Interactable.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Interactable.php rename to lib/internal/Zend/Tool/Framework/Provider/Interactable.php diff --git a/lib/Zend/Tool/Framework/Provider/Interface.php b/lib/internal/Zend/Tool/Framework/Provider/Interface.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Interface.php rename to lib/internal/Zend/Tool/Framework/Provider/Interface.php diff --git a/lib/Zend/Tool/Framework/Provider/Pretendable.php b/lib/internal/Zend/Tool/Framework/Provider/Pretendable.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Pretendable.php rename to lib/internal/Zend/Tool/Framework/Provider/Pretendable.php diff --git a/lib/Zend/Tool/Framework/Provider/Repository.php b/lib/internal/Zend/Tool/Framework/Provider/Repository.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Repository.php rename to lib/internal/Zend/Tool/Framework/Provider/Repository.php diff --git a/lib/Zend/Tool/Framework/Provider/Signature.php b/lib/internal/Zend/Tool/Framework/Provider/Signature.php similarity index 100% rename from lib/Zend/Tool/Framework/Provider/Signature.php rename to lib/internal/Zend/Tool/Framework/Provider/Signature.php diff --git a/lib/Zend/Tool/Framework/Registry.php b/lib/internal/Zend/Tool/Framework/Registry.php similarity index 100% rename from lib/Zend/Tool/Framework/Registry.php rename to lib/internal/Zend/Tool/Framework/Registry.php diff --git a/lib/Zend/Tool/Framework/Registry/EnabledInterface.php b/lib/internal/Zend/Tool/Framework/Registry/EnabledInterface.php similarity index 100% rename from lib/Zend/Tool/Framework/Registry/EnabledInterface.php rename to lib/internal/Zend/Tool/Framework/Registry/EnabledInterface.php diff --git a/lib/Zend/Tool/Framework/Registry/Exception.php b/lib/internal/Zend/Tool/Framework/Registry/Exception.php similarity index 100% rename from lib/Zend/Tool/Framework/Registry/Exception.php rename to lib/internal/Zend/Tool/Framework/Registry/Exception.php diff --git a/lib/Zend/Tool/Framework/Registry/Interface.php b/lib/internal/Zend/Tool/Framework/Registry/Interface.php similarity index 100% rename from lib/Zend/Tool/Framework/Registry/Interface.php rename to lib/internal/Zend/Tool/Framework/Registry/Interface.php diff --git a/lib/Zend/Tool/Framework/System/Action/Create.php b/lib/internal/Zend/Tool/Framework/System/Action/Create.php similarity index 100% rename from lib/Zend/Tool/Framework/System/Action/Create.php rename to lib/internal/Zend/Tool/Framework/System/Action/Create.php diff --git a/lib/Zend/Tool/Framework/System/Action/Delete.php b/lib/internal/Zend/Tool/Framework/System/Action/Delete.php similarity index 100% rename from lib/Zend/Tool/Framework/System/Action/Delete.php rename to lib/internal/Zend/Tool/Framework/System/Action/Delete.php diff --git a/lib/Zend/Tool/Framework/System/Manifest.php b/lib/internal/Zend/Tool/Framework/System/Manifest.php similarity index 100% rename from lib/Zend/Tool/Framework/System/Manifest.php rename to lib/internal/Zend/Tool/Framework/System/Manifest.php diff --git a/lib/Zend/Tool/Framework/System/Provider/Config.php b/lib/internal/Zend/Tool/Framework/System/Provider/Config.php similarity index 100% rename from lib/Zend/Tool/Framework/System/Provider/Config.php rename to lib/internal/Zend/Tool/Framework/System/Provider/Config.php diff --git a/lib/Zend/Tool/Framework/System/Provider/Manifest.php b/lib/internal/Zend/Tool/Framework/System/Provider/Manifest.php similarity index 100% rename from lib/Zend/Tool/Framework/System/Provider/Manifest.php rename to lib/internal/Zend/Tool/Framework/System/Provider/Manifest.php diff --git a/lib/Zend/Tool/Framework/System/Provider/Phpinfo.php b/lib/internal/Zend/Tool/Framework/System/Provider/Phpinfo.php similarity index 100% rename from lib/Zend/Tool/Framework/System/Provider/Phpinfo.php rename to lib/internal/Zend/Tool/Framework/System/Provider/Phpinfo.php diff --git a/lib/Zend/Tool/Framework/System/Provider/Version.php b/lib/internal/Zend/Tool/Framework/System/Provider/Version.php similarity index 100% rename from lib/Zend/Tool/Framework/System/Provider/Version.php rename to lib/internal/Zend/Tool/Framework/System/Provider/Version.php diff --git a/lib/Zend/Tool/Project/Context/Content/Engine.php b/lib/internal/Zend/Tool/Project/Context/Content/Engine.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Content/Engine.php rename to lib/internal/Zend/Tool/Project/Context/Content/Engine.php diff --git a/lib/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php b/lib/internal/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php rename to lib/internal/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php diff --git a/lib/Zend/Tool/Project/Context/Content/Engine/Phtml.php b/lib/internal/Zend/Tool/Project/Context/Content/Engine/Phtml.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Content/Engine/Phtml.php rename to lib/internal/Zend/Tool/Project/Context/Content/Engine/Phtml.php diff --git a/lib/Zend/Tool/Project/Context/Exception.php b/lib/internal/Zend/Tool/Project/Context/Exception.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Exception.php rename to lib/internal/Zend/Tool/Project/Context/Exception.php diff --git a/lib/Zend/Tool/Project/Context/Filesystem/Abstract.php b/lib/internal/Zend/Tool/Project/Context/Filesystem/Abstract.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Filesystem/Abstract.php rename to lib/internal/Zend/Tool/Project/Context/Filesystem/Abstract.php diff --git a/lib/Zend/Tool/Project/Context/Filesystem/Directory.php b/lib/internal/Zend/Tool/Project/Context/Filesystem/Directory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Filesystem/Directory.php rename to lib/internal/Zend/Tool/Project/Context/Filesystem/Directory.php diff --git a/lib/Zend/Tool/Project/Context/Filesystem/File.php b/lib/internal/Zend/Tool/Project/Context/Filesystem/File.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Filesystem/File.php rename to lib/internal/Zend/Tool/Project/Context/Filesystem/File.php diff --git a/lib/Zend/Tool/Project/Context/Interface.php b/lib/internal/Zend/Tool/Project/Context/Interface.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Interface.php rename to lib/internal/Zend/Tool/Project/Context/Interface.php diff --git a/lib/Zend/Tool/Project/Context/Repository.php b/lib/internal/Zend/Tool/Project/Context/Repository.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Repository.php rename to lib/internal/Zend/Tool/Project/Context/Repository.php diff --git a/lib/Zend/Tool/Project/Context/System/Interface.php b/lib/internal/Zend/Tool/Project/Context/System/Interface.php similarity index 100% rename from lib/Zend/Tool/Project/Context/System/Interface.php rename to lib/internal/Zend/Tool/Project/Context/System/Interface.php diff --git a/lib/Zend/Tool/Project/Context/System/NotOverwritable.php b/lib/internal/Zend/Tool/Project/Context/System/NotOverwritable.php similarity index 100% rename from lib/Zend/Tool/Project/Context/System/NotOverwritable.php rename to lib/internal/Zend/Tool/Project/Context/System/NotOverwritable.php diff --git a/lib/Zend/Tool/Project/Context/System/ProjectDirectory.php b/lib/internal/Zend/Tool/Project/Context/System/ProjectDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/System/ProjectDirectory.php rename to lib/internal/Zend/Tool/Project/Context/System/ProjectDirectory.php diff --git a/lib/Zend/Tool/Project/Context/System/ProjectProfileFile.php b/lib/internal/Zend/Tool/Project/Context/System/ProjectProfileFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/System/ProjectProfileFile.php rename to lib/internal/Zend/Tool/Project/Context/System/ProjectProfileFile.php diff --git a/lib/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php b/lib/internal/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php rename to lib/internal/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php diff --git a/lib/Zend/Tool/Project/Context/System/TopLevelRestrictable.php b/lib/internal/Zend/Tool/Project/Context/System/TopLevelRestrictable.php similarity index 100% rename from lib/Zend/Tool/Project/Context/System/TopLevelRestrictable.php rename to lib/internal/Zend/Tool/Project/Context/System/TopLevelRestrictable.php diff --git a/lib/Zend/Tool/Project/Context/Zf/AbstractClassFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/AbstractClassFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/AbstractClassFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/AbstractClassFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ActionMethod.php b/lib/internal/Zend/Tool/Project/Context/Zf/ActionMethod.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ActionMethod.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ActionMethod.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ApisDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ApisDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ApisDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ApisDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/BootstrapFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/BootstrapFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/BootstrapFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/BootstrapFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/CacheDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/CacheDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/CacheDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/CacheDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ConfigFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/ConfigFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ConfigFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ConfigFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ControllerFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/ControllerFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ControllerFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ControllerFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ControllersDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ControllersDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ControllersDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ControllersDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/DataDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/DataDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/DataDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/DataDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/DbTableDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/DbTableDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/DbTableDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/DbTableDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/DbTableFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/DbTableFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/DbTableFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/DbTableFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/DocsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/DocsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/DocsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/DocsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/FormFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/FormFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/FormFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/FormFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/FormsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/FormsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/FormsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/FormsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/HtaccessFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/HtaccessFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/HtaccessFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/HtaccessFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/LibraryDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/LibraryDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/LibraryDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/LibraryDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/LocalesDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/LocalesDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/LocalesDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/LocalesDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/LogsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/LogsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/LogsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/LogsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ModelFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/ModelFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ModelFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ModelFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ModelsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ModelsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ModelsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ModelsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ModuleDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ModuleDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ModuleDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ModuleDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ModulesDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ModulesDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ModulesDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ModulesDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/PublicDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/PublicDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/PublicDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/PublicDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/PublicIndexFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/PublicIndexFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/PublicIndexFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/PublicIndexFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/SessionsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/SessionsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/SessionsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/SessionsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestLibraryFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestLibraryFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/TestsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/TestsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/TestsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/TestsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/UploadsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/UploadsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/UploadsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/UploadsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ViewScriptFile.php b/lib/internal/Zend/Tool/Project/Context/Zf/ViewScriptFile.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ViewScriptFile.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ViewScriptFile.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ViewsDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ViewsDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ViewsDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ViewsDirectory.php diff --git a/lib/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php b/lib/internal/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php similarity index 100% rename from lib/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php rename to lib/internal/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php diff --git a/lib/Zend/Tool/Project/Exception.php b/lib/internal/Zend/Tool/Project/Exception.php similarity index 100% rename from lib/Zend/Tool/Project/Exception.php rename to lib/internal/Zend/Tool/Project/Exception.php diff --git a/lib/Zend/Tool/Project/Profile.php b/lib/internal/Zend/Tool/Project/Profile.php similarity index 100% rename from lib/Zend/Tool/Project/Profile.php rename to lib/internal/Zend/Tool/Project/Profile.php diff --git a/lib/Zend/Tool/Project/Profile/Exception.php b/lib/internal/Zend/Tool/Project/Profile/Exception.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/Exception.php rename to lib/internal/Zend/Tool/Project/Profile/Exception.php diff --git a/lib/Zend/Tool/Project/Profile/FileParser/Interface.php b/lib/internal/Zend/Tool/Project/Profile/FileParser/Interface.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/FileParser/Interface.php rename to lib/internal/Zend/Tool/Project/Profile/FileParser/Interface.php diff --git a/lib/Zend/Tool/Project/Profile/FileParser/Xml.php b/lib/internal/Zend/Tool/Project/Profile/FileParser/Xml.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/FileParser/Xml.php rename to lib/internal/Zend/Tool/Project/Profile/FileParser/Xml.php diff --git a/lib/Zend/Tool/Project/Profile/Iterator/ContextFilter.php b/lib/internal/Zend/Tool/Project/Profile/Iterator/ContextFilter.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/Iterator/ContextFilter.php rename to lib/internal/Zend/Tool/Project/Profile/Iterator/ContextFilter.php diff --git a/lib/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php b/lib/internal/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php rename to lib/internal/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php diff --git a/lib/Zend/Tool/Project/Profile/Resource.php b/lib/internal/Zend/Tool/Project/Profile/Resource.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/Resource.php rename to lib/internal/Zend/Tool/Project/Profile/Resource.php diff --git a/lib/Zend/Tool/Project/Profile/Resource/Container.php b/lib/internal/Zend/Tool/Project/Profile/Resource/Container.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/Resource/Container.php rename to lib/internal/Zend/Tool/Project/Profile/Resource/Container.php diff --git a/lib/Zend/Tool/Project/Profile/Resource/SearchConstraints.php b/lib/internal/Zend/Tool/Project/Profile/Resource/SearchConstraints.php similarity index 100% rename from lib/Zend/Tool/Project/Profile/Resource/SearchConstraints.php rename to lib/internal/Zend/Tool/Project/Profile/Resource/SearchConstraints.php diff --git a/lib/Zend/Tool/Project/Provider/Abstract.php b/lib/internal/Zend/Tool/Project/Provider/Abstract.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Abstract.php rename to lib/internal/Zend/Tool/Project/Provider/Abstract.php diff --git a/lib/Zend/Tool/Project/Provider/Action.php b/lib/internal/Zend/Tool/Project/Provider/Action.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Action.php rename to lib/internal/Zend/Tool/Project/Provider/Action.php diff --git a/lib/Zend/Tool/Project/Provider/Application.php b/lib/internal/Zend/Tool/Project/Provider/Application.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Application.php rename to lib/internal/Zend/Tool/Project/Provider/Application.php diff --git a/lib/Zend/Tool/Project/Provider/Controller.php b/lib/internal/Zend/Tool/Project/Provider/Controller.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Controller.php rename to lib/internal/Zend/Tool/Project/Provider/Controller.php diff --git a/lib/Zend/Tool/Project/Provider/DbAdapter.php b/lib/internal/Zend/Tool/Project/Provider/DbAdapter.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/DbAdapter.php rename to lib/internal/Zend/Tool/Project/Provider/DbAdapter.php diff --git a/lib/Zend/Tool/Project/Provider/DbTable.php b/lib/internal/Zend/Tool/Project/Provider/DbTable.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/DbTable.php rename to lib/internal/Zend/Tool/Project/Provider/DbTable.php diff --git a/lib/Zend/Tool/Project/Provider/Exception.php b/lib/internal/Zend/Tool/Project/Provider/Exception.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Exception.php rename to lib/internal/Zend/Tool/Project/Provider/Exception.php diff --git a/lib/Zend/Tool/Project/Provider/Form.php b/lib/internal/Zend/Tool/Project/Provider/Form.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Form.php rename to lib/internal/Zend/Tool/Project/Provider/Form.php diff --git a/lib/Zend/Tool/Project/Provider/Layout.php b/lib/internal/Zend/Tool/Project/Provider/Layout.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Layout.php rename to lib/internal/Zend/Tool/Project/Provider/Layout.php diff --git a/lib/Zend/Tool/Project/Provider/Manifest.php b/lib/internal/Zend/Tool/Project/Provider/Manifest.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Manifest.php rename to lib/internal/Zend/Tool/Project/Provider/Manifest.php diff --git a/lib/Zend/Tool/Project/Provider/Model.php b/lib/internal/Zend/Tool/Project/Provider/Model.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Model.php rename to lib/internal/Zend/Tool/Project/Provider/Model.php diff --git a/lib/Zend/Tool/Project/Provider/Module.php b/lib/internal/Zend/Tool/Project/Provider/Module.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Module.php rename to lib/internal/Zend/Tool/Project/Provider/Module.php diff --git a/lib/Zend/Tool/Project/Provider/Profile.php b/lib/internal/Zend/Tool/Project/Provider/Profile.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Profile.php rename to lib/internal/Zend/Tool/Project/Provider/Profile.php diff --git a/lib/Zend/Tool/Project/Provider/Project.php b/lib/internal/Zend/Tool/Project/Provider/Project.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Project.php rename to lib/internal/Zend/Tool/Project/Provider/Project.php diff --git a/lib/Zend/Tool/Project/Provider/ProjectProvider.php b/lib/internal/Zend/Tool/Project/Provider/ProjectProvider.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/ProjectProvider.php rename to lib/internal/Zend/Tool/Project/Provider/ProjectProvider.php diff --git a/lib/Zend/Tool/Project/Provider/Test.php b/lib/internal/Zend/Tool/Project/Provider/Test.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/Test.php rename to lib/internal/Zend/Tool/Project/Provider/Test.php diff --git a/lib/Zend/Tool/Project/Provider/View.php b/lib/internal/Zend/Tool/Project/Provider/View.php similarity index 100% rename from lib/Zend/Tool/Project/Provider/View.php rename to lib/internal/Zend/Tool/Project/Provider/View.php diff --git a/lib/Zend/Translate.php b/lib/internal/Zend/Translate.php similarity index 100% rename from lib/Zend/Translate.php rename to lib/internal/Zend/Translate.php diff --git a/lib/Zend/Translate/Adapter.php b/lib/internal/Zend/Translate/Adapter.php similarity index 100% rename from lib/Zend/Translate/Adapter.php rename to lib/internal/Zend/Translate/Adapter.php diff --git a/lib/Zend/Translate/Adapter/Array.php b/lib/internal/Zend/Translate/Adapter/Array.php similarity index 100% rename from lib/Zend/Translate/Adapter/Array.php rename to lib/internal/Zend/Translate/Adapter/Array.php diff --git a/lib/Zend/Translate/Adapter/Csv.php b/lib/internal/Zend/Translate/Adapter/Csv.php similarity index 100% rename from lib/Zend/Translate/Adapter/Csv.php rename to lib/internal/Zend/Translate/Adapter/Csv.php diff --git a/lib/Zend/Translate/Adapter/Gettext.php b/lib/internal/Zend/Translate/Adapter/Gettext.php similarity index 100% rename from lib/Zend/Translate/Adapter/Gettext.php rename to lib/internal/Zend/Translate/Adapter/Gettext.php diff --git a/lib/Zend/Translate/Adapter/Ini.php b/lib/internal/Zend/Translate/Adapter/Ini.php similarity index 100% rename from lib/Zend/Translate/Adapter/Ini.php rename to lib/internal/Zend/Translate/Adapter/Ini.php diff --git a/lib/Zend/Translate/Adapter/Qt.php b/lib/internal/Zend/Translate/Adapter/Qt.php similarity index 100% rename from lib/Zend/Translate/Adapter/Qt.php rename to lib/internal/Zend/Translate/Adapter/Qt.php diff --git a/lib/Zend/Translate/Adapter/Tbx.php b/lib/internal/Zend/Translate/Adapter/Tbx.php similarity index 100% rename from lib/Zend/Translate/Adapter/Tbx.php rename to lib/internal/Zend/Translate/Adapter/Tbx.php diff --git a/lib/Zend/Translate/Adapter/Tmx.php b/lib/internal/Zend/Translate/Adapter/Tmx.php similarity index 100% rename from lib/Zend/Translate/Adapter/Tmx.php rename to lib/internal/Zend/Translate/Adapter/Tmx.php diff --git a/lib/Zend/Translate/Adapter/Xliff.php b/lib/internal/Zend/Translate/Adapter/Xliff.php similarity index 100% rename from lib/Zend/Translate/Adapter/Xliff.php rename to lib/internal/Zend/Translate/Adapter/Xliff.php diff --git a/lib/Zend/Translate/Adapter/XmlTm.php b/lib/internal/Zend/Translate/Adapter/XmlTm.php similarity index 100% rename from lib/Zend/Translate/Adapter/XmlTm.php rename to lib/internal/Zend/Translate/Adapter/XmlTm.php diff --git a/lib/Zend/Translate/Exception.php b/lib/internal/Zend/Translate/Exception.php similarity index 100% rename from lib/Zend/Translate/Exception.php rename to lib/internal/Zend/Translate/Exception.php diff --git a/lib/Zend/Translate/Plural.php b/lib/internal/Zend/Translate/Plural.php similarity index 100% rename from lib/Zend/Translate/Plural.php rename to lib/internal/Zend/Translate/Plural.php diff --git a/lib/Zend/Uri.php b/lib/internal/Zend/Uri.php similarity index 100% rename from lib/Zend/Uri.php rename to lib/internal/Zend/Uri.php diff --git a/lib/Zend/Uri/Exception.php b/lib/internal/Zend/Uri/Exception.php similarity index 100% rename from lib/Zend/Uri/Exception.php rename to lib/internal/Zend/Uri/Exception.php diff --git a/lib/Zend/Uri/Exception/ExceptionInterface.php b/lib/internal/Zend/Uri/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Uri/Exception/ExceptionInterface.php rename to lib/internal/Zend/Uri/Exception/ExceptionInterface.php diff --git a/lib/Zend/Uri/Exception/InvalidArgumentException.php b/lib/internal/Zend/Uri/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Uri/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Uri/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Uri/Exception/InvalidUriException.php b/lib/internal/Zend/Uri/Exception/InvalidUriException.php similarity index 100% rename from lib/Zend/Uri/Exception/InvalidUriException.php rename to lib/internal/Zend/Uri/Exception/InvalidUriException.php diff --git a/lib/Zend/Uri/Exception/InvalidUriPartException.php b/lib/internal/Zend/Uri/Exception/InvalidUriPartException.php similarity index 100% rename from lib/Zend/Uri/Exception/InvalidUriPartException.php rename to lib/internal/Zend/Uri/Exception/InvalidUriPartException.php diff --git a/lib/Zend/Uri/File.php b/lib/internal/Zend/Uri/File.php similarity index 100% rename from lib/Zend/Uri/File.php rename to lib/internal/Zend/Uri/File.php diff --git a/lib/Zend/Uri/Http.php b/lib/internal/Zend/Uri/Http.php similarity index 100% rename from lib/Zend/Uri/Http.php rename to lib/internal/Zend/Uri/Http.php diff --git a/lib/Zend/Uri/Mailto.php b/lib/internal/Zend/Uri/Mailto.php similarity index 100% rename from lib/Zend/Uri/Mailto.php rename to lib/internal/Zend/Uri/Mailto.php diff --git a/lib/Zend/Uri/Uri.php b/lib/internal/Zend/Uri/Uri.php similarity index 100% rename from lib/Zend/Uri/Uri.php rename to lib/internal/Zend/Uri/Uri.php diff --git a/lib/Zend/Uri/UriFactory.php b/lib/internal/Zend/Uri/UriFactory.php similarity index 100% rename from lib/Zend/Uri/UriFactory.php rename to lib/internal/Zend/Uri/UriFactory.php diff --git a/lib/Zend/Uri/UriInterface.php b/lib/internal/Zend/Uri/UriInterface.php similarity index 100% rename from lib/Zend/Uri/UriInterface.php rename to lib/internal/Zend/Uri/UriInterface.php diff --git a/lib/Zend/Uri/composer.json b/lib/internal/Zend/Uri/composer.json similarity index 100% rename from lib/Zend/Uri/composer.json rename to lib/internal/Zend/Uri/composer.json diff --git a/lib/Zend/Validate.php b/lib/internal/Zend/Validate.php similarity index 100% rename from lib/Zend/Validate.php rename to lib/internal/Zend/Validate.php diff --git a/lib/Zend/Validate/Abstract.php b/lib/internal/Zend/Validate/Abstract.php similarity index 100% rename from lib/Zend/Validate/Abstract.php rename to lib/internal/Zend/Validate/Abstract.php diff --git a/lib/Zend/Validate/Alnum.php b/lib/internal/Zend/Validate/Alnum.php similarity index 100% rename from lib/Zend/Validate/Alnum.php rename to lib/internal/Zend/Validate/Alnum.php diff --git a/lib/Zend/Validate/Alpha.php b/lib/internal/Zend/Validate/Alpha.php similarity index 100% rename from lib/Zend/Validate/Alpha.php rename to lib/internal/Zend/Validate/Alpha.php diff --git a/lib/Zend/Validate/Barcode.php b/lib/internal/Zend/Validate/Barcode.php similarity index 100% rename from lib/Zend/Validate/Barcode.php rename to lib/internal/Zend/Validate/Barcode.php diff --git a/lib/Zend/Validate/Barcode/AdapterAbstract.php b/lib/internal/Zend/Validate/Barcode/AdapterAbstract.php similarity index 100% rename from lib/Zend/Validate/Barcode/AdapterAbstract.php rename to lib/internal/Zend/Validate/Barcode/AdapterAbstract.php diff --git a/lib/Zend/Validate/Barcode/AdapterInterface.php b/lib/internal/Zend/Validate/Barcode/AdapterInterface.php similarity index 100% rename from lib/Zend/Validate/Barcode/AdapterInterface.php rename to lib/internal/Zend/Validate/Barcode/AdapterInterface.php diff --git a/lib/Zend/Validate/Barcode/Code25.php b/lib/internal/Zend/Validate/Barcode/Code25.php similarity index 100% rename from lib/Zend/Validate/Barcode/Code25.php rename to lib/internal/Zend/Validate/Barcode/Code25.php diff --git a/lib/Zend/Validate/Barcode/Code25interleaved.php b/lib/internal/Zend/Validate/Barcode/Code25interleaved.php similarity index 100% rename from lib/Zend/Validate/Barcode/Code25interleaved.php rename to lib/internal/Zend/Validate/Barcode/Code25interleaved.php diff --git a/lib/Zend/Validate/Barcode/Code39.php b/lib/internal/Zend/Validate/Barcode/Code39.php similarity index 100% rename from lib/Zend/Validate/Barcode/Code39.php rename to lib/internal/Zend/Validate/Barcode/Code39.php diff --git a/lib/Zend/Validate/Barcode/Code39ext.php b/lib/internal/Zend/Validate/Barcode/Code39ext.php similarity index 100% rename from lib/Zend/Validate/Barcode/Code39ext.php rename to lib/internal/Zend/Validate/Barcode/Code39ext.php diff --git a/lib/Zend/Validate/Barcode/Code93.php b/lib/internal/Zend/Validate/Barcode/Code93.php similarity index 100% rename from lib/Zend/Validate/Barcode/Code93.php rename to lib/internal/Zend/Validate/Barcode/Code93.php diff --git a/lib/Zend/Validate/Barcode/Code93ext.php b/lib/internal/Zend/Validate/Barcode/Code93ext.php similarity index 100% rename from lib/Zend/Validate/Barcode/Code93ext.php rename to lib/internal/Zend/Validate/Barcode/Code93ext.php diff --git a/lib/Zend/Validate/Barcode/Ean12.php b/lib/internal/Zend/Validate/Barcode/Ean12.php similarity index 100% rename from lib/Zend/Validate/Barcode/Ean12.php rename to lib/internal/Zend/Validate/Barcode/Ean12.php diff --git a/lib/Zend/Validate/Barcode/Ean13.php b/lib/internal/Zend/Validate/Barcode/Ean13.php similarity index 100% rename from lib/Zend/Validate/Barcode/Ean13.php rename to lib/internal/Zend/Validate/Barcode/Ean13.php diff --git a/lib/Zend/Validate/Barcode/Ean14.php b/lib/internal/Zend/Validate/Barcode/Ean14.php similarity index 100% rename from lib/Zend/Validate/Barcode/Ean14.php rename to lib/internal/Zend/Validate/Barcode/Ean14.php diff --git a/lib/Zend/Validate/Barcode/Ean18.php b/lib/internal/Zend/Validate/Barcode/Ean18.php similarity index 100% rename from lib/Zend/Validate/Barcode/Ean18.php rename to lib/internal/Zend/Validate/Barcode/Ean18.php diff --git a/lib/Zend/Validate/Barcode/Ean2.php b/lib/internal/Zend/Validate/Barcode/Ean2.php similarity index 100% rename from lib/Zend/Validate/Barcode/Ean2.php rename to lib/internal/Zend/Validate/Barcode/Ean2.php diff --git a/lib/Zend/Validate/Barcode/Ean5.php b/lib/internal/Zend/Validate/Barcode/Ean5.php similarity index 100% rename from lib/Zend/Validate/Barcode/Ean5.php rename to lib/internal/Zend/Validate/Barcode/Ean5.php diff --git a/lib/Zend/Validate/Barcode/Ean8.php b/lib/internal/Zend/Validate/Barcode/Ean8.php similarity index 100% rename from lib/Zend/Validate/Barcode/Ean8.php rename to lib/internal/Zend/Validate/Barcode/Ean8.php diff --git a/lib/Zend/Validate/Barcode/Gtin12.php b/lib/internal/Zend/Validate/Barcode/Gtin12.php similarity index 100% rename from lib/Zend/Validate/Barcode/Gtin12.php rename to lib/internal/Zend/Validate/Barcode/Gtin12.php diff --git a/lib/Zend/Validate/Barcode/Gtin13.php b/lib/internal/Zend/Validate/Barcode/Gtin13.php similarity index 100% rename from lib/Zend/Validate/Barcode/Gtin13.php rename to lib/internal/Zend/Validate/Barcode/Gtin13.php diff --git a/lib/Zend/Validate/Barcode/Gtin14.php b/lib/internal/Zend/Validate/Barcode/Gtin14.php similarity index 100% rename from lib/Zend/Validate/Barcode/Gtin14.php rename to lib/internal/Zend/Validate/Barcode/Gtin14.php diff --git a/lib/Zend/Validate/Barcode/Identcode.php b/lib/internal/Zend/Validate/Barcode/Identcode.php similarity index 100% rename from lib/Zend/Validate/Barcode/Identcode.php rename to lib/internal/Zend/Validate/Barcode/Identcode.php diff --git a/lib/Zend/Validate/Barcode/Intelligentmail.php b/lib/internal/Zend/Validate/Barcode/Intelligentmail.php similarity index 100% rename from lib/Zend/Validate/Barcode/Intelligentmail.php rename to lib/internal/Zend/Validate/Barcode/Intelligentmail.php diff --git a/lib/Zend/Validate/Barcode/Issn.php b/lib/internal/Zend/Validate/Barcode/Issn.php similarity index 100% rename from lib/Zend/Validate/Barcode/Issn.php rename to lib/internal/Zend/Validate/Barcode/Issn.php diff --git a/lib/Zend/Validate/Barcode/Itf14.php b/lib/internal/Zend/Validate/Barcode/Itf14.php similarity index 100% rename from lib/Zend/Validate/Barcode/Itf14.php rename to lib/internal/Zend/Validate/Barcode/Itf14.php diff --git a/lib/Zend/Validate/Barcode/Leitcode.php b/lib/internal/Zend/Validate/Barcode/Leitcode.php similarity index 100% rename from lib/Zend/Validate/Barcode/Leitcode.php rename to lib/internal/Zend/Validate/Barcode/Leitcode.php diff --git a/lib/Zend/Validate/Barcode/Planet.php b/lib/internal/Zend/Validate/Barcode/Planet.php similarity index 100% rename from lib/Zend/Validate/Barcode/Planet.php rename to lib/internal/Zend/Validate/Barcode/Planet.php diff --git a/lib/Zend/Validate/Barcode/Postnet.php b/lib/internal/Zend/Validate/Barcode/Postnet.php similarity index 100% rename from lib/Zend/Validate/Barcode/Postnet.php rename to lib/internal/Zend/Validate/Barcode/Postnet.php diff --git a/lib/Zend/Validate/Barcode/Royalmail.php b/lib/internal/Zend/Validate/Barcode/Royalmail.php similarity index 100% rename from lib/Zend/Validate/Barcode/Royalmail.php rename to lib/internal/Zend/Validate/Barcode/Royalmail.php diff --git a/lib/Zend/Validate/Barcode/Sscc.php b/lib/internal/Zend/Validate/Barcode/Sscc.php similarity index 100% rename from lib/Zend/Validate/Barcode/Sscc.php rename to lib/internal/Zend/Validate/Barcode/Sscc.php diff --git a/lib/Zend/Validate/Barcode/Upca.php b/lib/internal/Zend/Validate/Barcode/Upca.php similarity index 100% rename from lib/Zend/Validate/Barcode/Upca.php rename to lib/internal/Zend/Validate/Barcode/Upca.php diff --git a/lib/Zend/Validate/Barcode/Upce.php b/lib/internal/Zend/Validate/Barcode/Upce.php similarity index 100% rename from lib/Zend/Validate/Barcode/Upce.php rename to lib/internal/Zend/Validate/Barcode/Upce.php diff --git a/lib/Zend/Validate/Between.php b/lib/internal/Zend/Validate/Between.php similarity index 100% rename from lib/Zend/Validate/Between.php rename to lib/internal/Zend/Validate/Between.php diff --git a/lib/Zend/Validate/Callback.php b/lib/internal/Zend/Validate/Callback.php similarity index 100% rename from lib/Zend/Validate/Callback.php rename to lib/internal/Zend/Validate/Callback.php diff --git a/lib/Zend/Validate/Ccnum.php b/lib/internal/Zend/Validate/Ccnum.php similarity index 100% rename from lib/Zend/Validate/Ccnum.php rename to lib/internal/Zend/Validate/Ccnum.php diff --git a/lib/Zend/Validate/CreditCard.php b/lib/internal/Zend/Validate/CreditCard.php similarity index 100% rename from lib/Zend/Validate/CreditCard.php rename to lib/internal/Zend/Validate/CreditCard.php diff --git a/lib/Zend/Validate/Date.php b/lib/internal/Zend/Validate/Date.php similarity index 100% rename from lib/Zend/Validate/Date.php rename to lib/internal/Zend/Validate/Date.php diff --git a/lib/Zend/Validate/Db/Abstract.php b/lib/internal/Zend/Validate/Db/Abstract.php similarity index 100% rename from lib/Zend/Validate/Db/Abstract.php rename to lib/internal/Zend/Validate/Db/Abstract.php diff --git a/lib/Zend/Validate/Db/NoRecordExists.php b/lib/internal/Zend/Validate/Db/NoRecordExists.php similarity index 100% rename from lib/Zend/Validate/Db/NoRecordExists.php rename to lib/internal/Zend/Validate/Db/NoRecordExists.php diff --git a/lib/Zend/Validate/Db/RecordExists.php b/lib/internal/Zend/Validate/Db/RecordExists.php similarity index 100% rename from lib/Zend/Validate/Db/RecordExists.php rename to lib/internal/Zend/Validate/Db/RecordExists.php diff --git a/lib/Zend/Validate/Digits.php b/lib/internal/Zend/Validate/Digits.php similarity index 100% rename from lib/Zend/Validate/Digits.php rename to lib/internal/Zend/Validate/Digits.php diff --git a/lib/Zend/Validate/EmailAddress.php b/lib/internal/Zend/Validate/EmailAddress.php similarity index 100% rename from lib/Zend/Validate/EmailAddress.php rename to lib/internal/Zend/Validate/EmailAddress.php diff --git a/lib/Zend/Validate/Exception.php b/lib/internal/Zend/Validate/Exception.php similarity index 100% rename from lib/Zend/Validate/Exception.php rename to lib/internal/Zend/Validate/Exception.php diff --git a/lib/Zend/Validate/File/Count.php b/lib/internal/Zend/Validate/File/Count.php similarity index 100% rename from lib/Zend/Validate/File/Count.php rename to lib/internal/Zend/Validate/File/Count.php diff --git a/lib/Zend/Validate/File/Crc32.php b/lib/internal/Zend/Validate/File/Crc32.php similarity index 100% rename from lib/Zend/Validate/File/Crc32.php rename to lib/internal/Zend/Validate/File/Crc32.php diff --git a/lib/Zend/Validate/File/ExcludeExtension.php b/lib/internal/Zend/Validate/File/ExcludeExtension.php similarity index 100% rename from lib/Zend/Validate/File/ExcludeExtension.php rename to lib/internal/Zend/Validate/File/ExcludeExtension.php diff --git a/lib/Zend/Validate/File/ExcludeMimeType.php b/lib/internal/Zend/Validate/File/ExcludeMimeType.php similarity index 100% rename from lib/Zend/Validate/File/ExcludeMimeType.php rename to lib/internal/Zend/Validate/File/ExcludeMimeType.php diff --git a/lib/Zend/Validate/File/Exists.php b/lib/internal/Zend/Validate/File/Exists.php similarity index 100% rename from lib/Zend/Validate/File/Exists.php rename to lib/internal/Zend/Validate/File/Exists.php diff --git a/lib/Zend/Validate/File/Extension.php b/lib/internal/Zend/Validate/File/Extension.php similarity index 100% rename from lib/Zend/Validate/File/Extension.php rename to lib/internal/Zend/Validate/File/Extension.php diff --git a/lib/Zend/Validate/File/FilesSize.php b/lib/internal/Zend/Validate/File/FilesSize.php similarity index 100% rename from lib/Zend/Validate/File/FilesSize.php rename to lib/internal/Zend/Validate/File/FilesSize.php diff --git a/lib/Zend/Validate/File/Hash.php b/lib/internal/Zend/Validate/File/Hash.php similarity index 100% rename from lib/Zend/Validate/File/Hash.php rename to lib/internal/Zend/Validate/File/Hash.php diff --git a/lib/Zend/Validate/File/ImageSize.php b/lib/internal/Zend/Validate/File/ImageSize.php similarity index 100% rename from lib/Zend/Validate/File/ImageSize.php rename to lib/internal/Zend/Validate/File/ImageSize.php diff --git a/lib/Zend/Validate/File/IsCompressed.php b/lib/internal/Zend/Validate/File/IsCompressed.php similarity index 100% rename from lib/Zend/Validate/File/IsCompressed.php rename to lib/internal/Zend/Validate/File/IsCompressed.php diff --git a/lib/Zend/Validate/File/IsImage.php b/lib/internal/Zend/Validate/File/IsImage.php similarity index 100% rename from lib/Zend/Validate/File/IsImage.php rename to lib/internal/Zend/Validate/File/IsImage.php diff --git a/lib/Zend/Validate/File/Md5.php b/lib/internal/Zend/Validate/File/Md5.php similarity index 100% rename from lib/Zend/Validate/File/Md5.php rename to lib/internal/Zend/Validate/File/Md5.php diff --git a/lib/Zend/Validate/File/MimeType.php b/lib/internal/Zend/Validate/File/MimeType.php similarity index 100% rename from lib/Zend/Validate/File/MimeType.php rename to lib/internal/Zend/Validate/File/MimeType.php diff --git a/lib/Zend/Validate/File/NotExists.php b/lib/internal/Zend/Validate/File/NotExists.php similarity index 100% rename from lib/Zend/Validate/File/NotExists.php rename to lib/internal/Zend/Validate/File/NotExists.php diff --git a/lib/Zend/Validate/File/Sha1.php b/lib/internal/Zend/Validate/File/Sha1.php similarity index 100% rename from lib/Zend/Validate/File/Sha1.php rename to lib/internal/Zend/Validate/File/Sha1.php diff --git a/lib/Zend/Validate/File/Size.php b/lib/internal/Zend/Validate/File/Size.php similarity index 100% rename from lib/Zend/Validate/File/Size.php rename to lib/internal/Zend/Validate/File/Size.php diff --git a/lib/Zend/Validate/File/Upload.php b/lib/internal/Zend/Validate/File/Upload.php similarity index 100% rename from lib/Zend/Validate/File/Upload.php rename to lib/internal/Zend/Validate/File/Upload.php diff --git a/lib/Zend/Validate/File/WordCount.php b/lib/internal/Zend/Validate/File/WordCount.php similarity index 100% rename from lib/Zend/Validate/File/WordCount.php rename to lib/internal/Zend/Validate/File/WordCount.php diff --git a/lib/Zend/Validate/Float.php b/lib/internal/Zend/Validate/Float.php similarity index 100% rename from lib/Zend/Validate/Float.php rename to lib/internal/Zend/Validate/Float.php diff --git a/lib/Zend/Validate/GreaterThan.php b/lib/internal/Zend/Validate/GreaterThan.php similarity index 100% rename from lib/Zend/Validate/GreaterThan.php rename to lib/internal/Zend/Validate/GreaterThan.php diff --git a/lib/Zend/Validate/Hex.php b/lib/internal/Zend/Validate/Hex.php similarity index 100% rename from lib/Zend/Validate/Hex.php rename to lib/internal/Zend/Validate/Hex.php diff --git a/lib/Zend/Validate/Hostname.php b/lib/internal/Zend/Validate/Hostname.php similarity index 100% rename from lib/Zend/Validate/Hostname.php rename to lib/internal/Zend/Validate/Hostname.php diff --git a/lib/Zend/Validate/Hostname/Biz.php b/lib/internal/Zend/Validate/Hostname/Biz.php similarity index 100% rename from lib/Zend/Validate/Hostname/Biz.php rename to lib/internal/Zend/Validate/Hostname/Biz.php diff --git a/lib/Zend/Validate/Hostname/Cn.php b/lib/internal/Zend/Validate/Hostname/Cn.php similarity index 100% rename from lib/Zend/Validate/Hostname/Cn.php rename to lib/internal/Zend/Validate/Hostname/Cn.php diff --git a/lib/Zend/Validate/Hostname/Com.php b/lib/internal/Zend/Validate/Hostname/Com.php similarity index 100% rename from lib/Zend/Validate/Hostname/Com.php rename to lib/internal/Zend/Validate/Hostname/Com.php diff --git a/lib/Zend/Validate/Hostname/Jp.php b/lib/internal/Zend/Validate/Hostname/Jp.php similarity index 100% rename from lib/Zend/Validate/Hostname/Jp.php rename to lib/internal/Zend/Validate/Hostname/Jp.php diff --git a/lib/Zend/Validate/Iban.php b/lib/internal/Zend/Validate/Iban.php similarity index 100% rename from lib/Zend/Validate/Iban.php rename to lib/internal/Zend/Validate/Iban.php diff --git a/lib/Zend/Validate/Identical.php b/lib/internal/Zend/Validate/Identical.php similarity index 100% rename from lib/Zend/Validate/Identical.php rename to lib/internal/Zend/Validate/Identical.php diff --git a/lib/Zend/Validate/InArray.php b/lib/internal/Zend/Validate/InArray.php similarity index 100% rename from lib/Zend/Validate/InArray.php rename to lib/internal/Zend/Validate/InArray.php diff --git a/lib/Zend/Validate/Int.php b/lib/internal/Zend/Validate/Int.php similarity index 100% rename from lib/Zend/Validate/Int.php rename to lib/internal/Zend/Validate/Int.php diff --git a/lib/Zend/Validate/Interface.php b/lib/internal/Zend/Validate/Interface.php similarity index 100% rename from lib/Zend/Validate/Interface.php rename to lib/internal/Zend/Validate/Interface.php diff --git a/lib/Zend/Validate/Ip.php b/lib/internal/Zend/Validate/Ip.php similarity index 100% rename from lib/Zend/Validate/Ip.php rename to lib/internal/Zend/Validate/Ip.php diff --git a/lib/Zend/Validate/Isbn.php b/lib/internal/Zend/Validate/Isbn.php similarity index 100% rename from lib/Zend/Validate/Isbn.php rename to lib/internal/Zend/Validate/Isbn.php diff --git a/lib/Zend/Validate/LessThan.php b/lib/internal/Zend/Validate/LessThan.php similarity index 100% rename from lib/Zend/Validate/LessThan.php rename to lib/internal/Zend/Validate/LessThan.php diff --git a/lib/Zend/Validate/NotEmpty.php b/lib/internal/Zend/Validate/NotEmpty.php similarity index 100% rename from lib/Zend/Validate/NotEmpty.php rename to lib/internal/Zend/Validate/NotEmpty.php diff --git a/lib/Zend/Validate/PostCode.php b/lib/internal/Zend/Validate/PostCode.php similarity index 100% rename from lib/Zend/Validate/PostCode.php rename to lib/internal/Zend/Validate/PostCode.php diff --git a/lib/Zend/Validate/Regex.php b/lib/internal/Zend/Validate/Regex.php similarity index 100% rename from lib/Zend/Validate/Regex.php rename to lib/internal/Zend/Validate/Regex.php diff --git a/lib/Zend/Validate/Sitemap/Changefreq.php b/lib/internal/Zend/Validate/Sitemap/Changefreq.php similarity index 100% rename from lib/Zend/Validate/Sitemap/Changefreq.php rename to lib/internal/Zend/Validate/Sitemap/Changefreq.php diff --git a/lib/Zend/Validate/Sitemap/Lastmod.php b/lib/internal/Zend/Validate/Sitemap/Lastmod.php similarity index 100% rename from lib/Zend/Validate/Sitemap/Lastmod.php rename to lib/internal/Zend/Validate/Sitemap/Lastmod.php diff --git a/lib/Zend/Validate/Sitemap/Loc.php b/lib/internal/Zend/Validate/Sitemap/Loc.php similarity index 100% rename from lib/Zend/Validate/Sitemap/Loc.php rename to lib/internal/Zend/Validate/Sitemap/Loc.php diff --git a/lib/Zend/Validate/Sitemap/Priority.php b/lib/internal/Zend/Validate/Sitemap/Priority.php similarity index 100% rename from lib/Zend/Validate/Sitemap/Priority.php rename to lib/internal/Zend/Validate/Sitemap/Priority.php diff --git a/lib/Zend/Validate/StringLength.php b/lib/internal/Zend/Validate/StringLength.php similarity index 100% rename from lib/Zend/Validate/StringLength.php rename to lib/internal/Zend/Validate/StringLength.php diff --git a/lib/Zend/Validator/AbstractValidator.php b/lib/internal/Zend/Validator/AbstractValidator.php similarity index 100% rename from lib/Zend/Validator/AbstractValidator.php rename to lib/internal/Zend/Validator/AbstractValidator.php diff --git a/lib/Zend/Validator/Barcode.php b/lib/internal/Zend/Validator/Barcode.php similarity index 100% rename from lib/Zend/Validator/Barcode.php rename to lib/internal/Zend/Validator/Barcode.php diff --git a/lib/Zend/Validator/Barcode/AbstractAdapter.php b/lib/internal/Zend/Validator/Barcode/AbstractAdapter.php similarity index 100% rename from lib/Zend/Validator/Barcode/AbstractAdapter.php rename to lib/internal/Zend/Validator/Barcode/AbstractAdapter.php diff --git a/lib/Zend/Validator/Barcode/AdapterInterface.php b/lib/internal/Zend/Validator/Barcode/AdapterInterface.php similarity index 100% rename from lib/Zend/Validator/Barcode/AdapterInterface.php rename to lib/internal/Zend/Validator/Barcode/AdapterInterface.php diff --git a/lib/Zend/Validator/Barcode/Codabar.php b/lib/internal/Zend/Validator/Barcode/Codabar.php similarity index 100% rename from lib/Zend/Validator/Barcode/Codabar.php rename to lib/internal/Zend/Validator/Barcode/Codabar.php diff --git a/lib/Zend/Validator/Barcode/Code128.php b/lib/internal/Zend/Validator/Barcode/Code128.php similarity index 100% rename from lib/Zend/Validator/Barcode/Code128.php rename to lib/internal/Zend/Validator/Barcode/Code128.php diff --git a/lib/Zend/Validator/Barcode/Code25.php b/lib/internal/Zend/Validator/Barcode/Code25.php similarity index 100% rename from lib/Zend/Validator/Barcode/Code25.php rename to lib/internal/Zend/Validator/Barcode/Code25.php diff --git a/lib/Zend/Validator/Barcode/Code25interleaved.php b/lib/internal/Zend/Validator/Barcode/Code25interleaved.php similarity index 100% rename from lib/Zend/Validator/Barcode/Code25interleaved.php rename to lib/internal/Zend/Validator/Barcode/Code25interleaved.php diff --git a/lib/Zend/Validator/Barcode/Code39.php b/lib/internal/Zend/Validator/Barcode/Code39.php similarity index 100% rename from lib/Zend/Validator/Barcode/Code39.php rename to lib/internal/Zend/Validator/Barcode/Code39.php diff --git a/lib/Zend/Validator/Barcode/Code39ext.php b/lib/internal/Zend/Validator/Barcode/Code39ext.php similarity index 100% rename from lib/Zend/Validator/Barcode/Code39ext.php rename to lib/internal/Zend/Validator/Barcode/Code39ext.php diff --git a/lib/Zend/Validator/Barcode/Code93.php b/lib/internal/Zend/Validator/Barcode/Code93.php similarity index 100% rename from lib/Zend/Validator/Barcode/Code93.php rename to lib/internal/Zend/Validator/Barcode/Code93.php diff --git a/lib/Zend/Validator/Barcode/Code93ext.php b/lib/internal/Zend/Validator/Barcode/Code93ext.php similarity index 100% rename from lib/Zend/Validator/Barcode/Code93ext.php rename to lib/internal/Zend/Validator/Barcode/Code93ext.php diff --git a/lib/Zend/Validator/Barcode/Ean12.php b/lib/internal/Zend/Validator/Barcode/Ean12.php similarity index 100% rename from lib/Zend/Validator/Barcode/Ean12.php rename to lib/internal/Zend/Validator/Barcode/Ean12.php diff --git a/lib/Zend/Validator/Barcode/Ean13.php b/lib/internal/Zend/Validator/Barcode/Ean13.php similarity index 100% rename from lib/Zend/Validator/Barcode/Ean13.php rename to lib/internal/Zend/Validator/Barcode/Ean13.php diff --git a/lib/Zend/Validator/Barcode/Ean14.php b/lib/internal/Zend/Validator/Barcode/Ean14.php similarity index 100% rename from lib/Zend/Validator/Barcode/Ean14.php rename to lib/internal/Zend/Validator/Barcode/Ean14.php diff --git a/lib/Zend/Validator/Barcode/Ean18.php b/lib/internal/Zend/Validator/Barcode/Ean18.php similarity index 100% rename from lib/Zend/Validator/Barcode/Ean18.php rename to lib/internal/Zend/Validator/Barcode/Ean18.php diff --git a/lib/Zend/Validator/Barcode/Ean2.php b/lib/internal/Zend/Validator/Barcode/Ean2.php similarity index 100% rename from lib/Zend/Validator/Barcode/Ean2.php rename to lib/internal/Zend/Validator/Barcode/Ean2.php diff --git a/lib/Zend/Validator/Barcode/Ean5.php b/lib/internal/Zend/Validator/Barcode/Ean5.php similarity index 100% rename from lib/Zend/Validator/Barcode/Ean5.php rename to lib/internal/Zend/Validator/Barcode/Ean5.php diff --git a/lib/Zend/Validator/Barcode/Ean8.php b/lib/internal/Zend/Validator/Barcode/Ean8.php similarity index 100% rename from lib/Zend/Validator/Barcode/Ean8.php rename to lib/internal/Zend/Validator/Barcode/Ean8.php diff --git a/lib/Zend/Validator/Barcode/Gtin12.php b/lib/internal/Zend/Validator/Barcode/Gtin12.php similarity index 100% rename from lib/Zend/Validator/Barcode/Gtin12.php rename to lib/internal/Zend/Validator/Barcode/Gtin12.php diff --git a/lib/Zend/Validator/Barcode/Gtin13.php b/lib/internal/Zend/Validator/Barcode/Gtin13.php similarity index 100% rename from lib/Zend/Validator/Barcode/Gtin13.php rename to lib/internal/Zend/Validator/Barcode/Gtin13.php diff --git a/lib/Zend/Validator/Barcode/Gtin14.php b/lib/internal/Zend/Validator/Barcode/Gtin14.php similarity index 100% rename from lib/Zend/Validator/Barcode/Gtin14.php rename to lib/internal/Zend/Validator/Barcode/Gtin14.php diff --git a/lib/Zend/Validator/Barcode/Identcode.php b/lib/internal/Zend/Validator/Barcode/Identcode.php similarity index 100% rename from lib/Zend/Validator/Barcode/Identcode.php rename to lib/internal/Zend/Validator/Barcode/Identcode.php diff --git a/lib/Zend/Validator/Barcode/Intelligentmail.php b/lib/internal/Zend/Validator/Barcode/Intelligentmail.php similarity index 100% rename from lib/Zend/Validator/Barcode/Intelligentmail.php rename to lib/internal/Zend/Validator/Barcode/Intelligentmail.php diff --git a/lib/Zend/Validator/Barcode/Issn.php b/lib/internal/Zend/Validator/Barcode/Issn.php similarity index 100% rename from lib/Zend/Validator/Barcode/Issn.php rename to lib/internal/Zend/Validator/Barcode/Issn.php diff --git a/lib/Zend/Validator/Barcode/Itf14.php b/lib/internal/Zend/Validator/Barcode/Itf14.php similarity index 100% rename from lib/Zend/Validator/Barcode/Itf14.php rename to lib/internal/Zend/Validator/Barcode/Itf14.php diff --git a/lib/Zend/Validator/Barcode/Leitcode.php b/lib/internal/Zend/Validator/Barcode/Leitcode.php similarity index 100% rename from lib/Zend/Validator/Barcode/Leitcode.php rename to lib/internal/Zend/Validator/Barcode/Leitcode.php diff --git a/lib/Zend/Validator/Barcode/Planet.php b/lib/internal/Zend/Validator/Barcode/Planet.php similarity index 100% rename from lib/Zend/Validator/Barcode/Planet.php rename to lib/internal/Zend/Validator/Barcode/Planet.php diff --git a/lib/Zend/Validator/Barcode/Postnet.php b/lib/internal/Zend/Validator/Barcode/Postnet.php similarity index 100% rename from lib/Zend/Validator/Barcode/Postnet.php rename to lib/internal/Zend/Validator/Barcode/Postnet.php diff --git a/lib/Zend/Validator/Barcode/Royalmail.php b/lib/internal/Zend/Validator/Barcode/Royalmail.php similarity index 100% rename from lib/Zend/Validator/Barcode/Royalmail.php rename to lib/internal/Zend/Validator/Barcode/Royalmail.php diff --git a/lib/Zend/Validator/Barcode/Sscc.php b/lib/internal/Zend/Validator/Barcode/Sscc.php similarity index 100% rename from lib/Zend/Validator/Barcode/Sscc.php rename to lib/internal/Zend/Validator/Barcode/Sscc.php diff --git a/lib/Zend/Validator/Barcode/Upca.php b/lib/internal/Zend/Validator/Barcode/Upca.php similarity index 100% rename from lib/Zend/Validator/Barcode/Upca.php rename to lib/internal/Zend/Validator/Barcode/Upca.php diff --git a/lib/Zend/Validator/Barcode/Upce.php b/lib/internal/Zend/Validator/Barcode/Upce.php similarity index 100% rename from lib/Zend/Validator/Barcode/Upce.php rename to lib/internal/Zend/Validator/Barcode/Upce.php diff --git a/lib/Zend/Validator/Between.php b/lib/internal/Zend/Validator/Between.php similarity index 100% rename from lib/Zend/Validator/Between.php rename to lib/internal/Zend/Validator/Between.php diff --git a/lib/Zend/Validator/Callback.php b/lib/internal/Zend/Validator/Callback.php similarity index 100% rename from lib/Zend/Validator/Callback.php rename to lib/internal/Zend/Validator/Callback.php diff --git a/lib/Zend/Validator/CreditCard.php b/lib/internal/Zend/Validator/CreditCard.php similarity index 100% rename from lib/Zend/Validator/CreditCard.php rename to lib/internal/Zend/Validator/CreditCard.php diff --git a/lib/Zend/Validator/Csrf.php b/lib/internal/Zend/Validator/Csrf.php similarity index 100% rename from lib/Zend/Validator/Csrf.php rename to lib/internal/Zend/Validator/Csrf.php diff --git a/lib/Zend/Validator/Date.php b/lib/internal/Zend/Validator/Date.php similarity index 100% rename from lib/Zend/Validator/Date.php rename to lib/internal/Zend/Validator/Date.php diff --git a/lib/Zend/Validator/DateStep.php b/lib/internal/Zend/Validator/DateStep.php similarity index 100% rename from lib/Zend/Validator/DateStep.php rename to lib/internal/Zend/Validator/DateStep.php diff --git a/lib/Zend/Validator/Db/AbstractDb.php b/lib/internal/Zend/Validator/Db/AbstractDb.php similarity index 100% rename from lib/Zend/Validator/Db/AbstractDb.php rename to lib/internal/Zend/Validator/Db/AbstractDb.php diff --git a/lib/Zend/Validator/Db/NoRecordExists.php b/lib/internal/Zend/Validator/Db/NoRecordExists.php similarity index 100% rename from lib/Zend/Validator/Db/NoRecordExists.php rename to lib/internal/Zend/Validator/Db/NoRecordExists.php diff --git a/lib/Zend/Validator/Db/RecordExists.php b/lib/internal/Zend/Validator/Db/RecordExists.php similarity index 100% rename from lib/Zend/Validator/Db/RecordExists.php rename to lib/internal/Zend/Validator/Db/RecordExists.php diff --git a/lib/Zend/Validator/Digits.php b/lib/internal/Zend/Validator/Digits.php similarity index 100% rename from lib/Zend/Validator/Digits.php rename to lib/internal/Zend/Validator/Digits.php diff --git a/lib/Zend/Validator/EmailAddress.php b/lib/internal/Zend/Validator/EmailAddress.php similarity index 100% rename from lib/Zend/Validator/EmailAddress.php rename to lib/internal/Zend/Validator/EmailAddress.php diff --git a/lib/Zend/Validator/Exception/BadMethodCallException.php b/lib/internal/Zend/Validator/Exception/BadMethodCallException.php similarity index 100% rename from lib/Zend/Validator/Exception/BadMethodCallException.php rename to lib/internal/Zend/Validator/Exception/BadMethodCallException.php diff --git a/lib/Zend/Validator/Exception/ExceptionInterface.php b/lib/internal/Zend/Validator/Exception/ExceptionInterface.php similarity index 100% rename from lib/Zend/Validator/Exception/ExceptionInterface.php rename to lib/internal/Zend/Validator/Exception/ExceptionInterface.php diff --git a/lib/Zend/Validator/Exception/ExtensionNotLoadedException.php b/lib/internal/Zend/Validator/Exception/ExtensionNotLoadedException.php similarity index 100% rename from lib/Zend/Validator/Exception/ExtensionNotLoadedException.php rename to lib/internal/Zend/Validator/Exception/ExtensionNotLoadedException.php diff --git a/lib/Zend/Validator/Exception/InvalidArgumentException.php b/lib/internal/Zend/Validator/Exception/InvalidArgumentException.php similarity index 100% rename from lib/Zend/Validator/Exception/InvalidArgumentException.php rename to lib/internal/Zend/Validator/Exception/InvalidArgumentException.php diff --git a/lib/Zend/Validator/Exception/InvalidMagicMimeFileException.php b/lib/internal/Zend/Validator/Exception/InvalidMagicMimeFileException.php similarity index 100% rename from lib/Zend/Validator/Exception/InvalidMagicMimeFileException.php rename to lib/internal/Zend/Validator/Exception/InvalidMagicMimeFileException.php diff --git a/lib/Zend/Validator/Exception/RuntimeException.php b/lib/internal/Zend/Validator/Exception/RuntimeException.php similarity index 100% rename from lib/Zend/Validator/Exception/RuntimeException.php rename to lib/internal/Zend/Validator/Exception/RuntimeException.php diff --git a/lib/Zend/Validator/Explode.php b/lib/internal/Zend/Validator/Explode.php similarity index 100% rename from lib/Zend/Validator/Explode.php rename to lib/internal/Zend/Validator/Explode.php diff --git a/lib/Zend/Validator/File/Count.php b/lib/internal/Zend/Validator/File/Count.php similarity index 100% rename from lib/Zend/Validator/File/Count.php rename to lib/internal/Zend/Validator/File/Count.php diff --git a/lib/Zend/Validator/File/Crc32.php b/lib/internal/Zend/Validator/File/Crc32.php similarity index 100% rename from lib/Zend/Validator/File/Crc32.php rename to lib/internal/Zend/Validator/File/Crc32.php diff --git a/lib/Zend/Validator/File/ExcludeExtension.php b/lib/internal/Zend/Validator/File/ExcludeExtension.php similarity index 100% rename from lib/Zend/Validator/File/ExcludeExtension.php rename to lib/internal/Zend/Validator/File/ExcludeExtension.php diff --git a/lib/Zend/Validator/File/ExcludeMimeType.php b/lib/internal/Zend/Validator/File/ExcludeMimeType.php similarity index 100% rename from lib/Zend/Validator/File/ExcludeMimeType.php rename to lib/internal/Zend/Validator/File/ExcludeMimeType.php diff --git a/lib/Zend/Validator/File/Exists.php b/lib/internal/Zend/Validator/File/Exists.php similarity index 100% rename from lib/Zend/Validator/File/Exists.php rename to lib/internal/Zend/Validator/File/Exists.php diff --git a/lib/Zend/Validator/File/Extension.php b/lib/internal/Zend/Validator/File/Extension.php similarity index 100% rename from lib/Zend/Validator/File/Extension.php rename to lib/internal/Zend/Validator/File/Extension.php diff --git a/lib/Zend/Validator/File/FilesSize.php b/lib/internal/Zend/Validator/File/FilesSize.php similarity index 100% rename from lib/Zend/Validator/File/FilesSize.php rename to lib/internal/Zend/Validator/File/FilesSize.php diff --git a/lib/Zend/Validator/File/Hash.php b/lib/internal/Zend/Validator/File/Hash.php similarity index 100% rename from lib/Zend/Validator/File/Hash.php rename to lib/internal/Zend/Validator/File/Hash.php diff --git a/lib/Zend/Validator/File/ImageSize.php b/lib/internal/Zend/Validator/File/ImageSize.php similarity index 100% rename from lib/Zend/Validator/File/ImageSize.php rename to lib/internal/Zend/Validator/File/ImageSize.php diff --git a/lib/Zend/Validator/File/IsCompressed.php b/lib/internal/Zend/Validator/File/IsCompressed.php similarity index 100% rename from lib/Zend/Validator/File/IsCompressed.php rename to lib/internal/Zend/Validator/File/IsCompressed.php diff --git a/lib/Zend/Validator/File/IsImage.php b/lib/internal/Zend/Validator/File/IsImage.php similarity index 100% rename from lib/Zend/Validator/File/IsImage.php rename to lib/internal/Zend/Validator/File/IsImage.php diff --git a/lib/Zend/Validator/File/Md5.php b/lib/internal/Zend/Validator/File/Md5.php similarity index 100% rename from lib/Zend/Validator/File/Md5.php rename to lib/internal/Zend/Validator/File/Md5.php diff --git a/lib/Zend/Validator/File/MimeType.php b/lib/internal/Zend/Validator/File/MimeType.php similarity index 100% rename from lib/Zend/Validator/File/MimeType.php rename to lib/internal/Zend/Validator/File/MimeType.php diff --git a/lib/Zend/Validator/File/NotExists.php b/lib/internal/Zend/Validator/File/NotExists.php similarity index 100% rename from lib/Zend/Validator/File/NotExists.php rename to lib/internal/Zend/Validator/File/NotExists.php diff --git a/lib/Zend/Validator/File/Sha1.php b/lib/internal/Zend/Validator/File/Sha1.php similarity index 100% rename from lib/Zend/Validator/File/Sha1.php rename to lib/internal/Zend/Validator/File/Sha1.php diff --git a/lib/Zend/Validator/File/Size.php b/lib/internal/Zend/Validator/File/Size.php similarity index 100% rename from lib/Zend/Validator/File/Size.php rename to lib/internal/Zend/Validator/File/Size.php diff --git a/lib/Zend/Validator/File/Upload.php b/lib/internal/Zend/Validator/File/Upload.php similarity index 100% rename from lib/Zend/Validator/File/Upload.php rename to lib/internal/Zend/Validator/File/Upload.php diff --git a/lib/Zend/Validator/File/WordCount.php b/lib/internal/Zend/Validator/File/WordCount.php similarity index 100% rename from lib/Zend/Validator/File/WordCount.php rename to lib/internal/Zend/Validator/File/WordCount.php diff --git a/lib/Zend/Validator/GreaterThan.php b/lib/internal/Zend/Validator/GreaterThan.php similarity index 100% rename from lib/Zend/Validator/GreaterThan.php rename to lib/internal/Zend/Validator/GreaterThan.php diff --git a/lib/Zend/Validator/Hex.php b/lib/internal/Zend/Validator/Hex.php similarity index 100% rename from lib/Zend/Validator/Hex.php rename to lib/internal/Zend/Validator/Hex.php diff --git a/lib/Zend/Validator/Hostname.php b/lib/internal/Zend/Validator/Hostname.php similarity index 100% rename from lib/Zend/Validator/Hostname.php rename to lib/internal/Zend/Validator/Hostname.php diff --git a/lib/Zend/Validator/Hostname/Biz.php b/lib/internal/Zend/Validator/Hostname/Biz.php similarity index 100% rename from lib/Zend/Validator/Hostname/Biz.php rename to lib/internal/Zend/Validator/Hostname/Biz.php diff --git a/lib/Zend/Validator/Hostname/Cn.php b/lib/internal/Zend/Validator/Hostname/Cn.php similarity index 100% rename from lib/Zend/Validator/Hostname/Cn.php rename to lib/internal/Zend/Validator/Hostname/Cn.php diff --git a/lib/Zend/Validator/Hostname/Com.php b/lib/internal/Zend/Validator/Hostname/Com.php similarity index 100% rename from lib/Zend/Validator/Hostname/Com.php rename to lib/internal/Zend/Validator/Hostname/Com.php diff --git a/lib/Zend/Validator/Hostname/Jp.php b/lib/internal/Zend/Validator/Hostname/Jp.php similarity index 100% rename from lib/Zend/Validator/Hostname/Jp.php rename to lib/internal/Zend/Validator/Hostname/Jp.php diff --git a/lib/Zend/Validator/Iban.php b/lib/internal/Zend/Validator/Iban.php similarity index 100% rename from lib/Zend/Validator/Iban.php rename to lib/internal/Zend/Validator/Iban.php diff --git a/lib/Zend/Validator/Identical.php b/lib/internal/Zend/Validator/Identical.php similarity index 100% rename from lib/Zend/Validator/Identical.php rename to lib/internal/Zend/Validator/Identical.php diff --git a/lib/Zend/Validator/InArray.php b/lib/internal/Zend/Validator/InArray.php similarity index 100% rename from lib/Zend/Validator/InArray.php rename to lib/internal/Zend/Validator/InArray.php diff --git a/lib/Zend/Validator/Ip.php b/lib/internal/Zend/Validator/Ip.php similarity index 100% rename from lib/Zend/Validator/Ip.php rename to lib/internal/Zend/Validator/Ip.php diff --git a/lib/Zend/Validator/Isbn.php b/lib/internal/Zend/Validator/Isbn.php similarity index 100% rename from lib/Zend/Validator/Isbn.php rename to lib/internal/Zend/Validator/Isbn.php diff --git a/lib/Zend/Validator/LessThan.php b/lib/internal/Zend/Validator/LessThan.php similarity index 100% rename from lib/Zend/Validator/LessThan.php rename to lib/internal/Zend/Validator/LessThan.php diff --git a/lib/Zend/Validator/NotEmpty.php b/lib/internal/Zend/Validator/NotEmpty.php similarity index 100% rename from lib/Zend/Validator/NotEmpty.php rename to lib/internal/Zend/Validator/NotEmpty.php diff --git a/lib/Zend/Validator/Regex.php b/lib/internal/Zend/Validator/Regex.php similarity index 100% rename from lib/Zend/Validator/Regex.php rename to lib/internal/Zend/Validator/Regex.php diff --git a/lib/Zend/Validator/Sitemap/Changefreq.php b/lib/internal/Zend/Validator/Sitemap/Changefreq.php similarity index 100% rename from lib/Zend/Validator/Sitemap/Changefreq.php rename to lib/internal/Zend/Validator/Sitemap/Changefreq.php diff --git a/lib/Zend/Validator/Sitemap/Lastmod.php b/lib/internal/Zend/Validator/Sitemap/Lastmod.php similarity index 100% rename from lib/Zend/Validator/Sitemap/Lastmod.php rename to lib/internal/Zend/Validator/Sitemap/Lastmod.php diff --git a/lib/Zend/Validator/Sitemap/Loc.php b/lib/internal/Zend/Validator/Sitemap/Loc.php similarity index 100% rename from lib/Zend/Validator/Sitemap/Loc.php rename to lib/internal/Zend/Validator/Sitemap/Loc.php diff --git a/lib/Zend/Validator/Sitemap/Priority.php b/lib/internal/Zend/Validator/Sitemap/Priority.php similarity index 100% rename from lib/Zend/Validator/Sitemap/Priority.php rename to lib/internal/Zend/Validator/Sitemap/Priority.php diff --git a/lib/Zend/Validator/StaticValidator.php b/lib/internal/Zend/Validator/StaticValidator.php similarity index 100% rename from lib/Zend/Validator/StaticValidator.php rename to lib/internal/Zend/Validator/StaticValidator.php diff --git a/lib/Zend/Validator/Step.php b/lib/internal/Zend/Validator/Step.php similarity index 100% rename from lib/Zend/Validator/Step.php rename to lib/internal/Zend/Validator/Step.php diff --git a/lib/Zend/Validator/StringLength.php b/lib/internal/Zend/Validator/StringLength.php similarity index 100% rename from lib/Zend/Validator/StringLength.php rename to lib/internal/Zend/Validator/StringLength.php diff --git a/lib/Zend/Validator/Uri.php b/lib/internal/Zend/Validator/Uri.php similarity index 100% rename from lib/Zend/Validator/Uri.php rename to lib/internal/Zend/Validator/Uri.php diff --git a/lib/Zend/Validator/ValidatorChain.php b/lib/internal/Zend/Validator/ValidatorChain.php similarity index 100% rename from lib/Zend/Validator/ValidatorChain.php rename to lib/internal/Zend/Validator/ValidatorChain.php diff --git a/lib/Zend/Validator/ValidatorInterface.php b/lib/internal/Zend/Validator/ValidatorInterface.php similarity index 100% rename from lib/Zend/Validator/ValidatorInterface.php rename to lib/internal/Zend/Validator/ValidatorInterface.php diff --git a/lib/Zend/Validator/ValidatorPluginManager.php b/lib/internal/Zend/Validator/ValidatorPluginManager.php similarity index 100% rename from lib/Zend/Validator/ValidatorPluginManager.php rename to lib/internal/Zend/Validator/ValidatorPluginManager.php diff --git a/lib/Zend/Validator/composer.json b/lib/internal/Zend/Validator/composer.json similarity index 100% rename from lib/Zend/Validator/composer.json rename to lib/internal/Zend/Validator/composer.json diff --git a/lib/Zend/Version.php b/lib/internal/Zend/Version.php similarity index 100% rename from lib/Zend/Version.php rename to lib/internal/Zend/Version.php diff --git a/lib/Zend/View.php b/lib/internal/Zend/View.php similarity index 100% rename from lib/Zend/View.php rename to lib/internal/Zend/View.php diff --git a/lib/Zend/View/Abstract.php b/lib/internal/Zend/View/Abstract.php similarity index 100% rename from lib/Zend/View/Abstract.php rename to lib/internal/Zend/View/Abstract.php diff --git a/lib/Zend/View/Exception.php b/lib/internal/Zend/View/Exception.php similarity index 100% rename from lib/Zend/View/Exception.php rename to lib/internal/Zend/View/Exception.php diff --git a/lib/Zend/View/Helper/Abstract.php b/lib/internal/Zend/View/Helper/Abstract.php similarity index 100% rename from lib/Zend/View/Helper/Abstract.php rename to lib/internal/Zend/View/Helper/Abstract.php diff --git a/lib/Zend/View/Helper/Action.php b/lib/internal/Zend/View/Helper/Action.php similarity index 100% rename from lib/Zend/View/Helper/Action.php rename to lib/internal/Zend/View/Helper/Action.php diff --git a/lib/Zend/View/Helper/BaseUrl.php b/lib/internal/Zend/View/Helper/BaseUrl.php similarity index 100% rename from lib/Zend/View/Helper/BaseUrl.php rename to lib/internal/Zend/View/Helper/BaseUrl.php diff --git a/lib/Zend/View/Helper/Currency.php b/lib/internal/Zend/View/Helper/Currency.php similarity index 100% rename from lib/Zend/View/Helper/Currency.php rename to lib/internal/Zend/View/Helper/Currency.php diff --git a/lib/Zend/View/Helper/Cycle.php b/lib/internal/Zend/View/Helper/Cycle.php similarity index 100% rename from lib/Zend/View/Helper/Cycle.php rename to lib/internal/Zend/View/Helper/Cycle.php diff --git a/lib/Zend/View/Helper/DeclareVars.php b/lib/internal/Zend/View/Helper/DeclareVars.php similarity index 100% rename from lib/Zend/View/Helper/DeclareVars.php rename to lib/internal/Zend/View/Helper/DeclareVars.php diff --git a/lib/Zend/View/Helper/Doctype.php b/lib/internal/Zend/View/Helper/Doctype.php similarity index 100% rename from lib/Zend/View/Helper/Doctype.php rename to lib/internal/Zend/View/Helper/Doctype.php diff --git a/lib/Zend/View/Helper/Fieldset.php b/lib/internal/Zend/View/Helper/Fieldset.php similarity index 100% rename from lib/Zend/View/Helper/Fieldset.php rename to lib/internal/Zend/View/Helper/Fieldset.php diff --git a/lib/Zend/View/Helper/Form.php b/lib/internal/Zend/View/Helper/Form.php similarity index 100% rename from lib/Zend/View/Helper/Form.php rename to lib/internal/Zend/View/Helper/Form.php diff --git a/lib/Zend/View/Helper/FormButton.php b/lib/internal/Zend/View/Helper/FormButton.php similarity index 100% rename from lib/Zend/View/Helper/FormButton.php rename to lib/internal/Zend/View/Helper/FormButton.php diff --git a/lib/Zend/View/Helper/FormCheckbox.php b/lib/internal/Zend/View/Helper/FormCheckbox.php similarity index 100% rename from lib/Zend/View/Helper/FormCheckbox.php rename to lib/internal/Zend/View/Helper/FormCheckbox.php diff --git a/lib/Zend/View/Helper/FormElement.php b/lib/internal/Zend/View/Helper/FormElement.php similarity index 100% rename from lib/Zend/View/Helper/FormElement.php rename to lib/internal/Zend/View/Helper/FormElement.php diff --git a/lib/Zend/View/Helper/FormErrors.php b/lib/internal/Zend/View/Helper/FormErrors.php similarity index 100% rename from lib/Zend/View/Helper/FormErrors.php rename to lib/internal/Zend/View/Helper/FormErrors.php diff --git a/lib/Zend/View/Helper/FormFile.php b/lib/internal/Zend/View/Helper/FormFile.php similarity index 100% rename from lib/Zend/View/Helper/FormFile.php rename to lib/internal/Zend/View/Helper/FormFile.php diff --git a/lib/Zend/View/Helper/FormHidden.php b/lib/internal/Zend/View/Helper/FormHidden.php similarity index 100% rename from lib/Zend/View/Helper/FormHidden.php rename to lib/internal/Zend/View/Helper/FormHidden.php diff --git a/lib/Zend/View/Helper/FormImage.php b/lib/internal/Zend/View/Helper/FormImage.php similarity index 100% rename from lib/Zend/View/Helper/FormImage.php rename to lib/internal/Zend/View/Helper/FormImage.php diff --git a/lib/Zend/View/Helper/FormLabel.php b/lib/internal/Zend/View/Helper/FormLabel.php similarity index 100% rename from lib/Zend/View/Helper/FormLabel.php rename to lib/internal/Zend/View/Helper/FormLabel.php diff --git a/lib/Zend/View/Helper/FormMultiCheckbox.php b/lib/internal/Zend/View/Helper/FormMultiCheckbox.php similarity index 100% rename from lib/Zend/View/Helper/FormMultiCheckbox.php rename to lib/internal/Zend/View/Helper/FormMultiCheckbox.php diff --git a/lib/Zend/View/Helper/FormNote.php b/lib/internal/Zend/View/Helper/FormNote.php similarity index 100% rename from lib/Zend/View/Helper/FormNote.php rename to lib/internal/Zend/View/Helper/FormNote.php diff --git a/lib/Zend/View/Helper/FormPassword.php b/lib/internal/Zend/View/Helper/FormPassword.php similarity index 100% rename from lib/Zend/View/Helper/FormPassword.php rename to lib/internal/Zend/View/Helper/FormPassword.php diff --git a/lib/Zend/View/Helper/FormRadio.php b/lib/internal/Zend/View/Helper/FormRadio.php similarity index 100% rename from lib/Zend/View/Helper/FormRadio.php rename to lib/internal/Zend/View/Helper/FormRadio.php diff --git a/lib/Zend/View/Helper/FormReset.php b/lib/internal/Zend/View/Helper/FormReset.php similarity index 100% rename from lib/Zend/View/Helper/FormReset.php rename to lib/internal/Zend/View/Helper/FormReset.php diff --git a/lib/Zend/View/Helper/FormSelect.php b/lib/internal/Zend/View/Helper/FormSelect.php similarity index 100% rename from lib/Zend/View/Helper/FormSelect.php rename to lib/internal/Zend/View/Helper/FormSelect.php diff --git a/lib/Zend/View/Helper/FormSubmit.php b/lib/internal/Zend/View/Helper/FormSubmit.php similarity index 100% rename from lib/Zend/View/Helper/FormSubmit.php rename to lib/internal/Zend/View/Helper/FormSubmit.php diff --git a/lib/Zend/View/Helper/FormText.php b/lib/internal/Zend/View/Helper/FormText.php similarity index 100% rename from lib/Zend/View/Helper/FormText.php rename to lib/internal/Zend/View/Helper/FormText.php diff --git a/lib/Zend/View/Helper/FormTextarea.php b/lib/internal/Zend/View/Helper/FormTextarea.php similarity index 100% rename from lib/Zend/View/Helper/FormTextarea.php rename to lib/internal/Zend/View/Helper/FormTextarea.php diff --git a/lib/Zend/View/Helper/Gravatar.php b/lib/internal/Zend/View/Helper/Gravatar.php similarity index 100% rename from lib/Zend/View/Helper/Gravatar.php rename to lib/internal/Zend/View/Helper/Gravatar.php diff --git a/lib/Zend/View/Helper/HeadLink.php b/lib/internal/Zend/View/Helper/HeadLink.php similarity index 100% rename from lib/Zend/View/Helper/HeadLink.php rename to lib/internal/Zend/View/Helper/HeadLink.php diff --git a/lib/Zend/View/Helper/HeadMeta.php b/lib/internal/Zend/View/Helper/HeadMeta.php similarity index 100% rename from lib/Zend/View/Helper/HeadMeta.php rename to lib/internal/Zend/View/Helper/HeadMeta.php diff --git a/lib/Zend/View/Helper/HeadScript.php b/lib/internal/Zend/View/Helper/HeadScript.php similarity index 100% rename from lib/Zend/View/Helper/HeadScript.php rename to lib/internal/Zend/View/Helper/HeadScript.php diff --git a/lib/Zend/View/Helper/HeadStyle.php b/lib/internal/Zend/View/Helper/HeadStyle.php similarity index 100% rename from lib/Zend/View/Helper/HeadStyle.php rename to lib/internal/Zend/View/Helper/HeadStyle.php diff --git a/lib/Zend/View/Helper/HeadTitle.php b/lib/internal/Zend/View/Helper/HeadTitle.php similarity index 100% rename from lib/Zend/View/Helper/HeadTitle.php rename to lib/internal/Zend/View/Helper/HeadTitle.php diff --git a/lib/Zend/View/Helper/HtmlElement.php b/lib/internal/Zend/View/Helper/HtmlElement.php similarity index 100% rename from lib/Zend/View/Helper/HtmlElement.php rename to lib/internal/Zend/View/Helper/HtmlElement.php diff --git a/lib/Zend/View/Helper/HtmlFlash.php b/lib/internal/Zend/View/Helper/HtmlFlash.php similarity index 100% rename from lib/Zend/View/Helper/HtmlFlash.php rename to lib/internal/Zend/View/Helper/HtmlFlash.php diff --git a/lib/Zend/View/Helper/HtmlList.php b/lib/internal/Zend/View/Helper/HtmlList.php similarity index 100% rename from lib/Zend/View/Helper/HtmlList.php rename to lib/internal/Zend/View/Helper/HtmlList.php diff --git a/lib/Zend/View/Helper/HtmlObject.php b/lib/internal/Zend/View/Helper/HtmlObject.php similarity index 100% rename from lib/Zend/View/Helper/HtmlObject.php rename to lib/internal/Zend/View/Helper/HtmlObject.php diff --git a/lib/Zend/View/Helper/HtmlPage.php b/lib/internal/Zend/View/Helper/HtmlPage.php similarity index 100% rename from lib/Zend/View/Helper/HtmlPage.php rename to lib/internal/Zend/View/Helper/HtmlPage.php diff --git a/lib/Zend/View/Helper/HtmlQuicktime.php b/lib/internal/Zend/View/Helper/HtmlQuicktime.php similarity index 100% rename from lib/Zend/View/Helper/HtmlQuicktime.php rename to lib/internal/Zend/View/Helper/HtmlQuicktime.php diff --git a/lib/Zend/View/Helper/InlineScript.php b/lib/internal/Zend/View/Helper/InlineScript.php similarity index 100% rename from lib/Zend/View/Helper/InlineScript.php rename to lib/internal/Zend/View/Helper/InlineScript.php diff --git a/lib/Zend/View/Helper/Interface.php b/lib/internal/Zend/View/Helper/Interface.php similarity index 100% rename from lib/Zend/View/Helper/Interface.php rename to lib/internal/Zend/View/Helper/Interface.php diff --git a/lib/Zend/View/Helper/Json.php b/lib/internal/Zend/View/Helper/Json.php similarity index 100% rename from lib/Zend/View/Helper/Json.php rename to lib/internal/Zend/View/Helper/Json.php diff --git a/lib/Zend/View/Helper/Layout.php b/lib/internal/Zend/View/Helper/Layout.php similarity index 100% rename from lib/Zend/View/Helper/Layout.php rename to lib/internal/Zend/View/Helper/Layout.php diff --git a/lib/Zend/View/Helper/Navigation.php b/lib/internal/Zend/View/Helper/Navigation.php similarity index 100% rename from lib/Zend/View/Helper/Navigation.php rename to lib/internal/Zend/View/Helper/Navigation.php diff --git a/lib/Zend/View/Helper/Navigation/Breadcrumbs.php b/lib/internal/Zend/View/Helper/Navigation/Breadcrumbs.php similarity index 100% rename from lib/Zend/View/Helper/Navigation/Breadcrumbs.php rename to lib/internal/Zend/View/Helper/Navigation/Breadcrumbs.php diff --git a/lib/Zend/View/Helper/Navigation/Helper.php b/lib/internal/Zend/View/Helper/Navigation/Helper.php similarity index 100% rename from lib/Zend/View/Helper/Navigation/Helper.php rename to lib/internal/Zend/View/Helper/Navigation/Helper.php diff --git a/lib/Zend/View/Helper/Navigation/HelperAbstract.php b/lib/internal/Zend/View/Helper/Navigation/HelperAbstract.php similarity index 100% rename from lib/Zend/View/Helper/Navigation/HelperAbstract.php rename to lib/internal/Zend/View/Helper/Navigation/HelperAbstract.php diff --git a/lib/Zend/View/Helper/Navigation/Links.php b/lib/internal/Zend/View/Helper/Navigation/Links.php similarity index 100% rename from lib/Zend/View/Helper/Navigation/Links.php rename to lib/internal/Zend/View/Helper/Navigation/Links.php diff --git a/lib/Zend/View/Helper/Navigation/Menu.php b/lib/internal/Zend/View/Helper/Navigation/Menu.php similarity index 100% rename from lib/Zend/View/Helper/Navigation/Menu.php rename to lib/internal/Zend/View/Helper/Navigation/Menu.php diff --git a/lib/Zend/View/Helper/Navigation/Sitemap.php b/lib/internal/Zend/View/Helper/Navigation/Sitemap.php similarity index 100% rename from lib/Zend/View/Helper/Navigation/Sitemap.php rename to lib/internal/Zend/View/Helper/Navigation/Sitemap.php diff --git a/lib/Zend/View/Helper/PaginationControl.php b/lib/internal/Zend/View/Helper/PaginationControl.php similarity index 100% rename from lib/Zend/View/Helper/PaginationControl.php rename to lib/internal/Zend/View/Helper/PaginationControl.php diff --git a/lib/Zend/View/Helper/Partial.php b/lib/internal/Zend/View/Helper/Partial.php similarity index 100% rename from lib/Zend/View/Helper/Partial.php rename to lib/internal/Zend/View/Helper/Partial.php diff --git a/lib/Zend/View/Helper/Partial/Exception.php b/lib/internal/Zend/View/Helper/Partial/Exception.php similarity index 100% rename from lib/Zend/View/Helper/Partial/Exception.php rename to lib/internal/Zend/View/Helper/Partial/Exception.php diff --git a/lib/Zend/View/Helper/PartialLoop.php b/lib/internal/Zend/View/Helper/PartialLoop.php similarity index 100% rename from lib/Zend/View/Helper/PartialLoop.php rename to lib/internal/Zend/View/Helper/PartialLoop.php diff --git a/lib/Zend/View/Helper/Placeholder.php b/lib/internal/Zend/View/Helper/Placeholder.php similarity index 100% rename from lib/Zend/View/Helper/Placeholder.php rename to lib/internal/Zend/View/Helper/Placeholder.php diff --git a/lib/Zend/View/Helper/Placeholder/Container.php b/lib/internal/Zend/View/Helper/Placeholder/Container.php similarity index 100% rename from lib/Zend/View/Helper/Placeholder/Container.php rename to lib/internal/Zend/View/Helper/Placeholder/Container.php diff --git a/lib/Zend/View/Helper/Placeholder/Container/Abstract.php b/lib/internal/Zend/View/Helper/Placeholder/Container/Abstract.php similarity index 100% rename from lib/Zend/View/Helper/Placeholder/Container/Abstract.php rename to lib/internal/Zend/View/Helper/Placeholder/Container/Abstract.php diff --git a/lib/Zend/View/Helper/Placeholder/Container/Exception.php b/lib/internal/Zend/View/Helper/Placeholder/Container/Exception.php similarity index 100% rename from lib/Zend/View/Helper/Placeholder/Container/Exception.php rename to lib/internal/Zend/View/Helper/Placeholder/Container/Exception.php diff --git a/lib/Zend/View/Helper/Placeholder/Container/Standalone.php b/lib/internal/Zend/View/Helper/Placeholder/Container/Standalone.php similarity index 100% rename from lib/Zend/View/Helper/Placeholder/Container/Standalone.php rename to lib/internal/Zend/View/Helper/Placeholder/Container/Standalone.php diff --git a/lib/Zend/View/Helper/Placeholder/Registry.php b/lib/internal/Zend/View/Helper/Placeholder/Registry.php similarity index 100% rename from lib/Zend/View/Helper/Placeholder/Registry.php rename to lib/internal/Zend/View/Helper/Placeholder/Registry.php diff --git a/lib/Zend/View/Helper/Placeholder/Registry/Exception.php b/lib/internal/Zend/View/Helper/Placeholder/Registry/Exception.php similarity index 100% rename from lib/Zend/View/Helper/Placeholder/Registry/Exception.php rename to lib/internal/Zend/View/Helper/Placeholder/Registry/Exception.php diff --git a/lib/Zend/View/Helper/RenderToPlaceholder.php b/lib/internal/Zend/View/Helper/RenderToPlaceholder.php similarity index 100% rename from lib/Zend/View/Helper/RenderToPlaceholder.php rename to lib/internal/Zend/View/Helper/RenderToPlaceholder.php diff --git a/lib/Zend/View/Helper/ServerUrl.php b/lib/internal/Zend/View/Helper/ServerUrl.php similarity index 100% rename from lib/Zend/View/Helper/ServerUrl.php rename to lib/internal/Zend/View/Helper/ServerUrl.php diff --git a/lib/Zend/View/Helper/TinySrc.php b/lib/internal/Zend/View/Helper/TinySrc.php similarity index 100% rename from lib/Zend/View/Helper/TinySrc.php rename to lib/internal/Zend/View/Helper/TinySrc.php diff --git a/lib/Zend/View/Helper/Translate.php b/lib/internal/Zend/View/Helper/Translate.php similarity index 100% rename from lib/Zend/View/Helper/Translate.php rename to lib/internal/Zend/View/Helper/Translate.php diff --git a/lib/Zend/View/Helper/Url.php b/lib/internal/Zend/View/Helper/Url.php similarity index 100% rename from lib/Zend/View/Helper/Url.php rename to lib/internal/Zend/View/Helper/Url.php diff --git a/lib/Zend/View/Helper/UserAgent.php b/lib/internal/Zend/View/Helper/UserAgent.php similarity index 100% rename from lib/Zend/View/Helper/UserAgent.php rename to lib/internal/Zend/View/Helper/UserAgent.php diff --git a/lib/Zend/View/Interface.php b/lib/internal/Zend/View/Interface.php similarity index 100% rename from lib/Zend/View/Interface.php rename to lib/internal/Zend/View/Interface.php diff --git a/lib/Zend/View/Stream.php b/lib/internal/Zend/View/Stream.php similarity index 100% rename from lib/Zend/View/Stream.php rename to lib/internal/Zend/View/Stream.php diff --git a/lib/Zend/Wildfire/Channel/HttpHeaders.php b/lib/internal/Zend/Wildfire/Channel/HttpHeaders.php similarity index 100% rename from lib/Zend/Wildfire/Channel/HttpHeaders.php rename to lib/internal/Zend/Wildfire/Channel/HttpHeaders.php diff --git a/lib/Zend/Wildfire/Channel/Interface.php b/lib/internal/Zend/Wildfire/Channel/Interface.php similarity index 100% rename from lib/Zend/Wildfire/Channel/Interface.php rename to lib/internal/Zend/Wildfire/Channel/Interface.php diff --git a/lib/Zend/Wildfire/Exception.php b/lib/internal/Zend/Wildfire/Exception.php similarity index 100% rename from lib/Zend/Wildfire/Exception.php rename to lib/internal/Zend/Wildfire/Exception.php diff --git a/lib/Zend/Wildfire/Plugin/FirePhp.php b/lib/internal/Zend/Wildfire/Plugin/FirePhp.php similarity index 100% rename from lib/Zend/Wildfire/Plugin/FirePhp.php rename to lib/internal/Zend/Wildfire/Plugin/FirePhp.php diff --git a/lib/Zend/Wildfire/Plugin/FirePhp/Message.php b/lib/internal/Zend/Wildfire/Plugin/FirePhp/Message.php similarity index 100% rename from lib/Zend/Wildfire/Plugin/FirePhp/Message.php rename to lib/internal/Zend/Wildfire/Plugin/FirePhp/Message.php diff --git a/lib/Zend/Wildfire/Plugin/FirePhp/TableMessage.php b/lib/internal/Zend/Wildfire/Plugin/FirePhp/TableMessage.php similarity index 100% rename from lib/Zend/Wildfire/Plugin/FirePhp/TableMessage.php rename to lib/internal/Zend/Wildfire/Plugin/FirePhp/TableMessage.php diff --git a/lib/Zend/Wildfire/Plugin/Interface.php b/lib/internal/Zend/Wildfire/Plugin/Interface.php similarity index 100% rename from lib/Zend/Wildfire/Plugin/Interface.php rename to lib/internal/Zend/Wildfire/Plugin/Interface.php diff --git a/lib/Zend/Wildfire/Protocol/JsonStream.php b/lib/internal/Zend/Wildfire/Protocol/JsonStream.php similarity index 100% rename from lib/Zend/Wildfire/Protocol/JsonStream.php rename to lib/internal/Zend/Wildfire/Protocol/JsonStream.php diff --git a/lib/Zend/XmlRpc/Client.php b/lib/internal/Zend/XmlRpc/Client.php similarity index 100% rename from lib/Zend/XmlRpc/Client.php rename to lib/internal/Zend/XmlRpc/Client.php diff --git a/lib/Zend/XmlRpc/Client/Exception.php b/lib/internal/Zend/XmlRpc/Client/Exception.php similarity index 100% rename from lib/Zend/XmlRpc/Client/Exception.php rename to lib/internal/Zend/XmlRpc/Client/Exception.php diff --git a/lib/Zend/XmlRpc/Client/FaultException.php b/lib/internal/Zend/XmlRpc/Client/FaultException.php similarity index 100% rename from lib/Zend/XmlRpc/Client/FaultException.php rename to lib/internal/Zend/XmlRpc/Client/FaultException.php diff --git a/lib/Zend/XmlRpc/Client/HttpException.php b/lib/internal/Zend/XmlRpc/Client/HttpException.php similarity index 100% rename from lib/Zend/XmlRpc/Client/HttpException.php rename to lib/internal/Zend/XmlRpc/Client/HttpException.php diff --git a/lib/Zend/XmlRpc/Client/IntrospectException.php b/lib/internal/Zend/XmlRpc/Client/IntrospectException.php similarity index 100% rename from lib/Zend/XmlRpc/Client/IntrospectException.php rename to lib/internal/Zend/XmlRpc/Client/IntrospectException.php diff --git a/lib/Zend/XmlRpc/Client/ServerIntrospection.php b/lib/internal/Zend/XmlRpc/Client/ServerIntrospection.php similarity index 100% rename from lib/Zend/XmlRpc/Client/ServerIntrospection.php rename to lib/internal/Zend/XmlRpc/Client/ServerIntrospection.php diff --git a/lib/Zend/XmlRpc/Client/ServerProxy.php b/lib/internal/Zend/XmlRpc/Client/ServerProxy.php similarity index 100% rename from lib/Zend/XmlRpc/Client/ServerProxy.php rename to lib/internal/Zend/XmlRpc/Client/ServerProxy.php diff --git a/lib/Zend/XmlRpc/Exception.php b/lib/internal/Zend/XmlRpc/Exception.php similarity index 100% rename from lib/Zend/XmlRpc/Exception.php rename to lib/internal/Zend/XmlRpc/Exception.php diff --git a/lib/Zend/XmlRpc/Fault.php b/lib/internal/Zend/XmlRpc/Fault.php similarity index 100% rename from lib/Zend/XmlRpc/Fault.php rename to lib/internal/Zend/XmlRpc/Fault.php diff --git a/lib/Zend/XmlRpc/Generator/DomDocument.php b/lib/internal/Zend/XmlRpc/Generator/DomDocument.php similarity index 100% rename from lib/Zend/XmlRpc/Generator/DomDocument.php rename to lib/internal/Zend/XmlRpc/Generator/DomDocument.php diff --git a/lib/Zend/XmlRpc/Generator/GeneratorAbstract.php b/lib/internal/Zend/XmlRpc/Generator/GeneratorAbstract.php similarity index 100% rename from lib/Zend/XmlRpc/Generator/GeneratorAbstract.php rename to lib/internal/Zend/XmlRpc/Generator/GeneratorAbstract.php diff --git a/lib/Zend/XmlRpc/Generator/XmlWriter.php b/lib/internal/Zend/XmlRpc/Generator/XmlWriter.php similarity index 100% rename from lib/Zend/XmlRpc/Generator/XmlWriter.php rename to lib/internal/Zend/XmlRpc/Generator/XmlWriter.php diff --git a/lib/Zend/XmlRpc/Request.php b/lib/internal/Zend/XmlRpc/Request.php similarity index 100% rename from lib/Zend/XmlRpc/Request.php rename to lib/internal/Zend/XmlRpc/Request.php diff --git a/lib/Zend/XmlRpc/Request/Http.php b/lib/internal/Zend/XmlRpc/Request/Http.php similarity index 100% rename from lib/Zend/XmlRpc/Request/Http.php rename to lib/internal/Zend/XmlRpc/Request/Http.php diff --git a/lib/Zend/XmlRpc/Request/Stdin.php b/lib/internal/Zend/XmlRpc/Request/Stdin.php similarity index 100% rename from lib/Zend/XmlRpc/Request/Stdin.php rename to lib/internal/Zend/XmlRpc/Request/Stdin.php diff --git a/lib/Zend/XmlRpc/Response.php b/lib/internal/Zend/XmlRpc/Response.php similarity index 100% rename from lib/Zend/XmlRpc/Response.php rename to lib/internal/Zend/XmlRpc/Response.php diff --git a/lib/Zend/XmlRpc/Response/Http.php b/lib/internal/Zend/XmlRpc/Response/Http.php similarity index 100% rename from lib/Zend/XmlRpc/Response/Http.php rename to lib/internal/Zend/XmlRpc/Response/Http.php diff --git a/lib/Zend/XmlRpc/Server.php b/lib/internal/Zend/XmlRpc/Server.php similarity index 100% rename from lib/Zend/XmlRpc/Server.php rename to lib/internal/Zend/XmlRpc/Server.php diff --git a/lib/Zend/XmlRpc/Server/Cache.php b/lib/internal/Zend/XmlRpc/Server/Cache.php similarity index 100% rename from lib/Zend/XmlRpc/Server/Cache.php rename to lib/internal/Zend/XmlRpc/Server/Cache.php diff --git a/lib/Zend/XmlRpc/Server/Exception.php b/lib/internal/Zend/XmlRpc/Server/Exception.php similarity index 100% rename from lib/Zend/XmlRpc/Server/Exception.php rename to lib/internal/Zend/XmlRpc/Server/Exception.php diff --git a/lib/Zend/XmlRpc/Server/Fault.php b/lib/internal/Zend/XmlRpc/Server/Fault.php similarity index 100% rename from lib/Zend/XmlRpc/Server/Fault.php rename to lib/internal/Zend/XmlRpc/Server/Fault.php diff --git a/lib/Zend/XmlRpc/Server/System.php b/lib/internal/Zend/XmlRpc/Server/System.php similarity index 100% rename from lib/Zend/XmlRpc/Server/System.php rename to lib/internal/Zend/XmlRpc/Server/System.php diff --git a/lib/Zend/XmlRpc/Value.php b/lib/internal/Zend/XmlRpc/Value.php similarity index 100% rename from lib/Zend/XmlRpc/Value.php rename to lib/internal/Zend/XmlRpc/Value.php diff --git a/lib/Zend/XmlRpc/Value/Array.php b/lib/internal/Zend/XmlRpc/Value/Array.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Array.php rename to lib/internal/Zend/XmlRpc/Value/Array.php diff --git a/lib/Zend/XmlRpc/Value/Base64.php b/lib/internal/Zend/XmlRpc/Value/Base64.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Base64.php rename to lib/internal/Zend/XmlRpc/Value/Base64.php diff --git a/lib/Zend/XmlRpc/Value/BigInteger.php b/lib/internal/Zend/XmlRpc/Value/BigInteger.php similarity index 100% rename from lib/Zend/XmlRpc/Value/BigInteger.php rename to lib/internal/Zend/XmlRpc/Value/BigInteger.php diff --git a/lib/Zend/XmlRpc/Value/Boolean.php b/lib/internal/Zend/XmlRpc/Value/Boolean.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Boolean.php rename to lib/internal/Zend/XmlRpc/Value/Boolean.php diff --git a/lib/Zend/XmlRpc/Value/Collection.php b/lib/internal/Zend/XmlRpc/Value/Collection.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Collection.php rename to lib/internal/Zend/XmlRpc/Value/Collection.php diff --git a/lib/Zend/XmlRpc/Value/DateTime.php b/lib/internal/Zend/XmlRpc/Value/DateTime.php similarity index 100% rename from lib/Zend/XmlRpc/Value/DateTime.php rename to lib/internal/Zend/XmlRpc/Value/DateTime.php diff --git a/lib/Zend/XmlRpc/Value/Double.php b/lib/internal/Zend/XmlRpc/Value/Double.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Double.php rename to lib/internal/Zend/XmlRpc/Value/Double.php diff --git a/lib/Zend/XmlRpc/Value/Exception.php b/lib/internal/Zend/XmlRpc/Value/Exception.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Exception.php rename to lib/internal/Zend/XmlRpc/Value/Exception.php diff --git a/lib/Zend/XmlRpc/Value/Integer.php b/lib/internal/Zend/XmlRpc/Value/Integer.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Integer.php rename to lib/internal/Zend/XmlRpc/Value/Integer.php diff --git a/lib/Zend/XmlRpc/Value/Nil.php b/lib/internal/Zend/XmlRpc/Value/Nil.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Nil.php rename to lib/internal/Zend/XmlRpc/Value/Nil.php diff --git a/lib/Zend/XmlRpc/Value/Scalar.php b/lib/internal/Zend/XmlRpc/Value/Scalar.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Scalar.php rename to lib/internal/Zend/XmlRpc/Value/Scalar.php diff --git a/lib/Zend/XmlRpc/Value/String.php b/lib/internal/Zend/XmlRpc/Value/String.php similarity index 100% rename from lib/Zend/XmlRpc/Value/String.php rename to lib/internal/Zend/XmlRpc/Value/String.php diff --git a/lib/Zend/XmlRpc/Value/Struct.php b/lib/internal/Zend/XmlRpc/Value/Struct.php similarity index 100% rename from lib/Zend/XmlRpc/Value/Struct.php rename to lib/internal/Zend/XmlRpc/Value/Struct.php diff --git a/lib/Zend/replace_recursive.php b/lib/internal/Zend/replace_recursive.php similarity index 100% rename from lib/Zend/replace_recursive.php rename to lib/internal/Zend/replace_recursive.php diff --git a/lib/phpseclib/Crypt/AES.php b/lib/internal/phpseclib/Crypt/AES.php similarity index 100% rename from lib/phpseclib/Crypt/AES.php rename to lib/internal/phpseclib/Crypt/AES.php diff --git a/lib/phpseclib/Crypt/DES.php b/lib/internal/phpseclib/Crypt/DES.php similarity index 100% rename from lib/phpseclib/Crypt/DES.php rename to lib/internal/phpseclib/Crypt/DES.php diff --git a/lib/phpseclib/Crypt/Hash.php b/lib/internal/phpseclib/Crypt/Hash.php similarity index 100% rename from lib/phpseclib/Crypt/Hash.php rename to lib/internal/phpseclib/Crypt/Hash.php diff --git a/lib/phpseclib/Crypt/RC4.php b/lib/internal/phpseclib/Crypt/RC4.php similarity index 100% rename from lib/phpseclib/Crypt/RC4.php rename to lib/internal/phpseclib/Crypt/RC4.php diff --git a/lib/phpseclib/Crypt/RSA.php b/lib/internal/phpseclib/Crypt/RSA.php similarity index 100% rename from lib/phpseclib/Crypt/RSA.php rename to lib/internal/phpseclib/Crypt/RSA.php diff --git a/lib/phpseclib/Crypt/Random.php b/lib/internal/phpseclib/Crypt/Random.php similarity index 100% rename from lib/phpseclib/Crypt/Random.php rename to lib/internal/phpseclib/Crypt/Random.php diff --git a/lib/phpseclib/Crypt/Rijndael.php b/lib/internal/phpseclib/Crypt/Rijndael.php similarity index 100% rename from lib/phpseclib/Crypt/Rijndael.php rename to lib/internal/phpseclib/Crypt/Rijndael.php diff --git a/lib/phpseclib/Crypt/TripleDES.php b/lib/internal/phpseclib/Crypt/TripleDES.php similarity index 100% rename from lib/phpseclib/Crypt/TripleDES.php rename to lib/internal/phpseclib/Crypt/TripleDES.php diff --git a/lib/phpseclib/Math/BigInteger.php b/lib/internal/phpseclib/Math/BigInteger.php similarity index 100% rename from lib/phpseclib/Math/BigInteger.php rename to lib/internal/phpseclib/Math/BigInteger.php diff --git a/lib/phpseclib/Net/SFTP.php b/lib/internal/phpseclib/Net/SFTP.php similarity index 100% rename from lib/phpseclib/Net/SFTP.php rename to lib/internal/phpseclib/Net/SFTP.php diff --git a/lib/phpseclib/Net/SSH1.php b/lib/internal/phpseclib/Net/SSH1.php similarity index 100% rename from lib/phpseclib/Net/SSH1.php rename to lib/internal/phpseclib/Net/SSH1.php diff --git a/lib/phpseclib/Net/SSH2.php b/lib/internal/phpseclib/Net/SSH2.php similarity index 100% rename from lib/phpseclib/Net/SSH2.php rename to lib/internal/phpseclib/Net/SSH2.php diff --git a/lib/phpseclib/PHP/Compat/Function/array_fill.php b/lib/internal/phpseclib/PHP/Compat/Function/array_fill.php similarity index 100% rename from lib/phpseclib/PHP/Compat/Function/array_fill.php rename to lib/internal/phpseclib/PHP/Compat/Function/array_fill.php diff --git a/lib/phpseclib/PHP/Compat/Function/bcpowmod.php b/lib/internal/phpseclib/PHP/Compat/Function/bcpowmod.php similarity index 100% rename from lib/phpseclib/PHP/Compat/Function/bcpowmod.php rename to lib/internal/phpseclib/PHP/Compat/Function/bcpowmod.php diff --git a/lib/phpseclib/PHP/Compat/Function/str_split.php b/lib/internal/phpseclib/PHP/Compat/Function/str_split.php similarity index 100% rename from lib/phpseclib/PHP/Compat/Function/str_split.php rename to lib/internal/phpseclib/PHP/Compat/Function/str_split.php diff --git a/pub/lib/blank.html b/lib/web/blank.html similarity index 100% rename from pub/lib/blank.html rename to lib/web/blank.html diff --git a/pub/lib/css/docs/actions-toolbar.html b/lib/web/css/docs/actions-toolbar.html similarity index 100% rename from pub/lib/css/docs/actions-toolbar.html rename to lib/web/css/docs/actions-toolbar.html diff --git a/pub/lib/css/docs/breadcrumbs.html b/lib/web/css/docs/breadcrumbs.html similarity index 100% rename from pub/lib/css/docs/breadcrumbs.html rename to lib/web/css/docs/breadcrumbs.html diff --git a/pub/lib/css/docs/buttons.html b/lib/web/css/docs/buttons.html similarity index 100% rename from pub/lib/css/docs/buttons.html rename to lib/web/css/docs/buttons.html diff --git a/pub/lib/css/docs/docs.css b/lib/web/css/docs/docs.css similarity index 100% rename from pub/lib/css/docs/docs.css rename to lib/web/css/docs/docs.css diff --git a/pub/lib/css/docs/docs.html b/lib/web/css/docs/docs.html similarity index 100% rename from pub/lib/css/docs/docs.html rename to lib/web/css/docs/docs.html diff --git a/pub/lib/css/docs/dropdowns.html b/lib/web/css/docs/dropdowns.html similarity index 100% rename from pub/lib/css/docs/dropdowns.html rename to lib/web/css/docs/dropdowns.html diff --git a/pub/lib/css/docs/forms.html b/lib/web/css/docs/forms.html similarity index 100% rename from pub/lib/css/docs/forms.html rename to lib/web/css/docs/forms.html diff --git a/pub/lib/css/docs/icons.html b/lib/web/css/docs/icons.html similarity index 100% rename from pub/lib/css/docs/icons.html rename to lib/web/css/docs/icons.html diff --git a/pub/lib/css/docs/index.html b/lib/web/css/docs/index.html similarity index 100% rename from pub/lib/css/docs/index.html rename to lib/web/css/docs/index.html diff --git a/pub/lib/css/docs/layout.html b/lib/web/css/docs/layout.html similarity index 100% rename from pub/lib/css/docs/layout.html rename to lib/web/css/docs/layout.html diff --git a/pub/lib/css/docs/lib.html b/lib/web/css/docs/lib.html similarity index 100% rename from pub/lib/css/docs/lib.html rename to lib/web/css/docs/lib.html diff --git a/pub/lib/css/docs/loaders.html b/lib/web/css/docs/loaders.html similarity index 100% rename from pub/lib/css/docs/loaders.html rename to lib/web/css/docs/loaders.html diff --git a/pub/lib/css/docs/messages.html b/lib/web/css/docs/messages.html similarity index 100% rename from pub/lib/css/docs/messages.html rename to lib/web/css/docs/messages.html diff --git a/pub/lib/css/docs/navigation.html b/lib/web/css/docs/navigation.html similarity index 100% rename from pub/lib/css/docs/navigation.html rename to lib/web/css/docs/navigation.html diff --git a/pub/lib/css/docs/pages.html b/lib/web/css/docs/pages.html similarity index 100% rename from pub/lib/css/docs/pages.html rename to lib/web/css/docs/pages.html diff --git a/pub/lib/css/docs/popups.html b/lib/web/css/docs/popups.html similarity index 100% rename from pub/lib/css/docs/popups.html rename to lib/web/css/docs/popups.html diff --git a/pub/lib/css/docs/rating.html b/lib/web/css/docs/rating.html similarity index 100% rename from pub/lib/css/docs/rating.html rename to lib/web/css/docs/rating.html diff --git a/pub/lib/css/docs/resets.html b/lib/web/css/docs/resets.html similarity index 100% rename from pub/lib/css/docs/resets.html rename to lib/web/css/docs/resets.html diff --git a/pub/lib/css/docs/sections.html b/lib/web/css/docs/sections.html similarity index 100% rename from pub/lib/css/docs/sections.html rename to lib/web/css/docs/sections.html diff --git a/pub/lib/css/docs/source/README.md b/lib/web/css/docs/source/README.md similarity index 100% rename from pub/lib/css/docs/source/README.md rename to lib/web/css/docs/source/README.md diff --git a/pub/lib/css/docs/source/actions-toolbar.less b/lib/web/css/docs/source/actions-toolbar.less similarity index 100% rename from pub/lib/css/docs/source/actions-toolbar.less rename to lib/web/css/docs/source/actions-toolbar.less diff --git a/pub/lib/css/docs/source/breadcrumbs.less b/lib/web/css/docs/source/breadcrumbs.less similarity index 100% rename from pub/lib/css/docs/source/breadcrumbs.less rename to lib/web/css/docs/source/breadcrumbs.less diff --git a/pub/lib/css/docs/source/buttons.less b/lib/web/css/docs/source/buttons.less similarity index 100% rename from pub/lib/css/docs/source/buttons.less rename to lib/web/css/docs/source/buttons.less diff --git a/pub/lib/css/docs/source/docs.less b/lib/web/css/docs/source/docs.less similarity index 100% rename from pub/lib/css/docs/source/docs.less rename to lib/web/css/docs/source/docs.less diff --git a/pub/lib/css/docs/source/dropdowns.less b/lib/web/css/docs/source/dropdowns.less similarity index 100% rename from pub/lib/css/docs/source/dropdowns.less rename to lib/web/css/docs/source/dropdowns.less diff --git a/pub/lib/css/docs/source/forms.less b/lib/web/css/docs/source/forms.less similarity index 100% rename from pub/lib/css/docs/source/forms.less rename to lib/web/css/docs/source/forms.less diff --git a/pub/lib/css/docs/source/icons.less b/lib/web/css/docs/source/icons.less similarity index 100% rename from pub/lib/css/docs/source/icons.less rename to lib/web/css/docs/source/icons.less diff --git a/pub/lib/css/docs/source/layout.less b/lib/web/css/docs/source/layout.less similarity index 100% rename from pub/lib/css/docs/source/layout.less rename to lib/web/css/docs/source/layout.less diff --git a/pub/lib/css/docs/source/lib.less b/lib/web/css/docs/source/lib.less similarity index 100% rename from pub/lib/css/docs/source/lib.less rename to lib/web/css/docs/source/lib.less diff --git a/pub/lib/css/docs/source/loaders.less b/lib/web/css/docs/source/loaders.less similarity index 100% rename from pub/lib/css/docs/source/loaders.less rename to lib/web/css/docs/source/loaders.less diff --git a/pub/lib/css/docs/source/messages.less b/lib/web/css/docs/source/messages.less similarity index 100% rename from pub/lib/css/docs/source/messages.less rename to lib/web/css/docs/source/messages.less diff --git a/pub/lib/css/docs/source/navigation.less b/lib/web/css/docs/source/navigation.less similarity index 100% rename from pub/lib/css/docs/source/navigation.less rename to lib/web/css/docs/source/navigation.less diff --git a/pub/lib/css/docs/source/pages.less b/lib/web/css/docs/source/pages.less similarity index 100% rename from pub/lib/css/docs/source/pages.less rename to lib/web/css/docs/source/pages.less diff --git a/pub/lib/css/docs/source/popups.less b/lib/web/css/docs/source/popups.less similarity index 100% rename from pub/lib/css/docs/source/popups.less rename to lib/web/css/docs/source/popups.less diff --git a/pub/lib/css/docs/source/rating.less b/lib/web/css/docs/source/rating.less similarity index 100% rename from pub/lib/css/docs/source/rating.less rename to lib/web/css/docs/source/rating.less diff --git a/pub/lib/css/docs/source/resets.less b/lib/web/css/docs/source/resets.less similarity index 100% rename from pub/lib/css/docs/source/resets.less rename to lib/web/css/docs/source/resets.less diff --git a/pub/lib/css/docs/source/sections.less b/lib/web/css/docs/source/sections.less similarity index 100% rename from pub/lib/css/docs/source/sections.less rename to lib/web/css/docs/source/sections.less diff --git a/pub/lib/css/docs/source/tables.less b/lib/web/css/docs/source/tables.less similarity index 100% rename from pub/lib/css/docs/source/tables.less rename to lib/web/css/docs/source/tables.less diff --git a/pub/lib/css/docs/source/tooltips.less b/lib/web/css/docs/source/tooltips.less similarity index 100% rename from pub/lib/css/docs/source/tooltips.less rename to lib/web/css/docs/source/tooltips.less diff --git a/pub/lib/css/docs/source/typography.less b/lib/web/css/docs/source/typography.less similarity index 100% rename from pub/lib/css/docs/source/typography.less rename to lib/web/css/docs/source/typography.less diff --git a/pub/lib/css/docs/source/variables.less b/lib/web/css/docs/source/variables.less similarity index 100% rename from pub/lib/css/docs/source/variables.less rename to lib/web/css/docs/source/variables.less diff --git a/pub/lib/css/docs/tables.html b/lib/web/css/docs/tables.html similarity index 100% rename from pub/lib/css/docs/tables.html rename to lib/web/css/docs/tables.html diff --git a/pub/lib/css/docs/tooltips.html b/lib/web/css/docs/tooltips.html similarity index 100% rename from pub/lib/css/docs/tooltips.html rename to lib/web/css/docs/tooltips.html diff --git a/pub/lib/css/docs/typography.html b/lib/web/css/docs/typography.html similarity index 100% rename from pub/lib/css/docs/typography.html rename to lib/web/css/docs/typography.html diff --git a/pub/lib/css/docs/variables.html b/lib/web/css/docs/variables.html similarity index 100% rename from pub/lib/css/docs/variables.html rename to lib/web/css/docs/variables.html diff --git a/pub/lib/css/source/extend.less b/lib/web/css/source/extend.less similarity index 100% rename from pub/lib/css/source/extend.less rename to lib/web/css/source/extend.less diff --git a/pub/lib/css/source/lib/abstract.less b/lib/web/css/source/lib/abstract.less similarity index 100% rename from pub/lib/css/source/lib/abstract.less rename to lib/web/css/source/lib/abstract.less diff --git a/pub/lib/css/source/lib/actions-toolbar.less b/lib/web/css/source/lib/actions-toolbar.less similarity index 100% rename from pub/lib/css/source/lib/actions-toolbar.less rename to lib/web/css/source/lib/actions-toolbar.less diff --git a/pub/lib/css/source/lib/breadcrumbs.less b/lib/web/css/source/lib/breadcrumbs.less similarity index 100% rename from pub/lib/css/source/lib/breadcrumbs.less rename to lib/web/css/source/lib/breadcrumbs.less diff --git a/pub/lib/css/source/lib/buttons.less b/lib/web/css/source/lib/buttons.less similarity index 100% rename from pub/lib/css/source/lib/buttons.less rename to lib/web/css/source/lib/buttons.less diff --git a/pub/lib/css/source/lib/dropdowns.less b/lib/web/css/source/lib/dropdowns.less similarity index 100% rename from pub/lib/css/source/lib/dropdowns.less rename to lib/web/css/source/lib/dropdowns.less diff --git a/pub/lib/css/source/lib/forms.less b/lib/web/css/source/lib/forms.less similarity index 100% rename from pub/lib/css/source/lib/forms.less rename to lib/web/css/source/lib/forms.less diff --git a/pub/lib/css/source/lib/grids.less b/lib/web/css/source/lib/grids.less similarity index 100% rename from pub/lib/css/source/lib/grids.less rename to lib/web/css/source/lib/grids.less diff --git a/pub/lib/css/source/lib/icons.less b/lib/web/css/source/lib/icons.less similarity index 100% rename from pub/lib/css/source/lib/icons.less rename to lib/web/css/source/lib/icons.less diff --git a/pub/lib/css/source/lib/layout.less b/lib/web/css/source/lib/layout.less similarity index 100% rename from pub/lib/css/source/lib/layout.less rename to lib/web/css/source/lib/layout.less diff --git a/pub/lib/css/source/lib/lib.less b/lib/web/css/source/lib/lib.less similarity index 100% rename from pub/lib/css/source/lib/lib.less rename to lib/web/css/source/lib/lib.less diff --git a/pub/lib/css/source/lib/loaders.less b/lib/web/css/source/lib/loaders.less similarity index 96% rename from pub/lib/css/source/lib/loaders.less rename to lib/web/css/source/lib/loaders.less index 77fea232468ca779955c2fbb43568cf3b3d3ddc6..02ca2df5b96013d49fe5e63d8884818d0d7a0a0f 100644 --- a/pub/lib/css/source/lib/loaders.less +++ b/lib/web/css/source/lib/loaders.less @@ -103,3 +103,12 @@ background-repeat: no-repeat; } } + +.loading-mask() { + bottom: 0; + left: 0; + margin: auto; + position: absolute; + right: 0; + top: 0; +} diff --git a/pub/lib/css/source/lib/messages.less b/lib/web/css/source/lib/messages.less similarity index 100% rename from pub/lib/css/source/lib/messages.less rename to lib/web/css/source/lib/messages.less diff --git a/pub/lib/css/source/lib/navigation.less b/lib/web/css/source/lib/navigation.less similarity index 88% rename from pub/lib/css/source/lib/navigation.less rename to lib/web/css/source/lib/navigation.less index bfe5101b5c140a6ad332929acc150b3e7f251889..fbdb96fed5f5731f23501632baa9e2bb33e50409 100644 --- a/pub/lib/css/source/lib/navigation.less +++ b/lib/web/css/source/lib/navigation.less @@ -63,57 +63,52 @@ .css(background, @_nav-bg); .css(border, @_nav-border); display: block; - height: 100%; left: -86%; + top: 180px; overflow: auto; position: absolute; width: 86%; + padding: 10px 0px; .box-sizing(); ul { margin: 0; padding: 0; } - .nav { - .transition(left .3s linear 0); - overflow: hidden; - a, - a:hover { - .css(color, @_nav-level0-item-color); - .css(text-decoration, @_nav-level0-item-text-decoration); + a, + a:hover { + .css(color, @_nav-level0-item-color); + .css(text-decoration, @_nav-level0-item-text-decoration); + } + .level0 { + .font-size(@_nav-level0-font-size); + .css(border-top, @_nav-level0-item-border); + margin: 0; + > .level-top { + .css(background, @_nav-level0-item-bg); + .css(font-weight, @_nav-level0-font-weight); + .css(line-height, @_nav-level0-item-line-height); + .css(padding, @_nav-level0-item-padding); + .css(text-transform, @_nav-level0-text-transform); + display: block; } - > .level0 { - .font-size(@_nav-level0-font-size); - .css(border-top, @_nav-level0-item-border); - margin: 0; - > .level-top { - .css(background, @_nav-level0-item-bg); - .css(font-weight, @_nav-level0-font-weight); - .css(line-height, @_nav-level0-item-line-height); - .css(padding, @_nav-level0-item-padding); - .css(text-transform, @_nav-level0-text-transform); - display: block; - } - &.active > a { - .css(background, @_nav-level0-item-bg-active); - .css(border, @_nav-level0-item-border-active); - .css(color, @_nav-level0-item-color-active); - .css(text-decoration, @_nav-level0-item-text-decoration-active); - } + &.active > a { + .css(background, @_nav-level0-item-bg-active); + .css(border, @_nav-level0-item-border-active); + .css(color, @_nav-level0-item-color-active); + .css(text-decoration, @_nav-level0-item-text-decoration-active); } } - .submenu { + .ui-menu:not(:first-child) { .css(background, @_submenu-bg); .css(border, @_submenu-border); .css(font-size, @_submenu-font-size); .css(font-weight, @_submenu-font-weight); - display: none; overflow-x: hidden; position: relative; .transition(left .3s ease-out 0); - width: 100%; - &.opened { - display: block; - } + top: auto !important; + left: auto !important; + padding: 10px 20px; > ul { display: block; .css(padding, @_submenu-padding); @@ -130,6 +125,10 @@ } } } + &.expanded { + display: block !important; + top: 0 !important; + } .active > a { .css(background, @_submenu-item-bg-active); .css(border, @_submenu-item-border-active); @@ -208,8 +207,10 @@ left: auto; overflow: inherit; position: relative; + top: 0; width: 100%; - z-index: 2; + z-index: 3; + padding: 0; &:empty { display: none; } @@ -219,10 +220,14 @@ padding: 0; position: relative; } + li.level0 { + .css(border-top, none); + } .level0 { display: inline-block; position: relative; .css(margin, @_nav-level0-item-margin); + &:last-child { margin-right: 0; padding-right: 0; @@ -236,7 +241,7 @@ .css(padding, @_nav-level0-item-padding); .css(text-decoration, @_nav-level0-item-text-decoration); position: relative; - &:hover { + &:hover, &.ui-state-focus { .css(background, @_nav-level0-item-bg-hover); .css(border, @_nav-level0-item-border-hover); .css(color, @_nav-level0-item-color-hover); @@ -254,15 +259,20 @@ &.parent:hover > .submenu { overflow: visible !important; } - > .submenu { + > .ui-menu { .css(font-size, @_submenu-font-size); .css(font-weight, @_submenu-font-weight); - display: none; left: 0; .css(min-width, @_submenu-min-width); position: absolute; + padding: 0; + margin: 0 !important; top: 100%; z-index: 1; + .css(background, @_submenu-bg); + .css(border, @_submenu-border-width @_submenu-border-style @_submenu-border-color); + .css(box-shadow, @_submenu-box-shadow); + .css(padding, @_submenu-padding); ._submenu-arrow( @_submenu-arrow, @_bg: @_submenu-bg, @@ -270,12 +280,6 @@ @_size: @_submenu-arrow-size, @_left: @_submenu-arrow-left ); - > ul { - .css(background, @_submenu-bg); - .css(border, @_submenu-border-width @_submenu-border-style @_submenu-border-color); - .css(box-shadow, @_submenu-box-shadow); - .css(padding, @_submenu-padding); - } a { display: block; line-height: inherit; @@ -284,7 +288,7 @@ .css(color, @_submenu-item-color); .css(padding, @_submenu-item-padding); .css(text-decoration, @_submenu-item-text-decoration); - &:hover { + &:hover, &.ui-state-focus { .css(background, @_submenu-item-bg-hover); .css(border, @_submenu-item-border-hover); .css(color, @_submenu-item-color-hover); @@ -297,9 +301,6 @@ .css(color, @_submenu-item-color-active); .css(text-decoration, @_submenu-item-text-decoration-active); } - .submenu { - display: block; - } } &.more { position: relative; diff --git a/pub/lib/css/source/lib/pages.less b/lib/web/css/source/lib/pages.less similarity index 100% rename from pub/lib/css/source/lib/pages.less rename to lib/web/css/source/lib/pages.less diff --git a/pub/lib/css/source/lib/popups.less b/lib/web/css/source/lib/popups.less similarity index 91% rename from pub/lib/css/source/lib/popups.less rename to lib/web/css/source/lib/popups.less index 9ba2dffa404bf57c1d37707c98267b1fb2af20a2..147e79b2601c4c7bc9ca5401287336dbba84cfcf 100644 --- a/pub/lib/css/source/lib/popups.less +++ b/lib/web/css/source/lib/popups.less @@ -397,3 +397,39 @@ ) when (@_popup-button-close-reset = true) { .button-reset(); } +// Popup working with dropdown dialog +.ui-dialog.popup { + width: 420px; + .map.popup { + top: auto; + left: auto; + padding: 22px; + } + .action.close { + position: @popup-button-close-position; + ._popup-button-close-icon( + @popup-button-close-icon, + @popup-icon-font-content, + @popup-icon-font, + @popup-icon-font-size, + @popup-icon-font-line-height, + @popup-icon-font-color, + @popup-icon-font-color-hover, + @popup-icon-font-color-active, + @popup-icon-font-margin, + @popup-icon-font-vertical-align, + @popup-icon-font-position, + @popup-icon-font-text-hide + ); + ._popup-button-close-reset( + @popup-button-close-reset + ); + ._popup-position( + @popup-button-close-position-top, + @popup-button-close-position-bottom, + @popup-button-close-position-left, + @popup-button-close-position-right + ); + z-index: 1001; + } +} diff --git a/pub/lib/css/source/lib/rating.less b/lib/web/css/source/lib/rating.less similarity index 100% rename from pub/lib/css/source/lib/rating.less rename to lib/web/css/source/lib/rating.less diff --git a/pub/lib/css/source/lib/resets.less b/lib/web/css/source/lib/resets.less similarity index 100% rename from pub/lib/css/source/lib/resets.less rename to lib/web/css/source/lib/resets.less diff --git a/pub/lib/css/source/lib/responsive.less b/lib/web/css/source/lib/responsive.less similarity index 100% rename from pub/lib/css/source/lib/responsive.less rename to lib/web/css/source/lib/responsive.less diff --git a/pub/lib/css/source/lib/sections.less b/lib/web/css/source/lib/sections.less similarity index 99% rename from pub/lib/css/source/lib/sections.less rename to lib/web/css/source/lib/sections.less index 0ac79e0a5f03b7740cc7b60bbe28c89c3910da9e..0e1a8eb2a682d5fbfd25e5a9e49769b1e1a39831 100644 --- a/pub/lib/css/source/lib/sections.less +++ b/lib/web/css/source/lib/sections.less @@ -42,7 +42,6 @@ width: 100%; float: right; margin-left: -100%; - display: none; .box-sizing(); &.active { display: block; @@ -94,9 +93,9 @@ @_tab-content-padding-left: @tab-content-padding-left ) { .data-tabs-base(); - > .item.title { + .item.title { margin: 0 @_tab-control-margin-right 0 0; - > .switch { + .switch { .typography( @_color: @_tab-control-color, @_font-size: @_tab-control-font-size, @@ -178,7 +177,7 @@ .box-sizing(); float: none; margin: 0; - display: none; + display: block; &.active { display: block; } diff --git a/pub/lib/css/source/lib/tables.less b/lib/web/css/source/lib/tables.less similarity index 100% rename from pub/lib/css/source/lib/tables.less rename to lib/web/css/source/lib/tables.less diff --git a/pub/lib/css/source/lib/tooltips.less b/lib/web/css/source/lib/tooltips.less similarity index 100% rename from pub/lib/css/source/lib/tooltips.less rename to lib/web/css/source/lib/tooltips.less diff --git a/pub/lib/css/source/lib/typography.less b/lib/web/css/source/lib/typography.less similarity index 100% rename from pub/lib/css/source/lib/typography.less rename to lib/web/css/source/lib/typography.less diff --git a/pub/lib/css/source/lib/ui-dialog.less b/lib/web/css/source/lib/ui-dialog.less similarity index 100% rename from pub/lib/css/source/lib/ui-dialog.less rename to lib/web/css/source/lib/ui-dialog.less diff --git a/pub/lib/css/source/lib/utilities.less b/lib/web/css/source/lib/utilities.less similarity index 100% rename from pub/lib/css/source/lib/utilities.less rename to lib/web/css/source/lib/utilities.less diff --git a/pub/lib/css/source/lib/variables.less b/lib/web/css/source/lib/variables.less similarity index 100% rename from pub/lib/css/source/lib/variables.less rename to lib/web/css/source/lib/variables.less diff --git a/pub/lib/css/source/theme.less b/lib/web/css/source/theme.less similarity index 100% rename from pub/lib/css/source/theme.less rename to lib/web/css/source/theme.less diff --git a/pub/lib/css/styles.less b/lib/web/css/styles.less similarity index 100% rename from pub/lib/css/styles.less rename to lib/web/css/styles.less diff --git a/pub/lib/dnd.js b/lib/web/dnd.js similarity index 100% rename from pub/lib/dnd.js rename to lib/web/dnd.js diff --git a/pub/lib/extjs/adapter/ext/ext-base.js b/lib/web/extjs/adapter/ext/ext-base.js similarity index 100% rename from pub/lib/extjs/adapter/ext/ext-base.js rename to lib/web/extjs/adapter/ext/ext-base.js diff --git a/pub/lib/extjs/adapter/jquery/ext-jquery-adapter.js b/lib/web/extjs/adapter/jquery/ext-jquery-adapter.js similarity index 100% rename from pub/lib/extjs/adapter/jquery/ext-jquery-adapter.js rename to lib/web/extjs/adapter/jquery/ext-jquery-adapter.js diff --git a/pub/lib/extjs/adapter/jquery/jquery-plugins.js b/lib/web/extjs/adapter/jquery/jquery-plugins.js similarity index 100% rename from pub/lib/extjs/adapter/jquery/jquery-plugins.js rename to lib/web/extjs/adapter/jquery/jquery-plugins.js diff --git a/pub/lib/extjs/adapter/jquery/jquery.js b/lib/web/extjs/adapter/jquery/jquery.js similarity index 100% rename from pub/lib/extjs/adapter/jquery/jquery.js rename to lib/web/extjs/adapter/jquery/jquery.js diff --git a/pub/lib/extjs/adapter/prototype/effects.js b/lib/web/extjs/adapter/prototype/effects.js similarity index 100% rename from pub/lib/extjs/adapter/prototype/effects.js rename to lib/web/extjs/adapter/prototype/effects.js diff --git a/pub/lib/extjs/adapter/prototype/ext-prototype-adapter.js b/lib/web/extjs/adapter/prototype/ext-prototype-adapter.js similarity index 100% rename from pub/lib/extjs/adapter/prototype/ext-prototype-adapter.js rename to lib/web/extjs/adapter/prototype/ext-prototype-adapter.js diff --git a/pub/lib/extjs/adapter/prototype/prototype.js b/lib/web/extjs/adapter/prototype/prototype.js similarity index 100% rename from pub/lib/extjs/adapter/prototype/prototype.js rename to lib/web/extjs/adapter/prototype/prototype.js diff --git a/pub/lib/extjs/adapter/prototype/scriptaculous.js b/lib/web/extjs/adapter/prototype/scriptaculous.js similarity index 100% rename from pub/lib/extjs/adapter/prototype/scriptaculous.js rename to lib/web/extjs/adapter/prototype/scriptaculous.js diff --git a/pub/lib/extjs/adapter/yui/ext-yui-adapter.js b/lib/web/extjs/adapter/yui/ext-yui-adapter.js similarity index 100% rename from pub/lib/extjs/adapter/yui/ext-yui-adapter.js rename to lib/web/extjs/adapter/yui/ext-yui-adapter.js diff --git a/pub/lib/extjs/adapter/yui/yui-utilities.js b/lib/web/extjs/adapter/yui/yui-utilities.js similarity index 100% rename from pub/lib/extjs/adapter/yui/yui-utilities.js rename to lib/web/extjs/adapter/yui/yui-utilities.js diff --git a/pub/lib/extjs/css/README.txt b/lib/web/extjs/css/README.txt similarity index 100% rename from pub/lib/extjs/css/README.txt rename to lib/web/extjs/css/README.txt diff --git a/pub/lib/extjs/css/basic-dialog.css b/lib/web/extjs/css/basic-dialog.css similarity index 100% rename from pub/lib/extjs/css/basic-dialog.css rename to lib/web/extjs/css/basic-dialog.css diff --git a/pub/lib/extjs/css/box.css b/lib/web/extjs/css/box.css similarity index 100% rename from pub/lib/extjs/css/box.css rename to lib/web/extjs/css/box.css diff --git a/pub/lib/extjs/css/button.css b/lib/web/extjs/css/button.css similarity index 100% rename from pub/lib/extjs/css/button.css rename to lib/web/extjs/css/button.css diff --git a/pub/lib/extjs/css/combo.css b/lib/web/extjs/css/combo.css similarity index 100% rename from pub/lib/extjs/css/combo.css rename to lib/web/extjs/css/combo.css diff --git a/pub/lib/extjs/css/core.css b/lib/web/extjs/css/core.css similarity index 100% rename from pub/lib/extjs/css/core.css rename to lib/web/extjs/css/core.css diff --git a/pub/lib/extjs/css/date-picker.css b/lib/web/extjs/css/date-picker.css similarity index 100% rename from pub/lib/extjs/css/date-picker.css rename to lib/web/extjs/css/date-picker.css diff --git a/pub/lib/extjs/css/dd.css b/lib/web/extjs/css/dd.css similarity index 100% rename from pub/lib/extjs/css/dd.css rename to lib/web/extjs/css/dd.css diff --git a/pub/lib/extjs/css/debug.css b/lib/web/extjs/css/debug.css similarity index 100% rename from pub/lib/extjs/css/debug.css rename to lib/web/extjs/css/debug.css diff --git a/pub/lib/extjs/css/editor.css b/lib/web/extjs/css/editor.css similarity index 100% rename from pub/lib/extjs/css/editor.css rename to lib/web/extjs/css/editor.css diff --git a/pub/lib/extjs/css/ext-all.css b/lib/web/extjs/css/ext-all.css similarity index 100% rename from pub/lib/extjs/css/ext-all.css rename to lib/web/extjs/css/ext-all.css diff --git a/pub/lib/extjs/css/form.css b/lib/web/extjs/css/form.css similarity index 100% rename from pub/lib/extjs/css/form.css rename to lib/web/extjs/css/form.css diff --git a/pub/lib/extjs/css/grid.css b/lib/web/extjs/css/grid.css similarity index 100% rename from pub/lib/extjs/css/grid.css rename to lib/web/extjs/css/grid.css diff --git a/pub/lib/extjs/css/layout.css b/lib/web/extjs/css/layout.css similarity index 100% rename from pub/lib/extjs/css/layout.css rename to lib/web/extjs/css/layout.css diff --git a/pub/lib/extjs/css/menu.css b/lib/web/extjs/css/menu.css similarity index 100% rename from pub/lib/extjs/css/menu.css rename to lib/web/extjs/css/menu.css diff --git a/pub/lib/extjs/css/panel.css b/lib/web/extjs/css/panel.css similarity index 100% rename from pub/lib/extjs/css/panel.css rename to lib/web/extjs/css/panel.css diff --git a/pub/lib/extjs/css/qtips.css b/lib/web/extjs/css/qtips.css similarity index 100% rename from pub/lib/extjs/css/qtips.css rename to lib/web/extjs/css/qtips.css diff --git a/pub/lib/extjs/css/reset-min.css b/lib/web/extjs/css/reset-min.css similarity index 100% rename from pub/lib/extjs/css/reset-min.css rename to lib/web/extjs/css/reset-min.css diff --git a/pub/lib/extjs/css/resizable.css b/lib/web/extjs/css/resizable.css similarity index 100% rename from pub/lib/extjs/css/resizable.css rename to lib/web/extjs/css/resizable.css diff --git a/pub/lib/extjs/css/tabs.css b/lib/web/extjs/css/tabs.css similarity index 100% rename from pub/lib/extjs/css/tabs.css rename to lib/web/extjs/css/tabs.css diff --git a/pub/lib/extjs/css/toolbar.css b/lib/web/extjs/css/toolbar.css similarity index 100% rename from pub/lib/extjs/css/toolbar.css rename to lib/web/extjs/css/toolbar.css diff --git a/pub/lib/extjs/css/tree.css b/lib/web/extjs/css/tree.css similarity index 100% rename from pub/lib/extjs/css/tree.css rename to lib/web/extjs/css/tree.css diff --git a/pub/lib/extjs/css/ytheme-aero.css b/lib/web/extjs/css/ytheme-aero.css similarity index 100% rename from pub/lib/extjs/css/ytheme-aero.css rename to lib/web/extjs/css/ytheme-aero.css diff --git a/pub/lib/extjs/css/ytheme-gray.css b/lib/web/extjs/css/ytheme-gray.css similarity index 100% rename from pub/lib/extjs/css/ytheme-gray.css rename to lib/web/extjs/css/ytheme-gray.css diff --git a/pub/lib/extjs/css/ytheme-vista.css b/lib/web/extjs/css/ytheme-vista.css similarity index 100% rename from pub/lib/extjs/css/ytheme-vista.css rename to lib/web/extjs/css/ytheme-vista.css diff --git a/pub/lib/extjs/ext-all-debug.js b/lib/web/extjs/ext-all-debug.js similarity index 100% rename from pub/lib/extjs/ext-all-debug.js rename to lib/web/extjs/ext-all-debug.js diff --git a/pub/lib/extjs/ext-all.js b/lib/web/extjs/ext-all.js similarity index 100% rename from pub/lib/extjs/ext-all.js rename to lib/web/extjs/ext-all.js diff --git a/pub/lib/extjs/ext-core-debug.js b/lib/web/extjs/ext-core-debug.js similarity index 100% rename from pub/lib/extjs/ext-core-debug.js rename to lib/web/extjs/ext-core-debug.js diff --git a/pub/lib/extjs/ext-core.js b/lib/web/extjs/ext-core.js similarity index 100% rename from pub/lib/extjs/ext-core.js rename to lib/web/extjs/ext-core.js diff --git a/pub/lib/extjs/ext-tree-checkbox.js b/lib/web/extjs/ext-tree-checkbox.js similarity index 100% rename from pub/lib/extjs/ext-tree-checkbox.js rename to lib/web/extjs/ext-tree-checkbox.js diff --git a/pub/lib/extjs/ext-tree.js b/lib/web/extjs/ext-tree.js similarity index 100% rename from pub/lib/extjs/ext-tree.js rename to lib/web/extjs/ext-tree.js diff --git a/pub/lib/extjs/package/button/button-debug.js b/lib/web/extjs/package/button/button-debug.js similarity index 100% rename from pub/lib/extjs/package/button/button-debug.js rename to lib/web/extjs/package/button/button-debug.js diff --git a/pub/lib/extjs/package/button/button.js b/lib/web/extjs/package/button/button.js similarity index 100% rename from pub/lib/extjs/package/button/button.js rename to lib/web/extjs/package/button/button.js diff --git a/pub/lib/extjs/package/color-palette.js b/lib/web/extjs/package/color-palette.js similarity index 100% rename from pub/lib/extjs/package/color-palette.js rename to lib/web/extjs/package/color-palette.js diff --git a/pub/lib/extjs/package/data/data.js b/lib/web/extjs/package/data/data.js similarity index 100% rename from pub/lib/extjs/package/data/data.js rename to lib/web/extjs/package/data/data.js diff --git a/pub/lib/extjs/package/date.js b/lib/web/extjs/package/date.js similarity index 100% rename from pub/lib/extjs/package/date.js rename to lib/web/extjs/package/date.js diff --git a/pub/lib/extjs/package/datepicker/datepicker.js b/lib/web/extjs/package/datepicker/datepicker.js similarity index 100% rename from pub/lib/extjs/package/datepicker/datepicker.js rename to lib/web/extjs/package/datepicker/datepicker.js diff --git a/pub/lib/extjs/package/dialog/dialogs-debug.js b/lib/web/extjs/package/dialog/dialogs-debug.js similarity index 100% rename from pub/lib/extjs/package/dialog/dialogs-debug.js rename to lib/web/extjs/package/dialog/dialogs-debug.js diff --git a/pub/lib/extjs/package/dialog/dialogs.js b/lib/web/extjs/package/dialog/dialogs.js similarity index 100% rename from pub/lib/extjs/package/dialog/dialogs.js rename to lib/web/extjs/package/dialog/dialogs.js diff --git a/pub/lib/extjs/package/dragdrop/dragdrop.js b/lib/web/extjs/package/dragdrop/dragdrop.js similarity index 100% rename from pub/lib/extjs/package/dragdrop/dragdrop.js rename to lib/web/extjs/package/dragdrop/dragdrop.js diff --git a/pub/lib/extjs/package/form/form-debug.js b/lib/web/extjs/package/form/form-debug.js similarity index 100% rename from pub/lib/extjs/package/form/form-debug.js rename to lib/web/extjs/package/form/form-debug.js diff --git a/pub/lib/extjs/package/form/form.js b/lib/web/extjs/package/form/form.js similarity index 100% rename from pub/lib/extjs/package/form/form.js rename to lib/web/extjs/package/form/form.js diff --git a/pub/lib/extjs/package/grid/edit-grid-debug.js b/lib/web/extjs/package/grid/edit-grid-debug.js similarity index 100% rename from pub/lib/extjs/package/grid/edit-grid-debug.js rename to lib/web/extjs/package/grid/edit-grid-debug.js diff --git a/pub/lib/extjs/package/grid/edit-grid.js b/lib/web/extjs/package/grid/edit-grid.js similarity index 100% rename from pub/lib/extjs/package/grid/edit-grid.js rename to lib/web/extjs/package/grid/edit-grid.js diff --git a/pub/lib/extjs/package/grid/grid.js b/lib/web/extjs/package/grid/grid.js similarity index 100% rename from pub/lib/extjs/package/grid/grid.js rename to lib/web/extjs/package/grid/grid.js diff --git a/pub/lib/extjs/package/layout/layout-debug.js b/lib/web/extjs/package/layout/layout-debug.js similarity index 100% rename from pub/lib/extjs/package/layout/layout-debug.js rename to lib/web/extjs/package/layout/layout-debug.js diff --git a/pub/lib/extjs/package/layout/layout.js b/lib/web/extjs/package/layout/layout.js similarity index 100% rename from pub/lib/extjs/package/layout/layout.js rename to lib/web/extjs/package/layout/layout.js diff --git a/pub/lib/extjs/package/menu/menus.js b/lib/web/extjs/package/menu/menus.js similarity index 100% rename from pub/lib/extjs/package/menu/menus.js rename to lib/web/extjs/package/menu/menus.js diff --git a/pub/lib/extjs/package/qtips/qtips.js b/lib/web/extjs/package/qtips/qtips.js similarity index 100% rename from pub/lib/extjs/package/qtips/qtips.js rename to lib/web/extjs/package/qtips/qtips.js diff --git a/pub/lib/extjs/package/r/nesizable.js b/lib/web/extjs/package/r/nesizable.js similarity index 100% rename from pub/lib/extjs/package/r/nesizable.js rename to lib/web/extjs/package/r/nesizable.js diff --git a/pub/lib/extjs/package/resizable.js b/lib/web/extjs/package/resizable.js similarity index 100% rename from pub/lib/extjs/package/resizable.js rename to lib/web/extjs/package/resizable.js diff --git a/pub/lib/extjs/package/splitbar.js b/lib/web/extjs/package/splitbar.js similarity index 100% rename from pub/lib/extjs/package/splitbar.js rename to lib/web/extjs/package/splitbar.js diff --git a/pub/lib/extjs/package/tabs/tabs.js b/lib/web/extjs/package/tabs/tabs.js similarity index 100% rename from pub/lib/extjs/package/tabs/tabs.js rename to lib/web/extjs/package/tabs/tabs.js diff --git a/pub/lib/extjs/package/toolbar/toolbar.js b/lib/web/extjs/package/toolbar/toolbar.js similarity index 100% rename from pub/lib/extjs/package/toolbar/toolbar.js rename to lib/web/extjs/package/toolbar/toolbar.js diff --git a/pub/lib/extjs/package/tree/tree.js b/lib/web/extjs/package/tree/tree.js similarity index 100% rename from pub/lib/extjs/package/tree/tree.js rename to lib/web/extjs/package/tree/tree.js diff --git a/pub/lib/extjs/package/util.js b/lib/web/extjs/package/util.js similarity index 100% rename from pub/lib/extjs/package/util.js rename to lib/web/extjs/package/util.js diff --git a/pub/lib/extjs/package/widget-core.js b/lib/web/extjs/package/widget-core.js similarity index 100% rename from pub/lib/extjs/package/widget-core.js rename to lib/web/extjs/package/widget-core.js diff --git a/pub/lib/extjs/resources/css/README.txt b/lib/web/extjs/resources/css/README.txt similarity index 100% rename from pub/lib/extjs/resources/css/README.txt rename to lib/web/extjs/resources/css/README.txt diff --git a/pub/lib/extjs/resources/css/basic-dialog.css b/lib/web/extjs/resources/css/basic-dialog.css similarity index 100% rename from pub/lib/extjs/resources/css/basic-dialog.css rename to lib/web/extjs/resources/css/basic-dialog.css diff --git a/pub/lib/extjs/resources/css/box.css b/lib/web/extjs/resources/css/box.css similarity index 100% rename from pub/lib/extjs/resources/css/box.css rename to lib/web/extjs/resources/css/box.css diff --git a/pub/lib/extjs/resources/css/button.css b/lib/web/extjs/resources/css/button.css similarity index 100% rename from pub/lib/extjs/resources/css/button.css rename to lib/web/extjs/resources/css/button.css diff --git a/pub/lib/extjs/resources/css/combo.css b/lib/web/extjs/resources/css/combo.css similarity index 100% rename from pub/lib/extjs/resources/css/combo.css rename to lib/web/extjs/resources/css/combo.css diff --git a/pub/lib/extjs/resources/css/core.css b/lib/web/extjs/resources/css/core.css similarity index 100% rename from pub/lib/extjs/resources/css/core.css rename to lib/web/extjs/resources/css/core.css diff --git a/pub/lib/extjs/resources/css/date-picker.css b/lib/web/extjs/resources/css/date-picker.css similarity index 100% rename from pub/lib/extjs/resources/css/date-picker.css rename to lib/web/extjs/resources/css/date-picker.css diff --git a/pub/lib/extjs/resources/css/dd.css b/lib/web/extjs/resources/css/dd.css similarity index 100% rename from pub/lib/extjs/resources/css/dd.css rename to lib/web/extjs/resources/css/dd.css diff --git a/pub/lib/extjs/resources/css/debug.css b/lib/web/extjs/resources/css/debug.css similarity index 100% rename from pub/lib/extjs/resources/css/debug.css rename to lib/web/extjs/resources/css/debug.css diff --git a/pub/lib/extjs/resources/css/editor.css b/lib/web/extjs/resources/css/editor.css similarity index 100% rename from pub/lib/extjs/resources/css/editor.css rename to lib/web/extjs/resources/css/editor.css diff --git a/pub/lib/extjs/resources/css/ext-all.css b/lib/web/extjs/resources/css/ext-all.css similarity index 100% rename from pub/lib/extjs/resources/css/ext-all.css rename to lib/web/extjs/resources/css/ext-all.css diff --git a/pub/lib/extjs/resources/css/form.css b/lib/web/extjs/resources/css/form.css similarity index 100% rename from pub/lib/extjs/resources/css/form.css rename to lib/web/extjs/resources/css/form.css diff --git a/pub/lib/extjs/resources/css/grid.css b/lib/web/extjs/resources/css/grid.css similarity index 100% rename from pub/lib/extjs/resources/css/grid.css rename to lib/web/extjs/resources/css/grid.css diff --git a/pub/lib/extjs/resources/css/layout.css b/lib/web/extjs/resources/css/layout.css similarity index 100% rename from pub/lib/extjs/resources/css/layout.css rename to lib/web/extjs/resources/css/layout.css diff --git a/pub/lib/extjs/resources/css/menu.css b/lib/web/extjs/resources/css/menu.css similarity index 100% rename from pub/lib/extjs/resources/css/menu.css rename to lib/web/extjs/resources/css/menu.css diff --git a/pub/lib/extjs/resources/css/panel.css b/lib/web/extjs/resources/css/panel.css similarity index 100% rename from pub/lib/extjs/resources/css/panel.css rename to lib/web/extjs/resources/css/panel.css diff --git a/pub/lib/extjs/resources/css/qtips.css b/lib/web/extjs/resources/css/qtips.css similarity index 100% rename from pub/lib/extjs/resources/css/qtips.css rename to lib/web/extjs/resources/css/qtips.css diff --git a/pub/lib/extjs/resources/css/reset-min.css b/lib/web/extjs/resources/css/reset-min.css similarity index 100% rename from pub/lib/extjs/resources/css/reset-min.css rename to lib/web/extjs/resources/css/reset-min.css diff --git a/pub/lib/extjs/resources/css/resizable.css b/lib/web/extjs/resources/css/resizable.css similarity index 100% rename from pub/lib/extjs/resources/css/resizable.css rename to lib/web/extjs/resources/css/resizable.css diff --git a/pub/lib/extjs/resources/css/tabs.css b/lib/web/extjs/resources/css/tabs.css similarity index 100% rename from pub/lib/extjs/resources/css/tabs.css rename to lib/web/extjs/resources/css/tabs.css diff --git a/pub/lib/extjs/resources/css/toolbar.css b/lib/web/extjs/resources/css/toolbar.css similarity index 100% rename from pub/lib/extjs/resources/css/toolbar.css rename to lib/web/extjs/resources/css/toolbar.css diff --git a/pub/lib/extjs/resources/css/tree.css b/lib/web/extjs/resources/css/tree.css similarity index 100% rename from pub/lib/extjs/resources/css/tree.css rename to lib/web/extjs/resources/css/tree.css diff --git a/pub/lib/extjs/resources/css/ytheme-aero.css b/lib/web/extjs/resources/css/ytheme-aero.css similarity index 100% rename from pub/lib/extjs/resources/css/ytheme-aero.css rename to lib/web/extjs/resources/css/ytheme-aero.css diff --git a/pub/lib/extjs/resources/css/ytheme-galdaka.css b/lib/web/extjs/resources/css/ytheme-galdaka.css similarity index 100% rename from pub/lib/extjs/resources/css/ytheme-galdaka.css rename to lib/web/extjs/resources/css/ytheme-galdaka.css diff --git a/pub/lib/extjs/resources/css/ytheme-gray.css b/lib/web/extjs/resources/css/ytheme-gray.css similarity index 100% rename from pub/lib/extjs/resources/css/ytheme-gray.css rename to lib/web/extjs/resources/css/ytheme-gray.css diff --git a/pub/lib/extjs/resources/css/ytheme-magento.css b/lib/web/extjs/resources/css/ytheme-magento.css similarity index 100% rename from pub/lib/extjs/resources/css/ytheme-magento.css rename to lib/web/extjs/resources/css/ytheme-magento.css diff --git a/pub/lib/extjs/resources/css/ytheme-vista.css b/lib/web/extjs/resources/css/ytheme-vista.css similarity index 100% rename from pub/lib/extjs/resources/css/ytheme-vista.css rename to lib/web/extjs/resources/css/ytheme-vista.css diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/aero-close-over.gif b/lib/web/extjs/resources/images/aero/basic-dialog/aero-close-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/aero-close-over.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/aero-close-over.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/aero-close.gif b/lib/web/extjs/resources/images/aero/basic-dialog/aero-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/aero-close.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/aero-close.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/bg-center.gif b/lib/web/extjs/resources/images/aero/basic-dialog/bg-center.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/bg-center.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/bg-center.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/bg-left.gif b/lib/web/extjs/resources/images/aero/basic-dialog/bg-left.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/bg-left.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/bg-left.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/bg-right.gif b/lib/web/extjs/resources/images/aero/basic-dialog/bg-right.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/bg-right.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/bg-right.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/close.gif b/lib/web/extjs/resources/images/aero/basic-dialog/close.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/close.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/close.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/collapse-over.gif b/lib/web/extjs/resources/images/aero/basic-dialog/collapse-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/collapse-over.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/collapse-over.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/collapse.gif b/lib/web/extjs/resources/images/aero/basic-dialog/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/collapse.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/collapse.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/e-handle.gif b/lib/web/extjs/resources/images/aero/basic-dialog/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/e-handle.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/e-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/expand-over.gif b/lib/web/extjs/resources/images/aero/basic-dialog/expand-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/expand-over.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/expand-over.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/expand.gif b/lib/web/extjs/resources/images/aero/basic-dialog/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/expand.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/expand.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/hd-sprite.gif b/lib/web/extjs/resources/images/aero/basic-dialog/hd-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/hd-sprite.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/hd-sprite.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/s-handle.gif b/lib/web/extjs/resources/images/aero/basic-dialog/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/s-handle.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/s-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/se-handle.gif b/lib/web/extjs/resources/images/aero/basic-dialog/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/se-handle.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/se-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/basic-dialog/w-handle.gif b/lib/web/extjs/resources/images/aero/basic-dialog/w-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/basic-dialog/w-handle.gif rename to lib/web/extjs/resources/images/aero/basic-dialog/w-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/gradient-bg.gif b/lib/web/extjs/resources/images/aero/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/gradient-bg.gif rename to lib/web/extjs/resources/images/aero/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/grid/grid-blue-split.gif b/lib/web/extjs/resources/images/aero/grid/grid-blue-split.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/grid-blue-split.gif rename to lib/web/extjs/resources/images/aero/grid/grid-blue-split.gif diff --git a/pub/lib/extjs/resources/images/aero/grid/grid-hrow.gif b/lib/web/extjs/resources/images/aero/grid/grid-hrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/grid-hrow.gif rename to lib/web/extjs/resources/images/aero/grid/grid-hrow.gif diff --git a/pub/lib/extjs/resources/images/aero/grid/grid-split.gif b/lib/web/extjs/resources/images/aero/grid/grid-split.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/grid-split.gif rename to lib/web/extjs/resources/images/aero/grid/grid-split.gif diff --git a/pub/lib/extjs/resources/images/aero/grid/grid-vista-hd.gif b/lib/web/extjs/resources/images/aero/grid/grid-vista-hd.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/grid-vista-hd.gif rename to lib/web/extjs/resources/images/aero/grid/grid-vista-hd.gif diff --git a/pub/lib/extjs/resources/images/aero/grid/pspbrwse.jbf b/lib/web/extjs/resources/images/aero/grid/pspbrwse.jbf similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/pspbrwse.jbf rename to lib/web/extjs/resources/images/aero/grid/pspbrwse.jbf diff --git a/pub/lib/extjs/resources/images/aero/grid/sort-col-bg.gif b/lib/web/extjs/resources/images/aero/grid/sort-col-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/sort-col-bg.gif rename to lib/web/extjs/resources/images/aero/grid/sort-col-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/grid/sort_asc.gif b/lib/web/extjs/resources/images/aero/grid/sort_asc.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/sort_asc.gif rename to lib/web/extjs/resources/images/aero/grid/sort_asc.gif diff --git a/pub/lib/extjs/resources/images/aero/grid/sort_desc.gif b/lib/web/extjs/resources/images/aero/grid/sort_desc.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/grid/sort_desc.gif rename to lib/web/extjs/resources/images/aero/grid/sort_desc.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/collapse.gif b/lib/web/extjs/resources/images/aero/layout/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/collapse.gif rename to lib/web/extjs/resources/images/aero/layout/collapse.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/expand.gif b/lib/web/extjs/resources/images/aero/layout/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/expand.gif rename to lib/web/extjs/resources/images/aero/layout/expand.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/gradient-bg.gif b/lib/web/extjs/resources/images/aero/layout/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/gradient-bg.gif rename to lib/web/extjs/resources/images/aero/layout/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/ns-collapse.gif b/lib/web/extjs/resources/images/aero/layout/ns-collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/ns-collapse.gif rename to lib/web/extjs/resources/images/aero/layout/ns-collapse.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/ns-expand.gif b/lib/web/extjs/resources/images/aero/layout/ns-expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/ns-expand.gif rename to lib/web/extjs/resources/images/aero/layout/ns-expand.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/panel-close.gif b/lib/web/extjs/resources/images/aero/layout/panel-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/panel-close.gif rename to lib/web/extjs/resources/images/aero/layout/panel-close.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/panel-title-bg.gif b/lib/web/extjs/resources/images/aero/layout/panel-title-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/panel-title-bg.gif rename to lib/web/extjs/resources/images/aero/layout/panel-title-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/panel-title-light-bg.gif b/lib/web/extjs/resources/images/aero/layout/panel-title-light-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/panel-title-light-bg.gif rename to lib/web/extjs/resources/images/aero/layout/panel-title-light-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/tab-close-on.gif b/lib/web/extjs/resources/images/aero/layout/tab-close-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/tab-close-on.gif rename to lib/web/extjs/resources/images/aero/layout/tab-close-on.gif diff --git a/pub/lib/extjs/resources/images/aero/layout/tab-close.gif b/lib/web/extjs/resources/images/aero/layout/tab-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/layout/tab-close.gif rename to lib/web/extjs/resources/images/aero/layout/tab-close.gif diff --git a/pub/lib/extjs/resources/images/aero/menu/checked.gif b/lib/web/extjs/resources/images/aero/menu/checked.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/menu/checked.gif rename to lib/web/extjs/resources/images/aero/menu/checked.gif diff --git a/pub/lib/extjs/resources/images/aero/menu/item-over.gif b/lib/web/extjs/resources/images/aero/menu/item-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/menu/item-over.gif rename to lib/web/extjs/resources/images/aero/menu/item-over.gif diff --git a/pub/lib/extjs/resources/images/aero/menu/menu.gif b/lib/web/extjs/resources/images/aero/menu/menu.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/menu/menu.gif rename to lib/web/extjs/resources/images/aero/menu/menu.gif diff --git a/pub/lib/extjs/resources/images/aero/menu/unchecked.gif b/lib/web/extjs/resources/images/aero/menu/unchecked.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/menu/unchecked.gif rename to lib/web/extjs/resources/images/aero/menu/unchecked.gif diff --git a/pub/lib/extjs/resources/images/aero/qtip/bg.gif b/lib/web/extjs/resources/images/aero/qtip/bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/qtip/bg.gif rename to lib/web/extjs/resources/images/aero/qtip/bg.gif diff --git a/pub/lib/extjs/resources/images/aero/s.gif b/lib/web/extjs/resources/images/aero/s.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/s.gif rename to lib/web/extjs/resources/images/aero/s.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/e-handle-dark.gif b/lib/web/extjs/resources/images/aero/sizer/e-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/e-handle-dark.gif rename to lib/web/extjs/resources/images/aero/sizer/e-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/e-handle.gif b/lib/web/extjs/resources/images/aero/sizer/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/e-handle.gif rename to lib/web/extjs/resources/images/aero/sizer/e-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/ne-handle-dark.gif b/lib/web/extjs/resources/images/aero/sizer/ne-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/ne-handle-dark.gif rename to lib/web/extjs/resources/images/aero/sizer/ne-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/ne-handle.gif b/lib/web/extjs/resources/images/aero/sizer/ne-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/ne-handle.gif rename to lib/web/extjs/resources/images/aero/sizer/ne-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/nw-handle-dark.gif b/lib/web/extjs/resources/images/aero/sizer/nw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/nw-handle-dark.gif rename to lib/web/extjs/resources/images/aero/sizer/nw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/nw-handle.gif b/lib/web/extjs/resources/images/aero/sizer/nw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/nw-handle.gif rename to lib/web/extjs/resources/images/aero/sizer/nw-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/s-handle-dark.gif b/lib/web/extjs/resources/images/aero/sizer/s-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/s-handle-dark.gif rename to lib/web/extjs/resources/images/aero/sizer/s-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/s-handle.gif b/lib/web/extjs/resources/images/aero/sizer/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/s-handle.gif rename to lib/web/extjs/resources/images/aero/sizer/s-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/se-handle-dark.gif b/lib/web/extjs/resources/images/aero/sizer/se-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/se-handle-dark.gif rename to lib/web/extjs/resources/images/aero/sizer/se-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/se-handle.gif b/lib/web/extjs/resources/images/aero/sizer/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/se-handle.gif rename to lib/web/extjs/resources/images/aero/sizer/se-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/sw-handle-dark.gif b/lib/web/extjs/resources/images/aero/sizer/sw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/sw-handle-dark.gif rename to lib/web/extjs/resources/images/aero/sizer/sw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/aero/sizer/sw-handle.gif b/lib/web/extjs/resources/images/aero/sizer/sw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/sizer/sw-handle.gif rename to lib/web/extjs/resources/images/aero/sizer/sw-handle.gif diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-btm-inactive-left-bg.gif b/lib/web/extjs/resources/images/aero/tabs/tab-btm-inactive-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-btm-inactive-left-bg.gif rename to lib/web/extjs/resources/images/aero/tabs/tab-btm-inactive-left-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-btm-inactive-right-bg.gif b/lib/web/extjs/resources/images/aero/tabs/tab-btm-inactive-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-btm-inactive-right-bg.gif rename to lib/web/extjs/resources/images/aero/tabs/tab-btm-inactive-right-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-btm-left-bg.gif b/lib/web/extjs/resources/images/aero/tabs/tab-btm-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-btm-left-bg.gif rename to lib/web/extjs/resources/images/aero/tabs/tab-btm-left-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-btm-right-bg.gif b/lib/web/extjs/resources/images/aero/tabs/tab-btm-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-btm-right-bg.gif rename to lib/web/extjs/resources/images/aero/tabs/tab-btm-right-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-sprite.gif b/lib/web/extjs/resources/images/aero/tabs/tab-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-sprite.gif rename to lib/web/extjs/resources/images/aero/tabs/tab-sprite.gif diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-strip-bg.gif b/lib/web/extjs/resources/images/aero/tabs/tab-strip-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-strip-bg.gif rename to lib/web/extjs/resources/images/aero/tabs/tab-strip-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-strip-bg.png b/lib/web/extjs/resources/images/aero/tabs/tab-strip-bg.png similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-strip-bg.png rename to lib/web/extjs/resources/images/aero/tabs/tab-strip-bg.png diff --git a/pub/lib/extjs/resources/images/aero/tabs/tab-strip-btm-bg.gif b/lib/web/extjs/resources/images/aero/tabs/tab-strip-btm-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/tabs/tab-strip-btm-bg.gif rename to lib/web/extjs/resources/images/aero/tabs/tab-strip-btm-bg.gif diff --git a/pub/lib/extjs/resources/images/aero/toolbar/bg.gif b/lib/web/extjs/resources/images/aero/toolbar/bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/toolbar/bg.gif rename to lib/web/extjs/resources/images/aero/toolbar/bg.gif diff --git a/pub/lib/extjs/resources/images/aero/toolbar/tb-btn-sprite.gif b/lib/web/extjs/resources/images/aero/toolbar/tb-btn-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/aero/toolbar/tb-btn-sprite.gif rename to lib/web/extjs/resources/images/aero/toolbar/tb-btn-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/btn-arrow.gif b/lib/web/extjs/resources/images/default/basic-dialog/btn-arrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/btn-arrow.gif rename to lib/web/extjs/resources/images/default/basic-dialog/btn-arrow.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/btn-sprite.gif b/lib/web/extjs/resources/images/default/basic-dialog/btn-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/btn-sprite.gif rename to lib/web/extjs/resources/images/default/basic-dialog/btn-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/close.gif b/lib/web/extjs/resources/images/default/basic-dialog/close.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/close.gif rename to lib/web/extjs/resources/images/default/basic-dialog/close.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/collapse.gif b/lib/web/extjs/resources/images/default/basic-dialog/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/collapse.gif rename to lib/web/extjs/resources/images/default/basic-dialog/collapse.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/e-handle.gif b/lib/web/extjs/resources/images/default/basic-dialog/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/e-handle.gif rename to lib/web/extjs/resources/images/default/basic-dialog/e-handle.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/expand.gif b/lib/web/extjs/resources/images/default/basic-dialog/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/expand.gif rename to lib/web/extjs/resources/images/default/basic-dialog/expand.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/hd-sprite.gif b/lib/web/extjs/resources/images/default/basic-dialog/hd-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/hd-sprite.gif rename to lib/web/extjs/resources/images/default/basic-dialog/hd-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/progress.gif b/lib/web/extjs/resources/images/default/basic-dialog/progress.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/progress.gif rename to lib/web/extjs/resources/images/default/basic-dialog/progress.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/progress2.gif b/lib/web/extjs/resources/images/default/basic-dialog/progress2.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/progress2.gif rename to lib/web/extjs/resources/images/default/basic-dialog/progress2.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/s-handle.gif b/lib/web/extjs/resources/images/default/basic-dialog/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/s-handle.gif rename to lib/web/extjs/resources/images/default/basic-dialog/s-handle.gif diff --git a/pub/lib/extjs/resources/images/default/basic-dialog/se-handle.gif b/lib/web/extjs/resources/images/default/basic-dialog/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/basic-dialog/se-handle.gif rename to lib/web/extjs/resources/images/default/basic-dialog/se-handle.gif diff --git a/pub/lib/extjs/resources/images/default/box/corners-blue.gif b/lib/web/extjs/resources/images/default/box/corners-blue.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/corners-blue.gif rename to lib/web/extjs/resources/images/default/box/corners-blue.gif diff --git a/pub/lib/extjs/resources/images/default/box/corners.gif b/lib/web/extjs/resources/images/default/box/corners.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/corners.gif rename to lib/web/extjs/resources/images/default/box/corners.gif diff --git a/pub/lib/extjs/resources/images/default/box/l-blue.gif b/lib/web/extjs/resources/images/default/box/l-blue.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/l-blue.gif rename to lib/web/extjs/resources/images/default/box/l-blue.gif diff --git a/pub/lib/extjs/resources/images/default/box/l.gif b/lib/web/extjs/resources/images/default/box/l.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/l.gif rename to lib/web/extjs/resources/images/default/box/l.gif diff --git a/pub/lib/extjs/resources/images/default/box/r-blue.gif b/lib/web/extjs/resources/images/default/box/r-blue.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/r-blue.gif rename to lib/web/extjs/resources/images/default/box/r-blue.gif diff --git a/pub/lib/extjs/resources/images/default/box/r.gif b/lib/web/extjs/resources/images/default/box/r.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/r.gif rename to lib/web/extjs/resources/images/default/box/r.gif diff --git a/pub/lib/extjs/resources/images/default/box/tb-blue.gif b/lib/web/extjs/resources/images/default/box/tb-blue.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/tb-blue.gif rename to lib/web/extjs/resources/images/default/box/tb-blue.gif diff --git a/pub/lib/extjs/resources/images/default/box/tb.gif b/lib/web/extjs/resources/images/default/box/tb.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/box/tb.gif rename to lib/web/extjs/resources/images/default/box/tb.gif diff --git a/pub/lib/extjs/resources/images/default/dd/drop-add.gif b/lib/web/extjs/resources/images/default/dd/drop-add.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/dd/drop-add.gif rename to lib/web/extjs/resources/images/default/dd/drop-add.gif diff --git a/pub/lib/extjs/resources/images/default/dd/drop-no.gif b/lib/web/extjs/resources/images/default/dd/drop-no.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/dd/drop-no.gif rename to lib/web/extjs/resources/images/default/dd/drop-no.gif diff --git a/pub/lib/extjs/resources/images/default/dd/drop-yes.gif b/lib/web/extjs/resources/images/default/dd/drop-yes.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/dd/drop-yes.gif rename to lib/web/extjs/resources/images/default/dd/drop-yes.gif diff --git a/pub/lib/extjs/resources/images/default/editor/tb-sprite.gif b/lib/web/extjs/resources/images/default/editor/tb-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/editor/tb-sprite.gif rename to lib/web/extjs/resources/images/default/editor/tb-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/form/clear-trigger.gif b/lib/web/extjs/resources/images/default/form/clear-trigger.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/clear-trigger.gif rename to lib/web/extjs/resources/images/default/form/clear-trigger.gif diff --git a/pub/lib/extjs/resources/images/default/form/date-trigger.gif b/lib/web/extjs/resources/images/default/form/date-trigger.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/date-trigger.gif rename to lib/web/extjs/resources/images/default/form/date-trigger.gif diff --git a/pub/lib/extjs/resources/images/default/form/error-tip-corners.gif b/lib/web/extjs/resources/images/default/form/error-tip-corners.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/error-tip-corners.gif rename to lib/web/extjs/resources/images/default/form/error-tip-corners.gif diff --git a/pub/lib/extjs/resources/images/default/form/exclamation.gif b/lib/web/extjs/resources/images/default/form/exclamation.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/exclamation.gif rename to lib/web/extjs/resources/images/default/form/exclamation.gif diff --git a/pub/lib/extjs/resources/images/default/form/search-trigger.gif b/lib/web/extjs/resources/images/default/form/search-trigger.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/search-trigger.gif rename to lib/web/extjs/resources/images/default/form/search-trigger.gif diff --git a/pub/lib/extjs/resources/images/default/form/text-bg.gif b/lib/web/extjs/resources/images/default/form/text-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/text-bg.gif rename to lib/web/extjs/resources/images/default/form/text-bg.gif diff --git a/pub/lib/extjs/resources/images/default/form/trigger-tpl.gif b/lib/web/extjs/resources/images/default/form/trigger-tpl.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/trigger-tpl.gif rename to lib/web/extjs/resources/images/default/form/trigger-tpl.gif diff --git a/pub/lib/extjs/resources/images/default/form/trigger.gif b/lib/web/extjs/resources/images/default/form/trigger.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/form/trigger.gif rename to lib/web/extjs/resources/images/default/form/trigger.gif diff --git a/pub/lib/extjs/resources/images/default/gradient-bg.gif b/lib/web/extjs/resources/images/default/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/gradient-bg.gif rename to lib/web/extjs/resources/images/default/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/default/grid/arrow-left-white.gif b/lib/web/extjs/resources/images/default/grid/arrow-left-white.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/arrow-left-white.gif rename to lib/web/extjs/resources/images/default/grid/arrow-left-white.gif diff --git a/pub/lib/extjs/resources/images/default/grid/arrow-right-white.gif b/lib/web/extjs/resources/images/default/grid/arrow-right-white.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/arrow-right-white.gif rename to lib/web/extjs/resources/images/default/grid/arrow-right-white.gif diff --git a/pub/lib/extjs/resources/images/default/grid/col-move-bottom.gif b/lib/web/extjs/resources/images/default/grid/col-move-bottom.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/col-move-bottom.gif rename to lib/web/extjs/resources/images/default/grid/col-move-bottom.gif diff --git a/pub/lib/extjs/resources/images/default/grid/col-move-top.gif b/lib/web/extjs/resources/images/default/grid/col-move-top.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/col-move-top.gif rename to lib/web/extjs/resources/images/default/grid/col-move-top.gif diff --git a/pub/lib/extjs/resources/images/default/grid/dirty.gif b/lib/web/extjs/resources/images/default/grid/dirty.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/dirty.gif rename to lib/web/extjs/resources/images/default/grid/dirty.gif diff --git a/pub/lib/extjs/resources/images/default/grid/done.gif b/lib/web/extjs/resources/images/default/grid/done.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/done.gif rename to lib/web/extjs/resources/images/default/grid/done.gif diff --git a/pub/lib/extjs/resources/images/default/grid/drop-no.gif b/lib/web/extjs/resources/images/default/grid/drop-no.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/drop-no.gif rename to lib/web/extjs/resources/images/default/grid/drop-no.gif diff --git a/pub/lib/extjs/resources/images/default/grid/drop-yes.gif b/lib/web/extjs/resources/images/default/grid/drop-yes.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/drop-yes.gif rename to lib/web/extjs/resources/images/default/grid/drop-yes.gif diff --git a/pub/lib/extjs/resources/images/default/grid/footer-bg.gif b/lib/web/extjs/resources/images/default/grid/footer-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/footer-bg.gif rename to lib/web/extjs/resources/images/default/grid/footer-bg.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid-blue-hd.gif b/lib/web/extjs/resources/images/default/grid/grid-blue-hd.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid-blue-hd.gif rename to lib/web/extjs/resources/images/default/grid/grid-blue-hd.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid-blue-split.gif b/lib/web/extjs/resources/images/default/grid/grid-blue-split.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid-blue-split.gif rename to lib/web/extjs/resources/images/default/grid/grid-blue-split.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid-hrow.gif b/lib/web/extjs/resources/images/default/grid/grid-hrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid-hrow.gif rename to lib/web/extjs/resources/images/default/grid/grid-hrow.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid-loading.gif b/lib/web/extjs/resources/images/default/grid/grid-loading.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid-loading.gif rename to lib/web/extjs/resources/images/default/grid/grid-loading.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid-split.gif b/lib/web/extjs/resources/images/default/grid/grid-split.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid-split.gif rename to lib/web/extjs/resources/images/default/grid/grid-split.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid-vista-hd.gif b/lib/web/extjs/resources/images/default/grid/grid-vista-hd.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid-vista-hd.gif rename to lib/web/extjs/resources/images/default/grid/grid-vista-hd.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid3-hd-btn.gif b/lib/web/extjs/resources/images/default/grid/grid3-hd-btn.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid3-hd-btn.gif rename to lib/web/extjs/resources/images/default/grid/grid3-hd-btn.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid3-hrow-over.gif b/lib/web/extjs/resources/images/default/grid/grid3-hrow-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid3-hrow-over.gif rename to lib/web/extjs/resources/images/default/grid/grid3-hrow-over.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid3-hrow.gif b/lib/web/extjs/resources/images/default/grid/grid3-hrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid3-hrow.gif rename to lib/web/extjs/resources/images/default/grid/grid3-hrow.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid3-special-col-bg.gif b/lib/web/extjs/resources/images/default/grid/grid3-special-col-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid3-special-col-bg.gif rename to lib/web/extjs/resources/images/default/grid/grid3-special-col-bg.gif diff --git a/pub/lib/extjs/resources/images/default/grid/grid3-special-col-sel-bg.gif b/lib/web/extjs/resources/images/default/grid/grid3-special-col-sel-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/grid3-special-col-sel-bg.gif rename to lib/web/extjs/resources/images/default/grid/grid3-special-col-sel-bg.gif diff --git a/pub/lib/extjs/resources/images/default/grid/hd-pop.gif b/lib/web/extjs/resources/images/default/grid/hd-pop.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/hd-pop.gif rename to lib/web/extjs/resources/images/default/grid/hd-pop.gif diff --git a/pub/lib/extjs/resources/images/default/grid/hmenu-asc.gif b/lib/web/extjs/resources/images/default/grid/hmenu-asc.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/hmenu-asc.gif rename to lib/web/extjs/resources/images/default/grid/hmenu-asc.gif diff --git a/pub/lib/extjs/resources/images/default/grid/hmenu-desc.gif b/lib/web/extjs/resources/images/default/grid/hmenu-desc.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/hmenu-desc.gif rename to lib/web/extjs/resources/images/default/grid/hmenu-desc.gif diff --git a/pub/lib/extjs/resources/images/default/grid/hmenu-lock.gif b/lib/web/extjs/resources/images/default/grid/hmenu-lock.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/hmenu-lock.gif rename to lib/web/extjs/resources/images/default/grid/hmenu-lock.gif diff --git a/pub/lib/extjs/resources/images/default/grid/hmenu-lock.png b/lib/web/extjs/resources/images/default/grid/hmenu-lock.png similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/hmenu-lock.png rename to lib/web/extjs/resources/images/default/grid/hmenu-lock.png diff --git a/pub/lib/extjs/resources/images/default/grid/hmenu-unlock.gif b/lib/web/extjs/resources/images/default/grid/hmenu-unlock.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/hmenu-unlock.gif rename to lib/web/extjs/resources/images/default/grid/hmenu-unlock.gif diff --git a/pub/lib/extjs/resources/images/default/grid/hmenu-unlock.png b/lib/web/extjs/resources/images/default/grid/hmenu-unlock.png similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/hmenu-unlock.png rename to lib/web/extjs/resources/images/default/grid/hmenu-unlock.png diff --git a/pub/lib/extjs/resources/images/default/grid/invalid_line.gif b/lib/web/extjs/resources/images/default/grid/invalid_line.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/invalid_line.gif rename to lib/web/extjs/resources/images/default/grid/invalid_line.gif diff --git a/pub/lib/extjs/resources/images/default/grid/loading.gif b/lib/web/extjs/resources/images/default/grid/loading.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/loading.gif rename to lib/web/extjs/resources/images/default/grid/loading.gif diff --git a/pub/lib/extjs/resources/images/default/grid/mso-hd.gif b/lib/web/extjs/resources/images/default/grid/mso-hd.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/mso-hd.gif rename to lib/web/extjs/resources/images/default/grid/mso-hd.gif diff --git a/pub/lib/extjs/resources/images/default/grid/nowait.gif b/lib/web/extjs/resources/images/default/grid/nowait.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/nowait.gif rename to lib/web/extjs/resources/images/default/grid/nowait.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-first-disabled.gif b/lib/web/extjs/resources/images/default/grid/page-first-disabled.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-first-disabled.gif rename to lib/web/extjs/resources/images/default/grid/page-first-disabled.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-first.gif b/lib/web/extjs/resources/images/default/grid/page-first.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-first.gif rename to lib/web/extjs/resources/images/default/grid/page-first.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-last-disabled.gif b/lib/web/extjs/resources/images/default/grid/page-last-disabled.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-last-disabled.gif rename to lib/web/extjs/resources/images/default/grid/page-last-disabled.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-last.gif b/lib/web/extjs/resources/images/default/grid/page-last.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-last.gif rename to lib/web/extjs/resources/images/default/grid/page-last.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-next-disabled.gif b/lib/web/extjs/resources/images/default/grid/page-next-disabled.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-next-disabled.gif rename to lib/web/extjs/resources/images/default/grid/page-next-disabled.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-next.gif b/lib/web/extjs/resources/images/default/grid/page-next.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-next.gif rename to lib/web/extjs/resources/images/default/grid/page-next.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-prev-disabled.gif b/lib/web/extjs/resources/images/default/grid/page-prev-disabled.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-prev-disabled.gif rename to lib/web/extjs/resources/images/default/grid/page-prev-disabled.gif diff --git a/pub/lib/extjs/resources/images/default/grid/page-prev.gif b/lib/web/extjs/resources/images/default/grid/page-prev.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/page-prev.gif rename to lib/web/extjs/resources/images/default/grid/page-prev.gif diff --git a/pub/lib/extjs/resources/images/default/grid/pick-button.gif b/lib/web/extjs/resources/images/default/grid/pick-button.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/pick-button.gif rename to lib/web/extjs/resources/images/default/grid/pick-button.gif diff --git a/pub/lib/extjs/resources/images/default/grid/refresh.gif b/lib/web/extjs/resources/images/default/grid/refresh.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/refresh.gif rename to lib/web/extjs/resources/images/default/grid/refresh.gif diff --git a/pub/lib/extjs/resources/images/default/grid/row-check-sprite.gif b/lib/web/extjs/resources/images/default/grid/row-check-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/row-check-sprite.gif rename to lib/web/extjs/resources/images/default/grid/row-check-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/grid/row-expand-sprite.gif b/lib/web/extjs/resources/images/default/grid/row-expand-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/row-expand-sprite.gif rename to lib/web/extjs/resources/images/default/grid/row-expand-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/grid/row-over.gif b/lib/web/extjs/resources/images/default/grid/row-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/row-over.gif rename to lib/web/extjs/resources/images/default/grid/row-over.gif diff --git a/pub/lib/extjs/resources/images/default/grid/row-sel.gif b/lib/web/extjs/resources/images/default/grid/row-sel.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/row-sel.gif rename to lib/web/extjs/resources/images/default/grid/row-sel.gif diff --git a/pub/lib/extjs/resources/images/default/grid/sort_asc.gif b/lib/web/extjs/resources/images/default/grid/sort_asc.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/sort_asc.gif rename to lib/web/extjs/resources/images/default/grid/sort_asc.gif diff --git a/pub/lib/extjs/resources/images/default/grid/sort_desc.gif b/lib/web/extjs/resources/images/default/grid/sort_desc.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/sort_desc.gif rename to lib/web/extjs/resources/images/default/grid/sort_desc.gif diff --git a/pub/lib/extjs/resources/images/default/grid/wait.gif b/lib/web/extjs/resources/images/default/grid/wait.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/grid/wait.gif rename to lib/web/extjs/resources/images/default/grid/wait.gif diff --git a/pub/lib/extjs/resources/images/default/layout/collapse.gif b/lib/web/extjs/resources/images/default/layout/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/collapse.gif rename to lib/web/extjs/resources/images/default/layout/collapse.gif diff --git a/pub/lib/extjs/resources/images/default/layout/expand.gif b/lib/web/extjs/resources/images/default/layout/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/expand.gif rename to lib/web/extjs/resources/images/default/layout/expand.gif diff --git a/pub/lib/extjs/resources/images/default/layout/gradient-bg.gif b/lib/web/extjs/resources/images/default/layout/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/gradient-bg.gif rename to lib/web/extjs/resources/images/default/layout/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/default/layout/ns-collapse.gif b/lib/web/extjs/resources/images/default/layout/ns-collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/ns-collapse.gif rename to lib/web/extjs/resources/images/default/layout/ns-collapse.gif diff --git a/pub/lib/extjs/resources/images/default/layout/ns-expand.gif b/lib/web/extjs/resources/images/default/layout/ns-expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/ns-expand.gif rename to lib/web/extjs/resources/images/default/layout/ns-expand.gif diff --git a/pub/lib/extjs/resources/images/default/layout/panel-close.gif b/lib/web/extjs/resources/images/default/layout/panel-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/panel-close.gif rename to lib/web/extjs/resources/images/default/layout/panel-close.gif diff --git a/pub/lib/extjs/resources/images/default/layout/panel-title-bg.gif b/lib/web/extjs/resources/images/default/layout/panel-title-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/panel-title-bg.gif rename to lib/web/extjs/resources/images/default/layout/panel-title-bg.gif diff --git a/pub/lib/extjs/resources/images/default/layout/panel-title-light-bg.gif b/lib/web/extjs/resources/images/default/layout/panel-title-light-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/panel-title-light-bg.gif rename to lib/web/extjs/resources/images/default/layout/panel-title-light-bg.gif diff --git a/pub/lib/extjs/resources/images/default/layout/stick.gif b/lib/web/extjs/resources/images/default/layout/stick.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/stick.gif rename to lib/web/extjs/resources/images/default/layout/stick.gif diff --git a/pub/lib/extjs/resources/images/default/layout/stuck.gif b/lib/web/extjs/resources/images/default/layout/stuck.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/stuck.gif rename to lib/web/extjs/resources/images/default/layout/stuck.gif diff --git a/pub/lib/extjs/resources/images/default/layout/tab-close-on.gif b/lib/web/extjs/resources/images/default/layout/tab-close-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/tab-close-on.gif rename to lib/web/extjs/resources/images/default/layout/tab-close-on.gif diff --git a/pub/lib/extjs/resources/images/default/layout/tab-close.gif b/lib/web/extjs/resources/images/default/layout/tab-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/layout/tab-close.gif rename to lib/web/extjs/resources/images/default/layout/tab-close.gif diff --git a/pub/lib/extjs/resources/images/default/menu/checked.gif b/lib/web/extjs/resources/images/default/menu/checked.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/menu/checked.gif rename to lib/web/extjs/resources/images/default/menu/checked.gif diff --git a/pub/lib/extjs/resources/images/default/menu/group-checked.gif b/lib/web/extjs/resources/images/default/menu/group-checked.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/menu/group-checked.gif rename to lib/web/extjs/resources/images/default/menu/group-checked.gif diff --git a/pub/lib/extjs/resources/images/default/menu/menu-parent.gif b/lib/web/extjs/resources/images/default/menu/menu-parent.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/menu/menu-parent.gif rename to lib/web/extjs/resources/images/default/menu/menu-parent.gif diff --git a/pub/lib/extjs/resources/images/default/menu/menu.gif b/lib/web/extjs/resources/images/default/menu/menu.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/menu/menu.gif rename to lib/web/extjs/resources/images/default/menu/menu.gif diff --git a/pub/lib/extjs/resources/images/default/menu/unchecked.gif b/lib/web/extjs/resources/images/default/menu/unchecked.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/menu/unchecked.gif rename to lib/web/extjs/resources/images/default/menu/unchecked.gif diff --git a/pub/lib/extjs/resources/images/default/panel/corners-sprite.gif b/lib/web/extjs/resources/images/default/panel/corners-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/corners-sprite.gif rename to lib/web/extjs/resources/images/default/panel/corners-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/panel/left-right.gif b/lib/web/extjs/resources/images/default/panel/left-right.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/left-right.gif rename to lib/web/extjs/resources/images/default/panel/left-right.gif diff --git a/pub/lib/extjs/resources/images/default/panel/tool-sprite-tpl.gif b/lib/web/extjs/resources/images/default/panel/tool-sprite-tpl.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/tool-sprite-tpl.gif rename to lib/web/extjs/resources/images/default/panel/tool-sprite-tpl.gif diff --git a/pub/lib/extjs/resources/images/default/panel/tool-sprites.gif b/lib/web/extjs/resources/images/default/panel/tool-sprites.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/tool-sprites.gif rename to lib/web/extjs/resources/images/default/panel/tool-sprites.gif diff --git a/pub/lib/extjs/resources/images/default/panel/top-bottom.gif b/lib/web/extjs/resources/images/default/panel/top-bottom.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/top-bottom.gif rename to lib/web/extjs/resources/images/default/panel/top-bottom.gif diff --git a/pub/lib/extjs/resources/images/default/panel/white-corners-sprite.gif b/lib/web/extjs/resources/images/default/panel/white-corners-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/white-corners-sprite.gif rename to lib/web/extjs/resources/images/default/panel/white-corners-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/panel/white-left-right.gif b/lib/web/extjs/resources/images/default/panel/white-left-right.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/white-left-right.gif rename to lib/web/extjs/resources/images/default/panel/white-left-right.gif diff --git a/pub/lib/extjs/resources/images/default/panel/white-top-bottom.gif b/lib/web/extjs/resources/images/default/panel/white-top-bottom.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/panel/white-top-bottom.gif rename to lib/web/extjs/resources/images/default/panel/white-top-bottom.gif diff --git a/pub/lib/extjs/resources/images/default/qtip/bg.gif b/lib/web/extjs/resources/images/default/qtip/bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/qtip/bg.gif rename to lib/web/extjs/resources/images/default/qtip/bg.gif diff --git a/pub/lib/extjs/resources/images/default/qtip/close.gif b/lib/web/extjs/resources/images/default/qtip/close.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/qtip/close.gif rename to lib/web/extjs/resources/images/default/qtip/close.gif diff --git a/pub/lib/extjs/resources/images/default/qtip/tip-sprite.gif b/lib/web/extjs/resources/images/default/qtip/tip-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/qtip/tip-sprite.gif rename to lib/web/extjs/resources/images/default/qtip/tip-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/s.gif b/lib/web/extjs/resources/images/default/s.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/s.gif rename to lib/web/extjs/resources/images/default/s.gif diff --git a/pub/lib/extjs/resources/images/default/shadow-c.png b/lib/web/extjs/resources/images/default/shadow-c.png similarity index 100% rename from pub/lib/extjs/resources/images/default/shadow-c.png rename to lib/web/extjs/resources/images/default/shadow-c.png diff --git a/pub/lib/extjs/resources/images/default/shadow-lr.png b/lib/web/extjs/resources/images/default/shadow-lr.png similarity index 100% rename from pub/lib/extjs/resources/images/default/shadow-lr.png rename to lib/web/extjs/resources/images/default/shadow-lr.png diff --git a/pub/lib/extjs/resources/images/default/shadow.png b/lib/web/extjs/resources/images/default/shadow.png similarity index 100% rename from pub/lib/extjs/resources/images/default/shadow.png rename to lib/web/extjs/resources/images/default/shadow.png diff --git a/pub/lib/extjs/resources/images/default/shared/calendar.gif b/lib/web/extjs/resources/images/default/shared/calendar.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/shared/calendar.gif rename to lib/web/extjs/resources/images/default/shared/calendar.gif diff --git a/pub/lib/extjs/resources/images/default/shared/glass-bg.gif b/lib/web/extjs/resources/images/default/shared/glass-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/shared/glass-bg.gif rename to lib/web/extjs/resources/images/default/shared/glass-bg.gif diff --git a/pub/lib/extjs/resources/images/default/shared/left-btn.gif b/lib/web/extjs/resources/images/default/shared/left-btn.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/shared/left-btn.gif rename to lib/web/extjs/resources/images/default/shared/left-btn.gif diff --git a/pub/lib/extjs/resources/images/default/shared/right-btn.gif b/lib/web/extjs/resources/images/default/shared/right-btn.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/shared/right-btn.gif rename to lib/web/extjs/resources/images/default/shared/right-btn.gif diff --git a/pub/lib/extjs/resources/images/default/shared/warning.gif b/lib/web/extjs/resources/images/default/shared/warning.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/shared/warning.gif rename to lib/web/extjs/resources/images/default/shared/warning.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/e-handle-dark.gif b/lib/web/extjs/resources/images/default/sizer/e-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/e-handle-dark.gif rename to lib/web/extjs/resources/images/default/sizer/e-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/e-handle.gif b/lib/web/extjs/resources/images/default/sizer/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/e-handle.gif rename to lib/web/extjs/resources/images/default/sizer/e-handle.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/ne-handle-dark.gif b/lib/web/extjs/resources/images/default/sizer/ne-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/ne-handle-dark.gif rename to lib/web/extjs/resources/images/default/sizer/ne-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/ne-handle.gif b/lib/web/extjs/resources/images/default/sizer/ne-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/ne-handle.gif rename to lib/web/extjs/resources/images/default/sizer/ne-handle.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/nw-handle-dark.gif b/lib/web/extjs/resources/images/default/sizer/nw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/nw-handle-dark.gif rename to lib/web/extjs/resources/images/default/sizer/nw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/nw-handle.gif b/lib/web/extjs/resources/images/default/sizer/nw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/nw-handle.gif rename to lib/web/extjs/resources/images/default/sizer/nw-handle.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/s-handle-dark.gif b/lib/web/extjs/resources/images/default/sizer/s-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/s-handle-dark.gif rename to lib/web/extjs/resources/images/default/sizer/s-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/s-handle.gif b/lib/web/extjs/resources/images/default/sizer/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/s-handle.gif rename to lib/web/extjs/resources/images/default/sizer/s-handle.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/se-handle-dark.gif b/lib/web/extjs/resources/images/default/sizer/se-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/se-handle-dark.gif rename to lib/web/extjs/resources/images/default/sizer/se-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/se-handle.gif b/lib/web/extjs/resources/images/default/sizer/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/se-handle.gif rename to lib/web/extjs/resources/images/default/sizer/se-handle.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/square.gif b/lib/web/extjs/resources/images/default/sizer/square.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/square.gif rename to lib/web/extjs/resources/images/default/sizer/square.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/sw-handle-dark.gif b/lib/web/extjs/resources/images/default/sizer/sw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/sw-handle-dark.gif rename to lib/web/extjs/resources/images/default/sizer/sw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/default/sizer/sw-handle.gif b/lib/web/extjs/resources/images/default/sizer/sw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/sizer/sw-handle.gif rename to lib/web/extjs/resources/images/default/sizer/sw-handle.gif diff --git a/pub/lib/extjs/resources/images/default/tabs/tab-btm-inactive-left-bg.gif b/lib/web/extjs/resources/images/default/tabs/tab-btm-inactive-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tabs/tab-btm-inactive-left-bg.gif rename to lib/web/extjs/resources/images/default/tabs/tab-btm-inactive-left-bg.gif diff --git a/pub/lib/extjs/resources/images/default/tabs/tab-btm-inactive-right-bg.gif b/lib/web/extjs/resources/images/default/tabs/tab-btm-inactive-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tabs/tab-btm-inactive-right-bg.gif rename to lib/web/extjs/resources/images/default/tabs/tab-btm-inactive-right-bg.gif diff --git a/pub/lib/extjs/resources/images/default/tabs/tab-btm-left-bg.gif b/lib/web/extjs/resources/images/default/tabs/tab-btm-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tabs/tab-btm-left-bg.gif rename to lib/web/extjs/resources/images/default/tabs/tab-btm-left-bg.gif diff --git a/pub/lib/extjs/resources/images/default/tabs/tab-btm-right-bg.gif b/lib/web/extjs/resources/images/default/tabs/tab-btm-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tabs/tab-btm-right-bg.gif rename to lib/web/extjs/resources/images/default/tabs/tab-btm-right-bg.gif diff --git a/pub/lib/extjs/resources/images/default/tabs/tab-sprite.gif b/lib/web/extjs/resources/images/default/tabs/tab-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tabs/tab-sprite.gif rename to lib/web/extjs/resources/images/default/tabs/tab-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/toolbar/btn-arrow-light.gif b/lib/web/extjs/resources/images/default/toolbar/btn-arrow-light.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/toolbar/btn-arrow-light.gif rename to lib/web/extjs/resources/images/default/toolbar/btn-arrow-light.gif diff --git a/pub/lib/extjs/resources/images/default/toolbar/btn-arrow.gif b/lib/web/extjs/resources/images/default/toolbar/btn-arrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/toolbar/btn-arrow.gif rename to lib/web/extjs/resources/images/default/toolbar/btn-arrow.gif diff --git a/pub/lib/extjs/resources/images/default/toolbar/btn-over-bg.gif b/lib/web/extjs/resources/images/default/toolbar/btn-over-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/toolbar/btn-over-bg.gif rename to lib/web/extjs/resources/images/default/toolbar/btn-over-bg.gif diff --git a/pub/lib/extjs/resources/images/default/toolbar/gray-bg.gif b/lib/web/extjs/resources/images/default/toolbar/gray-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/toolbar/gray-bg.gif rename to lib/web/extjs/resources/images/default/toolbar/gray-bg.gif diff --git a/pub/lib/extjs/resources/images/default/toolbar/tb-bg.gif b/lib/web/extjs/resources/images/default/toolbar/tb-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/toolbar/tb-bg.gif rename to lib/web/extjs/resources/images/default/toolbar/tb-bg.gif diff --git a/pub/lib/extjs/resources/images/default/toolbar/tb-btn-sprite.gif b/lib/web/extjs/resources/images/default/toolbar/tb-btn-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/toolbar/tb-btn-sprite.gif rename to lib/web/extjs/resources/images/default/toolbar/tb-btn-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/tree/drop-add.gif b/lib/web/extjs/resources/images/default/tree/drop-add.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/drop-add.gif rename to lib/web/extjs/resources/images/default/tree/drop-add.gif diff --git a/pub/lib/extjs/resources/images/default/tree/drop-between.gif b/lib/web/extjs/resources/images/default/tree/drop-between.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/drop-between.gif rename to lib/web/extjs/resources/images/default/tree/drop-between.gif diff --git a/pub/lib/extjs/resources/images/default/tree/drop-no.gif b/lib/web/extjs/resources/images/default/tree/drop-no.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/drop-no.gif rename to lib/web/extjs/resources/images/default/tree/drop-no.gif diff --git a/pub/lib/extjs/resources/images/default/tree/drop-over.gif b/lib/web/extjs/resources/images/default/tree/drop-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/drop-over.gif rename to lib/web/extjs/resources/images/default/tree/drop-over.gif diff --git a/pub/lib/extjs/resources/images/default/tree/drop-under.gif b/lib/web/extjs/resources/images/default/tree/drop-under.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/drop-under.gif rename to lib/web/extjs/resources/images/default/tree/drop-under.gif diff --git a/pub/lib/extjs/resources/images/default/tree/drop-yes.gif b/lib/web/extjs/resources/images/default/tree/drop-yes.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/drop-yes.gif rename to lib/web/extjs/resources/images/default/tree/drop-yes.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-end-minus-nl.gif b/lib/web/extjs/resources/images/default/tree/elbow-end-minus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-end-minus-nl.gif rename to lib/web/extjs/resources/images/default/tree/elbow-end-minus-nl.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-end-minus.gif b/lib/web/extjs/resources/images/default/tree/elbow-end-minus.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-end-minus.gif rename to lib/web/extjs/resources/images/default/tree/elbow-end-minus.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-end-plus-nl.gif b/lib/web/extjs/resources/images/default/tree/elbow-end-plus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-end-plus-nl.gif rename to lib/web/extjs/resources/images/default/tree/elbow-end-plus-nl.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-end-plus.gif b/lib/web/extjs/resources/images/default/tree/elbow-end-plus.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-end-plus.gif rename to lib/web/extjs/resources/images/default/tree/elbow-end-plus.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-end.gif b/lib/web/extjs/resources/images/default/tree/elbow-end.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-end.gif rename to lib/web/extjs/resources/images/default/tree/elbow-end.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-line.gif b/lib/web/extjs/resources/images/default/tree/elbow-line.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-line.gif rename to lib/web/extjs/resources/images/default/tree/elbow-line.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-minus-nl.gif b/lib/web/extjs/resources/images/default/tree/elbow-minus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-minus-nl.gif rename to lib/web/extjs/resources/images/default/tree/elbow-minus-nl.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-minus.gif b/lib/web/extjs/resources/images/default/tree/elbow-minus.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-minus.gif rename to lib/web/extjs/resources/images/default/tree/elbow-minus.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-plus-nl.gif b/lib/web/extjs/resources/images/default/tree/elbow-plus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-plus-nl.gif rename to lib/web/extjs/resources/images/default/tree/elbow-plus-nl.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow-plus.gif b/lib/web/extjs/resources/images/default/tree/elbow-plus.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow-plus.gif rename to lib/web/extjs/resources/images/default/tree/elbow-plus.gif diff --git a/pub/lib/extjs/resources/images/default/tree/elbow.gif b/lib/web/extjs/resources/images/default/tree/elbow.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/elbow.gif rename to lib/web/extjs/resources/images/default/tree/elbow.gif diff --git a/pub/lib/extjs/resources/images/default/tree/folder-open.gif b/lib/web/extjs/resources/images/default/tree/folder-open.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/folder-open.gif rename to lib/web/extjs/resources/images/default/tree/folder-open.gif diff --git a/pub/lib/extjs/resources/images/default/tree/folder.gif b/lib/web/extjs/resources/images/default/tree/folder.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/folder.gif rename to lib/web/extjs/resources/images/default/tree/folder.gif diff --git a/pub/lib/extjs/resources/images/default/tree/leaf.gif b/lib/web/extjs/resources/images/default/tree/leaf.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/leaf.gif rename to lib/web/extjs/resources/images/default/tree/leaf.gif diff --git a/pub/lib/extjs/resources/images/default/tree/loading.gif b/lib/web/extjs/resources/images/default/tree/loading.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/loading.gif rename to lib/web/extjs/resources/images/default/tree/loading.gif diff --git a/pub/lib/extjs/resources/images/default/tree/s.gif b/lib/web/extjs/resources/images/default/tree/s.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/tree/s.gif rename to lib/web/extjs/resources/images/default/tree/s.gif diff --git a/pub/lib/extjs/resources/images/default/window/corners-sprite.gif b/lib/web/extjs/resources/images/default/window/corners-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/window/corners-sprite.gif rename to lib/web/extjs/resources/images/default/window/corners-sprite.gif diff --git a/pub/lib/extjs/resources/images/default/window/left-right.gif b/lib/web/extjs/resources/images/default/window/left-right.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/window/left-right.gif rename to lib/web/extjs/resources/images/default/window/left-right.gif diff --git a/pub/lib/extjs/resources/images/default/window/top-bottom.gif b/lib/web/extjs/resources/images/default/window/top-bottom.gif similarity index 100% rename from pub/lib/extjs/resources/images/default/window/top-bottom.gif rename to lib/web/extjs/resources/images/default/window/top-bottom.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/close-over.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/close-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/close-over.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/close-over.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/close.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/close.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/close.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/close.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/collapse-over.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/collapse-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/collapse-over.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/collapse-over.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/collapse.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/collapse.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/collapse.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/e-handle.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/e-handle.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/e-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/expand-over.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/expand-over.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/expand-over.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/expand-over.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/expand.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/expand.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/expand.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/gradient-bg.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/gradient-bg.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/hd-sprite.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/hd-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/hd-sprite.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/hd-sprite.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/s-handle.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/s-handle.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/s-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/se-handle.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/se-handle.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/se-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/basic-dialog/sw-handle.gif b/lib/web/extjs/resources/images/galdaka/basic-dialog/sw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/basic-dialog/sw-handle.gif rename to lib/web/extjs/resources/images/galdaka/basic-dialog/sw-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/form/choose-trigger.gif b/lib/web/extjs/resources/images/galdaka/form/choose-trigger.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/form/choose-trigger.gif rename to lib/web/extjs/resources/images/galdaka/form/choose-trigger.gif diff --git a/pub/lib/extjs/resources/images/galdaka/form/date-trigger.gif b/lib/web/extjs/resources/images/galdaka/form/date-trigger.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/form/date-trigger.gif rename to lib/web/extjs/resources/images/galdaka/form/date-trigger.gif diff --git a/pub/lib/extjs/resources/images/galdaka/form/trigger.gif b/lib/web/extjs/resources/images/galdaka/form/trigger.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/form/trigger.gif rename to lib/web/extjs/resources/images/galdaka/form/trigger.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/col-move-bottom.gif b/lib/web/extjs/resources/images/galdaka/grid/col-move-bottom.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/col-move-bottom.gif rename to lib/web/extjs/resources/images/galdaka/grid/col-move-bottom.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/col-move-top.gif b/lib/web/extjs/resources/images/galdaka/grid/col-move-top.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/col-move-top.gif rename to lib/web/extjs/resources/images/galdaka/grid/col-move-top.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/done.gif b/lib/web/extjs/resources/images/galdaka/grid/done.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/done.gif rename to lib/web/extjs/resources/images/galdaka/grid/done.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/fondoCabeceraHover.gif b/lib/web/extjs/resources/images/galdaka/grid/fondoCabeceraHover.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/fondoCabeceraHover.gif rename to lib/web/extjs/resources/images/galdaka/grid/fondoCabeceraHover.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/grid-hrow.gif b/lib/web/extjs/resources/images/galdaka/grid/grid-hrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/grid-hrow.gif rename to lib/web/extjs/resources/images/galdaka/grid/grid-hrow.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/loading.gif b/lib/web/extjs/resources/images/galdaka/grid/loading.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/loading.gif rename to lib/web/extjs/resources/images/galdaka/grid/loading.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/page-first.gif b/lib/web/extjs/resources/images/galdaka/grid/page-first.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/page-first.gif rename to lib/web/extjs/resources/images/galdaka/grid/page-first.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/page-last.gif b/lib/web/extjs/resources/images/galdaka/grid/page-last.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/page-last.gif rename to lib/web/extjs/resources/images/galdaka/grid/page-last.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/page-next.gif b/lib/web/extjs/resources/images/galdaka/grid/page-next.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/page-next.gif rename to lib/web/extjs/resources/images/galdaka/grid/page-next.gif diff --git a/pub/lib/extjs/resources/images/galdaka/grid/page-prev.gif b/lib/web/extjs/resources/images/galdaka/grid/page-prev.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/grid/page-prev.gif rename to lib/web/extjs/resources/images/galdaka/grid/page-prev.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/collapse.gif b/lib/web/extjs/resources/images/galdaka/layout/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/collapse.gif rename to lib/web/extjs/resources/images/galdaka/layout/collapse.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/e-handle.gif b/lib/web/extjs/resources/images/galdaka/layout/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/e-handle.gif rename to lib/web/extjs/resources/images/galdaka/layout/e-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/expand.gif b/lib/web/extjs/resources/images/galdaka/layout/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/expand.gif rename to lib/web/extjs/resources/images/galdaka/layout/expand.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/gradient-bg.gif b/lib/web/extjs/resources/images/galdaka/layout/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/gradient-bg.gif rename to lib/web/extjs/resources/images/galdaka/layout/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/ns-collapse.gif b/lib/web/extjs/resources/images/galdaka/layout/ns-collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/ns-collapse.gif rename to lib/web/extjs/resources/images/galdaka/layout/ns-collapse.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/ns-expand.gif b/lib/web/extjs/resources/images/galdaka/layout/ns-expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/ns-expand.gif rename to lib/web/extjs/resources/images/galdaka/layout/ns-expand.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/panel-close.gif b/lib/web/extjs/resources/images/galdaka/layout/panel-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/panel-close.gif rename to lib/web/extjs/resources/images/galdaka/layout/panel-close.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/panel-title-light-bg.gif b/lib/web/extjs/resources/images/galdaka/layout/panel-title-light-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/panel-title-light-bg.gif rename to lib/web/extjs/resources/images/galdaka/layout/panel-title-light-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/s-handle.gif b/lib/web/extjs/resources/images/galdaka/layout/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/s-handle.gif rename to lib/web/extjs/resources/images/galdaka/layout/s-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/stick.gif b/lib/web/extjs/resources/images/galdaka/layout/stick.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/stick.gif rename to lib/web/extjs/resources/images/galdaka/layout/stick.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/tab-close-on.gif b/lib/web/extjs/resources/images/galdaka/layout/tab-close-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/tab-close-on.gif rename to lib/web/extjs/resources/images/galdaka/layout/tab-close-on.gif diff --git a/pub/lib/extjs/resources/images/galdaka/layout/tab-close.gif b/lib/web/extjs/resources/images/galdaka/layout/tab-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/layout/tab-close.gif rename to lib/web/extjs/resources/images/galdaka/layout/tab-close.gif diff --git a/pub/lib/extjs/resources/images/galdaka/menu/checked.gif b/lib/web/extjs/resources/images/galdaka/menu/checked.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/menu/checked.gif rename to lib/web/extjs/resources/images/galdaka/menu/checked.gif diff --git a/pub/lib/extjs/resources/images/galdaka/menu/group-checked.gif b/lib/web/extjs/resources/images/galdaka/menu/group-checked.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/menu/group-checked.gif rename to lib/web/extjs/resources/images/galdaka/menu/group-checked.gif diff --git a/pub/lib/extjs/resources/images/galdaka/menu/menu-parent.gif b/lib/web/extjs/resources/images/galdaka/menu/menu-parent.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/menu/menu-parent.gif rename to lib/web/extjs/resources/images/galdaka/menu/menu-parent.gif diff --git a/pub/lib/extjs/resources/images/galdaka/menu/menu.gif b/lib/web/extjs/resources/images/galdaka/menu/menu.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/menu/menu.gif rename to lib/web/extjs/resources/images/galdaka/menu/menu.gif diff --git a/pub/lib/extjs/resources/images/galdaka/menu/unchecked.gif b/lib/web/extjs/resources/images/galdaka/menu/unchecked.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/menu/unchecked.gif rename to lib/web/extjs/resources/images/galdaka/menu/unchecked.gif diff --git a/pub/lib/extjs/resources/images/galdaka/qtip/tip-sprite.gif b/lib/web/extjs/resources/images/galdaka/qtip/tip-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/qtip/tip-sprite.gif rename to lib/web/extjs/resources/images/galdaka/qtip/tip-sprite.gif diff --git a/pub/lib/extjs/resources/images/galdaka/shared/left-btn.gif b/lib/web/extjs/resources/images/galdaka/shared/left-btn.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/shared/left-btn.gif rename to lib/web/extjs/resources/images/galdaka/shared/left-btn.gif diff --git a/pub/lib/extjs/resources/images/galdaka/shared/right-btn.gif b/lib/web/extjs/resources/images/galdaka/shared/right-btn.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/shared/right-btn.gif rename to lib/web/extjs/resources/images/galdaka/shared/right-btn.gif diff --git a/pub/lib/extjs/resources/images/galdaka/sizer/ne-handle.gif b/lib/web/extjs/resources/images/galdaka/sizer/ne-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/sizer/ne-handle.gif rename to lib/web/extjs/resources/images/galdaka/sizer/ne-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/sizer/nw-handle.gif b/lib/web/extjs/resources/images/galdaka/sizer/nw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/sizer/nw-handle.gif rename to lib/web/extjs/resources/images/galdaka/sizer/nw-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/sizer/s-handle.gif b/lib/web/extjs/resources/images/galdaka/sizer/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/sizer/s-handle.gif rename to lib/web/extjs/resources/images/galdaka/sizer/s-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/sizer/se-handle.gif b/lib/web/extjs/resources/images/galdaka/sizer/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/sizer/se-handle.gif rename to lib/web/extjs/resources/images/galdaka/sizer/se-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/sizer/sw-handle.gif b/lib/web/extjs/resources/images/galdaka/sizer/sw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/sizer/sw-handle.gif rename to lib/web/extjs/resources/images/galdaka/sizer/sw-handle.gif diff --git a/pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-inactive-left-bg.gif b/lib/web/extjs/resources/images/galdaka/tabs/tab-btm-inactive-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-inactive-left-bg.gif rename to lib/web/extjs/resources/images/galdaka/tabs/tab-btm-inactive-left-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-inactive-right-bg.gif b/lib/web/extjs/resources/images/galdaka/tabs/tab-btm-inactive-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-inactive-right-bg.gif rename to lib/web/extjs/resources/images/galdaka/tabs/tab-btm-inactive-right-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-left-bg.gif b/lib/web/extjs/resources/images/galdaka/tabs/tab-btm-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-left-bg.gif rename to lib/web/extjs/resources/images/galdaka/tabs/tab-btm-left-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-right-bg.gif b/lib/web/extjs/resources/images/galdaka/tabs/tab-btm-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/tabs/tab-btm-right-bg.gif rename to lib/web/extjs/resources/images/galdaka/tabs/tab-btm-right-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/tabs/tab-sprite.gif b/lib/web/extjs/resources/images/galdaka/tabs/tab-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/tabs/tab-sprite.gif rename to lib/web/extjs/resources/images/galdaka/tabs/tab-sprite.gif diff --git a/pub/lib/extjs/resources/images/galdaka/toolbar/btn-arrow.gif b/lib/web/extjs/resources/images/galdaka/toolbar/btn-arrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/toolbar/btn-arrow.gif rename to lib/web/extjs/resources/images/galdaka/toolbar/btn-arrow.gif diff --git a/pub/lib/extjs/resources/images/galdaka/toolbar/btn-over-bg.gif b/lib/web/extjs/resources/images/galdaka/toolbar/btn-over-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/toolbar/btn-over-bg.gif rename to lib/web/extjs/resources/images/galdaka/toolbar/btn-over-bg.gif diff --git a/pub/lib/extjs/resources/images/galdaka/toolbar/fondoToolbar.gif b/lib/web/extjs/resources/images/galdaka/toolbar/fondoToolbar.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/toolbar/fondoToolbar.gif rename to lib/web/extjs/resources/images/galdaka/toolbar/fondoToolbar.gif diff --git a/pub/lib/extjs/resources/images/galdaka/toolbar/tb-btn-sprite.gif b/lib/web/extjs/resources/images/galdaka/toolbar/tb-btn-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/galdaka/toolbar/tb-btn-sprite.gif rename to lib/web/extjs/resources/images/galdaka/toolbar/tb-btn-sprite.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/close.gif b/lib/web/extjs/resources/images/gray/basic-dialog/close.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/close.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/close.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/collapse.gif b/lib/web/extjs/resources/images/gray/basic-dialog/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/collapse.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/collapse.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/dlg-bg.gif b/lib/web/extjs/resources/images/gray/basic-dialog/dlg-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/dlg-bg.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/dlg-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/e-handle.gif b/lib/web/extjs/resources/images/gray/basic-dialog/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/e-handle.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/e-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/expand.gif b/lib/web/extjs/resources/images/gray/basic-dialog/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/expand.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/expand.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/hd-sprite.gif b/lib/web/extjs/resources/images/gray/basic-dialog/hd-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/hd-sprite.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/hd-sprite.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/s-handle.gif b/lib/web/extjs/resources/images/gray/basic-dialog/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/s-handle.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/s-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/basic-dialog/se-handle.gif b/lib/web/extjs/resources/images/gray/basic-dialog/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/basic-dialog/se-handle.gif rename to lib/web/extjs/resources/images/gray/basic-dialog/se-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/gradient-bg.gif b/lib/web/extjs/resources/images/gray/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/gradient-bg.gif rename to lib/web/extjs/resources/images/gray/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/grid/grid-hrow.gif b/lib/web/extjs/resources/images/gray/grid/grid-hrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/grid/grid-hrow.gif rename to lib/web/extjs/resources/images/gray/grid/grid-hrow.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/collapse.gif b/lib/web/extjs/resources/images/gray/layout/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/collapse.gif rename to lib/web/extjs/resources/images/gray/layout/collapse.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/expand.gif b/lib/web/extjs/resources/images/gray/layout/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/expand.gif rename to lib/web/extjs/resources/images/gray/layout/expand.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/gradient-bg.gif b/lib/web/extjs/resources/images/gray/layout/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/gradient-bg.gif rename to lib/web/extjs/resources/images/gray/layout/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/ns-collapse.gif b/lib/web/extjs/resources/images/gray/layout/ns-collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/ns-collapse.gif rename to lib/web/extjs/resources/images/gray/layout/ns-collapse.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/ns-expand.gif b/lib/web/extjs/resources/images/gray/layout/ns-expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/ns-expand.gif rename to lib/web/extjs/resources/images/gray/layout/ns-expand.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/panel-close.gif b/lib/web/extjs/resources/images/gray/layout/panel-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/panel-close.gif rename to lib/web/extjs/resources/images/gray/layout/panel-close.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/panel-title-bg.gif b/lib/web/extjs/resources/images/gray/layout/panel-title-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/panel-title-bg.gif rename to lib/web/extjs/resources/images/gray/layout/panel-title-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/panel-title-light-bg.gif b/lib/web/extjs/resources/images/gray/layout/panel-title-light-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/panel-title-light-bg.gif rename to lib/web/extjs/resources/images/gray/layout/panel-title-light-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/stick.gif b/lib/web/extjs/resources/images/gray/layout/stick.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/stick.gif rename to lib/web/extjs/resources/images/gray/layout/stick.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/tab-close-on.gif b/lib/web/extjs/resources/images/gray/layout/tab-close-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/tab-close-on.gif rename to lib/web/extjs/resources/images/gray/layout/tab-close-on.gif diff --git a/pub/lib/extjs/resources/images/gray/layout/tab-close.gif b/lib/web/extjs/resources/images/gray/layout/tab-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/layout/tab-close.gif rename to lib/web/extjs/resources/images/gray/layout/tab-close.gif diff --git a/pub/lib/extjs/resources/images/gray/menu/checked.gif b/lib/web/extjs/resources/images/gray/menu/checked.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/menu/checked.gif rename to lib/web/extjs/resources/images/gray/menu/checked.gif diff --git a/pub/lib/extjs/resources/images/gray/menu/group-checked.gif b/lib/web/extjs/resources/images/gray/menu/group-checked.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/menu/group-checked.gif rename to lib/web/extjs/resources/images/gray/menu/group-checked.gif diff --git a/pub/lib/extjs/resources/images/gray/menu/menu-parent.gif b/lib/web/extjs/resources/images/gray/menu/menu-parent.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/menu/menu-parent.gif rename to lib/web/extjs/resources/images/gray/menu/menu-parent.gif diff --git a/pub/lib/extjs/resources/images/gray/menu/menu.gif b/lib/web/extjs/resources/images/gray/menu/menu.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/menu/menu.gif rename to lib/web/extjs/resources/images/gray/menu/menu.gif diff --git a/pub/lib/extjs/resources/images/gray/menu/unchecked.gif b/lib/web/extjs/resources/images/gray/menu/unchecked.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/menu/unchecked.gif rename to lib/web/extjs/resources/images/gray/menu/unchecked.gif diff --git a/pub/lib/extjs/resources/images/gray/qtip/bg.gif b/lib/web/extjs/resources/images/gray/qtip/bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/qtip/bg.gif rename to lib/web/extjs/resources/images/gray/qtip/bg.gif diff --git a/pub/lib/extjs/resources/images/gray/qtip/tip-sprite.gif b/lib/web/extjs/resources/images/gray/qtip/tip-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/qtip/tip-sprite.gif rename to lib/web/extjs/resources/images/gray/qtip/tip-sprite.gif diff --git a/pub/lib/extjs/resources/images/gray/s.gif b/lib/web/extjs/resources/images/gray/s.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/s.gif rename to lib/web/extjs/resources/images/gray/s.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/e-handle-dark.gif b/lib/web/extjs/resources/images/gray/sizer/e-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/e-handle-dark.gif rename to lib/web/extjs/resources/images/gray/sizer/e-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/e-handle.gif b/lib/web/extjs/resources/images/gray/sizer/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/e-handle.gif rename to lib/web/extjs/resources/images/gray/sizer/e-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/ne-handle-dark.gif b/lib/web/extjs/resources/images/gray/sizer/ne-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/ne-handle-dark.gif rename to lib/web/extjs/resources/images/gray/sizer/ne-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/ne-handle.gif b/lib/web/extjs/resources/images/gray/sizer/ne-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/ne-handle.gif rename to lib/web/extjs/resources/images/gray/sizer/ne-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/nw-handle-dark.gif b/lib/web/extjs/resources/images/gray/sizer/nw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/nw-handle-dark.gif rename to lib/web/extjs/resources/images/gray/sizer/nw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/nw-handle.gif b/lib/web/extjs/resources/images/gray/sizer/nw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/nw-handle.gif rename to lib/web/extjs/resources/images/gray/sizer/nw-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/s-handle-dark.gif b/lib/web/extjs/resources/images/gray/sizer/s-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/s-handle-dark.gif rename to lib/web/extjs/resources/images/gray/sizer/s-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/s-handle.gif b/lib/web/extjs/resources/images/gray/sizer/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/s-handle.gif rename to lib/web/extjs/resources/images/gray/sizer/s-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/se-handle-dark.gif b/lib/web/extjs/resources/images/gray/sizer/se-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/se-handle-dark.gif rename to lib/web/extjs/resources/images/gray/sizer/se-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/se-handle.gif b/lib/web/extjs/resources/images/gray/sizer/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/se-handle.gif rename to lib/web/extjs/resources/images/gray/sizer/se-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/sw-handle-dark.gif b/lib/web/extjs/resources/images/gray/sizer/sw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/sw-handle-dark.gif rename to lib/web/extjs/resources/images/gray/sizer/sw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/gray/sizer/sw-handle.gif b/lib/web/extjs/resources/images/gray/sizer/sw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/sizer/sw-handle.gif rename to lib/web/extjs/resources/images/gray/sizer/sw-handle.gif diff --git a/pub/lib/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif b/lib/web/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif rename to lib/web/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif b/lib/web/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif rename to lib/web/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif b/lib/web/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif rename to lib/web/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif b/lib/web/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif rename to lib/web/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/tabs/tab-sprite.gif b/lib/web/extjs/resources/images/gray/tabs/tab-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/tabs/tab-sprite.gif rename to lib/web/extjs/resources/images/gray/tabs/tab-sprite.gif diff --git a/pub/lib/extjs/resources/images/gray/toolbar/gray-bg.gif b/lib/web/extjs/resources/images/gray/toolbar/gray-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/toolbar/gray-bg.gif rename to lib/web/extjs/resources/images/gray/toolbar/gray-bg.gif diff --git a/pub/lib/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif b/lib/web/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif rename to lib/web/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/collapse-on.gif b/lib/web/extjs/resources/images/magento/basic-dialog/collapse-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/collapse-on.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/collapse-on.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/collapse.gif b/lib/web/extjs/resources/images/magento/basic-dialog/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/collapse.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/collapse.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/expand-on.gif b/lib/web/extjs/resources/images/magento/basic-dialog/expand-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/expand-on.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/expand-on.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/expand.gif b/lib/web/extjs/resources/images/magento/basic-dialog/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/expand.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/expand.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/hd-sprite.gif b/lib/web/extjs/resources/images/magento/basic-dialog/hd-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/hd-sprite.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/hd-sprite.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/ns-collapse-on.gif b/lib/web/extjs/resources/images/magento/basic-dialog/ns-collapse-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/ns-collapse-on.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/ns-collapse-on.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/ns-collapse.gif b/lib/web/extjs/resources/images/magento/basic-dialog/ns-collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/ns-collapse.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/ns-collapse.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/ns-expand-on.gif b/lib/web/extjs/resources/images/magento/basic-dialog/ns-expand-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/ns-expand-on.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/ns-expand-on.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/ns-expand.gif b/lib/web/extjs/resources/images/magento/basic-dialog/ns-expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/ns-expand.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/ns-expand.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/panel_close.gif b/lib/web/extjs/resources/images/magento/basic-dialog/panel_close.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/panel_close.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/panel_close.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/pop_close.gif b/lib/web/extjs/resources/images/magento/basic-dialog/pop_close.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/pop_close.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/pop_close.gif diff --git a/pub/lib/extjs/resources/images/magento/basic-dialog/pop_collapse.gif b/lib/web/extjs/resources/images/magento/basic-dialog/pop_collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/basic-dialog/pop_collapse.gif rename to lib/web/extjs/resources/images/magento/basic-dialog/pop_collapse.gif diff --git a/pub/lib/extjs/resources/images/magento/grid/grid-body-bg.gif b/lib/web/extjs/resources/images/magento/grid/grid-body-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/grid/grid-body-bg.gif rename to lib/web/extjs/resources/images/magento/grid/grid-body-bg.gif diff --git a/pub/lib/extjs/resources/images/magento/grid/grid-split.gif b/lib/web/extjs/resources/images/magento/grid/grid-split.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/grid/grid-split.gif rename to lib/web/extjs/resources/images/magento/grid/grid-split.gif diff --git a/pub/lib/extjs/resources/images/magento/layout/checkered-bg.gif b/lib/web/extjs/resources/images/magento/layout/checkered-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/layout/checkered-bg.gif rename to lib/web/extjs/resources/images/magento/layout/checkered-bg.gif diff --git a/pub/lib/extjs/resources/images/magento/layout/icon-catalog.gif b/lib/web/extjs/resources/images/magento/layout/icon-catalog.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/layout/icon-catalog.gif rename to lib/web/extjs/resources/images/magento/layout/icon-catalog.gif diff --git a/pub/lib/extjs/resources/images/magento/layout/icon-category.gif b/lib/web/extjs/resources/images/magento/layout/icon-category.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/layout/icon-category.gif rename to lib/web/extjs/resources/images/magento/layout/icon-category.gif diff --git a/pub/lib/extjs/resources/images/magento/layout/icon-my-tasks.gif b/lib/web/extjs/resources/images/magento/layout/icon-my-tasks.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/layout/icon-my-tasks.gif rename to lib/web/extjs/resources/images/magento/layout/icon-my-tasks.gif diff --git a/pub/lib/extjs/resources/images/magento/layout/icon-product.gif b/lib/web/extjs/resources/images/magento/layout/icon-product.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/layout/icon-product.gif rename to lib/web/extjs/resources/images/magento/layout/icon-product.gif diff --git a/pub/lib/extjs/resources/images/magento/loading_bg.gif b/lib/web/extjs/resources/images/magento/loading_bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/loading_bg.gif rename to lib/web/extjs/resources/images/magento/loading_bg.gif diff --git a/pub/lib/extjs/resources/images/magento/tabs/tab-sprite.gif b/lib/web/extjs/resources/images/magento/tabs/tab-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tabs/tab-sprite.gif rename to lib/web/extjs/resources/images/magento/tabs/tab-sprite.gif diff --git a/pub/lib/extjs/resources/images/magento/toolbar/btn-arrow.gif b/lib/web/extjs/resources/images/magento/toolbar/btn-arrow.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/toolbar/btn-arrow.gif rename to lib/web/extjs/resources/images/magento/toolbar/btn-arrow.gif diff --git a/pub/lib/extjs/resources/images/magento/toolbar/header_bg.gif b/lib/web/extjs/resources/images/magento/toolbar/header_bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/toolbar/header_bg.gif rename to lib/web/extjs/resources/images/magento/toolbar/header_bg.gif diff --git a/pub/lib/extjs/resources/images/magento/toolbar/toolbar-bg.gif b/lib/web/extjs/resources/images/magento/toolbar/toolbar-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/toolbar/toolbar-bg.gif rename to lib/web/extjs/resources/images/magento/toolbar/toolbar-bg.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-end-minus-nl.gif b/lib/web/extjs/resources/images/magento/tree/elbow-end-minus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-end-minus-nl.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-end-minus-nl.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-end-minus.gif b/lib/web/extjs/resources/images/magento/tree/elbow-end-minus.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-end-minus.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-end-minus.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-end-plus-nl.gif b/lib/web/extjs/resources/images/magento/tree/elbow-end-plus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-end-plus-nl.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-end-plus-nl.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-end-plus.gif b/lib/web/extjs/resources/images/magento/tree/elbow-end-plus.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-end-plus.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-end-plus.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-end.gif b/lib/web/extjs/resources/images/magento/tree/elbow-end.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-end.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-end.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-line.gif b/lib/web/extjs/resources/images/magento/tree/elbow-line.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-line.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-line.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-minus-nl.gif b/lib/web/extjs/resources/images/magento/tree/elbow-minus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-minus-nl.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-minus-nl.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-minus.gif b/lib/web/extjs/resources/images/magento/tree/elbow-minus.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-minus.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-minus.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-plus-nl.gif b/lib/web/extjs/resources/images/magento/tree/elbow-plus-nl.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-plus-nl.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-plus-nl.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow-plus.gif b/lib/web/extjs/resources/images/magento/tree/elbow-plus.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow-plus.gif rename to lib/web/extjs/resources/images/magento/tree/elbow-plus.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/elbow.gif b/lib/web/extjs/resources/images/magento/tree/elbow.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/elbow.gif rename to lib/web/extjs/resources/images/magento/tree/elbow.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/folder-open.gif b/lib/web/extjs/resources/images/magento/tree/folder-open.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/folder-open.gif rename to lib/web/extjs/resources/images/magento/tree/folder-open.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/folder.gif b/lib/web/extjs/resources/images/magento/tree/folder.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/folder.gif rename to lib/web/extjs/resources/images/magento/tree/folder.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/leaf.gif b/lib/web/extjs/resources/images/magento/tree/leaf.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/leaf.gif rename to lib/web/extjs/resources/images/magento/tree/leaf.gif diff --git a/pub/lib/extjs/resources/images/magento/tree/s.gif b/lib/web/extjs/resources/images/magento/tree/s.gif similarity index 100% rename from pub/lib/extjs/resources/images/magento/tree/s.gif rename to lib/web/extjs/resources/images/magento/tree/s.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/bg-center.gif b/lib/web/extjs/resources/images/vista/basic-dialog/bg-center.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/bg-center.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/bg-center.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/bg-left.gif b/lib/web/extjs/resources/images/vista/basic-dialog/bg-left.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/bg-left.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/bg-left.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/bg-right.gif b/lib/web/extjs/resources/images/vista/basic-dialog/bg-right.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/bg-right.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/bg-right.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/close.gif b/lib/web/extjs/resources/images/vista/basic-dialog/close.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/close.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/close.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/collapse.gif b/lib/web/extjs/resources/images/vista/basic-dialog/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/collapse.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/collapse.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/dlg-bg.gif b/lib/web/extjs/resources/images/vista/basic-dialog/dlg-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/dlg-bg.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/dlg-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/e-handle.gif b/lib/web/extjs/resources/images/vista/basic-dialog/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/e-handle.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/e-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/expand.gif b/lib/web/extjs/resources/images/vista/basic-dialog/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/expand.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/expand.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/hd-sprite.gif b/lib/web/extjs/resources/images/vista/basic-dialog/hd-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/hd-sprite.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/hd-sprite.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/s-handle.gif b/lib/web/extjs/resources/images/vista/basic-dialog/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/s-handle.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/s-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/se-handle.gif b/lib/web/extjs/resources/images/vista/basic-dialog/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/se-handle.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/se-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/basic-dialog/w-handle.gif b/lib/web/extjs/resources/images/vista/basic-dialog/w-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/basic-dialog/w-handle.gif rename to lib/web/extjs/resources/images/vista/basic-dialog/w-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/gradient-bg.gif b/lib/web/extjs/resources/images/vista/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/gradient-bg.gif rename to lib/web/extjs/resources/images/vista/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/grid/grid-split.gif b/lib/web/extjs/resources/images/vista/grid/grid-split.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/grid/grid-split.gif rename to lib/web/extjs/resources/images/vista/grid/grid-split.gif diff --git a/pub/lib/extjs/resources/images/vista/grid/grid-vista-hd.gif b/lib/web/extjs/resources/images/vista/grid/grid-vista-hd.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/grid/grid-vista-hd.gif rename to lib/web/extjs/resources/images/vista/grid/grid-vista-hd.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/collapse.gif b/lib/web/extjs/resources/images/vista/layout/collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/collapse.gif rename to lib/web/extjs/resources/images/vista/layout/collapse.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/expand.gif b/lib/web/extjs/resources/images/vista/layout/expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/expand.gif rename to lib/web/extjs/resources/images/vista/layout/expand.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/gradient-bg.gif b/lib/web/extjs/resources/images/vista/layout/gradient-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/gradient-bg.gif rename to lib/web/extjs/resources/images/vista/layout/gradient-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/ns-collapse.gif b/lib/web/extjs/resources/images/vista/layout/ns-collapse.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/ns-collapse.gif rename to lib/web/extjs/resources/images/vista/layout/ns-collapse.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/ns-expand.gif b/lib/web/extjs/resources/images/vista/layout/ns-expand.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/ns-expand.gif rename to lib/web/extjs/resources/images/vista/layout/ns-expand.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/panel-close.gif b/lib/web/extjs/resources/images/vista/layout/panel-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/panel-close.gif rename to lib/web/extjs/resources/images/vista/layout/panel-close.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/panel-title-bg.gif b/lib/web/extjs/resources/images/vista/layout/panel-title-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/panel-title-bg.gif rename to lib/web/extjs/resources/images/vista/layout/panel-title-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/panel-title-light-bg.gif b/lib/web/extjs/resources/images/vista/layout/panel-title-light-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/panel-title-light-bg.gif rename to lib/web/extjs/resources/images/vista/layout/panel-title-light-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/stick.gif b/lib/web/extjs/resources/images/vista/layout/stick.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/stick.gif rename to lib/web/extjs/resources/images/vista/layout/stick.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/tab-close-on.gif b/lib/web/extjs/resources/images/vista/layout/tab-close-on.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/tab-close-on.gif rename to lib/web/extjs/resources/images/vista/layout/tab-close-on.gif diff --git a/pub/lib/extjs/resources/images/vista/layout/tab-close.gif b/lib/web/extjs/resources/images/vista/layout/tab-close.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/layout/tab-close.gif rename to lib/web/extjs/resources/images/vista/layout/tab-close.gif diff --git a/pub/lib/extjs/resources/images/vista/qtip/bg.gif b/lib/web/extjs/resources/images/vista/qtip/bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/qtip/bg.gif rename to lib/web/extjs/resources/images/vista/qtip/bg.gif diff --git a/pub/lib/extjs/resources/images/vista/qtip/tip-sprite.gif b/lib/web/extjs/resources/images/vista/qtip/tip-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/qtip/tip-sprite.gif rename to lib/web/extjs/resources/images/vista/qtip/tip-sprite.gif diff --git a/pub/lib/extjs/resources/images/vista/s.gif b/lib/web/extjs/resources/images/vista/s.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/s.gif rename to lib/web/extjs/resources/images/vista/s.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/e-handle-dark.gif b/lib/web/extjs/resources/images/vista/sizer/e-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/e-handle-dark.gif rename to lib/web/extjs/resources/images/vista/sizer/e-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/e-handle.gif b/lib/web/extjs/resources/images/vista/sizer/e-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/e-handle.gif rename to lib/web/extjs/resources/images/vista/sizer/e-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/ne-handle-dark.gif b/lib/web/extjs/resources/images/vista/sizer/ne-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/ne-handle-dark.gif rename to lib/web/extjs/resources/images/vista/sizer/ne-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/ne-handle.gif b/lib/web/extjs/resources/images/vista/sizer/ne-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/ne-handle.gif rename to lib/web/extjs/resources/images/vista/sizer/ne-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/nw-handle-dark.gif b/lib/web/extjs/resources/images/vista/sizer/nw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/nw-handle-dark.gif rename to lib/web/extjs/resources/images/vista/sizer/nw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/nw-handle.gif b/lib/web/extjs/resources/images/vista/sizer/nw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/nw-handle.gif rename to lib/web/extjs/resources/images/vista/sizer/nw-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/s-handle-dark.gif b/lib/web/extjs/resources/images/vista/sizer/s-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/s-handle-dark.gif rename to lib/web/extjs/resources/images/vista/sizer/s-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/s-handle.gif b/lib/web/extjs/resources/images/vista/sizer/s-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/s-handle.gif rename to lib/web/extjs/resources/images/vista/sizer/s-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/se-handle-dark.gif b/lib/web/extjs/resources/images/vista/sizer/se-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/se-handle-dark.gif rename to lib/web/extjs/resources/images/vista/sizer/se-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/se-handle.gif b/lib/web/extjs/resources/images/vista/sizer/se-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/se-handle.gif rename to lib/web/extjs/resources/images/vista/sizer/se-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/sw-handle-dark.gif b/lib/web/extjs/resources/images/vista/sizer/sw-handle-dark.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/sw-handle-dark.gif rename to lib/web/extjs/resources/images/vista/sizer/sw-handle-dark.gif diff --git a/pub/lib/extjs/resources/images/vista/sizer/sw-handle.gif b/lib/web/extjs/resources/images/vista/sizer/sw-handle.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/sizer/sw-handle.gif rename to lib/web/extjs/resources/images/vista/sizer/sw-handle.gif diff --git a/pub/lib/extjs/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif b/lib/web/extjs/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif rename to lib/web/extjs/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif b/lib/web/extjs/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif rename to lib/web/extjs/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/tabs/tab-btm-left-bg.gif b/lib/web/extjs/resources/images/vista/tabs/tab-btm-left-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/tabs/tab-btm-left-bg.gif rename to lib/web/extjs/resources/images/vista/tabs/tab-btm-left-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/tabs/tab-btm-right-bg.gif b/lib/web/extjs/resources/images/vista/tabs/tab-btm-right-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/tabs/tab-btm-right-bg.gif rename to lib/web/extjs/resources/images/vista/tabs/tab-btm-right-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/tabs/tab-sprite.gif b/lib/web/extjs/resources/images/vista/tabs/tab-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/tabs/tab-sprite.gif rename to lib/web/extjs/resources/images/vista/tabs/tab-sprite.gif diff --git a/pub/lib/extjs/resources/images/vista/toolbar/gray-bg.gif b/lib/web/extjs/resources/images/vista/toolbar/gray-bg.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/toolbar/gray-bg.gif rename to lib/web/extjs/resources/images/vista/toolbar/gray-bg.gif diff --git a/pub/lib/extjs/resources/images/vista/toolbar/tb-btn-sprite.gif b/lib/web/extjs/resources/images/vista/toolbar/tb-btn-sprite.gif similarity index 100% rename from pub/lib/extjs/resources/images/vista/toolbar/tb-btn-sprite.gif rename to lib/web/extjs/resources/images/vista/toolbar/tb-btn-sprite.gif diff --git a/pub/lib/firebug/errorIcon.png b/lib/web/firebug/errorIcon.png similarity index 100% rename from pub/lib/firebug/errorIcon.png rename to lib/web/firebug/errorIcon.png diff --git a/pub/lib/firebug/firebug.css b/lib/web/firebug/firebug.css similarity index 100% rename from pub/lib/firebug/firebug.css rename to lib/web/firebug/firebug.css diff --git a/pub/lib/firebug/firebug.html b/lib/web/firebug/firebug.html similarity index 100% rename from pub/lib/firebug/firebug.html rename to lib/web/firebug/firebug.html diff --git a/pub/lib/firebug/firebug.js b/lib/web/firebug/firebug.js similarity index 100% rename from pub/lib/firebug/firebug.js rename to lib/web/firebug/firebug.js diff --git a/pub/lib/firebug/firebugx.js b/lib/web/firebug/firebugx.js similarity index 100% rename from pub/lib/firebug/firebugx.js rename to lib/web/firebug/firebugx.js diff --git a/pub/lib/firebug/infoIcon.png b/lib/web/firebug/infoIcon.png similarity index 100% rename from pub/lib/firebug/infoIcon.png rename to lib/web/firebug/infoIcon.png diff --git a/pub/lib/firebug/warningIcon.png b/lib/web/firebug/warningIcon.png similarity index 100% rename from pub/lib/firebug/warningIcon.png rename to lib/web/firebug/warningIcon.png diff --git a/pub/lib/flash/AC_RunActiveContent.js b/lib/web/flash/AC_RunActiveContent.js similarity index 100% rename from pub/lib/flash/AC_RunActiveContent.js rename to lib/web/flash/AC_RunActiveContent.js diff --git a/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot b/lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot similarity index 100% rename from pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot rename to lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot diff --git a/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.svg b/lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.svg similarity index 100% rename from pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.svg rename to lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.svg diff --git a/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.ttf b/lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.ttf similarity index 100% rename from pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.ttf rename to lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.ttf diff --git a/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff b/lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff similarity index 100% rename from pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff rename to lib/web/fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff diff --git a/pub/lib/headjs/head.min.js b/lib/web/headjs/head.min.js similarity index 100% rename from pub/lib/headjs/head.min.js rename to lib/web/headjs/head.min.js diff --git a/pub/lib/images/bkg_gallery_thumbs.png b/lib/web/images/bkg_gallery_thumbs.png similarity index 100% rename from pub/lib/images/bkg_gallery_thumbs.png rename to lib/web/images/bkg_gallery_thumbs.png diff --git a/pub/lib/images/blank-theme-icons.png b/lib/web/images/blank-theme-icons.png similarity index 100% rename from pub/lib/images/blank-theme-icons.png rename to lib/web/images/blank-theme-icons.png diff --git a/pub/lib/images/btn_remove.gif b/lib/web/images/btn_remove.gif similarity index 100% rename from pub/lib/images/btn_remove.gif rename to lib/web/images/btn_remove.gif diff --git a/pub/lib/images/btn_window_close.gif b/lib/web/images/btn_window_close.gif similarity index 100% rename from pub/lib/images/btn_window_close.gif rename to lib/web/images/btn_window_close.gif diff --git a/pub/lib/images/debug_bkg.png b/lib/web/images/debug_bkg.png similarity index 100% rename from pub/lib/images/debug_bkg.png rename to lib/web/images/debug_bkg.png diff --git a/pub/lib/images/loader-1.gif b/lib/web/images/loader-1.gif similarity index 100% rename from pub/lib/images/loader-1.gif rename to lib/web/images/loader-1.gif diff --git a/pub/lib/images/loader-2.gif b/lib/web/images/loader-2.gif similarity index 100% rename from pub/lib/images/loader-2.gif rename to lib/web/images/loader-2.gif diff --git a/pub/lib/images/logo.gif b/lib/web/images/logo.gif similarity index 100% rename from pub/lib/images/logo.gif rename to lib/web/images/logo.gif diff --git a/pub/lib/images/logo.svg b/lib/web/images/logo.svg similarity index 100% rename from pub/lib/images/logo.svg rename to lib/web/images/logo.svg diff --git a/pub/lib/images/logo_print.gif b/lib/web/images/logo_print.gif similarity index 100% rename from pub/lib/images/logo_print.gif rename to lib/web/images/logo_print.gif diff --git a/pub/lib/images/opc-ajax-loader.gif b/lib/web/images/opc-ajax-loader.gif similarity index 100% rename from pub/lib/images/opc-ajax-loader.gif rename to lib/web/images/opc-ajax-loader.gif diff --git a/pub/lib/images/pager_arrow_left.gif b/lib/web/images/pager_arrow_left.gif similarity index 100% rename from pub/lib/images/pager_arrow_left.gif rename to lib/web/images/pager_arrow_left.gif diff --git a/pub/lib/images/pager_arrow_right.gif b/lib/web/images/pager_arrow_right.gif similarity index 100% rename from pub/lib/images/pager_arrow_right.gif rename to lib/web/images/pager_arrow_right.gif diff --git a/pub/lib/images/spacer.gif b/lib/web/images/spacer.gif similarity index 100% rename from pub/lib/images/spacer.gif rename to lib/web/images/spacer.gif diff --git a/pub/lib/images/sprite-gallery.png b/lib/web/images/sprite-gallery.png similarity index 100% rename from pub/lib/images/sprite-gallery.png rename to lib/web/images/sprite-gallery.png diff --git a/pub/lib/images/sprite-gallery.svg b/lib/web/images/sprite-gallery.svg similarity index 100% rename from pub/lib/images/sprite-gallery.svg rename to lib/web/images/sprite-gallery.svg diff --git a/pub/lib/jquery/bootstrap-carousel/css/bootstrap-carousel.css b/lib/web/jquery/bootstrap-carousel/css/bootstrap-carousel.css similarity index 100% rename from pub/lib/jquery/bootstrap-carousel/css/bootstrap-carousel.css rename to lib/web/jquery/bootstrap-carousel/css/bootstrap-carousel.css diff --git a/pub/lib/jquery/bootstrap-carousel/jquery.bootstrap-carousel.js b/lib/web/jquery/bootstrap-carousel/jquery.bootstrap-carousel.js similarity index 100% rename from pub/lib/jquery/bootstrap-carousel/jquery.bootstrap-carousel.js rename to lib/web/jquery/bootstrap-carousel/jquery.bootstrap-carousel.js diff --git a/pub/lib/jquery/bootstrap-carousel/jquery.bootstrap-transition.js b/lib/web/jquery/bootstrap-carousel/jquery.bootstrap-transition.js similarity index 100% rename from pub/lib/jquery/bootstrap-carousel/jquery.bootstrap-transition.js rename to lib/web/jquery/bootstrap-carousel/jquery.bootstrap-transition.js diff --git a/pub/lib/jquery/editableMultiselect/css/jquery.multiselect.css b/lib/web/jquery/editableMultiselect/css/jquery.multiselect.css similarity index 100% rename from pub/lib/jquery/editableMultiselect/css/jquery.multiselect.css rename to lib/web/jquery/editableMultiselect/css/jquery.multiselect.css diff --git a/pub/lib/jquery/editableMultiselect/js/jquery.editable.js b/lib/web/jquery/editableMultiselect/js/jquery.editable.js similarity index 100% rename from pub/lib/jquery/editableMultiselect/js/jquery.editable.js rename to lib/web/jquery/editableMultiselect/js/jquery.editable.js diff --git a/pub/lib/jquery/editableMultiselect/js/jquery.multiselect.js b/lib/web/jquery/editableMultiselect/js/jquery.multiselect.js similarity index 100% rename from pub/lib/jquery/editableMultiselect/js/jquery.multiselect.js rename to lib/web/jquery/editableMultiselect/js/jquery.multiselect.js diff --git a/pub/lib/jquery/farbtastic/css/farbtastic.css b/lib/web/jquery/farbtastic/css/farbtastic.css similarity index 100% rename from pub/lib/jquery/farbtastic/css/farbtastic.css rename to lib/web/jquery/farbtastic/css/farbtastic.css diff --git a/pub/lib/jquery/farbtastic/images/marker.png b/lib/web/jquery/farbtastic/images/marker.png similarity index 100% rename from pub/lib/jquery/farbtastic/images/marker.png rename to lib/web/jquery/farbtastic/images/marker.png diff --git a/pub/lib/jquery/farbtastic/images/mask.png b/lib/web/jquery/farbtastic/images/mask.png similarity index 100% rename from pub/lib/jquery/farbtastic/images/mask.png rename to lib/web/jquery/farbtastic/images/mask.png diff --git a/pub/lib/jquery/farbtastic/images/wheel.png b/lib/web/jquery/farbtastic/images/wheel.png similarity index 100% rename from pub/lib/jquery/farbtastic/images/wheel.png rename to lib/web/jquery/farbtastic/images/wheel.png diff --git a/pub/lib/jquery/farbtastic/jquery.farbtastic.js b/lib/web/jquery/farbtastic/jquery.farbtastic.js similarity index 100% rename from pub/lib/jquery/farbtastic/jquery.farbtastic.js rename to lib/web/jquery/farbtastic/jquery.farbtastic.js diff --git a/pub/lib/jquery/fileUploader/canvas-to-blob.min.js b/lib/web/jquery/fileUploader/canvas-to-blob.min.js similarity index 100% rename from pub/lib/jquery/fileUploader/canvas-to-blob.min.js rename to lib/web/jquery/fileUploader/canvas-to-blob.min.js diff --git a/pub/lib/jquery/fileUploader/cors/jquery.postmessage-transport.js b/lib/web/jquery/fileUploader/cors/jquery.postmessage-transport.js similarity index 100% rename from pub/lib/jquery/fileUploader/cors/jquery.postmessage-transport.js rename to lib/web/jquery/fileUploader/cors/jquery.postmessage-transport.js diff --git a/pub/lib/jquery/fileUploader/cors/jquery.xdr-transport.js b/lib/web/jquery/fileUploader/cors/jquery.xdr-transport.js similarity index 100% rename from pub/lib/jquery/fileUploader/cors/jquery.xdr-transport.js rename to lib/web/jquery/fileUploader/cors/jquery.xdr-transport.js diff --git a/pub/lib/jquery/fileUploader/css/jquery.fileupload-ui.css b/lib/web/jquery/fileUploader/css/jquery.fileupload-ui.css similarity index 100% rename from pub/lib/jquery/fileUploader/css/jquery.fileupload-ui.css rename to lib/web/jquery/fileUploader/css/jquery.fileupload-ui.css diff --git a/pub/lib/jquery/fileUploader/img/loading.gif b/lib/web/jquery/fileUploader/img/loading.gif similarity index 100% rename from pub/lib/jquery/fileUploader/img/loading.gif rename to lib/web/jquery/fileUploader/img/loading.gif diff --git a/pub/lib/jquery/fileUploader/img/progressbar.gif b/lib/web/jquery/fileUploader/img/progressbar.gif similarity index 100% rename from pub/lib/jquery/fileUploader/img/progressbar.gif rename to lib/web/jquery/fileUploader/img/progressbar.gif diff --git a/pub/lib/jquery/fileUploader/jquery.fileupload-fp.js b/lib/web/jquery/fileUploader/jquery.fileupload-fp.js similarity index 100% rename from pub/lib/jquery/fileUploader/jquery.fileupload-fp.js rename to lib/web/jquery/fileUploader/jquery.fileupload-fp.js diff --git a/pub/lib/jquery/fileUploader/jquery.fileupload-ui.js b/lib/web/jquery/fileUploader/jquery.fileupload-ui.js similarity index 100% rename from pub/lib/jquery/fileUploader/jquery.fileupload-ui.js rename to lib/web/jquery/fileUploader/jquery.fileupload-ui.js diff --git a/pub/lib/jquery/fileUploader/jquery.fileupload.js b/lib/web/jquery/fileUploader/jquery.fileupload.js similarity index 100% rename from pub/lib/jquery/fileUploader/jquery.fileupload.js rename to lib/web/jquery/fileUploader/jquery.fileupload.js diff --git a/pub/lib/jquery/fileUploader/jquery.iframe-transport.js b/lib/web/jquery/fileUploader/jquery.iframe-transport.js similarity index 100% rename from pub/lib/jquery/fileUploader/jquery.iframe-transport.js rename to lib/web/jquery/fileUploader/jquery.iframe-transport.js diff --git a/pub/lib/jquery/fileUploader/load-image.min.js b/lib/web/jquery/fileUploader/load-image.min.js similarity index 100% rename from pub/lib/jquery/fileUploader/load-image.min.js rename to lib/web/jquery/fileUploader/load-image.min.js diff --git a/pub/lib/jquery/fileUploader/locale.js b/lib/web/jquery/fileUploader/locale.js similarity index 100% rename from pub/lib/jquery/fileUploader/locale.js rename to lib/web/jquery/fileUploader/locale.js diff --git a/pub/lib/jquery/fileUploader/main.js b/lib/web/jquery/fileUploader/main.js similarity index 100% rename from pub/lib/jquery/fileUploader/main.js rename to lib/web/jquery/fileUploader/main.js diff --git a/pub/lib/jquery/fileUploader/vendor/jquery.ui.widget.js b/lib/web/jquery/fileUploader/vendor/jquery.ui.widget.js similarity index 100% rename from pub/lib/jquery/fileUploader/vendor/jquery.ui.widget.js rename to lib/web/jquery/fileUploader/vendor/jquery.ui.widget.js diff --git a/pub/lib/jquery/handlebars/handlebars-v1.3.0.js b/lib/web/jquery/handlebars/handlebars-v1.3.0.js similarity index 100% rename from pub/lib/jquery/handlebars/handlebars-v1.3.0.js rename to lib/web/jquery/handlebars/handlebars-v1.3.0.js diff --git a/pub/lib/jquery/jquery-1.8.2.js b/lib/web/jquery/jquery-1.8.2.js similarity index 100% rename from pub/lib/jquery/jquery-1.8.2.js rename to lib/web/jquery/jquery-1.8.2.js diff --git a/pub/lib/jquery/jquery-migrate.js b/lib/web/jquery/jquery-migrate.js similarity index 100% rename from pub/lib/jquery/jquery-migrate.js rename to lib/web/jquery/jquery-migrate.js diff --git a/pub/lib/jquery/jquery-migrate.min.js b/lib/web/jquery/jquery-migrate.min.js similarity index 100% rename from pub/lib/jquery/jquery-migrate.min.js rename to lib/web/jquery/jquery-migrate.min.js diff --git a/pub/lib/jquery/jquery-ui-1.9.2.js b/lib/web/jquery/jquery-ui-1.9.2.js similarity index 100% rename from pub/lib/jquery/jquery-ui-1.9.2.js rename to lib/web/jquery/jquery-ui-1.9.2.js diff --git a/pub/lib/jquery/jquery-ui-timepicker-addon-1.0.1.js b/lib/web/jquery/jquery-ui-timepicker-addon-1.0.1.js similarity index 100% rename from pub/lib/jquery/jquery-ui-timepicker-addon-1.0.1.js rename to lib/web/jquery/jquery-ui-timepicker-addon-1.0.1.js diff --git a/pub/lib/jquery/jquery-ui-timepicker-addon.js b/lib/web/jquery/jquery-ui-timepicker-addon.js similarity index 100% rename from pub/lib/jquery/jquery-ui-timepicker-addon.js rename to lib/web/jquery/jquery-ui-timepicker-addon.js diff --git a/pub/lib/jquery/jquery-ui.js b/lib/web/jquery/jquery-ui.js similarity index 100% rename from pub/lib/jquery/jquery-ui.js rename to lib/web/jquery/jquery-ui.js diff --git a/pub/lib/jquery/jquery-ui.min.js b/lib/web/jquery/jquery-ui.min.js similarity index 100% rename from pub/lib/jquery/jquery-ui.min.js rename to lib/web/jquery/jquery-ui.min.js diff --git a/pub/lib/jquery/jquery.ba-hashchange.min.js b/lib/web/jquery/jquery.ba-hashchange.min.js similarity index 100% rename from pub/lib/jquery/jquery.ba-hashchange.min.js rename to lib/web/jquery/jquery.ba-hashchange.min.js diff --git a/pub/lib/jquery/jquery.cookie.js b/lib/web/jquery/jquery.cookie.js similarity index 100% rename from pub/lib/jquery/jquery.cookie.js rename to lib/web/jquery/jquery.cookie.js diff --git a/pub/lib/jquery/jquery.details.js b/lib/web/jquery/jquery.details.js similarity index 100% rename from pub/lib/jquery/jquery.details.js rename to lib/web/jquery/jquery.details.js diff --git a/pub/lib/jquery/jquery.details.min.js b/lib/web/jquery/jquery.details.min.js similarity index 100% rename from pub/lib/jquery/jquery.details.min.js rename to lib/web/jquery/jquery.details.min.js diff --git a/pub/lib/jquery/jquery.hoverIntent.js b/lib/web/jquery/jquery.hoverIntent.js similarity index 100% rename from pub/lib/jquery/jquery.hoverIntent.js rename to lib/web/jquery/jquery.hoverIntent.js diff --git a/pub/lib/jquery/jquery.js b/lib/web/jquery/jquery.js similarity index 100% rename from pub/lib/jquery/jquery.js rename to lib/web/jquery/jquery.js diff --git a/pub/lib/jquery/jquery.metadata.js b/lib/web/jquery/jquery.metadata.js similarity index 100% rename from pub/lib/jquery/jquery.metadata.js rename to lib/web/jquery/jquery.metadata.js diff --git a/pub/lib/jquery/jquery.min.js b/lib/web/jquery/jquery.min.js similarity index 100% rename from pub/lib/jquery/jquery.min.js rename to lib/web/jquery/jquery.min.js diff --git a/pub/lib/jquery/jquery.mousewheel.js b/lib/web/jquery/jquery.mousewheel.js similarity index 100% rename from pub/lib/jquery/jquery.mousewheel.js rename to lib/web/jquery/jquery.mousewheel.js diff --git a/pub/lib/jquery/jquery.parsequery.js b/lib/web/jquery/jquery.parsequery.js similarity index 100% rename from pub/lib/jquery/jquery.parsequery.js rename to lib/web/jquery/jquery.parsequery.js diff --git a/pub/lib/jquery/jquery.popups.js b/lib/web/jquery/jquery.popups.js similarity index 100% rename from pub/lib/jquery/jquery.popups.js rename to lib/web/jquery/jquery.popups.js diff --git a/pub/lib/jquery/jquery.tabs.js b/lib/web/jquery/jquery.tabs.js similarity index 100% rename from pub/lib/jquery/jquery.tabs.js rename to lib/web/jquery/jquery.tabs.js diff --git a/pub/lib/jquery/jquery.tipsy.js b/lib/web/jquery/jquery.tipsy.js similarity index 100% rename from pub/lib/jquery/jquery.tipsy.js rename to lib/web/jquery/jquery.tipsy.js diff --git a/pub/lib/jquery/jquery.tmpl.min.js b/lib/web/jquery/jquery.tmpl.min.js similarity index 100% rename from pub/lib/jquery/jquery.tmpl.min.js rename to lib/web/jquery/jquery.tmpl.min.js diff --git a/pub/lib/jquery/jquery.validate.js b/lib/web/jquery/jquery.validate.js similarity index 100% rename from pub/lib/jquery/jquery.validate.js rename to lib/web/jquery/jquery.validate.js diff --git a/pub/lib/jquery/jqzoom/BSD-LICENSE.txt b/lib/web/jquery/jqzoom/BSD-LICENSE.txt similarity index 100% rename from pub/lib/jquery/jqzoom/BSD-LICENSE.txt rename to lib/web/jquery/jqzoom/BSD-LICENSE.txt diff --git a/pub/lib/jquery/jqzoom/css/jquery.jqzoom.css b/lib/web/jquery/jqzoom/css/jquery.jqzoom.css similarity index 100% rename from pub/lib/jquery/jqzoom/css/jquery.jqzoom.css rename to lib/web/jquery/jqzoom/css/jquery.jqzoom.css diff --git a/pub/lib/jquery/jqzoom/images/zoomloader.gif b/lib/web/jquery/jqzoom/images/zoomloader.gif similarity index 100% rename from pub/lib/jquery/jqzoom/images/zoomloader.gif rename to lib/web/jquery/jqzoom/images/zoomloader.gif diff --git a/pub/lib/jquery/jqzoom/js/jquery.jqzoom-core-pack.js b/lib/web/jquery/jqzoom/js/jquery.jqzoom-core-pack.js similarity index 100% rename from pub/lib/jquery/jqzoom/js/jquery.jqzoom-core-pack.js rename to lib/web/jquery/jqzoom/js/jquery.jqzoom-core-pack.js diff --git a/pub/lib/jquery/jstree/jquery.hotkeys.js b/lib/web/jquery/jstree/jquery.hotkeys.js similarity index 100% rename from pub/lib/jquery/jstree/jquery.hotkeys.js rename to lib/web/jquery/jstree/jquery.hotkeys.js diff --git a/pub/lib/jquery/jstree/jquery.jstree.js b/lib/web/jquery/jstree/jquery.jstree.js similarity index 100% rename from pub/lib/jquery/jstree/jquery.jstree.js rename to lib/web/jquery/jstree/jquery.jstree.js diff --git a/pub/lib/jquery/jstree/themes/apple/bg.jpg b/lib/web/jquery/jstree/themes/apple/bg.jpg similarity index 100% rename from pub/lib/jquery/jstree/themes/apple/bg.jpg rename to lib/web/jquery/jstree/themes/apple/bg.jpg diff --git a/pub/lib/jquery/jstree/themes/apple/d.png b/lib/web/jquery/jstree/themes/apple/d.png similarity index 100% rename from pub/lib/jquery/jstree/themes/apple/d.png rename to lib/web/jquery/jstree/themes/apple/d.png diff --git a/pub/lib/jquery/jstree/themes/apple/dot_for_ie.gif b/lib/web/jquery/jstree/themes/apple/dot_for_ie.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/apple/dot_for_ie.gif rename to lib/web/jquery/jstree/themes/apple/dot_for_ie.gif diff --git a/pub/lib/jquery/jstree/themes/apple/style.css b/lib/web/jquery/jstree/themes/apple/style.css similarity index 100% rename from pub/lib/jquery/jstree/themes/apple/style.css rename to lib/web/jquery/jstree/themes/apple/style.css diff --git a/pub/lib/jquery/jstree/themes/apple/throbber.gif b/lib/web/jquery/jstree/themes/apple/throbber.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/apple/throbber.gif rename to lib/web/jquery/jstree/themes/apple/throbber.gif diff --git a/pub/lib/jquery/jstree/themes/classic/d.gif b/lib/web/jquery/jstree/themes/classic/d.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/classic/d.gif rename to lib/web/jquery/jstree/themes/classic/d.gif diff --git a/pub/lib/jquery/jstree/themes/classic/d.png b/lib/web/jquery/jstree/themes/classic/d.png similarity index 100% rename from pub/lib/jquery/jstree/themes/classic/d.png rename to lib/web/jquery/jstree/themes/classic/d.png diff --git a/pub/lib/jquery/jstree/themes/classic/dot_for_ie.gif b/lib/web/jquery/jstree/themes/classic/dot_for_ie.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/classic/dot_for_ie.gif rename to lib/web/jquery/jstree/themes/classic/dot_for_ie.gif diff --git a/pub/lib/jquery/jstree/themes/classic/style.css b/lib/web/jquery/jstree/themes/classic/style.css similarity index 100% rename from pub/lib/jquery/jstree/themes/classic/style.css rename to lib/web/jquery/jstree/themes/classic/style.css diff --git a/pub/lib/jquery/jstree/themes/classic/throbber.gif b/lib/web/jquery/jstree/themes/classic/throbber.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/classic/throbber.gif rename to lib/web/jquery/jstree/themes/classic/throbber.gif diff --git a/pub/lib/jquery/jstree/themes/default-rtl/d.gif b/lib/web/jquery/jstree/themes/default-rtl/d.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/default-rtl/d.gif rename to lib/web/jquery/jstree/themes/default-rtl/d.gif diff --git a/pub/lib/jquery/jstree/themes/default-rtl/d.png b/lib/web/jquery/jstree/themes/default-rtl/d.png similarity index 100% rename from pub/lib/jquery/jstree/themes/default-rtl/d.png rename to lib/web/jquery/jstree/themes/default-rtl/d.png diff --git a/pub/lib/jquery/jstree/themes/default-rtl/dots.gif b/lib/web/jquery/jstree/themes/default-rtl/dots.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/default-rtl/dots.gif rename to lib/web/jquery/jstree/themes/default-rtl/dots.gif diff --git a/pub/lib/jquery/jstree/themes/default-rtl/style.css b/lib/web/jquery/jstree/themes/default-rtl/style.css similarity index 100% rename from pub/lib/jquery/jstree/themes/default-rtl/style.css rename to lib/web/jquery/jstree/themes/default-rtl/style.css diff --git a/pub/lib/jquery/jstree/themes/default-rtl/throbber.gif b/lib/web/jquery/jstree/themes/default-rtl/throbber.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/default-rtl/throbber.gif rename to lib/web/jquery/jstree/themes/default-rtl/throbber.gif diff --git a/pub/lib/jquery/jstree/themes/default/d.gif b/lib/web/jquery/jstree/themes/default/d.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/default/d.gif rename to lib/web/jquery/jstree/themes/default/d.gif diff --git a/pub/lib/jquery/jstree/themes/default/d.png b/lib/web/jquery/jstree/themes/default/d.png similarity index 100% rename from pub/lib/jquery/jstree/themes/default/d.png rename to lib/web/jquery/jstree/themes/default/d.png diff --git a/pub/lib/jquery/jstree/themes/default/style.css b/lib/web/jquery/jstree/themes/default/style.css similarity index 100% rename from pub/lib/jquery/jstree/themes/default/style.css rename to lib/web/jquery/jstree/themes/default/style.css diff --git a/pub/lib/jquery/jstree/themes/default/throbber.gif b/lib/web/jquery/jstree/themes/default/throbber.gif similarity index 100% rename from pub/lib/jquery/jstree/themes/default/throbber.gif rename to lib/web/jquery/jstree/themes/default/throbber.gif diff --git a/pub/lib/jquery/slimScroll/slimScroll.min.js b/lib/web/jquery/slimScroll/slimScroll.min.js similarity index 100% rename from pub/lib/jquery/slimScroll/slimScroll.min.js rename to lib/web/jquery/slimScroll/slimScroll.min.js diff --git a/pub/lib/js/init.js b/lib/web/js/init.js similarity index 100% rename from pub/lib/js/init.js rename to lib/web/js/init.js diff --git a/pub/lib/js/mui.js b/lib/web/js/mui.js similarity index 100% rename from pub/lib/js/mui.js rename to lib/web/js/mui.js diff --git a/pub/lib/lib/FABridge.js b/lib/web/lib/FABridge.js similarity index 100% rename from pub/lib/lib/FABridge.js rename to lib/web/lib/FABridge.js diff --git a/pub/lib/lib/boxover.js b/lib/web/lib/boxover.js similarity index 100% rename from pub/lib/lib/boxover.js rename to lib/web/lib/boxover.js diff --git a/pub/lib/lib/ccard.js b/lib/web/lib/ccard.js similarity index 100% rename from pub/lib/lib/ccard.js rename to lib/web/lib/ccard.js diff --git a/pub/lib/lib/ds-sleight.js b/lib/web/lib/ds-sleight.js similarity index 100% rename from pub/lib/lib/ds-sleight.js rename to lib/web/lib/ds-sleight.js diff --git a/lib/web/lib/storage.js b/lib/web/lib/storage.js new file mode 100644 index 0000000000000000000000000000000000000000..e161b62950e5628ab9ee483ba4067b0b901eb17f --- /dev/null +++ b/lib/web/lib/storage.js @@ -0,0 +1,22 @@ +;(function(window, $) { + "use strict"; + $["localStorage"] = { + get : function( key ) { + if (window["localStorage"] !== null) { + return localStorage.getItem(key); + } + else { + return $.cookie(key); + } + }, + + set: function( key, value ) { + if (window["localStorage"] !== null) { + localStorage.setItem(key, value); + } + else { + $.cookie(key, value); + } + } + }; +})(window, jQuery); diff --git a/lib/web/mage/accordion.js b/lib/web/mage/accordion.js new file mode 100644 index 0000000000000000000000000000000000000000..32eeb82d30c81f9060420ab98998f1588a1f3496 --- /dev/null +++ b/lib/web/mage/accordion.js @@ -0,0 +1,98 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + + +(function ($, undefined) { + "use strict"; + $.widget("mage.accordion", $.mage.tabs, { + options: { + active : [0], + multipleCollapsible: false, + openOnFocus: false + }, + + _callCollapsible: function() { + if((typeof this.options.active) === "string") { + this.options.active = this.options.active.split(" ").map(function(item) { + return parseInt(item, 10); + }); + } + var self = this, + disabled = false, + active = false; + + $.each(this.collapsibles, function(i) { + disabled = active = false; + if($.inArray(i,self.options.disabled) !== -1) { + disabled = true; + } + if($.inArray(i,self.options.active) !== -1) { + active = true; + } + self._instantiateCollapsible(this,i,active,disabled); + }); + }, + + /** + * Overwrites default functionality to provide the option to activate/deactivate multiple sections simultaneous + * @param action + * @param index + * @private + */ + _toggleActivate: function(action,index) { + if($.isArray( index && this.options.multipleCollapsible)) { + var self = this; + $.each(index, function() { + self.collapsibles.eq(this).collapsible(action); + }); + } else if( (index === undefined) && this.options.multipleCollapsible) { + this.collapsibles.collapsible(action); + } else { + this._super(action,index); + } + }, + + /** + * If the Accordion allows multiple section to be active at the same time, if deep linking is used + * sections that don't contain the id from anchor shouldn't be closed, otherwise the accordion uses the + * tabs behavior + * @private + */ + _handleDeepLinking: function() { + if(!this.options.multipleCollapsible) { + this._super(); + } + }, + + /** + * Prevent default behavior that closes the other sections when one gets activated if the Accordion allows + * multiple sections simultaneous + * @private + */ + _closeOthers: function() { + if(!this.options.multipleCollapsible) { + this._super(); + } + } + }); +})(jQuery); diff --git a/pub/lib/mage/adminhtml/accordion.js b/lib/web/mage/adminhtml/accordion.js similarity index 100% rename from pub/lib/mage/adminhtml/accordion.js rename to lib/web/mage/adminhtml/accordion.js diff --git a/pub/lib/mage/adminhtml/backup.js b/lib/web/mage/adminhtml/backup.js similarity index 100% rename from pub/lib/mage/adminhtml/backup.js rename to lib/web/mage/adminhtml/backup.js diff --git a/pub/lib/mage/adminhtml/browser.js b/lib/web/mage/adminhtml/browser.js similarity index 100% rename from pub/lib/mage/adminhtml/browser.js rename to lib/web/mage/adminhtml/browser.js diff --git a/pub/lib/mage/adminhtml/events.js b/lib/web/mage/adminhtml/events.js similarity index 100% rename from pub/lib/mage/adminhtml/events.js rename to lib/web/mage/adminhtml/events.js diff --git a/pub/lib/mage/adminhtml/flexuploader.js b/lib/web/mage/adminhtml/flexuploader.js similarity index 100% rename from pub/lib/mage/adminhtml/flexuploader.js rename to lib/web/mage/adminhtml/flexuploader.js diff --git a/pub/lib/mage/adminhtml/form.js b/lib/web/mage/adminhtml/form.js similarity index 100% rename from pub/lib/mage/adminhtml/form.js rename to lib/web/mage/adminhtml/form.js diff --git a/pub/lib/mage/adminhtml/grid.js b/lib/web/mage/adminhtml/grid.js similarity index 100% rename from pub/lib/mage/adminhtml/grid.js rename to lib/web/mage/adminhtml/grid.js diff --git a/pub/lib/mage/adminhtml/hash.js b/lib/web/mage/adminhtml/hash.js similarity index 100% rename from pub/lib/mage/adminhtml/hash.js rename to lib/web/mage/adminhtml/hash.js diff --git a/pub/lib/mage/adminhtml/image.js b/lib/web/mage/adminhtml/image.js similarity index 100% rename from pub/lib/mage/adminhtml/image.js rename to lib/web/mage/adminhtml/image.js diff --git a/pub/lib/mage/adminhtml/tabs.js b/lib/web/mage/adminhtml/tabs.js similarity index 100% rename from pub/lib/mage/adminhtml/tabs.js rename to lib/web/mage/adminhtml/tabs.js diff --git a/pub/lib/mage/adminhtml/tools.js b/lib/web/mage/adminhtml/tools.js similarity index 100% rename from pub/lib/mage/adminhtml/tools.js rename to lib/web/mage/adminhtml/tools.js diff --git a/pub/lib/mage/adminhtml/varienLoader.js b/lib/web/mage/adminhtml/varienLoader.js similarity index 100% rename from pub/lib/mage/adminhtml/varienLoader.js rename to lib/web/mage/adminhtml/varienLoader.js diff --git a/pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js rename to lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js diff --git a/pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/img/icon.gif b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/img/icon.gif similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/img/icon.gif rename to lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/img/icon.gif diff --git a/pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js rename to lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js diff --git a/pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/img/icon.gif b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/img/icon.gif similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/img/icon.gif rename to lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/img/icon.gif diff --git a/pub/lib/mage/adminhtml/wysiwyg/tiny_mce/setup.js b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/tiny_mce/setup.js rename to lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js diff --git a/pub/lib/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css rename to lib/web/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css diff --git a/pub/lib/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css b/lib/web/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css rename to lib/web/mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css diff --git a/pub/lib/mage/adminhtml/wysiwyg/widget.js b/lib/web/mage/adminhtml/wysiwyg/widget.js similarity index 100% rename from pub/lib/mage/adminhtml/wysiwyg/widget.js rename to lib/web/mage/adminhtml/wysiwyg/widget.js diff --git a/pub/lib/mage/backend/action-link.js b/lib/web/mage/backend/action-link.js similarity index 100% rename from pub/lib/mage/backend/action-link.js rename to lib/web/mage/backend/action-link.js diff --git a/pub/lib/mage/backend/ajax-setup.js b/lib/web/mage/backend/ajax-setup.js similarity index 100% rename from pub/lib/mage/backend/ajax-setup.js rename to lib/web/mage/backend/ajax-setup.js diff --git a/pub/lib/mage/backend/bootstrap.js b/lib/web/mage/backend/bootstrap.js similarity index 100% rename from pub/lib/mage/backend/bootstrap.js rename to lib/web/mage/backend/bootstrap.js diff --git a/pub/lib/mage/backend/button.js b/lib/web/mage/backend/button.js similarity index 100% rename from pub/lib/mage/backend/button.js rename to lib/web/mage/backend/button.js diff --git a/pub/lib/mage/backend/editablemultiselect.js b/lib/web/mage/backend/editablemultiselect.js similarity index 100% rename from pub/lib/mage/backend/editablemultiselect.js rename to lib/web/mage/backend/editablemultiselect.js diff --git a/pub/lib/mage/backend/floating-header.js b/lib/web/mage/backend/floating-header.js similarity index 100% rename from pub/lib/mage/backend/floating-header.js rename to lib/web/mage/backend/floating-header.js diff --git a/pub/lib/mage/backend/form.js b/lib/web/mage/backend/form.js similarity index 100% rename from pub/lib/mage/backend/form.js rename to lib/web/mage/backend/form.js diff --git a/pub/lib/mage/backend/menu.js b/lib/web/mage/backend/menu.js similarity index 100% rename from pub/lib/mage/backend/menu.js rename to lib/web/mage/backend/menu.js diff --git a/pub/lib/mage/backend/notification.js b/lib/web/mage/backend/notification.js similarity index 100% rename from pub/lib/mage/backend/notification.js rename to lib/web/mage/backend/notification.js diff --git a/pub/lib/mage/backend/suggest.js b/lib/web/mage/backend/suggest.js similarity index 100% rename from pub/lib/mage/backend/suggest.js rename to lib/web/mage/backend/suggest.js diff --git a/pub/lib/mage/backend/tabs.js b/lib/web/mage/backend/tabs.js similarity index 100% rename from pub/lib/mage/backend/tabs.js rename to lib/web/mage/backend/tabs.js diff --git a/pub/lib/mage/backend/tree-suggest.js b/lib/web/mage/backend/tree-suggest.js similarity index 100% rename from pub/lib/mage/backend/tree-suggest.js rename to lib/web/mage/backend/tree-suggest.js diff --git a/pub/lib/mage/backend/validation.js b/lib/web/mage/backend/validation.js similarity index 100% rename from pub/lib/mage/backend/validation.js rename to lib/web/mage/backend/validation.js diff --git a/pub/lib/mage/bootstrap.js b/lib/web/mage/bootstrap.js similarity index 100% rename from pub/lib/mage/bootstrap.js rename to lib/web/mage/bootstrap.js diff --git a/pub/lib/mage/calendar.css b/lib/web/mage/calendar.css similarity index 100% rename from pub/lib/mage/calendar.css rename to lib/web/mage/calendar.css diff --git a/pub/lib/mage/calendar.js b/lib/web/mage/calendar.js similarity index 100% rename from pub/lib/mage/calendar.js rename to lib/web/mage/calendar.js diff --git a/pub/lib/mage/captcha.js b/lib/web/mage/captcha.js similarity index 100% rename from pub/lib/mage/captcha.js rename to lib/web/mage/captcha.js diff --git a/lib/web/mage/collapsible.js b/lib/web/mage/collapsible.js new file mode 100644 index 0000000000000000000000000000000000000000..3655d039c5952a2eaa51d71d259dfdea2ef97740 --- /dev/null +++ b/lib/web/mage/collapsible.js @@ -0,0 +1,392 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + + +(function ($, undefined) { + "use strict"; + + var hideProps = {}, + showProps = {}; + + hideProps.height = "hide"; + showProps.height = "show"; + + $.widget("mage.collapsible", { + options: { + active: false, + disabled: false, + collapsible: true, + header: "[data-role=title]", + content: "[data-role=content]", + trigger: "[data-role=trigger]", + closedState: null, + openedState: null, + disabledState: null, + ajaxUrlElement: "[data-ajax=true]", + ajaxContent: false, + loadingClass: null, + saveState: false, + animate: false, + icons: { + activeHeader: null, + header: null + } + }, + + _create: function () { + this.storage= $.localStorage; + this.icons = false; + if((typeof this.options.icons) === "string") { + this.options.icons = $.parseJSON(this.options.icons); + } + + this._processPanels(); + this._processState(); + this._refresh(); + + + if (this.options.icons.header && this.options.icons.activeHeader) { + this._createIcons(); + this.icons = true; + } + this._bind("click"); + }, + + _refresh: function () { + this.trigger.attr("tabIndex",0); + if (this.options.active && !this.options.disabled) { + if (this.options.openedState) { + this.element.addClass(this.options.openedState); + } + if (this.options.ajaxContent) { + this._loadContent(); + } + } + else if (this.options.disabled) { + this.disable(); + } else { + this.content.hide(); + if(this.options.closedState) { + this.element.addClass(this.options.closedState); + } + } + }, + + /** + * Processing the state: + * If deep linking is used and the anchor is the id of the content or the content contains this id, + * and the collapsible element is a nested one having collapsible parents, in order to see the content, + * all the parents must be expanded. + * @private + */ + _processState: function () { + var anchor = window.location.hash; + var urlPath = window.location.pathname; + this.stateKey = encodeURIComponent(urlPath + this.element.attr("id")); + if ( anchor && ( $(this.content.find(anchor)).length > 0 || this.content.attr("id") === anchor.replace("#","")) ) { + this.element.parents("[data-collapsible=true]").collapsible("forceActivate"); + if(!this.options.disabled) { + this.options.active = true; + if (this.options.saveState) { + this.storage.set(this.stateKey,true); + } + } + } else if (this.options.saveState && !this.options.disabled) { + var state = this.storage.get(this.stateKey); + if (typeof state === 'undefined' || state === null) { + this.storage.set(this.stateKey,this.options.active); + } else if (state === "true") { + this.options.active = true; + } else if (state === "false") { + this.options.active = false; + } + } + }, + + _createIcons: function () { + var icons = this.options.icons; + if (icons) { + $("<span>") + .addClass(icons.header) + .attr("data-role","icons") + .prependTo(this.header); + if (this.options.active && !this.options.disabled) { + this.header.children("[data-role=icons]") + .removeClass(icons.header) + .addClass(icons.activeHeader); + } + } + }, + + _destroyIcons: function () { + this.header + .children("[data-role=icons]") + .remove(); + }, + + _destroy: function () { + var options = this.options; + + this.element.removeAttr("data-collapsible"); + + this.trigger.removeAttr("tabIndex"); + if(options.openedState) { + this.element.removeClass(options.openedState); + } + if(options.closedState){ + this.element.removeClass(options.closedState); + } + if(options.disabledState){ + this.element.removeClass(options.disabledState); + } + + if (this.icons) { + this._destroyIcons(); + } + }, + + _processPanels: function () { + this.element.attr("data-collapsible", "true"); + + if (typeof this.options.header === "object") { + this.header = this.options.header; + } else { + var headers = this.element.find(this.options.header); + if(headers.length > 0) { + this.header = headers.eq(0); + } else { + this.header = this.element; + } + } + + if (typeof this.options.content === "object") { + this.content = this.options.content; + } else { + this.content = this.header.next(this.options.content).eq(0); + } + + if (typeof this.options.trigger === "object") { + this.trigger = this.options.trigger; + } else { + var triggers = this.header.find(this.options.trigger); + if(triggers.length > 0) { + this.trigger = triggers.eq(0); + } else { + this.trigger = this.header; + } + } + }, + + _keydown: function (event) { + if (event.altKey || event.ctrlKey) { + return; + } + + var keyCode = $.ui.keyCode; + + switch (event.keyCode) { + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler(event); + break; + } + + }, + + _bind: function (event) { + this.events = { + keydown: "_keydown" + }; + var self = this; + if (event) { + $.each(event.split(" "), function (index, eventName) { + self.events[ eventName ] = "_eventHandler"; + }); + } + this._off(this.trigger); + if(!this.options.disabled) { + this._on(this.trigger, this.events); + } + }, + + disable: function() { + this._off(this.trigger); + this.forceDeactivate(); + this.options.disabled = true; + if(this.options.disabledState) { + this.element.addClass(this.options.disabledState); + } + this.trigger.attr("tabIndex",-1); + }, + + enable: function() { + this._on(this.trigger, this.events); + this.options.disabled = false; + if(this.options.disabledState) { + this.element.removeClass(this.options.disabledState); + } + }, + + _eventHandler: function (event) { + + if (this.options.active && this.options.collapsible) { + this.deactivate(); + } else { + this.activate(); + + } + event.preventDefault(); + + }, + + _animate: function(prop) { + var duration, + easing, + animate = this.options.animate; + + if ( typeof animate === "number" ) { + duration = animate; + } + if (typeof animate === "string" ) { + animate = $.parseJSON(animate); + } + duration = duration || animate.duration; + easing = animate.easing; + this.content.animate(prop,duration,easing); + }, + + deactivate: function () { + if(this.options.animate) { + this._animate(hideProps); + } else { + this.content.hide(); + } + this._close(); + }, + + forceDeactivate: function () { + this.content.hide(); + this._close(); + + }, + + _close: function () { + + this.options.active = false; + + if (this.options.saveState) { + this.storage.set(this.stateKey,false); + } + if (this.options.openedState) { + this.element.removeClass(this.options.openedState); + } + if(this.options.closedState) { + this.element.addClass(this.options.closedState); + } + if (this.icons) { + this.header.children("[data-role=icons]") + .removeClass(this.options.icons.activeHeader) + .addClass(this.options.icons.header); + } + }, + + activate: function () { + if (!this.options.disabled) { + if (this.options.animate) { + this._animate(showProps); + } else { + this.content.show(); + } + this._open(); + } + }, + + forceActivate: function () { + if (!this.options.disabled) { + this.content.show(); + this._open(); + } + }, + + _open: function () { + + this.element.trigger("beforeOpen"); + + this.options.active = true; + + if (this.options.ajaxContent) { + this._loadContent(); + } + if (this.options.saveState) { + this.storage.set(this.stateKey,true); + } + if (this.options.openedState) { + this.element.addClass(this.options.openedState); + } + if (this.options.closedState) { + this.element.removeClass(this.options.closedState); + } + if (this.icons) { + this.header.children("[data-role=icons]") + .removeClass(this.options.icons.header) + .addClass(this.options.icons.activeHeader); + } + }, + + _loadContent: function () { + var url = this.element.find(this.options.ajaxUrlElement).attr("href"); + if(url) { + this.xhr = $.get(url, function () { + }); + } + var that = this; + if (that.xhr && that.xhr.statusText !== "canceled") { + if(that.options.loadingClass) { + that.element.addClass(that.options.loadingClass); + } + that.content.attr("aria-busy", "true"); + that.xhr + .success(function (response) { + setTimeout(function () { + that.content.html(response); + }, 1); + }) + .complete(function (jqXHR, status) { + setTimeout(function () { + if (status === "abort") { + that.content.stop(false, true); + } + if(that.options.loadingClass) { + that.element.removeClass(that.options.loadingClass); + } + that.content.removeAttr("aria-busy"); + if (jqXHR === that.xhr) { + delete that.xhr; + } + }, 1); + }); + } + } + + }); +})(jQuery); diff --git a/pub/lib/mage/common.js b/lib/web/mage/common.js similarity index 100% rename from pub/lib/mage/common.js rename to lib/web/mage/common.js diff --git a/pub/lib/mage/cookies.js b/lib/web/mage/cookies.js similarity index 100% rename from pub/lib/mage/cookies.js rename to lib/web/mage/cookies.js diff --git a/pub/lib/mage/dataPost.js b/lib/web/mage/dataPost.js similarity index 100% rename from pub/lib/mage/dataPost.js rename to lib/web/mage/dataPost.js diff --git a/pub/lib/mage/decorate.js b/lib/web/mage/decorate.js similarity index 100% rename from pub/lib/mage/decorate.js rename to lib/web/mage/decorate.js diff --git a/pub/lib/mage/deletable-item.js b/lib/web/mage/deletable-item.js similarity index 100% rename from pub/lib/mage/deletable-item.js rename to lib/web/mage/deletable-item.js diff --git a/pub/lib/mage/dialog.js b/lib/web/mage/dialog.js similarity index 100% rename from pub/lib/mage/dialog.js rename to lib/web/mage/dialog.js diff --git a/pub/lib/mage/dropdown.js b/lib/web/mage/dropdown.js similarity index 100% rename from pub/lib/mage/dropdown.js rename to lib/web/mage/dropdown.js diff --git a/pub/lib/mage/dropdown_old.js b/lib/web/mage/dropdown_old.js similarity index 100% rename from pub/lib/mage/dropdown_old.js rename to lib/web/mage/dropdown_old.js diff --git a/pub/lib/mage/dropdowns.js b/lib/web/mage/dropdowns.js similarity index 100% rename from pub/lib/mage/dropdowns.js rename to lib/web/mage/dropdowns.js diff --git a/pub/lib/mage/edit-trigger.js b/lib/web/mage/edit-trigger.js similarity index 100% rename from pub/lib/mage/edit-trigger.js rename to lib/web/mage/edit-trigger.js diff --git a/pub/lib/mage/fieldset-controls.js b/lib/web/mage/fieldset-controls.js similarity index 100% rename from pub/lib/mage/fieldset-controls.js rename to lib/web/mage/fieldset-controls.js diff --git a/pub/lib/mage/flex.js b/lib/web/mage/flex.js similarity index 100% rename from pub/lib/mage/flex.js rename to lib/web/mage/flex.js diff --git a/pub/lib/mage/gallery-fullscreen.js b/lib/web/mage/gallery-fullscreen.js similarity index 100% rename from pub/lib/mage/gallery-fullscreen.js rename to lib/web/mage/gallery-fullscreen.js diff --git a/pub/lib/mage/gallery.js b/lib/web/mage/gallery.js similarity index 100% rename from pub/lib/mage/gallery.js rename to lib/web/mage/gallery.js diff --git a/pub/lib/mage/gallery.less b/lib/web/mage/gallery.less similarity index 100% rename from pub/lib/mage/gallery.less rename to lib/web/mage/gallery.less diff --git a/pub/lib/mage/item-table.js b/lib/web/mage/item-table.js similarity index 100% rename from pub/lib/mage/item-table.js rename to lib/web/mage/item-table.js diff --git a/pub/lib/mage/jquery-no-conflict.js b/lib/web/mage/jquery-no-conflict.js similarity index 100% rename from pub/lib/mage/jquery-no-conflict.js rename to lib/web/mage/jquery-no-conflict.js diff --git a/lib/web/mage/list.js b/lib/web/mage/list.js new file mode 100644 index 0000000000000000000000000000000000000000..13d2bce298145486cf8a0ef064ce2f93b4f56f3d --- /dev/null +++ b/lib/web/mage/list.js @@ -0,0 +1,127 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + /*global Handlebars*/ + (function($) { + "use strict"; + $.widget('mage.list', { + options: { + template: '[data-role=item]', //template for item, + templateWrapper: null, //template wrapper + templateClass: null, //template wrapper class + destinationSelector: '[data-role=container]', //destination selector of list + itemIndex: 0, //setting an item index + itemCount: 0, //get count of items + addButton: '[data-button=add]', //button for adding list item + removeButton: '[data-button=remove]', //button for removing list item + maxItems: null, + maxItemsAlert: null + }, + + _create: function() { + + this.options.itemCount = this.options.itemIndex = 0; + + var that = this, + options = this.options, + destination = $(options.destinationSelector), + addButton = this.element.find($(options.addButton)); + + this.element + .addClass('list-widget'); + + addButton.bind('click', $.proxy(this.handleAdd, this)); + + //handle remove + destination.on('click', this.options.removeButton, $.proxy(this.removeItem, this)); + }, + + handleAdd: function() { + this.addItem(++this.options.itemIndex); + return false; + }, + + addItem: function(index, parent) { + var options = this.options, + template = $(options.template), + destination = $(options.destinationSelector), + item = $(options.templateWrapper); + + item.addClass(this.options.templateClass) + .attr('id', 'list-item-'+ index) + .attr('data-role', 'addedItem') + .attr('data-parent', parent); + + + var source = template.html(), + preTemplate = Handlebars.compile(source), + context = this.handleContext(index), + compiledTemplate = preTemplate(context); + + item.append(compiledTemplate); + destination.append(item); + + this.checkLimit(++this.options.itemCount); + return item; + }, + + handleContext: function(index) { + var context = {_index_: index}; + return context; + }, + + removeItem: function(e) { + $(e.currentTarget).closest('[data-role="addedItem"]').remove(); + + this.checkLimit(--this.options.itemCount); + return false; + }, + + checkLimit: function(index) { + var addButton = $(this.options.addButton), + maxItems = this.options.maxItems, + maxItemsAlert = $(this.options.maxItemsAlert); + + if (maxItems !== null && index >= maxItems) { + addButton.hide(); + maxItemsAlert.show(); + } else if (addButton.is(":hidden")) { + addButton.show(); + maxItemsAlert.hide(); + } + }, + + _destroy: function() { + + var destination = $(this.options.destinationSelector); + + this.element + .removeClass('list-widget'); + + destination + .find('[data-role="addedItem"]') + .remove(); + } + + }); + +})(jQuery); diff --git a/pub/lib/mage/loader.js b/lib/web/mage/loader.js similarity index 83% rename from pub/lib/mage/loader.js rename to lib/web/mage/loader.js index 7a4fbc496a4076b90777b79ba836b33562fc62a7..07d9694c2b90a5ec4b17f27c6f3efbdbca665f34 100644 --- a/pub/lib/mage/loader.js +++ b/lib/web/mage/loader.js @@ -25,14 +25,22 @@ (function($) { $.widget("mage.loader", { loaderStarted: 0, - spinner: $(undefined), + spinnerTemplate: $(undefined), options: { icon: 'icon.gif', texts: { loaderText: $.mage.__('Please wait...'), imgAlt: $.mage.__('Loading...') }, - template: null + template: '<script id="loader-template" type="text/x-handlebars-template">' + + '<div class="loading-mask" data-role="loader">' + + '<div class="loader">' + + '<img alt="{{imgAlt}}" src="{{icon}}">' + + '<p>{{loaderText}}</p>' + + '</div>' + + '</div>' + + '</script>' + }, /** @@ -106,19 +114,19 @@ * @protected */ _render: function() { - if (this.spinner.length === 0) { - this.spinner = $(this.options.template)/*.css(this._getCssObj())*/; + if (this.spinnerTemplate.length === 0) { + this.spinnerTemplate = $(this.options.template)/*.css(this._getCssObj())*/; + var source = this.spinnerTemplate.html(); + var template = Handlebars.compile(source); + var content = { + imgAlt: this.options.texts.imgAlt, + icon: this.options.icon, + loaderText: this.options.texts.loaderText + }; + var html = $(template(content)); + html.prependTo(this.element); + this.spinner = html; } - - var source = this.spinner.html(); - var template = Handlebars.compile(source); - var content = { - imgAlt: this.options.texts.imgAlt, - icon: this.options.icon, - loaderText: this.options.texts.loaderText - }; - var html = template(content); - this.element.prepend(html); }, /** diff --git a/pub/lib/mage/loader_old.js b/lib/web/mage/loader_old.js similarity index 100% rename from pub/lib/mage/loader_old.js rename to lib/web/mage/loader_old.js diff --git a/pub/lib/mage/mage.js b/lib/web/mage/mage.js similarity index 100% rename from pub/lib/mage/mage.js rename to lib/web/mage/mage.js diff --git a/lib/web/mage/menu.js b/lib/web/mage/menu.js new file mode 100644 index 0000000000000000000000000000000000000000..5327434a5c9b3b6f086c175df866755d485708e0 --- /dev/null +++ b/lib/web/mage/menu.js @@ -0,0 +1,469 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + /*global mediaCheck*/ +(function($) { + 'use strict'; + /** + * Menu Widget - this widget is a wrapper for the jQuery UI Menu + */ + $.widget('mage.menu', $.ui.menu, { + options: { + responsive: false, + expanded: false, + delay: 300 + }, + + _init: function() { + this._super(); + this.delay = this.options.delay; + + if(this.options.expanded === true) { + this.isExpanded(); + } + + if(this.options.responsive === true){ + mediaCheck({ + media: '(max-width: 768px)', + entry: $.proxy(function() { + this._toggleMobileMode(); + }, this), + exit: $.proxy(function() { + this._toggleDesktopMode(); + }, this) + }); + } + + $('.action.toggle.nav').on('click', function() { + $('.page.wrapper').toggleClass('open'); + }); + + }, + + //Add class for expanded option + isExpanded: function() { + var subMenus = this.element.find( this.options.menus ), + expandedMenus = subMenus.find('ul'); + + expandedMenus.addClass('expanded'); + }, + + _activate: function( event ) { + window.location.href = this.active.find('> a').attr('href'); + this.collapseAll(event); + }, + + _keydown: function(event) { + + var match, prev, character, skip, regex, + preventDefault = true; + + function escape( value ) { + return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); + } + + if(this.active.closest('ul').attr('aria-expanded') != 'true') { + + switch ( event.keyCode ) { + case $.ui.keyCode.PAGE_UP: + this.previousPage( event ); + break; + case $.ui.keyCode.PAGE_DOWN: + this.nextPage( event ); + break; + case $.ui.keyCode.HOME: + this._move( "first", "first", event ); + break; + case $.ui.keyCode.END: + this._move( "last", "last", event ); + break; + case $.ui.keyCode.UP: + this.previous( event ); + break; + case $.ui.keyCode.DOWN: + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { + this.expand( event ); + } + break; + case $.ui.keyCode.LEFT: + this.previous( event ); + break; + case $.ui.keyCode.RIGHT: + this.next( event ); + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate( event ); + break; + case $.ui.keyCode.ESCAPE: + this.collapse( event ); + break; + default: + preventDefault = false; + prev = this.previousFilter || ""; + character = String.fromCharCode( event.keyCode ); + skip = false; + + clearTimeout( this.filterTimer ); + + if ( character === prev ) { + skip = true; + } else { + character = prev + character; + } + + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + match = skip && match.index( this.active.next() ) !== -1 ? + this.active.nextAll( ".ui-menu-item" ) : + match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if ( !match.length ) { + character = String.fromCharCode( event.keyCode ); + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + } + + if ( match.length ) { + this.focus( event, match ); + if ( match.length > 1 ) { + this.previousFilter = character; + this.filterTimer = this._delay(function() { + delete this.previousFilter; + }, 1000 ); + } else { + delete this.previousFilter; + } + } else { + delete this.previousFilter; + } + } + } else { + switch ( event.keyCode ) { + case $.ui.keyCode.DOWN: + this.next( event ); + break; + case $.ui.keyCode.UP: + this.previous( event ); + break; + case $.ui.keyCode.RIGHT: + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { + this.expand( event ); + } + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate( event ); + break; + case $.ui.keyCode.LEFT: + case $.ui.keyCode.ESCAPE: + this.collapse( event ); + break; + default: + preventDefault = false; + prev = this.previousFilter || ""; + character = String.fromCharCode( event.keyCode ); + skip = false; + + clearTimeout( this.filterTimer ); + + if ( character === prev ) { + skip = true; + } else { + character = prev + character; + } + + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + match = skip && match.index( this.active.next() ) !== -1 ? + this.active.nextAll( ".ui-menu-item" ) : + match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if ( !match.length ) { + character = String.fromCharCode( event.keyCode ); + regex = new RegExp( "^" + escape( character ), "i" ); + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { + return regex.test( $( this ).children( "a" ).text() ); + }); + } + + if ( match.length ) { + this.focus( event, match ); + if ( match.length > 1 ) { + this.previousFilter = character; + this.filterTimer = this._delay(function() { + delete this.previousFilter; + }, 1000 ); + } else { + delete this.previousFilter; + } + } else { + delete this.previousFilter; + } + } + } + + if ( preventDefault ) { + event.preventDefault(); + } + }, + + _toggleMobileMode: function() { + $(this.element).unbind('mouseenter mouseleave'); + this._on({ + "click .ui-menu-item:has(a)": function( event ) { + event.preventDefault(); + var target = $( event.target ).closest( ".ui-menu-item" ); + this.select( event ); + if ( target.hasClass('level-top') && target.has( ".ui-menu" ).length ) { + this.expand( event ); + } else { + window.location.href = target.find('> a').attr('href'); + } + } + }); + + var subMenus = this.element.find('.level-top'); + $.each(subMenus, $.proxy(function(index, item) { + var category = $(item).find('> a span').not('.ui-menu-icon').text(), + categoryUrl = $(item).find('> a').attr('href'), + menu = $(item).find('> .ui-menu'); + + this.categoryLink = $('<a>') + .attr('href', categoryUrl) + .text('All '+ category); + + this.categoryParent = $('<li>') + .addClass('ui-menu-item all-category') + .html(this.categoryLink); + + if(menu.find('.all-category').length === 0) { + menu.prepend(this.categoryParent); + } + + }, this)); + }, + + _toggleDesktopMode: function() { + this._on({ + // Prevent focus from sticking to links inside menu after clicking + // them (focus should always stay on UL during navigation). + "mousedown .ui-menu-item > a": function( event ) { + event.preventDefault(); + }, + "click .ui-state-disabled > a": function( event ) { + event.preventDefault(); + }, + "click .ui-menu-item:has(a)": function( event ) { + var target = $( event.target ).closest( ".ui-menu-item" ); + if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { + this.select( event ); + + // Only set the mouseHandled flag if the event will bubble, see #9469. + if ( !event.isPropagationStopped() ) { + this.mouseHandled = true; + } + + // Open submenu on click + if ( target.has( ".ui-menu" ).length ) { + this.expand( event ); + } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) { + + // Redirect focus to the menu + this.element.trigger( "focus", [ true ] ); + + // If the active item is on the top level, let it stay active. + // Otherwise, blur the active item since it is no longer visible. + if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { + clearTimeout( this.timer ); + } + } + } + }, + "mouseenter .ui-menu-item": function( event ) { + var target = $( event.currentTarget ); + // Remove ui-state-active class from siblings of the newly focused menu item + // to avoid a jump caused by adjacent elements both having a class with a border + target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" ); + this.focus( event, target ); + }, + "mouseleave": function( event ){ + this.collapseAll( event, true ); + }, + "mouseleave .ui-menu": "collapseAll" + }); + + var categoryParent = this.element.find('.all-category'); + + categoryParent.remove(); + } + }); + + + $.widget('mage.navigation', $.mage.menu, { + + options: { + responsiveAction: 'wrap', //option for responsive handling + maxItems: null, //option to set max number of menu items + container: '#menu', //container to check against navigation length + moreText: 'more', + breakpoint: 768 + }, + + _init: function() { + this._super(); + + var that = this, + moreMenu = $('[responsive=more]'), + responsive = this.options.responsiveAction; + + this.element + .addClass('ui-menu-responsive') + .attr('responsive', 'main'); + + this.setupMoreMenu(); + this.setMaxItems(); + + //check responsive option + if(responsive == "onResize") { + $(window).on('resize', function() { + if($(window).width() > that.options.breakpoint) { + that._responsive(); + $('[responsive=more]').show(); + } else { + that.element.children().show(); + $('[responsive=more]').hide(); + } + }); + } else if(responsive == "onReload") { + this._responsive(); + } + }, + + setupMoreMenu: function() { + var moreListItems = this.element.children().clone(), + moreLink = $('<a>'+ this.options.moreText +'</a>'); + + moreListItems.hide(); + + moreLink.attr('href', '#'); + + this.moreItemsList = $('<ul>') + .append(moreListItems); + + this.moreListContainer = $('<li>') + .append(moreLink) + .append(this.moreItemsList); + + this.responsiveMenu = $('<ul>') + .addClass('ui-menu-more') + .attr('responsive', 'more') + .append(this.moreListContainer) + .menu({ + position : { + my : "right top", + at : "right bottom" + } + }) + .insertAfter(this.element); + }, + + _responsive: function() { + var container = $(this.options.container), + containerSize = container.width(), + width = 0, + items = this.element.children('li'), + more = $('.ui-menu-more > li > ul > li a'); + + + items = items.map(function() { + var item = {}; + + item.item = $(this); + item.itemSize = $(this).outerWidth(); + return item; + }); + + $.each(items, function(index, item){ + var itemText = items[index].item + .find('a:first') + .text(); + + width += parseInt(items[index].itemSize, null); + + if(width < containerSize) { + items[index].item.show(); + + more.each(function() { + var text = $(this).text(); + if(text === itemText){ + $(this).parent().hide(); + } + }); + } else if(width > containerSize) { + items[index].item.hide(); + + more.each(function() { + var text = $(this).text(); + if(text === itemText){ + $(this).parent().show(); + } + }); + } + }); + }, + + setMaxItems: function() { + var items = this.element.children('li'), + itemsCount = items.length, + maxItems = this.options.maxItems, + overflow = itemsCount - maxItems, + overflowItems = items.slice(overflow); + + overflowItems.hide(); + + overflowItems.each(function(){ + var itemText = $(this).find('a:first').text(); + + $(this).hide(); + + $('.ui-menu-more > li > ul > li a').each(function() { + var text = $(this).text(); + if(text === itemText){ + $(this).parent().show(); + } + }); + }); + } + }); + +})(jQuery); diff --git a/pub/lib/mage/popup-window.js b/lib/web/mage/popup-window.js similarity index 100% rename from pub/lib/mage/popup-window.js rename to lib/web/mage/popup-window.js diff --git a/pub/lib/mage/proxy-event.js b/lib/web/mage/proxy-event.js similarity index 100% rename from pub/lib/mage/proxy-event.js rename to lib/web/mage/proxy-event.js diff --git a/pub/lib/mage/redirect-url.js b/lib/web/mage/redirect-url.js similarity index 100% rename from pub/lib/mage/redirect-url.js rename to lib/web/mage/redirect-url.js diff --git a/lib/web/mage/requirejs/plugin/id-normalizer.js b/lib/web/mage/requirejs/plugin/id-normalizer.js new file mode 100644 index 0000000000000000000000000000000000000000..8a4ec3af8283e1113c3fcece1a757a95d9966f71 --- /dev/null +++ b/lib/web/mage/requirejs/plugin/id-normalizer.js @@ -0,0 +1,46 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +/*jshint globalstrict: true*/ +/*global define: false*/ +"use strict"; + +/** + * This is simple normalization plugin for RequireJS, which converts Magento modular references to normalized paths. + * E.g. 'Magento_Catalog::js/scripts.js' -> 'Magento_Catalog/js/scripts.js'. + */ +define({ + /** + * Normalize Magento modular ID + */ + normalize: function (name, normalize) { + return name.replace('::', '/'); + }, + + /** + * load() is not needed for this plugin, but is required by RequireJS. + * So it is just proxy over default implementation. + */ + load: function (name, parentRequire, onload, config) { + parentRequire([name], onload); + } +}); diff --git a/pub/lib/mage/sticky.js b/lib/web/mage/sticky.js similarity index 100% rename from pub/lib/mage/sticky.js rename to lib/web/mage/sticky.js diff --git a/lib/web/mage/tabs.js b/lib/web/mage/tabs.js new file mode 100644 index 0000000000000000000000000000000000000000..4bc3a2e116fd44ae3db3d4297771edc905176da2 --- /dev/null +++ b/lib/web/mage/tabs.js @@ -0,0 +1,286 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +(function ($, undefined) { + "use strict"; + $.widget("mage.tabs", { + options: { + active: 0, + disabled: [], + openOnFocus: true, + collapsible: false, + collapsibleElement: "[data-role=collapsible]", + header: "[data-role=title]", + content: "[data-role=content]", + trigger: "[data-role=trigger]", + closedState: null, + openedState: null, + disabledState: null, + ajaxUrlElement: "[data-ajax=true]", + ajaxContent: false, + loadingClass: null, + saveState: false, + animate: false, + icons: { + activeHeader: null, + header: null + } + }, + + _create : function () { + if((typeof this.options.disabled) === "string") { + this.options.disabled = this.options.disabled.split(" ").map(function(item) { + return parseInt(item, 10); + }); + } + this._processPanels(); + + this._handleDeepLinking(); + + this._processTabIndex(); + + this._closeOthers(); + + this._bind(); + }, + + _destroy: function() { + $.each(this.collapsibles, function() { + $(this).collapsible("destroy"); + }); + }, + + /** + * If deep linking is used, all sections must be closed but the one that contains the anchor. + * @private + */ + _handleDeepLinking: function() { + var self = this, + anchor = window.location.hash, + anchorId = anchor.replace("#",""); + if (anchor) { + $.each(self.contents,function(i) { + if($(this).attr("id") === anchorId || $(this).find(anchor).length > 0) { + self.collapsibles.not(self.collapsibles.eq(i)).collapsible("forceDeactivate"); + return false; + } + }); + } + }, + + /** + * When the widget gets instantiated, the first tab that is not disabled receive focusable property + * When a tabs gets expanded receive tabIndex 0 and the others -1 + * @private + */ + _processTabIndex: function() { + var self = this; + self.triggers.attr("tabIndex",-1); + $.each(this.collapsibles, function(i) { + if(!$(this).collapsible("option","disabled")) { + self.triggers.eq(i).attr("tabIndex", 0); + return false; + } + }); + $.each(this.collapsibles, function(i) { + $(this).on("beforeOpen", function () { + self.triggers.attr("tabIndex",-1); + self.triggers.eq(i).attr("tabIndex",0); + + }); + }); + }, + + /** + * Prepare the elements for instantiating the collapsible widget + * @private + */ + _processPanels: function() { + this.collapsibles = this.element.find(this.options.collapsibleElement); + this.headers = this.element.find(this.options.header); + if (this.headers.length === 0) { + this.headers = this.collapsibles; + } + this.contents = this.element.find(this.options.content); + this.triggers = this.element.find(this.options.trigger); + if (this.triggers.length === 0) { + this.triggers = this.headers; + } + this._callCollapsible(); + }, + + /** + * Setting the disabled and active tabs and calling instantiation of collapsible + * @private + */ + _callCollapsible: function() { + var self = this, + disabled = false, + active = false; + + $.each(this.collapsibles, function(i) { + disabled = active = false; + if($.inArray(i,self.options.disabled) !== -1) { + disabled = true; + } + if(i === self.options.active) { + active = true; + } + self._instantiateCollapsible(this,i,active,disabled); + }); + }, + + /** + * Instantiate collapsible + * @param element + * @param index + * @param active + * @param disabled + * @private + */ + _instantiateCollapsible: function(element,index,active,disabled) { + $(element).mage('collapsible', + $.extend({}, this.options, { + active: active, + disabled: disabled, + header: this.headers.eq(index), + content: this.contents.eq(index), + trigger: this.triggers.eq(index)}) + ); + }, + + /** + * Adding callback to close others tabs when one gets opened + * @private + */ + _closeOthers: function() { + var self = this; + $.each(this.collapsibles, function() { + $(this).on("beforeOpen", function () { + self.collapsibles.not(this).collapsible("forceDeactivate"); + }); + }); + }, + + activate: function(index) { + this._toggleActivate("activate",index); + }, + + deactivate: function(index) { + this._toggleActivate("deactivate",index); + }, + + _toggleActivate: function(action,index) { + this.collapsibles.eq(index).collapsible(action); + }, + + disable: function(index) { + this._toggleEnable("disable",index); + }, + + enable: function(index) { + this._toggleEnable("enable",index); + }, + + _toggleEnable: function(action,index) { + if($.isArray( index )) { + var self = this; + $.each(index, function() { + self.collapsibles.eq(this).collapsible(action); + }); + } else if(index === undefined) { + this.collapsibles.collapsible(action); + } else { + this.collapsibles.eq(index).collapsible(action); + } + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + var keyCode = $.ui.keyCode, + toFocus = false, + toFocusIndex, + enabledTriggers = [], + length, + currentIndex, + self = this; + + $.each(this.triggers, function() { + if(!self.collapsibles.eq(self.triggers.index($(this))).collapsible("option","disabled")) { + enabledTriggers.push(this); + } + }); + length = $(enabledTriggers).length; + currentIndex = $(enabledTriggers).index(event.target); + var nextToFocus = function(direction) { + if(length > 0) { + if(direction === "right") { + toFocusIndex = (currentIndex + 1) % length; + } else { + toFocusIndex = (currentIndex + length - 1) % length; + } + return enabledTriggers[toFocusIndex]; + } + else return event.target; + }; + + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = nextToFocus("right"); + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = nextToFocus("left"); + break; + case keyCode.HOME: + toFocus = enabledTriggers[0]; + break; + case keyCode.END: + toFocus = enabledTriggers[length - 1]; + break; + } + + if ( toFocus ) { + toFocusIndex = this.triggers.index(toFocus); + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + toFocus.focus(); + if(this.options.openOnFocus) { + this.activate(toFocusIndex); + } + event.preventDefault(); + } + }, + + _bind: function () { + var events = { + keydown: "_keydown" + }; + this._off(this.triggers); + this._on(this.triggers, events); + } + }); +})(jQuery); diff --git a/pub/lib/mage/terms.js b/lib/web/mage/terms.js similarity index 100% rename from pub/lib/mage/terms.js rename to lib/web/mage/terms.js diff --git a/pub/lib/mage/toggle.js b/lib/web/mage/toggle.js similarity index 100% rename from pub/lib/mage/toggle.js rename to lib/web/mage/toggle.js diff --git a/pub/lib/mage/tooltip.js b/lib/web/mage/tooltip.js similarity index 97% rename from pub/lib/mage/tooltip.js rename to lib/web/mage/tooltip.js index 85192a6e63568a3e5a1551cec869ce22d6dd3170..1baa87d9473b89b9337e20571490b2ed4bc2f408 100644 --- a/pub/lib/mage/tooltip.js +++ b/lib/web/mage/tooltip.js @@ -23,10 +23,7 @@ (function($) { 'use strict'; - + //Widget Wrapper $.widget('mage.tooltip', $.ui.tooltip, { - }); - - -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/pub/lib/mage/translate-inline-vde.css b/lib/web/mage/translate-inline-vde.css similarity index 100% rename from pub/lib/mage/translate-inline-vde.css rename to lib/web/mage/translate-inline-vde.css diff --git a/pub/lib/mage/translate-inline-vde.js b/lib/web/mage/translate-inline-vde.js similarity index 100% rename from pub/lib/mage/translate-inline-vde.js rename to lib/web/mage/translate-inline-vde.js diff --git a/pub/lib/mage/translate-inline.css b/lib/web/mage/translate-inline.css similarity index 100% rename from pub/lib/mage/translate-inline.css rename to lib/web/mage/translate-inline.css diff --git a/pub/lib/mage/translate-inline.js b/lib/web/mage/translate-inline.js similarity index 100% rename from pub/lib/mage/translate-inline.js rename to lib/web/mage/translate-inline.js diff --git a/pub/lib/mage/translate.js b/lib/web/mage/translate.js similarity index 100% rename from pub/lib/mage/translate.js rename to lib/web/mage/translate.js diff --git a/pub/lib/mage/validation.js b/lib/web/mage/validation.js similarity index 99% rename from pub/lib/mage/validation.js rename to lib/web/mage/validation.js index 64afe984cd9804526b5dacd5a4a32f0de3a1881d..771b713c901d540196fad359a7e130ff8286d1c6 100644 --- a/pub/lib/mage/validation.js +++ b/lib/web/mage/validation.js @@ -741,7 +741,8 @@ function(v) { var test = new Date(v); return $.mage.isEmptyNoTrim(v) || !isNaN(test); - } + },'Please enter a valid date.' + ], "validate-date-range": [ function(v, elm) { diff --git a/pub/lib/mage/validation/dob-rule.js b/lib/web/mage/validation/dob-rule.js similarity index 100% rename from pub/lib/mage/validation/dob-rule.js rename to lib/web/mage/validation/dob-rule.js diff --git a/pub/lib/mage/validation/validation.js b/lib/web/mage/validation/validation.js similarity index 100% rename from pub/lib/mage/validation/validation.js rename to lib/web/mage/validation/validation.js diff --git a/pub/lib/mage/webapi.js b/lib/web/mage/webapi.js similarity index 100% rename from pub/lib/mage/webapi.js rename to lib/web/mage/webapi.js diff --git a/pub/lib/mage/zoom.js b/lib/web/mage/zoom.js similarity index 100% rename from pub/lib/mage/zoom.js rename to lib/web/mage/zoom.js diff --git a/pub/lib/matchMedia.js b/lib/web/matchMedia.js similarity index 100% rename from pub/lib/matchMedia.js rename to lib/web/matchMedia.js diff --git a/pub/lib/modernizr/modernizr.2.0.6.js b/lib/web/modernizr/modernizr.2.0.6.js similarity index 100% rename from pub/lib/modernizr/modernizr.2.0.6.js rename to lib/web/modernizr/modernizr.2.0.6.js diff --git a/pub/lib/modernizr/modernizr.details.js b/lib/web/modernizr/modernizr.details.js similarity index 100% rename from pub/lib/modernizr/modernizr.details.js rename to lib/web/modernizr/modernizr.details.js diff --git a/pub/lib/modernizr/modernizr.js b/lib/web/modernizr/modernizr.js similarity index 100% rename from pub/lib/modernizr/modernizr.js rename to lib/web/modernizr/modernizr.js diff --git a/pub/lib/prototype/debug.js b/lib/web/prototype/debug.js similarity index 100% rename from pub/lib/prototype/debug.js rename to lib/web/prototype/debug.js diff --git a/pub/lib/prototype/effects.js b/lib/web/prototype/effects.js similarity index 100% rename from pub/lib/prototype/effects.js rename to lib/web/prototype/effects.js diff --git a/pub/lib/prototype/extended_debug.js b/lib/web/prototype/extended_debug.js similarity index 100% rename from pub/lib/prototype/extended_debug.js rename to lib/web/prototype/extended_debug.js diff --git a/pub/lib/prototype/prototype.js b/lib/web/prototype/prototype.js similarity index 100% rename from pub/lib/prototype/prototype.js rename to lib/web/prototype/prototype.js diff --git a/pub/lib/prototype/tooltip.js b/lib/web/prototype/tooltip.js similarity index 100% rename from pub/lib/prototype/tooltip.js rename to lib/web/prototype/tooltip.js diff --git a/pub/lib/prototype/tooltip_manager.js b/lib/web/prototype/tooltip_manager.js similarity index 100% rename from pub/lib/prototype/tooltip_manager.js rename to lib/web/prototype/tooltip_manager.js diff --git a/pub/lib/prototype/validation.js b/lib/web/prototype/validation.js similarity index 100% rename from pub/lib/prototype/validation.js rename to lib/web/prototype/validation.js diff --git a/pub/lib/prototype/window.js b/lib/web/prototype/window.js similarity index 100% rename from pub/lib/prototype/window.js rename to lib/web/prototype/window.js diff --git a/pub/lib/prototype/window_effects.js b/lib/web/prototype/window_effects.js similarity index 100% rename from pub/lib/prototype/window_effects.js rename to lib/web/prototype/window_effects.js diff --git a/pub/lib/prototype/window_ext.js b/lib/web/prototype/window_ext.js similarity index 100% rename from pub/lib/prototype/window_ext.js rename to lib/web/prototype/window_ext.js diff --git a/pub/lib/prototype/window_readme.txt b/lib/web/prototype/window_readme.txt similarity index 100% rename from pub/lib/prototype/window_readme.txt rename to lib/web/prototype/window_readme.txt diff --git a/pub/lib/prototype/windows/MIT-LICENSE b/lib/web/prototype/windows/MIT-LICENSE similarity index 100% rename from pub/lib/prototype/windows/MIT-LICENSE rename to lib/web/prototype/windows/MIT-LICENSE diff --git a/pub/lib/prototype/windows/README b/lib/web/prototype/windows/README similarity index 100% rename from pub/lib/prototype/windows/README rename to lib/web/prototype/windows/README diff --git a/pub/lib/prototype/windows/themes/alert.css b/lib/web/prototype/windows/themes/alert.css similarity index 100% rename from pub/lib/prototype/windows/themes/alert.css rename to lib/web/prototype/windows/themes/alert.css diff --git a/pub/lib/prototype/windows/themes/alert/bottom.gif b/lib/web/prototype/windows/themes/alert/bottom.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/bottom.gif rename to lib/web/prototype/windows/themes/alert/bottom.gif diff --git a/pub/lib/prototype/windows/themes/alert/bottom_left.gif b/lib/web/prototype/windows/themes/alert/bottom_left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/bottom_left.gif rename to lib/web/prototype/windows/themes/alert/bottom_left.gif diff --git a/pub/lib/prototype/windows/themes/alert/bottom_right.gif b/lib/web/prototype/windows/themes/alert/bottom_right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/bottom_right.gif rename to lib/web/prototype/windows/themes/alert/bottom_right.gif diff --git a/pub/lib/prototype/windows/themes/alert/left.gif b/lib/web/prototype/windows/themes/alert/left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/left.gif rename to lib/web/prototype/windows/themes/alert/left.gif diff --git a/pub/lib/prototype/windows/themes/alert/overlay.png b/lib/web/prototype/windows/themes/alert/overlay.png similarity index 100% rename from pub/lib/prototype/windows/themes/alert/overlay.png rename to lib/web/prototype/windows/themes/alert/overlay.png diff --git a/pub/lib/prototype/windows/themes/alert/progress.gif b/lib/web/prototype/windows/themes/alert/progress.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/progress.gif rename to lib/web/prototype/windows/themes/alert/progress.gif diff --git a/pub/lib/prototype/windows/themes/alert/right.gif b/lib/web/prototype/windows/themes/alert/right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/right.gif rename to lib/web/prototype/windows/themes/alert/right.gif diff --git a/pub/lib/prototype/windows/themes/alert/top.gif b/lib/web/prototype/windows/themes/alert/top.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/top.gif rename to lib/web/prototype/windows/themes/alert/top.gif diff --git a/pub/lib/prototype/windows/themes/alert/top_left.gif b/lib/web/prototype/windows/themes/alert/top_left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/top_left.gif rename to lib/web/prototype/windows/themes/alert/top_left.gif diff --git a/pub/lib/prototype/windows/themes/alert/top_right.gif b/lib/web/prototype/windows/themes/alert/top_right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alert/top_right.gif rename to lib/web/prototype/windows/themes/alert/top_right.gif diff --git a/pub/lib/prototype/windows/themes/alert_lite.css b/lib/web/prototype/windows/themes/alert_lite.css similarity index 100% rename from pub/lib/prototype/windows/themes/alert_lite.css rename to lib/web/prototype/windows/themes/alert_lite.css diff --git a/pub/lib/prototype/windows/themes/alphacube.css b/lib/web/prototype/windows/themes/alphacube.css similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube.css rename to lib/web/prototype/windows/themes/alphacube.css diff --git a/pub/lib/prototype/windows/themes/alphacube/bottom-left-c.gif b/lib/web/prototype/windows/themes/alphacube/bottom-left-c.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/bottom-left-c.gif rename to lib/web/prototype/windows/themes/alphacube/bottom-left-c.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/bottom-middle.gif b/lib/web/prototype/windows/themes/alphacube/bottom-middle.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/bottom-middle.gif rename to lib/web/prototype/windows/themes/alphacube/bottom-middle.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/bottom-right-c.gif b/lib/web/prototype/windows/themes/alphacube/bottom-right-c.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/bottom-right-c.gif rename to lib/web/prototype/windows/themes/alphacube/bottom-right-c.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/button-close-focus.gif b/lib/web/prototype/windows/themes/alphacube/button-close-focus.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/button-close-focus.gif rename to lib/web/prototype/windows/themes/alphacube/button-close-focus.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/button-max-focus.gif b/lib/web/prototype/windows/themes/alphacube/button-max-focus.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/button-max-focus.gif rename to lib/web/prototype/windows/themes/alphacube/button-max-focus.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/button-min-focus.gif b/lib/web/prototype/windows/themes/alphacube/button-min-focus.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/button-min-focus.gif rename to lib/web/prototype/windows/themes/alphacube/button-min-focus.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/frame-left.gif b/lib/web/prototype/windows/themes/alphacube/frame-left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/frame-left.gif rename to lib/web/prototype/windows/themes/alphacube/frame-left.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/frame-right.gif b/lib/web/prototype/windows/themes/alphacube/frame-right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/frame-right.gif rename to lib/web/prototype/windows/themes/alphacube/frame-right.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/left-top.gif b/lib/web/prototype/windows/themes/alphacube/left-top.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/left-top.gif rename to lib/web/prototype/windows/themes/alphacube/left-top.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/right-top.gif b/lib/web/prototype/windows/themes/alphacube/right-top.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/right-top.gif rename to lib/web/prototype/windows/themes/alphacube/right-top.gif diff --git a/pub/lib/prototype/windows/themes/alphacube/top-middle.gif b/lib/web/prototype/windows/themes/alphacube/top-middle.gif similarity index 100% rename from pub/lib/prototype/windows/themes/alphacube/top-middle.gif rename to lib/web/prototype/windows/themes/alphacube/top-middle.gif diff --git a/pub/lib/prototype/windows/themes/behavior.htc b/lib/web/prototype/windows/themes/behavior.htc similarity index 100% rename from pub/lib/prototype/windows/themes/behavior.htc rename to lib/web/prototype/windows/themes/behavior.htc diff --git a/pub/lib/prototype/windows/themes/darkX.css b/lib/web/prototype/windows/themes/darkX.css similarity index 100% rename from pub/lib/prototype/windows/themes/darkX.css rename to lib/web/prototype/windows/themes/darkX.css diff --git a/pub/lib/prototype/windows/themes/darkX/button-close-focused.png b/lib/web/prototype/windows/themes/darkX/button-close-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/button-close-focused.png rename to lib/web/prototype/windows/themes/darkX/button-close-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/button-maximize-focused.png b/lib/web/prototype/windows/themes/darkX/button-maximize-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/button-maximize-focused.png rename to lib/web/prototype/windows/themes/darkX/button-maximize-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/button-minimize-focused.png b/lib/web/prototype/windows/themes/darkX/button-minimize-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/button-minimize-focused.png rename to lib/web/prototype/windows/themes/darkX/button-minimize-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/frame-bottom-left-focused.png b/lib/web/prototype/windows/themes/darkX/frame-bottom-left-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/frame-bottom-left-focused.png rename to lib/web/prototype/windows/themes/darkX/frame-bottom-left-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/frame-bottom-mid-focused.png b/lib/web/prototype/windows/themes/darkX/frame-bottom-mid-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/frame-bottom-mid-focused.png rename to lib/web/prototype/windows/themes/darkX/frame-bottom-mid-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/frame-bottom-right-focused.png b/lib/web/prototype/windows/themes/darkX/frame-bottom-right-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/frame-bottom-right-focused.png rename to lib/web/prototype/windows/themes/darkX/frame-bottom-right-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/frame-left-focused.png b/lib/web/prototype/windows/themes/darkX/frame-left-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/frame-left-focused.png rename to lib/web/prototype/windows/themes/darkX/frame-left-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/frame-right-focused.png b/lib/web/prototype/windows/themes/darkX/frame-right-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/frame-right-focused.png rename to lib/web/prototype/windows/themes/darkX/frame-right-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/titlebar-left-focused.png b/lib/web/prototype/windows/themes/darkX/titlebar-left-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/titlebar-left-focused.png rename to lib/web/prototype/windows/themes/darkX/titlebar-left-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/titlebar-mid-focused.png b/lib/web/prototype/windows/themes/darkX/titlebar-mid-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/titlebar-mid-focused.png rename to lib/web/prototype/windows/themes/darkX/titlebar-mid-focused.png diff --git a/pub/lib/prototype/windows/themes/darkX/titlebar-right-focused.png b/lib/web/prototype/windows/themes/darkX/titlebar-right-focused.png similarity index 100% rename from pub/lib/prototype/windows/themes/darkX/titlebar-right-focused.png rename to lib/web/prototype/windows/themes/darkX/titlebar-right-focused.png diff --git a/pub/lib/prototype/windows/themes/debug.css b/lib/web/prototype/windows/themes/debug.css similarity index 100% rename from pub/lib/prototype/windows/themes/debug.css rename to lib/web/prototype/windows/themes/debug.css diff --git a/pub/lib/prototype/windows/themes/default.css b/lib/web/prototype/windows/themes/default.css similarity index 100% rename from pub/lib/prototype/windows/themes/default.css rename to lib/web/prototype/windows/themes/default.css diff --git a/pub/lib/prototype/windows/themes/default/bottom_left.gif b/lib/web/prototype/windows/themes/default/bottom_left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/bottom_left.gif rename to lib/web/prototype/windows/themes/default/bottom_left.gif diff --git a/pub/lib/prototype/windows/themes/default/bottom_mid.gif b/lib/web/prototype/windows/themes/default/bottom_mid.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/bottom_mid.gif rename to lib/web/prototype/windows/themes/default/bottom_mid.gif diff --git a/pub/lib/prototype/windows/themes/default/bottom_right.gif b/lib/web/prototype/windows/themes/default/bottom_right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/bottom_right.gif rename to lib/web/prototype/windows/themes/default/bottom_right.gif diff --git a/pub/lib/prototype/windows/themes/default/bottom_right_resize.gif b/lib/web/prototype/windows/themes/default/bottom_right_resize.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/bottom_right_resize.gif rename to lib/web/prototype/windows/themes/default/bottom_right_resize.gif diff --git a/pub/lib/prototype/windows/themes/default/center_left.gif b/lib/web/prototype/windows/themes/default/center_left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/center_left.gif rename to lib/web/prototype/windows/themes/default/center_left.gif diff --git a/pub/lib/prototype/windows/themes/default/center_right.gif b/lib/web/prototype/windows/themes/default/center_right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/center_right.gif rename to lib/web/prototype/windows/themes/default/center_right.gif diff --git a/pub/lib/prototype/windows/themes/default/clear.gif b/lib/web/prototype/windows/themes/default/clear.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/clear.gif rename to lib/web/prototype/windows/themes/default/clear.gif diff --git a/pub/lib/prototype/windows/themes/default/close.gif b/lib/web/prototype/windows/themes/default/close.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/close.gif rename to lib/web/prototype/windows/themes/default/close.gif diff --git a/pub/lib/prototype/windows/themes/default/inspect.gif b/lib/web/prototype/windows/themes/default/inspect.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/inspect.gif rename to lib/web/prototype/windows/themes/default/inspect.gif diff --git a/pub/lib/prototype/windows/themes/default/maximize.gif b/lib/web/prototype/windows/themes/default/maximize.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/maximize.gif rename to lib/web/prototype/windows/themes/default/maximize.gif diff --git a/pub/lib/prototype/windows/themes/default/minimize.gif b/lib/web/prototype/windows/themes/default/minimize.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/minimize.gif rename to lib/web/prototype/windows/themes/default/minimize.gif diff --git a/pub/lib/prototype/windows/themes/default/overlay.png b/lib/web/prototype/windows/themes/default/overlay.png similarity index 100% rename from pub/lib/prototype/windows/themes/default/overlay.png rename to lib/web/prototype/windows/themes/default/overlay.png diff --git a/pub/lib/prototype/windows/themes/default/resize.gif b/lib/web/prototype/windows/themes/default/resize.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/resize.gif rename to lib/web/prototype/windows/themes/default/resize.gif diff --git a/pub/lib/prototype/windows/themes/default/sizer.gif b/lib/web/prototype/windows/themes/default/sizer.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/sizer.gif rename to lib/web/prototype/windows/themes/default/sizer.gif diff --git a/pub/lib/prototype/windows/themes/default/top_left.gif b/lib/web/prototype/windows/themes/default/top_left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/top_left.gif rename to lib/web/prototype/windows/themes/default/top_left.gif diff --git a/pub/lib/prototype/windows/themes/default/top_mid.gif b/lib/web/prototype/windows/themes/default/top_mid.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/top_mid.gif rename to lib/web/prototype/windows/themes/default/top_mid.gif diff --git a/pub/lib/prototype/windows/themes/default/top_right.gif b/lib/web/prototype/windows/themes/default/top_right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/default/top_right.gif rename to lib/web/prototype/windows/themes/default/top_right.gif diff --git a/pub/lib/prototype/windows/themes/iefix/blank.gif b/lib/web/prototype/windows/themes/iefix/blank.gif similarity index 100% rename from pub/lib/prototype/windows/themes/iefix/blank.gif rename to lib/web/prototype/windows/themes/iefix/blank.gif diff --git a/pub/lib/prototype/windows/themes/iefix/iepngfix.css b/lib/web/prototype/windows/themes/iefix/iepngfix.css similarity index 100% rename from pub/lib/prototype/windows/themes/iefix/iepngfix.css rename to lib/web/prototype/windows/themes/iefix/iepngfix.css diff --git a/pub/lib/prototype/windows/themes/iefix/iepngfix.htc b/lib/web/prototype/windows/themes/iefix/iepngfix.htc similarity index 100% rename from pub/lib/prototype/windows/themes/iefix/iepngfix.htc rename to lib/web/prototype/windows/themes/iefix/iepngfix.htc diff --git a/pub/lib/prototype/windows/themes/lighting.css b/lib/web/prototype/windows/themes/lighting.css similarity index 100% rename from pub/lib/prototype/windows/themes/lighting.css rename to lib/web/prototype/windows/themes/lighting.css diff --git a/pub/lib/prototype/windows/themes/lighting/background_buttons.gif b/lib/web/prototype/windows/themes/lighting/background_buttons.gif similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/background_buttons.gif rename to lib/web/prototype/windows/themes/lighting/background_buttons.gif diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-left-blue.png b/lib/web/prototype/windows/themes/lighting/bottom-left-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-left-blue.png rename to lib/web/prototype/windows/themes/lighting/bottom-left-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-left-darkblue.png b/lib/web/prototype/windows/themes/lighting/bottom-left-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-left-darkblue.png rename to lib/web/prototype/windows/themes/lighting/bottom-left-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-left-green.png b/lib/web/prototype/windows/themes/lighting/bottom-left-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-left-green.png rename to lib/web/prototype/windows/themes/lighting/bottom-left-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-left-grey.png b/lib/web/prototype/windows/themes/lighting/bottom-left-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-left-grey.png rename to lib/web/prototype/windows/themes/lighting/bottom-left-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-middle-blue.png b/lib/web/prototype/windows/themes/lighting/bottom-middle-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-middle-blue.png rename to lib/web/prototype/windows/themes/lighting/bottom-middle-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-middle-darkblue.png b/lib/web/prototype/windows/themes/lighting/bottom-middle-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-middle-darkblue.png rename to lib/web/prototype/windows/themes/lighting/bottom-middle-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-middle-green.png b/lib/web/prototype/windows/themes/lighting/bottom-middle-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-middle-green.png rename to lib/web/prototype/windows/themes/lighting/bottom-middle-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-middle-grey.png b/lib/web/prototype/windows/themes/lighting/bottom-middle-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-middle-grey.png rename to lib/web/prototype/windows/themes/lighting/bottom-middle-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-right-blue.png b/lib/web/prototype/windows/themes/lighting/bottom-right-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-right-blue.png rename to lib/web/prototype/windows/themes/lighting/bottom-right-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-right-darkblue.png b/lib/web/prototype/windows/themes/lighting/bottom-right-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-right-darkblue.png rename to lib/web/prototype/windows/themes/lighting/bottom-right-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-right-green.png b/lib/web/prototype/windows/themes/lighting/bottom-right-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-right-green.png rename to lib/web/prototype/windows/themes/lighting/bottom-right-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/bottom-right-grey.png b/lib/web/prototype/windows/themes/lighting/bottom-right-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/bottom-right-grey.png rename to lib/web/prototype/windows/themes/lighting/bottom-right-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-close-blue.png b/lib/web/prototype/windows/themes/lighting/button-close-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-close-blue.png rename to lib/web/prototype/windows/themes/lighting/button-close-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-close-darkblue.png b/lib/web/prototype/windows/themes/lighting/button-close-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-close-darkblue.png rename to lib/web/prototype/windows/themes/lighting/button-close-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-close-green.png b/lib/web/prototype/windows/themes/lighting/button-close-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-close-green.png rename to lib/web/prototype/windows/themes/lighting/button-close-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-close-grey.png b/lib/web/prototype/windows/themes/lighting/button-close-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-close-grey.png rename to lib/web/prototype/windows/themes/lighting/button-close-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-maximize-blue.png b/lib/web/prototype/windows/themes/lighting/button-maximize-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-maximize-blue.png rename to lib/web/prototype/windows/themes/lighting/button-maximize-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-maximize-darkblue.png b/lib/web/prototype/windows/themes/lighting/button-maximize-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-maximize-darkblue.png rename to lib/web/prototype/windows/themes/lighting/button-maximize-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-maximize-green.png b/lib/web/prototype/windows/themes/lighting/button-maximize-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-maximize-green.png rename to lib/web/prototype/windows/themes/lighting/button-maximize-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-maximize-grey.png b/lib/web/prototype/windows/themes/lighting/button-maximize-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-maximize-grey.png rename to lib/web/prototype/windows/themes/lighting/button-maximize-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-minimize-blue.png b/lib/web/prototype/windows/themes/lighting/button-minimize-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-minimize-blue.png rename to lib/web/prototype/windows/themes/lighting/button-minimize-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-minimize-darkblue.png b/lib/web/prototype/windows/themes/lighting/button-minimize-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-minimize-darkblue.png rename to lib/web/prototype/windows/themes/lighting/button-minimize-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-minimize-green.png b/lib/web/prototype/windows/themes/lighting/button-minimize-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-minimize-green.png rename to lib/web/prototype/windows/themes/lighting/button-minimize-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/button-minimize-grey.png b/lib/web/prototype/windows/themes/lighting/button-minimize-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/button-minimize-grey.png rename to lib/web/prototype/windows/themes/lighting/button-minimize-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/left-blue.png b/lib/web/prototype/windows/themes/lighting/left-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/left-blue.png rename to lib/web/prototype/windows/themes/lighting/left-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/left-darkblue.png b/lib/web/prototype/windows/themes/lighting/left-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/left-darkblue.png rename to lib/web/prototype/windows/themes/lighting/left-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/left-green.png b/lib/web/prototype/windows/themes/lighting/left-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/left-green.png rename to lib/web/prototype/windows/themes/lighting/left-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/left-grey.png b/lib/web/prototype/windows/themes/lighting/left-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/left-grey.png rename to lib/web/prototype/windows/themes/lighting/left-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/pngbehavior.htc b/lib/web/prototype/windows/themes/lighting/pngbehavior.htc similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/pngbehavior.htc rename to lib/web/prototype/windows/themes/lighting/pngbehavior.htc diff --git a/pub/lib/prototype/windows/themes/lighting/right-blue.png b/lib/web/prototype/windows/themes/lighting/right-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/right-blue.png rename to lib/web/prototype/windows/themes/lighting/right-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/right-darkblue.png b/lib/web/prototype/windows/themes/lighting/right-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/right-darkblue.png rename to lib/web/prototype/windows/themes/lighting/right-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/right-green.png b/lib/web/prototype/windows/themes/lighting/right-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/right-green.png rename to lib/web/prototype/windows/themes/lighting/right-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/right-grey.png b/lib/web/prototype/windows/themes/lighting/right-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/right-grey.png rename to lib/web/prototype/windows/themes/lighting/right-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/spinner.gif b/lib/web/prototype/windows/themes/lighting/spinner.gif similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/spinner.gif rename to lib/web/prototype/windows/themes/lighting/spinner.gif diff --git a/pub/lib/prototype/windows/themes/lighting/top-left-blue.png b/lib/web/prototype/windows/themes/lighting/top-left-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-left-blue.png rename to lib/web/prototype/windows/themes/lighting/top-left-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-left-darkblue.png b/lib/web/prototype/windows/themes/lighting/top-left-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-left-darkblue.png rename to lib/web/prototype/windows/themes/lighting/top-left-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-left-green.png b/lib/web/prototype/windows/themes/lighting/top-left-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-left-green.png rename to lib/web/prototype/windows/themes/lighting/top-left-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-left-grey.png b/lib/web/prototype/windows/themes/lighting/top-left-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-left-grey.png rename to lib/web/prototype/windows/themes/lighting/top-left-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-middle-blue.png b/lib/web/prototype/windows/themes/lighting/top-middle-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-middle-blue.png rename to lib/web/prototype/windows/themes/lighting/top-middle-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-middle-darkblue.png b/lib/web/prototype/windows/themes/lighting/top-middle-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-middle-darkblue.png rename to lib/web/prototype/windows/themes/lighting/top-middle-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-middle-green.png b/lib/web/prototype/windows/themes/lighting/top-middle-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-middle-green.png rename to lib/web/prototype/windows/themes/lighting/top-middle-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-middle-grey.png b/lib/web/prototype/windows/themes/lighting/top-middle-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-middle-grey.png rename to lib/web/prototype/windows/themes/lighting/top-middle-grey.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-right-blue.png b/lib/web/prototype/windows/themes/lighting/top-right-blue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-right-blue.png rename to lib/web/prototype/windows/themes/lighting/top-right-blue.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-right-darkblue.png b/lib/web/prototype/windows/themes/lighting/top-right-darkblue.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-right-darkblue.png rename to lib/web/prototype/windows/themes/lighting/top-right-darkblue.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-right-green.png b/lib/web/prototype/windows/themes/lighting/top-right-green.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-right-green.png rename to lib/web/prototype/windows/themes/lighting/top-right-green.png diff --git a/pub/lib/prototype/windows/themes/lighting/top-right-grey.png b/lib/web/prototype/windows/themes/lighting/top-right-grey.png similarity index 100% rename from pub/lib/prototype/windows/themes/lighting/top-right-grey.png rename to lib/web/prototype/windows/themes/lighting/top-right-grey.png diff --git a/pub/lib/prototype/windows/themes/mac_os_x.css b/lib/web/prototype/windows/themes/mac_os_x.css similarity index 100% rename from pub/lib/prototype/windows/themes/mac_os_x.css rename to lib/web/prototype/windows/themes/mac_os_x.css diff --git a/pub/lib/prototype/windows/themes/mac_os_x_dialog.css b/lib/web/prototype/windows/themes/mac_os_x_dialog.css similarity index 100% rename from pub/lib/prototype/windows/themes/mac_os_x_dialog.css rename to lib/web/prototype/windows/themes/mac_os_x_dialog.css diff --git a/pub/lib/prototype/windows/themes/nuncio.css b/lib/web/prototype/windows/themes/nuncio.css similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio.css rename to lib/web/prototype/windows/themes/nuncio.css diff --git a/pub/lib/prototype/windows/themes/nuncio/bottom_left.png b/lib/web/prototype/windows/themes/nuncio/bottom_left.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/bottom_left.png rename to lib/web/prototype/windows/themes/nuncio/bottom_left.png diff --git a/pub/lib/prototype/windows/themes/nuncio/bottom_mid.png b/lib/web/prototype/windows/themes/nuncio/bottom_mid.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/bottom_mid.png rename to lib/web/prototype/windows/themes/nuncio/bottom_mid.png diff --git a/pub/lib/prototype/windows/themes/nuncio/bottom_right.png b/lib/web/prototype/windows/themes/nuncio/bottom_right.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/bottom_right.png rename to lib/web/prototype/windows/themes/nuncio/bottom_right.png diff --git a/pub/lib/prototype/windows/themes/nuncio/center_left.png b/lib/web/prototype/windows/themes/nuncio/center_left.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/center_left.png rename to lib/web/prototype/windows/themes/nuncio/center_left.png diff --git a/pub/lib/prototype/windows/themes/nuncio/center_right.png b/lib/web/prototype/windows/themes/nuncio/center_right.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/center_right.png rename to lib/web/prototype/windows/themes/nuncio/center_right.png diff --git a/pub/lib/prototype/windows/themes/nuncio/close.png b/lib/web/prototype/windows/themes/nuncio/close.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/close.png rename to lib/web/prototype/windows/themes/nuncio/close.png diff --git a/pub/lib/prototype/windows/themes/nuncio/minimize.png b/lib/web/prototype/windows/themes/nuncio/minimize.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/minimize.png rename to lib/web/prototype/windows/themes/nuncio/minimize.png diff --git a/pub/lib/prototype/windows/themes/nuncio/overlay.png b/lib/web/prototype/windows/themes/nuncio/overlay.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/overlay.png rename to lib/web/prototype/windows/themes/nuncio/overlay.png diff --git a/pub/lib/prototype/windows/themes/nuncio/top_left.png b/lib/web/prototype/windows/themes/nuncio/top_left.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/top_left.png rename to lib/web/prototype/windows/themes/nuncio/top_left.png diff --git a/pub/lib/prototype/windows/themes/nuncio/top_mid.png b/lib/web/prototype/windows/themes/nuncio/top_mid.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/top_mid.png rename to lib/web/prototype/windows/themes/nuncio/top_mid.png diff --git a/pub/lib/prototype/windows/themes/nuncio/top_right.png b/lib/web/prototype/windows/themes/nuncio/top_right.png similarity index 100% rename from pub/lib/prototype/windows/themes/nuncio/top_right.png rename to lib/web/prototype/windows/themes/nuncio/top_right.png diff --git a/pub/lib/prototype/windows/themes/spread.css b/lib/web/prototype/windows/themes/spread.css similarity index 100% rename from pub/lib/prototype/windows/themes/spread.css rename to lib/web/prototype/windows/themes/spread.css diff --git a/pub/lib/prototype/windows/themes/spread/.gif b/lib/web/prototype/windows/themes/spread/.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/.gif rename to lib/web/prototype/windows/themes/spread/.gif diff --git a/pub/lib/prototype/windows/themes/spread/bottom-left-c.gif b/lib/web/prototype/windows/themes/spread/bottom-left-c.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/bottom-left-c.gif rename to lib/web/prototype/windows/themes/spread/bottom-left-c.gif diff --git a/pub/lib/prototype/windows/themes/spread/bottom-middle.gif b/lib/web/prototype/windows/themes/spread/bottom-middle.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/bottom-middle.gif rename to lib/web/prototype/windows/themes/spread/bottom-middle.gif diff --git a/pub/lib/prototype/windows/themes/spread/bottom-right-c.gif b/lib/web/prototype/windows/themes/spread/bottom-right-c.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/bottom-right-c.gif rename to lib/web/prototype/windows/themes/spread/bottom-right-c.gif diff --git a/pub/lib/prototype/windows/themes/spread/button-close-focus.gif b/lib/web/prototype/windows/themes/spread/button-close-focus.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/button-close-focus.gif rename to lib/web/prototype/windows/themes/spread/button-close-focus.gif diff --git a/pub/lib/prototype/windows/themes/spread/button-max-focus.gif b/lib/web/prototype/windows/themes/spread/button-max-focus.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/button-max-focus.gif rename to lib/web/prototype/windows/themes/spread/button-max-focus.gif diff --git a/pub/lib/prototype/windows/themes/spread/button-min-focus.gif b/lib/web/prototype/windows/themes/spread/button-min-focus.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/button-min-focus.gif rename to lib/web/prototype/windows/themes/spread/button-min-focus.gif diff --git a/pub/lib/prototype/windows/themes/spread/frame-left.gif b/lib/web/prototype/windows/themes/spread/frame-left.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/frame-left.gif rename to lib/web/prototype/windows/themes/spread/frame-left.gif diff --git a/pub/lib/prototype/windows/themes/spread/frame-right.gif b/lib/web/prototype/windows/themes/spread/frame-right.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/frame-right.gif rename to lib/web/prototype/windows/themes/spread/frame-right.gif diff --git a/pub/lib/prototype/windows/themes/spread/left-top.gif b/lib/web/prototype/windows/themes/spread/left-top.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/left-top.gif rename to lib/web/prototype/windows/themes/spread/left-top.gif diff --git a/pub/lib/prototype/windows/themes/spread/right-top.gif b/lib/web/prototype/windows/themes/spread/right-top.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/right-top.gif rename to lib/web/prototype/windows/themes/spread/right-top.gif diff --git a/pub/lib/prototype/windows/themes/spread/top-middle.gif b/lib/web/prototype/windows/themes/spread/top-middle.gif similarity index 100% rename from pub/lib/prototype/windows/themes/spread/top-middle.gif rename to lib/web/prototype/windows/themes/spread/top-middle.gif diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/sub.css b/lib/web/requirejs-config.js similarity index 82% rename from dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/sub.css rename to lib/web/requirejs-config.js index 68044ff3389c3bb45b4b38949eed406d99bb25f8..bd0f76961178352141fb52f6ceed4e5c8c0b6382 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/sub.css +++ b/lib/web/requirejs-config.js @@ -20,4 +20,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -.sub {font-size: 100px} + +var config = { + shim: { + 'jquery-ui': { + deps: ['jquery'] + } + }, + paths: { + 'jquery-ui': 'jquery/jquery-ui', + 'jquery': 'jquery/jquery' + } +}; diff --git a/lib/web/requirejs/require.js b/lib/web/requirejs/require.js new file mode 100644 index 0000000000000000000000000000000000000000..24b061e620367919e822b8f2b8edfc2a6b03d0bc --- /dev/null +++ b/lib/web/requirejs/require.js @@ -0,0 +1,2068 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/requirejs for details + */ +//Not using strict: uneven strict support in browsers, #392, and causes +//problems with requirejs.exec()/transpiler plugins that may not be strict. +/*jslint regexp: true, nomen: true, sloppy: true */ +/*global window, navigator, document, importScripts, setTimeout, opera */ + +var requirejs, require, define; +(function (global) { + var req, s, head, baseElement, dataMain, src, + interactiveScript, currentlyAddingScript, mainScript, subPath, + version = '2.1.11', + commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, + cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + jsSuffixRegExp = /\.js$/, + currDirRegExp = /^\.\//, + op = Object.prototype, + ostring = op.toString, + hasOwn = op.hasOwnProperty, + ap = Array.prototype, + apsp = ap.splice, + isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), + isWebWorker = !isBrowser && typeof importScripts !== 'undefined', + //PS3 indicates loaded and complete, but need to wait for complete + //specifically. Sequence is 'loading', 'loaded', execution, + // then 'complete'. The UA check is unfortunate, but not sure how + //to feature test w/o causing perf issues. + readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? + /^complete$/ : /^(complete|loaded)$/, + defContextName = '_', + //Oh the tragedy, detecting opera. See the usage of isOpera for reason. + isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', + contexts = {}, + cfg = {}, + globalDefQueue = [], + useInteractive = false; + + function isFunction(it) { + return ostring.call(it) === '[object Function]'; + } + + function isArray(it) { + return ostring.call(it) === '[object Array]'; + } + + /** + * Helper function for iterating over an array. If the func returns + * a true value, it will break out of the loop. + */ + function each(ary, func) { + if (ary) { + var i; + for (i = 0; i < ary.length; i += 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + /** + * Helper function for iterating over an array backwards. If the func + * returns a true value, it will break out of the loop. + */ + function eachReverse(ary, func) { + if (ary) { + var i; + for (i = ary.length - 1; i > -1; i -= 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + function hasProp(obj, prop) { + return hasOwn.call(obj, prop); + } + + function getOwn(obj, prop) { + return hasProp(obj, prop) && obj[prop]; + } + + /** + * Cycles over properties in an object and calls a function for each + * property value. If the function returns a truthy value, then the + * iteration is stopped. + */ + function eachProp(obj, func) { + var prop; + for (prop in obj) { + if (hasProp(obj, prop)) { + if (func(obj[prop], prop)) { + break; + } + } + } + } + + /** + * Simple function to mix in properties from source into target, + * but only if target does not already have a property of the same name. + */ + function mixin(target, source, force, deepStringMixin) { + if (source) { + eachProp(source, function (value, prop) { + if (force || !hasProp(target, prop)) { + if (deepStringMixin && typeof value === 'object' && value && + !isArray(value) && !isFunction(value) && + !(value instanceof RegExp)) { + + if (!target[prop]) { + target[prop] = {}; + } + mixin(target[prop], value, force, deepStringMixin); + } else { + target[prop] = value; + } + } + }); + } + return target; + } + + //Similar to Function.prototype.bind, but the 'this' object is specified + //first, since it is easier to read/figure out what 'this' will be. + function bind(obj, fn) { + return function () { + return fn.apply(obj, arguments); + }; + } + + function scripts() { + return document.getElementsByTagName('script'); + } + + function defaultOnError(err) { + throw err; + } + + //Allow getting a global that is expressed in + //dot notation, like 'a.b.c'. + function getGlobal(value) { + if (!value) { + return value; + } + var g = global; + each(value.split('.'), function (part) { + g = g[part]; + }); + return g; + } + + /** + * Constructs an error with a pointer to an URL with more information. + * @param {String} id the error ID that maps to an ID on a web page. + * @param {String} message human readable error. + * @param {Error} [err] the original error, if there is one. + * + * @returns {Error} + */ + function makeError(id, msg, err, requireModules) { + var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); + e.requireType = id; + e.requireModules = requireModules; + if (err) { + e.originalError = err; + } + return e; + } + + if (typeof define !== 'undefined') { + //If a define is already in play via another AMD loader, + //do not overwrite. + return; + } + + if (typeof requirejs !== 'undefined') { + if (isFunction(requirejs)) { + //Do not overwrite and existing requirejs instance. + return; + } + cfg = requirejs; + requirejs = undefined; + } + + //Allow for a require config object + if (typeof require !== 'undefined' && !isFunction(require)) { + //assume it is a config object. + cfg = require; + require = undefined; + } + + function newContext(contextName) { + var inCheckLoaded, Module, context, handlers, + checkLoadedTimeoutId, + config = { + //Defaults. Do not set a default for map + //config to speed up normalize(), which + //will run faster if there is no default. + waitSeconds: 7, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {} + }, + registry = {}, + //registry of just enabled modules, to speed + //cycle breaking code when lots of modules + //are registered, but not activated. + enabledRegistry = {}, + undefEvents = {}, + defQueue = [], + defined = {}, + urlFetched = {}, + bundlesMap = {}, + requireCounter = 1, + unnormalizedCounter = 1; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part, length = ary.length; + for (i = 0; i < length; i++) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + /** + * Given a relative module name, like ./something, normalize it to + * a real name that can be mapped to a path. + * @param {String} name the relative name + * @param {String} baseName a real name that the name arg is relative + * to. + * @param {Boolean} applyMap apply the map config to the value. Should + * only be done if this normalization is for a dependency ID. + * @returns {String} normalized name + */ + function normalize(name, baseName, applyMap) { + var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, + foundMap, foundI, foundStarMap, starI, + baseParts = baseName && baseName.split('/'), + normalizedBaseParts = baseParts, + map = config.map, + starMap = map && map['*']; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + //Convert baseName to array, and lop off the last part, + //so that . matches that 'directory' and not name of the baseName's + //module. For instance, baseName of 'one/two/three', maps to + //'one/two/three.js', but we want the directory, 'one/two' for + //this normalization. + normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); + name = name.split('/'); + lastIndex = name.length - 1; + + // If wanting node ID compatibility, strip .js from end + // of IDs. Have to do this here, and not in nameToUrl + // because node allows either .js or non .js to map + // to same file. + if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { + name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); + } + + name = normalizedBaseParts.concat(name); + trimDots(name); + name = name.join('/'); + } else if (name.indexOf('./') === 0) { + // No baseName, so this is ID is resolved relative + // to baseUrl, pull off the leading dot. + name = name.substring(2); + } + } + + //Apply map config if available. + if (applyMap && map && (baseParts || starMap)) { + nameParts = name.split('/'); + + outerLoop: for (i = nameParts.length; i > 0; i -= 1) { + nameSegment = nameParts.slice(0, i).join('/'); + + if (baseParts) { + //Find the longest baseName segment match in the config. + //So, do joins on the biggest to smallest lengths of baseParts. + for (j = baseParts.length; j > 0; j -= 1) { + mapValue = getOwn(map, baseParts.slice(0, j).join('/')); + + //baseName segment has config, find if it has one for + //this name. + if (mapValue) { + mapValue = getOwn(mapValue, nameSegment); + if (mapValue) { + //Match, update name to the new value. + foundMap = mapValue; + foundI = i; + break outerLoop; + } + } + } + } + + //Check for a star map match, but just hold on to it, + //if there is a shorter segment match later in a matching + //config, then favor over this star map. + if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { + foundStarMap = getOwn(starMap, nameSegment); + starI = i; + } + } + + if (!foundMap && foundStarMap) { + foundMap = foundStarMap; + foundI = starI; + } + + if (foundMap) { + nameParts.splice(0, foundI, foundMap); + name = nameParts.join('/'); + } + } + + // If the name points to a package's name, use + // the package main instead. + pkgMain = getOwn(config.pkgs, name); + + return pkgMain ? pkgMain : name; + } + + function removeScript(name) { + if (isBrowser) { + each(scripts(), function (scriptNode) { + if (scriptNode.getAttribute('data-requiremodule') === name && + scriptNode.getAttribute('data-requirecontext') === context.contextName) { + scriptNode.parentNode.removeChild(scriptNode); + return true; + } + }); + } + } + + function hasPathFallback(id) { + var pathConfig = getOwn(config.paths, id); + if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { + //Pop off the first array value, since it failed, and + //retry + pathConfig.shift(); + context.require.undef(id); + context.require([id]); + return true; + } + } + + //Turns a plugin!resource to [plugin, resource] + //with the plugin being undefined if the name + //did not have a plugin prefix. + function splitPrefix(name) { + var prefix, + index = name ? name.indexOf('!') : -1; + if (index > -1) { + prefix = name.substring(0, index); + name = name.substring(index + 1, name.length); + } + return [prefix, name]; + } + + /** + * Creates a module mapping that includes plugin prefix, module + * name, and path. If parentModuleMap is provided it will + * also normalize the name via require.normalize() + * + * @param {String} name the module name + * @param {String} [parentModuleMap] parent module map + * for the module name, used to resolve relative names. + * @param {Boolean} isNormalized: is the ID already normalized. + * This is true if this call is done for a define() module ID. + * @param {Boolean} applyMap: apply the map config to the ID. + * Should only be true if this map is for a dependency. + * + * @returns {Object} + */ + function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { + var url, pluginModule, suffix, nameParts, + prefix = null, + parentName = parentModuleMap ? parentModuleMap.name : null, + originalName = name, + isDefine = true, + normalizedName = ''; + + //If no name, then it means it is a require call, generate an + //internal name. + if (!name) { + isDefine = false; + name = '_@r' + (requireCounter += 1); + } + + nameParts = splitPrefix(name); + prefix = nameParts[0]; + name = nameParts[1]; + + if (prefix) { + prefix = normalize(prefix, parentName, applyMap); + pluginModule = getOwn(defined, prefix); + } + + //Account for relative paths if there is a base name. + if (name) { + if (prefix) { + if (pluginModule && pluginModule.normalize) { + //Plugin is loaded, use its normalize method. + normalizedName = pluginModule.normalize(name, function (name) { + return normalize(name, parentName, applyMap); + }); + } else { + normalizedName = normalize(name, parentName, applyMap); + } + } else { + //A regular module. + normalizedName = normalize(name, parentName, applyMap); + + //Normalized name may be a plugin ID due to map config + //application in normalize. The map config values must + //already be normalized, so do not need to redo that part. + nameParts = splitPrefix(normalizedName); + prefix = nameParts[0]; + normalizedName = nameParts[1]; + isNormalized = true; + + url = context.nameToUrl(normalizedName); + } + } + + //If the id is a plugin id that cannot be determined if it needs + //normalization, stamp it with a unique ID so two matching relative + //ids that may conflict can be separate. + suffix = prefix && !pluginModule && !isNormalized ? + '_unnormalized' + (unnormalizedCounter += 1) : + ''; + + return { + prefix: prefix, + name: normalizedName, + parentMap: parentModuleMap, + unnormalized: !!suffix, + url: url, + originalName: originalName, + isDefine: isDefine, + id: (prefix ? + prefix + '!' + normalizedName : + normalizedName) + suffix + }; + } + + function getModule(depMap) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (!mod) { + mod = registry[id] = new context.Module(depMap); + } + + return mod; + } + + function on(depMap, name, fn) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (hasProp(defined, id) && + (!mod || mod.defineEmitComplete)) { + if (name === 'defined') { + fn(defined[id]); + } + } else { + mod = getModule(depMap); + if (mod.error && name === 'error') { + fn(mod.error); + } else { + mod.on(name, fn); + } + } + } + + function onError(err, errback) { + var ids = err.requireModules, + notified = false; + + if (errback) { + errback(err); + } else { + each(ids, function (id) { + var mod = getOwn(registry, id); + if (mod) { + //Set error on module, so it skips timeout checks. + mod.error = err; + if (mod.events.error) { + notified = true; + mod.emit('error', err); + } + } + }); + + if (!notified) { + req.onError(err); + } + } + } + + /** + * Internal method to transfer globalQueue items to this context's + * defQueue. + */ + function takeGlobalQueue() { + //Push all the globalDefQueue items into the context's defQueue + if (globalDefQueue.length) { + //Array splice in the values since the context code has a + //local var ref to defQueue, so cannot just reassign the one + //on context. + apsp.apply(defQueue, + [defQueue.length, 0].concat(globalDefQueue)); + globalDefQueue = []; + } + } + + handlers = { + 'require': function (mod) { + if (mod.require) { + return mod.require; + } else { + return (mod.require = context.makeRequire(mod.map)); + } + }, + 'exports': function (mod) { + mod.usingExports = true; + if (mod.map.isDefine) { + if (mod.exports) { + return (defined[mod.map.id] = mod.exports); + } else { + return (mod.exports = defined[mod.map.id] = {}); + } + } + }, + 'module': function (mod) { + if (mod.module) { + return mod.module; + } else { + return (mod.module = { + id: mod.map.id, + uri: mod.map.url, + config: function () { + return getOwn(config.config, mod.map.id) || {}; + }, + exports: mod.exports || (mod.exports = {}) + }); + } + } + }; + + function cleanRegistry(id) { + //Clean up machinery used for waiting modules. + delete registry[id]; + delete enabledRegistry[id]; + } + + function breakCycle(mod, traced, processed) { + var id = mod.map.id; + + if (mod.error) { + mod.emit('error', mod.error); + } else { + traced[id] = true; + each(mod.depMaps, function (depMap, i) { + var depId = depMap.id, + dep = getOwn(registry, depId); + + //Only force things that have not completed + //being defined, so still in the registry, + //and only if it has not been matched up + //in the module already. + if (dep && !mod.depMatched[i] && !processed[depId]) { + if (getOwn(traced, depId)) { + mod.defineDep(i, defined[depId]); + mod.check(); //pass false? + } else { + breakCycle(dep, traced, processed); + } + } + }); + processed[id] = true; + } + } + + function checkLoaded() { + var err, usingPathFallback, + waitInterval = config.waitSeconds * 1000, + //It is possible to disable the wait interval by using waitSeconds of 0. + expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), + noLoads = [], + reqCalls = [], + stillLoading = false, + needCycleCheck = true; + + //Do not bother if this call was a result of a cycle break. + if (inCheckLoaded) { + return; + } + + inCheckLoaded = true; + + //Figure out the state of all the modules. + eachProp(enabledRegistry, function (mod) { + var map = mod.map, + modId = map.id; + + //Skip things that are not enabled or in error state. + if (!mod.enabled) { + return; + } + + if (!map.isDefine) { + reqCalls.push(mod); + } + + if (!mod.error) { + //If the module should be executed, and it has not + //been inited and time is up, remember it. + if (!mod.inited && expired) { + if (hasPathFallback(modId)) { + usingPathFallback = true; + stillLoading = true; + } else { + noLoads.push(modId); + removeScript(modId); + } + } else if (!mod.inited && mod.fetched && map.isDefine) { + stillLoading = true; + if (!map.prefix) { + //No reason to keep looking for unfinished + //loading. If the only stillLoading is a + //plugin resource though, keep going, + //because it may be that a plugin resource + //is waiting on a non-plugin cycle. + return (needCycleCheck = false); + } + } + } + }); + + if (expired && noLoads.length) { + //If wait time expired, throw error of unloaded modules. + err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); + err.contextName = context.contextName; + return onError(err); + } + + //Not expired, check for a cycle. + if (needCycleCheck) { + each(reqCalls, function (mod) { + breakCycle(mod, {}, {}); + }); + } + + //If still waiting on loads, and the waiting load is something + //other than a plugin resource, or there are still outstanding + //scripts, then just try back later. + if ((!expired || usingPathFallback) && stillLoading) { + //Something is still waiting to load. Wait for it, but only + //if a timeout is not already in effect. + if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { + checkLoadedTimeoutId = setTimeout(function () { + checkLoadedTimeoutId = 0; + checkLoaded(); + }, 50); + } + } + + inCheckLoaded = false; + } + + Module = function (map) { + this.events = getOwn(undefEvents, map.id) || {}; + this.map = map; + this.shim = getOwn(config.shim, map.id); + this.depExports = []; + this.depMaps = []; + this.depMatched = []; + this.pluginMaps = {}; + this.depCount = 0; + + /* this.exports this.factory + this.depMaps = [], + this.enabled, this.fetched + */ + }; + + Module.prototype = { + init: function (depMaps, factory, errback, options) { + options = options || {}; + + //Do not do more inits if already done. Can happen if there + //are multiple define calls for the same module. That is not + //a normal, common case, but it is also not unexpected. + if (this.inited) { + return; + } + + this.factory = factory; + + if (errback) { + //Register for errors on this module. + this.on('error', errback); + } else if (this.events.error) { + //If no errback already, but there are error listeners + //on this module, set up an errback to pass to the deps. + errback = bind(this, function (err) { + this.emit('error', err); + }); + } + + //Do a copy of the dependency array, so that + //source inputs are not modified. For example + //"shim" deps are passed in here directly, and + //doing a direct modification of the depMaps array + //would affect that config. + this.depMaps = depMaps && depMaps.slice(0); + + this.errback = errback; + + //Indicate this module has be initialized + this.inited = true; + + this.ignore = options.ignore; + + //Could have option to init this module in enabled mode, + //or could have been previously marked as enabled. However, + //the dependencies are not known until init is called. So + //if enabled previously, now trigger dependencies as enabled. + if (options.enabled || this.enabled) { + //Enable this module and dependencies. + //Will call this.check() + this.enable(); + } else { + this.check(); + } + }, + + defineDep: function (i, depExports) { + //Because of cycles, defined callback for a given + //export can be called more than once. + if (!this.depMatched[i]) { + this.depMatched[i] = true; + this.depCount -= 1; + this.depExports[i] = depExports; + } + }, + + fetch: function () { + if (this.fetched) { + return; + } + this.fetched = true; + + context.startTime = (new Date()).getTime(); + + var map = this.map; + + //If the manager is for a plugin managed resource, + //ask the plugin to load it now. + if (this.shim) { + context.makeRequire(this.map, { + enableBuildCallback: true + })(this.shim.deps || [], bind(this, function () { + return map.prefix ? this.callPlugin() : this.load(); + })); + } else { + //Regular dependency. + return map.prefix ? this.callPlugin() : this.load(); + } + }, + + load: function () { + var url = this.map.url; + + //Regular dependency. + if (!urlFetched[url]) { + urlFetched[url] = true; + context.load(this.map.id, url); + } + }, + + /** + * Checks if the module is ready to define itself, and if so, + * define it. + */ + check: function () { + if (!this.enabled || this.enabling) { + return; + } + + var err, cjsModule, + id = this.map.id, + depExports = this.depExports, + exports = this.exports, + factory = this.factory; + + if (!this.inited) { + this.fetch(); + } else if (this.error) { + this.emit('error', this.error); + } else if (!this.defining) { + //The factory could trigger another require call + //that would result in checking this module to + //define itself again. If already in the process + //of doing that, skip this work. + this.defining = true; + + if (this.depCount < 1 && !this.defined) { + if (isFunction(factory)) { + //If there is an error listener, favor passing + //to that instead of throwing an error. However, + //only do it for define()'d modules. require + //errbacks should not be called for failures in + //their callbacks (#699). However if a global + //onError is set, use that. + if ((this.events.error && this.map.isDefine) || + req.onError !== defaultOnError) { + try { + exports = context.execCb(id, factory, depExports, exports); + } catch (e) { + err = e; + } + } else { + exports = context.execCb(id, factory, depExports, exports); + } + + // Favor return value over exports. If node/cjs in play, + // then will not have a return value anyway. Favor + // module.exports assignment over exports object. + if (this.map.isDefine && exports === undefined) { + cjsModule = this.module; + if (cjsModule) { + exports = cjsModule.exports; + } else if (this.usingExports) { + //exports already set the defined value. + exports = this.exports; + } + } + + if (err) { + err.requireMap = this.map; + err.requireModules = this.map.isDefine ? [this.map.id] : null; + err.requireType = this.map.isDefine ? 'define' : 'require'; + return onError((this.error = err)); + } + + } else { + //Just a literal value + exports = factory; + } + + this.exports = exports; + + if (this.map.isDefine && !this.ignore) { + defined[id] = exports; + + if (req.onResourceLoad) { + req.onResourceLoad(context, this.map, this.depMaps); + } + } + + //Clean up + cleanRegistry(id); + + this.defined = true; + } + + //Finished the define stage. Allow calling check again + //to allow define notifications below in the case of a + //cycle. + this.defining = false; + + if (this.defined && !this.defineEmitted) { + this.defineEmitted = true; + this.emit('defined', this.exports); + this.defineEmitComplete = true; + } + + } + }, + + callPlugin: function () { + var map = this.map, + id = map.id, + //Map already normalized the prefix. + pluginMap = makeModuleMap(map.prefix); + + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(pluginMap); + + on(pluginMap, 'defined', bind(this, function (plugin) { + var load, normalizedMap, normalizedMod, + bundleId = getOwn(bundlesMap, this.map.id), + name = this.map.name, + parentName = this.map.parentMap ? this.map.parentMap.name : null, + localRequire = context.makeRequire(map.parentMap, { + enableBuildCallback: true + }); + + //If current map is not normalized, wait for that + //normalized name to load instead of continuing. + if (this.map.unnormalized) { + //Normalize the ID if the plugin allows it. + if (plugin.normalize) { + name = plugin.normalize(name, function (name) { + return normalize(name, parentName, true); + }) || ''; + } + + //prefix and name should already be normalized, no need + //for applying map config again either. + normalizedMap = makeModuleMap(map.prefix + '!' + name, + this.map.parentMap); + on(normalizedMap, + 'defined', bind(this, function (value) { + this.init([], function () { return value; }, null, { + enabled: true, + ignore: true + }); + })); + + normalizedMod = getOwn(registry, normalizedMap.id); + if (normalizedMod) { + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(normalizedMap); + + if (this.events.error) { + normalizedMod.on('error', bind(this, function (err) { + this.emit('error', err); + })); + } + normalizedMod.enable(); + } + + return; + } + + //If a paths config, then just load that file instead to + //resolve the plugin, as it is built into that paths layer. + if (bundleId) { + this.map.url = context.nameToUrl(bundleId); + this.load(); + return; + } + + load = bind(this, function (value) { + this.init([], function () { return value; }, null, { + enabled: true + }); + }); + + load.error = bind(this, function (err) { + this.inited = true; + this.error = err; + err.requireModules = [id]; + + //Remove temp unnormalized modules for this module, + //since they will never be resolved otherwise now. + eachProp(registry, function (mod) { + if (mod.map.id.indexOf(id + '_unnormalized') === 0) { + cleanRegistry(mod.map.id); + } + }); + + onError(err); + }); + + //Allow plugins to load other code without having to know the + //context or how to 'complete' the load. + load.fromText = bind(this, function (text, textAlt) { + /*jslint evil: true */ + var moduleName = map.name, + moduleMap = makeModuleMap(moduleName), + hasInteractive = useInteractive; + + //As of 2.1.0, support just passing the text, to reinforce + //fromText only being called once per resource. Still + //support old style of passing moduleName but discard + //that moduleName in favor of the internal ref. + if (textAlt) { + text = textAlt; + } + + //Turn off interactive script matching for IE for any define + //calls in the text, then turn it back on at the end. + if (hasInteractive) { + useInteractive = false; + } + + //Prime the system by creating a module instance for + //it. + getModule(moduleMap); + + //Transfer any config to this other module. + if (hasProp(config.config, id)) { + config.config[moduleName] = config.config[id]; + } + + try { + req.exec(text); + } catch (e) { + return onError(makeError('fromtexteval', + 'fromText eval for ' + id + + ' failed: ' + e, + e, + [id])); + } + + if (hasInteractive) { + useInteractive = true; + } + + //Mark this as a dependency for the plugin + //resource + this.depMaps.push(moduleMap); + + //Support anonymous modules. + context.completeLoad(moduleName); + + //Bind the value of that module to the value for this + //resource ID. + localRequire([moduleName], load); + }); + + //Use parentName here since the plugin's name is not reliable, + //could be some weird string with no path that actually wants to + //reference the parentName's path. + plugin.load(map.name, localRequire, load, config); + })); + + context.enable(pluginMap, this); + this.pluginMaps[pluginMap.id] = pluginMap; + }, + + enable: function () { + enabledRegistry[this.map.id] = this; + this.enabled = true; + + //Set flag mentioning that the module is enabling, + //so that immediate calls to the defined callbacks + //for dependencies do not trigger inadvertent load + //with the depCount still being zero. + this.enabling = true; + + //Enable each dependency + each(this.depMaps, bind(this, function (depMap, i) { + var id, mod, handler; + + if (typeof depMap === 'string') { + //Dependency needs to be converted to a depMap + //and wired up to this module. + depMap = makeModuleMap(depMap, + (this.map.isDefine ? this.map : this.map.parentMap), + false, + !this.skipMap); + this.depMaps[i] = depMap; + + handler = getOwn(handlers, depMap.id); + + if (handler) { + this.depExports[i] = handler(this); + return; + } + + this.depCount += 1; + + on(depMap, 'defined', bind(this, function (depExports) { + this.defineDep(i, depExports); + this.check(); + })); + + if (this.errback) { + on(depMap, 'error', bind(this, this.errback)); + } + } + + id = depMap.id; + mod = registry[id]; + + //Skip special modules like 'require', 'exports', 'module' + //Also, don't call enable if it is already enabled, + //important in circular dependency cases. + if (!hasProp(handlers, id) && mod && !mod.enabled) { + context.enable(depMap, this); + } + })); + + //Enable each plugin that is used in + //a dependency + eachProp(this.pluginMaps, bind(this, function (pluginMap) { + var mod = getOwn(registry, pluginMap.id); + if (mod && !mod.enabled) { + context.enable(pluginMap, this); + } + })); + + this.enabling = false; + + this.check(); + }, + + on: function (name, cb) { + var cbs = this.events[name]; + if (!cbs) { + cbs = this.events[name] = []; + } + cbs.push(cb); + }, + + emit: function (name, evt) { + each(this.events[name], function (cb) { + cb(evt); + }); + if (name === 'error') { + //Now that the error handler was triggered, remove + //the listeners, since this broken Module instance + //can stay around for a while in the registry. + delete this.events[name]; + } + } + }; + + function callGetModule(args) { + //Skip modules already defined. + if (!hasProp(defined, args[0])) { + getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); + } + } + + function removeListener(node, func, name, ieName) { + //Favor detachEvent because of IE9 + //issue, see attachEvent/addEventListener comment elsewhere + //in this file. + if (node.detachEvent && !isOpera) { + //Probably IE. If not it will throw an error, which will be + //useful to know. + if (ieName) { + node.detachEvent(ieName, func); + } + } else { + node.removeEventListener(name, func, false); + } + } + + /** + * Given an event from a script node, get the requirejs info from it, + * and then removes the event listeners on the node. + * @param {Event} evt + * @returns {Object} + */ + function getScriptData(evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + var node = evt.currentTarget || evt.srcElement; + + //Remove the listeners once here. + removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); + removeListener(node, context.onScriptError, 'error'); + + return { + node: node, + id: node && node.getAttribute('data-requiremodule') + }; + } + + function intakeDefines() { + var args; + + //Any defined modules in the global queue, intake them now. + takeGlobalQueue(); + + //Make sure any remaining defQueue items get properly processed. + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); + } else { + //args are id, deps, factory. Should be normalized by the + //define() function. + callGetModule(args); + } + } + } + + context = { + config: config, + contextName: contextName, + registry: registry, + defined: defined, + urlFetched: urlFetched, + defQueue: defQueue, + Module: Module, + makeModuleMap: makeModuleMap, + nextTick: req.nextTick, + onError: onError, + + /** + * Set a configuration for the context. + * @param {Object} cfg config object to integrate. + */ + configure: function (cfg) { + //Make sure the baseUrl ends in a slash. + if (cfg.baseUrl) { + if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { + cfg.baseUrl += '/'; + } + } + + //Save off the paths since they require special processing, + //they are additive. + var shim = config.shim, + objs = { + paths: true, + bundles: true, + config: true, + map: true + }; + + eachProp(cfg, function (value, prop) { + if (objs[prop]) { + if (!config[prop]) { + config[prop] = {}; + } + mixin(config[prop], value, true, true); + } else { + config[prop] = value; + } + }); + + //Reverse map the bundles + if (cfg.bundles) { + eachProp(cfg.bundles, function (value, prop) { + each(value, function (v) { + if (v !== prop) { + bundlesMap[v] = prop; + } + }); + }); + } + + //Merge shim + if (cfg.shim) { + eachProp(cfg.shim, function (value, id) { + //Normalize the structure + if (isArray(value)) { + value = { + deps: value + }; + } + if ((value.exports || value.init) && !value.exportsFn) { + value.exportsFn = context.makeShimExports(value); + } + shim[id] = value; + }); + config.shim = shim; + } + + //Adjust packages if necessary. + if (cfg.packages) { + each(cfg.packages, function (pkgObj) { + var location, name; + + pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; + + name = pkgObj.name; + location = pkgObj.location; + if (location) { + config.paths[name] = pkgObj.location; + } + + //Save pointer to main module ID for pkg name. + //Remove leading dot in main, so main paths are normalized, + //and remove any trailing .js, since different package + //envs have different conventions: some use a module name, + //some use a file name. + config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') + .replace(currDirRegExp, '') + .replace(jsSuffixRegExp, ''); + }); + } + + //If there are any "waiting to execute" modules in the registry, + //update the maps for them, since their info, like URLs to load, + //may have changed. + eachProp(registry, function (mod, id) { + //If module already has init called, since it is too + //late to modify them, and ignore unnormalized ones + //since they are transient. + if (!mod.inited && !mod.map.unnormalized) { + mod.map = makeModuleMap(id); + } + }); + + //If a deps array or a config callback is specified, then call + //require with those args. This is useful when require is defined as a + //config object before require.js is loaded. + if (cfg.deps || cfg.callback) { + context.require(cfg.deps || [], cfg.callback); + } + }, + + makeShimExports: function (value) { + function fn() { + var ret; + if (value.init) { + ret = value.init.apply(global, arguments); + } + return ret || (value.exports && getGlobal(value.exports)); + } + return fn; + }, + + makeRequire: function (relMap, options) { + options = options || {}; + + function localRequire(deps, callback, errback) { + var id, map, requireMod; + + if (options.enableBuildCallback && callback && isFunction(callback)) { + callback.__requireJsBuild = true; + } + + if (typeof deps === 'string') { + if (isFunction(callback)) { + //Invalid call + return onError(makeError('requireargs', 'Invalid require call'), errback); + } + + //If require|exports|module are requested, get the + //value for them from the special handlers. Caveat: + //this only works while module is being defined. + if (relMap && hasProp(handlers, deps)) { + return handlers[deps](registry[relMap.id]); + } + + //Synchronous access to one module. If require.get is + //available (as in the Node adapter), prefer that. + if (req.get) { + return req.get(context, deps, relMap, localRequire); + } + + //Normalize module name, if it contains . or .. + map = makeModuleMap(deps, relMap, false, true); + id = map.id; + + if (!hasProp(defined, id)) { + return onError(makeError('notloaded', 'Module name "' + + id + + '" has not been loaded yet for context: ' + + contextName + + (relMap ? '' : '. Use require([])'))); + } + return defined[id]; + } + + //Grab defines waiting in the global queue. + intakeDefines(); + + //Mark all the dependencies as needing to be loaded. + context.nextTick(function () { + //Some defines could have been added since the + //require call, collect them. + intakeDefines(); + + requireMod = getModule(makeModuleMap(null, relMap)); + + //Store if map config should be applied to this require + //call for dependencies. + requireMod.skipMap = options.skipMap; + + requireMod.init(deps, callback, errback, { + enabled: true + }); + + checkLoaded(); + }); + + return localRequire; + } + + mixin(localRequire, { + isBrowser: isBrowser, + + /** + * Converts a module name + .extension into an URL path. + * *Requires* the use of a module name. It does not support using + * plain URLs like nameToUrl. + */ + toUrl: function (moduleNamePlusExt) { + var ext, + index = moduleNamePlusExt.lastIndexOf('.'), + segment = moduleNamePlusExt.split('/')[0], + isRelative = segment === '.' || segment === '..'; + + //Have a file extension alias, and it is not the + //dots from a relative path. + if (index !== -1 && (!isRelative || index > 1)) { + ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); + moduleNamePlusExt = moduleNamePlusExt.substring(0, index); + } + + return context.nameToUrl(normalize(moduleNamePlusExt, + relMap && relMap.id, true), ext, true); + }, + + defined: function (id) { + return hasProp(defined, makeModuleMap(id, relMap, false, true).id); + }, + + specified: function (id) { + id = makeModuleMap(id, relMap, false, true).id; + return hasProp(defined, id) || hasProp(registry, id); + } + }); + + //Only allow undef on top level require calls + if (!relMap) { + localRequire.undef = function (id) { + //Bind any waiting define() calls to this context, + //fix for #408 + takeGlobalQueue(); + + var map = makeModuleMap(id, relMap, true), + mod = getOwn(registry, id); + + removeScript(id); + + delete defined[id]; + delete urlFetched[map.url]; + delete undefEvents[id]; + + //Clean queued defines too. Go backwards + //in array so that the splices do not + //mess up the iteration. + eachReverse(defQueue, function(args, i) { + if(args[0] === id) { + defQueue.splice(i, 1); + } + }); + + if (mod) { + //Hold on to listeners in case the + //module will be attempted to be reloaded + //using a different config. + if (mod.events.defined) { + undefEvents[id] = mod.events; + } + + cleanRegistry(id); + } + }; + } + + return localRequire; + }, + + /** + * Called to enable a module if it is still in the registry + * awaiting enablement. A second arg, parent, the parent module, + * is passed in for context, when this method is overridden by + * the optimizer. Not shown here to keep code compact. + */ + enable: function (depMap) { + var mod = getOwn(registry, depMap.id); + if (mod) { + getModule(depMap).enable(); + } + }, + + /** + * Internal method used by environment adapters to complete a load event. + * A load event could be a script load or just a load pass from a synchronous + * load call. + * @param {String} moduleName the name of the module to potentially complete. + */ + completeLoad: function (moduleName) { + var found, args, mod, + shim = getOwn(config.shim, moduleName) || {}, + shExports = shim.exports; + + takeGlobalQueue(); + + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + args[0] = moduleName; + //If already found an anonymous module and bound it + //to this name, then this is some other anon module + //waiting for its completeLoad to fire. + if (found) { + break; + } + found = true; + } else if (args[0] === moduleName) { + //Found matching define call for this script! + found = true; + } + + callGetModule(args); + } + + //Do this after the cycle of callGetModule in case the result + //of those calls/init calls changes the registry. + mod = getOwn(registry, moduleName); + + if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { + if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { + if (hasPathFallback(moduleName)) { + return; + } else { + return onError(makeError('nodefine', + 'No define call for ' + moduleName, + null, + [moduleName])); + } + } else { + //A script that does not call define(), so just simulate + //the call for it. + callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); + } + } + + checkLoaded(); + }, + + /** + * Converts a module name to a file path. Supports cases where + * moduleName may actually be just an URL. + * Note that it **does not** call normalize on the moduleName, + * it is assumed to have already been normalized. This is an + * internal API, not a public one. Use toUrl for the public API. + */ + nameToUrl: function (moduleName, ext, skipExt) { + var paths, syms, i, parentModule, url, + parentPath, bundleId, + pkgMain = getOwn(config.pkgs, moduleName); + + if (pkgMain) { + moduleName = pkgMain; + } + + bundleId = getOwn(bundlesMap, moduleName); + + if (bundleId) { + return context.nameToUrl(bundleId, ext, skipExt); + } + + //If a colon is in the URL, it indicates a protocol is used and it is just + //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) + //or ends with .js, then assume the user meant to use an url and not a module id. + //The slash is important for protocol-less URLs as well as full paths. + if (req.jsExtRegExp.test(moduleName)) { + //Just a plain path, not module name lookup, so just return it. + //Add extension if it is included. This is a bit wonky, only non-.js things pass + //an extension, this method probably needs to be reworked. + url = moduleName + (ext || ''); + } else { + //A module that needs to be converted to a path. + paths = config.paths; + + syms = moduleName.split('/'); + //For each module name segment, see if there is a path + //registered for it. Start with most specific name + //and work up from it. + for (i = syms.length; i > 0; i -= 1) { + parentModule = syms.slice(0, i).join('/'); + + parentPath = getOwn(paths, parentModule); + if (parentPath) { + //If an array, it means there are a few choices, + //Choose the one that is desired + if (isArray(parentPath)) { + parentPath = parentPath[0]; + } + syms.splice(0, i, parentPath); + break; + } + } + + //Join the path parts together, then figure out if baseUrl is needed. + url = syms.join('/'); + url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); + url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; + } + + return config.urlArgs ? url + + ((url.indexOf('?') === -1 ? '?' : '&') + + config.urlArgs) : url; + }, + + //Delegates to req.load. Broken out as a separate function to + //allow overriding in the optimizer. + load: function (id, url) { + req.load(context, id, url); + }, + + /** + * Executes a module callback function. Broken out as a separate function + * solely to allow the build system to sequence the files in the built + * layer in the right sequence. + * + * @private + */ + execCb: function (name, callback, args, exports) { + return callback.apply(exports, args); + }, + + /** + * callback for script loads, used to check status of loading. + * + * @param {Event} evt the event from the browser for the script + * that was loaded. + */ + onScriptLoad: function (evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + if (evt.type === 'load' || + (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { + //Reset interactive script so a script node is not held onto for + //to long. + interactiveScript = null; + + //Pull out the name of the module and the context. + var data = getScriptData(evt); + context.completeLoad(data.id); + } + }, + + /** + * Callback for script errors. + */ + onScriptError: function (evt) { + var data = getScriptData(evt); + if (!hasPathFallback(data.id)) { + return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); + } + } + }; + + context.require = context.makeRequire(); + return context; + } + + /** + * Main entry point. + * + * If the only argument to require is a string, then the module that + * is represented by that string is fetched for the appropriate context. + * + * If the first argument is an array, then it will be treated as an array + * of dependency string names to fetch. An optional function callback can + * be specified to execute when all of those dependencies are available. + * + * Make a local req variable to help Caja compliance (it assumes things + * on a require that are not standardized), and to give a short + * name for minification/local scope use. + */ + req = requirejs = function (deps, callback, errback, optional) { + + //Find the right context, use default + var context, config, + contextName = defContextName; + + // Determine if have config object in the call. + if (!isArray(deps) && typeof deps !== 'string') { + // deps is a config object + config = deps; + if (isArray(callback)) { + // Adjust args if there are dependencies + deps = callback; + callback = errback; + errback = optional; + } else { + deps = []; + } + } + + if (config && config.context) { + contextName = config.context; + } + + context = getOwn(contexts, contextName); + if (!context) { + context = contexts[contextName] = req.s.newContext(contextName); + } + + if (config) { + context.configure(config); + } + + return context.require(deps, callback, errback); + }; + + /** + * Support require.config() to make it easier to cooperate with other + * AMD loaders on globally agreed names. + */ + req.config = function (config) { + return req(config); + }; + + /** + * Execute something after the current tick + * of the event loop. Override for other envs + * that have a better solution than setTimeout. + * @param {Function} fn function to execute later. + */ + req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { + setTimeout(fn, 4); + } : function (fn) { fn(); }; + + /** + * Export require as a global, but only if it does not already exist. + */ + if (!require) { + require = req; + } + + req.version = version; + + //Used to filter out dependencies that are already paths. + req.jsExtRegExp = /^\/|:|\?|\.js$/; + req.isBrowser = isBrowser; + s = req.s = { + contexts: contexts, + newContext: newContext + }; + + //Create default context. + req({}); + + //Exports some context-sensitive methods on global require. + each([ + 'toUrl', + 'undef', + 'defined', + 'specified' + ], function (prop) { + //Reference from contexts instead of early binding to default context, + //so that during builds, the latest instance of the default context + //with its config gets used. + req[prop] = function () { + var ctx = contexts[defContextName]; + return ctx.require[prop].apply(ctx, arguments); + }; + }); + + if (isBrowser) { + head = s.head = document.getElementsByTagName('head')[0]; + //If BASE tag is in play, using appendChild is a problem for IE6. + //When that browser dies, this can be removed. Details in this jQuery bug: + //http://dev.jquery.com/ticket/2709 + baseElement = document.getElementsByTagName('base')[0]; + if (baseElement) { + head = s.head = baseElement.parentNode; + } + } + + /** + * Any errors that require explicitly generates will be passed to this + * function. Intercept/override it if you want custom error handling. + * @param {Error} err the error object. + */ + req.onError = defaultOnError; + + /** + * Creates the node for the load command. Only used in browser envs. + */ + req.createNode = function (config, moduleName, url) { + var node = config.xhtml ? + document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : + document.createElement('script'); + node.type = config.scriptType || 'text/javascript'; + node.charset = 'utf-8'; + node.async = true; + return node; + }; + + /** + * Does the request to load a module for the browser case. + * Make this a separate function to allow other environments + * to override it. + * + * @param {Object} context the require context to find state. + * @param {String} moduleName the name of the module. + * @param {Object} url the URL to the module. + */ + req.load = function (context, moduleName, url) { + var config = (context && context.config) || {}, + node; + if (isBrowser) { + //In the browser so use a script tag + node = req.createNode(config, moduleName, url); + + node.setAttribute('data-requirecontext', context.contextName); + node.setAttribute('data-requiremodule', moduleName); + + //Set up load listener. Test attachEvent first because IE9 has + //a subtle issue in its addEventListener and script onload firings + //that do not match the behavior of all other browsers with + //addEventListener support, which fire the onload event for a + //script right after the script execution. See: + //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution + //UNFORTUNATELY Opera implements attachEvent but does not follow the script + //script execution mode. + if (node.attachEvent && + //Check if node.attachEvent is artificially added by custom script or + //natively supported by browser + //read https://github.com/jrburke/requirejs/issues/187 + //if we can NOT find [native code] then it must NOT natively supported. + //in IE8, node.attachEvent does not have toString() + //Note the test for "[native code" with no closing brace, see: + //https://github.com/jrburke/requirejs/issues/273 + !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && + !isOpera) { + //Probably IE. IE (at least 6-8) do not fire + //script onload right after executing the script, so + //we cannot tie the anonymous define call to a name. + //However, IE reports the script as being in 'interactive' + //readyState at the time of the define call. + useInteractive = true; + + node.attachEvent('onreadystatechange', context.onScriptLoad); + //It would be great to add an error handler here to catch + //404s in IE9+. However, onreadystatechange will fire before + //the error handler, so that does not help. If addEventListener + //is used, then IE will fire error before load, but we cannot + //use that pathway given the connect.microsoft.com issue + //mentioned above about not doing the 'script execute, + //then fire the script load event listener before execute + //next script' that other browsers do. + //Best hope: IE10 fixes the issues, + //and then destroys all installs of IE 6-9. + //node.attachEvent('onerror', context.onScriptError); + } else { + node.addEventListener('load', context.onScriptLoad, false); + node.addEventListener('error', context.onScriptError, false); + } + node.src = url; + + //For some cache cases in IE 6-8, the script executes before the end + //of the appendChild execution, so to tie an anonymous define + //call to the module name (which is stored on the node), hold on + //to a reference to this node, but clear after the DOM insertion. + currentlyAddingScript = node; + if (baseElement) { + head.insertBefore(node, baseElement); + } else { + head.appendChild(node); + } + currentlyAddingScript = null; + + return node; + } else if (isWebWorker) { + try { + //In a web worker, use importScripts. This is not a very + //efficient use of importScripts, importScripts will block until + //its script is downloaded and evaluated. However, if web workers + //are in play, the expectation that a build has been done so that + //only one script needs to be loaded anyway. This may need to be + //reevaluated if other use cases become common. + importScripts(url); + + //Account for anonymous modules + context.completeLoad(moduleName); + } catch (e) { + context.onError(makeError('importscripts', + 'importScripts failed for ' + + moduleName + ' at ' + url, + e, + [moduleName])); + } + } + }; + + function getInteractiveScript() { + if (interactiveScript && interactiveScript.readyState === 'interactive') { + return interactiveScript; + } + + eachReverse(scripts(), function (script) { + if (script.readyState === 'interactive') { + return (interactiveScript = script); + } + }); + return interactiveScript; + } + + //Look for a data-main script attribute, which could also adjust the baseUrl. + if (isBrowser && !cfg.skipDataMain) { + //Figure out baseUrl. Get it from the script tag with require.js in it. + eachReverse(scripts(), function (script) { + //Set the 'head' where we can append children by + //using the script's parent. + if (!head) { + head = script.parentNode; + } + + //Look for a data-main attribute to set main script for the page + //to load. If it is there, the path to data main becomes the + //baseUrl, if it is not already set. + dataMain = script.getAttribute('data-main'); + if (dataMain) { + //Preserve dataMain in case it is a path (i.e. contains '?') + mainScript = dataMain; + + //Set final baseUrl if there is not already an explicit one. + if (!cfg.baseUrl) { + //Pull off the directory of data-main for use as the + //baseUrl. + src = mainScript.split('/'); + mainScript = src.pop(); + subPath = src.length ? src.join('/') + '/' : './'; + + cfg.baseUrl = subPath; + } + + //Strip off any trailing .js since mainScript is now + //like a module name. + mainScript = mainScript.replace(jsSuffixRegExp, ''); + + //If mainScript is still a path, fall back to dataMain + if (req.jsExtRegExp.test(mainScript)) { + mainScript = dataMain; + } + + //Put the data-main script in the files to load. + cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; + + return true; + } + }); + } + + /** + * The function that handles definitions of modules. Differs from + * require() in that a string for the module should be the first argument, + * and the function to execute after dependencies are loaded should + * return a value to define the module corresponding to the first argument's + * name. + */ + define = function (name, deps, callback) { + var node, context; + + //Allow for anonymous modules + if (typeof name !== 'string') { + //Adjust args appropriately + callback = deps; + deps = name; + name = null; + } + + //This module may not have dependencies + if (!isArray(deps)) { + callback = deps; + deps = null; + } + + //If no name, and callback is a function, then figure out if it a + //CommonJS thing with dependencies. + if (!deps && isFunction(callback)) { + deps = []; + //Remove comments from the callback string, + //look for require calls, and pull them into the dependencies, + //but only if there are function args. + if (callback.length) { + callback + .toString() + .replace(commentRegExp, '') + .replace(cjsRequireRegExp, function (match, dep) { + deps.push(dep); + }); + + //May be a CommonJS thing even without require calls, but still + //could use exports, and module. Avoid doing exports and module + //work though if it just needs require. + //REQUIRES the function to expect the CommonJS variables in the + //order listed below. + deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); + } + } + + //If in IE 6-8 and hit an anonymous define() call, do the interactive + //work. + if (useInteractive) { + node = currentlyAddingScript || getInteractiveScript(); + if (node) { + if (!name) { + name = node.getAttribute('data-requiremodule'); + } + context = contexts[node.getAttribute('data-requirecontext')]; + } + } + + //Always save off evaluating the def call until the script onload handler. + //This allows multiple modules to be in a file without prematurely + //tracing dependencies, and allows for anonymous module support, + //where the module name is not known until the script onload event + //occurs. If no context, use the global queue, and get it processed + //in the onscript load callback. + (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); + }; + + define.amd = { + jQuery: true + }; + + + /** + * Executes the text. Normally just uses eval, but can be modified + * to use a better, environment-specific call. Only used for transpiling + * loader plugins, not for plain JS modules. + * @param {String} text the text to execute/evaluate. + */ + req.exec = function (text) { + /*jslint evil: true */ + return eval(text); + }; + + //Set up with config info. + req(cfg); +}(this)); diff --git a/pub/lib/scriptaculous/builder.js b/lib/web/scriptaculous/builder.js similarity index 100% rename from pub/lib/scriptaculous/builder.js rename to lib/web/scriptaculous/builder.js diff --git a/pub/lib/scriptaculous/controls.js b/lib/web/scriptaculous/controls.js similarity index 100% rename from pub/lib/scriptaculous/controls.js rename to lib/web/scriptaculous/controls.js diff --git a/pub/lib/scriptaculous/dragdrop.js b/lib/web/scriptaculous/dragdrop.js similarity index 100% rename from pub/lib/scriptaculous/dragdrop.js rename to lib/web/scriptaculous/dragdrop.js diff --git a/pub/lib/scriptaculous/effects.js b/lib/web/scriptaculous/effects.js similarity index 100% rename from pub/lib/scriptaculous/effects.js rename to lib/web/scriptaculous/effects.js diff --git a/pub/lib/scriptaculous/scriptaculous.js b/lib/web/scriptaculous/scriptaculous.js similarity index 100% rename from pub/lib/scriptaculous/scriptaculous.js rename to lib/web/scriptaculous/scriptaculous.js diff --git a/pub/lib/scriptaculous/slider.js b/lib/web/scriptaculous/slider.js similarity index 100% rename from pub/lib/scriptaculous/slider.js rename to lib/web/scriptaculous/slider.js diff --git a/pub/lib/scriptaculous/sound.js b/lib/web/scriptaculous/sound.js similarity index 100% rename from pub/lib/scriptaculous/sound.js rename to lib/web/scriptaculous/sound.js diff --git a/pub/lib/scriptaculous/unittest.js b/lib/web/scriptaculous/unittest.js similarity index 100% rename from pub/lib/scriptaculous/unittest.js rename to lib/web/scriptaculous/unittest.js diff --git a/pub/lib/selectivizr.js b/lib/web/selectivizr.js similarity index 100% rename from pub/lib/selectivizr.js rename to lib/web/selectivizr.js diff --git a/pub/lib/spacer.gif b/lib/web/spacer.gif similarity index 100% rename from pub/lib/spacer.gif rename to lib/web/spacer.gif diff --git a/pub/lib/tiny_mce/classes/AddOnManager.js b/lib/web/tiny_mce/classes/AddOnManager.js similarity index 100% rename from pub/lib/tiny_mce/classes/AddOnManager.js rename to lib/web/tiny_mce/classes/AddOnManager.js diff --git a/pub/lib/tiny_mce/classes/ControlManager.js b/lib/web/tiny_mce/classes/ControlManager.js similarity index 100% rename from pub/lib/tiny_mce/classes/ControlManager.js rename to lib/web/tiny_mce/classes/ControlManager.js diff --git a/pub/lib/tiny_mce/classes/Editor.js b/lib/web/tiny_mce/classes/Editor.js similarity index 100% rename from pub/lib/tiny_mce/classes/Editor.js rename to lib/web/tiny_mce/classes/Editor.js diff --git a/pub/lib/tiny_mce/classes/EditorCommands.js b/lib/web/tiny_mce/classes/EditorCommands.js similarity index 100% rename from pub/lib/tiny_mce/classes/EditorCommands.js rename to lib/web/tiny_mce/classes/EditorCommands.js diff --git a/pub/lib/tiny_mce/classes/EditorManager.js b/lib/web/tiny_mce/classes/EditorManager.js similarity index 100% rename from pub/lib/tiny_mce/classes/EditorManager.js rename to lib/web/tiny_mce/classes/EditorManager.js diff --git a/pub/lib/tiny_mce/classes/ForceBlocks.js b/lib/web/tiny_mce/classes/ForceBlocks.js similarity index 100% rename from pub/lib/tiny_mce/classes/ForceBlocks.js rename to lib/web/tiny_mce/classes/ForceBlocks.js diff --git a/pub/lib/tiny_mce/classes/Formatter.js b/lib/web/tiny_mce/classes/Formatter.js similarity index 100% rename from pub/lib/tiny_mce/classes/Formatter.js rename to lib/web/tiny_mce/classes/Formatter.js diff --git a/pub/lib/tiny_mce/classes/LegacyInput.js b/lib/web/tiny_mce/classes/LegacyInput.js similarity index 100% rename from pub/lib/tiny_mce/classes/LegacyInput.js rename to lib/web/tiny_mce/classes/LegacyInput.js diff --git a/pub/lib/tiny_mce/classes/Popup.js b/lib/web/tiny_mce/classes/Popup.js similarity index 100% rename from pub/lib/tiny_mce/classes/Popup.js rename to lib/web/tiny_mce/classes/Popup.js diff --git a/pub/lib/tiny_mce/classes/UndoManager.js b/lib/web/tiny_mce/classes/UndoManager.js similarity index 100% rename from pub/lib/tiny_mce/classes/UndoManager.js rename to lib/web/tiny_mce/classes/UndoManager.js diff --git a/pub/lib/tiny_mce/classes/WindowManager.js b/lib/web/tiny_mce/classes/WindowManager.js similarity index 100% rename from pub/lib/tiny_mce/classes/WindowManager.js rename to lib/web/tiny_mce/classes/WindowManager.js diff --git a/pub/lib/tiny_mce/classes/adapter/jquery/adapter.js b/lib/web/tiny_mce/classes/adapter/jquery/adapter.js similarity index 100% rename from pub/lib/tiny_mce/classes/adapter/jquery/adapter.js rename to lib/web/tiny_mce/classes/adapter/jquery/adapter.js diff --git a/pub/lib/tiny_mce/classes/adapter/jquery/jquery.tinymce.js b/lib/web/tiny_mce/classes/adapter/jquery/jquery.tinymce.js similarity index 100% rename from pub/lib/tiny_mce/classes/adapter/jquery/jquery.tinymce.js rename to lib/web/tiny_mce/classes/adapter/jquery/jquery.tinymce.js diff --git a/pub/lib/tiny_mce/classes/adapter/prototype/adapter.js b/lib/web/tiny_mce/classes/adapter/prototype/adapter.js similarity index 100% rename from pub/lib/tiny_mce/classes/adapter/prototype/adapter.js rename to lib/web/tiny_mce/classes/adapter/prototype/adapter.js diff --git a/pub/lib/tiny_mce/classes/dom/DOMUtils.js b/lib/web/tiny_mce/classes/dom/DOMUtils.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/DOMUtils.js rename to lib/web/tiny_mce/classes/dom/DOMUtils.js diff --git a/pub/lib/tiny_mce/classes/dom/Element.js b/lib/web/tiny_mce/classes/dom/Element.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/Element.js rename to lib/web/tiny_mce/classes/dom/Element.js diff --git a/pub/lib/tiny_mce/classes/dom/EventUtils.js b/lib/web/tiny_mce/classes/dom/EventUtils.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/EventUtils.js rename to lib/web/tiny_mce/classes/dom/EventUtils.js diff --git a/pub/lib/tiny_mce/classes/dom/Range.js b/lib/web/tiny_mce/classes/dom/Range.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/Range.js rename to lib/web/tiny_mce/classes/dom/Range.js diff --git a/pub/lib/tiny_mce/classes/dom/RangeUtils.js b/lib/web/tiny_mce/classes/dom/RangeUtils.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/RangeUtils.js rename to lib/web/tiny_mce/classes/dom/RangeUtils.js diff --git a/pub/lib/tiny_mce/classes/dom/ScriptLoader.js b/lib/web/tiny_mce/classes/dom/ScriptLoader.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/ScriptLoader.js rename to lib/web/tiny_mce/classes/dom/ScriptLoader.js diff --git a/pub/lib/tiny_mce/classes/dom/Selection.js b/lib/web/tiny_mce/classes/dom/Selection.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/Selection.js rename to lib/web/tiny_mce/classes/dom/Selection.js diff --git a/pub/lib/tiny_mce/classes/dom/Serializer.js b/lib/web/tiny_mce/classes/dom/Serializer.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/Serializer.js rename to lib/web/tiny_mce/classes/dom/Serializer.js diff --git a/pub/lib/tiny_mce/classes/dom/Sizzle.js b/lib/web/tiny_mce/classes/dom/Sizzle.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/Sizzle.js rename to lib/web/tiny_mce/classes/dom/Sizzle.js diff --git a/pub/lib/tiny_mce/classes/dom/TreeWalker.js b/lib/web/tiny_mce/classes/dom/TreeWalker.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/TreeWalker.js rename to lib/web/tiny_mce/classes/dom/TreeWalker.js diff --git a/pub/lib/tiny_mce/classes/dom/TridentSelection.js b/lib/web/tiny_mce/classes/dom/TridentSelection.js similarity index 100% rename from pub/lib/tiny_mce/classes/dom/TridentSelection.js rename to lib/web/tiny_mce/classes/dom/TridentSelection.js diff --git a/pub/lib/tiny_mce/classes/firebug/FIREBUG.LICENSE b/lib/web/tiny_mce/classes/firebug/FIREBUG.LICENSE similarity index 100% rename from pub/lib/tiny_mce/classes/firebug/FIREBUG.LICENSE rename to lib/web/tiny_mce/classes/firebug/FIREBUG.LICENSE diff --git a/pub/lib/tiny_mce/classes/firebug/firebug-lite.js b/lib/web/tiny_mce/classes/firebug/firebug-lite.js similarity index 100% rename from pub/lib/tiny_mce/classes/firebug/firebug-lite.js rename to lib/web/tiny_mce/classes/firebug/firebug-lite.js diff --git a/pub/lib/tiny_mce/classes/html/DomParser.js b/lib/web/tiny_mce/classes/html/DomParser.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/DomParser.js rename to lib/web/tiny_mce/classes/html/DomParser.js diff --git a/pub/lib/tiny_mce/classes/html/Entities.js b/lib/web/tiny_mce/classes/html/Entities.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/Entities.js rename to lib/web/tiny_mce/classes/html/Entities.js diff --git a/pub/lib/tiny_mce/classes/html/Node.js b/lib/web/tiny_mce/classes/html/Node.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/Node.js rename to lib/web/tiny_mce/classes/html/Node.js diff --git a/pub/lib/tiny_mce/classes/html/SaxParser.js b/lib/web/tiny_mce/classes/html/SaxParser.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/SaxParser.js rename to lib/web/tiny_mce/classes/html/SaxParser.js diff --git a/pub/lib/tiny_mce/classes/html/Schema.js b/lib/web/tiny_mce/classes/html/Schema.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/Schema.js rename to lib/web/tiny_mce/classes/html/Schema.js diff --git a/pub/lib/tiny_mce/classes/html/Serializer.js b/lib/web/tiny_mce/classes/html/Serializer.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/Serializer.js rename to lib/web/tiny_mce/classes/html/Serializer.js diff --git a/pub/lib/tiny_mce/classes/html/Styles.js b/lib/web/tiny_mce/classes/html/Styles.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/Styles.js rename to lib/web/tiny_mce/classes/html/Styles.js diff --git a/pub/lib/tiny_mce/classes/html/Writer.js b/lib/web/tiny_mce/classes/html/Writer.js similarity index 100% rename from pub/lib/tiny_mce/classes/html/Writer.js rename to lib/web/tiny_mce/classes/html/Writer.js diff --git a/pub/lib/tiny_mce/classes/tinymce.js b/lib/web/tiny_mce/classes/tinymce.js similarity index 100% rename from pub/lib/tiny_mce/classes/tinymce.js rename to lib/web/tiny_mce/classes/tinymce.js diff --git a/pub/lib/tiny_mce/classes/ui/Button.js b/lib/web/tiny_mce/classes/ui/Button.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/Button.js rename to lib/web/tiny_mce/classes/ui/Button.js diff --git a/pub/lib/tiny_mce/classes/ui/ColorSplitButton.js b/lib/web/tiny_mce/classes/ui/ColorSplitButton.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/ColorSplitButton.js rename to lib/web/tiny_mce/classes/ui/ColorSplitButton.js diff --git a/pub/lib/tiny_mce/classes/ui/Container.js b/lib/web/tiny_mce/classes/ui/Container.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/Container.js rename to lib/web/tiny_mce/classes/ui/Container.js diff --git a/pub/lib/tiny_mce/classes/ui/Control.js b/lib/web/tiny_mce/classes/ui/Control.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/Control.js rename to lib/web/tiny_mce/classes/ui/Control.js diff --git a/pub/lib/tiny_mce/classes/ui/DropMenu.js b/lib/web/tiny_mce/classes/ui/DropMenu.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/DropMenu.js rename to lib/web/tiny_mce/classes/ui/DropMenu.js diff --git a/pub/lib/tiny_mce/classes/ui/KeyboardNavigation.js b/lib/web/tiny_mce/classes/ui/KeyboardNavigation.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/KeyboardNavigation.js rename to lib/web/tiny_mce/classes/ui/KeyboardNavigation.js diff --git a/pub/lib/tiny_mce/classes/ui/ListBox.js b/lib/web/tiny_mce/classes/ui/ListBox.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/ListBox.js rename to lib/web/tiny_mce/classes/ui/ListBox.js diff --git a/pub/lib/tiny_mce/classes/ui/Menu.js b/lib/web/tiny_mce/classes/ui/Menu.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/Menu.js rename to lib/web/tiny_mce/classes/ui/Menu.js diff --git a/pub/lib/tiny_mce/classes/ui/MenuButton.js b/lib/web/tiny_mce/classes/ui/MenuButton.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/MenuButton.js rename to lib/web/tiny_mce/classes/ui/MenuButton.js diff --git a/pub/lib/tiny_mce/classes/ui/MenuItem.js b/lib/web/tiny_mce/classes/ui/MenuItem.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/MenuItem.js rename to lib/web/tiny_mce/classes/ui/MenuItem.js diff --git a/pub/lib/tiny_mce/classes/ui/NativeListBox.js b/lib/web/tiny_mce/classes/ui/NativeListBox.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/NativeListBox.js rename to lib/web/tiny_mce/classes/ui/NativeListBox.js diff --git a/pub/lib/tiny_mce/classes/ui/Separator.js b/lib/web/tiny_mce/classes/ui/Separator.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/Separator.js rename to lib/web/tiny_mce/classes/ui/Separator.js diff --git a/pub/lib/tiny_mce/classes/ui/SplitButton.js b/lib/web/tiny_mce/classes/ui/SplitButton.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/SplitButton.js rename to lib/web/tiny_mce/classes/ui/SplitButton.js diff --git a/pub/lib/tiny_mce/classes/ui/Toolbar.js b/lib/web/tiny_mce/classes/ui/Toolbar.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/Toolbar.js rename to lib/web/tiny_mce/classes/ui/Toolbar.js diff --git a/pub/lib/tiny_mce/classes/ui/ToolbarGroup.js b/lib/web/tiny_mce/classes/ui/ToolbarGroup.js similarity index 100% rename from pub/lib/tiny_mce/classes/ui/ToolbarGroup.js rename to lib/web/tiny_mce/classes/ui/ToolbarGroup.js diff --git a/pub/lib/tiny_mce/classes/util/Cookie.js b/lib/web/tiny_mce/classes/util/Cookie.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/Cookie.js rename to lib/web/tiny_mce/classes/util/Cookie.js diff --git a/pub/lib/tiny_mce/classes/util/Dispatcher.js b/lib/web/tiny_mce/classes/util/Dispatcher.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/Dispatcher.js rename to lib/web/tiny_mce/classes/util/Dispatcher.js diff --git a/pub/lib/tiny_mce/classes/util/JSON.js b/lib/web/tiny_mce/classes/util/JSON.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/JSON.js rename to lib/web/tiny_mce/classes/util/JSON.js diff --git a/pub/lib/tiny_mce/classes/util/JSONP.js b/lib/web/tiny_mce/classes/util/JSONP.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/JSONP.js rename to lib/web/tiny_mce/classes/util/JSONP.js diff --git a/pub/lib/tiny_mce/classes/util/JSONRequest.js b/lib/web/tiny_mce/classes/util/JSONRequest.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/JSONRequest.js rename to lib/web/tiny_mce/classes/util/JSONRequest.js diff --git a/pub/lib/tiny_mce/classes/util/Quirks.js b/lib/web/tiny_mce/classes/util/Quirks.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/Quirks.js rename to lib/web/tiny_mce/classes/util/Quirks.js diff --git a/pub/lib/tiny_mce/classes/util/URI.js b/lib/web/tiny_mce/classes/util/URI.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/URI.js rename to lib/web/tiny_mce/classes/util/URI.js diff --git a/pub/lib/tiny_mce/classes/util/VK.js b/lib/web/tiny_mce/classes/util/VK.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/VK.js rename to lib/web/tiny_mce/classes/util/VK.js diff --git a/pub/lib/tiny_mce/classes/util/XHR.js b/lib/web/tiny_mce/classes/util/XHR.js similarity index 100% rename from pub/lib/tiny_mce/classes/util/XHR.js rename to lib/web/tiny_mce/classes/util/XHR.js diff --git a/pub/lib/tiny_mce/classes/xml/Parser.js b/lib/web/tiny_mce/classes/xml/Parser.js similarity index 100% rename from pub/lib/tiny_mce/classes/xml/Parser.js rename to lib/web/tiny_mce/classes/xml/Parser.js diff --git a/pub/lib/tiny_mce/jquery.tinymce.js b/lib/web/tiny_mce/jquery.tinymce.js similarity index 100% rename from pub/lib/tiny_mce/jquery.tinymce.js rename to lib/web/tiny_mce/jquery.tinymce.js diff --git a/pub/lib/tiny_mce/langs/en.js b/lib/web/tiny_mce/langs/en.js similarity index 100% rename from pub/lib/tiny_mce/langs/en.js rename to lib/web/tiny_mce/langs/en.js diff --git a/pub/lib/tiny_mce/license.txt b/lib/web/tiny_mce/license.txt similarity index 100% rename from pub/lib/tiny_mce/license.txt rename to lib/web/tiny_mce/license.txt diff --git a/pub/lib/tiny_mce/plugins/advhr/css/advhr.css b/lib/web/tiny_mce/plugins/advhr/css/advhr.css similarity index 100% rename from pub/lib/tiny_mce/plugins/advhr/css/advhr.css rename to lib/web/tiny_mce/plugins/advhr/css/advhr.css diff --git a/pub/lib/tiny_mce/plugins/advhr/editor_plugin.js b/lib/web/tiny_mce/plugins/advhr/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advhr/editor_plugin.js rename to lib/web/tiny_mce/plugins/advhr/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/advhr/editor_plugin_src.js b/lib/web/tiny_mce/plugins/advhr/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advhr/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/advhr/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/advhr/js/rule.js b/lib/web/tiny_mce/plugins/advhr/js/rule.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advhr/js/rule.js rename to lib/web/tiny_mce/plugins/advhr/js/rule.js diff --git a/pub/lib/tiny_mce/plugins/advhr/langs/en_dlg.js b/lib/web/tiny_mce/plugins/advhr/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advhr/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/advhr/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/advhr/rule.htm b/lib/web/tiny_mce/plugins/advhr/rule.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/advhr/rule.htm rename to lib/web/tiny_mce/plugins/advhr/rule.htm diff --git a/pub/lib/tiny_mce/plugins/advimage/css/advimage.css b/lib/web/tiny_mce/plugins/advimage/css/advimage.css similarity index 100% rename from pub/lib/tiny_mce/plugins/advimage/css/advimage.css rename to lib/web/tiny_mce/plugins/advimage/css/advimage.css diff --git a/pub/lib/tiny_mce/plugins/advimage/editor_plugin.js b/lib/web/tiny_mce/plugins/advimage/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advimage/editor_plugin.js rename to lib/web/tiny_mce/plugins/advimage/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/advimage/editor_plugin_src.js b/lib/web/tiny_mce/plugins/advimage/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advimage/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/advimage/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/advimage/image.htm b/lib/web/tiny_mce/plugins/advimage/image.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/advimage/image.htm rename to lib/web/tiny_mce/plugins/advimage/image.htm diff --git a/pub/lib/tiny_mce/plugins/advimage/img/sample.gif b/lib/web/tiny_mce/plugins/advimage/img/sample.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/advimage/img/sample.gif rename to lib/web/tiny_mce/plugins/advimage/img/sample.gif diff --git a/pub/lib/tiny_mce/plugins/advimage/js/image.js b/lib/web/tiny_mce/plugins/advimage/js/image.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advimage/js/image.js rename to lib/web/tiny_mce/plugins/advimage/js/image.js diff --git a/pub/lib/tiny_mce/plugins/advimage/langs/en_dlg.js b/lib/web/tiny_mce/plugins/advimage/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advimage/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/advimage/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/advlink/css/advlink.css b/lib/web/tiny_mce/plugins/advlink/css/advlink.css similarity index 100% rename from pub/lib/tiny_mce/plugins/advlink/css/advlink.css rename to lib/web/tiny_mce/plugins/advlink/css/advlink.css diff --git a/pub/lib/tiny_mce/plugins/advlink/editor_plugin.js b/lib/web/tiny_mce/plugins/advlink/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advlink/editor_plugin.js rename to lib/web/tiny_mce/plugins/advlink/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/advlink/editor_plugin_src.js b/lib/web/tiny_mce/plugins/advlink/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advlink/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/advlink/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/advlink/js/advlink.js b/lib/web/tiny_mce/plugins/advlink/js/advlink.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advlink/js/advlink.js rename to lib/web/tiny_mce/plugins/advlink/js/advlink.js diff --git a/pub/lib/tiny_mce/plugins/advlink/langs/en_dlg.js b/lib/web/tiny_mce/plugins/advlink/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advlink/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/advlink/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/advlink/link.htm b/lib/web/tiny_mce/plugins/advlink/link.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/advlink/link.htm rename to lib/web/tiny_mce/plugins/advlink/link.htm diff --git a/pub/lib/tiny_mce/plugins/advlist/editor_plugin.js b/lib/web/tiny_mce/plugins/advlist/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advlist/editor_plugin.js rename to lib/web/tiny_mce/plugins/advlist/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/advlist/editor_plugin_src.js b/lib/web/tiny_mce/plugins/advlist/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/advlist/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/advlist/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/autolink/editor_plugin.js b/lib/web/tiny_mce/plugins/autolink/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/autolink/editor_plugin.js rename to lib/web/tiny_mce/plugins/autolink/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/autolink/editor_plugin_src.js b/lib/web/tiny_mce/plugins/autolink/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/autolink/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/autolink/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/autoresize/editor_plugin.js b/lib/web/tiny_mce/plugins/autoresize/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/autoresize/editor_plugin.js rename to lib/web/tiny_mce/plugins/autoresize/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/autoresize/editor_plugin_src.js b/lib/web/tiny_mce/plugins/autoresize/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/autoresize/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/autoresize/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/autosave/editor_plugin.js b/lib/web/tiny_mce/plugins/autosave/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/autosave/editor_plugin.js rename to lib/web/tiny_mce/plugins/autosave/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/autosave/editor_plugin_src.js b/lib/web/tiny_mce/plugins/autosave/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/autosave/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/autosave/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/autosave/langs/en.js b/lib/web/tiny_mce/plugins/autosave/langs/en.js similarity index 100% rename from pub/lib/tiny_mce/plugins/autosave/langs/en.js rename to lib/web/tiny_mce/plugins/autosave/langs/en.js diff --git a/pub/lib/tiny_mce/plugins/bbcode/editor_plugin.js b/lib/web/tiny_mce/plugins/bbcode/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/bbcode/editor_plugin.js rename to lib/web/tiny_mce/plugins/bbcode/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/bbcode/editor_plugin_src.js b/lib/web/tiny_mce/plugins/bbcode/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/bbcode/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/bbcode/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/contextmenu/editor_plugin.js b/lib/web/tiny_mce/plugins/contextmenu/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/contextmenu/editor_plugin.js rename to lib/web/tiny_mce/plugins/contextmenu/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/lib/web/tiny_mce/plugins/contextmenu/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/contextmenu/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/contextmenu/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/directionality/editor_plugin.js b/lib/web/tiny_mce/plugins/directionality/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/directionality/editor_plugin.js rename to lib/web/tiny_mce/plugins/directionality/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/directionality/editor_plugin_src.js b/lib/web/tiny_mce/plugins/directionality/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/directionality/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/directionality/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/emotions/editor_plugin.js b/lib/web/tiny_mce/plugins/emotions/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/editor_plugin.js rename to lib/web/tiny_mce/plugins/emotions/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/emotions/editor_plugin_src.js b/lib/web/tiny_mce/plugins/emotions/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/emotions/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/emotions/emotions.htm b/lib/web/tiny_mce/plugins/emotions/emotions.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/emotions.htm rename to lib/web/tiny_mce/plugins/emotions/emotions.htm diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-cool.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-cool.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-cool.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-cool.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-cry.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-cry.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-cry.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-cry.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-embarassed.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-embarassed.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-embarassed.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-frown.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-frown.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-frown.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-frown.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-innocent.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-innocent.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-innocent.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-kiss.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-kiss.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-kiss.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-laughing.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-laughing.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-laughing.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-sealed.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-sealed.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-sealed.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-smile.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-smile.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-smile.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-smile.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-surprised.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-surprised.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-surprised.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-undecided.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-undecided.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-undecided.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-wink.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-wink.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-wink.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-wink.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/img/smiley-yell.gif b/lib/web/tiny_mce/plugins/emotions/img/smiley-yell.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/img/smiley-yell.gif rename to lib/web/tiny_mce/plugins/emotions/img/smiley-yell.gif diff --git a/pub/lib/tiny_mce/plugins/emotions/js/emotions.js b/lib/web/tiny_mce/plugins/emotions/js/emotions.js similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/js/emotions.js rename to lib/web/tiny_mce/plugins/emotions/js/emotions.js diff --git a/pub/lib/tiny_mce/plugins/emotions/langs/en_dlg.js b/lib/web/tiny_mce/plugins/emotions/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/emotions/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/emotions/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/example/dialog.htm b/lib/web/tiny_mce/plugins/example/dialog.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/example/dialog.htm rename to lib/web/tiny_mce/plugins/example/dialog.htm diff --git a/pub/lib/tiny_mce/plugins/example/editor_plugin.js b/lib/web/tiny_mce/plugins/example/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/example/editor_plugin.js rename to lib/web/tiny_mce/plugins/example/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/example/editor_plugin_src.js b/lib/web/tiny_mce/plugins/example/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/example/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/example/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/example/img/example.gif b/lib/web/tiny_mce/plugins/example/img/example.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/example/img/example.gif rename to lib/web/tiny_mce/plugins/example/img/example.gif diff --git a/pub/lib/tiny_mce/plugins/example/js/dialog.js b/lib/web/tiny_mce/plugins/example/js/dialog.js similarity index 100% rename from pub/lib/tiny_mce/plugins/example/js/dialog.js rename to lib/web/tiny_mce/plugins/example/js/dialog.js diff --git a/pub/lib/tiny_mce/plugins/example/langs/en.js b/lib/web/tiny_mce/plugins/example/langs/en.js similarity index 100% rename from pub/lib/tiny_mce/plugins/example/langs/en.js rename to lib/web/tiny_mce/plugins/example/langs/en.js diff --git a/pub/lib/tiny_mce/plugins/example/langs/en_dlg.js b/lib/web/tiny_mce/plugins/example/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/example/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/example/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/example_dependency/editor_plugin.js b/lib/web/tiny_mce/plugins/example_dependency/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/example_dependency/editor_plugin.js rename to lib/web/tiny_mce/plugins/example_dependency/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/example_dependency/editor_plugin_src.js b/lib/web/tiny_mce/plugins/example_dependency/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/example_dependency/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/example_dependency/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/fullpage/css/fullpage.css b/lib/web/tiny_mce/plugins/fullpage/css/fullpage.css similarity index 100% rename from pub/lib/tiny_mce/plugins/fullpage/css/fullpage.css rename to lib/web/tiny_mce/plugins/fullpage/css/fullpage.css diff --git a/pub/lib/tiny_mce/plugins/fullpage/editor_plugin.js b/lib/web/tiny_mce/plugins/fullpage/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/fullpage/editor_plugin.js rename to lib/web/tiny_mce/plugins/fullpage/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/fullpage/editor_plugin_src.js b/lib/web/tiny_mce/plugins/fullpage/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/fullpage/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/fullpage/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/fullpage/fullpage.htm b/lib/web/tiny_mce/plugins/fullpage/fullpage.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/fullpage/fullpage.htm rename to lib/web/tiny_mce/plugins/fullpage/fullpage.htm diff --git a/pub/lib/tiny_mce/plugins/fullpage/js/fullpage.js b/lib/web/tiny_mce/plugins/fullpage/js/fullpage.js similarity index 100% rename from pub/lib/tiny_mce/plugins/fullpage/js/fullpage.js rename to lib/web/tiny_mce/plugins/fullpage/js/fullpage.js diff --git a/pub/lib/tiny_mce/plugins/fullpage/langs/en_dlg.js b/lib/web/tiny_mce/plugins/fullpage/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/fullpage/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/fullpage/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/fullscreen/editor_plugin.js b/lib/web/tiny_mce/plugins/fullscreen/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/fullscreen/editor_plugin.js rename to lib/web/tiny_mce/plugins/fullscreen/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/lib/web/tiny_mce/plugins/fullscreen/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/fullscreen/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/fullscreen/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/fullscreen/fullscreen.htm b/lib/web/tiny_mce/plugins/fullscreen/fullscreen.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/fullscreen/fullscreen.htm rename to lib/web/tiny_mce/plugins/fullscreen/fullscreen.htm diff --git a/pub/lib/tiny_mce/plugins/iespell/editor_plugin.js b/lib/web/tiny_mce/plugins/iespell/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/iespell/editor_plugin.js rename to lib/web/tiny_mce/plugins/iespell/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/iespell/editor_plugin_src.js b/lib/web/tiny_mce/plugins/iespell/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/iespell/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/iespell/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/editor_plugin.js b/lib/web/tiny_mce/plugins/inlinepopups/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/editor_plugin.js rename to lib/web/tiny_mce/plugins/inlinepopups/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/lib/web/tiny_mce/plugins/inlinepopups/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/inlinepopups/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css rename to lib/web/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css diff --git a/pub/lib/tiny_mce/plugins/inlinepopups/template.htm b/lib/web/tiny_mce/plugins/inlinepopups/template.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/inlinepopups/template.htm rename to lib/web/tiny_mce/plugins/inlinepopups/template.htm diff --git a/pub/lib/tiny_mce/plugins/insertdatetime/editor_plugin.js b/lib/web/tiny_mce/plugins/insertdatetime/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/insertdatetime/editor_plugin.js rename to lib/web/tiny_mce/plugins/insertdatetime/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/insertdatetime/editor_plugin_src.js b/lib/web/tiny_mce/plugins/insertdatetime/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/insertdatetime/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/insertdatetime/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/layer/editor_plugin.js b/lib/web/tiny_mce/plugins/layer/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/layer/editor_plugin.js rename to lib/web/tiny_mce/plugins/layer/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/layer/editor_plugin_src.js b/lib/web/tiny_mce/plugins/layer/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/layer/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/layer/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/legacyoutput/editor_plugin.js b/lib/web/tiny_mce/plugins/legacyoutput/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/legacyoutput/editor_plugin.js rename to lib/web/tiny_mce/plugins/legacyoutput/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/legacyoutput/editor_plugin_src.js b/lib/web/tiny_mce/plugins/legacyoutput/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/legacyoutput/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/legacyoutput/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/lists/editor_plugin.js b/lib/web/tiny_mce/plugins/lists/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/lists/editor_plugin.js rename to lib/web/tiny_mce/plugins/lists/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/lists/editor_plugin_src.js b/lib/web/tiny_mce/plugins/lists/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/lists/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/lists/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/media/css/media.css b/lib/web/tiny_mce/plugins/media/css/media.css similarity index 100% rename from pub/lib/tiny_mce/plugins/media/css/media.css rename to lib/web/tiny_mce/plugins/media/css/media.css diff --git a/pub/lib/tiny_mce/plugins/media/editor_plugin.js b/lib/web/tiny_mce/plugins/media/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/media/editor_plugin.js rename to lib/web/tiny_mce/plugins/media/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/media/editor_plugin_src.js b/lib/web/tiny_mce/plugins/media/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/media/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/media/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/media/img/flash.gif b/lib/web/tiny_mce/plugins/media/img/flash.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/media/img/flash.gif rename to lib/web/tiny_mce/plugins/media/img/flash.gif diff --git a/pub/lib/tiny_mce/plugins/media/img/flv_player.swf b/lib/web/tiny_mce/plugins/media/img/flv_player.swf similarity index 100% rename from pub/lib/tiny_mce/plugins/media/img/flv_player.swf rename to lib/web/tiny_mce/plugins/media/img/flv_player.swf diff --git a/pub/lib/tiny_mce/plugins/media/img/quicktime.gif b/lib/web/tiny_mce/plugins/media/img/quicktime.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/media/img/quicktime.gif rename to lib/web/tiny_mce/plugins/media/img/quicktime.gif diff --git a/pub/lib/tiny_mce/plugins/media/img/realmedia.gif b/lib/web/tiny_mce/plugins/media/img/realmedia.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/media/img/realmedia.gif rename to lib/web/tiny_mce/plugins/media/img/realmedia.gif diff --git a/pub/lib/tiny_mce/plugins/media/img/shockwave.gif b/lib/web/tiny_mce/plugins/media/img/shockwave.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/media/img/shockwave.gif rename to lib/web/tiny_mce/plugins/media/img/shockwave.gif diff --git a/pub/lib/tiny_mce/plugins/media/img/trans.gif b/lib/web/tiny_mce/plugins/media/img/trans.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/media/img/trans.gif rename to lib/web/tiny_mce/plugins/media/img/trans.gif diff --git a/pub/lib/tiny_mce/plugins/media/img/windowsmedia.gif b/lib/web/tiny_mce/plugins/media/img/windowsmedia.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/media/img/windowsmedia.gif rename to lib/web/tiny_mce/plugins/media/img/windowsmedia.gif diff --git a/pub/lib/tiny_mce/plugins/media/js/embed.js b/lib/web/tiny_mce/plugins/media/js/embed.js similarity index 100% rename from pub/lib/tiny_mce/plugins/media/js/embed.js rename to lib/web/tiny_mce/plugins/media/js/embed.js diff --git a/pub/lib/tiny_mce/plugins/media/js/media.js b/lib/web/tiny_mce/plugins/media/js/media.js similarity index 100% rename from pub/lib/tiny_mce/plugins/media/js/media.js rename to lib/web/tiny_mce/plugins/media/js/media.js diff --git a/pub/lib/tiny_mce/plugins/media/langs/en_dlg.js b/lib/web/tiny_mce/plugins/media/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/media/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/media/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/media/media.htm b/lib/web/tiny_mce/plugins/media/media.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/media/media.htm rename to lib/web/tiny_mce/plugins/media/media.htm diff --git a/pub/lib/tiny_mce/plugins/media/moxieplayer.swf b/lib/web/tiny_mce/plugins/media/moxieplayer.swf similarity index 100% rename from pub/lib/tiny_mce/plugins/media/moxieplayer.swf rename to lib/web/tiny_mce/plugins/media/moxieplayer.swf diff --git a/pub/lib/tiny_mce/plugins/nonbreaking/editor_plugin.js b/lib/web/tiny_mce/plugins/nonbreaking/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/nonbreaking/editor_plugin.js rename to lib/web/tiny_mce/plugins/nonbreaking/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/lib/web/tiny_mce/plugins/nonbreaking/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/nonbreaking/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/nonbreaking/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/noneditable/editor_plugin.js b/lib/web/tiny_mce/plugins/noneditable/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/noneditable/editor_plugin.js rename to lib/web/tiny_mce/plugins/noneditable/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/noneditable/editor_plugin_src.js b/lib/web/tiny_mce/plugins/noneditable/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/noneditable/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/noneditable/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/pagebreak/css/content.css b/lib/web/tiny_mce/plugins/pagebreak/css/content.css similarity index 100% rename from pub/lib/tiny_mce/plugins/pagebreak/css/content.css rename to lib/web/tiny_mce/plugins/pagebreak/css/content.css diff --git a/pub/lib/tiny_mce/plugins/pagebreak/editor_plugin.js b/lib/web/tiny_mce/plugins/pagebreak/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/pagebreak/editor_plugin.js rename to lib/web/tiny_mce/plugins/pagebreak/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/lib/web/tiny_mce/plugins/pagebreak/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/pagebreak/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/pagebreak/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/lib/web/tiny_mce/plugins/pagebreak/img/pagebreak.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/pagebreak/img/pagebreak.gif rename to lib/web/tiny_mce/plugins/pagebreak/img/pagebreak.gif diff --git a/pub/lib/tiny_mce/plugins/pagebreak/img/trans.gif b/lib/web/tiny_mce/plugins/pagebreak/img/trans.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/pagebreak/img/trans.gif rename to lib/web/tiny_mce/plugins/pagebreak/img/trans.gif diff --git a/pub/lib/tiny_mce/plugins/paste/editor_plugin.js b/lib/web/tiny_mce/plugins/paste/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/paste/editor_plugin.js rename to lib/web/tiny_mce/plugins/paste/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/paste/editor_plugin_src.js b/lib/web/tiny_mce/plugins/paste/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/paste/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/paste/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/paste/js/pastetext.js b/lib/web/tiny_mce/plugins/paste/js/pastetext.js similarity index 100% rename from pub/lib/tiny_mce/plugins/paste/js/pastetext.js rename to lib/web/tiny_mce/plugins/paste/js/pastetext.js diff --git a/pub/lib/tiny_mce/plugins/paste/js/pasteword.js b/lib/web/tiny_mce/plugins/paste/js/pasteword.js similarity index 100% rename from pub/lib/tiny_mce/plugins/paste/js/pasteword.js rename to lib/web/tiny_mce/plugins/paste/js/pasteword.js diff --git a/pub/lib/tiny_mce/plugins/paste/langs/en_dlg.js b/lib/web/tiny_mce/plugins/paste/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/paste/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/paste/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/paste/pastetext.htm b/lib/web/tiny_mce/plugins/paste/pastetext.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/paste/pastetext.htm rename to lib/web/tiny_mce/plugins/paste/pastetext.htm diff --git a/pub/lib/tiny_mce/plugins/paste/pasteword.htm b/lib/web/tiny_mce/plugins/paste/pasteword.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/paste/pasteword.htm rename to lib/web/tiny_mce/plugins/paste/pasteword.htm diff --git a/pub/lib/tiny_mce/plugins/preview/editor_plugin.js b/lib/web/tiny_mce/plugins/preview/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/preview/editor_plugin.js rename to lib/web/tiny_mce/plugins/preview/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/preview/editor_plugin_src.js b/lib/web/tiny_mce/plugins/preview/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/preview/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/preview/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/preview/example.html b/lib/web/tiny_mce/plugins/preview/example.html similarity index 100% rename from pub/lib/tiny_mce/plugins/preview/example.html rename to lib/web/tiny_mce/plugins/preview/example.html diff --git a/pub/lib/tiny_mce/plugins/preview/jscripts/embed.js b/lib/web/tiny_mce/plugins/preview/jscripts/embed.js similarity index 100% rename from pub/lib/tiny_mce/plugins/preview/jscripts/embed.js rename to lib/web/tiny_mce/plugins/preview/jscripts/embed.js diff --git a/pub/lib/tiny_mce/plugins/preview/preview.html b/lib/web/tiny_mce/plugins/preview/preview.html similarity index 100% rename from pub/lib/tiny_mce/plugins/preview/preview.html rename to lib/web/tiny_mce/plugins/preview/preview.html diff --git a/pub/lib/tiny_mce/plugins/print/editor_plugin.js b/lib/web/tiny_mce/plugins/print/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/print/editor_plugin.js rename to lib/web/tiny_mce/plugins/print/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/print/editor_plugin_src.js b/lib/web/tiny_mce/plugins/print/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/print/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/print/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/save/editor_plugin.js b/lib/web/tiny_mce/plugins/save/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/save/editor_plugin.js rename to lib/web/tiny_mce/plugins/save/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/save/editor_plugin_src.js b/lib/web/tiny_mce/plugins/save/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/save/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/save/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/searchreplace/css/searchreplace.css b/lib/web/tiny_mce/plugins/searchreplace/css/searchreplace.css similarity index 100% rename from pub/lib/tiny_mce/plugins/searchreplace/css/searchreplace.css rename to lib/web/tiny_mce/plugins/searchreplace/css/searchreplace.css diff --git a/pub/lib/tiny_mce/plugins/searchreplace/editor_plugin.js b/lib/web/tiny_mce/plugins/searchreplace/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/searchreplace/editor_plugin.js rename to lib/web/tiny_mce/plugins/searchreplace/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/lib/web/tiny_mce/plugins/searchreplace/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/searchreplace/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/searchreplace/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/searchreplace/js/searchreplace.js b/lib/web/tiny_mce/plugins/searchreplace/js/searchreplace.js similarity index 100% rename from pub/lib/tiny_mce/plugins/searchreplace/js/searchreplace.js rename to lib/web/tiny_mce/plugins/searchreplace/js/searchreplace.js diff --git a/pub/lib/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/lib/web/tiny_mce/plugins/searchreplace/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/searchreplace/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/searchreplace/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/searchreplace/searchreplace.htm b/lib/web/tiny_mce/plugins/searchreplace/searchreplace.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/searchreplace/searchreplace.htm rename to lib/web/tiny_mce/plugins/searchreplace/searchreplace.htm diff --git a/pub/lib/tiny_mce/plugins/spellchecker/css/content.css b/lib/web/tiny_mce/plugins/spellchecker/css/content.css similarity index 100% rename from pub/lib/tiny_mce/plugins/spellchecker/css/content.css rename to lib/web/tiny_mce/plugins/spellchecker/css/content.css diff --git a/pub/lib/tiny_mce/plugins/spellchecker/editor_plugin.js b/lib/web/tiny_mce/plugins/spellchecker/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/spellchecker/editor_plugin.js rename to lib/web/tiny_mce/plugins/spellchecker/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/lib/web/tiny_mce/plugins/spellchecker/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/spellchecker/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/spellchecker/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/spellchecker/img/wline.gif b/lib/web/tiny_mce/plugins/spellchecker/img/wline.gif similarity index 100% rename from pub/lib/tiny_mce/plugins/spellchecker/img/wline.gif rename to lib/web/tiny_mce/plugins/spellchecker/img/wline.gif diff --git a/pub/lib/tiny_mce/plugins/style/css/props.css b/lib/web/tiny_mce/plugins/style/css/props.css similarity index 100% rename from pub/lib/tiny_mce/plugins/style/css/props.css rename to lib/web/tiny_mce/plugins/style/css/props.css diff --git a/pub/lib/tiny_mce/plugins/style/editor_plugin.js b/lib/web/tiny_mce/plugins/style/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/style/editor_plugin.js rename to lib/web/tiny_mce/plugins/style/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/style/editor_plugin_src.js b/lib/web/tiny_mce/plugins/style/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/style/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/style/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/style/js/props.js b/lib/web/tiny_mce/plugins/style/js/props.js similarity index 100% rename from pub/lib/tiny_mce/plugins/style/js/props.js rename to lib/web/tiny_mce/plugins/style/js/props.js diff --git a/pub/lib/tiny_mce/plugins/style/langs/en_dlg.js b/lib/web/tiny_mce/plugins/style/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/style/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/style/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/style/props.htm b/lib/web/tiny_mce/plugins/style/props.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/style/props.htm rename to lib/web/tiny_mce/plugins/style/props.htm diff --git a/pub/lib/tiny_mce/plugins/tabfocus/editor_plugin.js b/lib/web/tiny_mce/plugins/tabfocus/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/tabfocus/editor_plugin.js rename to lib/web/tiny_mce/plugins/tabfocus/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/lib/web/tiny_mce/plugins/tabfocus/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/tabfocus/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/tabfocus/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/table/cell.htm b/lib/web/tiny_mce/plugins/table/cell.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/table/cell.htm rename to lib/web/tiny_mce/plugins/table/cell.htm diff --git a/pub/lib/tiny_mce/plugins/table/css/cell.css b/lib/web/tiny_mce/plugins/table/css/cell.css similarity index 100% rename from pub/lib/tiny_mce/plugins/table/css/cell.css rename to lib/web/tiny_mce/plugins/table/css/cell.css diff --git a/pub/lib/tiny_mce/plugins/table/css/row.css b/lib/web/tiny_mce/plugins/table/css/row.css similarity index 100% rename from pub/lib/tiny_mce/plugins/table/css/row.css rename to lib/web/tiny_mce/plugins/table/css/row.css diff --git a/pub/lib/tiny_mce/plugins/table/css/table.css b/lib/web/tiny_mce/plugins/table/css/table.css similarity index 100% rename from pub/lib/tiny_mce/plugins/table/css/table.css rename to lib/web/tiny_mce/plugins/table/css/table.css diff --git a/pub/lib/tiny_mce/plugins/table/editor_plugin.js b/lib/web/tiny_mce/plugins/table/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/table/editor_plugin.js rename to lib/web/tiny_mce/plugins/table/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/table/editor_plugin_src.js b/lib/web/tiny_mce/plugins/table/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/table/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/table/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/table/js/cell.js b/lib/web/tiny_mce/plugins/table/js/cell.js similarity index 100% rename from pub/lib/tiny_mce/plugins/table/js/cell.js rename to lib/web/tiny_mce/plugins/table/js/cell.js diff --git a/pub/lib/tiny_mce/plugins/table/js/merge_cells.js b/lib/web/tiny_mce/plugins/table/js/merge_cells.js similarity index 100% rename from pub/lib/tiny_mce/plugins/table/js/merge_cells.js rename to lib/web/tiny_mce/plugins/table/js/merge_cells.js diff --git a/pub/lib/tiny_mce/plugins/table/js/row.js b/lib/web/tiny_mce/plugins/table/js/row.js similarity index 100% rename from pub/lib/tiny_mce/plugins/table/js/row.js rename to lib/web/tiny_mce/plugins/table/js/row.js diff --git a/pub/lib/tiny_mce/plugins/table/js/table.js b/lib/web/tiny_mce/plugins/table/js/table.js similarity index 100% rename from pub/lib/tiny_mce/plugins/table/js/table.js rename to lib/web/tiny_mce/plugins/table/js/table.js diff --git a/pub/lib/tiny_mce/plugins/table/langs/en_dlg.js b/lib/web/tiny_mce/plugins/table/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/table/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/table/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/table/merge_cells.htm b/lib/web/tiny_mce/plugins/table/merge_cells.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/table/merge_cells.htm rename to lib/web/tiny_mce/plugins/table/merge_cells.htm diff --git a/pub/lib/tiny_mce/plugins/table/row.htm b/lib/web/tiny_mce/plugins/table/row.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/table/row.htm rename to lib/web/tiny_mce/plugins/table/row.htm diff --git a/pub/lib/tiny_mce/plugins/table/table.htm b/lib/web/tiny_mce/plugins/table/table.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/table/table.htm rename to lib/web/tiny_mce/plugins/table/table.htm diff --git a/pub/lib/tiny_mce/plugins/template/blank.htm b/lib/web/tiny_mce/plugins/template/blank.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/template/blank.htm rename to lib/web/tiny_mce/plugins/template/blank.htm diff --git a/pub/lib/tiny_mce/plugins/template/css/template.css b/lib/web/tiny_mce/plugins/template/css/template.css similarity index 100% rename from pub/lib/tiny_mce/plugins/template/css/template.css rename to lib/web/tiny_mce/plugins/template/css/template.css diff --git a/pub/lib/tiny_mce/plugins/template/editor_plugin.js b/lib/web/tiny_mce/plugins/template/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/template/editor_plugin.js rename to lib/web/tiny_mce/plugins/template/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/template/editor_plugin_src.js b/lib/web/tiny_mce/plugins/template/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/template/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/template/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/template/js/template.js b/lib/web/tiny_mce/plugins/template/js/template.js similarity index 100% rename from pub/lib/tiny_mce/plugins/template/js/template.js rename to lib/web/tiny_mce/plugins/template/js/template.js diff --git a/pub/lib/tiny_mce/plugins/template/langs/en_dlg.js b/lib/web/tiny_mce/plugins/template/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/template/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/template/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/plugins/template/template.htm b/lib/web/tiny_mce/plugins/template/template.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/template/template.htm rename to lib/web/tiny_mce/plugins/template/template.htm diff --git a/pub/lib/tiny_mce/plugins/visualchars/editor_plugin.js b/lib/web/tiny_mce/plugins/visualchars/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/visualchars/editor_plugin.js rename to lib/web/tiny_mce/plugins/visualchars/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/visualchars/editor_plugin_src.js b/lib/web/tiny_mce/plugins/visualchars/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/visualchars/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/visualchars/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/wordcount/editor_plugin.js b/lib/web/tiny_mce/plugins/wordcount/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/wordcount/editor_plugin.js rename to lib/web/tiny_mce/plugins/wordcount/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/wordcount/editor_plugin_src.js b/lib/web/tiny_mce/plugins/wordcount/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/wordcount/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/wordcount/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/abbr.htm b/lib/web/tiny_mce/plugins/xhtmlxtras/abbr.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/abbr.htm rename to lib/web/tiny_mce/plugins/xhtmlxtras/abbr.htm diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/acronym.htm b/lib/web/tiny_mce/plugins/xhtmlxtras/acronym.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/acronym.htm rename to lib/web/tiny_mce/plugins/xhtmlxtras/acronym.htm diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/attributes.htm b/lib/web/tiny_mce/plugins/xhtmlxtras/attributes.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/attributes.htm rename to lib/web/tiny_mce/plugins/xhtmlxtras/attributes.htm diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/cite.htm b/lib/web/tiny_mce/plugins/xhtmlxtras/cite.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/cite.htm rename to lib/web/tiny_mce/plugins/xhtmlxtras/cite.htm diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/lib/web/tiny_mce/plugins/xhtmlxtras/css/attributes.css similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/css/attributes.css rename to lib/web/tiny_mce/plugins/xhtmlxtras/css/attributes.css diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/css/popup.css b/lib/web/tiny_mce/plugins/xhtmlxtras/css/popup.css similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/css/popup.css rename to lib/web/tiny_mce/plugins/xhtmlxtras/css/popup.css diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/del.htm b/lib/web/tiny_mce/plugins/xhtmlxtras/del.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/del.htm rename to lib/web/tiny_mce/plugins/xhtmlxtras/del.htm diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/lib/web/tiny_mce/plugins/xhtmlxtras/editor_plugin.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/editor_plugin.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/editor_plugin.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/lib/web/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/ins.htm b/lib/web/tiny_mce/plugins/xhtmlxtras/ins.htm similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/ins.htm rename to lib/web/tiny_mce/plugins/xhtmlxtras/ins.htm diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/lib/web/tiny_mce/plugins/xhtmlxtras/js/abbr.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/js/abbr.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/js/abbr.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/lib/web/tiny_mce/plugins/xhtmlxtras/js/acronym.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/js/acronym.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/js/acronym.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/lib/web/tiny_mce/plugins/xhtmlxtras/js/attributes.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/js/attributes.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/js/attributes.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/js/cite.js b/lib/web/tiny_mce/plugins/xhtmlxtras/js/cite.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/js/cite.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/js/cite.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/js/del.js b/lib/web/tiny_mce/plugins/xhtmlxtras/js/del.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/js/del.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/js/del.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/js/element_common.js b/lib/web/tiny_mce/plugins/xhtmlxtras/js/element_common.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/js/element_common.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/js/element_common.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/js/ins.js b/lib/web/tiny_mce/plugins/xhtmlxtras/js/ins.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/js/ins.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/js/ins.js diff --git a/pub/lib/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js b/lib/web/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js rename to lib/web/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/themes/advanced/about.htm b/lib/web/tiny_mce/themes/advanced/about.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/about.htm rename to lib/web/tiny_mce/themes/advanced/about.htm diff --git a/pub/lib/tiny_mce/themes/advanced/anchor.htm b/lib/web/tiny_mce/themes/advanced/anchor.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/anchor.htm rename to lib/web/tiny_mce/themes/advanced/anchor.htm diff --git a/pub/lib/tiny_mce/themes/advanced/charmap.htm b/lib/web/tiny_mce/themes/advanced/charmap.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/charmap.htm rename to lib/web/tiny_mce/themes/advanced/charmap.htm diff --git a/pub/lib/tiny_mce/themes/advanced/color_picker.htm b/lib/web/tiny_mce/themes/advanced/color_picker.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/color_picker.htm rename to lib/web/tiny_mce/themes/advanced/color_picker.htm diff --git a/pub/lib/tiny_mce/themes/advanced/editor_template.js b/lib/web/tiny_mce/themes/advanced/editor_template.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/editor_template.js rename to lib/web/tiny_mce/themes/advanced/editor_template.js diff --git a/pub/lib/tiny_mce/themes/advanced/editor_template_src.js b/lib/web/tiny_mce/themes/advanced/editor_template_src.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/editor_template_src.js rename to lib/web/tiny_mce/themes/advanced/editor_template_src.js diff --git a/pub/lib/tiny_mce/themes/advanced/image.htm b/lib/web/tiny_mce/themes/advanced/image.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/image.htm rename to lib/web/tiny_mce/themes/advanced/image.htm diff --git a/pub/lib/tiny_mce/themes/advanced/img/colorpicker.jpg b/lib/web/tiny_mce/themes/advanced/img/colorpicker.jpg similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/colorpicker.jpg rename to lib/web/tiny_mce/themes/advanced/img/colorpicker.jpg diff --git a/pub/lib/tiny_mce/themes/advanced/img/flash.gif b/lib/web/tiny_mce/themes/advanced/img/flash.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/flash.gif rename to lib/web/tiny_mce/themes/advanced/img/flash.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/icons.gif b/lib/web/tiny_mce/themes/advanced/img/icons.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/icons.gif rename to lib/web/tiny_mce/themes/advanced/img/icons.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/iframe.gif b/lib/web/tiny_mce/themes/advanced/img/iframe.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/iframe.gif rename to lib/web/tiny_mce/themes/advanced/img/iframe.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/pagebreak.gif b/lib/web/tiny_mce/themes/advanced/img/pagebreak.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/pagebreak.gif rename to lib/web/tiny_mce/themes/advanced/img/pagebreak.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/quicktime.gif b/lib/web/tiny_mce/themes/advanced/img/quicktime.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/quicktime.gif rename to lib/web/tiny_mce/themes/advanced/img/quicktime.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/realmedia.gif b/lib/web/tiny_mce/themes/advanced/img/realmedia.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/realmedia.gif rename to lib/web/tiny_mce/themes/advanced/img/realmedia.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/shockwave.gif b/lib/web/tiny_mce/themes/advanced/img/shockwave.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/shockwave.gif rename to lib/web/tiny_mce/themes/advanced/img/shockwave.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/trans.gif b/lib/web/tiny_mce/themes/advanced/img/trans.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/trans.gif rename to lib/web/tiny_mce/themes/advanced/img/trans.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/video.gif b/lib/web/tiny_mce/themes/advanced/img/video.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/video.gif rename to lib/web/tiny_mce/themes/advanced/img/video.gif diff --git a/pub/lib/tiny_mce/themes/advanced/img/windowsmedia.gif b/lib/web/tiny_mce/themes/advanced/img/windowsmedia.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/img/windowsmedia.gif rename to lib/web/tiny_mce/themes/advanced/img/windowsmedia.gif diff --git a/pub/lib/tiny_mce/themes/advanced/js/about.js b/lib/web/tiny_mce/themes/advanced/js/about.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/js/about.js rename to lib/web/tiny_mce/themes/advanced/js/about.js diff --git a/pub/lib/tiny_mce/themes/advanced/js/anchor.js b/lib/web/tiny_mce/themes/advanced/js/anchor.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/js/anchor.js rename to lib/web/tiny_mce/themes/advanced/js/anchor.js diff --git a/pub/lib/tiny_mce/themes/advanced/js/charmap.js b/lib/web/tiny_mce/themes/advanced/js/charmap.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/js/charmap.js rename to lib/web/tiny_mce/themes/advanced/js/charmap.js diff --git a/pub/lib/tiny_mce/themes/advanced/js/color_picker.js b/lib/web/tiny_mce/themes/advanced/js/color_picker.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/js/color_picker.js rename to lib/web/tiny_mce/themes/advanced/js/color_picker.js diff --git a/pub/lib/tiny_mce/themes/advanced/js/image.js b/lib/web/tiny_mce/themes/advanced/js/image.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/js/image.js rename to lib/web/tiny_mce/themes/advanced/js/image.js diff --git a/pub/lib/tiny_mce/themes/advanced/js/link.js b/lib/web/tiny_mce/themes/advanced/js/link.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/js/link.js rename to lib/web/tiny_mce/themes/advanced/js/link.js diff --git a/pub/lib/tiny_mce/themes/advanced/js/source_editor.js b/lib/web/tiny_mce/themes/advanced/js/source_editor.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/js/source_editor.js rename to lib/web/tiny_mce/themes/advanced/js/source_editor.js diff --git a/pub/lib/tiny_mce/themes/advanced/langs/en.js b/lib/web/tiny_mce/themes/advanced/langs/en.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/langs/en.js rename to lib/web/tiny_mce/themes/advanced/langs/en.js diff --git a/pub/lib/tiny_mce/themes/advanced/langs/en_dlg.js b/lib/web/tiny_mce/themes/advanced/langs/en_dlg.js similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/langs/en_dlg.js rename to lib/web/tiny_mce/themes/advanced/langs/en_dlg.js diff --git a/pub/lib/tiny_mce/themes/advanced/link.htm b/lib/web/tiny_mce/themes/advanced/link.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/link.htm rename to lib/web/tiny_mce/themes/advanced/link.htm diff --git a/pub/lib/tiny_mce/themes/advanced/shortcuts.htm b/lib/web/tiny_mce/themes/advanced/shortcuts.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/shortcuts.htm rename to lib/web/tiny_mce/themes/advanced/shortcuts.htm diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/content.css b/lib/web/tiny_mce/themes/advanced/skins/default/content.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/content.css rename to lib/web/tiny_mce/themes/advanced/skins/default/content.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/dialog.css b/lib/web/tiny_mce/themes/advanced/skins/default/dialog.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/dialog.css rename to lib/web/tiny_mce/themes/advanced/skins/default/dialog.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/img/buttons.png b/lib/web/tiny_mce/themes/advanced/skins/default/img/buttons.png similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/img/buttons.png rename to lib/web/tiny_mce/themes/advanced/skins/default/img/buttons.png diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/img/items.gif b/lib/web/tiny_mce/themes/advanced/skins/default/img/items.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/img/items.gif rename to lib/web/tiny_mce/themes/advanced/skins/default/img/items.gif diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif b/lib/web/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif rename to lib/web/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/img/menu_check.gif b/lib/web/tiny_mce/themes/advanced/skins/default/img/menu_check.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/img/menu_check.gif rename to lib/web/tiny_mce/themes/advanced/skins/default/img/menu_check.gif diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/img/progress.gif b/lib/web/tiny_mce/themes/advanced/skins/default/img/progress.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/img/progress.gif rename to lib/web/tiny_mce/themes/advanced/skins/default/img/progress.gif diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/img/tabs.gif b/lib/web/tiny_mce/themes/advanced/skins/default/img/tabs.gif similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/img/tabs.gif rename to lib/web/tiny_mce/themes/advanced/skins/default/img/tabs.gif diff --git a/pub/lib/tiny_mce/themes/advanced/skins/default/ui.css b/lib/web/tiny_mce/themes/advanced/skins/default/ui.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/default/ui.css rename to lib/web/tiny_mce/themes/advanced/skins/default/ui.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/highcontrast/content.css b/lib/web/tiny_mce/themes/advanced/skins/highcontrast/content.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/highcontrast/content.css rename to lib/web/tiny_mce/themes/advanced/skins/highcontrast/content.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/highcontrast/dialog.css b/lib/web/tiny_mce/themes/advanced/skins/highcontrast/dialog.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/highcontrast/dialog.css rename to lib/web/tiny_mce/themes/advanced/skins/highcontrast/dialog.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/highcontrast/ui.css b/lib/web/tiny_mce/themes/advanced/skins/highcontrast/ui.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/highcontrast/ui.css rename to lib/web/tiny_mce/themes/advanced/skins/highcontrast/ui.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/content.css b/lib/web/tiny_mce/themes/advanced/skins/o2k7/content.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/content.css rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/content.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/lib/web/tiny_mce/themes/advanced/skins/o2k7/dialog.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/dialog.css rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/dialog.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png b/lib/web/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/lib/web/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/lib/web/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/ui.css b/lib/web/tiny_mce/themes/advanced/skins/o2k7/ui.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/ui.css rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/ui.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/lib/web/tiny_mce/themes/advanced/skins/o2k7/ui_black.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/ui_black.css rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/ui_black.css diff --git a/pub/lib/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/lib/web/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css rename to lib/web/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css diff --git a/pub/lib/tiny_mce/themes/advanced/source_editor.htm b/lib/web/tiny_mce/themes/advanced/source_editor.htm similarity index 100% rename from pub/lib/tiny_mce/themes/advanced/source_editor.htm rename to lib/web/tiny_mce/themes/advanced/source_editor.htm diff --git a/pub/lib/tiny_mce/themes/simple/editor_template.js b/lib/web/tiny_mce/themes/simple/editor_template.js similarity index 100% rename from pub/lib/tiny_mce/themes/simple/editor_template.js rename to lib/web/tiny_mce/themes/simple/editor_template.js diff --git a/pub/lib/tiny_mce/themes/simple/editor_template_src.js b/lib/web/tiny_mce/themes/simple/editor_template_src.js similarity index 100% rename from pub/lib/tiny_mce/themes/simple/editor_template_src.js rename to lib/web/tiny_mce/themes/simple/editor_template_src.js diff --git a/pub/lib/tiny_mce/themes/simple/img/icons.gif b/lib/web/tiny_mce/themes/simple/img/icons.gif similarity index 100% rename from pub/lib/tiny_mce/themes/simple/img/icons.gif rename to lib/web/tiny_mce/themes/simple/img/icons.gif diff --git a/pub/lib/tiny_mce/themes/simple/langs/en.js b/lib/web/tiny_mce/themes/simple/langs/en.js similarity index 100% rename from pub/lib/tiny_mce/themes/simple/langs/en.js rename to lib/web/tiny_mce/themes/simple/langs/en.js diff --git a/pub/lib/tiny_mce/themes/simple/skins/default/content.css b/lib/web/tiny_mce/themes/simple/skins/default/content.css similarity index 100% rename from pub/lib/tiny_mce/themes/simple/skins/default/content.css rename to lib/web/tiny_mce/themes/simple/skins/default/content.css diff --git a/pub/lib/tiny_mce/themes/simple/skins/default/ui.css b/lib/web/tiny_mce/themes/simple/skins/default/ui.css similarity index 100% rename from pub/lib/tiny_mce/themes/simple/skins/default/ui.css rename to lib/web/tiny_mce/themes/simple/skins/default/ui.css diff --git a/pub/lib/tiny_mce/themes/simple/skins/o2k7/content.css b/lib/web/tiny_mce/themes/simple/skins/o2k7/content.css similarity index 100% rename from pub/lib/tiny_mce/themes/simple/skins/o2k7/content.css rename to lib/web/tiny_mce/themes/simple/skins/o2k7/content.css diff --git a/pub/lib/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png b/lib/web/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png similarity index 100% rename from pub/lib/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png rename to lib/web/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png diff --git a/pub/lib/tiny_mce/themes/simple/skins/o2k7/ui.css b/lib/web/tiny_mce/themes/simple/skins/o2k7/ui.css similarity index 100% rename from pub/lib/tiny_mce/themes/simple/skins/o2k7/ui.css rename to lib/web/tiny_mce/themes/simple/skins/o2k7/ui.css diff --git a/pub/lib/tiny_mce/tiny_mce.js b/lib/web/tiny_mce/tiny_mce.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce.js rename to lib/web/tiny_mce/tiny_mce.js diff --git a/pub/lib/tiny_mce/tiny_mce_dev.js b/lib/web/tiny_mce/tiny_mce_dev.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce_dev.js rename to lib/web/tiny_mce/tiny_mce_dev.js diff --git a/pub/lib/tiny_mce/tiny_mce_jquery.js b/lib/web/tiny_mce/tiny_mce_jquery.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce_jquery.js rename to lib/web/tiny_mce/tiny_mce_jquery.js diff --git a/pub/lib/tiny_mce/tiny_mce_jquery_src.js b/lib/web/tiny_mce/tiny_mce_jquery_src.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce_jquery_src.js rename to lib/web/tiny_mce/tiny_mce_jquery_src.js diff --git a/pub/lib/tiny_mce/tiny_mce_popup.js b/lib/web/tiny_mce/tiny_mce_popup.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce_popup.js rename to lib/web/tiny_mce/tiny_mce_popup.js diff --git a/pub/lib/tiny_mce/tiny_mce_prototype.js b/lib/web/tiny_mce/tiny_mce_prototype.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce_prototype.js rename to lib/web/tiny_mce/tiny_mce_prototype.js diff --git a/pub/lib/tiny_mce/tiny_mce_prototype_src.js b/lib/web/tiny_mce/tiny_mce_prototype_src.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce_prototype_src.js rename to lib/web/tiny_mce/tiny_mce_prototype_src.js diff --git a/pub/lib/tiny_mce/tiny_mce_src.js b/lib/web/tiny_mce/tiny_mce_src.js similarity index 100% rename from pub/lib/tiny_mce/tiny_mce_src.js rename to lib/web/tiny_mce/tiny_mce_src.js diff --git a/pub/lib/tiny_mce/utils/editable_selects.js b/lib/web/tiny_mce/utils/editable_selects.js similarity index 100% rename from pub/lib/tiny_mce/utils/editable_selects.js rename to lib/web/tiny_mce/utils/editable_selects.js diff --git a/pub/lib/tiny_mce/utils/form_utils.js b/lib/web/tiny_mce/utils/form_utils.js similarity index 100% rename from pub/lib/tiny_mce/utils/form_utils.js rename to lib/web/tiny_mce/utils/form_utils.js diff --git a/pub/lib/tiny_mce/utils/mctabs.js b/lib/web/tiny_mce/utils/mctabs.js similarity index 100% rename from pub/lib/tiny_mce/utils/mctabs.js rename to lib/web/tiny_mce/utils/mctabs.js diff --git a/pub/lib/tiny_mce/utils/validate.js b/lib/web/tiny_mce/utils/validate.js similarity index 100% rename from pub/lib/tiny_mce/utils/validate.js rename to lib/web/tiny_mce/utils/validate.js diff --git a/pub/lib/underscore.js b/lib/web/underscore.js similarity index 100% rename from pub/lib/underscore.js rename to lib/web/underscore.js diff --git a/pub/lib/varien/form.js b/lib/web/varien/form.js similarity index 100% rename from pub/lib/varien/form.js rename to lib/web/varien/form.js diff --git a/pub/lib/varien/js.js b/lib/web/varien/js.js similarity index 100% rename from pub/lib/varien/js.js rename to lib/web/varien/js.js diff --git a/pub/get.php b/pub/get.php index e87ff2ebf6fe8913ae6977a823cacbb4487523c0..83c079d35d0a6f9cc9511c793de7bd4095182e5c 100644 --- a/pub/get.php +++ b/pub/get.php @@ -69,7 +69,10 @@ if ($mediaDirectory) { } if (is_readable($request->getFilePath())) { - $transfer = new \Magento\Framework\File\Transfer\Adapter\Http(); + $transfer = new \Magento\Framework\File\Transfer\Adapter\Http( + new \Magento\Framework\Controller\Response\Http, + new \Magento\Framework\File\Mime + ); $transfer->send($request->getFilePath()); exit; } diff --git a/pub/lib/.htaccess b/pub/lib/.htaccess deleted file mode 100644 index 0932cbcce433120f132364bfd6a0a5078ff625d0..0000000000000000000000000000000000000000 --- a/pub/lib/.htaccess +++ /dev/null @@ -1,6 +0,0 @@ -############################################ -## always send 404 on missing files - -<IfModule mod_rewrite.c> - RewriteEngine off -</IfModule> diff --git a/dev/tools/Magento/Tools/View/config/forbidden.php b/pub/static.php similarity index 79% rename from dev/tools/Magento/Tools/View/config/forbidden.php rename to pub/static.php index 0872b2b0f1886e2cfdd337d72823fd05e57a0e33..174eee22ac120aedea700f579698d07a3a93cc23 100644 --- a/dev/tools/Magento/Tools/View/config/forbidden.php +++ b/pub/static.php @@ -1,5 +1,7 @@ <?php /** + * Entry point for static resources (JS, CSS, etc.) + * * Magento * * NOTICE OF LICENSE @@ -21,8 +23,7 @@ * @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 __DIR__ . '/../app/bootstrap.php'; -/** - * These are extensions of files that are forbidden to be deployed to a public directory - */ -return array('', 'htaccess', 'php', 'phtml', 'xml', 'csv', 'md'); +$entryPoint = new \Magento\Framework\App\EntryPoint\EntryPoint(BP, $_SERVER); +$entryPoint->run('Magento\Framework\App\StaticResource'); diff --git a/pub/static/.htaccess b/pub/static/.htaccess index d48494fcfed02bc0caafe63a80b3c784492f8177..777c0a1dca22f843eb4aa4dfb53c2e4f7054058d 100644 --- a/pub/static/.htaccess +++ b/pub/static/.htaccess @@ -1,7 +1,14 @@ -Options None -<IfModule mod_php5.c> -php_flag engine 0 -</IfModule> -<IfModule mod_rewrite.c> - RewriteEngine Off -</IfModule> +<IfModule mod_php5.c> +php_flag engine 0 +</IfModule> +<IfModule mod_rewrite.c> + RewriteEngine On + + # Remove signature of the static files that is used to overcome the browser cache + RewriteRule ^version.+?/(.+)$ $1 [L] + + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-l + + RewriteRule .* ../static.php?resource=$0 [L] +</IfModule>