Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package components/handlebars.js is outdated and causes warnings #1401

Open
osma opened this issue Feb 9, 2023 · 2 comments
Open

Package components/handlebars.js is outdated and causes warnings #1401

osma opened this issue Feb 9, 2023 · 2 comments
Labels
bug size-medium 2 hours to 2 days Skosmos 2.X Relevant for Skosmos 2

Comments

@osma
Copy link
Member

osma commented Feb 9, 2023

URL address of the page where you encountered the problem

Running php composer.phar install on PHP 8.1

Description of the problem

Getting a bunch of error messages when running Composer. First this:

Package robloach/component-installer is abandoned, you should avoid using it. Use oomphinc/composer-installers-extender instead.

and later this:

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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php:215
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/Skosmos/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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php:78
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php:80
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php:50
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:104
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:112
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:54
Deprecation Notice: Return type of Assetic\Asset\Iterator\AssetCollectionIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:89
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:84
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:99
Deprecation Notice: Return type of Assetic\Asset\Iterator\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/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:94
Deprecation Notice: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:40
Deprecation Notice: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:40
Deprecation Notice: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:40
Deprecation Notice: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/Skosmos/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php:40

It's maybe not obvious at first, but these are caused by the package components/handlebars.js, which is a distribution of Handlebars.js repackaged for Composer. Looking at the dependency tree shows this:

$ php composer.phar show --tree
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.
components/handlebars.js v4.7.7 Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be.
└──robloach/component-installer *
   ├──kriswallsmith/assetic 1.*
   │  ├──php >=5.3.1
   │  └──symfony/process ~2.1|~3.0
   │     └──php ^5.5.9|>=7.0.8
   └──php >=5.3.2

It seems that components/handlebars.js isn't actively maintained (last release is from 2021-02-15, no activity since then in the GitHub repository) and the problem has also been reported as components/handlebars.js#27 with no response in more than 2 years.

If we want to keep using Handlebars.js (and I think we still need it, at least for Skosmos 2.x), we should switch to another installation method.

@osma osma added the bug label Feb 9, 2023
@osma osma added this to the Next Tasks milestone Feb 9, 2023
@osma osma mentioned this issue Feb 9, 2023
4 tasks
@joelit joelit added the size-medium 2 hours to 2 days label Feb 9, 2023
@MikkoAleksanteri MikkoAleksanteri modified the milestones: Next Tasks, 3.0 Apr 6, 2023
@osma
Copy link
Member Author

osma commented Apr 6, 2023

We will need to use another installation mechanism for Handlebars.js. We will need to create another build/install setup for Skosmos 3.x anyway.

@joelit joelit modified the milestones: 3.0, Blue Sky, No further action May 31, 2023
@joelit
Copy link
Contributor

joelit commented May 31, 2023

Package removed from Skosmos 3.0, but this issue is still a concern for Skosmos 2.x.

@osma osma added the Skosmos 2.X Relevant for Skosmos 2 label Dec 5, 2023
@joelit joelit moved this to Not selected in NatLibFi Skosmos Backlog Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug size-medium 2 hours to 2 days Skosmos 2.X Relevant for Skosmos 2
Projects
Status: Not selected
Development

No branches or pull requests

3 participants