From c65f6f30a1e46c35188ae2cf38bdad27b45f0df3 Mon Sep 17 00:00:00 2001 From: Takuya Aramaki Date: Tue, 25 Feb 2025 19:32:41 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E8=8B=B1=E8=AA=9E=E7=89=88=E3=81=AECompose?= =?UTF-8?q?r=E9=96=A2=E9=80=A3=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=82=92=E3=82=B3=E3=83=94=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/composer.xml | 50 ++++++++++++++++++++++++++++++++++++++ language/oop5/autoload.xml | 22 ++++++++++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 install/composer.xml diff --git a/install/composer.xml b/install/composer.xml new file mode 100644 index 0000000000..d032413f0e --- /dev/null +++ b/install/composer.xml @@ -0,0 +1,50 @@ + + + + + + Installation of Composer and third-party packages + + + Introduction to Composer + + &link.composer; is a dependency manager for PHP that makes it possible + to define third-party code packages used by a project that can + then be easily installed and updated. It leverages the built-in + class autoloading features + of PHP, repositories of PHP packages such as + Packagist, and common project + layout and coding conventions. + + + For example, if a PHP application or website needs + to work with UUID values, + Ben Ramsey's + ramsey/uuid package that implements the + widely known and used types of UUIDs that are defined by + RFC 4122 could be used. + + + Briefly, this is done by creating a composer.json + in the project, using Composer to install the latest version of the + package, and including Composer's autoload script to make it available + to the code. The Composer + "Basic Usage" documentation goes into this in more depth. + + + + <literal>composer.json</literal> that requires a single package + + + + + + + + diff --git a/language/oop5/autoload.xml b/language/oop5/autoload.xml index 1be66c49bd..41f12b149a 100644 --- a/language/oop5/autoload.xml +++ b/language/oop5/autoload.xml @@ -1,6 +1,6 @@ - + @@ -89,6 +89,26 @@ string(5) "ITest" Fatal error: Interface 'ITest' not found in ... */ ?> +]]> + + + + Using Composer's autoloader + + &link.composer; generates a vendor/autoload.php + which is set up to automatically load packages that are being managed + by Composer. By including this file, those packages can be used without + any additional work. + + + ", $uuid->toString(), "\n"; +?> ]]> From 6fa8293e9fdb9f3483c8b920232080b13b4f8f1a Mon Sep 17 00:00:00 2001 From: Takuya Aramaki Date: Tue, 25 Feb 2025 20:04:41 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Composer=20=E9=96=A2=E9=80=A3=E3=83=89?= =?UTF-8?q?=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AE=E6=97=A5?= =?UTF-8?q?=E6=9C=AC=E8=AA=9E=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/composer.xml | 41 +++++++++++++++++++------------------- language/oop5/autoload.xml | 9 ++++----- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/install/composer.xml b/install/composer.xml index d032413f0e..9a49c9dbff 100644 --- a/install/composer.xml +++ b/install/composer.xml @@ -3,37 +3,36 @@ - Installation of Composer and third-party packages + Composer とサードパーティパッケージのインストール - Introduction to Composer + Composer 入門 - &link.composer; is a dependency manager for PHP that makes it possible - to define third-party code packages used by a project that can - then be easily installed and updated. It leverages the built-in - class autoloading features - of PHP, repositories of PHP packages such as - Packagist, and common project - layout and coding conventions. + &link.composer; は PHP + 用の依存管理ツールで、プロジェクトで利用するサードパーティのパッケージを定義し、 + そのインストールと更新が簡単に行えるようになります。 + Composer は PHP 組み込みの + クラスのオートロード機能 + と、 Packagist のような PHP + パッケージのリポジトリ、そして共通のプロジェクト構造とコーディング規約を利用しています。 - For example, if a PHP application or website needs - to work with UUID values, - Ben Ramsey's - ramsey/uuid package that implements the - widely known and used types of UUIDs that are defined by - RFC 4122 could be used. + 例えば、PHP アプリケーションやウェブサイトで UUID + を利用する必要がある場合、RFC 4122 + で定義された、広く知られていて使われている UUID の形式を実装した + Ben Ramsey の + ramsey/uuid パッケージ を利用することができます。 - Briefly, this is done by creating a composer.json - in the project, using Composer to install the latest version of the - package, and including Composer's autoload script to make it available - to the code. The Composer - "Basic Usage" documentation goes into this in more depth. + 簡単に言うと、composer.json + をプロジェクトに作成し、Composer を使って最新バージョンのパッケージをインストールし、 + Composer のオートロードスクリプトを読み込むことでパッケージがコード内で利用可能となります。 + 詳細は Composer の + "Basic Usage" ドキュメント を参照してください。 - <literal>composer.json</literal> that requires a single package + 一つのパッケージを依存に持つ <literal>composer.json</literal> - Using Composer's autoloader + Composerのオートローダーの利用 - &link.composer; generates a vendor/autoload.php - which is set up to automatically load packages that are being managed - by Composer. By including this file, those packages can be used without - any additional work. + &link.composer; は vendor/autoload.php ファイルを生成します。 + これは Composer によって管理されているパッケージを自動的に読み込むよう設定されています。 + このファイルを読み込むことで、これらのパッケージを追加の作業なしで利用できるようになります。 Date: Sat, 1 Mar 2025 09:13:04 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BF=BB=E8=A8=B3=EF=BC=88=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=EF=BC=89=E5=AF=BE=E8=B1=A1=E3=81=AE=E3=83=AA=E3=83=93?= =?UTF-8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E7=95=AA=E5=8F=B7=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- language/oop5/autoload.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/oop5/autoload.xml b/language/oop5/autoload.xml index 174f407e34..9c76c9a8e6 100644 --- a/language/oop5/autoload.xml +++ b/language/oop5/autoload.xml @@ -1,6 +1,6 @@ - +