You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Rename `claimFilterValue()` to `claimFilter()`
- Rename `getFilter()` to `getFilters()`
- Add `DeferredSyncEntityPolicy`
- Add `withDeferredSyncEntityPolicy()` and
`getDeferredSyncEntityPolicy()` to `ISyncContext` / `SyncContext`
- Allow entities resolved by `SyncStore::resolveDeferredEntities()` to
be scoped to entities deferred since a checkpoint returned by
`SyncStore::getDeferredEntityCheckpoint()`
- Apply deferred sync entity policies in `SyncEntityProvider`
Copy file name to clipboardExpand all lines: src/Facade/Sync.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@
26
26
* @method static SyncStore entity(int $providerId, class-string<ISyncEntity> $entityType, int|string $entityId, ISyncEntity $entity) Register a sync entity (see {@see SyncStore::entity()})
27
27
* @method static SyncStore entityType(class-string<ISyncEntity> $entity) Register a sync entity type and set its ID (unless already registered) (see {@see SyncStore::entityType()})
28
28
* @method static SyncStore error(SyncError|SyncErrorBuilder $error, bool $deduplicate = false, bool $toConsole = false) Report an error that occurred during a sync operation
29
+
* @method static int getDeferredEntityCheckpoint() Get a checkpoint to delineate between entities already in the deferred entity queue and any subsequently deferred sync entities (see {@see SyncStore::getDeferredEntityCheckpoint()})
29
30
* @method static ISyncEntity|null getEntity(int $providerId, class-string<ISyncEntity> $entityType, int|string $entityId, bool|null $offline = null) Get a previously registered and/or stored sync entity (see {@see SyncStore::getEntity()})
30
31
* @method static string|null getEntityTypeNamespace(class-string<ISyncEntity> $entity) Get the namespace of a sync entity type (see {@see SyncStore::getEntityTypeNamespace()})
31
32
* @method static string|null getEntityTypeUri(class-string<ISyncEntity> $entity, bool $compact = true) Get the canonical URI of a sync entity type (see {@see SyncStore::getEntityTypeUri()})
Copy file name to clipboardExpand all lines: src/Sync/Concept/SyncDefinition.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@
33
33
* @property-read TProvider $Provider The ISyncProvider servicing the entity
34
34
* @property-read array<SyncOperation::*> $Operations A list of supported sync operations
35
35
* @property-read ArrayKeyConformity::* $Conformity The conformity level of data returned by the provider for this entity
36
-
* @property-read SyncFilterPolicy::* $FilterPolicy The action to take when filters are ignored by the provider
36
+
* @property-read SyncFilterPolicy::* $FilterPolicy The action to take when filters are unclaimed by the provider
37
37
* @property-read array<SyncOperation::*,Closure(ISyncDefinition<TEntity,TProvider>, SyncOperation::*, ISyncContext, mixed...): mixed> $Overrides An array that maps sync operations to closures that override any other implementations
38
38
* @property-read IPipeline<mixed[],TEntity,array{0:int,1:ISyncContext,2?:int|string|TEntity|TEntity[]|null,...}>|null $PipelineFromBackend A pipeline that maps data from the provider to entity-compatible associative arrays, or `null` if mapping is not required
39
39
* @property-read IPipeline<TEntity,mixed[],array{0:int,1:ISyncContext,2?:int|string|TEntity|TEntity[]|null,...}>|null $PipelineToBackend A pipeline that maps serialized entities to data compatible with the provider, or `null` if mapping is not required
@@ -101,13 +101,13 @@ abstract protected function getClosure(int $operation): ?Closure;
101
101
protected$Conformity;
102
102
103
103
/**
104
-
* The action to take when filters are ignored by the provider
104
+
* The action to take when filters are unclaimed by the provider
105
105
*
106
106
* To prevent a request for entities that meet one or more criteria
107
107
* inadvertently reaching the backend as a request for a larger set of
108
108
* entities--if not all of them--the default policy if there are unclaimed
109
109
* filters is {@see SyncFilterPolicy::THROW_EXCEPTION}. See
110
-
* {@see SyncFilterPolicy} for alternative policies or
110
+
* {@see SyncFilterPolicy} for alternative policies and
111
111
* {@see ISyncContext::withArgs()} for more information about filters.
112
112
*
113
113
* @var SyncFilterPolicy::*
@@ -369,7 +369,7 @@ function (array $data, IPipeline $pipeline, $arg) use (&$ctx, &$closure) {
369
369
}
370
370
371
371
/**
372
-
* Enforce the ignored filter policy
372
+
* Enforce the unclaimed filter policy
373
373
*
374
374
* @param SyncOperation::* $operation
375
375
* @param array{}|null $empty
@@ -381,7 +381,7 @@ final protected function applyFilterPolicy(int $operation, ISyncContext $ctx, ?b
381
381
$returnEmpty = false;
382
382
383
383
if (SyncFilterPolicy::IGNORE === $this->FilterPolicy ||
Copy file name to clipboardExpand all lines: src/Sync/Support/DbSyncDefinitionBuilder.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@
26
26
* @method $this operations(array<SyncOperation::*> $value) A list of supported sync operations
27
27
* @method $this table(?string $value) Set DbSyncDefinition::$Table
28
28
* @method $this conformity(ArrayKeyConformity::* $value) The conformity level of data returned by the provider for this entity (see {@see SyncDefinition::$Conformity})
29
-
* @method $this filterPolicy(SyncFilterPolicy::* $value) The action to take when filters are ignored by the provider (see {@see SyncDefinition::$FilterPolicy})
29
+
* @method $this filterPolicy(SyncFilterPolicy::* $value) The action to take when filters are unclaimed by the provider (see {@see SyncDefinition::$FilterPolicy})
30
30
* @method $this overrides(array<SyncOperation::*,Closure(ISyncDefinition<TEntity,TProvider>, SyncOperation::*, ISyncContext, mixed...): mixed> $value) An array that maps sync operations to closures that override any other implementations (see {@see SyncDefinition::$Overrides})
31
31
* @method $this pipelineFromBackend(IPipeline<mixed[],TEntity,array{0:int,1:ISyncContext,2?:int|string|TEntity|TEntity[]|null,...}>|null $value) A pipeline that maps data from the provider to entity-compatible associative arrays, or `null` if mapping is not required
32
32
* @method $this pipelineToBackend(IPipeline<TEntity,mixed[],array{0:int,1:ISyncContext,2?:int|string|TEntity|TEntity[]|null,...}>|null $value) A pipeline that maps serialized entities to data compatible with the provider, or `null` if mapping is not required
Copy file name to clipboardExpand all lines: src/Sync/Support/HttpSyncDefinitionBuilder.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@
32
32
* @method $this pager(?ICurlerPager $value) The pagination handler for the endpoint servicing the entity (see {@see HttpSyncDefinition::$Pager})
33
33
* @method $this callback((callable(HttpSyncDefinition<TEntity,TProvider>, SyncOperation::*, ISyncContext, mixed...): HttpSyncDefinition<TEntity,TProvider>)|null $value) A callback applied to the definition before every sync operation (see {@see HttpSyncDefinition::$Callback})
34
34
* @method $this conformity(ArrayKeyConformity::* $value) The conformity level of data returned by the provider for this entity (see {@see SyncDefinition::$Conformity})
35
-
* @method $this filterPolicy(SyncFilterPolicy::* $value) The action to take when filters are ignored by the provider (see {@see SyncDefinition::$FilterPolicy})
35
+
* @method $this filterPolicy(SyncFilterPolicy::* $value) The action to take when filters are unclaimed by the provider (see {@see SyncDefinition::$FilterPolicy})
36
36
* @method $this expiry(?int $value) The time, in seconds, before responses from the provider expire (see {@see HttpSyncDefinition::$Expiry})
37
37
* @method $this methodMap(array<SyncOperation::*,string> $value) An array that maps sync operations to HTTP request methods (see {@see HttpSyncDefinition::$MethodMap})
38
38
* @method $this syncOneEntityPerRequest(bool $value = true) If true, perform CREATE_LIST, UPDATE_LIST and DELETE_LIST operations on one entity per HTTP request (default: false)
0 commit comments