Introduce `ReflectionProperty::isUnset()`
まだ誰も着手していません。
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
There is a difference between uninitialized and unset property when magic method like __get() is defined. The need of these two states was discussed in #9389.
Currently there is no way to detect if property is just uninitialized or also unset, so from the observable state, it is impossible to tell the property behaviour of a given object.
repro: https://3v4l.org/lDeXi
This is a feature request to add ReflectionProperty::isUnset() method.
An alternative would be to update property_exists() function behaviour - https://www.php.net/manual/en/function.property-exists.php#116824 - which does not account for unset property since it was introduced.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされている 3v4l.org の再現例と、php-src にある既存の ReflectionProperty API エントリーポイントから始めてください。未初期化のプロパティと設定解除されたプロパティの動作の違いを定義し、そのうえで ReflectionProperty::isUnset() によってその違いを公開でき、代替となる property_exists() の動作を変更しないことを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, php
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100