# Migration Guide: 9.9.0 → 9.9.1

Version **9.9.1** is a maintenance release that fixes an issue in the automatic migration system introduced in Osumi Framework 9.9.0.

No application code changes are required when upgrading from 9.9.0 to 9.9.1.

---

## Summary

9.9.1 fixes the detection of routes that already use native Middleware phase constants such as:

```php
OMiddleware::PHASE_BEFORE
OMiddleware::PHASE_AFTER_RENDER
OMiddleware::PHASE_AFTER_RESPONSE
```

In 9.9.0, an already migrated route such as:

```php
ORoute::get(
    '/profile',
    ProfileComponent::class,
    [
        OMiddleware::PHASE_BEFORE => [
            LoginMiddleware::class
        ]
    ]
);
```

could be incorrectly interpreted by the legacy Filter migration as a Filter definition.

This could cause an error similar to:

```text
Legacy route contains a Filter expression that cannot be migrated automatically.
Use only ClassName::class entries.
```

9.9.1 corrects this detection so routes that already use native Middleware phase constants are recognized as already migrated and are left unchanged.

---

## Application changes

None.

There are:

- no API changes;
- no configuration changes;
- no database changes;
- no changes required in routes;
- no changes required in Middlewares;
- no changes required in DTOs.

Existing applications running correctly on 9.9.0 can update directly to 9.9.1.

---

## Framework migrations

Version 9.9.1 does **not** add a new framework migration step.

The latest migration step remains:

```text
9.9.0
```

Therefore it is normal for an application using Osumi Framework 9.9.1 to have:

```json
{
    "last_migrated": "9.9.0"
}
```

in:

```text
ofw/tmp/state.json
```

The state stores the latest migration step that has been executed, not necessarily the exact installed framework version.

For a new project installed directly with 9.9.1, the migration runner may execute:

```text
0.0.0 → 9.9.1
```

and apply the existing `9.9.0` migration step when required.

---

## Updating

Update the framework normally with Composer:

```bash
composer update osumionline/framework --with-dependencies
```

No additional action is required.
