# Upgrade Notes

## Upgrading jetpack-autoloader to v6

This package requires `automattic/jetpack-autoloader: ^6.0`.
Plugins built on the WordPress Plugin Boilerplate typically ship with `^3.0`.

### Steps

1. Open your plugin's `composer.json` and change the constraint:

```json
"automattic/jetpack-autoloader": "^6.0"
```

2. Run the update:

```bash
composer update automattic/jetpack-autoloader
```

3. **No code changes needed.** The v6 autoloader still generates
   `vendor/autoload_packages.php` which your plugin already loads via:

```php
require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload_packages.php';
```

4. Commit the updated `composer.json` and `composer.lock`.

### Why the bump?

`acrossai-co/main-menu` uses features in jetpack-autoloader v6 that
are not available in v3. Because Composer requires all packages in the
dependency tree to satisfy a single resolved version, your root
`composer.json` must allow v6.

### Compatibility

jetpack-autoloader v6 is backwards-compatible with v3/v5 for all standard
usage patterns. If you experience any issues after upgrading, check:
- PHP version: this package requires PHP ≥ 8.1; make sure your plugin's
  `composer.json` platform constraint allows it
- That every plugin shipping this package is updated together, since the
  highest-version copy of the autoloader is the one that boots
