Currently, if the dependencies of a migration cannot be satisfied, that migration will not be run and any operation trying to apply the migration will succeed without notifying the user that it skipped something. This causes unwanted behavior when, for example, an extension is enabled and not all dependencies of the migration adding the necessary database tables are met. The extension will enable without apparent problems, but fail whenever it tries to access the database.
To prevent this behavior, it is desirable that some kind of notice about the skipping is given to the user unless the migration author explicitly suppresses this. On #phpBB-dev it was suggested that there should be multiple types of dependencies to discern between dependencies that should fail silently and noisily.
Ticket: http://tracker.phpbb.com/browse/PHPBB3-11627
[RFC] Notify the user of skipped migrations due to missing dependencies unless explicitly suppressed
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC] Notify the user of skipped migrations due to missing dependencies unless explicitly suppressed
I agree that we should differentiate between dependencies that can be skipped and dependencies that are actually dependencies. In both cases, the person installing the extension should be notified and, in the former case, should be given the option to either continue or abort (revert any changes that have been made) installation. The latter case would automatically abort and display a failure message. We should default to the latter but allow extension authors to specify that a given dependency can be missing.