From 8fb63597c10f1ccd3a7fdb4daa7aad0bb4b48cdf Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sun, 2 Jun 2024 23:58:03 +0900 Subject: [PATCH 1/7] Add workflow to generate PHP class diagram This commit introduces a new GitHub action workflow that generates a class diagram for PHP code. This workflow triggers on push, pull request, and workflow dispatch. It includes steps for code checkout, creating the class diagram, and uploading the created diagram as an artifact which is retained for 5 days. --- .github/workflows/php-class-diagram.yml | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/php-class-diagram.yml diff --git a/.github/workflows/php-class-diagram.yml b/.github/workflows/php-class-diagram.yml new file mode 100644 index 00000000..284c8895 --- /dev/null +++ b/.github/workflows/php-class-diagram.yml @@ -0,0 +1,30 @@ +name: PHP Class Diagram + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + pcd: + runs-on: ubuntu-latest + name: PHP Class Diagram + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Create class diagram + id: create-class-diagram + uses: smeghead/php-class-diagram-gh-action@v0 + with: + target-path: src + output-path: php-class-diagram.svg + target-repo: ${{ github.repository }} + target-branch: ${{ github.ref_name }} + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Class_Diagram + path: php-class-diagram.svg + retention-days: 5 From 6ab208de6af74888e999b02f53949b5b05d9f1dd Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 3 Jun 2024 00:10:45 +0900 Subject: [PATCH 2/7] fixup! Add workflow to generate PHP class diagram --- .github/workflows/php-class-diagram.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/php-class-diagram.yml b/.github/workflows/php-class-diagram.yml index 284c8895..880e562a 100644 --- a/.github/workflows/php-class-diagram.yml +++ b/.github/workflows/php-class-diagram.yml @@ -28,3 +28,10 @@ jobs: name: Class_Diagram path: php-class-diagram.svg retention-days: 5 + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ${{ steps.pcd.outputs.dir}} + destination_dir: ${{ steps.pcd.outputs.dir}} From fb0dac13e2ba68d38880bd822443af975b9286b4 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 3 Jun 2024 00:37:09 +0900 Subject: [PATCH 3/7] Add technical documents section to README A section for Technical Documents has been added to the README.md file. A link to the PHP class diagram is included in this new section for reference. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index cfebf780..928470d8 100644 --- a/README.md +++ b/README.md @@ -286,3 +286,7 @@ SevericeLocator::setReader(new AttributeReader);` --- * Note: This documentation of the most part is taken from [Guice/AOP](https://github.com/google/guice/wiki/AOP). + +## Technical Documents + +- [PHP class diagram](https://koriym.github.io/Ray.Aop/php-class-diagram.svg) From b961ae230cd48c33a547c1405311e28ab7c5eec3 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 3 Jun 2024 01:24:20 +0900 Subject: [PATCH 4/7] fixup! fixup! Add workflow to generate PHP class diagram --- .github/workflows/php-class-diagram.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php-class-diagram.yml b/.github/workflows/php-class-diagram.yml index 880e562a..d6fc5738 100644 --- a/.github/workflows/php-class-diagram.yml +++ b/.github/workflows/php-class-diagram.yml @@ -13,12 +13,15 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Create output directory + run: mkdir -p images + - name: Create class diagram id: create-class-diagram uses: smeghead/php-class-diagram-gh-action@v0 with: target-path: src - output-path: php-class-diagram.svg + output-path: ./images/php-class-diagram.svg target-repo: ${{ github.repository }} target-branch: ${{ github.ref_name }} @@ -26,12 +29,12 @@ jobs: uses: actions/upload-artifact@v4 with: name: Class_Diagram - path: php-class-diagram.svg + path: ./images/php-class-diagram.svg retention-days: 5 - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ${{ steps.pcd.outputs.dir}} - destination_dir: ${{ steps.pcd.outputs.dir}} + publish_dir: ./images + destination_dir: ./images From 14dee02ee7ff5173b7864089ca387901dd359a27 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 3 Jun 2024 01:33:25 +0900 Subject: [PATCH 5/7] fixup! fixup! fixup! Add workflow to generate PHP class diagram --- .github/workflows/php-class-diagram.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/php-class-diagram.yml b/.github/workflows/php-class-diagram.yml index d6fc5738..e4a17093 100644 --- a/.github/workflows/php-class-diagram.yml +++ b/.github/workflows/php-class-diagram.yml @@ -38,3 +38,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./images destination_dir: ./images + force_orphan: true From 6ef42e566657f562b0467c625747dfc9cee0c73f Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 3 Jun 2024 08:47:43 +0900 Subject: [PATCH 6/7] Update PHP class diagram link in README.md The PHP class diagram URL in the Technical Documents section of README.md was outdated. It has been updated to the current location. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 928470d8..90e4959b 100644 --- a/README.md +++ b/README.md @@ -289,4 +289,4 @@ SevericeLocator::setReader(new AttributeReader);` ## Technical Documents -- [PHP class diagram](https://koriym.github.io/Ray.Aop/php-class-diagram.svg) +- [PHP class diagram](https://ray-di.github.io/Ray.Aop/images/php-class-diagram.svg) From d1b79b7dd3d8585387b793f384c0cd06274c040d Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 3 Jun 2024 10:17:36 +0900 Subject: [PATCH 7/7] Add PHP class diagram in docs The PHP class diagram has been added as a new file in the docs directory. It includes an illustrative diagram to help understand PHP classes better. Links related to the PHP class diagram file have been removed from the README file. --- README.md | 4 ---- docs/php-class-diagram.md | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 docs/php-class-diagram.md diff --git a/README.md b/README.md index 90e4959b..cfebf780 100644 --- a/README.md +++ b/README.md @@ -286,7 +286,3 @@ SevericeLocator::setReader(new AttributeReader);` --- * Note: This documentation of the most part is taken from [Guice/AOP](https://github.com/google/guice/wiki/AOP). - -## Technical Documents - -- [PHP class diagram](https://ray-di.github.io/Ray.Aop/images/php-class-diagram.svg) diff --git a/docs/php-class-diagram.md b/docs/php-class-diagram.md new file mode 100644 index 00000000..4a78e2ea --- /dev/null +++ b/docs/php-class-diagram.md @@ -0,0 +1,4 @@ +# PHP Class Diagram + +php class diagram +