Skip to content

fix: Generate Plan factory with correct variant class names#779

Merged
ninjasimon merged 2 commits into
mainfrom
fix/plan-factory-class-names
Jun 5, 2026
Merged

fix: Generate Plan factory with correct variant class names#779
ninjasimon merged 2 commits into
mainfrom
fix/plan-factory-class-names

Conversation

@ninjasimon
Copy link
Copy Markdown
Contributor

The model-factory-Plan.php.handlebars template hardcoded references to TrialOnlyPlan, SubscriptionPlan, and OneTimeSalePlan, but the bare-named classes no longer exist in the generated SDK, so the factory files fail Psalm with UndefinedClass errors.

This PR interpolates {{model.className}} into each variant reference so the template emits the correct class names for both Plan and FlexiblePlan. After merging this, the next workflow run will regenerate src/Model/PlanFactory.php and src/Model/FlexiblePlanFactory.php to point at classes that actually exist.

@ninjasimon ninjasimon self-assigned this Jun 5, 2026
@ninjasimon ninjasimon requested a review from a team as a code owner June 5, 2026 15:45
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 5, 2026

🦋 Changeset detected

Latest commit: f735245

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

🔍 PHP SDK Changes Preview

Diff is too large to display inline

📦 Download the rebilly-sdk-diff artifact from the workflow run for a formatted HTML diff.


Updated: 2026-06-05 15:51:40 UTC
Commit: f735245c425ed0e6d6137a106221ce999f53cce5

elgouttefangeas
elgouttefangeas previously approved these changes Jun 5, 2026
@ninjasimon ninjasimon removed the request for review from elgouttefangeas June 5, 2026 16:24
@ninjasimon ninjasimon merged commit 955cd10 into main Jun 5, 2026
8 checks passed
@ninjasimon ninjasimon deleted the fix/plan-factory-class-names branch June 5, 2026 16:44
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.

3 participants