diff --git a/.circleci/config.yml b/.circleci/config.yml index 4462f6f..73cdca2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,4 @@ + # PHP CircleCI 2.0 configuration file # # Check https://circleci.com/docs/2.0/language-php/ for more details @@ -16,6 +17,8 @@ jobs: - run: sudo apt update - run: sudo apt install zlib1g-dev - run: sudo docker-php-ext-install zip + - run: php --version + - run: node --version - restore_cache: keys: @@ -51,10 +54,20 @@ jobs: test-php8.0: <<: *multi-test docker: - - image: circleci/php:8.0-node + - image: circleci/php:8.0-browsers + test-php8.1: + <<: *multi-test + docker: + - image: cimg/php:8.1-browsers + test-php8.2: + <<: *multi-test + docker: + - image: cimg/php:8.2-browsers workflows: version: 2 multi-test: jobs: - test-php7.4 - - test-php8.0 \ No newline at end of file + - test-php8.0 + - test-php8.1 + - test-php8.2 \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1bf9b9e..6a6f1d3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: '8.1' coverage: none tools: cs2pr @@ -38,11 +38,8 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - php: ['7.4', '8.0'] + php: ['7.4', '8.0', '8.1', '8.2'] experimental: [false] - include: - - php: '8.1' - experimental: true name: "Lint: PHP ${{ matrix.php }}" continue-on-error: ${{ matrix.experimental }} @@ -76,7 +73,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - php: ['7.4', '8.0'] + php: ['7.4', '8.0', '8.1', '8.2'] coverage: [false] experimental: [false] include: @@ -87,11 +84,12 @@ jobs: - php: '8.0' coverage: true experimental: false - - # Experimental builds. These are allowed to fail. - php: '8.1' - coverage: false - experimental: true + coverage: true + experimental: false + - php: '8.2' + coverage: true + experimental: false name: "Test: PHP ${{ matrix.php }}" diff --git a/HISTORY.md b/HISTORY.md index 10f89ea..f73bd0b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +3.5.1 / 2023-01-31 +================== + + * Include support for 8.1 * 8.2 (#210) + 3.5.0 / 2022-08-17 ================== diff --git a/lib/Client.php b/lib/Client.php index 51ea526..bfae6ea 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -10,8 +10,6 @@ use Segment\Consumer\LibCurl; use Segment\Consumer\Socket; -require __DIR__ . '/Version.php'; - class Client { protected Consumer $consumer; @@ -110,6 +108,8 @@ private function message(array $msg, string $def = ''): array */ private function getDefaultContext(): array { + require __DIR__ . '/Version.php'; + global $SEGMENT_VERSION; return [ diff --git a/lib/Version.php b/lib/Version.php index e4b50ae..330b560 100644 --- a/lib/Version.php +++ b/lib/Version.php @@ -4,4 +4,4 @@ global $SEGMENT_VERSION; -$SEGMENT_VERSION = '3.5.0'; +$SEGMENT_VERSION = '3.5.1';