- Fix PHP 8.4 deprecations
- Switch to symfony/string instead of pragmarx/ia-str
- Update dependencies to Symfony 6.4
- Add support for Symfony 7
- Allow
SimpleEncoder
to supportIN
queries with array args encoded as comma separated string - Allow
SimpleEncoder
to change the query arg used for filters
- Fix OpenStack encoder not handling nested
AND
expressions for the same field
- Fix OpenStack should allow multiple conditions per field
- Fix JsonAPI should allow IN (array of values, comma separated)
- Make
Expression
properties readonly and public, deprecate methods
- Required PHP 8.1
- Update minimum versions
- Rename
with()
toinclude()
for consistency across libraries - Remove unnecessary docblocks
- Fix response decorator allowing empty array when no request vars
- Fix response decorator test
- Allow other versions of psr/log
- Address deprecated method calls in internal code
- Support Symfony 6.0
- Require Pagerfanta 3.5
- Add return type hints to address deprecation notices
- Add deprecation notices for passing array of strings as only arg
- Add deprecation for passing "null" to clear relationships on
QueryBuilder
- Add deprecation for passing array to
set()
onHasObjectData
trait - Add missing return types / type hints
- Minor code clean up and documentation tweaks
- Fix #2 TypeError when throwing not found exception
- Require Symfony 5.3+ to remove deprecated method calls
- Add
routeRequires
toQueryBuilder
to allow setting route parameters for route prefixes e.g./<id>/thing
- Add checks to prevent circular API calls if the relationship result is null and lazy loading is enabled
- Add
first()
toAbstractRelationship
to fetch the first object (or null) - Fix bug in
HasOne
not loading an empty object when usingfetch()
andnullOnNotFound
is false - Fix bug in
BelongsTo
not loading an empty object when usingfetch()
andnullOnNotFound
is false
- Require PHP 8
- Use collection 5.0 and domain 4.0
- Add ability to disable lazy loading of relationships
- Add note for Symfony manager setup in models.md
- Add support for
fetch
on relationships for loading separately
- Add
findOrFail
toEntityLocator
, was missed when re-adding to lib
- Remove eager loading helper that would pre-process includes; now uses includes as-is
- Add to snake_case as option on
AbstractEncoder
, disabled on JSONAPI and OpenStack - Add extra tests for
relationshipCamel
andrelationship_snake
- Fix
EntityLocator::findBy()
should cast offset to string forModelBuilder
- Fix
EntityLocator::query()
should be protected not private
- Fix bug in
EncodeSimpleFilterConditions
trait aborting early when building query string
- Add
EntityLocator
back to ease migrating to 2.0
- Add
factory
method to allow extending an existing instance
- Expanding documentation
- Add
ResponseDecoderInterface
andSimpleJsonDecoder
implementation - Update fetching to use decoder
- Add
BelongsTo
relationship and tests - Fix decorator tests and abstract implementation
- Fix header injector test
- Fix
EntityPersister
and tests - Refactor
Model
/ValueObject
for shared base so both have relationships - Refactor relationship interfaces
- Rename
EntityPersister
toActionPersister
- Expanding documentation
- Add tests for
HasOne
,HasMany
- Fix implementation details of
HasOne
,HasMany
- Improve JSON test file names
- Add query encoders for JsonAPI, OpenStack and custom nested/compound
- Add pre/post request events when making API requests to allow for request changes
- Refactor ApiClient to Connection
- Remove hydrators
- Remove
EntityLocator
, interface, behaviours and tests - Remove header injector interface
- Re-namespace to
Somnambulist\Components\ApiClient
- Add AttributeModel as basis for API client models
- Add
QueryBuilder
,Expression
andExpressionBuilder
for querying APIs - Refactor all persistence classes into
Persistence
namespace
- Require PHP 7.4
- Allow somnambulist/collection 4.0
- Refactor
RecordResponseDecorator
to use singletons for recording / request tracking Fixes issues when using the recording with Symfony WebTestCase and the kernel being reset between requests within the same test i.e. navigating between pages which would prevent the request order being set properly. - Remove
ResetInterface
fromRecordResponseDecorator
- Change ApiClient
route
to ksort parameters before making the URL - Refactor
RecordingApiClient
toRecordResponseDecorator
to make it easier to use - Add ability to set
mode
andstore
on construction of decorator - Add example
LoggingDecorator
- Fix sub-string cache path
- Add
method
toAbstractAction
to allow for a genericMakeRequest
trait for the persister - Add
RecordingApiClient
for recording API requests to files for future playback (beta)
- Add
GenericAction
without route param or property checks
- Fix test message checks
- Add better messages on validation failures for default actions
- Fix bug in
EntityPersisterException
when remapping fields, was only including mapped fields
- Released refactored entity persister as final version
- Refactor
EntityPersister
to work withApiActionInterface
objects - Refactor
EntityPersister
logging and exception messages - Add example persister actions and common traits
- Fix error logging on persister update
- Add
routePrefix
property for overriding the default service alias when sharing a router
- Refactor
EntityPersisterException
to simplify getting error information
- Added
findOrFail
behaviour for EntityLocator (requires somnambulist/domain)
- Add
EntityPersisterInterface
and a basic implementation of the interface. EntityPersister provides an initial implementation for making POST / PUT requests to API endpoints.
- Fix bug in
ApiRequestHelper
- Add
findByPaginated
for use in EntityLocators; requiresHydrateAsPaginator
- Add
ApiClientHeaderInjector
to allow for dynamically injecting headers from other sources or from computed values. Includes Symfony RequestStack injector.
- Add
ObjectMapperAwareInterface
to bind the current mapper to the hydrator when adding Should help prevent cyclical errors when building the container.
- Add
collectionClass
to EntityLocator to make it easier to override
- Initial release