The SkinTemplateToolboxEnd hook should be marked as deprecated given that the SidebarBeforeOutput hook has now been expanded to allow modification of the toolbox.
It is identified as a hack in the code:
```
// HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
$hookContents = null;
if ( isset( $boxes['TOOLBOX'] ) ) {
ob_start();
// We pass an extra 'true' at the end so extensions using BaseTemplateToolbox
// can abort and avoid outputting double toolbox links
// Avoid PHP 7.1 warning from passing $this by reference
$template = $this;
Hooks::run( 'SkinTemplateToolboxEnd', [ &$template, true ] );
$hookContents = ob_get_contents();
ob_end_clean();
if ( !trim( $hookContents ) ) {
$hookContents = null;
}
}
// END hack
```
Before we can mark this as deprecated we will have to patch the skins that are deployed into production to support the SidebarBeforeOutput hook
= Acceptance criteria
[x] The usage of ShortUrl in SkinTemplateToolboxEnd has been removed (note ShortUrl already uses SidebarBeforeOutput hook for upgraded skins
[x] Modern is patched to support the SidebarBeforeOutput hook for toolbox [1][2]
[x] Monobook is patched to support the SidebarBeforeOutput hook for toolbox [1][3]
[x] Timeless is patched to support the SidebarBeforeOutput hook T254419 https://gerrit.wikimedia.org/r/602458
[x] CologneBlue is patched to support the SidebarBeforeOutput hook for toolbox (` $bar['tb'] = $this->getToolbox();` is replaced with `$bar['tb'] = $data;`
[x] Modern no longer runs SkinTemplateToolboxEnd hook itself https://gerrit.wikimedia.org/r/c/602760
[x] Monobook no longer runs SkinTemplateToolboxEnd https://gerrit.wikimedia.org/r/c/602762
[] Vector should no longer run SkinTemplateToolboxEnd
[] The BaseTemplateToolbox hook is soft deprecated (T253416)
[] Monobook no longer runs MonoBookTemplateToolboxEnd
[] Modern no longer runs MonoBookTemplateToolboxEnd
[] The SkinTemplateToolboxEnd hook is marked as deprecated in core.
[] Hard deprecate BaseTemplate::getToolbox
[1] For modern and Monobook we'll need to remove:
```
if ( !isset( $sidebar['TOOLBOX'] ) ) {
$sidebar['TOOLBOX'] = true;
}
```
[2] For Modern pass the data to its toolbox method rather than calling `$this->getToolbox() `
```
$this->toolbox( $content );
```
[3] For Monobook pass the data to the toolbox via $this->getToolboxBox rather than calling `$this->getToolbox() `