From ed595832c6c3c78706df521713d797489cc4e869 Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Mon, 6 Mar 2023 11:59:34 +0100 Subject: [PATCH 1/3] :arrow_up: Remove deprecation notice for PHP 8.2 --- src/Utils/Tempfile/TemporaryDirectory.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Utils/Tempfile/TemporaryDirectory.php b/src/Utils/Tempfile/TemporaryDirectory.php index c17086a..6954093 100644 --- a/src/Utils/Tempfile/TemporaryDirectory.php +++ b/src/Utils/Tempfile/TemporaryDirectory.php @@ -24,12 +24,16 @@ class TemporaryDirectory /** @var bool */ private $removed; + /** @var string[] */ + private $files; + /** * @param null|string $dir * @param string $prefix */ public function __construct(string $dir = null, string $prefix = 'phpgenerated') { + $this->files = []; $this->removed = false; $this->wasAlreadyExisting = false; if (null !== $dir && \is_dir($dir)) { From e2e2305e68dccf06ab7da588eafe9bc9c500c2ea Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Mon, 6 Mar 2023 12:01:30 +0100 Subject: [PATCH 2/3] :coffin: Removing dead code --- src/Utils/Tempfile/TemporaryDirectory.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Utils/Tempfile/TemporaryDirectory.php b/src/Utils/Tempfile/TemporaryDirectory.php index 6954093..1412dea 100644 --- a/src/Utils/Tempfile/TemporaryDirectory.php +++ b/src/Utils/Tempfile/TemporaryDirectory.php @@ -15,9 +15,6 @@ class TemporaryDirectory { - /** @var bool */ - private $wasAlreadyExisting; - /** @var string */ private $dir; @@ -35,13 +32,11 @@ public function __construct(string $dir = null, string $prefix = 'phpgenerated') { $this->files = []; $this->removed = false; - $this->wasAlreadyExisting = false; if (null !== $dir && \is_dir($dir)) { if (!is_writable($dir)) { throw new LogicException(\sprintf('The directory "%s" is not writeable.', $dir)); } - $this->wasAlreadyExisting = true; $this->dir = $dir; return; } From 19cf697fb13ba797b628766fedef9e78aa885dae Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Mon, 6 Mar 2023 12:02:15 +0100 Subject: [PATCH 3/3] :construction_worker: Add PHP 8.2 to the CI --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc89b59..666d4b4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,12 +9,12 @@ jobs: strategy: fail-fast: false matrix: - php: [ 7.4, 8.0 ] + php: [ 7.4, 8.0, 8.1 ] os: [ ubuntu-latest ] phpunit-versions: ['latest'] include: - os: [ ubuntu-latest ] - php: 8.1 + php: 8.2 composer-flag: "--ignore-platform-reqs" - os: [ ubuntu-latest ]