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

Fix PHP 8.2 deprecation warnings in unit tests #586

Open
wants to merge 1 commit into
base: MOODLE_310_STABLE
Choose a base branch
from

Conversation

sammarshallou
Copy link
Contributor

There were a number of 'Creation of dynamic property...' deprecation warnings when running the unit test. These happen if you set '$this->field = value' without declaring e.g. 'protected $field' in the class.

I've fixed these and the unit tests now run for me. The fix should be safe for all recent PHP versions, i.e. I didn't add types to the declarations.

There were a number of 'Creation of dynamic property...' deprecation
warnings when running the unit test. These happen if you set
'$this->field = value' without declaring e.g. 'protected $field' in
the class.

I've fixed these and the unit tests now run for me. The fix should be
safe for all recent PHP versions, i.e. I didn't add types to the
declarations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant