Problem/Motivation

Track the steps needed to remove extension Statistics from core to contrib. See Remove a core module and move it to a contributed project of the deprecation policy.

The removal of extension Statistics was approved in #3266457: [Policy] Deprecate Statistics module in D10 and move to contrib in D11

Remaining tasks

  1. Done. Begin finding someone to maintain the contrib version of the extension. @fgm has agreed to maintain the contrib project.
  2. Done Move integrations implemented by other modules to the extension.
    Create child issues or child meta issues, as needed, to address the following points. Not all points will apply to all extensions.
    • Move non-migration tests to the extension. #3341098: Move non-migrations tests to Statistics
    • Move Help Topics to the extension. #3341019: Move help topics to statistics module
    • Remove the extension from one or more profiles. Statistics is not used is any core profiles.
    • Remove templates from the extension’s markup. Statistics does not have templates.
    • For a module, handle migrations, if the module has migrations.
      1. Copy the drupal 6 and drupal 7 test fixtures to the module so they remain independent of any core changes to the fixture.
      2. Migration yml and processes that are in the module move with the module to contrib.
      3. Move migration tests to the module. #3341053: Move migration tests to the Statistics module
      4. Keep all the assertions in core tests related to module as much as possible.
      5. Migration yml and processes that are outside the module but support the upgrade path for that module stay in core.
      6. The functional tests in migrate_drupal_ui will need to change.
      7. The drupal 6 and drupal 7 test fixtures stay the same.
  3. Done Do a thorough search of core for any remaining references to the extension. If references are found, outside of the extension, then create issues to remove the references.
    #3410210: Remove statistics module from comments
  4. Create the contrib project with a stable release. Follow the process in Create the contrib project with a stable release for creating the sub tree split.
  5. Deprecate the core extension. #3413917: Deprecate the Statistics module.

Comments

quietone created an issue. See original summary.

quietone’s picture

Issue summary: View changes

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

quietone’s picture

Issue summary: View changes
anybody’s picture

Any updates on this?

https://www.drupal.org/project/statistics still doesn't exist, and core issues for the statistics module are blocked.

(No hurry, just a friendly reminder as I wanted to implement a pseudo field for statistics (#3064152: Separate `statistics` pseudo field from the general `links` field))

quietone’s picture

Issue summary: View changes

I've been searching core for more instances and found the following that need to be investigated. The command I used was

grep --exclude-dir={vendor,node_modules,statistics} -riw 'statistics' core | grep -vi migrat | grep -vi "drupal[6|7].php" | nl

which I gradually reduced to

grep --exclude-dir={vendor,node_modules,statistics,comment,views,views_ui,forum,update,locale} -riw 'statistics' core | grep -vi migrat | grep -vi "drupal[6|7].php" | nl

https://git.drupalcode.org/project/drupal/-/blob/11.x/core/assets/scaffo...
https://git.drupalcode.org/project/drupal/-/blame/11.x/core/lib/Drupal/C...
https://git.drupalcode.org/project/drupal/-/blame/11.x/sites/default/def...
https://git.drupalcode.org/project/drupal/-/blame/11.x/core/modules/trac...
https://git.drupalcode.org/project/drupal/-/blame/11.x/core/modules/syst...

quietone’s picture

Issue summary: View changes
catch’s picture

quietone’s picture

Issue summary: View changes
fgm’s picture

About step 1: "Begin finding someone to maintain the contrib version of the extension", since statistics happens to tie in with actual work I have for this year, I volunteer for that role.

As mentioned on #3341091: [11.x] [Meta] Tasks to remove Statistics, I created the subtree split, and pushed it to https://github.com/fgm/statistics until the contrib project can be created, at which point I'll push it there.

quietone’s picture

Issue summary: View changes

Changed the parent of #3416612: [11.x] Remove statistics from htaccess to the removal meta issue because the change to .htaccess would break existing sites using Statistics.

quietone’s picture

I found another usage in a test, \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\DestinationCategoryTest. When the color module was removed from core this test was changed, it was not done as part of the deprecation of the module. I have added it to the removal issue

quietone’s picture

@fgm, thank you for working on the creation of the contrib project!

quietone’s picture

Issue summary: View changes
quietone’s picture

fgm’s picture

The contrib Statistics project now has a build working for both 10.3.x and 11.x. Time to create a release ?

catch’s picture

@fgm a statistics release would be great - once we've marked statistics deprecated, we can move onto the next step of updating database fixtures for Drupal 11.

fgm’s picture

@catch: does it have to be a 1.0.0, or would a beta be good enough ? I'm a bit wary of creating a stable release without a testing period. But if it's necessary for core to move on, no big deal.

catch’s picture

@fgm it needs to be a stable release before 10.3.0 is released so that people can actually update to it from core smoothly. Fine to have a short beta window before that of course.

fgm’s picture

quietone’s picture

Status: Active » Fixed

Unfortunately, I only noticed that there was a Statistics beta release about two days ago. The issue to deprecate was updated and committed 11 hours ago.

So, this part of the process is complete! This is also the last extension to be deprecated in 10.3.x

Thanks everyone!

Status: Fixed » Closed (fixed)

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

quietone’s picture

Version: 11.x-dev » 10.3.x-dev