Skip to content

Flexible management of Symfony resettable services

License

Notifications You must be signed in to change notification settings

piotrkreft/eager-resettable-services-bundle

Repository files navigation

Eager resettable services bundle

CI Coverage Status Mutation testing badge Scrutinizer Code Quality

Symfony bundle for eager instantiating resettable services.

Introduction

For some edge cases it might be required that service gets reset regardless of being referenced by other services.

An example of that would be doctrine Registry holding Entity Managers. It does not reset managers unless it is being referenced by other services and therefore instantiated by the container.

This bundle by the configuration allows you to reconfigure services to be eagerly instantiated within Services Resetter.

Installation

composer require piotrkreft/eager-resettable-services-bundle

Usage

example configuration

Alternatively all services can be eager loaded wth all_services configuration flag.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see LICENSE for more information.