Ground Sunlight

Windowsで作る - PHPプログラミングの開発環境

ユーザ用ツール

サイト用ツール


packagist:knowledge

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン 両方とも次のリビジョン
packagist:knowledge [2020/07/17 12:02]
y2sunlight [パッケージ・バージョンの管理]
packagist:knowledge [2020/07/17 15:30]
y2sunlight [composer.jsonの作成]
行 48: 行 48:
 \\ \\
  
-===== パッケージバージョン管理 =====+===== パッケージバージョン管理 =====
  
 パッケージの新しいバージョンは、バージョン管理システムのリポジトリに作成したタグから自動的にフェッチされます。 パッケージの新しいバージョンは、バージョン管理システムのリポジトリに作成したタグから自動的にフェッチされます。
行 54: 行 54:
 バージョニングを管理する最も簡単な方法は、composer.json ファイルからバージョンフィールド( ''version'' )を省略することです。 その後は、バージョン番号はタグとブランチ名から解析されます。 バージョニングを管理する最も簡単な方法は、composer.json ファイルからバージョンフィールド( ''version'' )を省略することです。 その後は、バージョン番号はタグとブランチ名から解析されます。
  
-Tag/version names should match 'X.Y.Z', or 'vX.Y.Z', with an optional suffix for RC, beta, alpha or patch versions. Here are a few examples of valid tag names:+タグ/バージョン名は ''X.Y.Z'' または ''vX.Y.Z'' と一致する必要があり、RC, beta, alpha または patch バージョンのオプションのサフィックスが付いています。次に、有効なタグ名の例をいくつか示します:
  
 <code> <code>
行 65: 行 65:
 </code> </code>
  
-Branches will automatically appear as "dev" versions that are easily installable by anyone that wants to try your library's latest and greatest, but that does not mean you should not tag releases. The use of [[https://semver.org/lang/ja/|Semantic]] Versioning is strongly encouraged.+ブランチは自動的に "dev" バージョンとして表示され、ライブラリの最新かつ最高のものを試してみたい人なら誰でも簡単にインストールできますが、リリースにタグを付けてはいけないという意味ではありません。[[https://semver.org/lang/ja/|セマンティックバージョニング]]の使用を強くお勧めします。 
 + 
 +> 例えば、''dev-master'' は masterブランチの最新バージョンを表します。
  
 \\ \\
行 72: 行 74:
 ===== composer.jsonの作成 ===== ===== composer.jsonの作成 =====
  
-The composer.json file should reside at the top of your package'git/svn/.. repository, and is the way you describe your package to both packagist and composer.+composer.json ファイルは、パッケージの git/svn/などの リポジトリの先頭に配置する必要があり、packagist と composer の両方にパッケージについて説明する手段となります。
  
-A typical composer.json file looks like this:+典型的な composer.json ファイルは次のようになります。
  
 <code json> <code json>
行 103: 行 105:
 </code> </code>
  
-Most of this information is obvious, keywords are tags, require are list of dependencies that your package has. This can of course be packages, not only a php version. You can use ext-foo to require php extensions (e.g. ext-curl). Note that most extensions don't expose version information, so unless you know for sure it does, it's safer to use "ext-curl": "*" to allow any version of it. Finally the type field is in this case indicating that this is a library. If you do plugins for frameworks etc, and if they integrate composer, they may have a custom package type for their plugins that you can use to install the package with their own installer. In the absence of custom type, you can omit it or use "library".+この情報のほとんどは明白で、キーワード( ''keywords'' )はタグであり、パッケージが持つ依存関係のリスト( ''require'' )が必要です。もちろん、これはphpバージョンだけでなく、パッケージでもかまいません。''ext-foo'' を使用して、php拡張モジュールを要求できます(例:''ext-cur''l)。ほとんどの拡張モジュールはバージョン情報を公開しない点に注意して下さい。従って、確実に公開していない限り、''"ext-curl":"*"'' を使用して、どのバージョンでも許可する方が安全です。最後に、タイプフィールド( ''type'' )ですが、上記の場合は、これがライブラリであることを示しています。フレームワークなどに対するプラグインを作成し、それらが composer を統合している場合、独自のインストーラーを使用してパッケージをインストールするために使用できるプラグイン用のカスタムパッケージタイプがある場合があります。カスタムタイプがない場合は、それを省略するか、"ライブラリを使用できます。
  
-Once you have this file committed in your repository root, you can [[https://packagist.org/packages/submit|submit the package]] to Packagist by entering the public repository URL.+このファイルをリポジトリのルートでコミットしたら、パブリックリポジトリのURLを入力してパッケージを Packagist に[[https://packagist.org/packages/submit|送信]] できます。
  
 \\ \\
  
-=== スケジュールの更新 ===+===== スケジュールの更新 =====
  
 New packages will be crawled immediately after submission if you have JS enabled. New packages will be crawled immediately after submission if you have JS enabled.
packagist/knowledge.txt · 最終更新: 2020/07/17 16:14 by y2sunlight