Skip to content

Commit

Permalink
update php8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed Feb 23, 2023
1 parent 57a670f commit ab8cf61
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 40 deletions.
54 changes: 54 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: 2.1

jobs:
unittest:
parameters:
php-version:
type: string
plugin-name:
type: string
default: "dotenv"
docker:
- image: hillliu/pmvc-phpunit:<< parameters.php-version >>
working_directory: /var/www/<< parameters.plugin-name >>
steps:
- checkout
- run:
name: "Display information"
command: |
date
php -v
php -m
composer --version
phpunit --version
- run:
name: Composer install packages
command: |
composer update
composer install --prefer-source
- run:
name: PHPUnit
command: |
ENABLE_COVERAGE=false
if [ "<< parameters.php-version >>" == "8.2" ]; then
if [ "$ENABLE_COVERAGE" == "true" ]; then
XDEBUG_MODE=coverage phpunit --coverage-clover clover.xml
coveralls --coverage_clover=clover.xml -v -o coveralls-upload.json
else
phpunit --display-deprecations
fi
else
phpunit
fi
- store_artifacts:
path: /var/www/<< parameters.plugin-name >>/clover.xml
- store_artifacts:
path: /var/www/<< parameters.plugin-name >>/coveralls-upload.json

workflows:
run-job:
jobs:
- unittest:
matrix:
parameters:
php-version: ["8.2", "8.1", "8.0", "5.6"]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ vendor
composer.lock
.php_cs.cache
.phpunit.result.cache
.phpunit.cache
.*.sw?
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Latest Stable Version](https://poser.pugx.org/pmvc-plugin/dotenv/v/stable)](https://packagist.org/packages/pmvc-plugin/dotenv)
[![Latest Unstable Version](https://poser.pugx.org/pmvc-plugin/dotenv/v/unstable)](https://packagist.org/packages/pmvc-plugin/dotenv)
[![Build Status](https://travis-ci.org/pmvc-plugin/dotenv.svg?branch=master)](https://travis-ci.org/pmvc-plugin/dotenv)
[![CircleCI](https://circleci.com/gh/pmvc-plugin/dotenv/tree/main.svg?style=svg)](https://circleci.com/gh/pmvc-plugin/dotenv/tree/main)
[![License](https://poser.pugx.org/pmvc-plugin/dotenv/license)](https://packagist.org/packages/pmvc-plugin/dotenv)
[![Total Downloads](https://poser.pugx.org/pmvc-plugin/dotenv/downloads)](https://packagist.org/packages/pmvc-plugin/dotenv)

Expand Down Expand Up @@ -33,7 +33,7 @@
```
{
"require": {
"pmvc-plugin/dotenv": "dev-master"
"pmvc-plugin/dotenv": "dev-main"
}
}
```
Expand Down
44 changes: 22 additions & 22 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
bootstrap="tests/include.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/include.php"
processIsolation="false"
stopOnFailure="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
<file>./tests/test.php</file>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="E_ALL"/>
<ini name="display_errors" value="true"/>
<ini name="display_startup_errors" value="true"/>
<env name="APP_ENV" value="testing"/>
</php>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="E_ALL" />
<ini name="display_errors" value="true" />
<ini name="display_startup_errors" value="true" />
<env name="APP_ENV" value="testing" />
</php>
</phpunit>
File renamed without changes.

0 comments on commit ab8cf61

Please sign in to comment.