Skip to content

Releases: salient-labs/toolkit

v0.99.0

26 Feb 13:33
v0.99.0
e2076ef

Choose a tag to compare

This is the first release of salient/toolkit, the PHP toolkit formerly known as lkrms/util.

v0.21.49

26 Feb 11:20
85102f5

Choose a tag to compare

This is the final release of lkrms/util. It is moving to Salient as salient/toolkit.

Changed

  • Sync: move abstract and high-priority classes to Salient\Sync
  • Rename:
    • ISyncClassResolver -> SyncClassResolverInterface
    • ISyncContext -> SyncContextInterface
    • ISyncDefinition -> SyncDefinitionInterface
    • ISyncEntity -> SyncEntityInterface
    • ISyncEntityProvider -> SyncEntityProviderInterface
    • ISyncEntityResolver -> SyncEntityResolverInterface
    • ISyncProvider -> SyncProviderInterface
    • ISyncSerializeRules -> SyncSerializeRulesInterface
    • SyncDefinition -> AbstractSyncDefinition
    • SyncEntity -> AbstractSyncEntity
    • SyncOperations -> SyncOperationGroup
    • SyncProvider -> AbstractSyncProvider
    • SyncException -> AbstractSyncException
    • SyncEvent -> AbstractSyncEvent
    • SyncStoreEvent -> AbstractSyncStoreEvent

v0.21.48

26 Feb 01:47
v0.21.48
37b5289

Choose a tag to compare

Added

  • Add BadMethodCallException

Changed

  • Return null from Cache::getInstanceOf(), Cache::getArray(), Cache::getInt(), Cache::getString() instead of throwing an exception when the cached item is of the wrong type
  • In SqliteStore, implement Unloadable, throw an exception if getFilename() is called when the database is not open, improve documentation
  • In ImmutableArrayAccess, throw BadMethodCallException instead of LogicException
  • Use ImmutableArrayAccess in ConfigurationManager
  • Make HasBuilder::getBuilder() protected
  • Improve ContainerInterface::getAs() generics
  • Ignore @throws tags in PhpDoc::hasDetail()
  • Move remaining classes, interfaces and traits to Salient
  • Rename:
    • ArrayKeyConformity -> ListConformity
    • Entity -> AbstractEntity
    • HasDateProperties -> Temporal
    • HasDescription -> Describable
    • HasIdentifier -> Identifiable
    • HasJsonSchema -> JsonSchemaInterface
    • HasName -> Nameable
    • HasParentProperty -> Treeable
    • HasProviderContext -> ProviderContextAwareInterface
    • IConstructible -> Constructible
    • IEntity -> EntityInterface
    • IExtensible -> Extensible
    • IProvidable -> Providable
    • IProvider -> ProviderInterface
    • IProviderContext -> ProviderContextInterface
    • IProviderEntity -> ProvidableEntityInterface
    • IRelatable -> Relatable
    • IResolvable -> Normalisable
    • ISerializeRules -> SerializeRulesInterface
    • ITreeable -> HierarchyInterface
    • Provider -> AbstractProvider
    • ReceivesProvider -> ProviderAwareInterface
    • RelationshipType -> Cardinality
    • ReturnsNormaliser -> NormaliserFactory
    • SqliteStore -> AbstractStore
    • TtyControlSequence -> EscapeSequence
    • ImmutableArrayAccess -> ImmutableArrayAccessTrait
    • ICollection -> CollectionInterface
    • TCollection -> CollectionTrait
    • TImmutableCollection -> ImmutableCollectionTrait
    • TypedCollection -> AbstractTypedCollection
    • IList -> ListInterface
    • TList -> ListTrait
    • TImmutableList -> ImmutableListTrait
    • TypedList -> AbstractTypedList
    • TReadableCollection -> ReadableCollectionTrait
    • HasParent -> TreeableTrait
    • IComparable -> Comparable
    • IStoppableEvent -> StoppableEventInterface
    • TConstructible -> ConstructibleTrait
    • TExtensible -> ExtensibleTrait
    • TProvidable -> ProvidableTrait
    • TStoppableEvent -> StoppableEventTrait
  • Do not extend Normalisable from NormaliserFactory
  • Extend HasProvider from ProviderAwareInterface
  • Merge HasChildrenProperty into Treeable
  • Merge HasProviderContext into ProviderContextAwareInterface
  • Merge HasService into ServiceAwareInterface
  • Rename HasProvider::provider() to getProvider()
  • Rename HierarchyInterface::countDescendants() to getDescendantCount()
  • Rename NormaliserFactory::normaliser() to getNormaliser()
  • Rename ProviderContextAwareInterface::context() to getContext()
  • Rename ServiceAwareInterface::service() to getService()
  • Move IEntity::plural() to ISyncEntity
  • Move SerializeRulesInterface::getFlags() to ISyncSerializeRules

