From 27c6845b4b1379d7899774f1fb92b76549d39fc0 Mon Sep 17 00:00:00 2001 From: Adrien Loison Date: Thu, 13 Jan 2022 21:43:59 +0100 Subject: [PATCH] Upgrade to PHP 8.1 --- .github/workflows/ci.yml | 20 +++++++++---------- .../XLSX/Helper/CellValueFormatterTest.php | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d46b92..8b17217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.operating-system }} - name: Tests - PHP 8.0 on ${{ matrix.operating-system }} + name: Tests - PHP 8.1 on ${{ matrix.operating-system }} env: extensions: zip, xmlreader, dom cache-key: cache-matrix-v1 # can be any string, change to clear the extension cache. @@ -20,7 +20,7 @@ jobs: id: extcache uses: shivammathur/cache-extensions@v1 with: - php-version: '8.0' + php-version: '8.1' extensions: ${{ env.extensions }} key: ${{ env.cache-key }} @@ -34,7 +34,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php with: - php-version: '8.0' + php-version: '8.1' extensions: ${{ env.extensions }} - name: Get composer cache directory @@ -59,7 +59,7 @@ jobs: tests-on-older-php: strategy: matrix: - php-versions: ['7.3', '7.4'] + php-versions: ['7.3', '7.4', '8.0'] runs-on: ubuntu-latest name: Tests - PHP ${{ matrix.php-versions }} env: @@ -123,7 +123,7 @@ jobs: id: extcache uses: shivammathur/cache-extensions@v1 with: - php-version: '7.4' + php-version: '8.1' extensions: ${{ env.extensions }} key: ${{ env.cache-key }} @@ -137,7 +137,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' extensions: ${{ env.extensions }} - name: Get composer cache directory @@ -182,7 +182,7 @@ jobs: id: extcache uses: shivammathur/cache-extensions@v1 with: - php-version: '8.0' + php-version: '8.1' extensions: ${{ env.extensions }} key: ${{ env.cache-key }} @@ -196,7 +196,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: '8.1' extensions: ${{ env.extensions }} - name: Get composer cache directory @@ -232,7 +232,7 @@ jobs: id: extcache uses: shivammathur/cache-extensions@v1 with: - php-version: '8.0' + php-version: '8.1' extensions: ${{ env.extensions }} key: ${{ env.cache-key }} @@ -246,7 +246,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: '8.1' extensions: ${{ env.extensions }} tools: phpstan diff --git a/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php b/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php index f981a63..db51f9b 100644 --- a/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php +++ b/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php @@ -79,7 +79,7 @@ class CellValueFormatterTest extends TestCase ->method('getAttribute') ->will($this->returnValueMap([ [CellValueFormatter::XML_ATTRIBUTE_TYPE, CellValueFormatter::CELL_TYPE_NUMERIC], - [CellValueFormatter::XML_ATTRIBUTE_STYLE_ID, 123], + [CellValueFormatter::XML_ATTRIBUTE_STYLE_ID, '123'], ])); $nodeMock @@ -88,7 +88,7 @@ class CellValueFormatterTest extends TestCase ->with(CellValueFormatter::XML_NODE_VALUE) ->will($this->returnValue($nodeListMock)); - /** @var StyleManager|\PHPUnit_Framework_MockObject_MockObject $styleManagerMock */ + /** @var StyleManager|\PHPUnit\Framework\MockObject\MockObject $styleManagerMock */ $styleManagerMock = $this->createMock(StyleManager::class); $styleManagerMock @@ -149,7 +149,7 @@ class CellValueFormatterTest extends TestCase */ public function testFormatNumericCellValueWithNumbers($value, $expectedFormattedValue, $expectedType) { - /** @var StyleManager|\PHPUnit_Framework_MockObject_MockObject $styleManagerMock */ + /** @var StyleManager|\PHPUnit\Framework\MockObject\MockObject $styleManagerMock */ $styleManagerMock = $this->createMock(StyleManager::class); $styleManagerMock ->expects($this->once())