Skip to content

Commit

Permalink
Merge pull request #516 from magento-performance/ACPT-1224
Browse files Browse the repository at this point in the history
ACPT-1224: Fix SVC and Magento Health Index for application-server PR
  • Loading branch information
andimov authored Apr 24, 2023
2 parents 6a3b613 + 7669121 commit e3796ac
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@

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

use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\App\Request\Http as Request;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\File\Size;
use Magento\Framework\Filesystem;
use Magento\Framework\HTTP\Adapter\FileTransferFactory;
use Magento\Framework\Math\Random;
use Magento\Framework\Validator\File\IsImage;

/**
* Request Aware Validator to replace use of $_SERVER super global.
Expand All @@ -24,21 +30,21 @@ class RequestAwareValidatorFile extends ValidatorFile
/**
* Constructor method
*
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\File\Size $fileSize
* @param \Magento\Framework\HTTP\Adapter\FileTransferFactory $httpFactory
* @param \Magento\Framework\Validator\File\IsImage $isImageValidator
* @param ScopeConfigInterface $scopeConfig
* @param Filesystem $filesystem
* @param Size $fileSize
* @param FileTransferFactory $httpFactory
* @param IsImage $isImageValidator
* @param Random|null $random
* @param Request|null $request
* @throws \Magento\Framework\Exception\FileSystemException
* @throws FileSystemException
*/
public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\Filesystem $filesystem,
\Magento\Framework\File\Size $fileSize,
\Magento\Framework\HTTP\Adapter\FileTransferFactory $httpFactory,
\Magento\Framework\Validator\File\IsImage $isImageValidator,
ScopeConfigInterface $scopeConfig,
Filesystem $filesystem,
Size $fileSize,
FileTransferFactory $httpFactory,
IsImage $isImageValidator,
Random $random = null,
Request $request = null
) {
Expand Down
23 changes: 0 additions & 23 deletions lib/internal/Magento/Framework/ContextInterface.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ class ObjectManager implements \Magento\Framework\ObjectManagerInterface
protected $_config;

/**
* phpcs:disable Magento2.Annotation.MethodArguments.VisualAlignment
* @param FactoryInterface $factory
* @param ConfigInterface $config
* @param array $sharedInstances
* @param array &$sharedInstances
*/
public function __construct(FactoryInterface $factory, ConfigInterface $config, array &$sharedInstances = [])
public function __construct(FactoryInterface $factory, ConfigInterface $config, &$sharedInstances = [])
{
$this->_config = $config;
$this->_factory = $factory;
Expand Down
3 changes: 2 additions & 1 deletion lib/internal/Magento/Framework/Webapi/ErrorProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public function __construct(
$this->_filesystem = $filesystem;
$this->directoryWrite = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
$this->registerShutdownFunction();
}

/**
Expand Down Expand Up @@ -283,7 +284,7 @@ protected function _formatError($errorMessage, $trace, $httpCode, $format)
*
* @return $this
*/
public function __destruct()
public function registerShutdownFunction()
{
register_shutdown_function([$this, self::DEFAULT_SHUTDOWN_FUNCTION]);
return $this;
Expand Down

0 comments on commit e3796ac

Please sign in to comment.