Problem/Motivation

THis issue is to deprecate HAL module as accepted in #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10. I created this child issue of #3049857: Remove HAL module from core and create a contrib project for it because we agreed we should deprecate, then remove after that.

Currently postponed on:

#3263654: Move all HAL tests to the module in preparation of removal in D10
#3265546: Drupal\KernelTests\Config\DefaultConfigTest throws deprecation notice for deprecated Core modules/themes which have config

Steps to reproduce

n.a.

Proposed resolution

Mark module as deprecated.

Remaining tasks

Move tests
Migration - N/A
Update - N/A
Database dumps - anything to do here? Database dump/fixture changes _are_ needed, but (I think by default) only in the actual removal issue. That's already in the MR over there #3049857: Remove HAL module from core and create a contrib project for it.
Contrib project HAL - created

Create a followup, remove HAL from core, in the next major release #3049857: Remove HAL module from core and create a contrib project for it
Deprecate HAL, adding @legacy to tests. Happening in this very issue.

User interface changes

n.a.

API changes

HAL is removed?

Data model changes

n.a.

Release notes snippet

HAL was introduced during the development of D8. However, it never got much traction in the decoupled scene due to the vague specification and the particular quirks of the Drupal implementation. As a result few sites are using HAL in production. This speaks not to its usefulness, but to its worthiness to be shipped with core.

Additionally, JSON:API in core offers a superset of features over HAL. Starting Drupal 9.4 HAL is deprecated and the module is moved to contrib at https://drupal.org/project/hal. If you need the functionality provided bij HAL, starting from Drupal 10 you need to include the contrib module.

Issue fork drupal-3263618

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bbrala created an issue. See original summary.

bbrala’s picture

Status: Active » Needs review

bbrala credited Spokje.

bbrala’s picture

bbrala’s picture

Issue summary: View changes
spokje’s picture

- Added draft CR
- Added lifecycle_link entry linking to above CR

Note: The link to the contributed HAL module (https://www.drupal.org/project/hal) currently returns a 403.
Also unsure if it's supposed to link to a CR, I see that the Tracker module opted for a link to https://www.drupal.org/about/core/policies/core-change-policies/deprecated-and-obsolete-modules-and-themes

larowlan’s picture

I was of the impression that the lifecycle links where to go to handbook pages, not CRs

Check the forum and tracker deprecation issues to see the handbook page they're using in the lifecycle link

spokje’s picture

I was of the impression that the lifecycle links where to go to handbook pages, not CRs

If that is indeed the official policy, I'll happily comply.
And in the process, that would answer #3261679-7: Deprecate tracker module in Drupal 10.1.x and #3261452-14: [11.x] Remove tracker module from core.

So if Somebody With The Power could confirm, that would be a lot of birds with a pebble kinda thing.

larowlan’s picture

Yeah let's use https://www.drupal.org/about/core/policies/core-change-policies/deprecat...

I'll fix up the forum one - I added a new one because I couldn't find an existing one

larowlan’s picture

And yeh, I think we should link to the node/{nid} instead of the path alias just to be safe

bbrala’s picture

Add larowlan to credit for help with doc page, review and placement.

spokje’s picture

Title: Deprecate HAL module » [PP-1 ]Deprecate HAL module
Status: Needs review » Postponed
spokje’s picture

Title: [PP-1 ]Deprecate HAL module » [PP-1] Deprecate HAL module
Issue summary: View changes
spokje’s picture

Title: [PP-1] Deprecate HAL module » Deprecate HAL module
Assigned: Unassigned » spokje
Status: Postponed » Needs work
spokje’s picture

@bbrala, @larowlan: This would be an excellent time to get https://www.drupal.org/project/hal filled with the current core hal module.

spokje’s picture

Version: 9.4.x-dev » 10.0.x-dev

This going to get in against 10.0.x-dev first, and insta-backported to 9.4.x-dev like any other issue in the current queue.

spokje’s picture

Assigned: spokje » Unassigned
Status: Needs work » Needs review

This is going to get in against 10.0.x-dev first, and insta-backported to 9.4.x-dev like any other issue in the current queue.

spokje’s picture

Assigned: Unassigned » spokje
Status: Needs review » Needs work
spokje’s picture

Title: Deprecate HAL module » [PP-1] Deprecate HAL module
Status: Needs work » Postponed

As can be seen in https://www.drupal.org/pift-ci-job/2323653 the tests in core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php trigger a deprecation notice whenever a Core module with config is deprecated.

Postponing on the newly created #3265546: Drupal\KernelTests\Config\DefaultConfigTest throws deprecation notice for deprecated Core modules/themes which have config where we're going to solve this.

larowlan’s picture

Added you to the contrib project @Spokje so we're not a blocker

If you beat us to it, please use a subtree split so we keep the history

spokje’s picture

Added you to the contrib project @Spokje so we're not a blocker

@larowlan Erm....thanks? As I've proven many times before (especially on these deprecate/remove Core module issues) I'm quite capable of creating my own blockers ;)

If either you or @bbrala can do this, that would be great. I'll see what I can do/understand of all this git-wizardy and contrib module creation shizzle if this becomes the only blocker (which would be around 63.0.x-dev by the looks of it...)

bbrala’s picture

