Skip to content

Commit

Permalink
Fix interface breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianfeldmann committed Nov 27, 2024
1 parent 9cf8b81 commit 6078f4e
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 39 deletions.
8 changes: 8 additions & 0 deletions src/Backup/Target/Compression/Abstraction.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,12 @@ public function getMimeType() : string
{
return $this->mimeType;
}

/**
* @return string
*/
public function __toString(): string
{
return $this->cmd;
}
}
11 changes: 10 additions & 1 deletion src/Cli/Executable/Abstraction.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Util\Cli;
use SebastianFeldmann\Cli\CommandLine;

Expand All @@ -15,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.0
*/
abstract class Abstraction
abstract class Abstraction implements Executable
{
/**
* Command name.
Expand Down Expand Up @@ -106,4 +107,12 @@ public function getCommandPrintable() : string
{
return $this->getCommand();
}

/**
* @return string
*/
public function __toString() : string
{
return $this->getCommand();
}
}
3 changes: 1 addition & 2 deletions src/Cli/Executable/Arangodump.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -18,7 +17,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.0.0
*/
class Arangodump extends Abstraction implements Executable
class Arangodump extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Compressor.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 1.0.0
*/
class Compressor extends Abstraction implements Executable
class Compressor extends Abstraction
{
/**
* File to compress.
Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Elasticdump.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use phpbu\App\Util;
use SebastianFeldmann\Cli\CommandLine;
Expand All @@ -19,7 +18,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.0
*/
class Elasticdump extends Abstraction implements Executable
class Elasticdump extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Gpg.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link https://phpbu.de/
* @since Class available since Release 6.0.1
*/
class Gpg extends Abstraction implements Executable
class Gpg extends Abstraction
{
use OptionMasker;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/Executable/Influxdump.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;

use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;

Expand All @@ -18,7 +18,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.12
*/
class Influxdump extends Abstraction implements Executable
class Influxdump extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Innobackupex.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -18,7 +17,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.0
*/
class Innobackupex extends Abstraction implements Executable
class Innobackupex extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Ldapdump.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace phpbu\App\Cli\Executable;

use phpbu\App\Backup\Target\Compression;
use phpbu\App\Cli\Executable;
use phpbu\App\Util\Cli;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -20,7 +19,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.12
*/
class Ldapdump extends Abstraction implements Executable
class Ldapdump extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Mcrypt.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.0
*/
class Mcrypt extends Abstraction implements Executable
class Mcrypt extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Mongodump.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.0
*/
class Mongodump extends Abstraction implements Executable
class Mongodump extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Mysql.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;

Expand All @@ -16,7 +15,7 @@
* @link http://phpbu.de/
* @since Class available since Release 6.0-dev
*/
class Mysql extends Abstraction implements Executable
class Mysql extends Abstraction
{
use OptionMasker;

Expand Down
4 changes: 1 addition & 3 deletions src/Cli/Executable/Mysqldump.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
namespace phpbu\App\Cli\Executable;

use phpbu\App\Backup\Target\Compression;
use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use phpbu\App\Util\Cli;
use phpbu\App\Util\Str;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;

Expand All @@ -20,7 +18,7 @@
* @link http://phpbu.de/
* @since Class available since Release 1.0.0
*/
class Mysqldump extends Abstraction implements Executable
class Mysqldump extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Mysqlimport.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
use SebastianFeldmann\Cli\CommandLine;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 6.0-dev
*/
class Mysqlimport extends Abstraction implements Executable
class Mysqlimport extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/OpenSSL.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.6
*/
class OpenSSL extends Abstraction implements Executable
class OpenSSL extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Pgdump.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 1.0.0
*/
class Pgdump extends Abstraction implements Executable
class Pgdump extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/RedisCli.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.12
*/
class RedisCli extends Abstraction implements Executable
class RedisCli extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Rsync.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 2.1.0
*/
class Rsync extends Abstraction implements Executable
class Rsync extends Abstraction
{
use OptionMasker;

Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Tar.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 1.0.0
*/
class Tar extends Abstraction implements Executable
class Tar extends Abstraction
{
/**
* Path to compress
Expand Down
3 changes: 1 addition & 2 deletions src/Cli/Executable/Xtrabackup8.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace phpbu\App\Cli\Executable;

use phpbu\App\Cli\Executable;
use phpbu\App\Exception;
use SebastianFeldmann\Cli\CommandLine;
use SebastianFeldmann\Cli\Command\Executable as Cmd;
Expand All @@ -17,7 +16,7 @@
* @link http://phpbu.de/
* @since Class available since Release 6.0.10
*/
class Xtrabackup8 extends Abstraction implements Executable
class Xtrabackup8 extends Abstraction
{
use OptionMasker;

Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Loader/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class Factory
* @param \phpbu\App\Configuration\Bootstrapper $bootstrapper
* @return \phpbu\App\Configuration\Loader
*/
public static function createLoader(string $filename, Bootstrapper $bootstrapper = null)
public static function createLoader(string $filename, ?Bootstrapper $bootstrapper = null)
{
$bs = $bootstrapper ?? new Bootstrapper();
$ext = pathinfo($filename, PATHINFO_EXTENSION);
Expand Down

0 comments on commit 6078f4e

Please sign in to comment.