- 🇫🇮Finland mlahde
Hi, I just applied v.4.0.1 for the D10 jump and the Upgrade Status module's scan gives:
CDN 4.0.1
Scanned on Wed, 05.07.2023 - 10:24.
2 errors found. 17 warnings found.web/modules/contrib/cdn/cdn.module:
LINE│ 53 │ Call to deprecated function file_create_url(). Deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface instead.
LINE │ 53 │ Call to deprecated function file_url_transform_relative(). Deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use Drupal\Core\File\FileUrlGenerator::transformRelative() instead.web/modules/contrib/cdn/tests/src/Kernel/CdnStreamWrapperConstraintValidatorTest
.php:
LINE│ 31 │ Call to deprecated method prophesize() of class PHPUnit\Framework\TestCase: https://github.com/sebastianbergmann/phpunit/issues/4141...and a dozen of other prophesize() depreprecation errors plus:
web/modules/contrib/cdn/cdn_ui/src/Form/CdnSettingsForm.php:
LINE │ 90 │ The 'cdn_ui/summaries' library is not defined because the defining extension is not installed. Cannot decide if it is deprecated or not.So it seems the
file_url_transform_relative(file_create_url($uri))
issue is still there as well as some test and library related issues.Cheers and thanks for all the great work!
-Marika - 🇫🇮Finland zHelmet
Patch to fix deprecated file_url_transform_relative in 4.x-dev branch
- First commit to issue fork.
- Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Not currently mergeable. - Status changed to Needs review
over 1 year ago 6:20pm 20 July 2023 - last update
over 1 year ago 228 pass, 2 fail The last submitted patch, 7: 4.x-dev-3296718-deprecated-functions.patch, failed testing. View results →
- First commit to issue fork.
- Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Not currently mergeable. - last update
over 1 year ago 427 pass - Status changed to Needs work
over 1 year ago 3:26pm 22 September 2023 - 🇫🇷France MΙΧALIΣ Nantes
This patch failed. In the file FileUrlGenerator, the transformRelative isn't a static function, just a public.
So when I test this patch, I have an error like this : "Error: Non-static method Drupal\Core\File\FileUrlGenerator::transformRelative() cannot be called statically in {closure}() (line 54 of modules/contrib/cdn/cdn.module). " - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
https://www.drupal.org/project/cdn/releases/4.0.1 → is passing tests against Drupal 10.1.
So why is this necessary?
- Status changed to Closed: duplicate
about 1 year ago 11:10am 22 December 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The only actual bug was fixed in 🐛 Call to Deprecated Function 'file_url_transform_relative()' RTBC .
The
void
return type hints were added in 📌 Adopt GitLab CI: PHPStan compliance + test against 9.5/10.0/10.1/10.2/11.x + max PHP version Fixed .