By bradjones1 on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.4.x, 11.x
Introduced in version:
10.4.0, 11.1.0
Issue links:
Description:
Destructable services now support a priority attribute to the current needs_destruction tag which allows control over the order in which services are destroyed during completion of a request. Services with higher priority are called earlier.
See the Drupal\performance_test\PerformanceDataCollector service for an example:
services:
Drupal\performance_test\PerformanceDataCollector:
tags:
- { name: event_subscriber }
- { name: needs_destruction, priority: -1000 }
Impacts:
Module developers