String Array Cast
オープン
まだ誰も着手していません。
Category: Engine
Feature
Status: Requires RFC
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue ではファイル、テスト、エントリーポイントが指定されていません。まず PHP がキャストをパースして配列を扱う方法を追跡し、次に提案された構文を、示されている array_map の動作と比較してください。機能の構文、意味論、互換性が定義され、テストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100