- 🇮🇳India prashant.c Dharamshala
The patch is not applying on Drupal 10.1.x
drupal-check shows a few minor issues:
------ --------------------------------------------------------------------------------------------------------------------------- Line src/EncryptionTrait.php (in context of class Drupal\encryption\EncryptionService) ------ --------------------------------------------------------------------------------------------------------------------------- 43 Method Drupal\encryption\EncryptionService::encrypt() should return string|null but return statement is missing. 75 Method Drupal\encryption\EncryptionService::decrypt() should return string|null but return statement is missing. 101 Method Drupal\encryption\EncryptionService::getEncryptionKey() should return string|null but return statement is missing. ------ --------------------------------------------------------------------------------------------------------------------------- ------ -------------------------------------------------------------------------------------------------------------------------------------------- Line tests/src/Kernel/EncryptionServiceTest.php ------ -------------------------------------------------------------------------------------------------------------------------------------------- 24 Return type mixed of method Drupal\Tests\encryption\Kernel\EncryptionServiceTest::setUp() is not covariant with return type void of method PHPUnit\Framework\TestCase::setUp(). ------ --------------------------------------------------------------------------------------------------------------------------------------------
But by just making the following changes
core_version_requirement: ^8 || ^9 || ^10
will make this module compatible with Drupal 10, do not see any other major changes to make it D10 compatible.It would be greatly appreciated if the module maintainers could create a release for Drupal 10 of this module. It is widely used on many websites and will be advantageous during the upgrade process from Drupal 8 or 9 to 10.
Thank you.
- 🇯🇵Japan tyler36 Osaka
Updated MR with latest recommendations from
drupal/upgrade_status": "^4.0"
.MR installed on Drupal
10.0
- First commit to issue fork.
- @shivam_tiwari opened merge request.
- Status changed to Needs review
over 1 year ago 10:33am 24 April 2023 - Status changed to Needs work
over 1 year ago 10:33am 28 April 2023 - 🇮🇳India prashant.c Dharamshala
Throws the following error:
Deprecated function: base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\encryption\EncryptionService->getEncryptionKey() (line 98 of modules/contrib/encryption/src/EncryptionTrait.php). Drupal\encryption\EncryptionService->getEncryptionKey() (Line: 43) Drupal\encryption\EncryptionService->encrypt('simple test value') (Line: 54) encryption_requirements('runtime') call_user_func_array(Object, Array) (Line: 409) Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'encryption') (Line: 388) Drupal\Core\Extension\ModuleHandler->invokeAllWith('requirements', Object) (Line: 416) Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 109) Drupal\system\SystemManager->listRequirements() (Line: 49) Drupal\system\Controller\SystemInfoController->status() call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 44) Drupal\redirect_after_login\RedirectMiddleware->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 686) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- First commit to issue fork.
- Status changed to Needs review
over 1 year ago 10:25am 22 May 2023 - Status changed to RTBC
over 1 year ago 3:09pm 26 May 2023 - 🇳🇱Netherlands falco010 🇳🇱 The Netherlands
Successfully tested the above MR/fork & the deprecation error, in my opinion this is RTBC.
- 🇺🇸United States caspervoogt
#11 worked for me and comes back green in Upgrade Status. I have not yet updated to 10 but RTBC from me
- 🇮🇳India Parvateesam
Hello @maintainers:
Thanks for the patch, the patch provided for D10 compatibility is applied but while trying to upgrade Drupal core from 9.5.11 to 10.1.4 facing below problem. So is there any clue, to move forward. Also is there any update to be released D10 compatibility?
Problem 1 - Root composer.json requires drupal/encryption ^2.0 -> satisfiable by drupal/encryption[2.0.0]. - drupal/encryption 2.0.0 requires drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but it conflicts with your root composer.json require (10.1.4).
Thanks.
- 🇨🇦Canada davemybes Montreal
What appears to be happening with the patches is that even though the info.yml file is showing D10 compatibility, composer.lock is still registering it as D9 only, so composer won't actually do the upgrade. We need an actual release to be able to update to D10. The only alternative is to move the module into custom modules and not use composer to update it - at least until a proper release is out.
- 🇨🇦Canada TrevorBradley
@davemybes, there's a third option:
You can add the git repo for a contrib module into the repositories section of your composer.json:
{ "type": "package", "package": { "name": "drupal_git/encryption", "version": "2.0.0", "type": "drupal-module", "source": { "url": "https://git.drupalcode.org/project/encryption.git", "type": "git", "reference": "8.x-1.x" } } },
You can then composer require drupal_git/encryption, rather than drupal/encryption (in your require section), and then patch encryption in your extras => patches section, and it does work. This gets around the info.yml version requirement.
Example of this here: https://www.computerminds.co.uk/articles/apply-drupal-9-compatibility-pa...
- First commit to issue fork.
- @alejomc opened merge request.
- 🇬🇧United Kingdom ikit-claw
Thanks everyone I have made a new branch for the new changes.
Please try it and let me know if you have any issues.composer require 'drupal/encryption:^3.0'
- 🇮🇳India prashant.c Dharamshala
As we already have D10 version released and available for download and working fine, you may want to credit the people who made efforts to contribute and mark this issue as fixed.