From f196c1e6e90a2ef54acca8bab3d9349c1e8a1d00 Mon Sep 17 00:00:00 2001 From: bota Date: Thu, 11 Apr 2024 12:37:50 +0300 Subject: [PATCH 1/6] Documentation for Dot-Helpers --- .github/workflows/continuous-integration.yml | 11 +++++ .github/workflows/cs-tests.yml | 47 -------------------- .github/workflows/docs-build.yml | 16 +++++++ .github/workflows/static-analysis.yml | 47 -------------------- .github/workflows/unit-tests.yml | 47 -------------------- README.md | 14 ++++++ SECURITY.md | 38 ++++++++++++++++ docs/book/index.md | 1 + docs/book/v3/configuration.md | 15 +++++++ docs/book/v3/installation.md | 5 +++ docs/book/v3/overview.md | 3 ++ mkdocs.yml | 18 ++++++++ 12 files changed, 121 insertions(+), 141 deletions(-) create mode 100644 .github/workflows/continuous-integration.yml delete mode 100644 .github/workflows/cs-tests.yml create mode 100644 .github/workflows/docs-build.yml delete mode 100644 .github/workflows/static-analysis.yml delete mode 100644 .github/workflows/unit-tests.yml create mode 100644 SECURITY.md create mode 100644 docs/book/index.md create mode 100644 docs/book/v3/configuration.md create mode 100644 docs/book/v3/installation.md create mode 100644 docs/book/v3/overview.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..26c5802 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,11 @@ +name: "Continuous Integration" + +on: + pull_request: + push: + branches: + tags: + +jobs: + ci: + uses: laminas/workflow-continuous-integration/.github/workflows/continuous-integration.yml@1.x diff --git a/.github/workflows/cs-tests.yml b/.github/workflows/cs-tests.yml deleted file mode 100644 index e8bbade..0000000 --- a/.github/workflows/cs-tests.yml +++ /dev/null @@ -1,47 +0,0 @@ -on: - - push - -name: Run phpcs checks - -jobs: - mutation: - name: PHP ${{ matrix.php }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - "8.1" - - "8.2" - - "8.3" - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - tools: composer:v2, cs2pr - coverage: none - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - - name: Run phpcs checks - run: vendor/bin/phpcs diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml new file mode 100644 index 0000000..1a7aa24 --- /dev/null +++ b/.github/workflows/docs-build.yml @@ -0,0 +1,16 @@ +name: docs-build + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + - name: Build Docs + uses: dotkernel/documentation-theme/github-actions/docs@main + env: + DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index 6f7452d..0000000 --- a/.github/workflows/static-analysis.yml +++ /dev/null @@ -1,47 +0,0 @@ -on: - - push - -name: Run static analysis - -jobs: - mutation: - name: PHP ${{ matrix.php }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - "8.1" - - "8.2" - - "8.3" - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - tools: composer:v2, cs2pr - coverage: none - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - - name: Run static analysis - run: vendor/bin/psalm --no-cache --output-format=github --show-info=false --threads=4 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index 8f6f990..0000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,47 +0,0 @@ -on: - - push - -name: Run PHPUnit tests - -jobs: - mutation: - name: PHP ${{ matrix.php }}-${{ matrix.os }} - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - "8.1" - - "8.2" - - "8.3" - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - tools: composer:v2, cs2pr - coverage: none - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v3 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - - name: Run PHPUnit tests - run: vendor/bin/phpunit --colors=always diff --git a/README.md b/README.md index b567a16..3f7a0ff 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,17 @@ [![SymfonyInsight](https://insight.symfony.com/projects/e79c1b2a-c61f-4ce6-9b6f-9c6528e049c6/big.svg)](https://insight.symfony.com/projects/e79c1b2a-c61f-4ce6-9b6f-9c6528e049c6) DotKernel helper component based on [mezzio/mezzio-helpers](https://packagist.org/packages/mezzio/mezzio-helpers) providing various helper structures and classes. + +## Requirements + +- PHP >= 8.1 + +## Install + +Install dot-helpers in your application by running the following command: + + composer require dotkernel/dot-helpers + +Next, register the package's `ConfigProvider` to your application config. + +Note : Make sure to register the package under the `// DK packages` section. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..3410772 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,38 @@ +# Security Policy + +## Supported Versions + + +| Version | Supported | PHP Version | +|---------|--------------------|-------------------------------------------------------------------------------------------------------------| +| 3.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-helpers/3.4.3) | +| <= 2.x | :x: | | + +## Reporting Potential Security Issues + +If you have encountered a potential security vulnerability in this project, +please report it to us at . We will work with you to +verify the vulnerability and patch it. + +When reporting issues, please provide the following information: + +- Component(s) affected +- A description indicating how to reproduce the issue +- A summary of the security vulnerability and impact + +We request that you contact us via the email address above and give the +project contributors a chance to resolve the vulnerability and issue a new +release prior to any public exposure; this helps protect the project's +users, and provides them with a chance to upgrade and/or update in order to +protect their applications. + + +## Policy + +If we verify a reported security vulnerability, our policy is: + +- We will patch the current release branch, as well as the immediate prior minor + release branch. + +- After patching the release branches, we will immediately issue new security + fix releases for each patched release branch. diff --git a/docs/book/index.md b/docs/book/index.md new file mode 100644 index 0000000..ae42a26 --- /dev/null +++ b/docs/book/index.md @@ -0,0 +1 @@ +../../README.md diff --git a/docs/book/v3/configuration.md b/docs/book/v3/configuration.md new file mode 100644 index 0000000..e77773b --- /dev/null +++ b/docs/book/v3/configuration.md @@ -0,0 +1,15 @@ +# Configuration + +## Requirements + +- PHP >= 8.1 + +## Register ConfigProvider + +Next, register the package's `ConfigProvider` to your application config. + +```php +Dot\Helpers\ConfigProvider::class, +``` + +Note : Make sure to register the package under the `// DK packages` section. \ No newline at end of file diff --git a/docs/book/v3/installation.md b/docs/book/v3/installation.md new file mode 100644 index 0000000..d230901 --- /dev/null +++ b/docs/book/v3/installation.md @@ -0,0 +1,5 @@ +# Installation + +Install dotkernel/dot-helpers by executing the following Composer command in your project directory: + + composer require dotkernel/dot-helpers \ No newline at end of file diff --git a/docs/book/v3/overview.md b/docs/book/v3/overview.md new file mode 100644 index 0000000..4e82aa8 --- /dev/null +++ b/docs/book/v3/overview.md @@ -0,0 +1,3 @@ + + +`dot-helpers` is DonKernel's component based on [mezzio/mezzio-helpers](https://packagist.org/packages/mezzio/mezzio-helpers) providing various helper structures and classes which can be used to handle urls. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..86eadf7 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,18 @@ +docs_dir: docs/book +site_dir: docs/html +extra: + project: Packages + current_version: v3 + versions: + - v3 +nav: + - Home: index.md + - v3: + - Overview: v3/configuration.md + - Configuration: v3/installation.md + - Installation: v3/overview.md +site_name: dot-helpers +site_description: "DotKernel's component used to handle urls" +repo_url: "https://github.com/dotkernel/dot-helpers" +plugins: + - search From 91af5cc8bb442b7942452b3e7e31ad1ced3803a2 Mon Sep 17 00:00:00 2001 From: bota Date: Thu, 11 Apr 2024 12:53:39 +0300 Subject: [PATCH 2/6] newline fixes --- README.md | 2 +- docs/book/v3/configuration.md | 2 +- docs/book/v3/installation.md | 2 +- docs/book/v3/overview.md | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3f7a0ff..ce7edd5 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,4 @@ Install dot-helpers in your application by running the following command: Next, register the package's `ConfigProvider` to your application config. -Note : Make sure to register the package under the `// DK packages` section. \ No newline at end of file +Note : Make sure to register the package under the `// DK packages` section. diff --git a/docs/book/v3/configuration.md b/docs/book/v3/configuration.md index e77773b..cc7f1ec 100644 --- a/docs/book/v3/configuration.md +++ b/docs/book/v3/configuration.md @@ -12,4 +12,4 @@ Next, register the package's `ConfigProvider` to your application config. Dot\Helpers\ConfigProvider::class, ``` -Note : Make sure to register the package under the `// DK packages` section. \ No newline at end of file +Note : Make sure to register the package under the `// DK packages` section. diff --git a/docs/book/v3/installation.md b/docs/book/v3/installation.md index d230901..2c3e9d1 100644 --- a/docs/book/v3/installation.md +++ b/docs/book/v3/installation.md @@ -2,4 +2,4 @@ Install dotkernel/dot-helpers by executing the following Composer command in your project directory: - composer require dotkernel/dot-helpers \ No newline at end of file + composer require dotkernel/dot-helpers diff --git a/docs/book/v3/overview.md b/docs/book/v3/overview.md index 4e82aa8..2dc45ce 100644 --- a/docs/book/v3/overview.md +++ b/docs/book/v3/overview.md @@ -1,3 +1 @@ - - -`dot-helpers` is DonKernel's component based on [mezzio/mezzio-helpers](https://packagist.org/packages/mezzio/mezzio-helpers) providing various helper structures and classes which can be used to handle urls. \ No newline at end of file +`dot-helpers` is DonKernel's component based on [mezzio/mezzio-helpers](https://packagist.org/packages/mezzio/mezzio-helpers) providing various helper structures and classes which can be used to handle urls. From 67c0c4e09086bfc5809d217fd4756d99e132f480 Mon Sep 17 00:00:00 2001 From: bota Date: Thu, 11 Apr 2024 12:56:02 +0300 Subject: [PATCH 3/6] fixed mkdocs --- mkdocs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 86eadf7..a9b0028 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,9 +8,9 @@ extra: nav: - Home: index.md - v3: - - Overview: v3/configuration.md - - Configuration: v3/installation.md - - Installation: v3/overview.md + - Configuration: v3/configuration.md + - Installation: v3/installation.md + - Overview: v3/overview.md site_name: dot-helpers site_description: "DotKernel's component used to handle urls" repo_url: "https://github.com/dotkernel/dot-helpers" From b2e8f591ce42a116f2864bb6645b9058c2184e85 Mon Sep 17 00:00:00 2001 From: bota Date: Thu, 11 Apr 2024 13:17:50 +0300 Subject: [PATCH 4/6] documentation linting --- docs/book/v3/overview.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/book/v3/overview.md b/docs/book/v3/overview.md index 2dc45ce..f5d9eb4 100644 --- a/docs/book/v3/overview.md +++ b/docs/book/v3/overview.md @@ -1 +1,3 @@ +# Overview + `dot-helpers` is DonKernel's component based on [mezzio/mezzio-helpers](https://packagist.org/packages/mezzio/mezzio-helpers) providing various helper structures and classes which can be used to handle urls. From 38230cf4db25917143d4d06c665b296dc1013feb Mon Sep 17 00:00:00 2001 From: bota Date: Thu, 11 Apr 2024 13:29:25 +0300 Subject: [PATCH 5/6] updated read me --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce7edd5..c0d5441 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-helpers)](https://github.com/dotkernel/dot-helpers/stargazers) [![GitHub license](https://img.shields.io/github/license/dotkernel/dot-helpers)](https://github.com/dotkernel/dot-helpers/blob/3.0/LICENSE.md) -[![Build Static](https://github.com/dotkernel/dot-helpers/actions/workflows/static-analysis.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-helpers/actions/workflows/static-analysis.yml) +[![Build Static](https://github.com/dotkernel/dot-helpers/actions/workflows/continuous-integration.yml/badge.svg?branch=3.0)](https://github.com/dotkernel/dot-helpers/actions/workflows/continuous-integration.yml) [![codecov](https://codecov.io/gh/dotkernel/dot-helpers/graph/badge.svg?token=LIN5FVL5QP)](https://codecov.io/gh/dotkernel/dot-helpers) [![SymfonyInsight](https://insight.symfony.com/projects/e79c1b2a-c61f-4ce6-9b6f-9c6528e049c6/big.svg)](https://insight.symfony.com/projects/e79c1b2a-c61f-4ce6-9b6f-9c6528e049c6) From ac2a0dbfbb75e355791e8597c5a98153e7b2ae43 Mon Sep 17 00:00:00 2001 From: bota Date: Thu, 11 Apr 2024 15:06:01 +0300 Subject: [PATCH 6/6] updated mkdocs --- mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index a9b0028..7af37ea 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,9 +8,9 @@ extra: nav: - Home: index.md - v3: - - Configuration: v3/configuration.md - - Installation: v3/installation.md - Overview: v3/overview.md + - Installation: v3/installation.md + - Configuration: v3/configuration.md site_name: dot-helpers site_description: "DotKernel's component used to handle urls" repo_url: "https://github.com/dotkernel/dot-helpers"