From 2c552d838c164f8e5d94461af4ea4e3174ecee4f Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Fri, 6 Sep 2024 11:46:34 +0200 Subject: [PATCH] Bump PSL --- .github/workflows/analyzers.yaml | 2 +- .github/workflows/autoloader.yaml | 2 +- .github/workflows/code-style.yaml | 2 +- .github/workflows/stress.yaml | 2 +- .github/workflows/tests.yaml | 2 +- build/bootstrap.php | 4 ++-- composer.json | 4 ++-- src/Xml/Writer/Opener/xml_file_opener.php | 2 +- tests/Xml/Writer/Opener/XmlFileOpenerTest.php | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/analyzers.yaml b/.github/workflows/analyzers.yaml index 85890d14..88df963b 100644 --- a/.github/workflows/analyzers.yaml +++ b/.github/workflows/analyzers.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.2', '8.3'] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} steps: diff --git a/.github/workflows/autoloader.yaml b/.github/workflows/autoloader.yaml index d24c9efd..c18c4785 100644 --- a/.github/workflows/autoloader.yaml +++ b/.github/workflows/autoloader.yaml @@ -7,7 +7,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.2', '8.3'] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} steps: diff --git a/.github/workflows/code-style.yaml b/.github/workflows/code-style.yaml index 619334f1..a10776dc 100644 --- a/.github/workflows/code-style.yaml +++ b/.github/workflows/code-style.yaml @@ -11,7 +11,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.2', '8.3'] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} steps: diff --git a/.github/workflows/stress.yaml b/.github/workflows/stress.yaml index 225e9210..1885ada2 100644 --- a/.github/workflows/stress.yaml +++ b/.github/workflows/stress.yaml @@ -7,7 +7,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.2', '8.3'] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} steps: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c0502fb1..28b339dc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['8.1', '8.2', '8.3'] + php-versions: ['8.2', '8.3'] experimental: [false] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} diff --git a/build/bootstrap.php b/build/bootstrap.php index 3529ce98..7b20021b 100644 --- a/build/bootstrap.php +++ b/build/bootstrap.php @@ -18,7 +18,7 @@ $tab = ' '; // Clear file first! - write($target, '', WriteMode::TRUNCATE); + write($target, '', WriteMode::Truncate); $files = Finder::create() ->in(dirname(__DIR__).'/src') @@ -67,7 +67,7 @@ static function (SplFileInfo $file) use ($tab): string { static fn (iterable $codeLines): string => join($codeLines, PHP_EOL) ); - write($target, $build($files), WriteMode::TRUNCATE); + write($target, $build($files), WriteMode::Truncate); echo 'Created bootstrap file!'.PHP_EOL; })(); diff --git a/composer.json b/composer.json index 6d92c449..9a538522 100644 --- a/composer.json +++ b/composer.json @@ -7,14 +7,14 @@ ], "type": "library", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.2.0 || ~8.3.0", "ext-dom": "*", "ext-libxml": "*", "ext-xml": "*", "ext-xsl": "*", "ext-xmlreader": "*", "ext-xmlwriter": "*", - "azjezz/psl": "^2.0.3 || ^3.0", + "azjezz/psl": "^3.0", "webmozart/assert": "^1.10" }, "require-dev": { diff --git a/src/Xml/Writer/Opener/xml_file_opener.php b/src/Xml/Writer/Opener/xml_file_opener.php index 7c34167e..066e264f 100644 --- a/src/Xml/Writer/Opener/xml_file_opener.php +++ b/src/Xml/Writer/Opener/xml_file_opener.php @@ -20,7 +20,7 @@ function xml_file_opener(string $file): Closure // Try to create the file first. // If the file exists, it will truncated. (Default behaviour of XMLWriter as well) // If it cannot be created, it will throw exceptions. - write($file, '', WriteMode::TRUNCATE); + write($file, '', WriteMode::Truncate); return $writer->openUri($file); }; diff --git a/tests/Xml/Writer/Opener/XmlFileOpenerTest.php b/tests/Xml/Writer/Opener/XmlFileOpenerTest.php index eadb4c57..5171c8c2 100644 --- a/tests/Xml/Writer/Opener/XmlFileOpenerTest.php +++ b/tests/Xml/Writer/Opener/XmlFileOpenerTest.php @@ -20,7 +20,7 @@ final class XmlFileOpenerTest extends TestCase public function test_it_can_open_a_file(): void { $this->createTmpFile(static function (string $path): void { - File\write($path, 'will be truncated', File\WriteMode::TRUNCATE); + File\write($path, 'will be truncated', File\WriteMode::Truncate); $writer = Writer::forFile($path); $writer->write(element('root'));