Releases: salient-labs/toolkit
Releases · salient-labs/toolkit
v0.21.41
v0.21.40
v0.21.39
Added
- Add collection methods
only(),onlyIn(),except(),exceptIn() - Add
Curler::getPublicHeaders() - Add
Get::count()
Changed
- Move
$count/$from/$toto the start ofInflect::format*()method signatures - In
Inflect::format()andInflect::formatWithSingularZero(), allow$countto be an array,Countable,ArrayableorTraversable, not just anint
v0.21.38
Changed
- Move
Facadeand related interfaces and traits toSalient\Core - Rename
IReadableandIWritabletoReadableandWritableand move toSalient\Core\Contract - Rename
Readable::getReadable()togetReadableProperties() - Rename
Writable::getWritable()togetWritableProperties() - Rename
TReadableandTWritabletoHasReadablePropertiesandHasWritablePropertiesand move toSalient\Core\Concern - Rename
TFullyReadableandTFullyWritabletoReadsProtectedPropertiesandWritesProtectedPropertiesand move toSalient\Core\Concern
v0.21.37
v0.21.36
Added
- Add
Str::matchCase() - Add
Inflect::formatRange()
Changed
- Move
Convert::toValue()toGet::apparent() - Move
Convert::toInt()toGet::integer() - Move
Convert::linesToLists()toStr::mergeLists() - Move
ellipsize(),expandTabs()andexpandLeadingTabs()fromConverttoStr - In
Inflect::format():- Allow arbitrary placement of whitespace and hyphens in words
- Allow words to be empty
- Add
#as a recognised word - Match the case of the placeholder
Removed
- Remove
Convert::pluralRange()in favour ofInflect::formatRange()-
To replace a
Convert::pluralRange()call with the equivalentInflect::formatRange()call:<?php // Before: Convert::pluralRange($from, $to, '<noun>'); // After: Inflect::formatRange('{{#:on:between}} {{#:<noun>}} {{#:#:and}}', $from, $to);
-
Security
- Fix issue where
Get::value()may inadvertently call an arbitrary function by limiting callables toClosureinstances
v0.21.35
Added
- Add
Inflect::format() - Add
File::readCsv()
Changed
- Move
Convert::intervalToSeconds()toDate::duration() - Move
Convert::toBool()toGet::boolean() - Move
Convert::nounToPlural()toInflect::plural() - Remove
Convert::plural()in favour ofInflect::format()
Fixed
- Fix issue where
Date::duration()silently discards weeks in durations like'P1W2D'on PHP 7.4
v0.21.34
Added
- Add
ContainerInterface::addContextualBinding() - Add
ContainerInterface::hasProvider() - Add
HasBindingsinterface - Add
Get::value()
Changed
- Rename
IServiceSingletontoSingletonInterfaceand do not extendIService - Split
IServiceintoHasServicesandHasContextualBindings - Rename
ReceivesContainertoContainerAwareInterfaceand change return type ofsetContainer()tovoid - Rename
ReceivesServicetoServiceAwareInterfaceand change return type ofsetService()tovoid - Rename container
servicemethods toproviderequivalents - In
ContainerInterface/Container:- Return
voidfromsetGlobalContainer() - Throw
ContainerUnusableArgumentsExceptionwhen arguments are given but cannot be passed to a constructor - Remove
$sharedparameter frombind(),singleton(), etc., and make$argsparameter non-nullable - Make
provider()parameter$exceptServicesnon-nullable - In
providers(), require service providers to be mapped (they can be mapped to themselves if otherwise unbound), and allow any class to be a service provider, not justHasServices(formerlyIService) implementors
- Return
- Use
ServiceLifetimeas a standard enumeration, not a bitmask - Rename
ContainerNotLocatedExceptiontoContainerNotFoundException - Rename
GlobalContainerSetEventtoBeforeGlobalContainerSetEvent - Move
ApplicationInterface::getProgramName()toCliApplicationInterface - Remove
Appfacade - Rename
DIfacade toApp - Replace underlying instance of
Appwith global container onBeforeGlobalContainerSetEvent - Always unload facades in
ErrorHandlerandSqliteStore - Move
ContainerInterfaceandApplicationInterfacetoLkrms\Container - Finalise Container API for v1.0
Removed
- Remove unused
ContainerInterface::getContextStack() - Remove unused
ServiceSingletonInterfaceandServiceLifetime::SERVICE_SINGLETONand their respective implementations - Remove unused
TServicetrait
Fixed
- Fix issue where
Containerbinds itself toFluentInterface - Fix issue where
Container::has()returnsfalsewhen it has a shared instance with the given identifier - Fix issue where conditional bindings (e.g.
bindIf()) are registered with containers that already have a shared instance with the given identifier - Fix issue where
BeforeGlobalContainerSetEventis not dispatched when a container is created viaContainer::getGlobalContainer() - Fix issue where the global container is unbound from itself after it is unloaded from a facade
v0.21.33
Changed
- Rename
IContainertoContainerInterfaceand move toLkrms\Container\Contract - Rename
IApplicationtoApplicationInterfaceand move toLkrms\Container\Contract - Rename Cli interfaces:
ICliApplication->CliApplicationInterfaceICliCommand->CliCommandInterfaceICliCommandNode->CliCommandNodeInterface
- Move
CliHelpStylefromLkrms\Cli\SupporttoLkrms\Cli, removing unnecessaryLkrms\Cli\Supportnamespace - Finalise v1.0 Cli API
Fixed
- Cli: fix issue where
IsBoundmay be true for unbound options