Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF][PHP8.2] Fix use of self in callables deprecation #25625

Merged
merged 1 commit into from
Feb 19, 2023

Conversation

braders
Copy link
Contributor

@braders braders commented Feb 19, 2023

Overview

Fix Use of "self" in callables is deprecated issue.

Before

On PHP 8.2 many tests are failing due to the error Use of "self" in callables is deprecated. For example:

CRM_Core_BAO_AddressTest::testGetValues
Use of "self" in callables is deprecated

/home/jenkins/bknix-edge/build/build-1/web/sites/all/modules/civicrm/CRM/Core/BAO/Block.php:460
/home/jenkins/bknix-edge/build/build-1/web/sites/all/modules/civicrm/CRM/Core/BAO/Address.php:1339
/home/jenkins/bknix-edge/build/build-1/web/sites/all/modules/civicrm/tests/phpunit/CRM/Core/BAO/AddressTest.php:386
/home/jenkins/bknix-edge/build/build-1/web/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:236
/home/jenkins/bknix-edge/extern/phpunit8/phpunit8.phar:1721

More detail on the deprecation can be found at https://php.watch/versions/8.2/partially-supported-callable-deprecation.

After

Use of a PHP 8.2 valid syntax.

Comments

To be honest I suspect the sortPrimaryFirst functionality isn't really providing any value, can could maybe be removed. But I'll leave that tidy up for another day.

@civibot
Copy link

civibot bot commented Feb 19, 2023

(Standard links)

@civibot civibot bot added the master label Feb 19, 2023
@braders
Copy link
Contributor Author

braders commented Feb 19, 2023

Jenkins, test this please

1 similar comment
@braders
Copy link
Contributor Author

braders commented Feb 19, 2023

Jenkins, test this please

@seamuslee001
Copy link
Contributor

This seems fine to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants