String Array Cast
まだ誰も着手していません。
評価
調査の方向性
この issue ではファイル、テスト、エントリーポイントが指定されていません。まず PHP がキャストをパースして配列を扱う方法を追跡し、次に提案された構文を、示されている array_map の動作と比較してください。機能の構文、意味論、互換性が定義され、テストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
Hi there!
I would like to propose the feature that would allow to cast an array of objects into an array of strings:
/** @var Uuid[] $templateIds */
$templateIdStrings = (string[])$templateIds;
Basically this is a syntax sugar to a more verbose form identical to this:
/** @var Uuid[] $templateIds */
$templateIdStrings = array_map(static fn (Uuid $value): string => (string)$value, $templateIds);
Please, let me know what you think about it.
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 103
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/php-src のほかの issue
-
Bug SAPI: cli_server Status: Verified
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
Bug Status: Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Bug Category: Tests Status: Verified
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
似ている issue
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
FujiNetWIFI/fujinet-firmware#1649 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
HarbourMasters/Shipwright#7229 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
riscv-software-src/riscv-isa-sim#2435 · コメント 1 件 ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100