laravel-9-noteslisted
Install: claude install-skill hmj1026/dhpk
# Laravel 9 — PHP 8 floor, Symfony 6, Flysystem 3
Released **February 2022** (Laravel skipped September 2021 to align
with Symfony 6's release). PHP 8.0+ floor — the major PHP bump.
---
## Signature features
### Anonymous migrations
```php
// database/migrations/2022_01_01_000000_add_status_to_orders.php
return new class extends Migration {
public function up(): void
{
Schema::table('orders', function (Blueprint $table) {
$table->string('status')->default('pending');
});
}
};
```
**Why this matters**: pre-9.0 migrations were named classes
(`AddStatusToOrders`). Re-running `make:migration` for the same column
in a different version produced class-name collisions, especially when
squashing schemas. Anonymous classes side-step the entire collision
class.
New migrations should use this form. Old named-class migrations still
work; no need to rewrite them.
### Symfony Mailer (Swift Mailer removed)
```php
// Same Mailable API as before
Mail::to($user)->send(new OrderShipped($order));
```
Underneath, Swift Mailer was replaced by Symfony Mailer. User-facing
API is mostly identical, but **custom transports** must be reimplemented
against `Symfony\Component\Mailer\Transport\TransportInterface`.
### Flysystem 3 (breaking changes)
Storage facade still works, but underneath:
- **Visibility constants** moved:
`AdapterInterface::VISIBILITY_PUBLIC` → `Visibility::PUBLIC`
- **Exceptions** changed: `FileNotFoundException` is gone; catch
`