Skip to content

Commit

Permalink
php 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Nov 27, 2023
1 parent 98441e5 commit 0ee841a
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 55 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ on:
- cron: '0 0 * * *'

jobs:
php80:
name: PHP 8.0
runs-on: ubuntu-20.04
php81:
name: PHP 8.1
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: composer test
uses: docker://chubbyphp/ci-php80:latest
uses: docker://chubbyphp/ci-php81:latest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
php81:
name: PHP 8.1
runs-on: ubuntu-20.04
php82:
name: PHP 8.2
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: composer test
uses: docker://chubbyphp/ci-php81:latest
uses: docker://chubbyphp/ci-php82:latest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
php82:
name: PHP 8.2
runs-on: ubuntu-20.04
php83:
name: PHP 8.3
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: composer test
uses: docker://chubbyphp/ci-php82:latest
uses: docker://chubbyphp/ci-php83:latest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.idea/
.phpunit.cache
.vscode/
build/
composer.lock
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![CI](https://github.com/chubbyphp/chubbyphp-clean-directories/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyphp/chubbyphp-clean-directories/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/chubbyphp/chubbyphp-clean-directories/badge.svg?branch=master)](https://coveralls.io/github/chubbyphp/chubbyphp-clean-directories?branch=master)
[![Infection MSI](https://badge.stryker-mutator.io/github.com/chubbyphp/chubbyphp-clean-directories/master)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-clean-directories/master)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyphp%2Fchubbyphp-clean-directories%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-clean-directories/master)[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-clean-directories/v/stable.png)](https://packagist.org/packages/chubbyphp/chubbyphp-clean-directories)
[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-clean-directories/v/stable.png)](https://packagist.org/packages/chubbyphp/chubbyphp-clean-directories)
[![Total Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-clean-directories/downloads.png)](https://packagist.org/packages/chubbyphp/chubbyphp-clean-directories)
[![Monthly Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-clean-directories/d/monthly)](https://packagist.org/packages/chubbyphp/chubbyphp-clean-directories)
Expand All @@ -25,15 +25,15 @@ A command to clean directories based on directoryName => directoryPath mapping.

## Requirements

* php: ^8.0
* [symfony/console][2]: ^4.4.38|^5.4.5|^6.0
* php: ^8.1
* [symfony/console][2]: ^5.4.31|^6.3|^7.0

## Installation

Through [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-clean-directories][1].

```sh
composer require chubbyphp/chubbyphp-clean-directories "^1.2"
composer require chubbyphp/chubbyphp-clean-directories "^1.3"
```

## Usage
Expand Down
23 changes: 10 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
}
],
"require": {
"php": "^8.0",
"symfony/console": "^4.4.38|^5.4.5|^6.0"
"php": "^8.1",
"symfony/console": "^5.4.31|^6.3|^7.0"
},
"require-dev": {
"chubbyphp/chubbyphp-dev-helper": "dev-master",
"chubbyphp/chubbyphp-mock": "^1.6.1",
"infection/infection": "^0.26.5",
"php-coveralls/php-coveralls": "^2.5.2",
"phploc/phploc": "^7.0.2",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.4.8",
"phpunit/phpunit": "^9.5.17",
"psr/container": "^1.1.2|^2.0.2"
"chubbyphp/chubbyphp-mock": "^1.7.0",
"infection/infection": "^0.27.8",
"php-coveralls/php-coveralls": "^2.7.0",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.45",
"phpunit/phpunit": "^10.4.2",
"psr/container": "^2.0.2"
},
"autoload": {
"psr-4": { "Chubbyphp\\CleanDirectories\\": "src/" }
Expand All @@ -44,7 +43,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
"dev-master": "1.3-dev"
}
},
"scripts": {
Expand All @@ -55,14 +54,12 @@
"@test:integration",
"@test:infection",
"@test:static-analysis",
"@test:loc",
"@test:cs"
],
"test:cs": "mkdir -p build && PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --cache-file=build/phpcs.cache",
"test:infection": "vendor/bin/infection --threads=$(nproc) --min-msi=100 --verbose --coverage=build/phpunit",
"test:integration": "vendor/bin/phpunit --testsuite=Integration --cache-result-file=build/phpunit/result.cache",
"test:lint": "mkdir -p build && find src tests -name '*.php' -print0 | xargs -0 -n1 -P$(nproc) php -l | tee build/phplint.log",
"test:loc": "mkdir -p build && vendor/bin/phploc src | tee build/phploc.log",
"test:static-analysis": "mkdir -p build && bash -c 'vendor/bin/phpstan analyse src --no-progress --level=8 --error-format=junit | tee build/phpstan.junit.xml; if [ ${PIPESTATUS[0]} -ne \"0\" ]; then exit 1; fi'",
"test:unit": "vendor/bin/phpunit --testsuite=Unit --coverage-text --coverage-clover=build/phpunit/clover.xml --coverage-html=build/phpunit/coverage-html --coverage-xml=build/phpunit/coverage-xml --log-junit=build/phpunit/junit.xml --cache-result-file=build/phpunit/result.cache"
}
Expand Down
39 changes: 15 additions & 24 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
executionOrder="random"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory>./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Integration">
<directory>./tests/Integration</directory>
</testsuite>
<testsuite name="Unit">
<directory>./tests/Unit</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" executionOrder="random" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage/>
<testsuites>
<testsuite name="Integration">
<directory>./tests/Integration</directory>
</testsuite>
<testsuite name="Unit">
<directory>./tests/Unit</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>./src</directory>
</include>
</source>
</phpunit>
4 changes: 2 additions & 2 deletions tests/Unit/Command/CleanDirectoriesCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public function testWithSupportedDirectoryNames(): void

$output = new BufferedOutput();

mkdir($cacheDir.'/some/value/to/clean', 0777, true);
mkdir($cacheDir.'/some/value/to/clean', 0o777, true);
touch($cacheDir.'/some/value/to/clean/file');
mkdir($logDir.'/another/value/to/clean', 0777, true);
mkdir($logDir.'/another/value/to/clean', 0o777, true);
touch($logDir.'/another/value/to/clean/file');

$command = new CleanDirectoriesCommand(['cache' => $cacheDir, 'log' => $logDir]);
Expand Down

0 comments on commit 0ee841a

Please sign in to comment.