Skip to content

fix: implement Composer Path Repository for PHP SDK publishing#706

Merged
maxprilutskiy merged 1 commit intomainfrom
devin/1746214963-composer-path-repository
May 2, 2025
Merged

fix: implement Composer Path Repository for PHP SDK publishing#706
maxprilutskiy merged 1 commit intomainfrom
devin/1746214963-composer-path-repository

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Fix PHP SDK Packagist publishing with Composer Path Repository

Issue

The PHP packagist publishing workflow was failing because Packagist requires composer.json to be at the repository root, but our PHP SDK is in a subdirectory (php/sdk/).

Fix

Implemented the Composer Path Repository approach:

  • Created a root composer.json file that references the PHP SDK in the subdirectory
  • Configured a path repository pointing to the PHP SDK directory
  • Updated the workflow to install dependencies from the root composer.json
  • Added version validation to ensure the PHP SDK always has a valid version

How It Works

  1. The root composer.json defines a path repository that points to the php/sdk directory
  2. When Packagist scans the repository, it finds the composer.json at the root
  3. The workflow installs dependencies from the root, which creates a vendor directory with the PHP SDK
  4. The version is still managed in the PHP SDK's composer.json for proper versioning

Testing

The fix should be verified when the workflow runs on the next push to main that affects the PHP SDK.

Link to Devin run: https://app.devin.ai/sessions/b645cd58d26f45afb714a736ec4d758e
User: Max Prilutskiy (max@lingo.dev)

Co-Authored-By: Max Prilutskiy <maks.prilutskiy@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@maxprilutskiy maxprilutskiy merged commit e5b3f37 into main May 2, 2025
2 checks passed
@maxprilutskiy maxprilutskiy deleted the devin/1746214963-composer-path-repository branch May 2, 2025 19:52
mainstar123 pushed a commit to mainstar123/lingo.dev that referenced this pull request Jul 7, 2025
…tdev#706)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Max Prilutskiy <maks.prilutskiy@gmail.com>
17prateek12 pushed a commit to 17prateek12/lingo.dev that referenced this pull request Jan 23, 2026
…tdev#706)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Max Prilutskiy <maks.prilutskiy@gmail.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