meilisearch / meilisearch/meilisearch-php

Add types to settings handling methods (HandlesSettings trait)

Open Beginner friendly
#844 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 HandlesSettings trait needs improvements regarding return types and parameter definitions.

File: src/Endpoints/Delegates/HandlesSettings.php

Action:

  • getSeparatorTokens(): Add PHPDoc @return list<non-empty-string>.
  • getEmbedders(): Add PHPDoc defining the embedder array shape.
  • updateEmbedders(array $embedders): Add PHPDoc defining the embedder array shape.

File: src/Endpoints/Delegates/HandlesSystem.php

  • generateTenantToken: Add type hint array|object for $searchRules.
  • swapIndexes: Add PHPDoc @param list<array{string, string}> $indexes.

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

Start by reading src/Endpoints/Delegates/HandlesSettings.php and src/Endpoints/Delegates/HandlesSystem.php, focusing on the named methods and their existing signatures or PHPDoc. Add the requested return, parameter, array-shape, and union type definitions, then verify that each declaration matches the methods' current inputs and outputs.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.