catalyst / moodle-tool_objectfs

Object file storage system for Moodle
https://moodle.org/plugins/tool_objectfs
88 stars 72 forks source link

Fix PHP 8.2 deprecation warnings in unit tests (4.2) #621

Closed sammarshallou closed 4 months ago

sammarshallou commented 4 months ago

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.

This is just a MOODLE_402 branch version of #586.

danmarsden commented 4 months ago

Thanks Sam!