RCOSDP / nextcloud-file_upload_notification

Nextcloud application for the file-update notifications from Nextcloud to GakuNin RDM
Apache License 2.0
3 stars 1 forks source link

Now is easier to maintain compatibility with newer Nextcloud releases #4

Open p-bo opened 1 year ago

p-bo commented 1 year ago

Just in case it wasn't noticed - Nextcloud improved policy regarding changes in core to ease app developers in maintaining compatibility with newer Nextcloud versions:

https://help.nextcloud.com/t/new-process-for-documenting-core-code-changes-that-affect-app-developers/149828?u=p-bo

nursoda commented 1 year ago

I'd love to be able to use this app in recent versions as I have multiple upload directories and currently have to tell people that they need to inform me about their upload. Really should be a files app core feature, though. Until then, could you please check whether APIs need to be changed, adapt min/max versions and re-release this app as compatible with recent NC versions?

It at least is not compatible with NC27 in version 0.1.2. After manually downloading, unpacking, copying it to /apps and activating it, I got this on my next occ app:update --all:

An unhandled exception has been thrown:
Error: Call to a member function getUID() on null in /PATH_TO_NC/apps/file_upload_notification/lib/Hooks/UserHooks.php:59
Stack trace:
#0 [internal function]: OCA\FileUploadNotification\Hooks\UserHooks->OCA\FileUploadNotification\Hooks\{closure}()
#1 /PATH_TO_NC/lib/private/Hooks/EmitterTrait.php(105): call_user_func_array()
#2 /PATH_TO_NC/lib/private/Hooks/PublicEmitter.php(40): OC\Hooks\BasicEmitter->emit()
#3 /PATH_TO_NC/lib/private/Files/Node/Root.php(144): OC\Hooks\PublicEmitter->emit()
#4 /PATH_TO_NC/lib/private/Files/Node/Node.php(133): OC\Files\Node\Root->emit()
#5 /PATH_TO_NC/lib/private/Files/Node/File.php(77): OC\Files\Node\Node->sendHooks()
#6 /PATH_TO_NC/lib/private/Files/SimpleFS/SimpleFile.php(92): OC\Files\Node\File->putContent()
#7 /PATH_TO_NC/lib/private/App/AppStore/Fetcher/Fetcher.php(201): OC\Files\SimpleFS\SimpleFile->putContent()
#8 /PATH_TO_NC/lib/private/App/AppStore/Fetcher/AppFetcher.php(187): OC\App\AppStore\Fetcher\Fetcher->get()
#9 /PATH_TO_NC/lib/private/Installer.php(421): OC\App\AppStore\Fetcher\AppFetcher->get()
#10 /PATH_TO_NC/apps/updatenotification/lib/Command/Check.php(83): OC\Installer->isUpdateAvailable()
#11 /PATH_TO_NC/3rdparty/symfony/console/Command/Command.php(298): OCA\UpdateNotification\Command\Check->execute()
#12 /PATH_TO_NC/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#13 /PATH_TO_NC/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#14 /PATH_TO_NC/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#15 /PATH_TO_NC/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#16 /PATH_TO_NC/console.php(100): OC\Console\Application->run()
#17 /PATH_TO_NC/occ(11): require_once('...')
#18 {main}app:update --all