90682e809c
LST-68 (2.6) backend. Behaviour-preserving move of the external integrations into src/Module/Integration/. All 26 routes and securities unchanged. - 5 entities (4 *Configuration singletons + TaskBookStackLink) + 5 repositories (Domain interfaces + Doctrine impls, bound). TaskBookStackLink.task now references TaskInterface (contract). - Domain (FileSource interface, SharePathResolver, share DTOs + exceptions); Infrastructure (GiteaApiService, BookStackApiService, SmbFileSource, 15 ApiResources, 21 State, 4 Share controllers). - Cross-module couplings via abstractions: CalDavService (PM) injects ZimbraConfigurationRepositoryInterface; PM TaskDocument consumers repointed to the module's FileSource/SharePathResolver; Gitea/BookStack State load tasks via TaskRepositoryInterface (concrete Project read for integration fields — documented). ZimbraTestConnection keeps CalDavService (no build cycle). TokenEncryptor stays shared. - IntegrationModule registered; doctrine mapping added. - #[Auditable] + Timestampable on the 4 Configuration entities (additive migration on the 4 *_configuration tables). 163 tests green, container compiles (no cycle), no route regression, cs-fixer clean.
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Module\Integration\Infrastructure\ApiPlatform\Resource;
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\GetCollection;
|
|
use App\Module\Integration\Infrastructure\ApiPlatform\State\GiteaPullRequestProvider;
|
|
use Symfony\Component\Serializer\Attribute\Groups;
|
|
|
|
#[ApiResource(
|
|
operations: [
|
|
new GetCollection(
|
|
uriTemplate: '/tasks/{taskId}/gitea/pull-requests',
|
|
normalizationContext: ['groups' => ['gitea_pr:read']],
|
|
provider: GiteaPullRequestProvider::class,
|
|
security: "is_granted('ROLE_USER')",
|
|
),
|
|
],
|
|
)]
|
|
final class GiteaPullRequest
|
|
{
|
|
#[Groups(['gitea_pr:read'])]
|
|
public int $number = 0;
|
|
|
|
#[Groups(['gitea_pr:read'])]
|
|
public string $title = '';
|
|
|
|
#[Groups(['gitea_pr:read'])]
|
|
public string $state = '';
|
|
|
|
#[Groups(['gitea_pr:read'])]
|
|
public bool $merged = false;
|
|
|
|
#[Groups(['gitea_pr:read'])]
|
|
public string $headBranch = '';
|
|
|
|
#[Groups(['gitea_pr:read'])]
|
|
public string $author = '';
|
|
|
|
#[Groups(['gitea_pr:read'])]
|
|
public string $url = '';
|
|
|
|
/**
|
|
* @var array<array{context: string, status: string, target_url: string}>
|
|
*/
|
|
#[Groups(['gitea_pr:read'])]
|
|
public array $ciStatuses = [];
|
|
}
|