Skip to content

Releases: mirko-pagliai/cakephp-database-backup

3.0.0

23 Sep 09:16
Compare
Choose a tag to compare
  • BackupExport and BackupImport now make extensive use of property hooks (instead of methods), which has allowed for significant code optimization.
    Thanks to the magic __call() method provided by Utility, they still support the use of already known methods (filename(), compression(), timeout()) to set properties;
  • ExportCommand now also accepts paths relative to your app's root, in addition to the default target directory, as ImportCommand already did. This allows for proper shell autocompletion;
  • the MysqlExecutor uses only and directly mariadb and mariadb-dump binaries (and no longer also mysql and mysqldump, see here);
  • it requires at least PHP 8.4 and CakePHP 5.1.

Minor changes:

  • thanks to the Mockery's overloading and the (external) component Process that actually takes care of executing the commands to export/import the databases, normally the tests do not really use the database drivers and do not actually write or read files on the filesystem (i.e. everything is simulated, see here).
  • all methods of the BackupManager class had been deprecated and hence the class was removed;
  • since there are no aliases defined for binaries anymore (and it would be possible to override the configuration anyway), the Executor::findBinary() method takes only one argument;
  • the BackupExport::rotate() method had been deprecated and was removed;
  • the DatabaseBackup.chmod configuration had been deprecated and was removed;
  • the abstract class AbstractBackupUtility has become simply Utility. It uses property hooks to set and get $Connection, Executor, and $timeOut, rather than the homonymous methods.
    The makeAbsoluteFilename() method has become makeAbsolutePath();
  • the abstract class Command has been moved from DatabaseBackup\Console to DatabaseBackup\Command;
  • language files are no longer provided (neither .po nor .pot), as it is not considered particularly useful to always provide localization of the plugin, since it is not aimed at end users of the apps that install it. The __d() function is however maintained, so that it is still possible to proceed with localization for those who wish to do so;
  • the @since tag has been kept for the usual methods that remained unchanged (at least in logic).

Full Changelog: 3.0.0-RC2...3.0.0

2.15.1

23 Sep 09:06
847aca3
Compare
Choose a tag to compare

Important

If there are no particular needs (e.g. bug fixes, vulnerability fixes, etc.), this will be the last release of the 2.15 branch.

What's Changed

Full Changelog: 2.15.0...2.15.1

3.0.0-RC2

17 Sep 06:38
Compare
Choose a tag to compare
3.0.0-RC2 Pre-release
Pre-release

What's Changed

Full Changelog: 3.0.0-RC1...3.0.0-RC2

3.0.0-RC1

30 May 15:18
Compare
Choose a tag to compare
3.0.0-RC1 Pre-release
Pre-release

What's Changed

Full Changelog: 3.0.0-beta1...3.0.0-RC1

2.15.0

30 May 13:17
Compare
Choose a tag to compare
  • BackupManager::index() and BackupManager::rotate() methods have been deprecated and will be removed in a future
    release. At this point, the entire BackupManager class is considered deprecated and will be removed;
  • the BackupExport::rotate() method has been deprecated and will be removed in a future release;
  • the DatabaseBackup.chmod configuration is deprecated and will be removed in a future release;
  • the IndexCommand had been deprecated and was removed;
  • the --rotate option of ExportCommand had been deprecated and was removed;
  • the magic method AbstractBackupUtility::__get() had been deprecated and has been removed;
  • BackupTrait had been deprecated and has been removed;
  • AbstractBackupUtility::getDriver() had been deprecated and has been removed.

What's Changed

  • deprecated BackupManager::rotate() and updated related tests and do… by @mirko-pagliai in #196

Full Changelog: 2.14.4...2.15.0

2.14.4

30 May 09:54
Compare
Choose a tag to compare

Important

If there are no particular needs (e.g. bug fixes, vulnerability fixes, etc.), this will be the last release of the 2.14 branch.

  • the IndexCommand has been deprecated and will be removed in a future release. Instead, use the commands available to
    your system. For example, for Unix you might use ls -g -A -t -r backups/ (and ls --help for any help);
  • the --rotate option of ExportCommand has been deprecated and will be removed in a future release;
  • all links to the wiki have been removed (which, remember, has been replaced by the docs/ folder inside the branch,
    since version 2.14.3).

