It's time! Finally a 1.0.0 release, locking the interface in place for at least a while.
Changes
- Completed the
README
. clear()
no longer throws on a non-stored instance, since the expected result (that instance no longer being stored) is met.NotFoundException
renamed toInstanceNotFoundException
for clarity.- Added
unmap(string $requested): void
to unmap and clear any mapped instance. - Improved
clearExcept()
to useclear()
so it also unsets any existing relationships.
Changes
- Add static analysis using psalm.
Fixes
- Small fix for the new php8 reflection types.
Changes
- Dropped support for php7, php8 only from now on.
Changes
ReflectionParameter::getClass()
is deprecated in php 8+, so reworked to useReflectionParameter::getType()
instead.
Changes
normalize()
now also trims the provided string of whitespace first.
Changes
- Remove
object
return type hinting, since it didn't actually help. - Thanks to @dmvdbrugge,
dynamicReturnTypeMeta.json
has been replaced by the PhpStorm-native.phpstorm.meta.php
. See PR #1.
Changes
- Scalar parameters can now also be handled, but only if they are considered optional. This means after any required parameters, and with a default value.
Changes
- Define strict types.
Bugfixes
- Fixed bug where in some cases, an un-injectable parameter's type could not be established.
Changes
STORED_DEPENDENCIES
andNEW_DEPENDENCIES
are nowUSE_STORED_DEPENDENCIES
andUSE_NEW_DEPENDENCIES
, for clarity.
Bugfixes
clearRelationship()
had a bug where right-hand relationships weren't being cleared, leading to more class names being stored than necessary.
Bugfixes
- Calling
map()
will now also normalize the names provided. - Fixed type hint for
$maps
.
Changes
- Removed obsolete doc block annotations for params.
- Added dynamic return type config.
Changes
- Added
map(string $requested, string $replacement)
. This way, you can set replacement instantiating names beforehand, which only get resolved once the original name is retrieved.
Changes
- First release.