Support Voting API ^4.0

Created on 25 May 2025, about 1 month ago

Problem/Motivation

Version 2 requires Votingapi ^3.0.
Voting api 8.x-3.x does not support Drupal 11. New release is v4 that supports D11.
See: #3451390 📌 Automated Drupal 11 compatibility fixes for votingapi Needs review

Steps to reproduce

Proposed resolution

Add ^4.0 as a possible version of voting api

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @pearls
  • Pipeline finished with Success
    29 days ago
    Total: 192s
    #506521
  • Merge request !15Resolve #3526489 "Support voting api" → (Open) created by Unnamed author
  • Pipeline finished with Success
    29 days ago
    Total: 165s
    #506605
  • 🇮🇳India daljeet-kaur

    Hi kul.pratap

    I tested your changes, and upon enabling the Like & Dislike module (version 2.x-dev), I encountered a fatal error in the configuration form (SettingsForm.php).

    error:
    ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/d10-new/modules/custom/like_and_dislike/src/Form/SettingsForm.php on line 57 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 43 of /var/www/html/d10-new/core/lib/Drupal/Core/Form/ConfigFormBase.php).

    I have implemented a patch to resolve this issue.

    Thank you!

  • Pipeline finished with Success
    29 days ago
    Total: 253s
    #506868
  • 🇮🇳India kulpratap2002

    I have updated the MR with the patch.

  • Thanks @kul.pratap.
    MR15 worked for me.
    Drupal version : 11.1.7
    VotingApi: dev-4.0.x #010514d0b35e4790faef182a466a0acd82016d22

  • 🇧🇷Brazil adrianopulz Florianópolis

    Trying to install the fork version by composer, I had the issue:

    drupal/like_and_dislike dev-3526489-support-voting-api requires drupal/votingapi ^3.0 || ^4.0 -> found drupal/votingapi[dev-3.x, dev-4.0.x, 3.0.0-alpha2, ..., 3.x-dev (alias of dev-3.x), 4.0.x-dev (alias of dev-4.0.x)] but it does not match your minimum-stability.

    Is not the dev version 4.0.x-dev the correct version?

  • 🇧🇷Brazil adrianopulz Florianópolis

    Never mind, I didn't remember to fix the composer minimum stability to allow DEV. Worked now.

    composer config minimum-stability dev

Production build 0.71.5 2024