Skip to content

Commit 1b9eadd

Browse files
Merge branch 'main' into 6.0
2 parents c3d288a + 47a8210 commit 1b9eadd

File tree

22 files changed

+215
-114
lines changed

22 files changed

+215
-114
lines changed

.github/workflows/integration.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Integration"
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
php: ['7.3', '7.4', '8.0']
16+
include:
17+
- php: "8.0"
18+
composeroptions: "--ignore-platform-req=php"
19+
steps:
20+
- uses: actions/checkout@master
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php }}
26+
tools: composer:v2, phive
27+
extensions: mbstring
28+
29+
- name: PHP Version
30+
run: php -v
31+
32+
- name: Update composer
33+
run: composer self-update
34+
35+
- name: Validate composer.json and composer.lock
36+
run: composer validate
37+
38+
- name: Install dependencies
39+
run: composer install --prefer-dist --no-progress --no-suggest ${{ matrix.composeroptions }}
40+
41+
- name: Install tooling
42+
run: GITHUB_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} phive --no-progress --home ./.phive install --force-accept-unsigned --trust-gpg-keys 4AA394086372C20A,31C7E470E2138192,8E730BA25823D8B5,CF1A108D0E7AE720,2A8299CE842DD38C
43+
44+
- name: Execute unit tests
45+
run: tools/phpunit --configuration=phpunit.xml
46+
47+
- name: Check coding style
48+
run: tools/phpcs --standard=psr2 src
49+
50+
- name: Static code analysis
51+
run: tools/phpstan analyse

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.project
88
.phpunit.result.cache
99
.settings
10+
.phive
1011
composer.lock
1112
/backup/*
1213
/build/coverage

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Get an in depth look into all the features and a short 'getting started' tutoria
1111
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.2-8892BF.svg)](https://php.net/)
1212
[![Downloads](https://img.shields.io/packagist/dt/phpbu/phpbu.svg?v1)](https://packagist.org/packages/phpbu/phpbu)
1313
[![License](https://poser.pugx.org/phpbu/phpbu/license.svg)](https://packagist.org/packages/phpbu/phpbu)
14-
[![Build Status](https://travis-ci.org/sebastianfeldmann/phpbu.svg?branch=master)](https://travis-ci.org/sebastianfeldmann/phpbu)
14+
[![Build Status](https://github.com/sebastianfeldmann/phpbu/workflows/Integration/badge.svg)](https://github.com/sebastianfeldmann/phpbu/actions)
1515
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/?branch=master)
1616
[![Code Coverage](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/?branch=master)
1717
[![PHP Website](https://img.shields.io/website-up-down-green-red/https/phpbu.de.svg)](https://phpbu.de)
@@ -126,7 +126,7 @@ phpbu [option]
126126

127127
This requires a valid XML *PHPBU* configuration file (phpbu.xml or phpbu.xml.dist) in your current working directory.
128128
Alternatively, you can specify the path to your configuration file. An important thing to note is that all path inside
129-
the configuration should be absolute or relative to the configuration file itself.
129+
the configuration should be absolute or relative to the configuration file itself.
130130

131131
$ phpbu --configuration=backup/config.xml
132132

@@ -137,11 +137,11 @@ Use the *--limit* option to execute only a subset of your configured backups.
137137
A dry run without any actual impact is executed with the *--simulate* option.
138138

139139
$ phpbu --simulate
140-
140+
141141
To show a guide how to restore your backup use the *--restore* option.
142142

143143
$ phpbu --restore
144-
144+
145145
## Configuration Example
146146

147147
Simple configuration example:

build.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</target>
4848

4949
<target name="phpcs" description="Find coding standard violations using PHP_CodeSniffer">
50-
<exec executable="phpcs">
50+
<exec executable="tools/phpcs">
5151
<arg value="--standard=PSR2"/>
5252
<arg value="--extensions=php"/>
5353
<arg path="${basedir}/src"/>
@@ -56,7 +56,7 @@
5656
</target>
5757

5858
<target name="phpcs-ci" description="Find coding standard violations using PHP_CodeSniffer">
59-
<exec executable="phpcs" output="/dev/null">
59+
<exec executable="tools/phpcs" output="/dev/null">
6060
<arg value="--report=checkstyle"/>
6161
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml"/>
6262
<arg value="--standard=PSR2"/>
@@ -67,7 +67,7 @@
6767
</target>
6868

6969
<target name="phpunit" description="Run unit tests with PHPUnit">
70-
<exec executable="phpunit" failonerror="true">
70+
<exec executable="tools/phpunit" failonerror="true">
7171
</exec>
7272
</target>
7373

@@ -575,7 +575,7 @@
575575
<arg value="${version}"/>
576576
</exec>
577577

578-
<exec executable="phpab">
578+
<exec executable="tools/phpab">
579579
<arg value="--all"/>
580580
<arg value="--tolerant"/>
581581
<arg value="--phar"/>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"phpseclib/phpseclib": "Require '^2.0' to use SFTP sync",
7777
"softlayer/objectstorage": "Require 'dev-master' to sync to Softlayer",
7878
"php-opencloud/openstack": "Require ^3.0 to sync to OpenStack",
79-
"vlucas/phpdotenv": "Require ^3.0 or ^4.0 to use the Dotenv adapter",
79+
"vlucas/phpdotenv": "Require ^3.0 or ^4.0 or ^5.0 to use the Dotenv adapter",
8080
"google/apiclient":"Require ^2.0 to sync to Google Drive",
8181
"arhitector/yandex":"Require ^2.0 to sync to Yandex Disk",
8282
"microsoft/azure-storage-blob": "Require ^1.4 to sync to Azure Blob Storage"

doc/config/source/pgdump.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<!-- optional, default none -->
77
<option name="port" value="1234" />
88

9+
<!-- optional, default none -->
10+
<option name="sslMode" value="allow" />
11+
912
<!-- optional, default none -->
1013
<option name="jobs" value="4" />
1114

phive.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpunit" version="^7.0.0" location="./tools/phpunit" copy="true" installed="7.5.20"/>
4-
<phar name="phpcs" version="^3.5.2" location="./tools/phpcs" copy="true" installed="3.5.4"/>
5-
<phar name="phpstan" version="^0.12.2" location="./tools/phpstan" copy="true" installed="0.12.9"/>
3+
<phar name="phpunit" version="^9.4.3" location="./tools/phpunit" copy="true" installed="9.5.0"/>
4+
<phar name="phpab" version="^1.20.0" location="./tools/phpab" copy="true" installed="1.26.0"/>
5+
<phar name="phpcs" version="^3.5.2" location="./tools/phpcs" copy="true" installed="3.5.8"/>
6+
<phar name="phpstan" version="^0.12.2" location="./tools/phpstan" copy="true" installed="0.12.67"/>
67
</phive>

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
parameters:
2+
bootstrapFiles:
3+
- tests/bootstrap.phpstan.php
24
level: 3
35
paths:
46
- %currentWorkingDirectory%/src/

phpunit.xml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="tests/bootstrap.php">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory>src</directory>
6+
</include>
7+
<report>
8+
<html outputDirectory="build/coverage" lowUpperBound="35" highLowerBound="70"/>
9+
</report>
10+
</coverage>
311
<testsuites>
412
<testsuite name="phpbu">
513
<directory>tests/phpbu</directory>
614
</testsuite>
715
</testsuites>
8-
<filter>
9-
<whitelist>
10-
<directory>src</directory>
11-
</whitelist>
12-
</filter>
1316
<logging>
14-
<log type="coverage-html"
15-
target="build/coverage"
16-
lowUpperBound="35"
17-
highLowerBound="70" />
18-
<log type="junit"
19-
target="build/logs/junit.xml" />
17+
<junit outputFile="build/logs/junit.xml"/>
2018
</logging>
2119
</phpunit>

0 commit comments

Comments
 (0)