Namespaces and PSR-4 compliance
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- php
調査の方向性
exercise の README.md ファイルと提案されている src および test ディレクトリを確認し、それらを利用するテスト自動化も調査します。提案されている Exercism\Bob および ExercismTest\Bob namespace とファイル配置を、現在の exercise と比較します。maintainer が具体的な構造と、その自動化への影響について合意すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
One of the points I am missing in the exercises of this track is the concept of namespaces (PSR-4 compatibility). Therefore, I would like to discuss and propose the following change.
Suggestion
Each exercise separates actual business logic from tests by having separate src and test directories. The README.md stays in the exercise's root folder. The example solution (and coming stub file) are going into src and the test file into test.
The terminating class name corresponds to a file name ending in .php. The file name MUST match the case of the terminating class name.
Since there is no definition for declaration of functions pertaining to the filename, two possible solutions are crossing my mind. Either name the file functions.php or exercise-name.php - both residing within the exercise's namespace. Here I am interested in suggestions, since I haven't used a file collecting various functions in years.
Example
Taking Bob as an example, this would result in the following structure:
/src→ namespaceExercism\BobBob.php(stub file)example.php(example solution)
/test→ namespaceExercismTest\BobBobTest.php
README.md
Looking for feedback
My intention is to provide an even greater learning experience for the student within a modern (meaning current) environment.
It would be great to get some feedback on the suggestion over all and possible side effects I might not have fully considered yet (like implications on test automation etc.). Thank you!
- 主要言語
- PHP
- スター
- 167
- フォーク
- 150
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
exercism/php のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
Discussion: Test generator design再び着手できるかも @mk-mxp が 369 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
似ている issue
-
Python 3.15 support対応中かも @amnesiaof が今日担当しました。 オープンL: python L: python:uv
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dependabot/dependabot-core#16524 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
crazy-goat/rabbit-stream#830 ·
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
Перевод устарел
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100