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
{{ message }}
Repository navigation
TasksProvider::create() passes mismatched args to TaskService::createTask (latent TypeError) #1539
```php
public function createTask(
int $registerId,
int $schemaId,
string $objectUuid,
string $objectTitle,
array $data
): ?array
```
The caller passes 6 args, the callee expects 5; types are wrong (string $calendarId → int $registerId, etc.); the array shape isn't built. Any UI flow that POSTs to the Tasks provider create endpoint will crash with TypeError: argument #1 ($registerId) must be of type int, string given.
Why we noticed
Surfaced while doing a phpcs cleanup pass. The Custom.NamedParameters sniff flagged the positional call. Naming the args would either hit an unknown named parameter PHP fatal or hide the bug, so the call was suppressed with @phpcs:ignore and this issue filed for the underlying fix.
A helper to look up the OR object's title (probably via ObjectService::find)
Casting $register/$schema from string to int safely (they're typed string in the provider's interface, may be slugs)
A behavior test against a real calendar to verify the new call shape
Acceptance criteria
TasksProvider::create() call to TaskService::createTask matches the receiver signature
Remove the @phpcs:ignore at TasksProvider.php:173
Add a unit test covering the create path
Optional: figure out whether the \$payload['calendarId'] from the UI is still needed (TaskService auto-finds the calendar via findUserCalendar() — looks unused)
Activity
fix(phpcs): clean development to 0 errors across 41 files (#1562)
fix(tasks): align TasksProvider::create with TaskService::createTask …