Problem/Motivation

Functional test coverage added for Drupal 11 surfaces several deprecation warnings in GitLab CI. The reported warnings reduce to five root causes, three of which are owned by Rivet:

  1. RivetAdminThemeSettingsTest does not declare the required #[RunTestsInSeparateProcesses] attribute.
  2. The test uses the deprecated @group rivet doc-comment metadata.
  3. Rivet installs Drupal core's deprecated Syndicate block.
  4. Rivet templates contain multiple uses of Twig's deprecated spaceless filter.
  5. Additional memory-cache and Archiver deprecations originate in Drupal core rather than Rivet.

The missing process-isolation attribute becomes an exception in Drupal 12:

https://www.drupal.org/node/3548485

The Syndicate block is deprecated in Drupal 11.2 and removed in Drupal 12 without a replacement:

https://www.drupal.org/node/3519248

Twig deprecated the spaceless filter in version 3.12:

https://twig.symfony.com/doc/3.x/filters/spaceless.html

The current functional test renders the affected routes, making these warnings visible, but it does not yet provide complete coverage for all affected Twig templates.

Steps to reproduce

  1. Check out the Rivet 1.1.x development branch.
  2. Install the development dependencies against Drupal 11.3 or later.
  3. Run: Drupal\Tests\rivet\Functional\RivetAdminThemeSettingsTest
  4. Observe deprecations for:
    • Missing #[RunTestsInSeparateProcesses].
    • PHPUnit doc-comment metadata.
    • The node_syndicate_block plugin.
    • The Twig spaceless filter in Rivet templates.

The test itself can pass its assertions while the test runner still reports deprecations.

Proposed resolution

Modernize the functional test metadata

  • Add #[RunTestsInSeparateProcesses] to RivetAdminThemeSettingsTest.
  • Replace the @group rivet annotation with #[Group('rivet')].
  • Continue running the functional test against both current and previous supported Drupal majors.

Remove the deprecated Syndicate block configuration

  • Remove config/install/block.block.rivet_syndicate.yml.
  • Remove block.block.rivet_syndicate from the theme's config_devel list.
  • Document that existing installations may still have active configuration for this block and must remove or replace it separately.
  • Do not add a replacement RSS block as part of this issue.

Remove deprecated Twig spaceless usage

  • Remove all spaceless filter usage from Rivet templates, not only the templates reached by the current functional test.
  • Use Twig whitespace-control syntax only where whitespace is significant to the rendered behavior.
  • Do not introduce a custom replacement filter.

Do not work around Drupal core deprecations

Warnings for cache.static, cache.backend.memory, plugin.manager.archiver, and ArchiverManager have no direct Rivet callers and are version-specific Drupal core behavior.

Do not suppress these warnings or add Rivet workarounds. If they remain reproducible on the current supported Drupal release, they should be investigated and reported upstream separately.

Regression testing

  • Run RivetAdminThemeSettingsTest against the current and previous supported Drupal majors.
  • Confirm the process-isolation and PHPUnit metadata warnings are absent.
  • Install Rivet on a clean Standard-profile site and confirm no rivet_syndicate block configuration is created.
  • Confirm the theme settings and affected front-end pages continue to return successful responses without the Syndicate deprecation.
  • Add coverage ensuring no Rivet Twig template uses the deprecated spaceless filter.
  • Exercise the whitespace-sensitive field and form templates and verify their rendered markup remains functionally equivalent.
  • Confirm the five region templates already reached by the functional test render without Twig deprecations.
  • Run PHPCS, PHPStan, Twig-related checks, and the GitLab CI pipeline.

Remaining tasks

  • [ ] Add PHPUnit attribute imports and class attributes.
  • [ ] Remove the deprecated Syndicate block install configuration.
  • [ ] Add an upgrade note for existing rivet_syndicate configuration.
  • [ ] Replace all Rivet spaceless usages.
  • [ ] Add complete regression coverage for the affected templates.
  • [ ] Run tests against supported Drupal 10 and Drupal 11 versions.
  • [ ] Confirm the targeted deprecations no longer appear in GitLab CI.
  • [ ] Open a merge request.

User interface changes

Fresh Rivet installations will no longer place the deprecated RSS Syndicate block in the footer.

Existing installations will not have their active block configuration deleted automatically.

No other intentional user interface changes are expected. Twig changes must preserve the existing rendered structure and behavior.

API changes

None.

Data model changes

The shipped default configuration for block.block.rivet_syndicate will be removed. Existing active configuration is unchanged.

Issue fork rivet-3636275

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

jwilson3 created an issue. See original summary.

jwilson3’s picture

Title: Fix tests and deprecations » Fix warnings and deprecations in tests

  • jwilson3 committed 159697bb on 1.1.x
    Issue #3636275 by jwilson3: Fix warnings and deprecations in tests
    
jwilson3’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

jwilson3’s picture

Assigned: jwilson3 » Unassigned

Status: Fixed » Closed (fixed)

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