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
No find($id) — links use composite identifiers, not a single numeric ID. No create()/update()/patch() — links are atomic add/remove operations. No all() — always scoped to a specific object type and ID. delete() is not standard CRUD — calls remove() instead.
Acceptance Criteria
php -l + phpcs PSR-12 clean
list('Ticket', 42) returns PaginatedList<LinkDTO>
add('normal', 'Ticket', 1, 'Ticket', 2) POSTs link
remove('parent', 'Ticket', 1, 'Ticket', 2) DELETEs link
Extends AbstractRepository where applicable, overrides methods that don't fit the composite-key model
getListKey() returns 'links'
Testing: LinkRepositoryTest — list('Ticket', 1), add normal link between two tickets, remove link
Documentation in README: README — ticket linking add/remove example
API Reference: Ticket Links
Links objects (typically tickets) to each other. Three link types exist:
normal(standard),parent(blocks),child(blocked by).Methods:
list(string $objectType, int $objectId)links?link_object={type}&link_object_value={id}add(string $type, string $sourceType, int $sourceId, string $targetType, int $targetId)links/addremove(string $type, string $sourceType, int $sourceId, string $targetType, int $targetId)links/remove?link_type=...&link_object_source=...&link_object_source_value=...&link_object_target=...&link_object_target_value=...No
find($id)— links use composite identifiers, not a single numeric ID. Nocreate()/update()/patch()— links are atomic add/remove operations. Noall()— always scoped to a specific object type and ID.delete()is not standard CRUD — callsremove()instead.Acceptance Criteria
php -l+phpcs PSR-12cleanlist('Ticket', 42)returnsPaginatedList<LinkDTO>add('normal', 'Ticket', 1, 'Ticket', 2)POSTs linkremove('parent', 'Ticket', 1, 'Ticket', 2)DELETEs linkAbstractRepositorywhere applicable, overrides methods that don't fit the composite-key modelgetListKey()returns'links'Depends on
Produces
LinkRepository