piotrkreft/eager-resettable-services-bundle

Flexible management of Symfony resettable services

v0.2.0 2020-06-19 20:11 UTC

This package is auto-updated.

Last update: 2024-05-22 18:27:47 UTC


README

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.