Drupal 9 and 10 compatibility

Created on 25 January 2023, about 2 years ago
Updated 27 January 2023, about 2 years ago

Problem/Motivation

The current version of this module is compatible with Drupal 8, which has reached EOL. It is not compatible with the currently supported versions, Drupal 9 and Drupal 10.

Steps to reproduce

Try to install the module on a site using Drupal 9 or Drupal 10.

Proposed resolution

Update the .info.yml file. Update the code as needed.

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

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

Comments & Activities

  • Issue created by @benjifisher
  • @benjifisher opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review about 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    I opened a merge request (MR). So far, the only change I have made is the version constraint in the .info.yml file.

    Static analysis (phpcs and phpstan) does not indicate any problems. phpcs wants to change true and false in the JavaScript file to upper case, but that is a bad idea. It also issues 5 copies of this warning:

    The class short comment should describe what the class does and not simply repeat the class name

    I have not tested the migration sub-module yet. In my tests so far, the main module works fine.

    Testing instructions

    Add a section under the repositories key in composer.json:

        "repositories": [
            {
                "type": "git",
                "url": "https://git.drupalcode.org/issue/gh_jobs-3336515",
                "only": ["drupal/gh_jobs"]
            },
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            },
    ...
        }
    

    The url value is the issue fork for this issue. Then install the branch for this MR:

    composer require drupal/gh_jobs:dev-3336515-drupal-9-10
    
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    Oops, I seem to have pasted the branch name into the title field.

  • Status changed to Needs work about 2 years ago
  • πŸ‡§πŸ‡·Brazil renatog Campinas

    In the .info now supports core 9 and core 10, not core 8

    What do you think to create a new branch

    2.0.x

    for that?

  • Status changed to Needs review about 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    I do not want to support Drupal 8. It reached EOL over a year ago.

    If anyone is still using Drupal 8, then they can continue to use 8.x-1.0-alpha1 of this module. I do not plan to un-publish that release.

  • πŸ‡§πŸ‡·Brazil renatog Campinas

    Got it. I was thinking about mark all the 8.x as "unsupported" including the dev-branch and keep the new one 2.0.x to D9+, but I agree that this definition is from maintainer to maintainer, so I think that's ok.

    About the MR seems good for me. But the steps on #3 worked for you?

    For me I'm getting this error:

    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/gh_jobs dev-3336515-drupal-9-10, it is satisfiable by drupal/gh_jobs[dev-3336515-drupal-9-10] from vcs repo (git https://git.drupalcode.org/issue/gh_jobs-3336515) but drupal/gh_jobs[dev-1.x, 1.0.0-alpha1, 1.x-dev (alias of dev-1.x)] from composer repo (https://packages.drupal.org/8) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.

    I'm not sure if is something on my side. This is my composer.json:

    P.S. I also tried to update the line 18 to the full url of issue fork: https://git.drupalcode.org/issue/gh_jobs-3336515.git but didn't work as well

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    I think I tested it. I put the issue fork first on purpose. You put it second and your error message says something about "higher priority repository".

    I plan to make an alpha release soon, so no one else will have to worry about it. Thanks for testing.

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    Reference: Repository priorities in the Composer docs.

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    I noticed some other problems with the module. I would like to manage them as separate issues: πŸ› Large IDs cause SQL errors Fixed and πŸ“Œ Handle API keys securely Fixed . So I will declare this issue fixed and update the dev branch.

  • Status changed to Fixed about 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024