Skip to content

Fix migration namespaces and paths#341

Open
Tigrov wants to merge 2 commits into
masterfrom
fix-paths
Open

Fix migration namespaces and paths#341
Tigrov wants to merge 2 commits into
masterfrom
fix-paths

Conversation

@Tigrov
Copy link
Copy Markdown
Member

@Tigrov Tigrov commented May 19, 2026

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Issue #338

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 0% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (e703759) to head (6c4bc2e).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Service/MigrationService.php 0.00% 33 Missing ⚠️
src/Command/CreateCommand.php 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #341       +/-   ##
============================================
- Coverage     12.66%   0.00%   -12.67%     
- Complexity      300     303        +3     
============================================
  Files            20      20               
  Lines           963     977       +14     
============================================
- Hits            122       0      -122     
- Misses          841     977      +136     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Tigrov Tigrov added the status:code review The pull request needs review. label May 19, 2026
@Tigrov Tigrov requested a review from a team May 19, 2026 05:17
Copy link
Copy Markdown
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

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

Add test with two namespaces pointing to the same directory and create in this directory two migration with different namespaces.

Comment on lines +446 to +452
if (!is_dir($sourcePath)) {
throw new LogicException("Invalid path directory \"$sourcePath\"");
}

$sourcePath = rtrim(str_replace('\\', '/', $sourcePath), '/');
$sourceNamespace = $this->getNamespacesFromPath($sourcePath)[0] ?? '';
$paths[$sourcePath] = $sourceNamespace;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This code is duplicated above. Maybe extract it to separate private method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants