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

Issue fork drupal-3409407

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

quietone created an issue. See original summary.

quietone’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

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.

quietone’s picture

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

It is being done in #3376271: Move non-migration book-related tests to the Book module

longwave’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

MR no longer applies and needs rebasing.

quietone’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

There were conflicts in two files but it was straightforward.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Rebase seems good.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

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

quietone’s picture

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

Should be fixed now.

quietone’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

My mistake in #8, saw green.

See test.sh is removed.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

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

Thanks!

xjm’s picture

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.  
xjm’s picture

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.

xjm’s picture

Title: Remove book module from comments » Remove Book module from comments
quietone’s picture

Title: Remove Book module from comments » Remove Book module from comments not in tests
Status: Needs work » Needs review

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 #3376369: Remove use of book in non profile and update tests. I just made one for the tests in #15, #3414637: Remove usages of book module from tests.

Updating the title for clarity.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Changes appear to have been addressed.

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

  • larowlan committed 7aaa7533 on 11.x
    Issue #3409407 by quietone, smustgrave, xjm, longwave: Remove Book...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks folks.

Looks good to me

Committed to 11.x

Status: Fixed » Closed (fixed)

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