From c465b1c28390719831a889a9521951f0732a588f Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Sat, 17 Sep 2022 07:32:12 -0700 Subject: [PATCH] Minor Changes for Cygwin (#3070) No source code changes. Mitoteam added a change to better accomodate Cygwin; pick up their new release. While testing, discovered one test that was already skipped on Windows and needs to be skipped on Cygwin as well. --- composer.json | 2 +- composer.lock | 14 +++++++------- tests/PhpSpreadsheetTests/Shared/FileTest.php | 6 ++++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index a4b033cd..ea7f57b1 100644 --- a/composer.json +++ b/composer.json @@ -81,7 +81,7 @@ "dealerdirect/phpcodesniffer-composer-installer": "dev-master", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "10.2.3", + "mitoteam/jpgraph": "10.2.4", "mpdf/mpdf": "8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", diff --git a/composer.lock b/composer.lock index 508733ee..af246273 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": "b5bdb9f96d18ce59557436521053fdd9", + "content-hash": "6d946e91cbe5d38e1cfb0208512ab981", "packages": [ { "name": "ezyang/htmlpurifier", @@ -1342,16 +1342,16 @@ }, { "name": "mitoteam/jpgraph", - "version": "10.2.3", + "version": "10.2.4", "source": { "type": "git", "url": "https://github.com/mitoteam/jpgraph.git", - "reference": "21121535537e05c32e7964327b80746462a6057d" + "reference": "9ce4d106a89f120c7e220ea22205ef7956a7027b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mitoteam/jpgraph/zipball/21121535537e05c32e7964327b80746462a6057d", - "reference": "21121535537e05c32e7964327b80746462a6057d", + "url": "https://api.github.com/repos/mitoteam/jpgraph/zipball/9ce4d106a89f120c7e220ea22205ef7956a7027b", + "reference": "9ce4d106a89f120c7e220ea22205ef7956a7027b", "shasum": "" }, "require": { @@ -1382,9 +1382,9 @@ ], "support": { "issues": "https://github.com/mitoteam/jpgraph/issues", - "source": "https://github.com/mitoteam/jpgraph/tree/10.2.3" + "source": "https://github.com/mitoteam/jpgraph/tree/10.2.4" }, - "time": "2022-09-14T04:02:09+00:00" + "time": "2022-09-15T05:57:43+00:00" }, { "name": "mpdf/mpdf", diff --git a/tests/PhpSpreadsheetTests/Shared/FileTest.php b/tests/PhpSpreadsheetTests/Shared/FileTest.php index ddc54b5e..e65ec810 100644 --- a/tests/PhpSpreadsheetTests/Shared/FileTest.php +++ b/tests/PhpSpreadsheetTests/Shared/FileTest.php @@ -87,12 +87,14 @@ class FileTest extends TestCase public function testNotReadable(): void { - if (PHP_OS_FAMILY === 'Windows') { + if (PHP_OS_FAMILY === 'Windows' || stristr(PHP_OS, 'CYGWIN') !== false) { self::markTestSkipped('chmod does not work reliably on Windows'); } $this->tempfile = $temp = File::temporaryFileName(); file_put_contents($temp, ''); - chmod($temp, 0070); + if (chmod($temp, 0070) === false) { + self::markTestSkipped('chmod failed'); + } self::assertFalse(File::testFileNoThrow($temp)); $this->expectException(ReaderException::class); $this->expectExceptionMessage('for reading');