diff --git a/.gitignore b/.gitignore
index b92b9edba654c..cb92c19699e3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ atlassian*
!/pub/media/customer/.htaccess
/pub/media/downloadable/*
!/pub/media/downloadable/.htaccess
+/pub/media/favicon/*
/pub/media/import/*
!/pub/media/import/.htaccess
/pub/media/theme/*
diff --git a/app/code/Magento/Contact/Model/Mail.php b/app/code/Magento/Contact/Model/Mail.php
index 809e5f3a54928..9a1f1ff8a2063 100644
--- a/app/code/Magento/Contact/Model/Mail.php
+++ b/app/code/Magento/Contact/Model/Mail.php
@@ -49,6 +49,9 @@ public function __construct(
*/
public function send($replyTo, array $variables)
{
+ /** @see \Magento\Contact\Controller\Index\Post::validatedParams() */
+ $replyToName = !empty($variables['data']['name']) ? $variables['data']['name'] : null;
+
$this->inlineTranslation->suspend();
try {
$transport = $this->transportBuilder
@@ -62,7 +65,7 @@ public function send($replyTo, array $variables)
->setTemplateVars($variables)
->setFrom($this->contactsConfig->emailSender())
->addTo($this->contactsConfig->emailRecipient())
- ->setReplyTo($replyTo)
+ ->setReplyTo($replyTo, $replyToName)
->getTransport();
$transport->sendMessage();
diff --git a/app/code/Magento/Weee/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Weee/view/frontend/layout/checkout_cart_index.xml
index bcb982f4fd82b..606aed676aca7 100644
--- a/app/code/Magento/Weee/view/frontend/layout/checkout_cart_index.xml
+++ b/app/code/Magento/Weee/view/frontend/layout/checkout_cart_index.xml
@@ -17,7 +17,7 @@
-
- Magento_Weee/js/view/cart/totals/weee
-
-
- FPT
+ - FPT
diff --git a/lib/internal/Magento/Framework/App/Bootstrap.php b/lib/internal/Magento/Framework/App/Bootstrap.php
index dcac86d1700e3..f38f6c154a588 100644
--- a/lib/internal/Magento/Framework/App/Bootstrap.php
+++ b/lib/internal/Magento/Framework/App/Bootstrap.php
@@ -204,6 +204,7 @@ public function __construct(ObjectManagerFactory $factory, $rootDir, array $init
$this->factory = $factory;
$this->rootDir = $rootDir;
$this->server = $initParams;
+ $this->objectManager = $this->factory->create($this->server);
}
/**
@@ -227,7 +228,6 @@ public function getParams()
public function createApplication($type, $arguments = [])
{
try {
- $this->initObjectManager();
$application = $this->objectManager->create($type, $arguments);
if (!($application instanceof AppInterface)) {
throw new \InvalidArgumentException("The provided class doesn't implement AppInterface: {$type}");
@@ -250,7 +250,6 @@ public function run(AppInterface $application)
try {
\Magento\Framework\Profiler::start('magento');
$this->initErrorHandler();
- $this->initObjectManager();
$this->assertMaintenance();
$this->assertInstalled();
$response = $application->launch();
@@ -279,7 +278,6 @@ protected function assertMaintenance()
if (null === $isExpected) {
return;
}
- $this->initObjectManager();
/** @var \Magento\Framework\App\MaintenanceMode $maintenance */
$this->maintenance = $this->objectManager->get(\Magento\Framework\App\MaintenanceMode::class);
@@ -312,7 +310,6 @@ protected function assertInstalled()
if (null === $isExpected) {
return;
}
- $this->initObjectManager();
$isInstalled = $this->isInstalled();
if (!$isInstalled && $isExpected) {
$this->errorCode = self::ERR_IS_INSTALLED;
@@ -351,7 +348,6 @@ private function getIsExpected($key, $default)
*/
private function isInstalled()
{
- $this->initObjectManager();
/** @var \Magento\Framework\App\DeploymentConfig $deploymentConfig */
$deploymentConfig = $this->objectManager->get(\Magento\Framework\App\DeploymentConfig::class);
return $deploymentConfig->isAvailable();
@@ -364,7 +360,6 @@ private function isInstalled()
*/
public function getObjectManager()
{
- $this->initObjectManager();
return $this->objectManager;
}
@@ -378,20 +373,7 @@ private function initErrorHandler()
$handler = new ErrorHandler();
set_error_handler([$handler, 'handler']);
}
-
- /**
- * Initializes object manager
- *
- * @return void
- */
- private function initObjectManager()
- {
- if (!$this->objectManager) {
- $this->objectManager = $this->factory->create($this->server);
- $this->maintenance = $this->objectManager->get(\Magento\Framework\App\MaintenanceMode::class);
- }
- }
-
+
/**
* Getter for error code
*
diff --git a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
index 67d15d7882736..a08a309897342 100644
--- a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
+++ b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
@@ -32,7 +32,7 @@ class ObjectManagerFactory
*
* @var string
*/
- protected $_locatorClassName = \Magento\Framework\ObjectManager\ObjectManager::class;
+ protected $_locatorClassName = \Magento\Framework\App\ObjectManager::class;
/**
* Config class name
@@ -169,7 +169,6 @@ public function create(array $arguments)
$objectManager = new $this->_locatorClassName($this->factory, $diConfig, $sharedInstances);
$this->factory->setObjectManager($objectManager);
- ObjectManager::setInstance($objectManager);
$generatorParams = $diConfig->getArguments(\Magento\Framework\Code\Generator::class);
/** Arguments are stored in different format when DI config is compiled, thus require custom processing */
diff --git a/lib/internal/Magento/Framework/Config/View.php b/lib/internal/Magento/Framework/Config/View.php
index d0ad023f0cfd0..a90211cba0f95 100644
--- a/lib/internal/Magento/Framework/Config/View.php
+++ b/lib/internal/Magento/Framework/Config/View.php
@@ -152,7 +152,7 @@ protected function getIdAttributes()
{
$idAttributes = [
'/view/vars' => 'module',
- '/view/vars/var' => 'name',
+ '/view/vars/(var/)*var' => 'name',
'/view/exclude/item' => ['type', 'item'],
];
foreach ($this->xpath as $attribute) {
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php
index e691fde53dbe4..81b51056baee8 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php
@@ -178,8 +178,8 @@
',
[
"Element 'virtualType', attribute 'name': [facet 'pattern'] The value '' is not accepted by the pattern '" .
- "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" .
- ")*'." .
+ "(\\\\?[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)" .
+ "(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)*'." .
"\nLine: 2\n",
"Element 'virtualType', attribute 'name': '' is not a valid value of the atomic type 'phpClassName'." .
"\nLine: 2\n",
@@ -188,32 +188,14 @@
"\nLine: 2\n",
],
],
- 'virtualtype with invalid_name' => [
- '
-
- ',
- [
- "Element 'virtualType', attribute 'name': [facet 'pattern'] The value '\\BackslashPrefix\\IsNotAllowed' " .
- "is not accepted by the pattern '" .
- "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" .
- ")*'." .
- "\nLine: 2\n",
- "Element 'virtualType', attribute 'name': '\\BackslashPrefix\\IsNotAllowed' " .
- "is not a valid value of the atomic type 'phpClassName'." .
- "\nLine: 2\n",
- "Element 'virtualType', attribute 'name': Warning: No precomputed value available, the value was either " .
- "invalid or something strange happend." .
- "\nLine: 2\n",
- ],
- ],
'virtualtype with empty_type' => [
'
',
[
"Element 'virtualType', attribute 'type': [facet 'pattern'] The value '' is not accepted by the pattern '" .
- "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" .
- ")*'." .
+ "(\\\\?[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)" .
+ "(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)*'." .
"\nLine: 2\n",
"Element 'virtualType', attribute 'type': '' is not a valid value of the atomic type 'phpClassName'." .
"\nLine: 2\n",
@@ -226,8 +208,8 @@
[
"Element 'virtualType', attribute 'name': [facet 'pattern'] The value '777Digits\\IsNotAllowed' " .
"is not accepted by the pattern '" .
- "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" .
- ")*'." .
+ "(\\\\?[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)" .
+ "(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)*'." .
"\nLine: 2\n",
"Element 'virtualType', attribute 'name': '777Digits\\IsNotAllowed' " .
"is not a valid value of the atomic type 'phpClassName'." .
@@ -237,4 +219,22 @@
"\nLine: 2\n",
],
],
+ 'virtualtype with digits_and_prefix_slash' => [
+ '
+
+ ',
+ [
+ "Element 'virtualType', attribute 'name': [facet 'pattern'] The value '\\777Digits\\IsNotAllowed' " .
+ "is not accepted by the pattern '" .
+ "(\\\\?[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)" .
+ "(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)*'." .
+ "\nLine: 2\n",
+ "Element 'virtualType', attribute 'name': '\\777Digits\\IsNotAllowed' " .
+ "is not a valid value of the atomic type 'phpClassName'." .
+ "\nLine: 2\n",
+ "Element 'virtualType', attribute 'name': Warning: No precomputed value available, the value was either " .
+ "invalid or something strange happend." .
+ "\nLine: 2\n",
+ ],
+ ],
];
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml
index 4fc7c30326def..a30715122dae8 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml
@@ -64,4 +64,5 @@
+
diff --git a/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd b/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd
index 3cb346e4d9142..c4ab86fc7331d 100644
--- a/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd
+++ b/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd
@@ -36,7 +36,7 @@
-
+