Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

Status: Active » Needs review
StatusFileSize
new6.35 KB

Here is a patch

Status: Needs review » Needs work

The last submitted patch, 2: 3068948.patch, failed testing. View results

chr.fritsch’s picture

Status: Needs work » Needs review
StatusFileSize
new6.47 KB
new676 bytes

Fix tests

alexpott’s picture

StatusFileSize
new2.48 KB
new8.95 KB

Let's makes the tests clean too.

  36x: drupal_installation_attempted() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Installer\InstallerKernel::installationAttempted() instead. See https://www.drupal.org/node/3035275
    14x in ConfigSelectorTest::testConfigSelector from Drupal\Tests\config_selector\Kernel
    7x in ConfigSelectorUiTest::testUi from Drupal\Tests\config_selector\Functional
    6x in ConfigSelectorTest::testConfigSelectorIndirectDependency from Drupal\Tests\config_selector\Kernel
    5x in ConfigSelectorProfileTest::testProfileInstall from Drupal\Tests\config_selector\Functional
    2x in ConfigSelectorTest::testConfigSelectorMultipleFeatures from Drupal\Tests\config_selector\Kernel
    1x in ActiveEntityTest::testGet from Drupal\Tests\config_selector\Kernel
    1x in ActiveEntityTest::testGetFromEntity from Drupal\Tests\config_selector\Kernel

  2x: Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/2352949, which includes recommendations on which theme to use.
    1x in ConfigSelectorProfileTest::testProfileInstall from Drupal\Tests\config_selector\Functional
    1x in ConfigSelectorUiTest::testUi from Drupal\Tests\config_selector\Functional

  1x: The install profile modules/config_selector/tests/modules/config_selector_profile_test/config_selector_profile_test.info.yml only implements a 'dependencies' key. As of Drupal 8.6.0 profile's support a new 'install' key for modules that should be installed but not depended on. See https://www.drupal.org/node/2952947.
    1x in ConfigSelectorProfileTest::testProfileInstall from Drupal\Tests\config_selector\Functional

Fixing the above deprecations.

chr.fritsch’s picture

Hm, I didn't see the warning about the theme. Neither in tests or with drupal-check. 🤔

I left drupal_installation_attempted out, because we would break 8.7 then. But it's only for the tests, so I think it's ok.

alexpott’s picture

StatusFileSize
new921 bytes
new9.3 KB

Hmmm... good point about drupal_installation_attempted() - it's not only tests.

alexpott’s picture

StatusFileSize
new1.55 KB
new9.59 KB

Maybe what we can do is make this version ^8.8 and Drupal 9 compatible.

alexpott’s picture

StatusFileSize
new279 bytes
new9.59 KB

Does this work...

krzysztof domański’s picture

-- edited --

krzysztof domański’s picture

StatusFileSize
new280 bytes
new9.77 KB

| -> || ??

- "drupal/core": "^8.8 | ^9"
+ "drupal/core": "^8.8 || ^9"

Now I think it doesn't matter...

krzysztof domański’s picture

StatusFileSize
new4.29 KB
new13.56 KB
krzysztof domański’s picture

StatusFileSize
new4.16 KB
new13.56 KB
chr.fritsch’s picture

Status: Needs review » Reviewed & tested by the community

This looks good. All tests are passing locally with D9.

I think we can release this as a 2.x version.

krzysztof domański’s picture

1. Why not 8.x-1.0-beta2? Can we just drop 8.6 support and create a next release?
core_version_requirement: ^8.7.7 || ^9

2. Looking at the patch, we don't remove/change too much code. I think it shouldn't be a problem for Drupal 8.6 support. Url::fromRoute, MessengerInterface are available in older drupal versions so we can also be compatible in 8.6:

core: 8.x
core_version_requirement: ^8 || ^9
dependencies:
  - drupal:system (>=8.6)
krzysztof domański’s picture

New method in 8.8: InstallerKernel::installationAttempted

function drupal_installation_attempted() {
  @trigger_error('drupal_installation_attempted() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Installer\InstallerKernel::installationAttempted() instead. See https://www.drupal.org/node/3035275', E_USER_DEPRECATED);
  return InstallerKernel::installationAttempted();
}

Proposed solution:

// We only need to do this during an installation.
if (method_exists(InstallerKernel::class, 'installationAttempted')) {
  if (!InstallerKernel::installationAttempted()) {
    return;
  }
}
else {
  // @todo Delete when drop Drupal 8.7 support.
  if (!drupal_installation_attempted()) {
    return;
  }
}
alexpott’s picture

@Krzysztof Domański we want to maintain the ability to do security releases on 8.x-1.x and be able to test against Drupal 9. Therefore we need two branches.

Thank you for making the tests pass on D9.

I really don't want to maintain code like #16.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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