Skip to content

feat: update - #27

Merged
majoskorec merged 3 commits into
masterfrom
update
Sep 18, 2026
Merged

majoskorec merged 3 commits into
masterfrom
update

Conversation

@majoskorec

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical XML validation and CI dependency issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates the package for PHP 8.4/8.5, refreshes tooling and CI, removes PHPMD, and expands functional coverage.

Changes:

  • Adds PHP 8.4/8.5 containers, rulesets, and CI coverage.
  • Adds custom @final sniff support and tests.
  • Refactors XML linting, Composer checks, hooks, and documentation.
File summaries
File Summary
tests/Functional/XmlLinterTest.php XML linter tests. Nit (1 vote): valid-only assertions do not prove schema validation.
tests/Functional/XmlLinter/valid-multiple-namespaces.xml Multiple-namespace XML fixture.
tests/Functional/XmlLinter/schema/root.xsd Root schema fixture.
tests/Functional/XmlLinter/schema/child.xsd Child schema fixture.
tests/Functional/XmlLinter/external.dtd External DTD fixture.
tests/Functional/XmlLinter/external-dtd.xml External DTD loading fixture.
tests/Functional/SuperfluousWhitespaceTest.php Whitespace functional test updates.
tests/Functional/SuperfluousWhitespace/Bar.SuperfluousWhitespace.before.php Whitespace input fixture.
tests/Functional/SuperfluousWhitespace/Bar.SuperfluousWhitespace.after.php Expected formatted fixture.
tests/Functional/RequireAbstractOrFinalTest.php Custom class sniff tests.
tests/Functional/RequireAbstractOrFinal/Classes.php Class sniff fixture.
tests/Functional/PhpcsTestCase.php PHPCS test isolation improvements.
tests/Functional/ForbiddenAnnotationsTest.php Forbidden annotation tests.
tests/Functional/ForbiddenAnnotations/Annotations.php Annotation fixture.
tests/Example/Foo.php PHP 8.4 example update.
tests/Example/Bar.php PHP 8.4 example update.
Taskfile.yaml Container task updates.
src/PixelFederationCodingStandard/Sniffs/Classes/RequireAbstractOrFinalSniff.php Adds custom @final handling.
src/GrumPHP/Task/PhpMdExtendedTask.php Removes the PHPMD task.
src/GrumPHP/Task/ComposerInstallCheckTask.php Expands Composer file triggers.
src/GrumPHP/Linter/Xml/XmlLinter.php XML validation and schema handling. Critical (3 votes): schemaLocation lookup can bypass validation. Moderate (1 vote): no-namespace schema handling can reject valid documents.
README.md Usage documentation. Nit (2 votes): documented Composer script default differs from the implementation.
phpunit.xml PHPUnit configuration updates.
phpmd.dist.xml Removes PHPMD configuration.
phpcs.xml.dist Updates project ruleset selection.
phpcs.ruleset.85.xml PHP 8.5 ruleset inheritance.
phpcs.ruleset.85.non-ddd.xml PHP 8.5 non-DDD ruleset inheritance.
phpcs.ruleset.84.xml Expanded PHP 8.4 ruleset.
phpcs.ruleset.83.xml Removes the PHP 8.3 ruleset.
phpcs.ruleset.83.non-ddd.xml Removes the PHP 8.3 non-DDD ruleset.
grumphp.yml Test suite and hook configuration.
docker-compose.yml PHP service definitions.
config/grumphp.yaml Removes PHPMD service registration.
composer.json Dependency and script updates.
CHANGELOG.md Release notes.
bin/grumphp_hooks/environment_spinup Container startup hook. Moderate (1 vote): starts unnecessary Compose services.
AGENTS.md Container-based validation instructions.
.php-cs-fixer.dist.php Formatter configuration updates.
.github/workflows/grumphp.yaml PHP 8.4/8.5 CI workflow. Critical (1 vote): the Composer image lacks the required ext-dom extension.
.github/dependabot.yml Dependency cooldown configuration.
Review details

Suppressed comments (2)

src/GrumPHP/Linter/Xml/XmlLinter.php:320

  • For a document whose root has no namespace, $documentNamespace is '', while xsi:noNamespaceSchemaLocation is appended later in getSchemas(). A valid document with a no-namespace root schema plus an xsi:schemaLocation pair for a namespaced child will therefore always get this fatal missing-schema error. Treat the no-namespace location as the root schema before reporting it missing, and test that combination.
        if ($schema === null) {
            $this->addMissingSchemaError($file, $errors, $documentNamespace);

            return $schemas;

tests/Functional/XmlLinterTest.php:23

  • This assertion only proves that the linter returns no errors for a valid document; it cannot prove that either schema was loaded or applied (the current schemaLocation lookup can skip validation and still satisfy it). Add a malformed instance or a second invalid fixture and assert a validation error so this regression is detectable.
  • Files reviewed: 39/40 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/grumphp.yaml
Comment thread src/GrumPHP/Linter/Xml/XmlLinter.php
Comment thread README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PHP minimum conflicts with the selected PHPUnit version, and the PHP 8.5 suite does not use PHP 8.5 configuration.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

grumphp.yml:30

  • The new php8.5 suite reuses the shared task configuration, but that configuration still hard-codes PHP 8.4 in grumphp.yml's phpparser, phpcs.xml.dist, and phpunit.xml's PATH_PHPCS_RULESET. Consequently this matrix entry never exercises the PHP 8.5 ruleset/parser that this change adds, so 8.5-specific compatibility regressions can pass CI. Provide version-specific task/config overrides (or otherwise select the 8.5 ruleset and parser) for this suite.
  • Files reviewed: 43/44 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread composer.json
@majoskorec
majoskorec merged commit e18f6f3 into master Sep 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants