Group classes now carry an optional withdrawal_deadline. Up to that day a student may withdraw themselves from a class they are enrolled in (the group-class page shows a Withdraw button). A timely withdrawal frees the seat and voids any pending payment but never issues an account credit — a clean exit, not a refund. After the deadline self-withdrawal closes (403 withdrawal_closed) and a studio admin must withdraw the student by hand from the student detail page; the admin path is never subject to the deadline. Unlike the enrolment deadline it has no implicit default — a blank deadline keeps self-withdrawal open indefinitely.
New nullable us_offerings.withdrawal_deadline column; Offering gains $withdrawalDeadline + isWithdrawalOpen().
New POST /enrollments/{id}/withdraw endpoint: deadline-gated, ownership-checked, idempotent for already-cancelled enrolments.
Editable per class on the offering form.
2. Kind-aware offering form
The Add/Edit Offering form now shows only the fields relevant to the selected kind — group settings (capacity, dates, times, enrolment/withdrawal deadlines, sessions, schedule note, invite-only) for group classes, and the weekly-reservation option for private lessons. Progressive enhancement: without JS every field still renders.
Notes
No USC_VERSION bump.Schema.php changed, but 1.2.0 is unreleased and its other schema features (scheduled billing, credits) accumulated under the same section without bumping; bumping now would misalign the release workflow. Existing sites (on 1.1.1) pick up the column on the 1.2.0 upgrade.
## Summary
Two changes for the unreleased 1.2.0:
### 1. Per-class withdrawal deadline
Group classes now carry an optional `withdrawal_deadline`. Up to that day a student may withdraw **themselves** from a class they are enrolled in (the group-class page shows a **Withdraw** button). A timely withdrawal frees the seat and voids any pending payment but **never issues an account credit** — a clean exit, not a refund. After the deadline self-withdrawal closes (`403 withdrawal_closed`) and a studio admin must withdraw the student by hand from the student detail page; the admin path is never subject to the deadline. Unlike the enrolment deadline it has no implicit default — a blank deadline keeps self-withdrawal open indefinitely.
- New nullable `us_offerings.withdrawal_deadline` column; `Offering` gains `$withdrawalDeadline` + `isWithdrawalOpen()`.
- New `POST /enrollments/{id}/withdraw` endpoint: deadline-gated, ownership-checked, idempotent for already-cancelled enrolments.
- Editable per class on the offering form.
### 2. Kind-aware offering form
The Add/Edit Offering form now shows only the fields relevant to the selected kind — group settings (capacity, dates, times, enrolment/withdrawal deadlines, sessions, schedule note, invite-only) for group classes, and the weekly-reservation option for private lessons. Progressive enhancement: without JS every field still renders.
## Notes
- **No `USC_VERSION` bump.** `Schema.php` changed, but 1.2.0 is unreleased and its other schema features (scheduled billing, credits) accumulated under the same section without bumping; bumping now would misalign the release workflow. Existing sites (on 1.1.1) pick up the column on the 1.2.0 upgrade.
## Tests
- `composer test` — 596 tests pass
- `composer lint` (PHPStan level 10) — clean
- `composer cs` (PHPCS) — clean
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Group classes now carry an optional per-class withdrawal deadline. Up to
that day a student may withdraw themselves from the class; the withdrawal
frees the seat and voids any pending payment but never issues an account
credit. After the deadline self-withdrawal closes and a studio admin must
withdraw the student by hand (the admin path is never subject to the
deadline). A blank deadline keeps self-withdrawal open indefinitely.
Also make the Add/Edit Offering form show only the fields relevant to the
selected kind: group settings for group classes, weekly reservation for
private lessons. Progressive enhancement — without JS every field renders.
- New nullable us_offerings.withdrawal_deadline column; Offering model gains
$withdrawalDeadline + isWithdrawalOpen().
- New student endpoint POST /enrollments/{id}/withdraw, gated by the deadline
(403 withdrawal_closed), ownership-checked, idempotent.
- Front-end group-class page shows a Withdraw button while open.
- No USC_VERSION bump: 1.2.0 is unreleased and accumulates schema changes
under its section, matching the scheduled-billing and credit features.
Tests: composer test (596), composer lint, composer cs all pass.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Two changes for the unreleased 1.2.0:
1. Per-class withdrawal deadline
Group classes now carry an optional
withdrawal_deadline. Up to that day a student may withdraw themselves from a class they are enrolled in (the group-class page shows a Withdraw button). A timely withdrawal frees the seat and voids any pending payment but never issues an account credit — a clean exit, not a refund. After the deadline self-withdrawal closes (403 withdrawal_closed) and a studio admin must withdraw the student by hand from the student detail page; the admin path is never subject to the deadline. Unlike the enrolment deadline it has no implicit default — a blank deadline keeps self-withdrawal open indefinitely.us_offerings.withdrawal_deadlinecolumn;Offeringgains$withdrawalDeadline+isWithdrawalOpen().POST /enrollments/{id}/withdrawendpoint: deadline-gated, ownership-checked, idempotent for already-cancelled enrolments.2. Kind-aware offering form
The Add/Edit Offering form now shows only the fields relevant to the selected kind — group settings (capacity, dates, times, enrolment/withdrawal deadlines, sessions, schedule note, invite-only) for group classes, and the weekly-reservation option for private lessons. Progressive enhancement: without JS every field still renders.
Notes
USC_VERSIONbump.Schema.phpchanged, but 1.2.0 is unreleased and its other schema features (scheduled billing, credits) accumulated under the same section without bumping; bumping now would misalign the release workflow. Existing sites (on 1.1.1) pick up the column on the 1.2.0 upgrade.Tests
composer test— 596 tests passcomposer lint(PHPStan level 10) — cleancomposer cs(PHPCS) — clean🤖 Generated with Claude Code
Group classes now carry an optional per-class withdrawal deadline. Up to that day a student may withdraw themselves from the class; the withdrawal frees the seat and voids any pending payment but never issues an account credit. After the deadline self-withdrawal closes and a studio admin must withdraw the student by hand (the admin path is never subject to the deadline). A blank deadline keeps self-withdrawal open indefinitely. Also make the Add/Edit Offering form show only the fields relevant to the selected kind: group settings for group classes, weekly reservation for private lessons. Progressive enhancement — without JS every field renders. - New nullable us_offerings.withdrawal_deadline column; Offering model gains $withdrawalDeadline + isWithdrawalOpen(). - New student endpoint POST /enrollments/{id}/withdraw, gated by the deadline (403 withdrawal_closed), ownership-checked, idempotent. - Front-end group-class page shows a Withdraw button while open. - No USC_VERSION bump: 1.2.0 is unreleased and accumulates schema changes under its section, matching the scheduled-billing and credit features. Tests: composer test (596), composer lint, composer cs all pass. Co-Authored-By: Claude Opus 4.8 <[email protected]>