Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Resolve `jsonSerialize` deprecation warnings

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
backend

Research direction

Start by reviewing PR 34 and the jsonSerialize() implementations on MultivariateFeatureStateValueModelList, CollectionTrait, and FlagModelsList. Confirm which return-type approach is currently temporary, then run the relevant project checks to verify the deprecation warning is no longer emitted without breaking supported PHP versions.

Written by the indexing model from the issue text.

Description

The following warning was presented for the jsonSerialize() methods on the MultivariateFeatureStateValueModelList and CollectionTrait and classes. We have temporarily resolved this in this PR by indicating that the return type will change in the next major version.

Deprecated: Return type of Flagsmith\Utils\Collections\FlagModelsList::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Dominant language
PHP
Stars
18
Forks
13
Avg merge
28m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

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.

More from Flagsmith/flagsmith-php-client

All issues in Flagsmith/flagsmith-php-client

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.