No worries, i'll make the time to do the subtree split to the hal module. But i think i need to wait until this is green? Or is the failure fully outside hal and shouldn't we worry about it (in regards to the subtree split)

spokje’s picture

Thanks @bbrala.

The failure is fully outside hal (and about deprecation, which isn't happening in the Contrib hal module).

So: Split the subtree, you can!

spokje’s picture

@bbrala and @larowlan Just discovered #3264633-18: Remove \Drupal\layout_builder\QuickEditIntegration and refactor it so that quickedit contrib provides the integration with layout builder which means it seems smarter to wait for that issue to land before contribifying to prevent double work (and Yet Even More Admin with double issues in Core and Contrib).

bbrala’s picture

I just did a subtree split for hal (awww xD), but can always just force push a new split since there was no real work done yet.

bbrala’s picture

Well, tests work in contrib (although, 217 coding standard issues ;p).

quietone’s picture

Issue summary: View changes
Status: Postponed » Needs work

No longer postponed, #3263654: Move all HAL tests to the module in preparation of removal in D10 has been committed.

Setting to NW because of a failing test. I notice the lifecycle_link is https://www.drupal.org/node/3223395#s-hal should it not be the CR for this issue?

I'm adding to the remaining tasks with some of what is under discussion in #3266219: [policy, no patch] Document the approach and issue scope for removing modules from core just to give them a test and see how it goes.

quietone’s picture

Title: [PP-1] Deprecate HAL module » Deprecate HAL module
Issue summary: View changes

Forgot to change the title.

spokje’s picture

Title: Deprecate HAL module » [PP-1] Deprecate HAL module
Status: Needs work » Postponed
Related issues:

Thanks @quietone.

Sadly putting back to postponed on #3265546: Drupal\KernelTests\Config\DefaultConfigTest throws deprecation notice for deprecated Core modules/themes which have config.4

I notice the lifecycle_link is https://www.drupal.org/node/3223395#s-hal should it not be the CR for this issue?

We decided to go to the d.o. page here: #3263618-10: Deprecate HAL module

spokje’s picture

Related issues:
spokje’s picture

Issue summary: View changes

Went through the remaining tasks (thanks @quietone) and updated them

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes

Sorry for the noise, updated the IS again and updated the Currently postponed on: section.

catch’s picture

Title: [PP-1] Deprecate HAL module » Deprecate HAL module
Status: Postponed » Needs review

Let's see.

spokje’s picture

Assigned: spokje » Unassigned

TestBot green.

Tagging with 9.4.0 release notes (just because I'm an optimist).

This looks like (well...actually is) a _huge_ MR, but it all boils down to:

  • Adding a lifecycle: deprecated and accompanying lifecycle_link to core/modules/hal/hal.info.yml.
  • Tagging all tests in the hal module with @group legacy to make PHPStan happy.
daffie’s picture

Status: Needs review » Needs work

Both Mr's look good. Just a single question.

catch’s picture

Status: Needs work » Needs review

Should this not be: lifecycle: obsolete?

Obsolete is only for when a module is gutted and needs to stay in core so it can be uninstalled. Examples would be entity reference. A non-standard example is simpletest where we provided a contrib version but also added an update to uninstall it in core (since it's a dev dependency and should never have been installed on anyone's live site anyway). So it exists purely because you can't uninstall and remove a module in a single release, you have to remove the .info.yml only once you know that the uninstall has run on every possible site.

For modules we're moving to contrib, we can't/won't uninstall the module for people automatically. They either need to uninstall it themselves before updating to 10.0.x, or install the contrib module, so 'deprecated' is correct, even right up until removal. If someone updates without taking any action, they'll get a big error message, but that error message is what we need for that case.

daffie’s picture

Status: Needs review » Reviewed & tested by the community

@catch Thank you for the explanation.

All code changes on both MR's look good to me.
For me it is RTBC.

Bye bye HAL module.

spokje’s picture

Thanks @daffie for the review and @catch for the reply. Resolved thread.

spokje’s picture

Status: Reviewed & tested by the community » Needs review

BTW: MR!1799 against 9.4.x is outdated, or at least not correct IMHO.

Although technically that branch wouldn't need to tag all the tests in the hal module with @group legacy (since no PHPStan there), I think they still should be marked as such.

A straight backport of MR!1853 would apply and do the above.

spokje’s picture

Status: Needs review » Reviewed & tested by the community

Unwanted (Dear Lord, _VERY_ unwanted) Status change, back to RTBC

catch’s picture

This looks great. I'm planning to commit it as soon as there's a stable release on https://www.drupal.org/project/hal

bbrala’s picture

I promised to roll one tonight ;)

bbrala’s picture

As promised: drupal/hal@1.0.0.

What i've done:

  1. Composer require in Drupal core 9.4.x-dev and enable hal and test if I can request HAL with the optional config on a node.
  2. Composer require in Drupal core 10.0.x-dev with the removal patch applied and test if I can request HAL with the optional config on a node.

Think that is all I needed to do.

  • larowlan committed f26bc10 on 9.4.x
    Issue #3263618 by Spokje, bbrala, larowlan, catch, daffie, quietone:...
larowlan’s picture

Version: 10.0.x-dev » 9.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed f26bc10 and pushed to 9.4.x. Thanks!

Published changed record

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.