Readouble

Laravel 13.x 貢献ガイド

バグレポートBug Reports

活発なコラボレーションを促進するため、LaravelはGitHub issueではなく、問題に対処するプルリクエストを強く推奨します。ほとんどのファーストパーティパッケージでは、GitHub issueを無効にしています。To encourage active collaboration, Laravel strongly encourages pull requests that address problems, not GitHub issues. GitHub issues are disabled on most of our first-party packages.

問題を発見した場合は、その問題に対処するプルリクエストを作成してください。プルリクエストには、タイトルと、問題およびその解決策についての明確な説明を含める必要があります。また、できるだけ多くの関連情報と、問題を実証するコードサンプルも含めてください。プルリクエストの目標は、自分自身、そして他の人が問題を理解し、修正を検証しやすくすることです。If you discover a problem, please create a pull request that addresses the problem. Your pull request should contain a title and a clear description of the problem and its solution. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a pull request is to make it easy for yourself - and others - to understand the problem and verify the fix.

問題の修正方法がわからない場合は、コーディングエージェントに問題を説明し、プルリクエストを作成してください。If you do not know how to fix the problem, describe the issue to a coding agent and use it to attempt a pull request.

プルリクエストは、「ready for review」とマークされ(「draft」状態ではない)、新機能のすべてのテストにパスした場合のみレビューします。「draft」状態のまま放置された非アクティブなプルリクエストは、数日後にクローズします。Pull requests will only be reviewed when marked as "ready for review" (not in the "draft" state) and all tests for new features are passing. Lingering, non-active pull requests left in the "draft" state will be closed after a few days.

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

質問のサポートSupport Questions

LaravelのGitHubイシュートラッカーは、Laravelのヘルプやサポートの提供を目的としていません。代わりに以下のチャンネルを利用してください。Laravel's GitHub issue trackers are not intended to provide Laravel help or support. Instead, use one of the following channels:

どのブランチ?Which Branch?

すべてのバグフィックスは、バグフィックスをサポートする最新バージョン (現在は 13.x) へ送るべきです。次期リリースにのみ存在する機能を修正する場合を除き、バグ修正を決してmasterブランチに送ってはいけません。All bug fixes should be sent to the latest version that supports bug fixes (currently 13.x). Bug fixes should never be sent to the master branch unless they fix features that exist only in the upcoming release.

現在のリリースと完全な下位互換性があるマイナーな機能は、最新の安定版ブランチ(現在は13.x)へ送ってください。Minor features that are fully backward compatible with the current release may be sent to the latest stable branch (currently 13.x).

メジャーな新機能や互換性のない変更を含む機能は、常に次のリリースに含まれるmasterブランチへ送ってください。Major new features or features with breaking changes should always be sent to the master branch, which contains the upcoming release.

アセットのコンパイルCompiled Assets

laravel/laravelリポジトリのresources/cssresources/js下のほとんどのファイルのように、コンパイル済みファイルに影響を及ぼすファイルへ変更を行う場合、コンパイル済みファイルをコミットしないでください。大きなファイルサイズであるため、メンテナは実際レビューできません。悪意のあるコードをLaravelへ紛れ込ませる方法を提供してしまいます。これを防御的に防ぐため、すべてのコンパイル済みファイルはLaravelメンテナが生成しコミットします。If you are submitting a change that will affect a compiled file, such as most of the files in resources/css or resources/js of the laravel/laravel repository, do not commit the compiled files. Due to their large size, they cannot realistically be reviewed by a maintainer. This could be exploited as a way to inject malicious code into Laravel. In order to defensively prevent this, all compiled files will be generated and committed by Laravel maintainers.

AI生成による貢献AI-Generated Contributions

Laravelへ送信するすべてのプルリクエストに感謝します。しかし、思慮深い人間のレビューや検討を経ずに、主にAIが生成した大幅な貢献は受け付けません。We appreciate every pull request submitted to Laravel. However, substantial contributions that are primarily AI-generated without thoughtful human review and consideration are not acceptable.

フレームワークへの大規模または複雑な貢献を支援するためにAIツールの使用を選択する場合、提出する前に、結果として得られるコードを徹底的にレビュー、テストし、自身で理解している必要がありますIf you choose to use AI tools to assist with large or complex contributions to the framework, the resulting code must be thoroughly reviewed, tested, and understood by you before submitting.

プルリクエストの説明は、必ずコントリビュータがすべて自身で作成してください。AIが生成した説明を含むプルリクエストはクローズします。Pull request descriptions must be written entirely by the contributor. Pull requests with AI-generated descriptions will be closed.

