Problem/Motivation
Steps to reproduce
Do an update with composer from the alpha version to the 2.0 version.
Then do a "composer show drupal/recaptcha_v3" and you get this error:
composer show drupal/recaptcha_v3
name : drupal/recaptcha_v3
descrip. : The reCaptcha V3 module provides integration with Google reCaptcha V3 and CAPTCHA module.
keywords :
versions : * 2.0.0
type : drupal-module
license : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://www.drupal.org/project/recaptcha_v3
source : [git] https://git.drupalcode.org/project/recaptcha_v3.git 2.0.0
dist : [zip] https://ftp.drupal.org/files/projects/recaptcha_v3-2.0.0.zip 2.0.0
path : C:\xampp\htdocs\site9\web\modules\contrib\recaptcha_v3
names : drupal/recaptcha_v3
support
source : https://git.drupalcode.org/project/recaptcha_v3
error : require.drupal/captcha : invalid version constraint (Could not parse version constraint ^2.0': Invalid version string "^2.0'")
requires
drupal/captcha *
drupal/core ^9.5 || ^10Remark the error of requiring drupal/captcha.
The error is in composer.json. The version string should be "^2.0" and not "^2.0'". There is an apostroph too many.
This error was allready in the alpha version.
In fact, the result is that there is no constraint of any version of captcha. All versions are permitted.
Proposed resolution
There is no difference anymore between 1.1 and 2.0 versions of the captcha module
version 1.11 = 2.01
version 1.12 = 2.03
version 1.13= 2.04 and
version 1.14 = 2.05.
So, the requirements of captcha in this composer.json could be ^1.11 || ^2.01
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork recaptcha_v3-3381952
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ericvlComment #3
ericvlComment #7
dench0@EricVL
Thanks for the heads up.
Comment #8
ericvl@dench0
Thank you for the quick fix but I think many people has still have the version 1.* of captcha running because they had no reason to change to the 2.x version. Narrowing the version capabilities to only 2.x will need to update captcha too and maybe they don't want to because of other reasons (e.g. a module that needs 1.* of captcha).
Is there a reason that this module should NOT work with 1.* of captcha?
Greetings
Comment #9
dench0@EricVL
The 2.x version is designed to work with the captcha 2.x version.
You need to use 8.x-1.x version of the reCAPTCHA V3 for the 8.x-1.x version of the captcha module.
Comment #10
ericvl@densh0
Thank you for the clear explanation. My confusion was due to the above issue that all versions of captcha could be a dependency of recaptcha v3 See the requirements in the "composer show" command. This is of course wrong. Thank you.
But what I'm seeing now is that you have released the new 2.0.1 version on the same git version of 2.0.0. See the repository graph.
A compare between 2.0.1 and 2.0.0 gives nothing at all.
The fix is done in a later git version but the tag is on the same version as 2.0.0 is.
Sorry to bother you again but can you fix this?
Thank you for your patience.
Comment #11
dench0oh, sorry, my bad.
I pushed the tag without previously pulling the changes.
I created a new release by tagging the correct commit.
Thanks.