Skip to content

Fix undefined-method calls flagged by DeepSource (PHP-E1002) in make:* commands - #140

Merged
bfoujols merged 4 commits into
mainfrom
copilot/php-e1002-fix-method-definitions
Oct 5, 2026
Merged

bfoujols merged 4 commits into
mainfrom
copilot/php-e1002-fix-method-definitions

Conversation

Copilot AI commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

DeepSource PHP-E1002 flags calls to methods that don't resolve to a definition. In the make:* commands, two kinds of call were flagged. I fixed these two; I haven't confirmed they are all 14 reported occurrences.

  • addArgument casing (CreateCliCommand, CreateApiCommand, CreateControllerCommand)

    • These called $this->AddArgument(...), but Symfony's Command defines addArgument. PHP method names are case-insensitive, so it ran fine, but static analysis can't resolve the call.
    • Changed to $this->addArgument(...).
  • getNamesCollection call (CreateControllerCommand)

    • execute() called self::getNamesCollection(...), but the method is a private instance method, not static.
    • Changed to $this->getNamesCollection(...).
// before
$this->AddArgument('controller-name', InputArgument::REQUIRED, 'Controller name');
$namesCollection = self::getNamesCollection($input->getArgument('controller-name'));

// after
$this->addArgument('controller-name', InputArgument::REQUIRED, 'Controller name');
$namesCollection = $this->getNamesCollection($input->getArgument('controller-name'));

I couldn't run composer install or the test suite in my environment, and I couldn't see DeepSource's occurrence list. I checked the rest of src by hand and found no other unresolved method calls. Please re-run DeepSource on this branch to see whether any occurrences remain.

Copilot AI linked an issue Oct 4, 2026 that may be closed by this pull request
@deepsource-io

deepsource-io Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

DeepSource Code Review

We reviewed changes in eea4c04...28b5662 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Oct 5, 2026 8:25a.m. Review ↗
Shell Oct 5, 2026 8:25a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codacy-production

codacy-production Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 16 complexity · 0 duplication

Metric Results
Complexity 16
Duplication 0

View in Codacy

🔴 Coverage 33.33% diff coverage · -2.34% coverage variation

Metric Results
Coverage variation ❌ -2.34% coverage variation (-1.00%)
Diff coverage ✅ 33.33% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (eea4c04) 907 640 70.56%
Head commit (28b5662) 642 (-265) 438 (-202) 68.22% (-2.34%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#140) 9 3 33.33%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Co-authored-by: bfoujols <7000210+bfoujols@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix undefined method call issue in the repository Fix undefined-method calls flagged by DeepSource (PHP-E1002) in make:* commands Oct 4, 2026
Copilot AI requested a review from bfoujols October 4, 2026 20:19
@bfoujols bfoujols added this to the v2.3 milestone Oct 5, 2026
@bfoujols bfoujols added the bug Something isn't working label Oct 5, 2026
@bfoujols
bfoujols marked this pull request as ready for review October 5, 2026 08:26
@bfoujols
bfoujols merged commit ed41f84 into main Oct 5, 2026
8 of 9 checks passed
@bfoujols
bfoujols deleted the copilot/php-e1002-fix-method-definitions branch October 5, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

(PHP-E1002) Method is called but not defined

2 participants