1 Commits

Author SHA1 Message Date
Sebastian 0b01cd0a1a chore(deps): update dependency phpunit/phpunit to v13
renovate/artifacts Artifact file update failure
PHP Unit Tests / test (pull_request) Failing after 13m8s
JS Unit Tests / test (pull_request) Failing after 13m38s
Build Test / test (pull_request) Failing after 13m40s
2026-07-05 03:03:19 +00:00
9 changed files with 114 additions and 124 deletions
+2 -8
View File
@@ -25,17 +25,11 @@ jobs:
tools: composer:v2 tools: composer:v2
- name: Install Renovate - name: Install Renovate
run: | run: npm install -g renovate
npm install --global --no-audit --fund=false \
--prefix "${{ runner.temp }}/renovate-npm" \
--cache "${{ runner.temp }}/renovate-npm-cache" \
renovate
"${{ runner.temp }}/renovate-npm/bin/renovate" --version
- name: Run Renovate - name: Run Renovate
env: env:
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
RENOVATE_PLATFORM: gitea RENOVATE_PLATFORM: gitea
RENOVATE_ENDPOINT: https://git.ktrix.dev/api/v1 RENOVATE_ENDPOINT: https://git.ktrix.dev/api/v1
run: | run: renovate ${{ gitea.repository }}
"${{ runner.temp }}/renovate-npm/bin/renovate" ${{ gitea.repository }}
Generated
+38 -22
View File
@@ -8,16 +8,16 @@
"packages": [ "packages": [
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.13.1", "version": "7.13.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "55901a76dfd2006a0cc012b9e3c5b487f796478d" "reference": "a4decaa9745dc567467970e43f183e260cfa51fd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/55901a76dfd2006a0cc012b9e3c5b487f796478d", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4decaa9745dc567467970e43f183e260cfa51fd",
"reference": "55901a76dfd2006a0cc012b9e3c5b487f796478d", "reference": "a4decaa9745dc567467970e43f183e260cfa51fd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -116,7 +116,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.13.1" "source": "https://github.com/guzzle/guzzle/tree/7.13.0"
}, },
"funding": [ "funding": [
{ {
@@ -132,7 +132,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2026-06-29T20:14:18+00:00" "time": "2026-06-29T13:31:06+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
@@ -220,16 +220,16 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.12.4", "version": "2.12.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "51e27f9e2b332ab3e72f4520d5ff4f3c68c3577c" "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/51e27f9e2b332ab3e72f4520d5ff4f3c68c3577c", "url": "https://api.github.com/repos/guzzle/psr7/zipball/7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
"reference": "51e27f9e2b332ab3e72f4520d5ff4f3c68c3577c", "reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -319,7 +319,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.12.4" "source": "https://github.com/guzzle/psr7/tree/2.12.3"
}, },
"funding": [ "funding": [
{ {
@@ -335,7 +335,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2026-07-08T15:56:20+00:00" "time": "2026-06-23T15:21:08+00:00"
}, },
{ {
"name": "php-http/discovery", "name": "php-http/discovery",
@@ -1445,24 +1445,24 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "11.5.56", "version": "11.5.55",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "5f83edffa6967c3db468d48a695ec7bcb02e9256" "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5f83edffa6967c3db468d48a695ec7bcb02e9256", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/adc7262fccc12de2b30f12a8aa0b33775d814f00",
"reference": "5f83edffa6967c3db468d48a695ec7bcb02e9256", "reference": "adc7262fccc12de2b30f12a8aa0b33775d814f00",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-filter": "*",
"ext-json": "*", "ext-json": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.13.4", "myclabs/deep-copy": "^1.13.4",
"phar-io/manifest": "^2.0.4", "phar-io/manifest": "^2.0.4",
@@ -1527,15 +1527,31 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.56" "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.55"
}, },
"funding": [ "funding": [
{ {
"url": "https://phpunit.de/sponsoring.html", "url": "https://phpunit.de/sponsors.html",
"type": "other" "type": "custom"
},
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
},
{
"url": "https://liberapay.com/sebastianbergmann",
"type": "liberapay"
},
{
"url": "https://thanks.dev/u/gh/sebastianbergmann",
"type": "thanks_dev"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
"type": "tidelift"
} }
], ],
"time": "2026-07-06T14:52:39+00:00" "time": "2026-02-18T12:37:06+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
@@ -2640,5 +2656,5 @@
"platform-overrides": { "platform-overrides": {
"php": "8.2" "php": "8.2"
}, },
"plugin-api-version": "2.9.0" "plugin-api-version": "2.6.0"
} }
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace KTXM\ProviderJmapc\Providers\Document; namespace KTXM\ProviderJmapc\Providers\Document;
use KTXF\Documents\Collection\CollectionPropertiesMutableAbstract; use KTXF\Resource\Documents\Collection\CollectionPropertiesMutableAbstract;
/** /**
* Document Collection Properties Implementation * Document Collection Properties Implementation
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace KTXM\ProviderJmapc\Providers\Document; namespace KTXM\ProviderJmapc\Providers\Document;
use KTXF\Documents\Collection\CollectionMutableAbstract; use KTXF\Resource\Documents\Collection\CollectionMutableAbstract;
/** /**
* Document Collection Resource Implementation * Document Collection Resource Implementation
+1 -1
View File
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace KTXM\ProviderJmapc\Providers\Document; namespace KTXM\ProviderJmapc\Providers\Document;
use KTXF\Documents\Entity\EntityPropertiesMutableAbstract; use KTXF\Resource\Documents\Entity\EntityPropertiesMutableAbstract;
/** /**
* Document Collection Properties Implementation * Document Collection Properties Implementation
+1 -1
View File
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace KTXM\ProviderJmapc\Providers\Document; namespace KTXM\ProviderJmapc\Providers\Document;
use KTXF\Documents\Entity\EntityMutableAbstract; use KTXF\Resource\Documents\Entity\EntityMutableAbstract;
/** /**
* Mail Entity Resource Implementation * Mail Entity Resource Implementation
+9 -9
View File
@@ -9,11 +9,11 @@ declare(strict_types=1);
namespace KTXM\ProviderJmapc\Providers\Document; namespace KTXM\ProviderJmapc\Providers\Document;
use KTXF\Documents\Provider\ProviderBaseInterface; use KTXF\Resource\Documents\Provider\ProviderBaseInterface;
use KTXF\Documents\Provider\ProviderServiceMutateInterface; use KTXF\Resource\Documents\Provider\ProviderServiceMutateInterface;
use KTXF\Documents\Provider\ProviderServiceTestInterface; use KTXF\Resource\Documents\Provider\ProviderServiceTestInterface;
use KTXF\Documents\Service\ServiceBaseInterface; use KTXF\Resource\Documents\Service\ServiceBaseInterface;
use KTXF\Documents\Service\ServiceMutableInterface; use KTXF\Resource\Documents\Service\ServiceMutableInterface;
use KTXF\Resource\Provider\ResourceServiceLocationInterface; use KTXF\Resource\Provider\ResourceServiceLocationInterface;
use KTXF\Resource\Provider\ResourceServiceMutateInterface; use KTXF\Resource\Provider\ResourceServiceMutateInterface;
use KTXM\ProviderJmapc\Service\Discovery; use KTXM\ProviderJmapc\Service\Discovery;
@@ -21,9 +21,9 @@ use KTXM\ProviderJmapc\Service\Remote\RemoteService;
use KTXM\ProviderJmapc\Stores\ServiceStore; use KTXM\ProviderJmapc\Stores\ServiceStore;
/** /**
* JMAP Documents Provider * JMAP Mail Provider
*/ */
class Provider implements ProviderBaseInterface, ProviderServiceMutateInterface, ProviderServiceTestInterface class Provider implements ProviderServiceMutateInterface, ProviderServiceTestInterface
{ {
public const JSON_TYPE = ProviderBaseInterface::JSON_TYPE; public const JSON_TYPE = ProviderBaseInterface::JSON_TYPE;
@@ -63,7 +63,7 @@ class Provider implements ProviderBaseInterface, ProviderServiceMutateInterface,
public function type(): string public function type(): string
{ {
return self::TYPE_DOCUMENT; return self::TYPE_MAIL;
} }
public function identifier(): string public function identifier(): string
@@ -170,7 +170,7 @@ class Provider implements ProviderBaseInterface, ProviderServiceMutateInterface,
return $discovery->discover($identity, $location, $secret, $verifySSL); return $discovery->discover($identity, $location, $secret, $verifySSL);
} }
public function serviceTest(ServiceBaseInterface|ServiceMutableInterface $service, array $options = []): array { public function serviceTest(ServiceBaseInterface $service, array $options = []): array {
$startTime = microtime(true); $startTime = microtime(true);
try { try {
+51 -71
View File
@@ -10,20 +10,17 @@ declare(strict_types=1);
namespace KTXM\ProviderJmapc\Providers\Document; namespace KTXM\ProviderJmapc\Providers\Document;
use Generator; use Generator;
use KTXF\Documents\Collection\CollectionBaseInterface;
use KTXF\Documents\Collection\CollectionMutableInterface;
use KTXF\Documents\Collection\CollectionPropertiesBaseInterface;
use KTXF\Documents\Service\ServiceBaseInterface;
use KTXF\Documents\Service\ServiceCollectionMutableInterface;
use KTXF\Documents\Service\ServiceConfigurableInterface;
use KTXF\Documents\Service\ServiceMutableInterface;
use KTXF\Resource\Delta\Delta;
use KTXF\Resource\Filter\Filter;
use KTXF\Resource\Filter\IFilter;
use KTXF\Resource\Identifier\CollectionIdentifierInterface;
use KTXF\Resource\Identifier\EntityIdentifierInterface;
use KTXF\Resource\Provider\ResourceServiceIdentityInterface; use KTXF\Resource\Provider\ResourceServiceIdentityInterface;
use KTXF\Resource\Provider\ResourceServiceLocationInterface; use KTXF\Resource\Provider\ResourceServiceLocationInterface;
use KTXF\Resource\Delta\Delta;
use KTXF\Resource\Documents\Collection\CollectionBaseInterface;
use KTXF\Resource\Documents\Collection\CollectionMutableInterface;
use KTXF\Resource\Documents\Service\ServiceBaseInterface;
use KTXF\Resource\Documents\Service\ServiceCollectionMutableInterface;
use KTXF\Resource\Documents\Service\ServiceConfigurableInterface;
use KTXF\Resource\Documents\Service\ServiceMutableInterface;
use KTXF\Resource\Filter\Filter;
use KTXF\Resource\Filter\IFilter;
use KTXF\Resource\Range\IRange; use KTXF\Resource\Range\IRange;
use KTXF\Resource\Range\Range; use KTXF\Resource\Range\Range;
use KTXF\Resource\Range\RangeType; use KTXF\Resource\Range\RangeType;
@@ -319,30 +316,18 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
return new CollectionResource(provider: $this->provider(), service: $this->identifier()); return new CollectionResource(provider: $this->provider(), service: $this->identifier());
} }
/** public function collectionCreate(string|int|null $location, CollectionMutableInterface $collection, array $options = []): CollectionBaseInterface
* Convert incoming collection properties into a native CollectionResource
*/
private function collectionNative(CollectionPropertiesBaseInterface $properties, string|int|null $identifier = null): CollectionResource
{
if ($properties instanceof CollectionResource) {
return clone $properties;
}
$object = new CollectionResource(provider: $this->provider(), service: $this->identifier());
$object->jsonDeserialize(array_filter([
CollectionResource::PROPERTY_IDENTIFIER => $identifier,
CollectionResource::PROPERTY_PROPERTIES => $properties->jsonSerialize(),
], fn($v) => $v !== null));
return $object;
}
public function collectionCreate(CollectionIdentifierInterface|null $target, CollectionPropertiesBaseInterface $properties, array $options = []): CollectionBaseInterface
{ {
$this->initialize(); $this->initialize();
$collection = $this->collectionNative($properties); if ($collection instanceof CollectionResource === false) {
$object = new CollectionResource(provider: $this->provider(), service: $this->identifier());
$object->jsonDeserialize($collection->jsonSerialize());
$collection = $object;
}
$collection = $collection->toJmap(); $collection = $collection->toJmap();
$collection = $this->remoteService->collectionCreate($target?->collection(), $collection, $options); $collection = $this->remoteService->collectionCreate($location, $collection, $options);
$object = new CollectionResource(provider: $this->provider(), service: $this->identifier()); $object = new CollectionResource(provider: $this->provider(), service: $this->identifier());
$object->fromJmap($collection); $object->fromJmap($collection);
@@ -350,12 +335,15 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
return $object; return $object;
} }
public function collectionUpdate(CollectionIdentifierInterface $target, CollectionPropertiesBaseInterface $properties): CollectionBaseInterface public function collectionUpdate(string|int $identifier, CollectionMutableInterface $collection): CollectionBaseInterface
{ {
$this->initialize(); $this->initialize();
$identifier = $target->collection(); if ($collection instanceof CollectionResource === false) {
$collection = $this->collectionNative($properties, $identifier); $object = new CollectionResource(provider: $this->provider(), service: $this->identifier());
$object->jsonDeserialize($collection->jsonSerialize());
$collection = $object;
}
$collection = $collection->toJmap(); $collection = $collection->toJmap();
$collection = $this->remoteService->collectionModify($identifier, $collection); $collection = $this->remoteService->collectionModify($identifier, $collection);
@@ -366,17 +354,14 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
return $object; return $object;
} }
public function collectionDelete(CollectionIdentifierInterface $target, bool $force = false): CollectionBaseInterface | true public function collectionDelete(string|int $identifier, bool $force = false, bool $recursive = false): bool
{ {
$this->initialize(); $this->initialize();
if ($this->remoteService->collectionDestroy($target->collection(), $force, $force) === null) { return $this->remoteService->collectionDestroy($identifier, $force, $recursive) !== null;
throw new \RuntimeException("Failed to delete collection: {$target->collection()}");
}
return true;
} }
public function collectionMove(CollectionIdentifierInterface|null $target, CollectionIdentifierInterface $source): CollectionBaseInterface public function collectionMove(string|int $identifier, string|int|null $targetLocation): CollectionBaseInterface
{ {
// TODO: Implement collection move // TODO: Implement collection move
$this->initialize(); $this->initialize();
@@ -384,17 +369,9 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
return $collection; return $collection;
} }
public function collectionCopy(CollectionIdentifierInterface|null $target, CollectionIdentifierInterface $source): CollectionBaseInterface
{
// TODO: Implement collection copy
$this->initialize();
$collection = new CollectionResource(provider: $this->provider(), service: $this->identifier());
return $collection;
}
// Entity operations // Entity operations
public function entityListBulk(string|int|null $collection, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): array public function entityList(string|int|null $collection, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): array
{ {
$this->initialize(); $this->initialize();
@@ -413,7 +390,7 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
return $list; return $list;
} }
public function entityListStream(string|int|null $collection, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): Generator public function entityListStream(string|int $collection, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): Generator
{ {
$this->initialize(); $this->initialize();
@@ -444,11 +421,11 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
return new Range(); return new Range();
} }
public function entityDelta(string|int|null $collection, string $signature): Delta public function entityDelta(string|int|null $collection, string $signature, string $detail = 'ids'): Delta
{ {
$this->initialize(); $this->initialize();
return $this->remoteService->entityDelta($collection, $signature, 'ids'); return $this->remoteService->entityDelta($collection, $signature, $detail);
} }
public function entityExtant(string|int|null $collection, string|int ...$identifiers): array public function entityExtant(string|int|null $collection, string|int ...$identifiers): array
@@ -458,45 +435,48 @@ class Service implements ServiceBaseInterface, ServiceMutableInterface, ServiceC
return $this->remoteService->entityExtant(...$identifiers); return $this->remoteService->entityExtant(...$identifiers);
} }
public function entityFetchBulk(EntityIdentifierInterface ...$identifiers): array public function entityFetch(string|int|null $collection, string|int ...$identifiers): array
{ {
$this->initialize(); $this->initialize();
$entityIds = array_map(fn($identifier) => $identifier->entity(), $identifiers); $entities = $this->remoteService->entityFetch(...$identifiers);
$entities = $this->remoteService->entityFetch(...$entityIds);
$list = []; foreach ($entities as &$entity) {
foreach ($entities as $key => $entity) {
if (is_array($entity) && isset($entity['id'])) { if (is_array($entity) && isset($entity['id'])) {
$object = new EntityResource(provider: $this->provider(), service: $this->identifier()); $object = new EntityResource(provider: $this->provider(), service: $this->identifier());
$object->fromJmap($entity); $object->fromJmap($entity);
$list[$object->identifier()] = $object; $entity = $object;
} else {
$list[$key] = $entity;
} }
} }
return $list; return $entities;
} }
public function entityFetchStream(EntityIdentifierInterface ...$identifiers): Generator public function entityRead(string|int|null $collection, string|int $identifier): ?string
{
yield from $this->entityFetchBulk(...$identifiers);
}
public function entityRead(EntityIdentifierInterface $target): ?string
{ {
return null; return null;
} }
public function entityReadStream(EntityIdentifierInterface $target) // Node operations
public function nodeList(string|int|null $collection, bool $recursive = false, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): array
{ {
return null; return [];
} }
public function entityReadChunk(EntityIdentifierInterface $target, int $offset, int $length): ?string public function nodeListFilter(): IFilter
{ {
return null; return new Filter(['']);
}
public function nodeListSort(): ISort
{
return new Sort(['']);
}
public function nodeDelta(string|int|null $collection, string $signature, string $detail = 'ids'): Delta
{
return new Delta();
} }
} }
+8 -8
View File
@@ -1836,9 +1836,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.5.16", "version": "8.5.15",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz",
"integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==", "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@@ -2145,16 +2145,16 @@
} }
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "8.1.3", "version": "8.1.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-8.1.3.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.0.tgz",
"integrity": "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==", "integrity": "sha512-BuJcQK/56NQTWDGn4ABea3q4SSBdNPWwNZKTkkUpcMPnLoquSYH8llRtSUIgoL1KSCpHt5eghLShn50mH36y7Q==",
"devOptional": true, "devOptional": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"lightningcss": "^1.32.0", "lightningcss": "^1.32.0",
"picomatch": "^4.0.4", "picomatch": "^4.0.4",
"postcss": "^8.5.16", "postcss": "^8.5.15",
"rolldown": "~1.1.3", "rolldown": "~1.1.2",
"tinyglobby": "^0.2.17" "tinyglobby": "^0.2.17"
}, },
"bin": { "bin": {