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] Further resolve some deprecation issues around dynamic … #25202

Merged

Conversation

seamuslee001
Copy link
Contributor

…class properties

Overview

This fixes a few more PHP8.2 issues around dynamic class properties deprecations

Before

Deprecations triggered

After

Less Deprecations triggered

ping @eileenmcnaughton @demeritcowboy

@civibot
Copy link

civibot bot commented Dec 19, 2022

(Standard links)

@civibot civibot bot added the master label Dec 19, 2022
@demeritcowboy
Copy link
Contributor

Fatal error: Access level to CRM_Contact_Page_View::$_permission must be public (as in class CRM_Core_Page)

@seamuslee001 seamuslee001 force-pushed the php82_deprecation_classvariables branch from ed69cba to ef18fe7 Compare December 19, 2022 21:36
@seamuslee001
Copy link
Contributor Author

ok that should be fixed now hopefully @demeritcowboy

@demeritcowboy demeritcowboy merged commit 870e748 into civicrm:master Dec 20, 2022
@seamuslee001 seamuslee001 deleted the php82_deprecation_classvariables branch December 20, 2022 03:27
@demeritcowboy
Copy link
Contributor

As a sanity check I ran this little script to see if there were any classes redeclaring with different scopes for the ones that seemed likely:

files=`grep -l -r 'extends CRM_Core_Page' CRM`
for f in $files
do
  x=`grep _permission $f`;
  if [ -n "$x" ]; then
    echo "$f $x"
  fi
done

files=`grep -l -r 'extends CRM_Core_Form_Search' CRM`
for f in $files
do
  x=`grep _reset $f`;
  if [ -n "$x" ]; then
    echo "$f $x"
  fi
done

files=`grep -l -r 'use CRM_Contact_Form_Task_EmailTrait' CRM`
for f in $files
do
  x=`grep _contactDetails $f`;
  if [ -n "$x" ]; then
    echo "$f $x"
  fi
  x=`grep _entityTagValues $f`;
  if [ -n "$x" ]; then
    echo "$f $x"
  fi
  x=`grep _caseId $f`;
  if [ -n "$x" ]; then
    echo "$f $x"
  fi
  x=`grep _context $f`;
  if [ -n "$x" ]; then
    echo "$f $x"
  fi
done

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