Problem/Motivation

Key is in a transition as 2.x is developed (currently on alpha 1). Drupal 12 is coming in December. What are the Key maintainers' plans to support Drupal 12? Will support be added to 2.x only, or 1.x as well?

People are contributing Drupal 12 fixes for both 2.x and 1.x at the moment, so it would be great to get clarity on this to avoid wasted work.

Comments

ptmkenny created an issue. See original summary.

tbcs’s picture

One data point for the 1.x question: the AI module requires drupal/key ^1.18 on every branch, including 1.5.1 and 2.0.x, so a site that uses an AI provider can't move to Key 2.x. On Drupal 12, Key 8.x-1.22 fails as soon as KeyPluginManager is constructed:

Drupal\key\Plugin\KeyPluginManager only supports annotation-based discovery, which is no longer supported as of Drupal 12.0. Provide an Attribute class and an Annotation class for BC. See https://www.drupal.org/node/3395582

So for those sites, Drupal 12 needs either attributes on 1.x (#3484086, !34) or an AI release that allows Key 2.x. !73 declares Drupal 12 for 8.x-1.x without the attributes, so on its own it would let Drupal 12 sites install a 1.x that can't load its plugins.

We ran into this in the Drupal 12 CI job of Site Agent.

joseph.olstad’s picture

There currently is no 2.0.x dev release. I wouldn't even worry about 2.0.x as they're not talking about it.

What the issue is here is that the rector picked up the 2.0.x branch and wrote the Drupal 12 rector fixes for it and skipped doing it for 8.x-1.x .

This is a rector issue, I will flag bbrala about this on drupal slack channels in the #d12readiness channel.

joseph.olstad’s picture

Version: 2.0.x-dev » 8.x-1.x-dev
ptmkenny’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

Hi as a co-maintainer of Encrypt, Field Encrypt, and other modules that are built on Key that needs to know to decide how we will be upgrading other Key ecosystem modules, please allow me to ask the maintainers for their decision.

joseph.olstad’s picture

Version: 2.0.x-dev » 8.x-1.x-dev

This is more about a bug in the rector than anything. I reached out to @bbrala and he found the issue. A drupal 12 rector fix is coming soon which will make it easy to upgrade 8.x-1.x.

joseph.olstad’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

joseph.olstad’s picture

Public knowledge, there's no such thing as can't. If a dependency is pinned to another major there are several ways to resolve.

  1. There's version overides possible using composer require namespace/projectname:'2.0.0 as 1.22'; and also something much more powerful: replace
  2. The replace operator.

There's also several other possible solutions that I didn't mention.

ptmkenny’s picture

Status: Fixed » Needs review

@joseph.olstad Respectfully, do not close my issue that asks for maintainer comment unless you are a maintainer.

See, for example, #3483550: Add support for PHP attributes and require Drupal 10.2, where a maintainer suggests that attributes may not be added to 1.x. This was awhile ago so thinking may have changed, but I am seeking clarity on this specific point. If you found a bug in rector, great, report that in a different issue and don't close this one.

japerry’s picture

Status: Needs review » Closed (works as designed)

1.x will support Drupal 12.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.