Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LOBsTerr created an issue. See original summary.

LOBsTerr’s picture

Status: Active » Needs review
FileSize
5.93 KB
LOBsTerr’s picture

Issue tags: +Drupal 9 compatibility
Berdir’s picture

Status: Needs review » Needs work

This update the type hints but it still uses the old, deprecated services.

LOBsTerr’s picture

Status: Needs work » Needs review
FileSize
9.53 KB
4.71 KB

Thanks, missed it :( The patch and interdiff are attached

Berdir’s picture

Title: replace deprecated Drupal\user\PrivateTempStoreFactory with \Drupal\Core\TempStore\PrivateTempStoreFactory » Remove deprecations, compatibility with Drupal 9
Assigned: LOBsTerr » Berdir

Expanding the scope of this to all deprecations, it's hard to keep that in separate issues as they tend to conflict and it's hard to test that everything is covered.

Working on it a bit.

Berdir’s picture

Ok, this should fix everything except the config sync directory, which is a 8.8 deprecation and only used in tests.

This uses the new create pattern in a few places which allows us to avoid duplicating the parent constructor arguments and just assign what we need additionally. If we'd ever want to add unit tests for this then a setter method could be added for the additional properties, but that does seem very unlikely for these classes.

Status: Needs review » Needs work

The last submitted patch, 7: group-deprecations-3088226-7.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Berdir’s picture

Status: Needs work » Needs review
FileSize
28.88 KB

Ah, didn't think this through, so using the $this->entityTypeManager property in viewsData does require 8.8 obviously, so updating the version constraint and fixing everything.

It's up to @kristiaanvandeneynde to decide when to drop 8.7 support, I'll start doing that for my projects in march, FYI :)

Berdir’s picture

One more thing, didn't see that composer.json has a drupal/core requirement already, that's not really necessary anymore as it respects core_version_requirement automatically, but updating that too for now.

Status: Needs review » Needs work

The last submitted patch, 10: group-deprecations-3088226-10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Berdir’s picture

Status: Needs work » Needs review
penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, and all tests are passing.

+++ b/tests/modules/group_test/group_test.info.yml
@@ -2,8 +2,7 @@ name: 'Group test'
-version: VERSION
-core: '8.x'
+core_version_requirement: ^8.8 || ^9

+++ b/tests/modules/group_test_config/group_test_config.info.yml
@@ -2,7 +2,6 @@ name: 'Group configuration tests'
-version: VERSION
-core: '8.x'
+core_version_requirement: ^8.8 || ^9

+++ b/tests/modules/group_test_plugin/group_test_plugin.info.yml
@@ -2,8 +2,7 @@ name: 'Group test plugin'
-version: VERSION
-core: '8.x'
+core_version_requirement: ^8.8 || ^9

+++ b/tests/modules/group_test_views/group_test_views.info.yml
@@ -2,8 +2,7 @@ name: 'Group test views'
-version: VERSION
-core: '8.x'
+core_version_requirement: ^8.8 || ^9

This could be also removed as far as I read for test modules: #3096609: Allow contrib test modules to not need a core or core_version_requirement key, but let's try to get this done ASAP as it's blocking any module testing if depending on group.

Berdir’s picture

Yeah, starting with 8.8.3 or so. I prefer to keep it, because having such a module present results in a hard fail for _any_ test. If another project has a require-dev dependency on group and still wants to support 8.7 then we'd break their tests. We could decide to remove it when the min version is increased the next time.

penyaskito’s picture

Thanks for the explanation, @berdir!

heddn’s picture

The changes here make sense. But without an actual commit, its hard to see if this will pass the testbot or not. So a tentative +1 on RTBC from me. With the caveat that there might need to be more testing/fixes after the initial patch lands.

SuperfluousApostrophe’s picture

I cannot get either patch #9 or #10 to install via composer. I'm running D8.8.5 & 1.0.0-rc5.

kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Fixed

Okay, looks good to me and I agree it's time to bump the supported core version to 8.8

Big thanks to all those involved!

heddn’s picture

There's a couple instances of:

Providing context definitions via the "context" key is deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Use the "context_definitions" key instead. in the code still. Open a follow-up?

Berdir’s picture

We still have the parent issue open: #3042771: Drupal 9 Deprecated Code Report. Now that this has been committed, we can run tests against 9.x as well there.

kristiaanvandeneynde’s picture

@heddn that has been fixed in #3087371: Replace ContextDefinition with EntityContextDefinition

@Berdir okay, will follow that issue.

Status: Fixed » Closed (fixed)

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