- Issue created by @SirClickALot
- 🇺🇸United States jakegibs617
I am seeing the following to be fixed:
Deprecated function: Creation of dynamic property H5PCore::$url is deprecated in H5PCore->__construct() (line 2070 of /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-core/h5p.classes.php). Deprecated function: Creation of dynamic property H5PCore::$development_mode is deprecated in H5PCore->__construct() (line 2072 of /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-core/h5p.classes.php). Deprecated function: Creation of dynamic property H5PCore::$aggregateAssets is deprecated in H5PCore->__construct() (line 2074 of /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-core/h5p.classes.php). Deprecated function: Creation of dynamic property H5PCore::$fullPluginPath is deprecated in H5PCore->__construct() (line 2077 of /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-core/h5p.classes.php). Deprecated function: Creation of dynamic property H5PCore::$relativePathRegExp is deprecated in H5PCore->__construct() (line 2080 of /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-core/h5p.classes.php).
- Merge request !29Issue #3281812 by pjotr.savitski, Daniel Kulbe, sourabhjain, apaderno,... → (Open) created by Unnamed author
- 🇺🇸United States jakegibs617
and more:
PHP Deprecated: H5peditor::getLibraryData(): Optional parameter $prefix declared before required parameter $defaultLanguage is implicitly treated as a required parameter in /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-editor/h5peditor.class.php on line 376 Deprecated: H5peditor::getLibraryData(): Optional parameter $prefix declared before required parameter $defaultLanguage is implicitly treated as a required parameter in /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-editor/h5peditor.class.php on line 376 PHP Deprecated: H5peditor::getLibraryData(): Optional parameter $fileDir declared before required parameter $defaultLanguage is implicitly treated as a required parameter in /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-editor/h5peditor.class.php on line 376 Deprecated: H5peditor::getLibraryData(): Optional parameter $fileDir declared before required parameter $defaultLanguage is implicitly treated as a required parameter in /Applications/MAMP/htdocs/my_app/vendor/h5p/h5p-editor/h5peditor.class.php on line 376
- 🇺🇸United States jakegibs617
Fatal error: Declaration of Drupal\h5p\H5PDrupal\H5PDrupal::fetchExternalData($url, $data = null, $blocking = true, $stream = null) must be compatible with H5PFrameworkInterface::fetchExternalData($url, $data = null, $blocking = true, $stream = null, $fullData = false, $headers = [], $files = [], $method = 'POST') in /Applications/MAMP/htdocs/my_app/modules/contrib/h5p/src/H5PDrupal/H5PDrupal.php on line 294
- 🇺🇸United States jakegibs617
Doing it this way... there was a lot of issues, but this seems to resolve them for me
"repositories": { "drupal/h5p": { "type": "vcs", "url": "https://git.drupalcode.org/issue/h5p-3456909" }, ... "require": { "drupal/h5p": "dev-3456909-php-deprecated-errors as 2.0.x-dev" ... "extra": { "patches": { "h5p/h5p-editor": { "Fix PHP 8 deprecation issue": "../../../modules/contrib/h5p/patches/fix-php-8-deprecation-issue.patch" },
- 🇫🇮Finland hartsak
Wow, thank you for your efforts with this one @jakegibs617
I tried to follow your instructions in #6 and was able to get rid of most of the deprecation errors that appeared after updating to PHP 8.3.
However, I'm still getting this one when saving a H5P node:
Deprecated function: Creation of dynamic property H5peditor::$content is deprecated in H5peditor->processParameters() (line 158 of modules/contrib/h5p/vendor/h5p/h5p-editor/h5peditor.class.php).
- 🇫🇮Finland hartsak
Turns out that could be a relatively easy fix by just modifying line 54 here modules/contrib/h5p/vendor/h5p/h5p-editor/h5peditor.class.php
Before:
public $ajax, $ajaxInterface;
After:
public $ajax, $ajaxInterface, $content;
That fixed the error in my case at least.
- 🇫🇮Finland hartsak
And another warning:
Warning: Undefined property: stdClass::$patch_version_in_folder_name in function H5peditor->mergeLocalLibsIntoCachedLibs()
This also happens when editing a h5p node. The problem apparently comes from line 633 from file:
modules/contrib/h5p/vendor/h5p/h5p-editor/h5peditor.class.php
Something like this could maybe fix it?
Before:
'patchVersionInFolderName' => $local_lib->patch_version_in_folder_name
After:
'patchVersionInFolderName' => $local_lib->patch_version_in_folder_name ?? false,
- 🇺🇦Ukraine olga rybak
I found a couple of other issues and updated my previous patch
- 🇺🇸United States illeace
This seems like an issue with the core H5P Editor PHP Library (rather than the Drupal-specific module). Perhaps it's related to issue #260 in that library's issue queue?