The following hooks now have oop replacements.
- hook_uninstall
- hook_install
- hook_update_last_removed
- hook_schema
If the OOP replacement exists, then the procedural implementation will not run.
There are four new interfaces for replacing this functionality in classes. The interface and the namespace are fixed.
Drupal\Core\Extension\Install\UninstallInterface
Drupal\Core\Extension\Install\InstallInterface
Drupal\Core\Extension\Install\LastRemovedInterface
Drupal\Core\Extension\Install\SchemaInterface
Before
hook_uninstall
After
Implement UninstallInterface in src/Install/Uninstaller
Before
hook_install
After
Implement InstallInterface in src/Install/Installer
Before
hook_update_last_removed
After
Implement LastRemovedInterface in src/Install/LastRemoved
Before
hook_schema
After
Implement SchemaInterface in src/Install/Schema