Skip to content

Conversation

@absumo
Copy link
Contributor

@absumo absumo commented Aug 8, 2025

Summary by Sourcery

Bump Symfony dependency versions and refactor the TranslateCommand to use PHP 8 features and an invokable signature.

Enhancements:

  • Update all Symfony package constraints from ^7.2 to ^7.3 in composer.json
  • Refactor TranslateCommand to use constructor property promotion for ParameterBagInterface
  • Convert TranslateCommand's execute method to an __invoke method and remove the InputInterface parameter

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 8, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR upgrades Symfony dependencies to version 7.3 and refactors the TranslateCommand to an invokable command using constructor property promotion and the __invoke() method.

Class diagram for refactored TranslateCommand

classDiagram
    class TranslateCommand {
        +__construct(ParameterBagInterface parameters)
        +__invoke(OutputInterface output): int
        -parameters: ParameterBagInterface (removed)
        +parameters: ParameterBagInterface (readonly, promoted)
    }
    TranslateCommand --|> Command
    ParameterBagInterface <.. TranslateCommand
Loading

Class diagram for Symfony dependency upgrades

classDiagram
    class SymfonyForm {
        <<interface>>
        version: 7.3
    }
    class SymfonyAsset {
        <<interface>>
        version: 7.3
    }
    class SymfonyConsole {
        <<interface>>
        version: 7.3
    }
    class SymfonySecurityBundle {
        <<interface>>
        version: 7.3
    }
    class SymfonyTranslation {
        <<interface>>
        version: 7.3
    }
    class SymfonyTwigBundle {
        <<interface>>
        version: 7.3
    }
    class SymfonyDoctrineMessenger {
        <<interface>>
        version: 7.3
    }
    class SymfonyPhpunitBridge {
        <<interface>>
        version: 7.3
    }
Loading

File-Level Changes

Change Details Files
Bump Symfony component versions to ^7.3
  • Updated symfony/form, asset, console, security-bundle, translation, twig-bundle to ^7.3
  • Upgraded symfony/doctrine-messenger and symfony/phpunit-bridge to ^7.3
composer.json
Refactor TranslateCommand into an invokable command
  • Removed InputInterface injection and import
  • Converted constructor to use readonly property promotion for ParameterBagInterface
  • Replaced protected execute() with public __invoke() method
  • Eliminated manual assignment of constructor parameter
src/Command/TranslateCommand.php

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @absumo - I've reviewed your changes - here's some feedback:

  • Double-check that removing the InputInterface parameter from __invoke matches Symfony 7.3’s invokable command signature to avoid runtime mismatches.
  • Ensure the Symfony 7.3 minor version bump is compatible with all other dependencies to prevent unexpected issues.
  • Consider consolidating individual Symfony package version constraints into a single requirement to simplify future upgrades.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Double-check that removing the InputInterface parameter from __invoke matches Symfony 7.3’s invokable command signature to avoid runtime mismatches.
- Ensure the Symfony 7.3 minor version bump is compatible with all other dependencies to prevent unexpected issues.
- Consider consolidating individual Symfony package version constraints into a single requirement to simplify future upgrades.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@absumo absumo merged commit 3b9c5aa into master Aug 11, 2025
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.

3 participants