Problem/Motivation

When on PHP 8.4, I get many 'Deprecated function' warnings, and some of them are given below:

  1. Deprecated function: Drupal\features\FeaturesManager::isFeatureModule(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  2. Deprecated function: Drupal\features\FeaturesManager::listPackageDirectories(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  3. Deprecated function: Drupal\features\FeaturesManager::getFeaturesModules(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  4. Deprecated function: Drupal\features\FeaturesManager::initPackage(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  5. Deprecated function: Drupal\features\FeaturesManager::assignConfigDependents(): Implicitly marking parameter $item_names as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  6. Deprecated function: Drupal\features\FeaturesManager::assignPackageDependencies(): Implicitly marking parameter $package as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  7. Deprecated function: Drupal\features\FeaturesManager::getPackageObject(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  8. Deprecated function: Drupal\features\FeaturesManager::listExistingConfig(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).
  9. Deprecated function: Drupal\features\FeaturesManager::getExportInfo(): Implicitly marking parameter $bundle as nullable is deprecated, the explicit nullable type must be used instead in include() (line 582 of C:\Users\mypc\www\my_site\drupal\vendor\composer\ClassLoader.php).

Proposed resolution

Use nullable types.

Issue fork features-3516043

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

koosvdkolk created an issue. See original summary.

ohorbatiuk’s picture

Title: Fix PHP 8.3/8.4 issues » PHP 8.4 compatibility
Assigned: Unassigned » ohorbatiuk
Category: Task » Bug report
Issue summary: View changes

I was only able to get the same warnings on PHP 8.4.

ohorbatiuk’s picture

Assigned: ohorbatiuk » Unassigned
Status: Active » Needs review
ohorbatiuk’s picture

Issue tags: +PHP 8.4
dhruv.mittal’s picture

Reviewing it

dhruv.mittal’s picture

Status: Needs review » Needs work

unit tests are failing
So moving it back to the Needs work\
Thanks

ohorbatiuk’s picture

Status: Needs work » Needs review

The tests also fail in all other merge requests, so it is not caused by the changes made here.

dhruv.mittal’s picture

But in the targeted branch PHPunit tests are passing but in your Merge Request Phpunit tests are failing.

  • mark_fullmer committed 5bc01a79 on 8.x-3.x
    [#3516043] feat: PHP 8.4 compatibility
    
    By: koosvdkolk
    By: ohorbatiuk
    By...
mark_fullmer’s picture

Status: Needs review » Fixed

Thanks! This has been included in the 8.x-3.15 release

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.