Releases: salient-labs/toolkit
Releases · salient-labs/toolkit
v0.99.11
Changed
- Rename
AbstractTypedCollection::clone()tocopy()and include it inCollectionInterface - Rename
AccessTokenInterface::getType()togetTokenType() - Reverse order of first two parameters in
HttpRequest::__construct()for consistency with PSR-17RequestFactoryInterface::createRequest()
Fixed
- Fix
Curlerissue where empty responses are incorrectly parsed as JSON
v0.99.10
Changed
-
In
SyncEntityProvider, if an entity has no provider interface, check for a parent that:- implements
SyncEntityInterface - resolves to the entity, indicating it has been bound to a "base" entity in the service container
- has a provider interface
This allows downstream code to use
$provider->with(MyCustomEntity::class)instead of$provider->with(BaseEntity::class)whenMyCustomEntityextendsBaseEntity - implements
-
Add explicit
@returntypes to methods with native return typeselfto work around bugs in static analysis tools -
Detect associative arrays in "generate sync entity" command
Fixed
- Fix regression where
AbstractSyncDefinition::getFallbackClosure()always throws an exception
v0.99.9
Added
- Add
Reflect::isMethodInClass() - Add
Sync::hasRunId()
Changed
SyncContext: returnnull, not[], when a filter/value is missing- Add optional
$fromClassparameter togetAllMethodDocComments()
Fixed
- Fix issue where an unresolved
CliOptionBuilderinstance triggers an unhandled exception if it receives an invalid value from the environment - Fix issue where
Cache::getInstanceOf()fails when a non-object is stored under the given key
v0.99.8
v0.99.7
v0.99.6
Added
- Add
Arr::snakeCase() - Add
bindOverride()to sync definition classes
Changed
- In
AbstractSyncEntity, do not expand removable prefixes returned by inheritors - In "generate sync entity" command:
- Add
--trimoption - Always try to detect dates and times in reference entities
- Add
Fixed
- Fix "generate sync entity" issue where relationship class is incorrectly normalised
- Fix
Pcre::split()return type
v0.99.5
Added
- Add
SyncContextInterface::getFilterInt() - Add
SyncContextInterface::getFilterString() - Add
SyncContextInterface::getFilterArrayKey() - Add
SyncContextInterface::getFilterIntList() - Add
SyncContextInterface::getFilterStringList() - Add
SyncContextInterface::getFilterArrayKeyList() - Add
SyncContextInterface::claimFilterInt() - Add
SyncContextInterface::claimFilterString() - Add
SyncContextInterface::claimFilterArrayKey() - Add
SyncContextInterface::claimFilterIntList() - Add
SyncContextInterface::claimFilterStringList() - Add
SyncContextInterface::claimFilterArrayKeyList()
Changed
- Rename
SyncContextInterfacemethodwithArgs()towithFilter()and:- Always
trim()keys - Convert space-delimited alphanumeric keys to snake_case, not just hyphen- and underscore-delimited keys
- Don't convert keys to snake_case if non-alphanumeric characters appear at the beginning or end of the key
- Convert
DateTimeInterfacevalues tostring
- Always
- Make
SyncContextInterface::getFilter()parameter$keynullable and return all filters whennull - Make
<key>and<key>_idinterchangeable inSyncContextfilters witharray-keyvalues - Adopt same types for
ProviderContextInterfacevalues as forSyncContextInterfacefilters - Rename
SyncInvalidFilterExceptiontoSyncInvalidFilterSignatureExceptionbefore addingSyncInvalidFilterExceptionfor more general filter-related exceptions - Extend
HasContainerfromSyncSerializeRulesInterfaceso detached entities can resolve the possibly non-globalSyncStorewith which they are registered - In
SyncSerializeRules, implementHasContainerand remove unusedReadableimplementation - Add template and conditional return type to
Arr::wrap() - Simplify
Arr::toIndex() - Remove
class-string[]fromServiceAwareInterface::getService()return type, reverting toclass-stringonly - Update "generate builder" command to ignore
ContainerInterfaceparameters - Rename
app()andcontainer()togetApp()andgetContainer()
Removed
- Remove redundant
SyncContextInterface::getFilters()method - Remove sync entity methods
setEntityTypeId()andgetEntityTypeId()to decouple entities from the globalSyncStore
Fixed
- Fix
Introspectorissue where constructor arguments are not matched correctly after service parameters wherenullis passed to the container - Fix
Introspectorissue wherenullmay be passed to non-nullable constructor parameters that are passed by reference
v0.99.4
Added
- Add
Test::isNumericKey()
Changed
- In pipelines, accept closures with narrower parameter types
- In sync contexts, reject numeric keys in filters and specify the structure of a valid filter
- Add more
@templateworkarounds for PHPStan and Intelephense
Fixed
- Fix issue where
HasImmutablePropertiescreates unnecessary clones whennullis assigned
v0.99.3
Added
- Add
Env::getClass(),Get::notNull() - Add
SyncStoreLoadedEventInterface
Changed
- Consolidate
Salient\CatalogintoSalient\Contract - Adopt PHPStan level 9 (albeit with 932 errors in baseline)
DbConnector: improve error handling, add stubs to fix ADOdb type issues- Work around buggy implementations of
@templatein PHPStan and Intelephense inthrowOnFailure()methods ofDbConnector,FileandProcess