Migration guide
🟢 Improved exception types DX (Impact: minor)
The custom $message property has been removed from custom exceptions. Use the getMessage() method instead:
try {
// ...
} catch (\Meilisearch\Exceptions\ApiException $e) {
// Before (v1.x)
echo $e->message;
// After (v2.x)
echo $e->getMessage();
}Also:
- Exception classes are now final
- Exception public properties are now read-only and strictly typed.
- The
rethrowWithHintstatic method now returns a\RuntimeExceptioninstead of a generic\Exception.
⚠️ Breaking changes
🚀 Enhancements
⚙️ Maintenance/misc
Thanks to @Strift and @norkunas! 🎉
See full changelog: v2.0.0-beta.2...v2.0.0-beta.3