Skip to content
Snippets Groups Projects
Commit 06aeda30 authored by catch's avatar catch
Browse files

Issue #3427999 by andypost, Ayesh, bbrala: [PHP 8.4] Fix implicitly nullable type declarations

parent a62995de
No related branches found
No related tags found
28 merge requests!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!9470[10.3.x-only-DO-NOT-MERGE]: #3331771 Fix file_get_contents(): Passing null to parameter,!8736Update the Documention As per the Function uses.,!8540Issue #3457061: Bootstrap Modal dialog Not closing after 10.3.0 Update,!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8513Issue #3453786: DefaultSelection should document why values for target_bundles NULL and [] behave as they do,!8373Issue #3427374 by danflanagan8, Vighneshh: taxonomy_tid ViewsArgumentDefault...,!8126Added escape fucntionality on admintoolbar close icon,!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!1105Issue #3025039: New non translatable field on translatable content throws error,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #188165 canceled
Pipeline: drupal

#188166

    Showing
    with 26 additions and 26 deletions
    ......@@ -15,7 +15,7 @@ class AccessArgumentsResolverFactory implements AccessArgumentsResolverFactoryIn
    /**
    * {@inheritdoc}
    */
    public function getArgumentsResolver(RouteMatchInterface $route_match, AccountInterface $account, Request $request = NULL) {
    public function getArgumentsResolver(RouteMatchInterface $route_match, AccountInterface $account, ?Request $request = NULL) {
    $route = $route_match->getRouteObject();
    // Defaults for the parameters defined on the route object need to be added
    ......
    ......@@ -24,6 +24,6 @@ interface AccessArgumentsResolverFactoryInterface {
    * @return \Drupal\Component\Utility\ArgumentsResolverInterface
    * The parametrized arguments resolver instance.
    */
    public function getArgumentsResolver(RouteMatchInterface $route_match, AccountInterface $account, Request $request = NULL);
    public function getArgumentsResolver(RouteMatchInterface $route_match, AccountInterface $account, ?Request $request = NULL);
    }
    ......@@ -79,7 +79,7 @@ public function __construct(RouteProviderInterface $route_provider, ParamConvert
    /**
    * {@inheritdoc}
    */
    public function checkNamedRoute($route_name, array $parameters = [], AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function checkNamedRoute($route_name, array $parameters = [], ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    try {
    $route = $this->routeProvider->getRouteByName($route_name);
    ......@@ -108,7 +108,7 @@ public function checkNamedRoute($route_name, array $parameters = [], AccountInte
    /**
    * {@inheritdoc}
    */
    public function checkRequest(Request $request, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function checkRequest(Request $request, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    $route_match = RouteMatch::createFromRequest($request);
    return $this->check($route_match, $account, $request, $return_as_object);
    }
    ......@@ -116,7 +116,7 @@ public function checkRequest(Request $request, AccountInterface $account = NULL,
    /**
    * {@inheritdoc}
    */
    public function check(RouteMatchInterface $route_match, AccountInterface $account = NULL, Request $request = NULL, $return_as_object = FALSE) {
    public function check(RouteMatchInterface $route_match, ?AccountInterface $account = NULL, ?Request $request = NULL, $return_as_object = FALSE) {
    if (!isset($account)) {
    $account = $this->currentUser;
    }
    ......
    ......@@ -33,7 +33,7 @@ interface AccessManagerInterface {
    * returned, i.e. TRUE means access is explicitly allowed, FALSE means
    * access is either explicitly forbidden or "no opinion".
    */
    public function checkNamedRoute($route_name, array $parameters = [], AccountInterface $account = NULL, $return_as_object = FALSE);
    public function checkNamedRoute($route_name, array $parameters = [], ?AccountInterface $account = NULL, $return_as_object = FALSE);
    /**
    * Execute access checks against the incoming request.
    ......@@ -53,7 +53,7 @@ public function checkNamedRoute($route_name, array $parameters = [], AccountInte
    * returned, i.e. TRUE means access is explicitly allowed, FALSE means
    * access is either explicitly forbidden or "no opinion".
    */
    public function checkRequest(Request $request, AccountInterface $account = NULL, $return_as_object = FALSE);
    public function checkRequest(Request $request, ?AccountInterface $account = NULL, $return_as_object = FALSE);
    /**
    * Checks a route against applicable access check services.
    ......@@ -78,6 +78,6 @@ public function checkRequest(Request $request, AccountInterface $account = NULL,
    * returned, i.e. TRUE means access is explicitly allowed, FALSE means
    * access is either explicitly forbidden or "no opinion".
    */
    public function check(RouteMatchInterface $route_match, AccountInterface $account = NULL, Request $request = NULL, $return_as_object = FALSE);
    public function check(RouteMatchInterface $route_match, ?AccountInterface $account = NULL, ?Request $request = NULL, $return_as_object = FALSE);
    }
    ......@@ -29,6 +29,6 @@ interface AccessibleInterface {
    * returned, i.e. TRUE means access is explicitly allowed, FALSE means
    * access is either explicitly forbidden or "no opinion".
    */
    public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE);
    public function access($operation, ?AccountInterface $account = NULL, $return_as_object = FALSE);
    }
    ......@@ -51,7 +51,7 @@ public function __construct(
    * @return \Drupal\Core\Access\AccessResultInterface
    * The access result.
    */
    public function access(Route $route, RouteMatchInterface $route_match, AccountInterface $account, Request $request = NULL) {
    public function access(Route $route, RouteMatchInterface $route_match, AccountInterface $account, ?Request $request = NULL) {
    try {
    $callable = $this->callableResolver->getCallableFromDefinition($route->getRequirement('_custom_access'));
    }
    ......
    ......@@ -33,7 +33,7 @@ public function __construct(CsrfTokenGenerator $csrf_token) {
    /**
    * {@inheritdoc}
    */
    public function processOutbound($route_name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL) {
    public function processOutbound($route_name, Route $route, array &$parameters, ?BubbleableMetadata $bubbleable_metadata = NULL) {
    if ($route->hasRequirement('_csrf_token')) {
    $path = ltrim($route->getPath(), '/');
    // Replace the path parameters with values from the parameters array.
    ......
    ......@@ -56,6 +56,6 @@ public function executeMultiple(array $objects);
    * returned, i.e. TRUE means access is explicitly allowed, FALSE means
    * access is either explicitly forbidden or "no opinion".
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE);
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE);
    }
    ......@@ -94,7 +94,7 @@ public function execute($object = NULL) {
    /**
    * {@inheritdoc}
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    return $object->access('delete', $account, $return_as_object);
    }
    ......
    ......@@ -209,7 +209,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
    /**
    * {@inheritdoc}
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    $result = AccessResult::allowed();
    return $return_as_object ? $result : $result->isAllowed();
    }
    ......
    ......@@ -133,7 +133,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
    /**
    * {@inheritdoc}
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    $access = AccessResult::allowed();
    return $return_as_object ? $access : $access->isAllowed();
    }
    ......
    ......@@ -127,7 +127,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
    /**
    * {@inheritdoc}
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    $result = AccessResult::allowed();
    return $return_as_object ? $result : $result->isAllowed();
    }
    ......
    ......@@ -27,7 +27,7 @@ public function execute($entity = NULL) {
    /**
    * {@inheritdoc}
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    $key = $object->getEntityType()->getKey('published');
    /** @var \Drupal\Core\Entity\EntityInterface $object */
    ......
    ......@@ -69,7 +69,7 @@ public function execute($entity = NULL) {
    /**
    * {@inheritdoc}
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    // It's not necessary to check the changed field access here, because
    // Drupal\Core\Field\ChangedFieldItemList would anyway return 'not allowed'.
    // Also changing the changed field value is only a workaround to trigger an
    ......
    ......@@ -27,7 +27,7 @@ public function execute($entity = NULL) {
    /**
    * {@inheritdoc}
    */
    public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    $key = $object->getEntityType()->getKey('published');
    /** @var \Drupal\Core\Entity\EntityInterface $object */
    ......
    ......@@ -55,7 +55,7 @@ class InsertCommand implements CommandInterface, CommandWithAttachedAssetsInterf
    * @param array $settings
    * An array of JavaScript settings to be passed to any attached behaviors.
    */
    public function __construct($selector, $content, array $settings = NULL) {
    public function __construct($selector, $content, ?array $settings = NULL) {
    $this->selector = $selector;
    $this->content = $content;
    $this->settings = $settings;
    ......
    ......@@ -121,7 +121,7 @@ protected function getLibrariesToLoad(AttachedAssetsInterface $assets) {
    /**
    * {@inheritdoc}
    */
    public function getCssAssets(AttachedAssetsInterface $assets, $optimize, LanguageInterface $language = NULL) {
    public function getCssAssets(AttachedAssetsInterface $assets, $optimize, ?LanguageInterface $language = NULL) {
    if (!$assets->getLibraries()) {
    return [];
    }
    ......@@ -225,7 +225,7 @@ protected function getJsSettingsAssets(AttachedAssetsInterface $assets) {
    /**
    * {@inheritdoc}
    */
    public function getJsAssets(AttachedAssetsInterface $assets, $optimize, LanguageInterface $language = NULL) {
    public function getJsAssets(AttachedAssetsInterface $assets, $optimize, ?LanguageInterface $language = NULL) {
    if (!$assets->getLibraries() && !$assets->getSettings()) {
    return [[], []];
    }
    ......
    ......@@ -51,7 +51,7 @@ interface AssetResolverInterface {
    * @return array
    * A (possibly optimized) collection of CSS assets.
    */
    public function getCssAssets(AttachedAssetsInterface $assets, $optimize, LanguageInterface $language = NULL);
    public function getCssAssets(AttachedAssetsInterface $assets, $optimize, ?LanguageInterface $language = NULL);
    /**
    * Returns the JavaScript assets for the current response's libraries.
    ......@@ -83,6 +83,6 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize, Languag
    * - at index one: the (possibly optimized) collection of JavaScript assets
    * for the bottom of the page
    */
    public function getJsAssets(AttachedAssetsInterface $assets, $optimize, LanguageInterface $language = NULL);
    public function getJsAssets(AttachedAssetsInterface $assets, $optimize, ?LanguageInterface $language = NULL);
    }
    ......@@ -71,7 +71,7 @@ public function processDefinition(&$definition, $plugin_id) {
    /**
    * {@inheritdoc}
    */
    public function getSortedDefinitions(array $definitions = NULL) {
    public function getSortedDefinitions(?array $definitions = NULL) {
    // Sort the plugins first by category, then by admin label.
    $definitions = $this->traitGetSortedDefinitions($definitions, 'admin_label');
    // Do not display the 'broken' plugin in the UI.
    ......
    ......@@ -54,7 +54,7 @@ public function setContainer(ContainerInterface $container): void {
    * - 'cache.backend.apcu' (if the PHP process has APCu enabled)
    * - NULL (if the PHP process doesn't have APCu enabled)
    */
    public function __construct(Settings $settings = NULL, $consistent_service_name = NULL, $fast_service_name = NULL) {
    public function __construct(?Settings $settings = NULL, $consistent_service_name = NULL, $fast_service_name = NULL) {
    // Default the consistent backend to the site's default backend.
    if (!isset($consistent_service_name)) {
    $cache_settings = isset($settings) ? $settings->get('cache') : [];
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment