Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions .vortex/docs/content/drupal/composer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ effective development environment.
Behavior-Driven Development (BDD), allowing you to write human-readable
stories that describe the behavior of your application. It facilitates
communication between developers, stakeholders, and clients.
- [`dantleech/gherkin-lint`](https://github.com/dantleech/gherkin-lint): A
linting tool for Gherkin feature files used in Behat tests. Ensures
consistency and quality in BDD test scenarios by checking syntax and
formatting.
- [`dealerdirect/phpcodesniffer-composer-installer`](https://github.com/Dealerdirect/phpcodesniffer-composer-installer):
This tool automatically configures PHP_CodeSniffer to use the coding
standards (like PSR-2 or Drupal coding standards) installed in a project.
Expand All @@ -154,10 +158,12 @@ effective development environment.
collection of pre-defined step definitions for Behat. This package speeds up
the process of writing new Behat tests by providing common step
implementations.
- [`drupal/core-dev`](https://www.drupal.org/project/drupal): Includes
development-specific dependencies and tools primarily for testing and code
analysis, including PHPUnit, PHP_CodeSniffer with rules (
via [Coder](https://www.drupal.org/project/coder) module).
- [`drevops/phpcs-standard`](https://github.com/drevops/phpcs-standard): A
custom PHP_CodeSniffer coding standard that extends Drupal coding standards
with additional rules and best practices specific to DrevOps projects.
- [`drupal/coder`](https://www.drupal.org/project/coder): Provides
PHP_CodeSniffer rules for Drupal coding standards. Version 9.x supports
PHP_CodeSniffer 4.x and includes updated rules for modern Drupal development.
Comment on lines +161 to +166

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

drupal/coder version 9 PHP_CodeSniffer 4 compatibility


<web_search_result>
Short answer: drupal/coder v9 adds PHP_CodeSniffer 4 support — but as of the v9.0.0‑alpha1 release (26 Oct 2025) it’s in alpha and may contain API changes. If you need PHPCS 4 now, install the v9 alpha (composer require 'drupal/coder:^9.0@alpha'); otherwise continue using drupal/coder 8.x with PHPCS 3.x until a stable v9 release. [1][2]

Sources:

  • Announcement: Coder 9.0.0‑alpha1 with PHPCS 4 support. [1]
  • drupal/coder project releases (shows 9.0.0‑alpha1 and 8.3.x stable). [2]
    </web_search_result>

Compatibility claim is accurate but missing important context about alpha status.

The documentation correctly states that drupal/coder version 9.x supports PHP_CodeSniffer 4.x. However, it omits that version 9.0.0 is currently in alpha (released 26 Oct 2025) and may contain API changes before a stable release.

Consider updating the description to clarify this status, since developers using stable versions should be aware they'd be adopting pre-release software:

- [`drupal/coder`](https://www.drupal.org/project/coder): Provides
  PHP_CodeSniffer rules for Drupal coding standards. Version 9.x (currently
  alpha) adds support for PHP_CodeSniffer 4.x with updated rules for modern
  Drupal development. Stable releases continue using version 8.x.
🤖 Prompt for AI Agents
.vortex/docs/content/drupal/composer.mdx around lines 161 to 166: update the
drupal/coder bullet to note that the 9.x line is currently an alpha pre-release
and may change; replace the existing sentence with one that states "Version 9.x
(currently alpha) adds support for PHP_CodeSniffer 4.x with updated rules for
modern Drupal development" and add a short note recommending stable users
continue on the 8.x release until 9.x is stable.

- [`drupal/drupal-extension`](https://github.com/jhedstrom/drupalextension): A
Behat extension that provides integration with Drupal, offering step
definitions specific to Drupal functionality. It facilitates the creation and
Expand All @@ -173,7 +179,7 @@ effective development environment.
- [`phpcompatibility/php-compatibility`](https://github.com/PHPCompatibility/PHPCompatibility):
Provides a collection of sniffs for PHP_CodeSniffer to check PHP code for
compatibility with different PHP versions, crucial for ensuring long-term
maintainability.
maintainability. Version 10.x supports PHP_CodeSniffer 4.x.
Comment on lines 179 to +182

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

PHPCompatibility version 10 PHP_CodeSniffer 4 compatibility


<web_search_result>
Short answer: PHPCompatibility v10 adds official support for PHP_CodeSniffer 4 and requires PHPCS >= 3.13.3 (it supports 3.13.3+ and 4.0.0+). It also drops support for PHP_CodeSniffer < 3.13.3 and for PHP < 5.4. See the project README and the v10 release notes. [1][2]

Sources

  • PHPCompatibility README / requirements. [1]
  • PHPCompatibility v10.0.0‑alpha1 release notes (adds PHPCS 4 support; changed minimum PHPCS). [2]
    </web_search_result>

Update documentation for accuracy: PHPCompatibility 10.x supports PHPCS 3.13.3+ AND 4.x.

The verification confirms that version 10.x does support PHP_CodeSniffer 4.x. However, the current statement is incomplete—PHPCompatibility 10.x actually supports both PHPCS 3.13.3+ and 4.0.0+, not just 4.x. The documentation should clarify the minimum PHPCS version requirement to provide more precise guidance to developers.

Suggested revision (lines 179-182):

- [`phpcompatibility/php-compatibility`](https://github.com/PHPCompatibility/PHPCompatibility):
  Provides a collection of sniffs for PHP_CodeSniffer to check PHP code for
  compatibility with different PHP versions, crucial for ensuring long-term
  maintainability. Version 10.x supports PHP_CodeSniffer 3.13.3 and 4.x.
🤖 Prompt for AI Agents
.vortex/docs/content/drupal/composer.mdx around lines 179 to 182: the docs
currently state PHPCompatibility 10.x supports PHP_CodeSniffer 4.x only; update
the sentence to specify the minimum supported PHPCS versions by stating that
PHPCompatibility 10.x supports PHP_CodeSniffer 3.13.3 (or 3.13.3+) and 4.x
(4.0.0+), so replace the existing line with wording that mentions both "3.13.3"
(or "3.13.3+") and "4.x" (or "4.0.0+") to clarify the minimum PHPCS requirement.

- [`phpmd/phpmd`](https://github.com/phpmd/phpmd): PHP Mess Detector is a
user-friendly tool that helps you detect several potential problems in your
PHP code, including possible bugs, suboptimal code, and overcomplicated
Expand All @@ -184,10 +190,22 @@ effective development environment.
- [`phpstan/extension-installer`](https://github.com/phpstan/extension-installer):
This package automatically installs and enables PHPStan extensions,
streamlining the setup process for PHPStan in your project.
- [`phpstan/phpstan`](https://github.com/phpstan/phpstan): A static analysis
tool for PHP that focuses on finding bugs in code without running it. Helps
catch type errors, incorrect method calls, and other potential issues during
development.
- [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit): The
industry-standard testing framework for PHP. Provides a comprehensive set of
tools for writing and running unit tests, integration tests, and functional
tests.
- [`pyrech/composer-changelogs`](https://github.com/pyrech/composer-changelogs):
Provides a summary of package changes (like updates, removals, and additions)
after running `composer update`, improving the visibility of package changes
and updates in your project.
- [`rector/rector`](https://github.com/rectorphp/rector): An automated
refactoring tool that instantly upgrades and refactors PHP code. Helps with
code modernization, framework migrations, and automated application of coding
standards.
- [`vincentlanglet/twig-cs-fixer`](https://github.com/VincentLanglet/Twig-CS-Fixer): This tool
ensures that Twig templates adhere to a set coding standard, helping maintain
consistency and readability in template files.
Expand Down
1 change: 1 addition & 0 deletions .vortex/docs/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"containerisation",
"customisations",
"cweagans",
"dantleech",
"dclint",
"ddev",
"dealerdirect",
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"bamarni/composer-bin-plugin": "^1.8.2",
"dealerdirect/phpcodesniffer-composer-installer": "^1.2.0",
"drevops/phpcs-standard": "^0.6",
"drupal/coder": "^8.3.31",
"drupal/coder": "^9@alpha",
"ergebnis/composer-normalize": "^2.48.2",
"laravel/serializable-closure": "^2.0.6",
"mockery/mockery": "^1.6.12",
Expand Down
66 changes: 34 additions & 32 deletions .vortex/installer/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .vortex/installer/src/Prompts/Handlers/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,16 @@ public static function getToolDefinitions(string $filter = 'all'): array {
'present' => fn(): mixed => File::contains($this->dstDir . '/composer.json', 'dealerdirect/phpcodesniffer-composer-installer') ||
File::contains($this->dstDir . '/composer.json', 'drupal/coder') ||
File::contains($this->dstDir . '/composer.json', 'squizlabs/php_codesniffer') ||
File::contains($this->dstDir . '/composer.json', 'phpcompatibility/php-compatibility') ||
File::contains($this->dstDir . '/composer.json', 'drevops/phpcs-standard') ||
File::exists($this->dstDir . '/phpcs.xml'),
'composer.json' => function (JsonManipulator $cj): void {
$cj->removeSubNode('require-dev', 'dealerdirect/phpcodesniffer-composer-installer');
$cj->removeConfigSetting('allow-plugins.dealerdirect/phpcodesniffer-composer-installer');
$cj->removeSubNode('require-dev', 'drupal/coder');
$cj->removeSubNode('require-dev', 'squizlabs/php_codesniffer');
$cj->removeSubNode('require-dev', 'phpcompatibility/php-compatibility');
$cj->removeSubNode('require-dev', 'drevops/phpcs-standard');
},
'files' => ['phpcs.xml'],
'strings' => [
Expand All @@ -200,10 +204,13 @@ public static function getToolDefinitions(string $filter = 'all'): array {
'title' => 'PHPStan',
'present' => fn(): mixed => File::contains($this->dstDir . '/composer.json', 'phpstan/phpstan') ||
File::contains($this->dstDir . '/composer.json', 'mglaman/phpstan-drupal') ||
File::contains($this->dstDir . '/composer.json', 'phpstan/extension-installer') ||
File::exists($this->dstDir . '/phpstan.neon'),
'composer.json' => function (JsonManipulator $cj): void {
$cj->removeSubNode('require-dev', 'phpstan/phpstan');
$cj->removeSubNode('require-dev', 'mglaman/phpstan-drupal');
$cj->removeSubNode('require-dev', 'phpstan/extension-installer');
$cj->removeConfigSetting('allow-plugins.phpstan/extension-installer');
},
'files' => ['phpstan.neon'],
'strings' => [
Expand All @@ -220,6 +227,7 @@ public static function getToolDefinitions(string $filter = 'all'): array {
File::exists($this->dstDir . '/rector.php'),
'composer.json' => function (JsonManipulator $cj): void {
$cj->removeSubNode('require-dev', 'rector/rector');
$cj->removeSubNode('require-dev', 'palantirnet/drupal-rector');
},
'files' => ['rector.php'],
'strings' => ['/^.*\brector\b.*\n?/m'],
Expand All @@ -244,9 +252,11 @@ public static function getToolDefinitions(string $filter = 'all'): array {
self::PHPUNIT => [
'title' => 'PHPUnit',
'present' => fn(): mixed => File::contains($this->dstDir . '/composer.json', 'phpunit/phpunit') ||
File::contains($this->dstDir . '/composer.json', 'phpspec/prophecy-phpunit') ||
File::exists($this->dstDir . '/phpunit.xml'),
'composer.json' => function (JsonManipulator $cj): void {
$cj->removeSubNode('require-dev', 'phpunit/phpunit');
$cj->removeSubNode('require-dev', 'phpspec/prophecy-phpunit');
$cj->removeProperty('autoload-dev.classmap');
$cj->removeMainKeyIfEmpty('autoload-dev');
},
Expand All @@ -273,11 +283,17 @@ public static function getToolDefinitions(string $filter = 'all'): array {
'title' => 'Behat',
'present' => fn(): mixed => File::contains($this->dstDir . '/composer.json', 'behat/behat') ||
File::contains($this->dstDir . '/composer.json', 'drupal/drupal-extension') ||
File::contains($this->dstDir . '/composer.json', 'drevops/behat-format-progress-fail') ||
File::contains($this->dstDir . '/composer.json', 'drevops/behat-screenshot') ||
File::contains($this->dstDir . '/composer.json', 'drevops/behat-steps') ||
File::exists($this->dstDir . '/behat.yml'),
'composer.json' => function (JsonManipulator $cj): void {
$cj->removeSubNode('require-dev', 'behat/behat');
$cj->removeSubNode('require-dev', 'drupal/drupal-extension');
$cj->removeSubNode('require-dev', 'dantleech/gherkin-lint');
$cj->removeSubNode('require-dev', 'drevops/behat-format-progress-fail');
$cj->removeSubNode('require-dev', 'drevops/behat-screenshot');
$cj->removeSubNode('require-dev', 'drevops/behat-steps');
},
'files' => [
'behat.yml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,20 @@
"drevops/behat-screenshot": "__VERSION__",
"drevops/behat-steps": "__VERSION__",
"drevops/phpcs-standard": "__VERSION__",
"drupal/core-dev": "__VERSION__",
"drupal/coder": "__VERSION__",
"drupal/drupal-extension": "__VERSION__",
"ergebnis/composer-normalize": "__VERSION__",
"lullabot/mink-selenium2-driver": "__VERSION__",
"lullabot/php-webdriver": "__VERSION__",
"mglaman/phpstan-drupal": "__VERSION__",
"mikey179/vfsstream": "__VERSION__",
"palantirnet/drupal-rector": "__VERSION__",
"phpcompatibility/php-compatibility": "__VERSION__",
"phpmd/phpmd": "__VERSION__",
"phpspec/prophecy-phpunit": "__VERSION__",
"phpstan/extension-installer": "__VERSION__",
"phpstan/phpstan": "__VERSION__",
"phpunit/phpunit": "__VERSION__",
"pyrech/composer-changelogs": "__VERSION__",
"rector/rector": "__VERSION__",
"vincentlanglet/twig-cs-fixer": "__VERSION__"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

$app_root ??= DRUPAL_ROOT;
$site_path ??= 'sites/default';
// @phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
$contrib_path = $app_root . '/' . (is_dir($app_root . '/modules/contrib') ? 'modules/contrib' : 'modules');

// Public files directory relative to the Drupal root.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* Tests for CircleCI configurations.
*
* @SuppressWarnings(PHPMD)
* @SuppressWarnings(\PHPMD)
*
* phpcs:disable Drupal.NamingConventions.ValidVariableName.LowerCamelName
* phpcs:disable Drupal.NamingConventions.ValidGlobal.GlobalUnderScore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* Tests for CircleCI configurations.
*
* @SuppressWarnings(PHPMD)
* @SuppressWarnings(\PHPMD)
*
* phpcs:disable Drupal.NamingConventions.ValidVariableName.LowerCamelName
* phpcs:disable Drupal.NamingConventions.ValidGlobal.GlobalUnderScore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* Tests for CircleCI configurations.
*
* @SuppressWarnings(PHPMD)
* @SuppressWarnings(\PHPMD)
*
* phpcs:disable Drupal.NamingConventions.ValidVariableName.LowerCamelName
* phpcs:disable Drupal.NamingConventions.ValidGlobal.GlobalUnderScore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* Tests for CircleCI configurations.
*
* @SuppressWarnings(PHPMD)
* @SuppressWarnings(\PHPMD)
*
* phpcs:disable Drupal.NamingConventions.ValidVariableName.LowerCamelName
* phpcs:disable Drupal.NamingConventions.ValidGlobal.GlobalUnderScore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -117,40 +117,40 @@
@@ -121,40 +121,40 @@
"[web-root]/web.config": false
},
"locations": {
Expand Down
Loading