Problem/Motivation

Explore needed workarounds to get a build to pass on 8.7 and 8.8 without deprecation suppression and evaluate.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

mikelutz created an issue. See original summary.

mikelutz’s picture

StatusFileSize
new32.12 KB

Initial patch from #2952526-13: Make the 8.7 build pass without deprecation warnings for a baseline, and a commit to filter those changes out once that issue gets in.

mikelutz’s picture

StatusFileSize
new33.04 KB
new943 bytes

My patch put the drupalci file in the wrong place, oops.

So here's the baseline.

mikelutz’s picture

StatusFileSize
new36.3 KB
new3.26 KB

And here's a batch for 8.8 that should fix a lot.

mikelutz’s picture

StatusFileSize
new37.7 KB
new2.09 KB

Last deprecation is actually in the address module. I opened #3089266: AddressDefaultFormatter must implement \Drupal\Core\Security\TrustedCallbackInterface as of Drupal 8.8, but you can safely skip that deprecation for now, assuming address will be updated before 9.0.x is supported.

Here's a patch to suppress that deprecation. We use the custom error handler here rather than using @group legacy and @expectedDeprecation for a few reasons:

  1. The affected tests are not legacy tests, typically @group legacy is for testing a project's internal deprecations, and should be removed along with the internal deprecated code that they test.
  2. @group legacy skips all deprecations including new ones that we may want to be informed about. The error handler skips only a specific deprecation that we know we want to suppress right now.
  3. adding @expectedDeprecation only tests that a specific deprecation is actually thrown and errors if it isn't, it does not complain if additional deprecations are thrown. Therefore using it here would cause the test to fail if/when a new address release is cut to fix the problem.
  4. adding the error handler to the base test allows us to skip that deprecation globally in one spot, and provides a place to inject other deprecations that we may want to skip in the future (note: This one was only triggered by Functional tests, so CommerceBrowserTestBase was sufficient, additional deprecations may need to go in the CommerceKernelTestBase if this ever comes up again)

This should cover tests on drupal.org. Travis is still complaining, I think because Travis is installing drupal/mailsystem as a dev dependency and d.org isn't, and there are additional deprecations around that. Going to test that next.

mikelutz’s picture

StatusFileSize
new38.01 KB
new317 bytes

Adding mailsystem as a dev requirement...

mikelutz’s picture

Status: Active » Needs work
mikelutz’s picture

Status: Needs work » Needs review
StatusFileSize
new42.19 KB
new7.13 KB

Hopefully this covers mailsystem and makes travis happy..

mikelutz’s picture

StatusFileSize
new42.25 KB
new488 bytes

Coding standard fix..

mikelutz’s picture

Status: Needs review » Needs work

No, of course I wasn't thinking. Those mailsystem deprecations are happening outside of my error handler in the browser test.. :-( back to the drawing board.

mikelutz’s picture

Status: Needs work » Needs review
StatusFileSize
new42.22 KB
new815 bytes

Looks like we need to wrap the entire setup.

mikelutz’s picture

StatusFileSize
new43.06 KB
new857 bytes

Okay, last test. As usual, I ended up in a rabbit hole, so let me know if you want this broken down somehow. If you commit #2952526: Make the 8.7 build pass without deprecation warnings I can pull those changes out and shrink this down quite a bit.

bojanz’s picture

mikelutz’s picture

StatusFileSize
new10.02 KB

Reroll. Note builds still fail on 7.3 and 8.9 due to #3089327: Make the testsuite pass on PhpUnit 7.

  • bojanz committed b65dcc0 on 8.x-2.x authored by mikelutz
    Issue #3089178 by mikelutz: Make the build pass against 8.8 without...
bojanz’s picture

Status: Needs review » Fixed

Opened #3089616: Require Drupal 8.8 with a note about removing workarounds added here.
Tweaked the new composer.json constraint to match the format of the other constraints.
And committed.

Thank you!

Status: Fixed » Closed (fixed)

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

kristen pol’s picture

Issue tags: +Drupal 9 compatibility

Per a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.