alboro / fractalnote

FractalNote is online editor of hierarchical notes (or note trees) for Nextcloud server. You can view/edit CherryTree (*.ctb) files with it in browser.
http://cloud.aldem.ru/index.php/apps/fractalnote?f=/demo.ctb
Apache License 2.0
20 stars 1 forks source link

Compatibility and Installation Issues with FractalNote and handlebars.js on Nextcloud #8

Open aarek-eng opened 7 months ago

aarek-eng commented 7 months ago

Title:

Compatibility and Installation Issues with FractalNote and handlebars.js on Nextcloud

Body:

Issue Overview

I am integrating FractalNote into a Nextcloud instance on a Fedora server with Apache and PHP 8.2.16, using Composer 2.7.1. I've encountered several compatibility and installation issues that I believe need attention for smoother operation and future maintenance.

Issues Encountered

  1. PHP Version Dependency: The appinfo/info.xml for FractalNote specifies PHP < 7.2. Modern PHP versions, like my environment's PHP 8.2, are incompatible under these constraints, limiting the app's usability in updated systems.

  2. Abandoned Composer Package Dependency: The installation process highlighted a dependency on robloach/component-installer, marked as abandoned by Composer, with a recommendation to use oomphinc/composer-installers-extender. While attempting to accommodate both, concerns arise regarding long-term support and compatibility.

  3. Deprecation Notices: Numerous PHP deprecation notices were observed, particularly concerning kriswallsmith/assetic, indicating potential incompatibilities with PHP 8.x versions.

  4. App Enablement in Nextcloud: After addressing Composer dependencies, Nextcloud's UI still prevents app enablement, citing an unmet PHP version requirement, despite successful dependency resolution.

  5. handlebars.js Specific Issue: The project's reliance on handlebars.js through components/handlebars.js, requiring robloach/component-installer, compounds the dependency and compatibility challenges faced.

Suggested Actions

Conclusion

The functionality offered by FractalNote is of significant interest, especially for managing Cherrytree files within Nextcloud. Addressing these outlined points could substantially improve its integration and operability in contemporary and forward-looking environments. I appreciate your efforts on this project and look forward to any advice, updates, or solutions you might propose.

user@fedora:/var/www/html/nextcloud/apps/fractalnote$ composer install
Loading "robloach/component-installer" which is a legacy composer-installer built for Composer 1.x, it is likely to cause issues as you are running Composer 2.x.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package robloach/component-installer is abandoned, you should avoid using it. Use oomphinc/composer-installers-extender instead.
Generating autoload files
> ComponentInstaller\Installer::postAutoloadDump
Compiling component files
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionFilterIterator::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:226
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:196
Deprecation Notice: Return type of Assetic\Asset\AssetCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:153
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:314
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:322
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionIterator::current($raw = false) should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:267
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should beused to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:299
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:294
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:309
Deprecation Notice: Return type of Assetic\Asset\AssetCollectionIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:304
Deprecation Notice: Return type of Assetic\Filter\FilterCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php:73
Deprecation Notice: Return type of Assetic\Filter\FilterCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php:78
Deprecation Notice: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:255
Deprecation Notice: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:255
Deprecation Notice: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:255
Deprecation Notice: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/nextcloud/apps/fractalnote/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:255
47 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
usenet@fedora-tcdt:/var/www/html/nextcloud/apps/fractalnote$ composer show oomphinc/composer-installers-extender
Loading "robloach/component-installer" which is a legacy composer-installer built for Composer 1.x, it is likely to cause issues as you are running Composer 2.x.
name     : oomphinc/composer-installers-extender
descrip. : Extend the composer/installers plugin to accept any arbitrary package type.
keywords :
versions : * 2.0.1
released : 2021-12-15, 2 years ago
type     : composer-plugin
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : http://www.oomphinc.com/
source   : [git] https://github.com/oomphinc/composer-installers-extender.git cbf4b6f9a24153b785d09eee755b995ba87bd5f9
dist     : [zip] https://api.github.com/repos/oomphinc/composer-installers-extender/zipball/cbf4b6f9a24153b785d09eee755b995ba87bd5f9 cbf4b6f9a24153b785d09eee755b995ba87bd5f9
path     : /var/www/html/nextcloud/apps/fractalnote/vendor/oomphinc/composer-installers-extender
names    : oomphinc/composer-installers-extender

support
issues : https://github.com/oomphinc/composer-installers-extender/issues
source : https://github.com/oomphinc/composer-installers-extender/tree/2.0.1

autoload
psr-4
OomphInc\ComposerInstallersExtender\ => src/

requires
composer-plugin-api ^1.1 || ^2.0
composer/installers ^1.0 || ^2.0
php >=7.1

requires (dev)
composer/composer ^2.0
phpunit/phpunit ^7.2
squizlabs/php_codesniffer ^3.3
jaylinski commented 7 months ago

As mentioned in https://github.com/handlebars-lang/handlebars.js/issues/2029#issuecomment-1973289776, this can be fixed by requiring the dev-master branch like this:

composer require components/handlebars.js:dev-master