What's Changed

Full Changelog: 2.14.3...2.14.4

3.0.0-beta1

27 May 11:01
Compare
Choose a tag to compare
3.0.0-beta1 Pre-release
Pre-release

What's Changed

Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/commits/3.0.0-beta1

2.14.3

21 May 14:13
df0db6f
Compare
Choose a tag to compare
  • the Plugin class no longer implements the console() method (which described the available commands), leaving the
    application to take care of auto-discovering them;
  • the AbstractBackupUtility::__call() method now also supports uppercase named properties (bug fixed). This provides
    the getConnection() magic method;
  • AbstractBackupUtility::makeAbsoluteFilename() has become makeAbsolutePath() and Command::makeRelativeFilename()
    has become makeRelativePath();
  • the signature of AbstractBackupUtility::__call() method has changed (from
    __call(string $name, array $arguments = []): mixed to __call(string $method, array $args): mixed);
  • increased use of fake backup files for testing, where there is no need to use real backups for testing;
  • the entire wiki has been copied to the docs/ directory. This choice was made to allow the maintenance of information related to old versions (i.e. the branch you are viewing/using).

What's Changed

Full Changelog: 2.14.2...2.14.3

2.14.2

29 Apr 10:04
207207c
Compare
Choose a tag to compare
  • the constructor method AbstractBackupUtility now accepts $Connection as an optional argument, as string (e.g.
    default or test) or a ConnectionInterface instance. This means that by instantiating BackupExport or
    BackupImport (which extend AbstractBackupUtility) it is possible to set a connection beyond the default one;
  • ExportCommand and ImportCommand now accept the --connection option to set a connection other than the default;
  • due to the two new introductions just described, the DatabaseBackup.connection configuration name is deprecated
    and will be removed in a later release;
  • configuration names DatabaseBackup.mysql, DatabaseBackup.postgres and DatabaseBackup.sqlite are now deprecated
    and will be removed in a future release (backwards compatibility will be maintained up to branch 2.15.x). Use the
    DatabaseBackup.Mysql, DatabaseBackup.Postgres and DatabaseBackup.Sqlite names instead in your bootstrap (the
    driver name begins with a capital letter);
  • removed from ExportCommand::buildOptionParser() the reference (as a helper) to the old send option, which was no
    longer present (it had been forgotten);
  • starting with CakePHP 5.2, returning values from event listeners/callbacks is deprecated.
    For this reason, the beforeExport() and beforeImport() event methods provided by AbstractExecutor,
    MysqlExecutor and SqliteExecutor no longer return a boolean. Optionally these methods can use the
    $Event->setResult() method to set a result. Currently, the void return type is not explicit to ensure backwards
    compatibility, it will be made explicit in a future release;
  • removed Psalm (for the same reasons given for CakePHP, see here).

What's Changed

Full Changelog: 2.14.1...2.14.2

2.14.1

15 Apr 15:55
ec7e8b3
Compare
Choose a tag to compare
  • many improvements for the AbstractExecutor abstract class;
  • method AbstractBackupUtility::getExecutor() now accepts the optional $Connection argument. The getConnection()
    method has been removed;
  • getExecutable(), getExportExecutable() and getImportExecutable() methods provided by AbstractExecutor have
    been renamed as getCommand(), getExportCommand() and getImportCommand(). This is because they never actually
    returned "executables", but rather commands. This makes their name clearer. For getExportExecutable() and
    getImportExecutable() methods backwards compatibility is ensured via the magic method _call() (with deprecation);
  • significant improvement for SqlExecutor. Also, improved related tests;
  • the DriverTestCase abstract class, used in particular for old, no longer existing "Driver" classes, has been removed.
    Tests involving "Executor" classes do not use this class, as they have no need for it. The PostgresExecutorTest test
    class has also been removed, since the class it covers, by default, does not implement anything that the parent class
    does not;
  • all PHPUnit deprecations have finally been removed;
  • added symfony/polyfill-php83. This allowed the #[Override] attribute to be added to all affected methods;
  • we also begin to apply the UsesClass attribute and remove the old @uses tag;
  • updated for cakedc/cakephp-phpstan to ^4.0 (and so phpstan/phpstan to 2.1.8)

What's Changed

Full Changelog: 2.14.0...2.14.1