localgovdrupal / localgov

Installation profile for the LocalGov Drupal distribution.
GNU General Public License v2.0
82 stars 18 forks source link

Drupal 10 #480

Closed andybroomfield closed 10 months ago

andybroomfield commented 1 year ago

Drupal 10 is released today (14th December)!

We previously did discuss how to support Drupal 10 in #434, which resulted in a 3.x branch of the project and the profile specifically for Drupal 10. Some modules have now added Drupal 10 support in their current release https://github.com/localgovdrupal/localgov_alert_banner/pull/217 We also addressed deprecation issues in each modules.

I think we should now try to get each module as is working on Drupal 10, with support for Drupal 9/10. For the profile, I think it would be good if once all modules say they can support Drupal 10, that the profile also allows itself to be installed on Drupal 10. We can then concentrate Localgov 3.x on Drupal 10 specfic features, and address deprecations as discussed in #438 without holding up Drupal 10 support. This should allow council sites to update to Drupal 10 in a more seamless way.

Be interested in others thoughts.

ekes commented 1 year ago

I've just been doing a bunch of other (non LocalGov) modules. It's well worth installing https://github.com/palantirnet/drupal-rector on a local copy and running it against the modules to do the bulk of the work automatically.

stephen-cox commented 1 year ago

I've created issues in all the module and theme repos that have not been deprecated to track changes needed to support Drupal 10: https://github.com/issues?q=is%3Aopen+is%3Aissue+archived%3Afalse+user%3Alocalgovdrupal+Drupal+10+support

As I have time I will go through and test each module using Drupal Rector. At a minimum they will need a:

core_version_requirement: ^9 || ^10

There's a lot of modules to go through, so happy if others have time to help with this :smile:

stephen-cox commented 1 year ago

So far on this I have done:

Still to do

Have I missed anything?

stephen-cox commented 1 year ago

Anyone wanting to give this a whirl can do it:

composer create-project localgovdrupal/localgov-project --stability dev MY_PROJECT
stephen-cox commented 1 year ago

It's now possible to do a site install and enable the LocalGov Demo module; there are obvious bugs.

Next step is to try running the tests.

finnlewis commented 1 year ago

Note to self: test this again and consider how to share workload if possible.

finnlewis commented 1 year ago

Just testing this for the first time in a while with:

composer create-project localgovdrupal/localgov-project --stability dev MY_PROJECT
cd MY_PROJECT/
lando start
lando drush si localgov -y
lando composer require localgovdrupal/localgov_core:dev-feature/drupal-10 
lando drush si localgov -y

Getting:

Adding non-existent permissions to a role is not allowed. The incorrect permissions are "create document media", "create image media", "create remote_video media", "delete own document media", "delete own image media", "delete own remote_video media",
"edit any document media", "edit any image media", "edit any remote_video media", "edit own document media", "edit own image media", "edit own remote_video media".

finnlewis commented 1 year ago

Still an issue as far as we know, if anyone has a chance to take a look, comment here so we know.

stephen-cox commented 1 year ago

The site install issue should be fixed with https://github.com/localgovdrupal/localgov_core/pull/161/commits/ccbead2556fee2e8bcc18ca946cae6e3a5513404

stephen-cox commented 1 year ago

An update on the status of the Drupal 10 upgrade work:

There are now pull requests for all LocalGov Drupal modules that come with a standard site install. There are still a few failing tests, but I should be able to fix these with some help from @ekes.

We do need to decide how to get all the PRs reviewed and merged. I see 3 categories of PRs:

  1. Those that make minimal changes and will be merged into the current default branch; maintaining support for Drupal 9.
  2. Those that make functional changes and will be merged into the current default branch; maintaining support for Drupal 9.
  3. Those that will need a new major release dropping support for Drupal 9.

Category 1 PRs should be straightforward. PRs falling in the other categories will be more involved, although those in 3 are less of an immediate problem as they won't effect any current Drupal 9 sites.

A major issue is LocalGov Core falls into category 2 and most modules depend on this. This is due to the move from CKEditor 4 to 5. We need to resolve this as a priority.

We also need to decide when to do a first alpha release. Ideally this would be once all the PRs are merged, but we might be able to do this before then if there's a desire to get an alpha release out sooner.

Finally, we need help testing everything. I have spent my time fixing the automated tests, which have been picking up issues, but I know there are still bugs and need help finding and fixing them. Having people test the 3.x version and raise any issues found would be a good start.

stephen-cox commented 1 year ago

PRs adding Drupal 10 support

finnlewis commented 1 year ago

@ekes maybe we can group the projects / modules here as suggested as to which modules are D9/D10 compatible and which need separate major releases.

ekes commented 1 year ago
Module PR D9 dependencies / requirements
LocalGov Core https://github.com/localgovdrupal/localgov_core/pull/161 X 2.12.0 Permissions move to: Page components, Services, Paragraphs
Directories merged new branch 3.0.0-alpha
Paragraphs https://github.com/localgovdrupal/localgov_paragraphs/pull/126 X 2.3.0 except needs dependencies updated: Permissions added from Core
Events https://github.com/localgovdrupal/localgov_events/pull/93 Geo
Geo https://github.com/localgovdrupal/localgov_geo/pull/73 could make a branch already, there is the alternative branch that moves to geo_entity
Search https://github.com/localgovdrupal/localgov_search/pull/55 X 1.2.0
Search Solr https://github.com/localgovdrupal/localgov_search_solr/pull/12 X Search
Page Components https://github.com/localgovdrupal/localgov_page_components/pull/36 X 1.1.0 Permissions added from Core
Menu Link Group https://github.com/localgovdrupal/localgov_menu_link_group/pull/23 X 1.1.0
Guides https://github.com/localgovdrupal/localgov_guides/pull/107 X 2.1.0 except needs dependencies updated
News https://github.com/localgovdrupal/localgov_news/pull/85 X
Step by Step https://github.com/localgovdrupal/localgov_step_by_step/pull/78 X Ready except needs dependencies updated
Subsites https://github.com/localgovdrupal/localgov_subsites/pull/119 X Ready except needs dependencies updated
Services https://github.com/localgovdrupal/localgov_services/pull/212 X 2.1.0 Needs work, Permissions added from Core
Demo https://github.com/localgovdrupal/localgov_demo/pull/107
Open Referral https://github.com/localgovdrupal/localgov_openreferral/pull/39 X Ready needs another reviewer?
Workflows https://github.com/localgovdrupal/localgov_workflows/pull/54 X
andybroomfield commented 10 months ago

We released support for Drupal 10!