Skip to content

Commit 9a07030

Browse files
Fix interface breaking change
1 parent 9cf8b81 commit 9a07030

21 files changed

+37
-39
lines changed

src/Backup/Target/Compression/Abstraction.php

+8
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,12 @@ public function getMimeType() : string
120120
{
121121
return $this->mimeType;
122122
}
123+
124+
/**
125+
* @return string
126+
*/
127+
public function __toString(): string
128+
{
129+
return $this->cmd;
130+
}
123131
}

src/Cli/Executable/Abstraction.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4+
use phpbu\App\Cli\Executable;
45
use phpbu\App\Util\Cli;
56
use SebastianFeldmann\Cli\CommandLine;
67

@@ -15,7 +16,7 @@
1516
* @link http://phpbu.de/
1617
* @since Class available since Release 2.1.0
1718
*/
18-
abstract class Abstraction
19+
abstract class Abstraction implements Executable
1920
{
2021
/**
2122
* Command name.
@@ -106,4 +107,12 @@ public function getCommandPrintable() : string
106107
{
107108
return $this->getCommand();
108109
}
110+
111+
/**
112+
* @return string
113+
*/
114+
public function __toString() : string
115+
{
116+
return $this->getCommand();
117+
}
109118
}

src/Cli/Executable/Arangodump.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -18,7 +17,7 @@
1817
* @link http://phpbu.de/
1918
* @since Class available since Release 2.0.0
2019
*/
21-
class Arangodump extends Abstraction implements Executable
20+
class Arangodump extends Abstraction
2221
{
2322
use OptionMasker;
2423

src/Cli/Executable/Compressor.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 1.0.0
1918
*/
20-
class Compressor extends Abstraction implements Executable
19+
class Compressor extends Abstraction
2120
{
2221
/**
2322
* File to compress.

src/Cli/Executable/Elasticdump.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use phpbu\App\Util;
76
use SebastianFeldmann\Cli\CommandLine;
@@ -19,7 +18,7 @@
1918
* @link http://phpbu.de/
2019
* @since Class available since Release 2.1.0
2120
*/
22-
class Elasticdump extends Abstraction implements Executable
21+
class Elasticdump extends Abstraction
2322
{
2423
use OptionMasker;
2524

src/Cli/Executable/Gpg.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link https://phpbu.de/
1817
* @since Class available since Release 6.0.1
1918
*/
20-
class Gpg extends Abstraction implements Executable
19+
class Gpg extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/Influxdump.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace phpbu\App\Cli\Executable;
44

5-
use phpbu\App\Cli\Executable;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
87

@@ -18,7 +17,7 @@
1817
* @link http://phpbu.de/
1918
* @since Class available since Release 2.1.12
2019
*/
21-
class Influxdump extends Abstraction implements Executable
20+
class Influxdump extends Abstraction
2221
{
2322
use OptionMasker;
2423

src/Cli/Executable/Innobackupex.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -18,7 +17,7 @@
1817
* @link http://phpbu.de/
1918
* @since Class available since Release 2.1.0
2019
*/
21-
class Innobackupex extends Abstraction implements Executable
20+
class Innobackupex extends Abstraction
2221
{
2322
use OptionMasker;
2423

src/Cli/Executable/Ldapdump.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace phpbu\App\Cli\Executable;
44

55
use phpbu\App\Backup\Target\Compression;
6-
use phpbu\App\Cli\Executable;
76
use phpbu\App\Util\Cli;
87
use SebastianFeldmann\Cli\CommandLine;
98
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -20,7 +19,7 @@
2019
* @link http://phpbu.de/
2120
* @since Class available since Release 2.1.12
2221
*/
23-
class Ldapdump extends Abstraction implements Executable
22+
class Ldapdump extends Abstraction
2423
{
2524
use OptionMasker;
2625

src/Cli/Executable/Mcrypt.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 2.1.0
1918
*/
20-
class Mcrypt extends Abstraction implements Executable
19+
class Mcrypt extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/Mongodump.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 2.1.0
1918
*/
20-
class Mongodump extends Abstraction implements Executable
19+
class Mongodump extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/Mysql.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use SebastianFeldmann\Cli\CommandLine;
65
use SebastianFeldmann\Cli\Command\Executable as Cmd;
76

@@ -16,7 +15,7 @@
1615
* @link http://phpbu.de/
1716
* @since Class available since Release 6.0-dev
1817
*/
19-
class Mysql extends Abstraction implements Executable
18+
class Mysql extends Abstraction
2019
{
2120
use OptionMasker;
2221

src/Cli/Executable/Mysqldump.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
namespace phpbu\App\Cli\Executable;
33

44
use phpbu\App\Backup\Target\Compression;
5-
use phpbu\App\Cli\Executable;
65
use phpbu\App\Exception;
76
use phpbu\App\Util\Cli;
8-
use phpbu\App\Util\Str;
97
use SebastianFeldmann\Cli\CommandLine;
108
use SebastianFeldmann\Cli\Command\Executable as Cmd;
119

@@ -20,7 +18,7 @@
2018
* @link http://phpbu.de/
2119
* @since Class available since Release 1.0.0
2220
*/
23-
class Mysqldump extends Abstraction implements Executable
21+
class Mysqldump extends Abstraction
2422
{
2523
use OptionMasker;
2624

src/Cli/Executable/Mysqlimport.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\Command\Executable as Cmd;
76
use SebastianFeldmann\Cli\CommandLine;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 6.0-dev
1918
*/
20-
class Mysqlimport extends Abstraction implements Executable
19+
class Mysqlimport extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/OpenSSL.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 2.1.6
1918
*/
20-
class OpenSSL extends Abstraction implements Executable
19+
class OpenSSL extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/Pgdump.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 1.0.0
1918
*/
20-
class Pgdump extends Abstraction implements Executable
19+
class Pgdump extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/RedisCli.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 2.1.12
1918
*/
20-
class RedisCli extends Abstraction implements Executable
19+
class RedisCli extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/Rsync.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 2.1.0
1918
*/
20-
class Rsync extends Abstraction implements Executable
19+
class Rsync extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Cli/Executable/Tar.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 1.0.0
1918
*/
20-
class Tar extends Abstraction implements Executable
19+
class Tar extends Abstraction
2120
{
2221
/**
2322
* Path to compress

src/Cli/Executable/Xtrabackup8.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace phpbu\App\Cli\Executable;
33

4-
use phpbu\App\Cli\Executable;
54
use phpbu\App\Exception;
65
use SebastianFeldmann\Cli\CommandLine;
76
use SebastianFeldmann\Cli\Command\Executable as Cmd;
@@ -17,7 +16,7 @@
1716
* @link http://phpbu.de/
1817
* @since Class available since Release 6.0.10
1918
*/
20-
class Xtrabackup8 extends Abstraction implements Executable
19+
class Xtrabackup8 extends Abstraction
2120
{
2221
use OptionMasker;
2322

src/Configuration/Loader/Factory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class Factory
4040
* @param \phpbu\App\Configuration\Bootstrapper $bootstrapper
4141
* @return \phpbu\App\Configuration\Loader
4242
*/
43-
public static function createLoader(string $filename, Bootstrapper $bootstrapper = null)
43+
public static function createLoader(string $filename, ?Bootstrapper $bootstrapper = null)
4444
{
4545
$bs = $bootstrapper ?? new Bootstrapper();
4646
$ext = pathinfo($filename, PATHINFO_EXTENSION);

0 commit comments

Comments
 (0)