Skip to content

Releases: salient-labs/toolkit

v0.99.11

08 Mar 00:20
v0.99.11
65efa93

Choose a tag to compare

Changed

  • Rename AbstractTypedCollection::clone() to copy() and include it in CollectionInterface
  • Rename AccessTokenInterface::getType() to getTokenType()
  • Reverse order of first two parameters in HttpRequest::__construct() for consistency with PSR-17 RequestFactoryInterface::createRequest()

Fixed

  • Fix Curler issue where empty responses are incorrectly parsed as JSON

v0.99.10

06 Mar 17:42
v0.99.10
7e97d97

Choose a tag to compare

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) when MyCustomEntity extends BaseEntity

  • Add explicit @return types to methods with native return type self to 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

06 Mar 05:06
v0.99.9
f901360

Choose a tag to compare

Added

  • Add Reflect::isMethodInClass()
  • Add Sync::hasRunId()

Changed

  • SyncContext: return null, not [], when a filter/value is missing
  • Add optional $fromClass parameter to getAllMethodDocComments()

Fixed

  • Fix issue where an unresolved CliOptionBuilder instance 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

05 Mar 07:17
v0.99.8
8a30bb1

Choose a tag to compare

Fixed

  • Fix (additional) AbstractSyncDefinition::bindOverride() issues reported by downstream PHPStan

v0.99.7

05 Mar 04:24
v0.99.7
1bf5a1c

Choose a tag to compare

Fixed

  • Fix AbstractSyncDefinition::bindOverride() issues reported by downstream PHPStan

v0.99.6

05 Mar 02:22
v0.99.6
1025a9b

Choose a tag to compare

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 --trim option
    • Always try to detect dates and times in reference entities

Fixed

  • Fix "generate sync entity" issue where relationship class is incorrectly normalised
  • Fix Pcre::split() return type

v0.99.5

04 Mar 05:09
v0.99.5
49c89e2

Choose a tag to compare

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 SyncContextInterface method withArgs() to withFilter() 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 DateTimeInterface values to string
  • Make SyncContextInterface::getFilter() parameter $key nullable and return all filters when null
  • Make <key> and <key>_id interchangeable in SyncContext filters with array-key values
  • Adopt same types for ProviderContextInterface values as for SyncContextInterface filters
  • Rename SyncInvalidFilterException to SyncInvalidFilterSignatureException before adding SyncInvalidFilterException for more general filter-related exceptions
  • Extend HasContainer from SyncSerializeRulesInterface so detached entities can resolve the possibly non-global SyncStore with which they are registered
  • In SyncSerializeRules, implement HasContainer and remove unused Readable implementation
  • Add template and conditional return type to Arr::wrap()
  • Simplify Arr::toIndex()
  • Remove class-string[] from ServiceAwareInterface::getService() return type, reverting to class-string only
  • Update "generate builder" command to ignore ContainerInterface parameters
  • Rename app() and container() to getApp() and getContainer()

Removed

  • Remove redundant SyncContextInterface::getFilters() method
  • Remove sync entity methods setEntityTypeId() and getEntityTypeId() to decouple entities from the global SyncStore

Fixed

  • Fix Introspector issue where constructor arguments are not matched correctly after service parameters where null is passed to the container
  • Fix Introspector issue where null may be passed to non-nullable constructor parameters that are passed by reference

v0.99.4

01 Mar 04:14
v0.99.4
61b24c1

Choose a tag to compare

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 @template workarounds for PHPStan and Intelephense

Fixed

  • Fix issue where HasImmutableProperties creates unnecessary clones when null is assigned

v0.99.3

01 Mar 04:08
v0.99.3
919503e

Choose a tag to compare

Added

  • Add Env::getClass(), Get::notNull()
  • Add SyncStoreLoadedEventInterface

Changed

  • Consolidate Salient\Catalog into Salient\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 @template in PHPStan and Intelephense in throwOnFailure() methods of DbConnector, File and Process

v0.99.2

28 Feb 05:38
v0.99.2
e5b7096

Choose a tag to compare

Added

  • Add BeforeGlobalContainerSetEventInterface

Changed

  • Move critical interfaces, enumerations and dictionaries to namespaces in Salient\Contract and Salient\Catalog to decouple them from their respective components