Skip to content

Make CommandObject readonly, validate cache_control and require swagger-php - #61

Merged
stixx merged 3 commits into
mainfrom
feat/command-object-readonly
Oct 25, 2026
Merged

stixx merged 3 commits into
mainfrom
feat/command-object-readonly

Conversation

@stixx

@stixx stixx commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Tightens three parts of the public surface before it is frozen.

  • CommandObject is final readonly, and its controller defaults to null instead of the bundle's internal CommandController. A command without a controller is still routed to CommandController; the attribute's docblock describes what class and controller do on a parameter and on a command class.
  • cache_control accepts only a string or null, with an info() text. false used to be accepted and behaved like null.
  • zircote/swagger-php, whose attributes describe the commands, is required directly, with the same range NelmioApiDocBundle allows.
  • The class-level controller example in docs/command-routing.md uses single backslashes, so it is valid PHP.

The changelog's Upgrading section covers reading a null controller and replacing cache_control: false.

stixx added 2 commits October 25, 2026 20:24
…er-php

CommandObject's controller defaults to null instead of the internal
CommandController, cache_control accepts only a string or null, and the
swagger-php attributes the commands use are a direct dependency.
…mple

The route's controller can be Class::method or a service id, as with the x
vendor extension. Single backslashes keep the docs example valid PHP.
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between a12048d and 612ab89.

Files selected for processing: 8
  • CHANGELOG.md
  • README.md
  • composer.json
  • docs/command-routing.md
  • src/Attribute/CommandObject.php
  • src/DependencyInjection/Configuration.php
  • tests/Unit/Attribute/CommandObjectTest.php
  • tests/Unit/DependencyInjection/ConfigurationTest.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@stixx
stixx merged commit 9cbe551 into main Oct 25, 2026
10 checks passed
@stixx
stixx deleted the feat/command-object-readonly branch October 25, 2026 20:01
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.

1 participant