Removed

  • Remove Sys::sqliteHasUpsert()
  • Remove Buildable::getBuilder()
  • Remove TokenExtractor (moved to Lkrms\LkUtil namespace)

Fixed

  • Cache: fix issue where an exception is thrown when an instance of a class that no longer exists is returned from the cache

v0.21.47

26 Feb 01:29
v0.21.47
d1bdedf

Choose a tag to compare

Changed

  • Move classes into the Salient namespace:
    • Lkrms\Container\* -> Salient\Container\*
    • Lkrms\Cli\* -> Salient\Cli\*
    • Lkrms\Console\* -> Salient\Console\*
    • Lkrms\Concept\Builder -> Salient\Core\AbstractBuilder
    • Lkrms\Concern\HasBuilder -> Salient\Core\Concern\HasBuilder
    • Lkrms\Contract\Buildable -> Salient\Core\Contract\Buildable
    • Lkrms\Contract\HasContainer -> Salient\Container\Contract\HasContainer
    • Lkrms\Contract\HasService -> Salient\Container\Contract\HasService
    • Lkrms\Facade\App -> Salient\Core\Facade\App
    • Lkrms\Facade\Console -> Salient\Core\Facade\Console
    • Lkrms\Facade\Err -> Salient\Core\Facade\Err
    • Lkrms\Facade\Profile -> Salient\Core\Facade\Profile
    • Lkrms\Support\Catalog\TtyControlSequence -> Salient\Core\Catalog\TtyControlSequence
    • Lkrms\Support\ErrorHandler -> Salient\Core\ErrorHandler
    • Lkrms\Support\MetricCollector -> Salient\Core\MetricCollector

v0.21.46

23 Feb 03:05
v0.21.46
56e1c17

Choose a tag to compare

Added

  • Add Process and supporting classes
  • Add Env::flag()
  • Add Sys::isWindows()
  • Add Pcre::delimit()

Changed

  • Replace Get::apparent() with Get::arrayKey()
  • In Env::apply(), don't throw an exception when setlocale() fails
  • Allow Env::get*() default values to be closures

Removed

  • Remove Regex::delimit() and Regex::anchorAndDelimit()

Fixed

  • Fix inconsistent handling of non-empty whitespace-only strings by preserving them without collapsing to null in Env::getNullable()

v0.21.45

21 Feb 02:40
v0.21.45
1169503

Choose a tag to compare

Added

  • Add SyncEntityRecursionException
  • Add ISyncContext::pushWithRecursionCheck()
  • Add ISyncContext::maybeThrowRecursionException()

Changed

  • Sync: prevent infinite recursion during entity hydration
    • Call ISyncContext::pushWithRecursionCheck() instead of ISyncContext::push() where necessary
    • Call ISyncContext::maybeThrowRecursionException() before requesting entities from providers
  • In GetSyncEntities, apply DeferralPolicy::DO_NOT_RESOLVE in addition to HydrationPolicy::SUPPRESS when --shallow is given

Fixed

  • Fix issue where deferred relationships are created to hydrate entities with no identifier

v0.21.44

20 Feb 06:22
v0.21.44
b3bbb16

Choose a tag to compare

Added

  • Add ITreeable::countDescendants() and implement in HasParent

v0.21.43

20 Feb 04:37
v0.21.43
6a145eb

Choose a tag to compare

Added

  • Add HasFacade::updateFacade() to improve support for facades with immutable underlying instances

