Readouble

Laravel 4.2 貢献ガイド

イントロダクションIntroduction

Laravelはオープンソースプロジェクトですから、誰でもLaravelを向上させるために貢献できます。スキルのレベルや性別、人種、宗教、国籍に拘わらず、皆さんの貢献を歓迎します。活気に満ちた、様々なコミュニティーを持っていることが、このフレームワークの芯となる、価値の一つなのです!Laravel is an open-source project and anyone may contribute to Laravel for its improvement. We welcome contributors, regardless of skill level, gender, race, religion, or nationality. Having a diverse, vibrant community is one of the core values of the framework!

みなさんの貢献を有効的に活かすため、現在Laravelではバグレポートではなく、プルリクエストだけを受け付けています。「バグレポート」はプルリクエストに含めた、失敗するユニットテストの形式で報告してください。もしくは、Laravelのサンドボックスアプリケーションの中で、そのバグをデモンストレーションし、Laravelのメインrepositoryにそれをプルリクエストとして送信します。失敗するユニットテストやサンドボックスアプリケーションは、バグが存在することを開発チームに示す証拠となりますし、そのバグを処理した後で修正できたことを示す確かな印として役立ちます。To encourage active collaboration, Laravel currently only accepts pull requests, not bug reports. "Bug reports" may be sent in the form of a pull request containing a failing unit test. Alternatively, a demonstration of the bug within a sandbox Laravel application may be sent as a pull request to the main Laravel repository[https://github.com/laravel/laravel]. A failing unit test or sandbox application provides the development team "proof" that the bug exists, and, after the development team addresses the bug, serves as a reliable indicator that the bug remains fixed.

LaravelのソースコードはGitHubで管理され、各Laravelプロジェクトのリポジトリーが存在しています。The Laravel source code is managed on Github, and there are repositories for each of the Laravel projects:

コア開発の議論Core Development Discussion

バグ、新機能、既存機能の実装についての議論は、Freenodeの#laravel-dev IRCチャンネルで行っています。LaravelのメンテナーであるTaylor Otwellは、通常ウイークエンドの午前8時から5時まで(America/Chicago標準時、UTC-6:00)接続しています。他の時間帯は、時々接続しています。Discussion regarding bugs, new features, and implementation of existing features takes place in the #laravel-dev IRC channel (Freenode). Taylor Otwell, the maintainer of Laravel, is typically present in the channel on weekdays from 8am-5pm (UTC-06:00 or America/Chicago), and sporadically present in the channel at other times.

#laravel-dev IRCチャンネルは、全ての人に開放しています。議論に参加しても、もしくはただ見ているだけでもかまいませんので、皆さんこのチャンネルへどうぞ参加してください!The #laravel-dev IRC channel is open to all. All are welcome to join the channel either to participate or simply observe the discussions!

新機能New Features

新機能のプルリクエストを送る前に、どうぞFreenodeの#laravel-dev IRCチャンネルでTaylor Otwellとコンタクトを取ってください。その機能がフレームワークとピッタリであれば、プルリクエストをお送りください。もし採用されなかった場合でも、諦めてはいけません!その機能をパッケージにし、Packagistを使い世界中に対しリリースすることが可能です。Before sending pull requests for new features, please contact Taylor Otwell via the #laravel-dev IRC channel (Freenode). If the feature is found to be a good fit for the framework, you are free to make a pull request. If the feature is rejected, don't give up! You are still free to turn your feature into a package which can be released to the world via Packagist[https://packagist.org/].

新しい機能を追加する場合、ユニットテストを追加するのを忘れないでください!ユニットテストは、追加されるその新しい機能が安定しており、信頼に足るものであることを確実にしてくれます。When adding new features, don't forget to add unit tests! Unit tests help ensure the stability and reliability of the framework as new features are added.

バグBugs

ユニットテストによる報告Via Unit Test

Laravelの開発チームと事前の議論を行わなくても、バグに対するプルリクエストは送っていただいてかまいません。バグフィックを送信する場合、そのバグが再現しないことを確実に示すユニットテストを含めてください!Pull requests for bugs may be sent without prior discussion with the Laravel development team. When submitting a bug fix, try to include a unit test that ensures the bug never appears again!

フレームワークにバグがあることを確信できているが、どうやって修正するのかが不確かな場合は、失敗するユニットテストを含めたプルリクエストを送ってください。失敗するユニットテストは、バグが存在することを開発チームに示す証拠となりますし、そのバグを処理した後で修正できたことを示す確かな印として役立ちます。If you believe you have found a bug in the framework, but are unsure how to fix it, please send a pull request containing a failing unit test. A failing unit test provides the development team "proof" that the bug exists, and, after the development team addresses the bug, serves as a reliable indicator that the bug remains fixed.

そのバグに対し、失敗するユニットテストをどのように書けばよいのかわからない場合は、フレームワークに含まれている他のユニットテストを参考にしてください。それでも迷っていたら、Freenodeの#laravel IRCチャネルで尋ねることもできます。If are unsure how to write a failing unit test for a bug, review the other unit tests included with the framework. If you're still lost, you may ask for help in the #laravel IRC channel (Freenode).

どのブランチ?Which Branch?

注意: このセクションはLiferaftアプリケーションではなく、主にlaravel/frameworkリポジトリーへプルリクエストを送る場合に適用される内容です。Note: This section primarly applies to those sending pull requests to the laravel/framework[https://github.com/laravel/framework] repository, not Liferaft applications.

全てのバグフィックスは、最新の安定ブランチに送ってください。次のリリースの中にだけ存在している機能に対する修正でない限り、決してバグフィックスをmasterブランチに送ってはいけません。All bug fixes should be sent to the latest stable branch. Bug fixes should never be sent to the master branch unless they fix features that exist only in the upcoming release.

現在のLaravelリリースと完全に後方コンパティビリティを持っているマイナーな機能は、最新の安定ブランチへ送ってください。Minor features that are fully backwards compatible with the current Laravel release may be sent to the latest stable branch.

次のLaravelリリースに含めるべき、メジャーな新機能は、常にmasterブランチへ送ってください。Major new features should always be sent to the master branch, which contains the upcoming Laravel release.

もし、あなたの新機能がメジャーなのか、マイナーなのかはっきりしなければ、Freenodeの#laravel-dev IRCチャネルでTaylor Otwellに尋ねてください。If you are unsure if your feature qualifies as a major or minor, please ask Taylor Otwell in the #laravel-dev IRC channel (Freenode).

セキュリティ脆弱性Security Vulnerabilities

Laravelにセキュリティー脆弱性を見つけたときは、メールでTaylor Otwell(taylorotwell@gmail.com)に連絡してください。セキュリティー脆弱性は急いで対応されるでしょう。If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylorotwell@gmail.com[mailto:taylorotwell@gmail.com]. All security vulnerabilities will be promptly addressed.

コーディングスタイルCoding Style

Laravelは、PSR-0PSR-1のコーディング規約に従っています。これらの標準以外に従うべき追加の規約です。Laravel follows the PSR-0[https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md] and PSR-1[https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md] coding standards. In addition to these standards, the following coding standards should be followed:

  • クラス名前空間の定義は、<?phpと同じ行で行う。The class namespace declaration must be on the same line as <?php.
  • クラス開始の{は、クラス名と同じ行に書く。A class' opening { must be on the same line as the class name.
  • 関数や制御構造は、オールマンスタイルの字下げを行う。Functions and control structures must use Allman style braces.
  • 字下げ(indent)はタブで、字揃え(align)は空白で。Indent with tabs, align with spaces.

章選択

Artisan CLI

設定

明暗テーマ
light_mode
dark_mode
brightness_auto システム設定に合わせる
テーマ選択
photo_size_select_actual デフォルト
photo_size_select_actual モノクローム(白黒)
photo_size_select_actual Solarized風
photo_size_select_actual GitHub風(青ベース)
photo_size_select_actual Viva(黄緑ベース)
photo_size_select_actual Happy(紫ベース)
photo_size_select_actual Mint(緑ベース)
コードハイライトテーマ選択

明暗テーマごとに、コードハイライトのテーマを指定できます。

テーマ配色確認
スクリーン表示幅
640px
80%
90%
100%

768px以上の幅があるときのドキュメント部分表示幅です。

インデント
無し
1rem
2rem
3rem
原文確認
原文を全行表示
原文を一行ずつ表示
使用しない

※ 段落末のEボタンへカーソルオンで原文をPopupします。

Diff表示形式
色分けのみで区別
行頭の±で区別
削除線と追記で区別

※ [tl!…]形式の挿入削除行の表示形式です。

テストコード表示
両コード表示
Pestのみ表示
PHPUnitのみ表示
和文変換

対象文字列と置換文字列を半角スペースで区切ってください。(最大5組各10文字まで)

本文フォント

総称名以外はCSSと同様に、"〜"でエスケープしてください。

コードフォント

総称名以外はCSSと同様に、"〜"でエスケープしてください。

保存内容リセット

localStrageに保存してある設定項目をすべて削除し、デフォルト状態へ戻します。

ヘッダー項目移動

キーボード操作