ycloudyusa / useless_machines
Modules that turn themselves off.
Package info
github.com/YCloudYUSA/useless_machines
Type:drupal-module
pkg:composer/ycloudyusa/useless_machines
Requires
- drupal/core: ^11 || ^12
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
- drupal/admin_toolbar: *
- drupal/blazy: *
- drupal/groupexpro: *
- drupal/jquery_ui_autocomplete: *
- drupal/jquery_ui_menu: *
- drupal/jquery_ui_tabs: *
- drupal/jquery_ui_tooltip: *
- drupal/jquery_ui_touch_punch: *
- drupal/openy_gxp: *
- drupal/slick: *
- drupal/slick_views: *
- drupal/toolbar: *
- drupal/video_embed_field: *
Replaces
This package is auto-updated.
Last update: 2026-12-02 14:32:58 UTC
README
useless_machines
Modules that turn themselves off.
A useless machine or useless box is a device whose only function is to turn itself off.
-- Wikipedia
What a stub is
A stub is a module with the machine name of a module that was removed from your site's code. Your database still lists the removed module as enabled, and Drupal cannot update a site with a missing module (troubleshooting). The stub fills that name with an empty module that uninstalls itself on drush updb and takes the module out of the configuration.
A stub is two files in a directory named like the module:
toolbar/toolbar.info.yml
toolbar/toolbar.post_update.php
name: toolbar type: module description: Dummy module to replace toolbar. package: Useless Machines core_version_requirement: ^12
/** * Uninstall me. */ function toolbar_post_update_uninstall() { \Drupal::service('module_installer')->uninstall(['toolbar']); }
Current stubs: toolbar, admin_toolbar, admin_toolbar_tools, openy_gxp, openy_group_schedules, openy_prgf_group_schedules, jquery_ui_autocomplete, jquery_ui_menu, blazy, blazy_ui, blazy_layout, slick, slick_ui, slick_views, video_embed_field, video_embed_media, video_embed_wysiwyg, vem_migrate_oembed, openy_tour, jquery_ui_touch_punch, jquery_ui_tabs, jquery_ui_tooltip.
Add a stub
- Create the directory and the two files above, with the module's machine name everywhere (the post update function is
<module>_post_update_<name>). - A stub never admits a core where the real module still exists.
toolbaris a core module on Drupal 11,openy_prgf_group_schedulesandopeny_tourare shipped by released versions of their packages that run on 11, so those stubs saycore_version_requirement: ^12; a stub of a module that Drupal 11 already removed may say^11 || ^12. - If the module also exists as a Composer package, add
"drupal/<package>": "*"toconflictincomposer.jsonin the same commit. Composer then refuses a project that has both the stub and the real module. A submodule needs no entry of its own: its package is already listed. - Release a new major or minor version.
A module that owns data (a content entity type, fields) needs an update function that removes that data before the uninstall; see groupex_form_cache in the 2.x releases for an example.
Keep a stubbed module
A package that requires useless_machines cannot be installed together with the real module of a stub (conflict, and the same machine name). To keep one:
- fork this repository
- remove the module's directory
- remove its package from the
conflictsection incomposer.json
- swap out your fork by using an inline alias in your project's
composer.json.