Skip to content

Commit f3eaea5

Browse files
Merge branch 'master' into 6.0
2 parents 1724f23 + 5e04f05 commit f3eaea5

38 files changed

+434
-212
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ composer.lock
1616
/phpbu.xml
1717
/phpbu.json
1818
/vendor/
19+
/tools/
1920
cache.properties

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ language: php
33
php:
44
- 7.2
55
- 7.3
6+
- 7.4
67

78
before_script:
89
- composer self-update
910
- composer install --no-interaction --prefer-source
10-
- wget -O phpunit.phar https://phar.phpunit.de/phpunit-7.5.9.phar
11-
- if [ $TRAVIS_PHP_VERSION = "7.3" ]; then wget -O phpstan.phar https://github.com/phpstan/phpstan/releases/download/0.10.5/phpstan.phar ; fi
11+
- wget -O phpunit.phar https://phar.phpunit.de/phpunit-8.5.3.phar
12+
- if [ $TRAVIS_PHP_VERSION = "7.4" ]; then wget -O phpstan.phar https://github.com/phpstan/phpstan/releases/download/0.12.18/phpstan.phar ; fi
1213

1314
script:
1415
- php phpunit.phar --configuration ./build/travis-ci.phpunit.xml
15-
- if [ $TRAVIS_PHP_VERSION = "7.3" ]; then php phpstan.phar analyse --no-progress -c phpstan.neon; fi
16+
- if [ $TRAVIS_PHP_VERSION = "7.4" ]; then php phpstan.phar analyse --no-progress -c phpstan.neon; fi
1617

1718
notifications:
1819
email: false

composer.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"support": {
2828
"issues": "https://github.com/sebastianfeldmann/phpbu/issues"
2929
},
30+
"funding": [
31+
{
32+
"type": "github",
33+
"url": "https://github.com/sponsors/sebastianfeldmann"
34+
}
35+
],
3036
"autoload": {
3137
"psr-4": {
3238
"phpbu\\App\\": "src/"
@@ -84,6 +90,10 @@
8490
}
8591
},
8692
"scripts": {
87-
"post-autoload-dump": "vendor/bin/captainhook install -f -s"
93+
"post-autoload-dump": "vendor/bin/captainhook install -f -s",
94+
"setup": "phive install",
95+
"test": "tools/phpunit",
96+
"analyse": "tools/phpstan analyse",
97+
"style": "tools/phpcs --standard=psr2 src"
8898
}
8999
}

doc/config/source/ldapdump.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
<option name="attrs" value="*" />
1717

1818
<!-- define your custom ldapdump executable location -->
19-
<option name="pathToInfluxdump" value="/path/to/custom/bin" />
19+
<option name="pathToLdapdump" value="/path/to/custom/bin" />
2020
</source>

phive.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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"/>
6+
</phive>

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ parameters:
55
ignoreErrors:
66
- '#Call to an undefined method SebastianFeldmann\\Ftp\\Client::delete\(\)#'
77
- '#Call to an undefined method ObjectStorage_Abstract::setLocalFile\(\)#'
8+
- '#Parameter \#1 \$buffer \(array\) of method phpbu\\App\\Log\\Json::write\(\) should be compatible with parameter \$buffer \(string\) of method phpbu\\App\\Log\\File::write\(\)#'

src/Backup/Cleaner/Abstraction.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
namespace phpbu\App\Backup\Cleaner;
33

44
use phpbu\App\Backup\Collector;
5-
use phpbu\App\Backup\File\Simulation;
65
use phpbu\App\Backup\Target;
76
use phpbu\App\Result;
87

src/Backup/Cleaner/Capacity.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
namespace phpbu\App\Backup\Cleaner;
33

44
use phpbu\App\Backup\Collector;
5-
use phpbu\App\Backup\File\Local;
65
use phpbu\App\Backup\Target;
7-
use phpbu\App\Result;
8-
use phpbu\App\Util\Arr;
96
use phpbu\App\Util\Str;
107
use RuntimeException;
118

src/Backup/Cleaner/Stepwise.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ protected function setupRanges()
117117
$daily = new Range($all->getEnd(), $end, new Stepwise\Keeper\OnePerGroup('Ymd'));
118118

119119
// define the range that keeps backups per week
120-
$end = mktime(0, 0, 0, date('m', $end), (int) date('d', $end) - (7 * $this->weeksToKeepWeekly), date('Y', $end));
120+
$month = date('m', $end);
121+
$day = (int) date('d', $end) - (7 * $this->weeksToKeepWeekly);
122+
$year = date('Y', $end);
123+
$end = mktime(0, 0, 0, $month, $day, $year);
121124
$weekly = new Range($daily->getEnd(), $end, new Stepwise\Keeper\OnePerGroup('YW'));
122125

123126
// define the range that keeps backups per month

src/Backup/Collector/Abstraction.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
namespace phpbu\App\Backup\Collector;
33

44
use phpbu\App\Backup\File;
5-
use phpbu\App\Util;
6-
use phpbu\App\Backup\Target;
75

86
/**
97
* Abstraction class.

0 commit comments

Comments
 (0)