PHP 8.0 compatibility Issue: migrate_ui_batch() arguments

Created on 30 March 2022, over 2 years ago
Updated 29 January 2023, over 1 year ago

Problem/Motivation

Php 8 is not supporting a required parameter after an optional one in method declaration and giving the below warnings in phpcs compatibility check

FILE: /var/www/docroot/sites/all/modules/contrib/migrate/migrate_ui/migrate_ui.pages.inc
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------
568 | WARNING | Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter
    |         | $force is optional, while parameter $context is required.
------------------------------------------------------------------------------------------

Proposed resolution

Proposing the attached patch to fix the issue

πŸ› Bug report
Status

Fixed

Version

2.0

Component

migrate_ui

Created by

πŸ‡ΊπŸ‡ΈUnited States suvasish.manna

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024