Flagsmith / Flagsmith/flagsmith-php-client

Resolve `jsonSerialize` deprecation warnings

オープン
#36 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
18
フォーク
13
平均マージ
28分
マージ済み PR(30日)
1

説明

The following warning was presented for the `jsonSerialize()` methods on the `MultivariateFeatureStateValueModelList` and `CollectionTrait` and classes. We have temporarily resolved this in [this PR](https://github.com/Flagsmith/flagsmith-php-client/pull/34) 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
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず PR 34 と、MultivariateFeatureStateValueModelList、CollectionTrait、FlagModelsList にある jsonSerialize() の実装を確認します。現在一時的に使用されている戻り値の型のアプローチを確認し、その後、関連するプロジェクトのチェックを実行して、サポート対象の PHP バージョンを壊すことなく非推奨警告が出力されなくなったことを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
php
領域
backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。