Problem/Motivation

The module has PHP 8.4 deprecation in the form of "Implicitly nullable via default value null" - https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

This produces deprecation warnings from PHP.

Steps to reproduce

Install Drupal 11+ and the 4.0.3 version of the cshs module running on PHP 8.4 and observe the deprecation warnings.

Proposed resolution

See attached patch.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork cshs-3533904

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

flemming.fridthjof created an issue. See original summary.

flemming.fridthjof’s picture

Issue summary: View changes
dhruv.mittal’s picture

Assigned: Unassigned » dhruv.mittal
liam morland’s picture

Issue tags: -PHP 8.4 deprecation +PHP 8.4

dhruv.mittal’s picture

Assigned: dhruv.mittal » Unassigned
Status: Active » Needs review
drcolossos’s picture

Status: Needs review » Reviewed & tested by the community

The patch applies and fixes the deprecation errors

joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

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.

joseph.olstad’s picture

Status: Fixed » Needs review

Hmm, for some reason didn't merge.

joseph.olstad’s picture

1) Drupal\Tests\cshs\Unit\CshsGroupByRootFormatterUnitTest::testViewElements
The data provider specified for Drupal\Tests\cshs\Unit\CshsGroupByRootFormatterUnitTest::testViewElements is invalid
Data Provider method Drupal\Tests\cshs\Unit\CshsGroupByRootFormatterUnitTest::providerViewElements() is not static
/builds/project/cshs/tests/src/Unit/CshsGroupByRootFormatterUnitTest.php:37

https://git.drupalcode.org/project/cshs/-/jobs/6820792

I don't have time to fix this atm, will come back to this later.

joseph.olstad’s picture

Status: Needs review » Needs work

unlikely that this is related to the merge request, more likely it is related to D11.2 since the last time this passed D11.1 was the standard for phpunit.

danrod’s picture

Hello there, what's the status of this? any timeline of merging this to the 4.0.x branch soon? I am using D11.2 and I can see the same issues:

Deprecated: Drupal\cshs\Plugin\views\filter\CshsTaxonomyIndex::init(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/cshs/src/Plugin/views/filter/CshsTaxonomyIndex.php on line 35

Deprecated: Drupal\cshs\CshsOptionsFromHelper::getOptions(): Implicitly marking parameter $max_depth as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/cshs/src/CshsOptionsFromHelper.php on line 326
liam morland’s picture

Version: 4.0.3 » 4.0.x-dev
Status: Needs work » Needs review

The test failures are not caused by this issue. They would be fixed by #3547080: Fix CshsGroupByRootFormatterUnitTest.

joseph.olstad’s picture

Assigned: Unassigned » joseph.olstad
Status: Needs review » Active

joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned
Status: Active » Fixed

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

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

Maintainers, credit people who helped resolve this issue.

joseph.olstad’s picture

Status: Fixed » Closed (fixed)

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