Hi,
Updating Fivestar to latest dev gives me the following remark:

Requires: Voting API (>3.0-beta1) (incompatible with version )

I tried upgrading Voting API to latest dev, but requirement stays the same, and no solution.
There is no official release of Voting API higher than 3.0-beta1.

How do I proceed please?
greetings, Martijn

Comments

Summit created an issue. See original summary.

tr’s picture

Category: Bug report » Support request

Yes, the -dev release of Fivestar now requires the -dev version of Voting API. See #3131954-8: Port tests to 8.x-1.x

This does work, and does install on the DrupalCI testbot, as you can see from the automated testing output: https://dispatcher.drupalci.org/job/drupal_contrib/191111/console

summit’s picture

Hi, I didn't get it to work using latest dev Voting Api.
I had to install Fivestar latest alpha with

composer require 'drupal/fivestar:^1.0'

then finally I was able to update my database and log in.

May be good to make the remark

Requires: Voting API latest dev (>3.0-beta1) (incompatible with current version )

greetings, Martijn

tr’s picture

Giving up is rarely a good solution. The beta1 version of Voting API is more than 1.5 years old, and you will encounter many problems using it. You really do need to try to install the -dev of the Voting API. Likewise, Fivestar has made a lot of improvement recently so it would really be best if you could use the -dev of Fivestar. A new Fivestar release won't be made until there is a new Voting API release.

You didn't mention composer in your original post, and you didn't say where you saw that message.

But as I said installing Fivestar -dev in the testbot works - the testbot uses composer, and the testbot correctly reads the dependency of Voting API > 3.0-beta1 and determines that the -dev version of the Voting API needs to be used. You can see all of this in the link I posted above.

I also tested installing Fivestar -dev on simplytest.me, which uses composer I think, or a combination of drush and composer maybe - they have made a lot of changes recently.

I also tested installing Fivestar -dev using git and enabling the modules either via drush or via the Drupal UI. This also works.

... and I did all these tests BEFORE adding this new requirement to Fivestar. All these things work.

If you are getting an error when installing with composer then you can use composer to find out WHY it can't install something. Fivestar doesn't provide a composer.json, so perhaps there is a problem with the core Drupal composer scaffolding. Or perhaps there is a problem with the Voting API composer.json. Or perhaps there is a bug in the way the new semantic versioning of modules is handled on drupal.org. Or perhaps the problem is how you're using composer on your site.

summit’s picture

I will investigate it further. Thanks for your thorough answer!

greetings, Martijn

mrweiner’s picture

@Summit If you previously required fivestar@alpha with composer, it would have added votingapi@beta to composer.lock. Since fivestar@dev changes the votingapi req it causes a conflict. You just need to run composer remove drupal/fivestar before running composer require drupal/fivestar:"1.x-dev" and you'll be good to go.

summit’s picture

Hi,
I did this. But still

drush updatedb
 [error]  Fivestar requires this module and version. Currently using Voting API version  (Currently using Unresolved dependency Voting API (Version >3.0-beta1 required)) 

 Requirements check reports errors. Do you wish to continue? (yes/no) [yes]:
 > n

I cancelled updating because of the error.

EDIT: I removed votingapi.dev and fivestar.dev. got lots of errors, now I am stuck on still this error
I installed Votingapi and Fivestar again, still this error.
How should I proceed please?

EDIT2: I rolled back to Fivestar Apha1, no problems.
So now I have Votingapi.dev and Fivestar Alpha1. Fivestar.dev not working correct.

Greetings,

tr’s picture

I have Fivestar -dev and Voting API -dev installed and running.

Yes, I also see that error when I run drush updatedb. When it asks Do you wish to continue? (yes/no) [yes]: If you reply "yes" then everything still works.

This appears to be a long-standing bug in core Drupal: #1013302: Composer metadata on dev versions doesn't work in update.php

Also see #3056417: Compatibility Issue with Chaos Tools and #3102426: Drush don't recognize current version of ctools.

To make the error go away, you can replace this line in fivestar.info.yml:
- votingapi:votingapi (>3.0-beta1)
with this:
- votingapi:votingapi
BUT YOU STILL NEED TO USE Voting API -dev ! This will just make the error go away.

summit’s picture

Hi,
Thanks! I will replace that line. The problem is that in my production site I cann't use Composer, and than update.php breaks I think.
Good to know it is not a error of Fivestar itself.
greetings, Martijn

joum’s picture

I have both VotingAPI 3.x-dev and Fivestar 1.x-dev installed via composer and I confirm that updating with Drush works (if you choose to ignore the warning).

Although, update.php is stuck and doesn't allow for updates due to this warning.

I'll try to post a patch here for the time being so that the issue doesn't affect people who need to deploy and don't have drush access.

joum’s picture

Here's the patch.

tr’s picture

As explained in #3131954-8: Port tests to 8.x-1.x, which I linked to above, the 1.5 year old beta of Voting API will not work in PHP 7.3, so we need to use the -dev version where that problem has been fixed.

You could help out in the Voting API issue queue in the meantime, to try to get a new release of the Voting API so we don't have to do this, but your patch in #11 will just break sites and will break the Fivestar tests.

tr’s picture

Status: Active » Postponed (maintainer needs more info)

I don't think this should be an issue anymore now that Voting API has a new release. If you continue to have this problem with the latest -dev of Fivestar and the new Voting API release, then please post additional information.

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

No further issues since the new Voting API release.