Skip to content

fix: ensure PHP SDK version persistence and validation#702

Merged
maxprilutskiy merged 2 commits intomainfrom
devin/1746210667-fix-php-version-persistence
May 2, 2025
Merged

fix: ensure PHP SDK version persistence and validation#702
maxprilutskiy merged 2 commits intomainfrom
devin/1746210667-fix-php-version-persistence

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Fix PHP SDK version persistence and validation

Issue

The PHP packagist publishing workflow was failing with a version validation error:

"./composer.json" does not match the expected JSON schema:
- version : Does not match the regex pattern ^v?\d+(\.\d+){0,3}|^dev-

The version field in composer.json was being reset to empty, causing validation failures.

Fix

  • Set the version back to "0.1.0" in the PHP SDK composer.json file
  • Modified the workflow to handle empty or invalid version values:
    • Added validation to check for empty versions and set a default of "0.1.0"
    • Added regex validation to ensure version format matches the required pattern
    • Updated version bumping logic to handle edge cases

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

Co-Authored-By: Max Prilutskiy <maks.prilutskiy@gmail.com>
@maxprilutskiy maxprilutskiy merged commit f999033 into main May 2, 2025
2 checks passed
@maxprilutskiy maxprilutskiy deleted the devin/1746210667-fix-php-version-persistence branch May 2, 2025 18:59
mainstar123 pushed a commit to mainstar123/lingo.dev that referenced this pull request Jul 7, 2025
* fix: ensure PHP SDK version persistence and validation

Co-Authored-By: Max Prilutskiy <maks.prilutskiy@gmail.com>

* fix: remove version fallback logic from workflow

Co-Authored-By: Max Prilutskiy <maks.prilutskiy@gmail.com>

---------

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
* fix: ensure PHP SDK version persistence and validation

Co-Authored-By: Max Prilutskiy <maks.prilutskiy@gmail.com>

* fix: remove version fallback logic from workflow

Co-Authored-By: Max Prilutskiy <maks.prilutskiy@gmail.com>

---------

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