meilisearch / meilisearch/meilisearch-php

Add types to document handling methods (HandlesDocuments trait)

Open Beginner friendly
#843 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

breaking-change
Dominant language
PHP
Stars
757
Forks
125
Avg merge
6d 8h
Merged PRs (30d)
2

Description

The HandlesDocuments trait contains several methods with generic array parameters or missing return types.

File: src/Endpoints/Delegates/HandlesDocuments.php

Action:

  • getDocument(...): Add PHPDoc @return array<string, mixed>.
  • addDocuments(array $documents, ...): Add PHPDoc @param list<array<string, mixed>> $documents.
  • updateDocuments(array $documents, ...): Add PHPDoc @param list<array<string, mixed>> $documents.
  • deleteDocuments(array $options): Add PHPDoc for expected $options shape.
  • addDocumentsInBatches: Add specific array type PHPDoc.
  • updateDocumentsInBatches: Add specific array type PHPDoc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open src/Endpoints/Delegates/HandlesDocuments.php and inspect the PHPDoc and signatures for getDocument, addDocuments, updateDocuments, deleteDocuments, addDocumentsInBatches, and updateDocumentsInBatches. Add the requested generic array annotations and the expected options shape for deleteDocuments. The work is done when all six methods have specific, accurate PHPDoc types.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.