From a1c3d6184c042f0dfa6b58ffd4479aa6a68d9ff7 Mon Sep 17 00:00:00 2001 From: Constantine Nathanson <35217733+const-cloudinary@users.noreply.github.com> Date: Sat, 28 Jan 2023 13:40:11 -0500 Subject: [PATCH] Fix PHP 8.2 deprecation warnings --- .github/workflows/test.yaml | 29 +++++++++++++++++++ .travis.yml | 25 ---------------- .../Operand/Variable/Predefined/PVar.php | 2 +- 3 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/test.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..712118f --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,29 @@ +name: Tests +on: [push, pull_request] +jobs: + php: + name: PHP ${{ matrix.php-versions }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-versions: + - '5.6' + - '7.4' + - '8.0' + - '8.1' + - '8.2' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: json + coverage: xdebug + - name: Install Composer dependencies + run: composer update -n + - name: Run Tests + run: | + vendor/bin/simple-phpunit diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b5c0e6f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: php -php: - - '8.1' - - '8.0' - - '7.4' - - '7.3' - - '7.2' - - '7.1' - - '7.0' - - '5.6' - -before_install: - - export COMPOSER_MEMORY_LIMIT=-1 -install: composer install - -script: vendor/bin/simple-phpunit - -branches: - except: - - staging-test - -notifications: - email: - recipients: - - sdk_developers@cloudinary.com diff --git a/src/Transformation/Expression/Operand/Variable/Predefined/PVar.php b/src/Transformation/Expression/Operand/Variable/Predefined/PVar.php index 7c0c9b3..715f771 100644 --- a/src/Transformation/Expression/Operand/Variable/Predefined/PVar.php +++ b/src/Transformation/Expression/Operand/Variable/Predefined/PVar.php @@ -96,7 +96,7 @@ class PVar extends Expression public function __construct($name) { if (empty($name) || ! self::isPredefinedVariable($name)) { - throw new InvalidArgumentException("Invalid predefined variable name: '${name}'"); + throw new InvalidArgumentException("Invalid predefined variable name: '{$name}'"); } parent::__construct($name);