Skip to content

Commit

Permalink
[TASK][!!!] Drop PHP 7.4, 8.0 and 8.1 support, ensure PHP 8.3 support
Browse files Browse the repository at this point in the history
also, updated dependencies.

Relates: #17
  • Loading branch information
a-r-m-i-n committed Dec 28, 2023
1 parent c15a733 commit 8617b09
Show file tree
Hide file tree
Showing 11 changed files with 649 additions and 1,161 deletions.
4 changes: 2 additions & 2 deletions .build/php-cs-rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'@Symfony' => true,
'@PHP74Migration' => true,
'no_leading_import_slash' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_comma_in_singleline' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_unused_imports' => true,
'concat_space' => ['spacing' => 'one'],
Expand All @@ -31,7 +31,7 @@
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
'whitespace_after_comma_in_array' => true,
'function_typehint_space' => true,
'type_declaration_spaces' => true,
'single_line_comment_style' => true,
'no_alias_functions' => true,
'lowercase_cast' => true,
Expand Down
10 changes: 6 additions & 4 deletions .build/phpunit-functional.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<testsuites>
<testsuite name="Functional">
<directory>../tests/Functional</directory>
Expand All @@ -11,12 +11,14 @@
<html outputDirectory="reports/coverage-functional" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="reports/coverage-functional.txt" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
<include>
<directory suffix=".php">../src</directory>
</include>
</coverage>
<logging>
<junit outputFile="reports/phpunit-functional-results.xml"/>
<testdoxText outputFile="reports/phpunit-functional-results.txt"/>
</logging>
<source>
<include>
<directory suffix=".php">../src</directory>
</include>
</source>
</phpunit>
10 changes: 6 additions & 4 deletions .build/phpunit-unit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<testsuites>
<testsuite name="Unit">
<directory>../tests/Unit</directory>
Expand All @@ -11,12 +11,14 @@
<html outputDirectory="reports/coverage-unit" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="reports/coverage-unit.txt" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
<include>
<directory suffix=".php">../src</directory>
</include>
</coverage>
<logging>
<junit outputFile="reports/phpunit-unit-results.xml"/>
<testdoxText outputFile="reports/phpunit-unit-results.txt"/>
</logging>
<source>
<include>
<directory suffix=".php">../src</directory>
</include>
</source>
</phpunit>
5 changes: 1 addition & 4 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: editor-config
type: php
docroot: ""
php_version: "7.4"
php_version: "8.2"
webserver_type: apache-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.2"
mysql_version: ""
provider: default
use_dns_when_possible: true
composer_version: "2"
omit_containers: [db, dba, ddev-ssh-agent]
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name: Code Checks

on:
push:
branches: [ master ]
branches: [ master, 1.x, 2.0-dev ]
pull_request:
branches: [ master ]
branches: [ master, 1.x, 2.0-dev ]

jobs:
build:
name: Build and test application
strategy:
matrix:
php:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
dependencies:
- "lowest"
- "highest"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
php-version: "8.2"
ini-values: "phar.readonly=0"

- name: Validate composer.json and composer.lock
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ Written by **Armin Vieweg** <<https://v.ieweg.de>>

## Requirements

- PHP 7.4, 8.0, 8.1 or 8.2
- PHP 8.2 or 8.3
- Enabled PHP extensions: iconv, json

If you are looking for older PHP version support, you can check out and use those tags:

* [PHP 7.4, 8.0, 8.1 or 8.2](https://github.com/a-r-m-i-n/editorconfig-cli/tree/1.x) (Branch 1.x)


## Installation

Expand Down Expand Up @@ -86,7 +90,7 @@ $ vendor/bin/ec [options] [--] [<names>...]

PHAR style:
```
$ php ec-1.8.1.phar [options] [--] [<names>...]
$ php ec-2.0.0.phar [options] [--] [<names>...]
```

### Scanning
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "armin/editorconfig-cli",
"description": "EditorConfigCLI is a free CLI tool (written in PHP) to validate and auto-fix text files based on given .editorconfig declarations.",
"type": "library",
"version": "1.8.1",
"version": "dev-2.0.0",
"license": "MIT",
"authors": [
{
Expand All @@ -17,20 +17,20 @@
"source": "https://github.com/a-r-m-i-n/editorconfig-cli"
},
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.2",
"ext-json": "*",
"ext-iconv": "*",
"symfony/console": "^4 || ^5 || ^6",
"symfony/finder": "^4.4 || ^5 || ^6",
"symfony/console": "^4 || ^5 || ^6 || ^7",
"symfony/finder": "^4.4 || ^5 || ^6 || ^7",
"idiosyncratic/editorconfig": "^0.1.1",
"symfony/mime": "^4 || ^5 || ^6"
"symfony/mime": "^4 || ^5 || ^6 || ^7"
},
"require-dev": {
"seld/phar-utils": "^1.1",
"phpstan/phpstan": "1.4.0",
"jangregor/phpstan-prophecy": "1.0.0",
"friendsofphp/php-cs-fixer": "3.4.0",
"phpunit/phpunit": "^9.6.8 || ^10.1"
"seld/phar-utils": "^1.2",
"phpstan/phpstan": "^1.10",
"jangregor/phpstan-prophecy": "^1.0",
"friendsofphp/php-cs-fixer": "^3.42",
"phpunit/phpunit": "^10.5"
},
"bin": [
"bin/ec"
Expand Down
Loading

0 comments on commit 8617b09

Please sign in to comment.