| 1 |
# Changelog |
| 2 |
|
| 3 |
All Notable changes to `League\Container` will be documented in this file |
| 4 |
|
| 5 |
## 4.2.5 |
| 6 |
|
| 7 |
### Fixed |
| 8 |
- Restored ability to perform recursive definition search. (@spider-mane) |
| 9 |
|
| 10 |
## 4.2.4 |
| 11 |
|
| 12 |
### Fixed |
| 13 |
- Now properly handle string based fully qualified class names in with preceding slashes. (@M1ke) |
| 14 |
|
| 15 |
## 4.2.3 |
| 16 |
|
| 17 |
### Fixed |
| 18 |
- Warnings for PHP 8.4 implicit nullable types (@andypost) |
| 19 |
|
| 20 |
## 4.2.1 |
| 21 |
|
| 22 |
### Fixed |
| 23 |
- Remove an unnecessary conditional in ServiceProviderAggregate. (@SubhanSh) |
| 24 |
- Fixed an infinite loop in resolving definitions. (@arai-ta) |
| 25 |
|
| 26 |
## 4.2.0 |
| 27 |
|
| 28 |
### Added |
| 29 |
- Support for psr/container 1.1.0. |
| 30 |
|
| 31 |
## 4.1.2 |
| 32 |
|
| 33 |
### Fixed |
| 34 |
- Fix bug that was causing an error on inflection due to introduced type hint. |
| 35 |
|
| 36 |
## 4.1.1 |
| 37 |
|
| 38 |
### Changed |
| 39 |
- Move files autoload directive to dev (@ADmad) |
| 40 |
|
| 41 |
## 4.1.0 |
| 42 |
|
| 43 |
### Added |
| 44 |
- Way to handle non-public controllers safely (@beryllium) |
| 45 |
|
| 46 |
## 4.0.0 |
| 47 |
|
| 48 |
### Added |
| 49 |
- New definition interface that extends psr/container |
| 50 |
- Literal and resolvable argument wrappers for better explicitness in definitions |
| 51 |
|
| 52 |
### Changed |
| 53 |
- PHP requirement now `>=7.2` |
| 54 |
- Updated `psr/container` to ^2.0.0 |
| 55 |
- `Container::shared` convenience method is now explicit `Container::addShared` method |
| 56 |
- Removed third argument `$shared` from `Container::add`, use `Container::addShared` |
| 57 |
- `ServiceProviderInterface` now defines return types |
| 58 |
- Service providers now require implementation of a `provides` method rather than relying on a class property. |
| 59 |
|
| 60 |
## 3.4.1 |
| 61 |
|
| 62 |
### Added |
| 63 |
- Way to handle non-public controllers safely (@beryllium) |
| 64 |
- PHPUnit ^7.0 for PHP versions that support it (@beryllium) |
| 65 |
|
| 66 |
## 3.4.0 |
| 67 |
|
| 68 |
### Removed |
| 69 |
- Support for `psr/container` ^2.0.0 as the interface cannot be reconciled between versions |
| 70 |
|
| 71 |
## 3.3.5 |
| 72 |
|
| 73 |
### Added |
| 74 |
- Support for `psr/container` ^2.0.0 |
| 75 |
|
| 76 |
## 3.3.4 |
| 77 |
|
| 78 |
### Fixed |
| 79 |
- Fixed an issue that caused a recursive `register` call. @pcoutinho |
| 80 |
- Fixed a return type declaration. @orbex |
| 81 |
|
| 82 |
## 3.3.3 |
| 83 |
|
| 84 |
### Fixed |
| 85 |
- Fixed bug relating to `ReflectionContainer::call` on arrow functions. |
| 86 |
|
| 87 |
## 3.3.2 |
| 88 |
|
| 89 |
### Added |
| 90 |
- Experimental support for PHP 8. |
| 91 |
|
| 92 |
### Fixed |
| 93 |
- Fix issue when preventing reflection from using default value for arguments. |
| 94 |
|
| 95 |
## 3.3.1 |
| 96 |
|
| 97 |
### Fixed |
| 98 |
- Respect `$new` argument when getting tagged definitions. |
| 99 |
|
| 100 |
## 3.3.0 |
| 101 |
|
| 102 |
### Added |
| 103 |
- Support for PHP 7.3 |
| 104 |
- `{set,get}LeagueContainer` methods added to ContainerAwareTrait as a temporary measure until next major release when this can be properly addressed, less hinting of `Psr\Container\ContainerInterface` |
| 105 |
|
| 106 |
### Changed |
| 107 |
- Various internal code improvements |
| 108 |
|
| 109 |
### Fixed |
| 110 |
- Fix for `setConcrete` not re-resolving class on when overriding (@jleeothon) |
| 111 |
- Fix stack overflow error incase a service provider lies about providing a specific service (@azjezz) |
| 112 |
- Fix issue where providers may be aggregated multiple times (@bwg) |
| 113 |
- Various documentation fixes |
| 114 |
|
| 115 |
## 3.2.2 |
| 116 |
|
| 117 |
### Fixed |
| 118 |
- Fixed issue that prevented service providers from registering if a previous one in the aggregate was already registered. |
| 119 |
|
| 120 |
## 3.2.1 |
| 121 |
|
| 122 |
### Fixed |
| 123 |
- Fixed issue where all service providers were registered regardless of whether they need to be. |
| 124 |
|
| 125 |
## 3.2.0 |
| 126 |
|
| 127 |
### Added |
| 128 |
- Added ability to add definition as not shared when container is set to default to shared. |
| 129 |
- Added `{set|get}Concrete` to definitions to allow for better use of `extend`. |
| 130 |
|
| 131 |
## 3.1.0 |
| 132 |
|
| 133 |
### Added |
| 134 |
- Re-added the `share` proxy method that was mistakenly removed in previous major release. |
| 135 |
- Added ability to set Container to "share" by default using `defaultToShared` method. |
| 136 |
- Added ability for `ReflectionContainer` to cache resolutions and pull from cache for following calls. |
| 137 |
|
| 138 |
## 3.0.1 |
| 139 |
|
| 140 |
### Added |
| 141 |
- Allow definition aggregates to be built outside of container. |
| 142 |
|
| 143 |
## 3.0.0 |
| 144 |
|
| 145 |
### Added |
| 146 |
- Service providers can now be pulled from the container if they are registered. |
| 147 |
- Definition logic now handled by aggregate for better separation. |
| 148 |
- Now able to add tags to a definition to return an array of items containing that tag. |
| 149 |
|
| 150 |
### Changed |
| 151 |
- Updated minimum PHP requirements to 7.0. |
| 152 |
- Now depend directly on PSR-11 interfaces, including providing PSR-11 exceptions. |
| 153 |
- Refactored inflector logic to accept type on construction and use generator to iterate. |
| 154 |
- Refactored service provider logic with better separation and performance. |
| 155 |
- Merged service provider signature logic in to one interface and abstract. |
| 156 |
- Heavily simplified definition logic providing more control to user. |
| 157 |
|
| 158 |
## 2.4.1 |
| 159 |
|
| 160 |
### Fixed |
| 161 |
- Ensures `ReflectionContainer` converts class name in array callable to object. |
| 162 |
|
| 163 |
## 2.4.0 |
| 164 |
|
| 165 |
### Changed |
| 166 |
- Can now wrap shared objects as `RawArgument`. |
| 167 |
- Ability to override shared items. |
| 168 |
|
| 169 |
### Fixed |
| 170 |
- Booleans now recognised as accepted values. |
| 171 |
- Various docblock fixes. |
| 172 |
- Unused imports removed. |
| 173 |
- Unreachable arguments no longer passed. |
| 174 |
|
| 175 |
## 2.3.0 |
| 176 |
|
| 177 |
### Added |
| 178 |
- Now implementation of the PSR-11. |
| 179 |
|
| 180 |
## 2.2.0 |
| 181 |
|
| 182 |
### Changed |
| 183 |
- Service providers can now be added multiple times by giving them a signature. |
| 184 |
|
| 185 |
## 2.1.0 |
| 186 |
|
| 187 |
### Added |
| 188 |
- Allow resolving of `RawArgument` objects as first class dependencies. |
| 189 |
|
| 190 |
### Changed |
| 191 |
- Unnecessary recursion removed from `Container::get`. |
| 192 |
|
| 193 |
## 2.0.3 |
| 194 |
|
| 195 |
### Fixed |
| 196 |
- Bug where delegating container was not passed to delegate when needed. |
| 197 |
- Bug where `Container::extend` would not return a shared definition to extend. |
| 198 |
|
| 199 |
## 2.0.2 |
| 200 |
|
| 201 |
### Fixed |
| 202 |
- Bug introduced in 2.0.1 where shared definitions registered via a service provider would never be returned as shared. |
| 203 |
|
| 204 |
## 2.0.1 |
| 205 |
|
| 206 |
### Fixed |
| 207 |
- Bug where shared definitions were not stored as shared. |
| 208 |
|
| 209 |
## 2.0.0 |
| 210 |
|
| 211 |
### Added |
| 212 |
- Now implementation of the container-interop project. |
| 213 |
- `BootableServiceProviderInterface` for eagerly loaded service providers. |
| 214 |
- Delegate container functionality. |
| 215 |
- `RawArgument` to ensure scalars are not resolved from the container but seen as an argument. |
| 216 |
|
| 217 |
### Altered |
| 218 |
- Refactor of definition functionality. |
| 219 |
- `Container::share` replaces `singleton` functionality to improve understanding. |
| 220 |
- Auto wiring is now disabled by default. |
| 221 |
- Auto wiring abstracted to be a delegate container `ReflectionContainer` handling all reflection based functionality. |
| 222 |
- Inflection functionality abstracted to an aggregate. |
| 223 |
- Service provider functionality abstracted to an aggregate. |
| 224 |
- Much bloat removed. |
| 225 |
- `Container::call` now proxies to `ReflectionContainer::call` and handles argument resolution in a much more efficient way. |
| 226 |
|
| 227 |
### Removed |
| 228 |
- Ability to register invokables, this functionality added a layer of complexity too large for the problem it solved. |
| 229 |
- Container no longer accepts a configuration array, this functionality will now be provided by an external service provider package. |
| 230 |
|
| 231 |
## 1.4.0 |
| 232 |
|
| 233 |
### Added |
| 234 |
- Added `isRegisteredCallable` method to public API. |
| 235 |
- Invoking `call` now accepts named arguments at runtime. |
| 236 |
|
| 237 |
### Fixed |
| 238 |
- Container now stores instantiated Service Providers after first instantiation. |
| 239 |
- Extending a definition now looks in Service Providers as well as just Definitions. |
| 240 |
|
| 241 |
## 1.3.1 - 2015-02-21 |
| 242 |
|
| 243 |
### Fixed |
| 244 |
- Fixed bug where arbitrary values were attempted to be resolved as classes. |
| 245 |
|
| 246 |
## 1.3.0 - 2015-02-09 |
| 247 |
|
| 248 |
### Added |
| 249 |
- Added `ServiceProvider` functionality to allow cleaner resolving of complex dependencies. |
| 250 |
- Added `Inflector` functionality to allow for manipulation of resolved objects of a specific type. |
| 251 |
- Improvements to DRY throughout the package. |
| 252 |
|
| 253 |
### Fixed |
| 254 |
- Setter in `ContainerAwareTrait` now returns self (`$this`). |
| 255 |
|
| 256 |
## 1.2.1 - 2015-01-29 |
| 257 |
|
| 258 |
### Fixed |
| 259 |
- Allow arbitrary values to be registered via container config. |
| 260 |
|
| 261 |
## 1.2.0 - 2015-01-13 |
| 262 |
|
| 263 |
### Added |
| 264 |
- Improvements to `Container::call` functionality. |
| 265 |
|
| 266 |
### Fixed |
| 267 |
- General code tidy. |
| 268 |
- Improvements to test suite. |
| 269 |
|
| 270 |
## 1.1.1 - 2015-01-13 |
| 271 |
|
| 272 |
### Fixed |
| 273 |
- Allow singleton to be passed as method argument. |
| 274 |
|
| 275 |
## 1.1.0 - 2015-01-12 |
| 276 |
|
| 277 |
### Added |
| 278 |
- Addition of `ContainerAwareTrait` to provide functionality from `ContainerAwareInterface`. |
| 279 |
|
| 280 |
## 1.0.0 - 2015-01-12 |
| 281 |
|
| 282 |
### Added |
| 283 |
- Migrated from [](https://github.com/orno/diOrno\Di](https://github.com/orno/di](https://github.com/orno/di). |