On 18/04/2025 21:27, admin@xxxxxxxxxxxxxxxxx wrote:
here the errors:
Deprecated
:
League\Flysystem\EventableFilesystem\EventableFilesystem::__construct():
Implicitly marking parameter $emitter as nullable is deprecated, the
explicit nullable type must be used instead in
/usr/www/dcu/public_html/src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php
on line
30
This change is detailed here:
https://www.php.net/manual/en/migration84.deprecated.php#migration84.deprecated.core.implicitly-nullable-parameter
Deprecated
: Use of "parent" in callables is deprecated in
/usr/www/dcu/public_html/src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php
on line
431
This change is documented here:
https://www.php.net/manual/en/migration82.deprecated.php#migration82.deprecated.core.relative-callables
See also
https://wiki.php.net/rfc/deprecate_partially_supported_callables#backward_incompatible_changes
In general, the migrating appendices (
https://www.php.net/manual/en/appendices.php ) are a good reference for
changes between PHP versions - see in particular the Deprecated Features
and Backward Incompatible Changes sections when upgrading existing code.
It looks like the FlySystem Eventable library has been abandoned since
FlySystem dropped the plugins functionality some time ago (
https://flysystem.thephpleague.com/docs/upgrade-from-1.x/#plugins-are-removed
) . The package is marked abandoned on Packagist and its repository has
been archived (with the last changes 11 years ago).
You should look to migrate away from this library. Based on the
description of what it did (
https://github.com/thephpleague/flysystem-eventable-filesystem/blob/44b315a8923b9209cedc5b9f6c2b62c9fd5c0977/readme.md#user-content-events
) it should be easy to write a wrapper around FlySystem the performs the
same functionality.
For example, instead of adding an event for "before.read", the wrapper
would do whatever the event did, then call the FlySystem read method (or
whatever the modern equivalent is).
Making this change will make this and future upgrades easier since
you'll be able to pull in the latest version of FlySystem, with support
for recent PHP versions, rather than manually maintaining an ancient
version, which is error prone and won't contain bug and security fixes.