Remove Book module from comments not in tests

Created on 18 December 2023, 9 months ago
Updated 12 February 2024, 7 months ago

Problem/Motivation

Remove book from comments in preparation for deprecating the module

Steps to reproduce

$ grep --exclude-dir={fixtures,book,node_modules,vendor,themes} -ri ".*\*.*book.*" core | grep -vi migrat |  grep -iw book | awk -F: '{print $1}' | sort -u | nl
     1  core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
     2  core/lib/Drupal/Core/Controller/ControllerBase.php
     3  core/lib/Drupal/Core/Database/Connection.php
     4  core/lib/Drupal/Core/Entity/entity.api.php
     5  core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php
     6  core/lib/Drupal/Core/Form/FormBase.php
     7  core/lib/Drupal/Core/Menu/menu.api.php
     8  core/lib/Drupal/Core/Password/PhpPassword.php
     9  core/lib/Drupal.php
    10  core/modules/block/block.api.php
    11  core/modules/comment/comment.module
    12  core/modules/comment/tests/src/Functional/CommentBookTest.php
    13  core/modules/field/src/Entity/FieldStorageConfig.php

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
BookΒ  β†’

Last updated about 13 hours ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @pwolanin
Created by

πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

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

Merge Requests

Comments & Activities

  • Issue created by @quietone
  • Merge request !5854Remove book module from comments β†’ (Closed) created by quietone
  • Status changed to Needs review 9 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand
  • Status changed to RTBC 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Applied the MR and ran the search and there are 4 returns

    1 core/lib/Drupal/Core/Database/Connection.php = Not related to module
    2 core/lib/Drupal/Core/Password/PhpPassword.php = Not related to module
    3 core/modules/comment/comment.module = Not related to module
    4 core/modules/comment/tests/src/Functional/CommentBookTest.php = IS related to the module

    I'm making an assumption that CommentBookTest will be fixed when tests are moved.

  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    I'm making an assumption that CommentBookTest will be fixed when tests are moved.

    It is being done in πŸ“Œ Move non-migration book-related tests to the Book module RTBC

  • Status changed to Needs work 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    MR no longer applies and needs rebasing.

  • Status changed to Needs review 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    There were conflicts in two files but it was straightforward.

  • Status changed to RTBC 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Rebase seems good.

  • Status changed to Needs work 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    test.sh from the hook_help accessibility issue has been accidentally added.

  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    Right, that is what happens when you make a simple change just before going to be.

    Should be fixed now.

  • Status changed to Needs review 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand
  • Status changed to RTBC 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    My mistake in #8, saw green.

    See test.sh is removed.

  • Status changed to Needs work 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States xjm

    This looks good overall. I left one suggestion on the MR for a comment that went weird, and another question.

    Thanks!

  • πŸ‡ΊπŸ‡ΈUnited States xjm

    Also, I looked at the remaining usages and I think we should also update this bit from comment.module:

    * Users can post comments to discuss a story, collaborative book page, user    
     * etc.  
    
  • πŸ‡ΊπŸ‡ΈUnited States xjm

    Also, this issue seems to address docblock comments, but there are still a number of inline comments that also reference the book module:

    [ayrton:drupal | Sun 10:18:18] $ grep -ri "\bbook\b" * | grep "//" |  grep -v "core/modules/book" | grep -v "vendor" | grep -v "node_modules" | grep -vi "migrate"
    core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php:    // Simulate starterkit_theme defining the book-navigation library.
    core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php:    // Activate the theme that extends the book-navigation library in
    core/lib/Drupal/Core/Database/Connection.php: * @see http://php.net/manual/book.pdo.php
    core/lib/Drupal/Core/Password/PhpPassword.php: * @see https://www.php.net/manual/en/book.password.php
    core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php:        // (cf. http://www.libpng.org/pub/png/book/chapter08.html#png.ch08.div.2)
    core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php:    // Make sure the book node exists.
    core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php:    // Ensure that the Book module's node type does not have duplicated enforced
    core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php:      $descriptions[] = $this->t('The GD Library for PHP is enabled, but was compiled without support for functions used by the rotate and desaturate effects. It was probably compiled using the official GD libraries from the <a href="https://libgd.github.io/">gdLibrary site</a> instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See <a href="https://www.php.net/manual/book.image.php">the PHP manual</a>.');
    core/modules/views/tests/src/Kernel/TestViewsTest.php:    // `node.type.book` config entity is a config dependency.
    core/modules/views/tests/src/Kernel/TestViewsTest.php:    // `node.type.book` config entity is a config dependency.
    

    Some of those are not relevant, but others definitely reference the book module.

    Saving credits.

  • πŸ‡ΊπŸ‡ΈUnited States xjm
  • Status changed to Needs review 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    The usages in book in comments listed in #15 are all in tests and tests are done in separate issues. We have already done one πŸ“Œ Remove use of book in non profile and update tests Fixed . I just made one for the tests in #15, πŸ“Œ Remove usages of book module from tests Active .

    Updating the title for clarity.

  • Status changed to RTBC 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Changes appear to have been addressed.

    Liked the replacement of "my_module.settings" that should stand the test of time and any future deprecations.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Thanks folks.

    Looks good to me

    Committed to 11.x

  • Status changed to Fixed 7 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024