diff --git a/.circleci/config.yml b/.circleci/config.yml index 01996ef953..1883ccf605 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,7 +109,7 @@ jobs: # PHP 8 test with Drupal tip # Determines whether a newer version of a dependency has broken Drush. - test_81_drupal94_highest: + test_81_drupal10_highest: <<: *defaults docker: - image: wodby/php:latest @@ -122,7 +122,9 @@ jobs: - run: cp .docker/zz-php.ini /usr/local/etc/php/conf.d/ - run: php --version - run: composer -n config platform.php --unset - - run: composer -n require --dev drupal/core-recommended:9.4.x-dev --no-update + - run: composer -n require --dev drupal/core-recommended:10.0.x-dev --no-update + # Bring it back when it is compatible with Drupal 10. + - run: composer -n remove drupal/semver_example --no-update --dev - run: composer -n update - run: mkdir -p /tmp/results - run: composer -n lint @@ -144,7 +146,7 @@ workflows: <<: *requires - test_74_drupal9_mysql: <<: *requires - - test_81_drupal94_highest: + - test_81_drupal10_highest: <<: *requires - test_74_drupal9_sqlite: <<: *requires diff --git a/composer.json b/composer.json index f3e711bf96..0bb50d9571 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "ext-dom": "*", "chi-teck/drupal-code-generator": "^2.3", "composer/semver": "^1.4 || ^3", - "consolidation/annotated-command": "^4.4", + "consolidation/annotated-command": "^4.5", "consolidation/config": "^1.2", "consolidation/filter-via-dot-access-data": "^1", "consolidation/robo": "^3", @@ -46,11 +46,11 @@ "league/container": "^3.4", "psr/log": "~1.0", "psy/psysh": "~0.11", - "symfony/event-dispatcher": "^4.0", - "symfony/finder": "^4.0 || ^5", + "symfony/event-dispatcher": "^4.0 || ^5.0 || ^6.0", + "symfony/finder": "^4.0 || ^5 || ^6", "symfony/polyfill-php80": "^1.23", - "symfony/var-dumper": "^4.0 || ^5.0", - "symfony/yaml": "^4.0", + "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0", + "symfony/yaml": "^4.0 || ^5.0 || ^6.0", "webflo/drupal-finder": "^1.2", "webmozart/path-util": "^2.1.0" }, @@ -58,7 +58,7 @@ "composer/installers": "^1.7", "cweagans/composer-patches": "~1.0", "david-garcia/phpwhois": "4.3.0", - "drupal/core-recommended": "^9", + "drupal/core-recommended": "^9 || ^10", "drupal/semver_example": "2.2.0", "phpunit/phpunit": ">=7.5.20", "rector/rector": "^0.12", diff --git a/composer.lock b/composer.lock index 88e2df022b..209a0e3924 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ff8221ae494b4436f105199890276615", + "content-hash": "8ba272546279a9c366d810659d25c2a2", "packages": [ { "name": "chi-teck/drupal-code-generator", @@ -2171,16 +2171,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", "shasum": "" }, "require": { @@ -2232,7 +2232,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" }, "funding": [ { @@ -2248,7 +2248,7 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2021-11-23T21:10:46+00:00" }, { "name": "symfony/polyfill-intl-idn", @@ -2503,7 +2503,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -2559,7 +2559,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" }, "funding": [ { @@ -2579,16 +2579,16 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", "shasum": "" }, "require": { @@ -2638,7 +2638,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" }, "funding": [ { @@ -2654,7 +2654,7 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-06-05T21:20:04+00:00" }, { "name": "symfony/polyfill-php80", @@ -5433,16 +5433,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", "shasum": "" }, "require": { @@ -5477,9 +5477,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" }, - "time": "2021-10-02T14:08:47+00:00" + "time": "2022-01-04T19:58:01+00:00" }, { "name": "phpspec/prophecy", diff --git a/sut/modules/unish/drush_empty_module/drush_empty_module.info.yml b/sut/modules/unish/drush_empty_module/drush_empty_module.info.yml index ebac62f70d..c85994ec0b 100644 --- a/sut/modules/unish/drush_empty_module/drush_empty_module.info.yml +++ b/sut/modules/unish/drush_empty_module/drush_empty_module.info.yml @@ -1,7 +1,7 @@ name: Drush empty module description: 'Drush empty module' core: 8.x -core_version_requirement: ^8 || ^9 +core_version_requirement: ^8 || ^9 || ^10 type: module # Require for the sake of tests - simulate what packaging would do. project: drush_empty_module diff --git a/tests/fixtures/modules/woot/composer.json b/tests/fixtures/modules/woot/composer.json index e2b8325324..a2dceee453 100644 --- a/tests/fixtures/modules/woot/composer.json +++ b/tests/fixtures/modules/woot/composer.json @@ -14,7 +14,7 @@ "extra": { "drush": { "services": { - "drush.services.yml": "^9 || ^10" + "drush.services.yml": "^9 || ^10 || ^11" } } } diff --git a/tests/fixtures/modules/woot/woot.info.yml b/tests/fixtures/modules/woot/woot.info.yml index e1c43e11df..7fe4f3a572 100644 --- a/tests/fixtures/modules/woot/woot.info.yml +++ b/tests/fixtures/modules/woot/woot.info.yml @@ -1,5 +1,5 @@ name: Woot type: module description: Woot Mightily. -core_version_requirement: ^9 +core_version_requirement: ^9 || ^10 package: Other diff --git a/tests/integration/SecurityUpdatesTest.php b/tests/integration/SecurityUpdatesTest.php index 697de3a010..28d0694907 100644 --- a/tests/integration/SecurityUpdatesTest.php +++ b/tests/integration/SecurityUpdatesTest.php @@ -2,6 +2,8 @@ namespace Unish; +use Composer\Semver\Semver; + /** * Tests "pm:security" command. * @group commands @@ -14,6 +16,9 @@ class SecurityUpdatesTest extends UnishIntegrationTestCase */ public function testInsecureDrupalPackage() { + if (Semver::satisfies(\Drupal::VERSION, '^10')) { + $this->markTestSkipped('drupal/semver_example not yet compatible.'); + } list($expected_package, $expected_version) = ['drupal/semver_example', '2.2.0']; $this->drush('pm:security', [], ['format' => 'json'], self::EXIT_ERROR_WITH_CLARITY); $this->assertStringContainsString('One or more of your dependencies has an outstanding security update.', $this->getErrorOutput()); diff --git a/tests/unish/CreateEntityType.php b/tests/unish/CreateEntityType.php index 701e5e229e..7f5ec6b349 100644 --- a/tests/unish/CreateEntityType.php +++ b/tests/unish/CreateEntityType.php @@ -15,10 +15,17 @@ public static function createContentEntity($testCase): void 'name' => 'Unish Article', 'machine_name' => 'unish_article', 'description' => 'A test module', - 'package' => 'unish', + // See https://www.drupal.org/project/drupal/issues/3096609. + 'package' => 'Testing', 'dependencies' => 'drupal:text', ]; $testCase->drush('generate', ['module'], ['verbose' => null, 'answer' => $answers, 'destination' => Path::join($testCase->webroot(), 'modules/contrib')], null, null, $testCase::EXIT_SUCCESS, null, ['SHELL_INTERACTIVE' => 1]); + // Currently needed for Drush 10.x tests. Harmless on other versions. + $path = Path::join($testCase->webroot(), 'modules/contrib/unish_article/unish_article.info.yml'); + $contents = file_get_contents($path); + file_put_contents($path, str_replace('^8 || ^9', '^8 || ^9 || ^10', $contents)); + + // Create a content entity type and enable its module. // Note that only the values below are used. The keys are for documentation. $answers = [ diff --git a/tests/unish/TestModuleHelperTrait.php b/tests/unish/TestModuleHelperTrait.php index edf7e7c4fe..90d8ea343f 100644 --- a/tests/unish/TestModuleHelperTrait.php +++ b/tests/unish/TestModuleHelperTrait.php @@ -33,7 +33,7 @@ public function setupModulesForTests(array $modules, $sourcePath) $info_path = $targetDir . "/$module.info.yml"; $module_info = file_get_contents($info_path); if (strpos($module_info, 'core_version_requirement') === false) { - $module_info = "core_version_requirement: ^8 || ^9\n$module_info"; + $module_info = "core_version_requirement: ^8 || ^9 || ^10\n$module_info"; file_put_contents($info_path, $module_info); } }