Problem/Motivation
my log is full of depcreation logs
Deprecated function: Optional parameter $type declared before required parameter $language is implicitly treated as a required parameter in include() (line 576 of /private/var/www/xxxx/xxxx/vendor/composer/ClassLoader.php).
include('/private/var/www/xxxx/xxxx/web/core/includes/bootstrap.inc') (Line: 576)
Composer\Autoload\{closure}('/private/var/www/xxxx/xxxx/web/core/modules/language/src/ConfigurableLanguageManager.php') (Line: 427)
Composer\Autoload\ClassLoader->loadClass('Drupal\language\ConfigurableLanguageManager') (Line: 259)
Drupal\Component\DependencyInjection\Container->createService(Array, 'language_manager') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('language_manager', 1) (Line: 440)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 237)
Drupal\Component\DependencyInjection\Container->createService(Array, 'path_alias.manager') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('path_alias.manager', 1) (Line: 440)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 237)
Drupal\Component\DependencyInjection\Container->createService(Array, 'path_alias.path_processor') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('path_alias.path_processor', 1) (Line: 440)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 273)
Drupal\Component\DependencyInjection\Container->createService(Array, 'path_processor_manager') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('path_processor_manager', 1) (Line: 440)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 237)
Drupal\Component\DependencyInjection\Container->createService(Array, 'router.route_provider') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('router.route_provider', 1) (Line: 440)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 237)
Drupal\Component\DependencyInjection\Container->createService(Array, 'options_request_listener') (Line: 177)
Drupal\Component\DependencyInjection\Container->get('options_request_listener') (Line: 105)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
with a litte research i found out that the function setCurrentLanguage($type = LanguageInterface::TYPE_INTERFACE, LanguageInterface $language) triggers the warning. I don't know what the procedure is in such a case: reversing the order would destroy many function calls in core & contrib, which is certainly more likely to be done with an own deprecation.
is it save to set $language = null?
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet