From 11558c8cc7f2006a129f2c47b083e9ee34c13385 Mon Sep 17 00:00:00 2001 From: Sleon4 Date: Fri, 26 Dec 2025 10:04:52 -0500 Subject: [PATCH] chore: Support for PHP 8.5 has been added --- .github/workflows/php.yml | 64 ++++++++------------------------------- Dockerfile | 2 +- composer.json | 8 ++--- composer.lock | 6 ++-- docker-compose.yml | 5 +-- 5 files changed, 24 insertions(+), 61 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 92082e1..157f62e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -6,15 +6,18 @@ on: - php-actions pull_request: branches: - - 11.x + - 12.x paths: + - ".github/workflows/php.yml" - "src/**" - "tests/**" - - ".github/workflows/php.yml" - "composer.json" - "composer.lock" - "phpunit.xml" +env: + PHP_VERSION: 8.5 + jobs: install-dependencies: runs-on: ubuntu-latest @@ -26,7 +29,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: ${{ env.PHP_VERSION }} extensions: mbstring, gd, zip - name: Install PHP dependencies @@ -39,13 +42,6 @@ jobs: key: php-vendor-${{ runner.os }}-${{ github.run_id }} restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }} - - name: Cache composer.lock - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - composer-validation: runs-on: ubuntu-latest name: Composer Validation @@ -58,16 +54,9 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.4' + php-version: ${{ env.PHP_VERSION }} extensions: mbstring, gd, zip - - name: Restore composer.lock from cache - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - - name: Restore vendor directory from cache uses: actions/cache@v4 with: @@ -96,17 +85,10 @@ jobs: - name: Check out the repository uses: actions/checkout@v4 - - name: Restore composer.lock from cache - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - - name: Dependency Review uses: actions/dependency-review-action@v4 with: - base-ref: main + base-ref: ${{ github.event.repository.default_branch }} head-ref: ${{ github.sha }} comment-summary-in-pr: true # Possible values: "critical", "high", "moderate", "low" @@ -125,16 +107,9 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.4' + php-version: ${{ env.PHP_VERSION }} extensions: mbstring, gd, zip - - name: Restore composer.lock from cache - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - - name: Restore vendor directory from cache uses: actions/cache@v4 with: @@ -172,7 +147,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: ${{ env.PHP_VERSION }} extensions: mbstring, gd, zip, xdebug coverage: xdebug ini-values: | @@ -181,13 +156,6 @@ jobs: xdebug.log_level=0 tools: composer - - name: Restore composer.lock from cache - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - - name: Restore vendor directory from cache uses: actions/cache@v4 with: @@ -199,7 +167,7 @@ jobs: run: php -S 0.0.0.0:8000 -t public & - name: Run tests - run: php vendor/bin/phpunit --coverage-clover tests/build/logs/clover.xml --coverage-html tests/build/coverage + run: php vendor/bin/phpunit --coverage-clover tests/build/logs/clover.xml - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 @@ -208,6 +176,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN_LION_SECURITY }} tests-infection: + if: false runs-on: ubuntu-latest name: Infection needs: static-code-analysis @@ -219,16 +188,9 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: ${{ env.PHP_VERSION }} extensions: mbstring, gd, zip - - name: Restore composer.lock from cache - uses: actions/cache@v4 - with: - path: composer.lock - key: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }} - - name: Restore vendor directory from cache uses: actions/cache@v4 with: diff --git a/Dockerfile b/Dockerfile index 446c7d2..4468343 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.4-apache +FROM php:8.5-apache ARG DEBIAN_FRONTEND=noninteractive # ---------------------------------------------------------------------------------------------------------------------- diff --git a/composer.json b/composer.json index da9e19d..421e965 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "lion/security", - "description": "Library created with the function of implementing AES, RSA and JWT Security functions for PHP.", + "description": "Library created with the function of implementing AES, RSA and JWT security features for PHP.", "type": "library", "license": "MIT", "homepage": "https://dev.lion-packages.com", @@ -24,10 +24,10 @@ } }, "require": { - "php": ">=8.4", + "php": ">=8.5", + "ext-openssl": "*", "firebase/php-jwt": "^6.1", - "vlucas/valitron": "^1.4", - "ext-openssl": "*" + "vlucas/valitron": "^1.4" }, "require-dev": { "guzzlehttp/guzzle": "^7.8", diff --git a/composer.lock b/composer.lock index 85791c4..94fb230 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0666834cbe73469aff8ffa80fd879106", + "content-hash": "ad58a6b5b1adf530a7dbe352e6f58886", "packages": [ { "name": "firebase/php-jwt", @@ -5649,9 +5649,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.4", + "php": ">=8.5", "ext-openssl": "*" }, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/docker-compose.yml b/docker-compose.yml index 0e5ea46..6911b6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: - app: - container_name: security-app + php: + container_name: security-php build: context: . dockerfile: Dockerfile @@ -8,6 +8,7 @@ services: - "8000:8000" volumes: - ./:/var/www/html + networks: lion: driver: bridge