diff --git a/.ddev/commands/web/install b/.ddev/commands/web/install index d5488d9..d546138 100755 --- a/.ddev/commands/web/install +++ b/.ddev/commands/web/install @@ -8,7 +8,11 @@ drush site:install standard --account-name=admin --account-pass=admin --site-nam drush en admin_toolbar admin_toolbar_tools config_inspector devel # Install eslint dependencies -yarn --cwd $DDEV_DOCROOT/core install +# The "--cwd" argument doesn't work with Yarn 4.4, because the global version +# is returned as 1.22.22 when Yarn starts, before switching directories. +cd $DDEV_DOCROOT/core +yarn install +cd - # Configure prettier test -e .prettierrc.json || ln -s $DDEV_DOCROOT/core/.prettierrc.json . test -e .prettierignore || echo '*.yml' > .prettierignore diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 7987923..1c8d75d 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -10,10 +10,12 @@ additional_hostnames: - d10 additional_fqdns: [] database: - type: mariadb - version: "10.6" + type: mariadb + version: "10.6" use_dns_when_possible: true composer_version: "2" +nodejs_version: "22" +corepack_enable: true web_environment: - SIMPLETEST_DB=mysql://db:db@db/db - DRUPAL_NIGHTWATCH_OUTPUT=reports/nightwatch @@ -32,8 +34,6 @@ web_environment: - MINK_DRIVER_ARGS_WEBDRIVER=[\"chrome\", {\"browserName\":\"chrome\",\"goog:chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"] - DRUPAL_TEST_BASE_URL=http://web - DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES=node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest -nodejs_version: "18" -corepack_enable: false # Key features of DDEV's config.yaml: diff --git a/README.md b/README.md index 21ce9f6..019b26e 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ The `cspell` command runs [CSpell](https://cspell.org/) using the core configura The `compat` command will run PHPCS against the selected module using the `PHPCompatibility` coding standard. -Use the `-v` flag to specify a PHP version to test. By default, the version is `8.2`. +Use the `-v` flag to specify a PHP version to test. By default, the version is `8.3`. ### ddev eslint @@ -158,7 +158,7 @@ The `rector` command will run Drupal Rector updates against the selected module, **Command:** `ddev remove MODULE` -**Example:** `ddev rector admin_toolbar` +**Example:** `ddev remove admin_toolbar` The `ddev remove` command will uninstall a module and delete it from the `web/modules/contrib` directory. diff --git a/composer.json b/composer.json index 19101eb..30baf29 100644 --- a/composer.json +++ b/composer.json @@ -31,10 +31,15 @@ "mglaman/drupal-check": "^1.5", "mikey179/vfsstream": "^1.6", "palantirnet/drupal-rector": "^0.20.3", + "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.15", "phpspec/prophecy": "^1.19", - "phpspec/prophecy-phpunit": "^2.2", + "phpspec/prophecy-phpunit": "^2.3", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-strict-rules": "^1.5", "phpunit/phpunit": "^10.5", + "squizlabs/php_codesniffer": "^3.7", "symfony/phpunit-bridge": "^7.1", "zaporylie/composer-drupal-optimizations": "^1.2" }, diff --git a/composer.lock b/composer.lock index 13fe197..a560149 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": "4c6d130c2adb95f27d2ab9547d16145d", + "content-hash": "329726605d81a46c3f74afcc7cc109ed", "packages": [ { "name": "asm89/stack-cors", @@ -8340,6 +8340,68 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpcompatibility/php-compatibility", + "version": "9.3.5", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + }, + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, + "time": "2019-12-27T09:44:58+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -8725,30 +8787,30 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.33.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", - "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299", + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "doctrine/annotations": "^2.0", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^5.3.0", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", "symfony/process": "^5.2" }, "type": "library", @@ -8766,9 +8828,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0" }, - "time": "2024-10-13T11:25:22+00:00" + "time": "2024-10-13T11:29:49+00:00" }, { "name": "phpstan/phpstan", @@ -8875,6 +8937,55 @@ }, "time": "2024-09-11T15:52:35+00:00" }, + { + "name": "phpstan/phpstan-strict-rules", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-strict-rules.git", + "reference": "daeec748b53de80a97498462513066834ec28f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/daeec748b53de80a97498462513066834ec28f8b", + "reference": "daeec748b53de80a97498462513066834ec28f8b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.12.4" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Extra strict and opinionated rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.1" + }, + "time": "2024-09-20T14:04:44+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "10.1.16", @@ -10265,33 +10376,34 @@ }, { "name": "slevomat/coding-standard", - "version": "8.15.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "7d1d957421618a3803b593ec31ace470177d7817" + "reference": "f2cc4c553eae68772624ffd7dd99022343b69c31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/7d1d957421618a3803b593ec31ace470177d7817", - "reference": "7d1d957421618a3803b593ec31ace470177d7817", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/f2cc4c553eae68772624ffd7dd99022343b69c31", + "reference": "f2cc4c553eae68772624ffd7dd99022343b69c31", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", - "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.23.1", - "squizlabs/php_codesniffer": "^3.9.0" + "php": "^7.4 || ^8.0", + "phpstan/phpdoc-parser": "^2.0", + "squizlabs/php_codesniffer": "^3.10.0" }, "require-dev": { - "phing/phing": "2.17.4", - "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.60", - "phpstan/phpstan-deprecation-rules": "1.1.4", - "phpstan/phpstan-phpunit": "1.3.16", - "phpstan/phpstan-strict-rules": "1.5.2", - "phpunit/phpunit": "8.5.21|9.6.8|10.5.11" - }, + "phing/phing": "3.0.0", + "php-parallel-lint/php-parallel-lint": "1.4.0", + "phpstan/phpstan": "1.12.8", + "phpstan/phpstan-deprecation-rules": "1.2.1", + "phpstan/phpstan-phpunit": "1.4.0", + "phpstan/phpstan-strict-rules": "1.6.1", + "phpunit/phpunit": "9.6.8|10.5.38|11.4.3" + }, + "default-branch": true, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { @@ -10314,7 +10426,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.15.0" + "source": "https://github.com/slevomat/coding-standard/tree/master" }, "funding": [ { @@ -10326,7 +10438,7 @@ "type": "tidelift" } ], - "time": "2024-03-09T15:20:58+00:00" + "time": "2024-11-08T15:15:07+00:00" }, { "name": "squizlabs/php_codesniffer",