Skip to content

Commit e3796ac

Browse files
authored
Merge pull request #516 from magento-performance/ACPT-1224
ACPT-1224: Fix SVC and Magento Health Index for application-server PR
2 parents 6a3b613 + 7669121 commit e3796ac

File tree

4 files changed

+22
-37
lines changed

4 files changed

+22
-37
lines changed

app/code/Magento/Catalog/Model/Product/Option/Type/File/RequestAwareValidatorFile.php

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77

88
namespace Magento\Catalog\Model\Product\Option\Type\File;
99

10+
use Magento\Framework\App\Config\ScopeConfigInterface;
1011
use Magento\Framework\App\ObjectManager;
1112
use Magento\Framework\App\Request\Http as Request;
13+
use Magento\Framework\Exception\FileSystemException;
14+
use Magento\Framework\File\Size;
15+
use Magento\Framework\Filesystem;
16+
use Magento\Framework\HTTP\Adapter\FileTransferFactory;
1217
use Magento\Framework\Math\Random;
18+
use Magento\Framework\Validator\File\IsImage;
1319

1420
/**
1521
* Request Aware Validator to replace use of $_SERVER super global.
@@ -24,21 +30,21 @@ class RequestAwareValidatorFile extends ValidatorFile
2430
/**
2531
* Constructor method
2632
*
27-
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
28-
* @param \Magento\Framework\Filesystem $filesystem
29-
* @param \Magento\Framework\File\Size $fileSize
30-
* @param \Magento\Framework\HTTP\Adapter\FileTransferFactory $httpFactory
31-
* @param \Magento\Framework\Validator\File\IsImage $isImageValidator
33+
* @param ScopeConfigInterface $scopeConfig
34+
* @param Filesystem $filesystem
35+
* @param Size $fileSize
36+
* @param FileTransferFactory $httpFactory
37+
* @param IsImage $isImageValidator
3238
* @param Random|null $random
3339
* @param Request|null $request
34-
* @throws \Magento\Framework\Exception\FileSystemException
40+
* @throws FileSystemException
3541
*/
3642
public function __construct(
37-
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
38-
\Magento\Framework\Filesystem $filesystem,
39-
\Magento\Framework\File\Size $fileSize,
40-
\Magento\Framework\HTTP\Adapter\FileTransferFactory $httpFactory,
41-
\Magento\Framework\Validator\File\IsImage $isImageValidator,
43+
ScopeConfigInterface $scopeConfig,
44+
Filesystem $filesystem,
45+
Size $fileSize,
46+
FileTransferFactory $httpFactory,
47+
IsImage $isImageValidator,
4248
Random $random = null,
4349
Request $request = null
4450
) {

lib/internal/Magento/Framework/ContextInterface.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

lib/internal/Magento/Framework/ObjectManager/ObjectManager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ class ObjectManager implements \Magento\Framework\ObjectManagerInterface
3434
protected $_config;
3535

3636
/**
37+
* phpcs:disable Magento2.Annotation.MethodArguments.VisualAlignment
3738
* @param FactoryInterface $factory
3839
* @param ConfigInterface $config
39-
* @param array $sharedInstances
40+
* @param array &$sharedInstances
4041
*/
41-
public function __construct(FactoryInterface $factory, ConfigInterface $config, array &$sharedInstances = [])
42+
public function __construct(FactoryInterface $factory, ConfigInterface $config, &$sharedInstances = [])
4243
{
4344
$this->_config = $config;
4445
$this->_factory = $factory;

lib/internal/Magento/Framework/Webapi/ErrorProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function __construct(
9797
$this->_filesystem = $filesystem;
9898
$this->directoryWrite = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
9999
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
100+
$this->registerShutdownFunction();
100101
}
101102

102103
/**
@@ -283,7 +284,7 @@ protected function _formatError($errorMessage, $trace, $httpCode, $format)
283284
*
284285
* @return $this
285286
*/
286-
public function __destruct()
287+
public function registerShutdownFunction()
287288
{
288289
register_shutdown_function([$this, self::DEFAULT_SHUTDOWN_FUNCTION]);
289290
return $this;

0 commit comments

Comments
 (0)