Skip to content

Commit

Permalink
Remove 8.0 support
Browse files Browse the repository at this point in the history
Add 8.3 to CI
  • Loading branch information
fracsi committed Apr 12, 2024
1 parent 83900ab commit 7c127e2
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1']
php: ['8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1']
php: ['8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
tests:
name: Tests
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1']
php: ['8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v3
Expand Down
15 changes: 12 additions & 3 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
'@Symfony' => true,
'@Symfony:risky' => true,
'phpdoc_order' => true,
'global_namespace_import' => [
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
'native_function_invocation' => [
'include' => ['@internal'],
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
Expand All @@ -22,7 +33,5 @@
->setFinder(
(new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
->exclude('node_modules')
->exclude('vendor')
);
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"league/flysystem": "^3.0",
"doctrine/dbal": "^3.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.6",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "~9.5",
"phpunit/phpunit": "^10.0",
"league/flysystem-adapter-test-utilities": "^3.0",
"symfony/var-dumper": "^5.4|^6.1"
},
Expand Down
21 changes: 8 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
convertDeprecationsToExceptions="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="vendor/autoload.php"
>
<php>
<ini name="display_errors" value="1"/>
<ini name="error_reporting" value="-1"/>
<ini name="memory_limit" value="-1"/>
</php>

<testsuites>
<testsuite name="flysystem/doctrine-dbal/tests">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true" cacheDirectory=".coverage-cache">
<coverage cacheDirectory=".coverage-cache"/>
<source>
<include>
<directory suffix=".php">src</directory>
<directory>src</directory>
</include>
</coverage>
</source>
</phpunit>
17 changes: 11 additions & 6 deletions src/DoctrineDBALAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@
use Throwable;

use function dirname;
use function error_get_last;
use function explode;
use function fclose;
use function fwrite;
use function implode;
use function is_resource;
use function rewind;
use function sprintf;
use function stream_get_contents;
use function substr_count;
use function time;
use function tmpfile;

use const DIRECTORY_SEPARATOR;

Expand Down Expand Up @@ -116,9 +127,6 @@ public function write(string $path, string $contents, Config $config): void
$this->writeStream($path, $resource, $config);
}

/**
* {@inheritDoc}
*/
public function writeStream(string $path, $contents, Config $config): void
{
try {
Expand Down Expand Up @@ -210,9 +218,6 @@ public function read(string $path): string
}
}

/**
* {@inheritDoc}
*/
public function readStream(string $path): mixed
{
try {
Expand Down
1 change: 1 addition & 0 deletions tests/DoctrineDBALAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use WGG\Flysystem\Doctrine\DoctrineDBALAdapter;

use function dirname;
use function file_get_contents;

/**
* @covers \WGG\Flysystem\Doctrine\DoctrineDBALAdapter
Expand Down
3 changes: 0 additions & 3 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit 7c127e2

Please sign in to comment.