- How do I install escolalms/courses in a Laravel application?
- Install it with Composer using composer require escolalms/courses, then publish any package config and migrations and run php artisan migrate. The package is a standard Laravel package with a service provider, so verify whether auto-discovery or explicit registration is used in your app. It also assumes EscolaLMS core contracts and related packages such as escolalms/core and escolalms/auth are available.
- Which Laravel and PHP versions does escolalms/courses support?
- The package is evaluated against Laravel 8 through 10 and PHP 8.x, typically on MySQL or Postgres. Always check the composer.json constraints for the exact release you install, especially because the package is still on a 0.x version line. Pin an exact version such as 0.4.45 while validating compatibility with your host application.
- What models and domain objects does escolalms/courses provide?
- It models courses, chapters, lessons, topics, prerequisites, and assignments. The architecture uses contract-bound repositories and Eloquent models, with APIs exposing course data to a decoupled front end. This makes it suitable for modular Laravel monoliths or API backends that already use EscolaLMS core contracts and events.
- How does enrollment and course assignment work in escolalms/courses?
- The package handles enrollment and course assignment through Eloquent models and domain events, including CourseAssigned. In version 0.4.45, the existing CourseAssigned listener was changed so a deadline is recalculated when a course is assigned. Review how your application consumes the assignment deadline because notifications, reminders, certificates, and exam windows may depend on it.
- What changed in escolalms/courses 0.4.45 for CourseAssigned deadlines?
- Version 0.4.45 changes the behavior of an existing CourseAssigned event listener so that a deadline is recalculated when a course is assigned. It does not advertise new endpoints, config keys, or dependencies, so the integration work is mainly verification. Confirm whether the listener is auto-discovered or explicitly registered, whether it runs synchronously or queued, and what source the deadline is derived from. Read the upstream diff and PR rather than relying only on the one-line release note.
- Is the CourseAssigned deadline recalculation in escolalms/courses 0.4.45 idempotent?
- Idempotency is not documented in the release note, so duplicate or retried CourseAssigned events may recalculate a deadline more than once. That could extend or shorten an existing enrollment deadline depending on whether the calculation is absolute or additive. Add tests for repeated events and consider guards in your integration if deadlines must remain stable.
- How should I handle timezones for course deadlines in escolalms/courses?
- Deadline arithmetic on Carbon instances commonly causes off-by-hours drift when the application timezone and course timezone differ. Confirm whether the deadline source uses the assignment timestamp, course term dates, or a course-level setting, and normalize comparisons in UTC where possible. Test DST boundaries and cross-timezone enrollments in staging before production.
- Does upgrading to escolalms/courses 0.4.45 require migrations or backfills for existing enrollments?
- The 0.4.45 change is described as a write-path listener behavior change, not a schema change, but you should still verify whether any migration shipped. Existing assignments may be affected when the listener next runs, and no backfill is documented. Run php artisan migrate and validate with seeded enrollments in staging to see whether deadlines are rewritten retroactively.
- How do I test course enrollment and deadline changes in escolalms/courses?
- Seed representative enrollments in staging, dispatch or trigger CourseAssigned, and assert the resulting deadline against the authoritative source. Check whether the listener is queued, restart workers, and retest duplicate or retried events. Also verify that reminder jobs and downstream packages read the updated deadline rather than a stale value.
- What should I consider before using escolalms/courses in production?
- Because the package is 0.x, semver guarantees are weak and patch releases can carry behavior changes, so pin an exact version while validating. It fits a modular Laravel backend that already uses escolalms/core, escolalms/auth, and optionally escolalms/payments or escolalms/certificates. Re-validate sibling packages that pin escolalms/courses, and review how deadlines affect notifications, certificates, and exam windows. Treat upgrades as change-impact reviews rather than routine Composer updates.