-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add support for PHP 8.1 #1385
Add support for PHP 8.1 #1385
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov ReportBase: 71.35% // Head: 69.55% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1385 +/- ##
============================================
- Coverage 71.35% 69.55% -1.81%
Complexity 1650 1650
============================================
Files 32 32
Lines 3774 4257 +483
============================================
+ Hits 2693 2961 +268
- Misses 1081 1296 +215
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hooray for sweetrdf! Core functionalities need to be checked to be sure there are no regressions - I don't 100% trust the coverage of tests in this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! :)
I gave this a thorough run-through, and here are my findings:
- EasyRDF seems to work fine
- Of the things not covered by PHPUnit, I tested that the update does not break the way Skosmos interacts with JS components like the JS tree or the search bar
- Finna-plugin seems to work too
- The new sanitation seems to work, seeing as the following special chars work with SPARQL
But there is something wrong with library dependencies to AssetCollection for robloach/component-installer:
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
Maybe the composer.json should change to https://github.com/oomphinc/composer-installers-extender or https://github.com/oomphinc/composer-installers-extender
Excellent work! A couple of remarks on unit tests:
|
I'll see if I can finish this off. |
This is caused by the components/handlebars.js package we are using. We have the latest released version (4.7.7), but the packaging for Composer uses the outdated |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reported the Handlebars.js dependency issue as #1401 . |
Reasons for creating this PR
Skosmos currently supports PHP versions 7.3 - 8.0 even though 7.3 EOL has already been reached and 7.4 is nearing its own end, see https://www.php.net/supported-versions.php. Therefore, there is a growing need of new version support.
Description of the changes in this PR
This PR straighforwardly fixes incompatibility issues (and deprecation notices) encountered whilst developing and testing Skosmos with PHP 8.1. I used the proposed solution described in #1274 (comment) to get past EasyRdf-related issues. Closes #1274
Known problems or uncertainties in this PR
FILTER_SANITIZE_STRING
(see https://www.php.net/manual/en/filter.filters.sanitize.php for more information, also see https://stackoverflow.com/questions/69207368/constant-filter-sanitize-string-is-deprecated and especially its accepted answer). It could be more appropriate to use the 3rd option of the accepted answer via a FILTER_CALLBACK, for example.Checklist
.sr-only
class, color contrast)