Changed

  • Make Get::binaryHash() and Get::hash() parameter $value non-variadic
  • Move Test::firstExistingDirectoryIsWritable() to File::creatable() and accept file names, not just directories
  • Allow filesystem-related assertions to throw exceptions other than FilesystemErrorException
  • Improve Pcre error reporting
  • Continue migration to Salient namespace
    • Move utility classes to Salient\Core\Utility
    • Move EventHandler and related classes to Salient\Core
    • Move enumeration- and dictionary-related interfaces and classes to Salient\Core and rename:
      • IEnumeration -> EnumerationInterface
      • IConvertibleEnumeration -> ConvertibleEnumerationInterface
      • IDictionary -> DictionaryInterface
      • Catalog -> AbstractCatalog
      • Enumeration -> AbstractEnumeration
      • ConvertibleEnumeration -> AbstractConvertibleEnumeration
      • ReflectiveEnumeration -> AbstractReflectiveEnumeration
      • Dictionary -> AbstractDictionary
    • Move RegularExpression and CharacterSequence to Salient\Core\Catalog and rename:
      • RegularExpression -> Regex
      • CharacterSequence -> Char
    • Move exceptions to Salient\Core and rename:
      • Exception -> AbstractException
      • MultipleErrorException -> AbstractMultipleErrorException
      • IncompatibleRuntimeEnvironmentException -> InvalidRuntimeConfigurationException
      • PipelineResultRejectedException -> PipelineFilterException
      • InvalidDotenvSyntaxException -> InvalidDotEnvSyntaxException
    • Move pipeline- and immutable-related interfaces, classes and traits to Salient\Core and rename:
      • IFluentInterface -> Chainable
      • FluentInterface -> HasChainableMethods (class -> trait)
      • Immutable -> HasImmutableProperties
      • IImmutable -> Immutable
      • IPipeline -> PipelineInterface
      • IPipe -> PipeInterface
  • Refactor pipelines
    • Require closures where callables were previously sufficient
    • Rename throughCallback() to throughClosure()
    • Split PipelineInterface into multiple interfaces to surface different methods after send() or stream() are called, and to prevent useless early calls to withConformity()
  • Add fromNames() and toNames() to ConvertibleEnumerationInterface and implement in AbstractConvertibleEnumeration and AbstractReflectiveEnumeration
  • Move Convert::toNormal() to Str::normalise()
  • Move Convert::queryToData() to Get::filter() and refactor to take advantage of parse_str()
  • Move Convert::dataToQuery() to Get::query() and add QueryFlag for more precise control of serialization
  • Move Convert::uuidToHex() to Get::uuid() and allow the given UUID to be in hexadecimal form already
  • Add Compute::binaryUuid() and remove $binary parameter from Compute::uuid()
  • Move Convert::unwrap() to Str::unwrap()
  • Move Convert::toShellArg() and Convert::toCmdArg() to Sys as private methods escapeShellArg() and escapeCmdArg()
  • Move Compute methods binaryUuid(), uuid(), randomText(), binaryHash(), hash() to Get
  • Move Compute methods textDistance() and textSimilarity() to Str::distance() and Str::similarity() respectively
  • Move ngramSimilarity(), ngramIntersection(), ngrams() from Compute to Str
  • Rename ResolvesServiceLists trait to HasUnderlyingService
  • Rename SortTypeFlag to SortFlag

Removed

  • Remove PipelineFilterException (previously PipelineResultRejectedException) because unless() and send() cannot be used together
  • Remove empty Compute class
  • Remove Convert class, including unused methods toStrings() and objectToArray()
  • Remove unused IsConvertibleEnumeration trait

Fixed

  • Fix HasFacade issue where instances are not always reused
  • Fix issue where AbstractFacade::unload() does not unload service lists

v0.21.42

15 Feb 15:57
v0.21.42
e10f99e

Choose a tag to compare

Added

  • Add service container methods hasSingleton() and unbindInstance()

Changed

  • Leave unload()ed service containers in a usable state

Fixed

  • Fix issue where HasFacade doesn't remove references to cloned instances when unloaded
  • Fix issue where service container bindings are forgotten when a facade's underlying instance is removed from a container

v0.21.41

15 Feb 14:32
v0.21.41
a805cbf

Choose a tag to compare

Added

  • Add $configDir parameter to CliApplication::__construct()

Changed

  • Sync: add deferred entity and relationship types to generated entities