**完全にAIによって生成したイシューやプルリクエストの大量作成は、容認しません。**そのようなプルリクエストはレビューなしでクローズし、投稿したユーザーはリポジトリからブロックする可能性があります。Mass opening issues or pull requests that are entirely AI-generated will not be tolerated. Such pull requests will be closed without review, and the contributing user may be blocked from the repository.

コントリビューターの皆さんには、既存のコードベースに精通し、コミュニティと交流し、解決しようとしている問題に対する自分自身の理解と細心の注意を反映したプルリクエストを提出することを推奨します。We encourage contributors to familiarize themselves with the existing codebase, engage with the community, and submit pull requests that reflect their own understanding and careful consideration of the problem they are solving.

セキュリティ脆弱性Security Vulnerabilities

Laravel内のセキュリティ脆弱性を発見した場合は、security@laravel.comのセキュリティチームへメールを送信してください。すべてのセキュリティ脆弱性へ迅速に対応します。If you discover a security vulnerability within Laravel, please email our security team at security@laravel.com[mailto:security@laravel.com]. All security vulnerabilities will be promptly addressed.

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

LaravelはPSR-2コーディング規約とPSR-4オートローディング規約に準拠しています。Laravel follows the PSR-2[https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md] coding standard and the PSR-4[https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md] autoloading standard.

PHPDocPHPDoc

次に正しいLaravelのドキュメントブロックの例を示します。@param属性に続け2スペース、引数タイプ、2スペース、最後に変数名となっていることに注意してください。Below is an example of a valid Laravel documentation block. Note that the @param attribute is followed by two spaces, the argument type, two more spaces, and finally the variable name:

/**
 * コンテナへ結合を登録
 *
 * @param  string|array  $abstract
 * @param  \Closure|string|null  $concrete
 * @param  bool  $shared
 * @return void
 *
 * @throws \Exception
 */
public function bind($abstract, $concrete = null, $shared = false)
{
    // …
}

ネイティブ型の使用により、@param属性や@return属性が冗長になる場合は、それらを削除することができます。When the @param or @return attributes are redundant due to the use of native types, they can be removed:

/**
 * ジョブを実行
 * [tl! remove]
 * @return void [tl! remove]
 */
public function handle(AudioProcessor $processor): void
{
    // …
}

ただし、ネイティブ型が汎用型の場合は、@param属性または@return属性を用いて汎用型を指定してください。However, when the native type is generic, please specify the generic type through the use of the @param or @return attributes:

/**
 * メッセージの添付を取得
 * [tl! add]
 * @return array<int, \Illuminate\Mail\Mailables\Attachment> [tl! add]
 */
public function attachments(): array
{
    return [
        Attachment::fromStorage('/path/to/file'),
    ];
}

StyleCIStyleCI

コードのスタイルが完璧でなくても心配ありません。プルリクエストがマージされた後で、StyleCIが自動的にスタイルを修正し、Laravelリポジトリへマージします。これによりコードスタイルではなく、貢献の内容へ集中できます。Don't worry if your code styling isn't perfect! StyleCI[https://styleci.io/] will automatically merge any style fixes into the Laravel repository after pull requests are merged. This allows us to focus on the content of the contribution and not the code style.

行動規範Code of Conduct

Laravelの行動規範はRubyの行動規範を基にしています。行動規範の違反はTaylor Otwell(taylor@laravel.com)へ報告してください。The Laravel code of conduct is derived from the Ruby code of conduct. Any violations of the code of conduct may be reported to Taylor Otwell (taylor@laravel.com[mailto:taylor@laravel.com]):

  • 参加者は反対意見に寛容であること。Participants will be tolerant of opposing views.
  • 参加者は個人攻撃や個人的な発言の誹謗に陥らぬように言動に気をつけてください。Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
  • 相手の言動を解釈する時、参加者は常に良い意図だと仮定してください。When interpreting the words and actions of others, participants should always assume good intentions.
  • 嫌がらせと考えるのがふさわしい振る舞いは、寛容に扱いません。Behavior that can be reasonably considered harassment will not be tolerated.

章選択

設定

明暗テーマ
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のみ表示
OS表示
全OS表示
macOSのみ表示
windowsのみ表示
linuxのみ表示
JSフレームワーク
両フレームワーク
Reactのみ表示
Vueのみ表示
Svelteのみ表示
JSのみ表示

(JSが存在しない場合は、他を全表示)

和文変換

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

本文フォント

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

コードフォント

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

保存内容リセット

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

ヘッダー項目移動

キーボード操作