Remove a Layer
osdd:remove refuses a layer that another layer still requires. Remove a layer in this order.
Find who depends on it
php artisan osdd:graph
php artisan osdd:list
osdd:graph shows the layers that require functional/legacy; the Requires row of osdd:list shows the same for each layer.
Cut the dependencies
In each of those layers, remove the code that uses functional/legacy, then its requirement from composer.json. osdd:check tells you when the code is clean:
php artisan osdd:check
Remove the layer
php artisan osdd:remove functional/legacy
The command prints every change, asks for confirmation, then removes the layer from the root composer.json and phpunit.xml and deletes its directory. Pass --keep-files to keep the directory. In a script, pass --force --composer-update.
Run Composer right away
composer update functional/legacy
Until Composer runs, Laravel's package manifest still lists the deleted layer's provider, and every artisan command fails with a class-not-found error.
Rebuild the caches
When config, routes or events are cached, run php artisan optimize again: those caches still name the layer's classes.
Drop its tables
The tables of the layer's migrations stay in the database. Drop them with a migration in another layer when they are no longer needed.
See osdd:remove for every option and message.