# Migration Guide: 9.8.3 → 9.8.4

Version **9.8.4** includes an HTTP status correction and improvements to route prefix handling and URL normalization.

---

## Summary

### Added

- This migration guide.

### Changed

- `getHttpStatus()` now recognizes the `401 Unauthorized` status.
- `ORoute::prefix()` and `ORoute::group()` now support nesting.
- URLs registered with the static `ORoute` methods are normalized to remove duplicate and trailing slashes.

### Removed

- Nothing removed.

---

## Impact on Existing Projects

- No changes to existing route declarations are required.
- Nested route prefixes and groups now produce cumulative paths.
- Route URLs with repeated or trailing slashes are normalized consistently.
- No configuration, database, or CLI changes are required.

For example, nested prefixes:

```php
ORoute::prefix('/api', function(): void {
	ORoute::get('/health', HealthComponent::class);

	ORoute::prefix('/admin', function(): void {
		ORoute::post('/login', LoginComponent::class);
		ORoute::get('/me', MeComponent::class, [AdminAuthFilter::class]);
	});
});
```

Register these routes:

- `/api/health`
- `/api/admin/login`
- `/api/admin/me`

Route URLs are also normalized. For example:

```php
ORoute::prefix('/api/', function(): void {
	ORoute::prefix('//admin///', function(): void {
		ORoute::get('//users/', UsersComponent::class);
	});
});
```

Registers the route as:

- `/api/admin/users`

URL normalization is applied by the static `ORoute` methods `get()`, `post()`, `put()`, `delete()`, `view()`, `group()`, and `prefix()`.

## Purpose of This Update

This release aims to:

- Return the correct HTTP status string for `401 Unauthorized` instead of falling back to `200 OK`.
- Allow nested route prefixes and groups and consistently normalize route URLs.

---

## Backward Compatibility

Existing route declarations remain compatible. Route URLs containing duplicate or trailing slashes are now normalized to a single canonical path. Applications that rely on those slashes being significant should review their route definitions.

---

## Developer Action Required

No action is required for typical applications. Review any route definitions that rely on duplicate or trailing slashes.

---

## Notes

No database migration is required.
