From 32e00e846f2d2d2facfa0f613f7af33a4357c495 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Mon, 4 Aug 2025 12:32:00 +0300 Subject: [PATCH 1/5] ci: Remove PHP 8.0 --- .github/workflows/php80.yml | 40 ------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/php80.yml diff --git a/.github/workflows/php80.yml b/.github/workflows/php80.yml deleted file mode 100644 index c7d2fcb2..00000000 --- a/.github/workflows/php80.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build PHP 8.0 - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ ubuntu-latest ] - php: [ 8.0 ] - - name: PHP${{matrix.php}} - ${{matrix.os}} - - steps: - - name: Clone Repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mysqli, mbstring, sqlsrv - tools: phpunit:8.5.13 - - - name: Install Dependencies - run: composer install --prefer-source --no-interaction --no-dev - - - name: Execute Tests - run: phpunit --configuration tests/phpunit.xml - - - name: CodeCov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} From f50ad8cb6013df524ffce058fb6c0cece2e7c58b Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Mon, 4 Aug 2025 12:32:43 +0300 Subject: [PATCH 2/5] ci: Updated Workflows --- .github/workflows/php81.yaml | 26 +++++++++++++++++++++ .github/workflows/php82.yaml | 27 ++++++++++++++++++++++ .github/workflows/php83.yaml | 45 ++++++++++++++++++++++++++++++++++++ .github/workflows/php84.yaml | 27 ++++++++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 .github/workflows/php81.yaml create mode 100644 .github/workflows/php82.yaml create mode 100644 .github/workflows/php83.yaml create mode 100644 .github/workflows/php84.yaml diff --git a/.github/workflows/php81.yaml b/.github/workflows/php81.yaml new file mode 100644 index 00000000..fead1142 --- /dev/null +++ b/.github/workflows/php81.yaml @@ -0,0 +1,26 @@ +name: Build PHP 8.1 + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + test: + name: Run Tests + uses: WebFiori/workflows/.github/workflows/test-php.yaml@main + with: + php-version: '8.1' + + code-coverage: + name: Coverage + needs: test + uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main + with: + php-version: '8.1' + coverage-file: 'php-8.1-coverage.xml' + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + + diff --git a/.github/workflows/php82.yaml b/.github/workflows/php82.yaml new file mode 100644 index 00000000..978033a6 --- /dev/null +++ b/.github/workflows/php82.yaml @@ -0,0 +1,27 @@ +name: Build PHP 8.2 + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + test: + name: Run Tests + uses: WebFiori/workflows/.github/workflows/test-php.yaml@main + with: + php-version: '8.2' + phpunit-config: "tests/phpunit10.xml" + + code-coverage: + name: Coverage + needs: test + uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main + with: + php-version: '8.2' + coverage-file: 'php-8.2-coverage.xml' + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + + diff --git a/.github/workflows/php83.yaml b/.github/workflows/php83.yaml new file mode 100644 index 00000000..8ecb8080 --- /dev/null +++ b/.github/workflows/php83.yaml @@ -0,0 +1,45 @@ +name: Build PHP 8.3 + +on: + push: + branches: [ main, dev ] + pull_request: + branches: [ main, dev ] +env: + OPERATING_SYS: ubuntu-latest + PHP_VERSION: 8.3 +jobs: + + test: + name: Run Tests + uses: WebFiori/workflows/.github/workflows/test-php.yaml@main + with: + php-version: '8.3' + phpunit-config: 'tests/phpunit10.xml' + + + code-coverage: + name: Coverage + needs: test + uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main + with: + php-version: '8.3' + coverage-file: 'php-8.3-coverage.xml' + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + code-quality: + name: Code Quality + needs: test + uses: WebFiori/workflows/.github/workflows/quality-sonarcloud.yaml@main + with: + coverage-file: 'php-8.3-coverage.xml' + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + release-prod: + name: Prepare Production Release Branch / Publish Release + needs: [code-coverage, code-quality] + uses: WebFiori/workflows/.github/workflows/release-php.yaml@main + with: + branch: 'main' diff --git a/.github/workflows/php84.yaml b/.github/workflows/php84.yaml new file mode 100644 index 00000000..1ce30979 --- /dev/null +++ b/.github/workflows/php84.yaml @@ -0,0 +1,27 @@ +name: Build PHP 8.4 + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + test: + name: Run Tests + uses: WebFiori/workflows/.github/workflows/test-php.yaml@main + with: + php-version: '8.4' + phpunit-config: "tests/phpunit10.xml" + + code-coverage: + name: Coverage + needs: test + uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main + with: + php-version: '8.4' + coverage-file: 'php-8.4-coverage.xml' + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + + From 0b74243f1762111984ab8a7af81fc6d7fdffd4d4 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Mon, 4 Aug 2025 12:33:12 +0300 Subject: [PATCH 3/5] test: Added PHP Unit 10 Config --- tests/phpunit10.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/phpunit10.xml diff --git a/tests/phpunit10.xml b/tests/phpunit10.xml new file mode 100644 index 00000000..4214706f --- /dev/null +++ b/tests/phpunit10.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + ./webfiori/tests/http + + + + + ../webfiori/http/AbstractWebService.php + ../webfiori/http/APIFilter.php + ../webfiori/http/RequestParameter.php + ../webfiori/http/WebServicesManager.php + ../webfiori/http/Request.php + ../webfiori/http/Response.php + ../webfiori/http/Uri.php + ../webfiori/http/HttpHeader.php + ../webfiori/http/HttpCookie.php + ../webfiori/http/HeadersPool.php + ../webfiori/http/UriParameter.php + ../webfiori/http/ObjectMapper.php + ../webfiori/http/AuthHeader.php + + + From 0e1f432b4ef4799c440ba04c81c03b9f45e6ef8a Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Mon, 4 Aug 2025 12:34:10 +0300 Subject: [PATCH 4/5] ci: Remove Old Workflows --- .github/workflows/php81.yml | 48 ------------------------------- .github/workflows/php82.yml | 42 ---------------------------- .github/workflows/php83.yml | 56 ------------------------------------- .github/workflows/php84.yml | 41 --------------------------- 4 files changed, 187 deletions(-) delete mode 100644 .github/workflows/php81.yml delete mode 100644 .github/workflows/php82.yml delete mode 100644 .github/workflows/php83.yml delete mode 100644 .github/workflows/php84.yml diff --git a/.github/workflows/php81.yml b/.github/workflows/php81.yml deleted file mode 100644 index 4adfba38..00000000 --- a/.github/workflows/php81.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build PHP 8.1 - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - test: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: true - matrix: - os: [ ubuntu-latest ] - php: [8.1] - - name: PHP${{matrix.php}} - ${{matrix.os}} - - steps: - - name: Clone Repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mysqli, mbstring, sqlsrv - tools: phpunit:9.5.20, composer - - - - name: Install Dependencies - run: composer install --prefer-source --no-interaction --no-dev - - - name: Execute Tests - run: phpunit --configuration tests/phpunit.xml - - - name: CodeCov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - - name: SonarCloud - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/php82.yml b/.github/workflows/php82.yml deleted file mode 100644 index ffa5928f..00000000 --- a/.github/workflows/php82.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Build PHP 8.2 - -on: - push: - branches: [ master, dev ] - pull_request: - branches: [ master ] - -jobs: - test: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: true - matrix: - os: [ ubuntu-latest ] - php: [8.2] - - name: PHP${{matrix.php}} - ${{matrix.os}} - - steps: - - name: Clone Repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mysqli, mbstring, sqlsrv - tools: phpunit:9.5.20, composer - - - - name: Install Dependencies - run: composer install --prefer-source --no-interaction --no-dev - - - name: Execute Tests - run: phpunit --configuration tests/phpunit.xml - - - name: CodeCov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/php83.yml b/.github/workflows/php83.yml deleted file mode 100644 index e8c2ecd5..00000000 --- a/.github/workflows/php83.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Build PHP 8.3 - -on: - push: - branches: [ master, dev ] - pull_request: - branches: [ master ] - -jobs: - test: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: true - matrix: - os: [ ubuntu-latest ] - php: [8.3] - - name: PHP${{matrix.php}} - ${{matrix.os}} - - steps: - - name: Clone Repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mysqli, mbstring, sqlsrv - tools: phpunit:9.5.20, composer - - - name: Install Dependencies - run: composer install --prefer-source --no-interaction --no-dev - - - name: Execute Tests - run: phpunit --configuration tests/phpunit.xml - - - name: CodeCov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - - release_prod: - name: Prepare Release Branch / Publish Release - needs: - - "test" - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' - steps: - - uses: actions/checkout@v4 - - uses: google-github-actions/release-please-action@v4 - with: - release-type: php - config-file: release-please-config.json - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/php84.yml b/.github/workflows/php84.yml deleted file mode 100644 index a6cbc9f3..00000000 --- a/.github/workflows/php84.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build PHP 8.4 - -on: - push: - branches: [ master, dev ] - pull_request: - branches: [ master, dev ] - -jobs: - test: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: true - matrix: - os: [ ubuntu-latest ] - php: [8.4] - - name: PHP${{matrix.php}} - ${{matrix.os}} - - steps: - - name: Clone Repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mysqli, mbstring, sqlsrv - tools: phpunit:9.5.20, composer - - - name: Install Dependencies - run: composer install --prefer-source --no-interaction --no-dev - - - name: Execute Tests - run: phpunit --configuration tests/phpunit.xml - - - name: CodeCov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From d53d4e5f1b70470a5b20129c449520bab66b2b7a Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Mon, 4 Aug 2025 12:35:49 +0300 Subject: [PATCH 5/5] doc: Updated Readme --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 819f42d8..9fdd534f 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ It includes inputs feltering and data validation in addion to creating user-defi

- + - + @@ -23,11 +23,10 @@ It includes inputs feltering and data validation in addion to creating user-defi ## Supported PHP Versions | Build Status | |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| | -| | -| | -| | -| | +| | +| | +| | +| | ## API Docs This library is a part of WebFiori Framework. To access API docs of the library, you can visid the following link: https://webfiori.com/docs/webfiori/http . @@ -67,4 +66,4 @@ Note that the WebFiori Json libra Another option is to download the latest release manually from Release. ## Usage -For more information on how to use the library, [check here](https://github.com/WebFiori/wf-docs/blob/master/web-services.md) +For more information on how to use the library, [check here](https://github.com/WebFiori/wf-docs/blob/main/web-services.md)