Tags: rmp-up/wp-di
Tags
WordPress Dependency Injection now offers a Factory for some Provider… … and (more important) a centralized container that can be reused among all plugins/themes: ```php <?php RmpUp\WpDi\WpDi::load( require 'services.php' ); $container = RmpUp\WpDi\WpDi::pimple(); ``` Reusing an already existing container and the existing provider (by using the `::load()`-Method) greatly enhances the performance. Other changes: * Features * Preload core files using "preload.php" (esp. for the PHP 7.4 feature) to increase performance. * Loader: The static WpDi::loader() helps to fasten up loading * Introduced a factory for easier provider creation * Bugfixes * An argument-string can now have a leading "@" char without the service needed to exist. * Backward incompatibility / deprecations * Get rid of ServiceProviderInterface to switch to a more tree-like provider/parser. * Drop Provider::register methods to no decouple PSR11 and pimple for more flexibility. * Template references now must have a percentage sign "%" as pre- and suffix * Removed all sanitizer which need some rework towards a layer that can be cached. * Replaced LazyService with LazyPimple to decouple from PSR11 for more flexibility. * Dropped various internal deprecated structures. * Quality assuarance * Performance profiling using xhprof * Fixed some IDE warnings like typo and inspections.
Yaml: Escape leading At-Char Some string-values want to have an At-Char in the beginning. This would lead to a service and an exception when this service does not exist. To allow an At-Char for String-Values we consider "@@" as escaping in the beginning of the string.
release: 0.7.4 * phpcs: Conditions more explicit * qa: Fixed warnings as reported by the IDE * qa: Fixed some typos * doc: Enhanced documentation of new features * qa: Re-enable code coverage monitoring * qa: Updated to phpStan 0.12 to enhance code over time
PreviousNext