Commit d1c44dd0 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3104307 by Berdir, longwave, Gábor Hojtsy, Wim Leers, alexpott,...

Issue #3104307 by Berdir, longwave, Gábor Hojtsy, Wim Leers, alexpott, andypost: Remove  BC layers in various Drupal\Core components
parent 151825ef
......@@ -24,7 +24,7 @@ class AssetDumper implements AssetDumperInterface {
* @param \Drupal\Core\File\FileSystemInterface $file_system
* The file handler.
*/
public function __construct(FileSystemInterface $file_system = NULL) {
public function __construct(FileSystemInterface $file_system) {
$this->fileSystem = $file_system;
}
......
<?php
namespace Drupal\Core\Cache;
@trigger_error(__NAMESPACE__ . '\Apcu4Backend is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Cache\ApcuBackend instead. See https://www.drupal.org/node/3063510.', E_USER_DEPRECATED);
/**
* Stores cache items in the Alternative PHP Cache User Cache (APCu).
*
* This class is used with APCu versions >= 4.0.0 and < 5.0.0.
*
* @deprecated in drupal:8.8.0 and is removed from from drupal:9.0.0.
* Use \Drupal\Core\Cache\ApcuBackend instead.
*
* @see https://www.drupal.org/node/3063510
*/
class Apcu4Backend extends ApcuBackend {
/**
* {@inheritdoc}
*
* @return \APCIterator
*/
protected function getIterator($search = NULL, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) {
return new \APCIterator('user', $search, $format, $chunk_size, $list);
}
}
......@@ -29,21 +29,6 @@ class BackendChain implements CacheBackendInterface, CacheTagsInvalidatorInterfa
*/
protected $backends = [];
/**
* Constructs a new backend chain service instance.
*
* @param string|null $bin
* (deprecated) The cache bin for which the object is created. The $bin
* parameter is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0.
*
* @see https://www.drupal.org/node/3061125
*/
public function __construct($bin = NULL) {
if ($bin) {
@trigger_error('The $bin parameter is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Omit the first parameter. See https://www.drupal.org/node/3061125', E_USER_DEPRECATED);
}
}
/**
* Appends a cache backend to the cache chain.
*
......
......@@ -88,32 +88,6 @@ public static function mergeMaxAges($a = Cache::PERMANENT, $b = Cache::PERMANENT
return min($a, $b);
}
/**
* Validates an array of cache tags.
*
* Can be called before using cache tags in operations, to ensure validity.
*
* @param string[] $tags
* An array of cache tags.
*
* @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use
* assert(\Drupal\Component\Assertion\Inspector::assertAllStrings($tags))
* instead.
*
* @throws \LogicException
*/
public static function validateTags(array $tags) {
@trigger_error(__NAMESPACE__ . '\Cache::validateTags() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use assert(\Drupal\Component\Assertion\Inspector::assertAllStrings($tags)) instead.', E_USER_DEPRECATED);
if (empty($tags)) {
return;
}
foreach ($tags as $value) {
if (!is_string($value)) {
throw new \LogicException('Cache tags must be strings, ' . gettype($value) . ' given.');
}
}
}
/**
* Build an array of cache tags from a given prefix and an array of suffixes.
*
......
......@@ -3,9 +3,6 @@
namespace Drupal\Core\Controller;
use Drupal\Core\DependencyInjection\ClassResolverInterface;
use Drupal\Core\Routing\RouteMatch;
use Drupal\Core\Routing\RouteMatchInterface;
use Psr\Http\Message\ServerRequestInterface;
use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ControllerResolver as BaseControllerResolver;
......@@ -122,47 +119,4 @@ protected function createController($controller) {
return [$controller, $method];
}
/**
* {@inheritdoc}
*/
protected function doGetArguments(Request $request, $controller, array $parameters) {
// Note this duplicates the deprecation message of
// Symfony\Component\HttpKernel\Controller\ControllerResolver::getArguments()
// to ensure it is removed in Drupal 9.
@trigger_error(sprintf('%s is deprecated as of 8.6.0 and will be removed in 9.0. Inject the "http_kernel.controller.argument_resolver" service instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
$attributes = $request->attributes->all();
$arguments = [];
foreach ($parameters as $param) {
if (array_key_exists($param->name, $attributes)) {
$arguments[] = $attributes[$param->name];
}
elseif ($param->getClass() && $param->getClass()->isInstance($request)) {
$arguments[] = $request;
}
elseif ($param->getClass() && $param->getClass()->name === ServerRequestInterface::class) {
$arguments[] = $this->httpMessageFactory->createRequest($request);
}
elseif ($param->getClass() && ($param->getClass()->name == RouteMatchInterface::class || is_subclass_of($param->getClass()->name, RouteMatchInterface::class))) {
$arguments[] = RouteMatch::createFromRequest($request);
}
elseif ($param->isDefaultValueAvailable()) {
$arguments[] = $param->getDefaultValue();
}
else {
if (is_array($controller)) {
$repr = sprintf('%s::%s()', get_class($controller[0]), $controller[1]);
}
elseif (is_object($controller)) {
$repr = get_class($controller);
}
else {
$repr = $controller;
}
throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument (because there is no default value or because there is a non optional argument after this one).', $repr, $param->name));
}
}
return $arguments;
}
}
......@@ -22,20 +22,6 @@ abstract class FormController {
*/
protected $argumentResolver;
/**
* The controller resolver.
*
* @var \Drupal\Core\Controller\ControllerResolverInterface
*
* @deprecated
* Deprecated property that is only assigned when the 'controller_resolver'
* service is used as the first parameter to FormController::__construct().
*
* @see https://www.drupal.org/node/2959408
* @see \Drupal\Core\Controller\FormController::__construct()
*/
protected $controllerResolver;
/**
* The form builder.
*
......@@ -53,10 +39,6 @@ abstract class FormController {
*/
public function __construct(ArgumentResolverInterface $argument_resolver, FormBuilderInterface $form_builder) {
$this->argumentResolver = $argument_resolver;
if ($argument_resolver instanceof ControllerResolverInterface) {
@trigger_error("Using the 'controller_resolver' service as the first argument is deprecated, use the 'http_kernel.controller.argument_resolver' instead. If your subclass requires the 'controller_resolver' service add it as an additional argument. See https://www.drupal.org/node/2959408.", E_USER_DEPRECATED);
$this->controllerResolver = $argument_resolver;
}
$this->formBuilder = $form_builder;
}
......
......@@ -24,7 +24,6 @@
use Drupal\Core\Security\RequestSanitizer;
use Drupal\Core\Site\Settings;
use Drupal\Core\Test\TestDatabase;
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\ClassLoader\WinCacheClassLoader;
use Symfony\Component\ClassLoader\XcacheClassLoader;
......@@ -36,7 +35,6 @@
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\Routing\Route;
use TYPO3\PharStreamWrapper\Manager as PharStreamWrapperManager;
use TYPO3\PharStreamWrapper\Behavior as PharStreamWrapperBehavior;
use TYPO3\PharStreamWrapper\PharStreamWrapper;
......@@ -734,25 +732,6 @@ protected function handleException(\Exception $e, $request, $type) {
throw $e;
}
/**
* {@inheritdoc}
*/
public function prepareLegacyRequest(Request $request) {
$this->boot();
$this->preHandle($request);
// Setup services which are normally initialized from within stack
// middleware or during the request kernel event.
if (PHP_SAPI !== 'cli') {
$request->setSession($this->container->get('session'));
}
$request->attributes->set(RouteObjectInterface::ROUTE_OBJECT, new Route('<none>'));
$request->attributes->set(RouteObjectInterface::ROUTE_NAME, '<none>');
$this->container->get('request_stack')->push($request);
$this->container->get('router.request_context')->fromRequest($request);
@trigger_error(__NAMESPACE__ . '\DrupalKernel::prepareLegacyRequest is deprecated drupal:8.0.0 and is removed from drupal:9.0.0. Use DrupalKernel::boot() and DrupalKernel::preHandle() instead. See https://www.drupal.org/node/3070678', E_USER_DEPRECATED);
return $this;
}
/**
* Returns module data on the filesystem.
*
......
......@@ -124,21 +124,6 @@ public function rebuildContainer();
*/
public function invalidateContainer();
/**
* Prepare the kernel for handling a request without handling the request.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The current request.
*
* @return $this
*
* @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use
* DrupalKernel::boot() and DrupalKernel::preHandle() instead.
*
* @see https://www.drupal.org/node/3070678
*/
public function prepareLegacyRequest(Request $request);
/**
* Helper method that does request related initialization.
*
......
......@@ -709,13 +709,7 @@ public function getModuleDirectories() {
* {@inheritdoc}
*/
public function getName($module) {
try {
return \Drupal::service('extension.list.module')->getName($module);
}
catch (UnknownExtensionException $e) {
@trigger_error('Calling ModuleHandler::getName() with an unknown module is deprecated in Drupal 8.7.0 and support for this will be removed in Drupal 9.0.0, check that the module exists before calling this method. See https://www.drupal.org/node/3024541.', E_USER_DEPRECATED);
return $module;
}
return \Drupal::service('extension.list.module')->getName($module);
}
}
......@@ -22,12 +22,8 @@ class Local extends FileTransfer implements ChmodInterface {
/**
* {@inheritdoc}
*/
public function __construct($jail, FileSystemInterface $file_system = NULL) {
public function __construct($jail, FileSystemInterface $file_system) {
parent::__construct($jail);
if (!isset($file_system)) {
@trigger_error('The $file_system parameter was added in Drupal 8.8.0 and will be required in 9.0.0. See https://www.drupal.org/node/3021434.', E_USER_DEPRECATED);
$file_system = \Drupal::service('file_system');
}
$this->fileSystem = $file_system;
}
......
......@@ -198,27 +198,4 @@ public function scale($width, $height = NULL, $upscale = FALSE) {
return $this->apply('scale', ['width' => $width, 'height' => $height, 'upscale' => $upscale]);
}
/**
* Provides a wrapper for drupal_chmod() to allow unit testing.
*
* @param string $uri
* A string containing a URI file, or directory path.
* @param int $mode
* Integer value for the permissions. Consult PHP chmod() documentation for
* more information.
*
* @return bool
* TRUE for success, FALSE in the event of an error.
*
* @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0.
* Use \Drupal\Core\File\FileSystem::chmod().
*
* @see \Drupal\Core\File\FileSystemInterface::chmod()
* @see https://www.drupal.org/node/2418133
*/
protected function chmod($uri, $mode = NULL) {
@trigger_error('chmod() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystemInterface::chmod(). See https://www.drupal.org/node/2418133.', E_USER_DEPRECATED);
return \Drupal::service('file_system')->chmod($uri, $mode);
}
}
......@@ -5,7 +5,6 @@
use Drupal\Core\Access\AccessManagerInterface;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Controller\ControllerResolverInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
......@@ -55,21 +54,6 @@ class LocalActionManager extends DefaultPluginManager implements LocalActionMana
*/
protected $argumentResolver;
/**
* A controller resolver object.
*
* @var \Symfony\Component\HttpKernel\Controller\ControllerResolverInterface
*
* @deprecated
* Using the 'controller_resolver' service as the first argument is
* deprecated, use the 'http_kernel.controller.argument_resolver' instead.
* If your subclass requires the 'controller_resolver' service add it as an
* additional argument.
*
* @see https://www.drupal.org/node/2959408
*/
protected $controllerResolver;
/**
* The request stack.
*
......@@ -139,10 +123,6 @@ public function __construct(ArgumentResolverInterface $argument_resolver, Reques
// discovery.
$this->factory = new ContainerFactory($this, 'Drupal\Core\Menu\LocalActionInterface');
$this->argumentResolver = $argument_resolver;
if ($argument_resolver instanceof ControllerResolverInterface) {
@trigger_error("Using the 'controller_resolver' service as the first argument is deprecated, use the 'http_kernel.controller.argument_resolver' instead. If your subclass requires the 'controller_resolver' service add it as an additional argument. See https://www.drupal.org/node/2959408.", E_USER_DEPRECATED);
$this->controllerResolver = $argument_resolver;
}
$this->requestStack = $request_stack;
$this->routeMatch = $route_match;
$this->routeProvider = $route_provider;
......
......@@ -8,7 +8,6 @@
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
use Drupal\Core\Controller\ControllerResolverInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
......@@ -58,21 +57,6 @@ class LocalTaskManager extends DefaultPluginManager implements LocalTaskManagerI
*/
protected $argumentResolver;
/**
* A controller resolver object.
*
* @var \Symfony\Component\HttpKernel\Controller\ControllerResolverInterface
*
* @deprecated
* Using the 'controller_resolver' service as the first argument is
* deprecated, use the 'http_kernel.controller.argument_resolver' instead.
* If your subclass requires the 'controller_resolver' service add it as an
* additional argument.
*
* @see https://www.drupal.org/node/2959408
*/
protected $controllerResolver;
/**
* The request stack.
*
......@@ -147,10 +131,6 @@ class LocalTaskManager extends DefaultPluginManager implements LocalTaskManagerI
public function __construct(ArgumentResolverInterface $argument_resolver, RequestStack $request_stack, RouteMatchInterface $route_match, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, AccessManagerInterface $access_manager, AccountInterface $account) {
$this->factory = new ContainerFactory($this, '\Drupal\Core\Menu\LocalTaskInterface');
$this->argumentResolver = $argument_resolver;
if ($argument_resolver instanceof ControllerResolverInterface) {
@trigger_error("Using the 'controller_resolver' service as the first argument is deprecated, use the 'http_kernel.controller.argument_resolver' instead. If your subclass requires the 'controller_resolver' service add it as an additional argument. See https://www.drupal.org/node/2959408.", E_USER_DEPRECATED);
$this->controllerResolver = $argument_resolver;
}
$this->requestStack = $request_stack;
$this->routeMatch = $route_match;
$this->routeProvider = $route_provider;
......
......@@ -4,11 +4,8 @@
use Drupal\Core\Entity\EntityRepositoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\RevisionableInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Plugin\Context\Context;
use Drupal\Core\Plugin\Context\ContextDefinition;
use Drupal\Core\TypedData\TranslatableInterface;
use Symfony\Component\Routing\Route;
/**
......@@ -131,67 +128,6 @@ public function convert($value, $definition, $name, array $defaults) {
return $entity;
}
/**
* Returns the latest revision translation of the specified entity.
*
* @param \Drupal\Core\Entity\RevisionableInterface $entity
* The default revision of the entity being converted.
* @param string $langcode
* The language of the revision translation to be loaded.
*
* @return \Drupal\Core\Entity\RevisionableInterface
* The latest translation-affecting revision for the specified entity, or
* just the latest revision, if the specified entity is not translatable or
* does not have a matching translation yet.
*
* @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0.
* Use \Drupal\Core\Entity\EntityRepositoryInterface::getActive() instead.
*/
protected function getLatestTranslationAffectedRevision(RevisionableInterface $entity, $langcode) {
@trigger_error('\Drupal\Core\ParamConverter\EntityConverter::getLatestTranslationAffectedRevision() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepositoryInterface::getActive() instead.', E_USER_DEPRECATED);
$data_type = 'language';
$context_id_prefix = '@language.current_language_context:';
$contexts = [
$context_id_prefix . LanguageInterface::TYPE_CONTENT => new Context(new ContextDefinition($data_type), $langcode),
$context_id_prefix . LanguageInterface::TYPE_INTERFACE => new Context(new ContextDefinition($data_type), $langcode),
];
$revision = $this->entityRepository->getActive($entity->getEntityTypeId(), $entity->id(), $contexts);
// The EntityRepositoryInterface::getActive() method performs entity
// translation negotiation, but this used to return an untranslated entity
// object as translation negotiation happened later in ::convert().
if ($revision instanceof TranslatableInterface) {
$revision = $revision->getUntranslated();
}
return $revision;
}
/**
* Loads the specified entity revision.
*
* @param \Drupal\Core\Entity\RevisionableInterface $entity
* The default revision of the entity being converted.
* @param string $revision_id
* The identifier of the revision to be loaded.
*
* @return \Drupal\Core\Entity\RevisionableInterface
* An entity revision object.
*
* @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0.
*/
protected function loadRevision(RevisionableInterface $entity, $revision_id) {
@trigger_error('\Drupal\Core\ParamConverter\EntityConverter::loadRevision() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0.', E_USER_DEPRECATED);
// We explicitly perform a loose equality check, since a revision ID may
// be returned as an integer or a string.
if ($entity->getLoadedRevisionId() != $revision_id) {
/** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
$storage = $this->entityTypeManager->getStorage($entity->getEntityTypeId());
return $storage->loadRevision($revision_id);
}
else {
return $entity;
}
}
/**
* {@inheritdoc}
*/
......
......@@ -60,10 +60,6 @@ protected function getPluginDependencies(PluginInspectionInterface $instance) {
elseif ($this->themeHandler()->themeExists($provider)) {
$dependencies['theme'][] = $provider;
}
else {
@trigger_error('Declaring a dependency on an uninstalled module is deprecated in Drupal 8.7.0 and will not be supported in Drupal 9.0.0.', E_USER_DEPRECATED);
$dependencies['module'][] = $provider;
}
}
// Add the config dependencies.
......
......@@ -38,12 +38,8 @@ class AjaxRenderer implements MainContentRendererInterface {
* @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer.
*/
public function __construct(ElementInfoManagerInterface $element_info_manager, RendererInterface $renderer = NULL) {
public function __construct(ElementInfoManagerInterface $element_info_manager, RendererInterface $renderer) {
$this->elementInfoManager = $element_info_manager;
if ($renderer === NULL) {
@trigger_error('The renderer service must be passed to ' . __METHOD__ . ' and will be required before Drupal 9.0.0. See https://www.drupal.org/node/3009400', E_USER_DEPRECATED);
$renderer = \Drupal::service('renderer');
}
$this->renderer = $renderer;
}
......@@ -82,17 +78,4 @@ public function renderResponse(array $main_content, Request $request, RouteMatch
return $response;
}
/**
* Wraps \Drupal\Core\Render\RendererInterface::renderRoot().
*
* @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
* $this->renderer->renderRoot() instead.
*
* @see https://www.drupal.org/node/2912696
*/
protected function drupalRenderRoot(&$elements) {
@trigger_error('\Drupal\Core\Render\MainContent\AjaxRenderer::drupalRenderRoot() is deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Use $this->renderer->renderRoot() instead. See https://www.drupal.org/node/2912696', E_USER_DEPRECATED);
return $this->renderer->renderRoot($elements);
}
}
......@@ -37,12 +37,8 @@ class DialogRenderer implements MainContentRendererInterface {
* @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer.
*/
public function __construct(TitleResolverInterface $title_resolver, RendererInterface $renderer = NULL) {
public function __construct(TitleResolverInterface $title_resolver, RendererInterface $renderer) {
$this->titleResolver = $title_resolver;
if ($renderer === NULL) {
@trigger_error('The renderer service must be passed to ' . __METHOD__ . ' and will be required before Drupal 9.0.0. See https://www.drupal.org/node/3009400', E_USER_DEPRECATED);
$renderer = \Drupal::service('renderer');
}
$this->renderer = $renderer;
}
......
......@@ -772,13 +772,13 @@ protected function doCallback($callback_type, $callback, array $args) {
$callback = explode('::', $callback, 2);
}
}
$message = sprintf('Render %s callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', $callback_type, '%s');
$message = sprintf('Render %s callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', $callback_type, '%s');
// Add \Drupal\Core\Render\Element\RenderCallbackInterface as an extra
// trusted interface so that:
// - All public methods on Render elements are considered trusted.
// - Helper classes that contain only callback methods can implement this
// instead of TrustedCallbackInterface.
return $this->doTrustedCallback($callback, $args, $message, TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION, RenderCallbackInterface::class);
return $this->doTrustedCallback($callback, $args, $message, TrustedCallbackInterface::THROW_EXCEPTION, RenderCallbackInterface::class);
}
}
......@@ -34,16 +34,6 @@ class AccountProxy implements AccountProxyInterface {
*/
protected $id = 0;
/**
* Initial account id.
*
* @var int
*
* @deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
* $this->id instead.
*/
protected $initialAccountId;
/**
* Event dispatcher.
*
......@@ -57,11 +47,7 @@ class AccountProxy implements AccountProxyInterface {
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher
* Event dispatcher.
*/
public function __construct(EventDispatcherInterface $eventDispatcher = NULL) {
if (!$eventDispatcher) {
@trigger_error('Calling AccountProxy::__construct() without the $eventDispatcher argument is deprecated in drupal:8.8.0. The $eventDispatcher argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3009387', E_USER_DEPRECATED);
$eventDispatcher = \Drupal::service('event_dispatcher');
}
public function __construct(EventDispatcherInterface $eventDispatcher) {
$this->eventDispatcher = $eventDispatcher;
}
......@@ -190,7 +176,7 @@ public function setInitialAccountId($account_id) {
throw new \LogicException('AccountProxyInterface::setInitialAccountId() cannot be called after an account was set on the AccountProxy');
}
$this->id = $this->initialAccountId = $account_id;
$this->id = $account_id;
}
/**
......
......@@ -60,28 +60,9 @@ public static function setSettingsOnRequest(Request $request, Settings $settings
if ($settings->get('reverse_proxy', FALSE)) {
$proxies = $settings->get('reverse_proxy_addresses', []);
if (count($proxies) > 0) {
$deprecated_settings = [
'reverse_proxy_header' => Request::HEADER_X_FORWARDED_FOR,
'reverse_proxy_proto_header' => Request::HEADER_X_FORWARDED_PROTO,
'reverse_proxy_host_header' => Request::HEADER_X_FORWARDED_HOST,
'reverse_proxy_port_header' => Request::HEADER_X_FORWARDED_PORT,
'reverse_proxy_forwarded_header' => Request::HEADER_FORWARDED,
];
$all = $settings->getAll();