Releases: mirko-pagliai/cakephp-database-backup
Releases · mirko-pagliai/cakephp-database-backup
3.0.1
- Fixed a serious bug in the
BackupExport::compression()method, which did not correctly reset the filename to use. Extended testing.
What's Changed
- 3.0.x dev by @mirko-pagliai in #210
Full Changelog: 3.0.0...3.0.1
3.0.0
BackupExportandBackupImportnow make extensive use of property hooks (instead of methods), which has allowed for significant code optimization.
Thanks to the magic__call()method provided byUtility, they still support the use of already known methods (filename(),compression(),timeout()) to set properties;ExportCommandnow also accepts paths relative to your app's root, in addition to the default target directory, asImportCommandalready did. This allows for proper shell autocompletion;- the
MysqlExecutoruses only and directlymariadbandmariadb-dumpbinaries (and no longer alsomysqlandmysqldump, 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
BackupManagerclass 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.chmodconfiguration had been deprecated and was removed; - the abstract class
AbstractBackupUtilityhas become simplyUtility. It uses property hooks to set and get$Connection,Executor, and$timeOut, rather than the homonymous methods.
ThemakeAbsoluteFilename()method has becomemakeAbsolutePath(); - the abstract class
Commandhas been moved fromDatabaseBackup\ConsoletoDatabaseBackup\Command; - language files are no longer provided (neither
.ponor.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
@sincetag 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
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
- 2.15.x ci windows by @mirko-pagliai in #204
- 2.15.x develop by @mirko-pagliai in #208
Full Changelog: 2.15.0...2.15.1
3.0.0-RC2
What's Changed
- 3.0.x develop by @mirko-pagliai in #198
- Set
db_dsn_mysqlias an environment variable in CI workflow for "re… by @mirko-pagliai in #199 - Refine PHPUnit execution commands in CI workflow to improve consisten… by @mirko-pagliai in #200
- Add conditional
ifclause for database setup steps in CI workflow t… by @mirko-pagliai in #202 - Update Windows workflow to include MySQL 8.0 in test setup by @mirko-pagliai in #205
Full Changelog: 3.0.0-RC1...3.0.0-RC2
3.0.0-RC1
2.15.0
BackupManager::index()andBackupManager::rotate()methods have been deprecated and will be removed in a future
release. At this point, the entireBackupManagerclass is considered deprecated and will be removed;- the
BackupExport::rotate()method has been deprecated and will be removed in a future release; - the
DatabaseBackup.chmodconfiguration is deprecated and will be removed in a future release; - the
IndexCommandhad been deprecated and was removed; - the
--rotateoption ofExportCommandhad been deprecated and was removed; - the magic method
AbstractBackupUtility::__get()had been deprecated and has been removed; BackupTraithad 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
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
IndexCommandhas been deprecated and will be removed in a future release. Instead, use the commands available to
your system. For example, for Unix you might usels -g -A -t -r backups/(andls --helpfor any help); - the
--rotateoption ofExportCommandhas 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 version2.14.3).
What's Changed
- 2.14.x develop by @mirko-pagliai in #195
Full Changelog: 2.14.3...2.14.4
3.0.0-beta1
What's Changed
- 3.0.x ci by @mirko-pagliai in #171
- added windows tests by @mirko-pagliai in #172
- 3.0.x ci code coverage by @mirko-pagliai in #173
- 3.0.x ci phpcs and phpstan by @mirko-pagliai in #174
- 3.0.x prefer lowest by @mirko-pagliai in #180
- updated by @mirko-pagliai in #184
- 3.0.x windows by @mirko-pagliai in #185
- 3.0.x mysql by @mirko-pagliai in #186
- 3.0.x ci tests by @mirko-pagliai in #188
- tests for postgres by @mirko-pagliai in #189
- fixed for windows by @mirko-pagliai in #190
- 3.0.x ci by @mirko-pagliai in #191
Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/commits/3.0.0-beta1
2.14.3
- the
Pluginclass no longer implements theconsole()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
thegetConnection()magic method; AbstractBackupUtility::makeAbsoluteFilename()has becomemakeAbsolutePath()andCommand::makeRelativeFilename()
has becomemakeRelativePath();- the signature of
AbstractBackupUtility::__call()method has changed (from
__call(string $name, array $arguments = []): mixedto__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
- 2.14.x develop by @mirko-pagliai in #170
- the
Pluginclass no longer implements theconsole()method (which… by @mirko-pagliai in #175 - 2.14.x develop by @mirko-pagliai in #179
- 2.14.x develop by @mirko-pagliai in #181
- 2.14.x wiki by @mirko-pagliai in #182
- 2.14.x develop by @mirko-pagliai in #183
Full Changelog: 2.14.2...2.14.3
2.14.2
- the constructor method
AbstractBackupUtilitynow accepts$Connectionas an optional argument, as string (e.g.
defaultortest) or aConnectionInterfaceinstance. This means that by instantiatingBackupExportor
BackupImport(which extendAbstractBackupUtility) it is possible to set a connection beyond the default one; ExportCommandandImportCommandnow accept the--connectionoption to set a connection other than the default;- due to the two new introductions just described, the
DatabaseBackup.connectionconfiguration name is deprecated
and will be removed in a later release; - configuration names
DatabaseBackup.mysql,DatabaseBackup.postgresandDatabaseBackup.sqliteare now deprecated
and will be removed in a future release (backwards compatibility will be maintained up to branch2.15.x). Use the
DatabaseBackup.Mysql,DatabaseBackup.PostgresandDatabaseBackup.Sqlitenames instead in your bootstrap (the
driver name begins with a capital letter); - removed from
ExportCommand::buildOptionParser()the reference (as a helper) to the oldsendoption, 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, thebeforeExport()andbeforeImport()event methods provided byAbstractExecutor,
MysqlExecutorandSqliteExecutorno longer return a boolean. Optionally these methods can use the
$Event->setResult()method to set a result. Currently, thevoidreturn 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
- configuration names
DatabaseBackup.mysql,DatabaseBackup.postgres… by @mirko-pagliai in #160 - 2.14.x connection by @mirko-pagliai in #162
- removed Psalm (for the same reasons given for CakePHP, see [here](htt… by @mirko-pagliai in #165
- fixed deprecations by @mirko-pagliai in #167
- 2.14.x develop by @mirko-pagliai in #168
Full Changelog: 2.14.1...2.14.2