Skip to content

Detect native dependency version conflicts between plugins#57

Draft
simonhamp wants to merge 1 commit intomainfrom
check-plugin-dep-conflicts
Draft

Detect native dependency version conflicts between plugins#57
simonhamp wants to merge 1 commit intomainfrom
check-plugin-dep-conflicts

Conversation

@simonhamp
Copy link
Copy Markdown
Member

Summary

  • Extends PluginRegistry::detectConflicts() to detect version mismatches in native dependencies (Gradle, CocoaPods, Swift Packages) across registered plugins
  • Updates PluginConflictException to format error messages for the three new conflict types (android_dependency, ios_pod_dependency, ios_swift_package_dependency)
  • Extends PluginRegisterCommand::detectConflicts() to warn about dependency conflicts at registration time, before compilation
  • Adds 5 new test cases covering all conflict types, identical-version allowance, and versionless dependencies

Motivation

When multiple plugins declare the same native dependency at different versions, the current behavior varies by platform — Gradle may silently resolve, CocoaPods silently overwrites, Swift PM silently ignores duplicates. This change fails early with a clear error message identifying the conflicting plugins and versions.

Test plan

  • All 229 existing + new tests pass (composer test)
  • PHPStan passes (no new errors)
  • Code formatted with Laravel Pint
  • Manual: register two plugins with conflicting Gradle deps, verify error message
  • Manual: register two plugins with conflicting pod versions, verify error message

🤖 Generated with Claude Code

Extends the existing plugin conflict detection to catch version
mismatches in Gradle, CocoaPods, and Swift Package dependencies
before they cause opaque build failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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