Releases: mirko-pagliai/cakephp-database-backup
Releases · mirko-pagliai/cakephp-database-backup
3.0.0
BackupExport
andBackupImport
now 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;ExportCommand
now also accepts paths relative to your app's root, in addition to the default target directory, asImportCommand
already did. This allows for proper shell autocompletion;- the
MysqlExecutor
uses only and directlymariadb
andmariadb-dump
binaries (and no longer alsomysql
andmysqldump
, 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 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
Command
has been moved fromDatabaseBackup\Console
toDatabaseBackup\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
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_mysqli
as 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
if
clause 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 entireBackupManager
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 ofExportCommand
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
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 usels -g -A -t -r backups/
(andls --help
for any help); - the
--rotate
option ofExportCommand
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 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
Plugin
class 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 = []): 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
- 2.14.x develop by @mirko-pagliai in #170
- the
Plugin
class 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
AbstractBackupUtility
now accepts$Connection
as an optional argument, as string (e.g.
default
ortest
) or aConnectionInterface
instance. This means that by instantiatingBackupExport
or
BackupImport
(which extendAbstractBackupUtility
) it is possible to set a connection beyond the default one; ExportCommand
andImportCommand
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
andDatabaseBackup.sqlite
are 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.Postgres
andDatabaseBackup.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 oldsend
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, thebeforeExport()
andbeforeImport()
event methods provided byAbstractExecutor
,
MysqlExecutor
andSqliteExecutor
no longer return a boolean. Optionally these methods can use the
$Event->setResult()
method to set a result. Currently, thevoid
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
- 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
2.14.1
- many improvements for the
AbstractExecutor
abstract class; - method
AbstractBackupUtility::getExecutor()
now accepts the optional$Connection
argument. ThegetConnection()
method has been removed; getExecutable()
,getExportExecutable()
andgetImportExecutable()
methods provided byAbstractExecutor
have
been renamed asgetCommand()
,getExportCommand()
andgetImportCommand()
. This is because they never actually
returned "executables", but rather commands. This makes their name clearer. ForgetExportExecutable()
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. ThePostgresExecutorTest
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 sophpstan/phpstan
to2.1.8
)
What's Changed
- updated for
cakedc/cakephp-phpstan
to^4.0
(and so `phpstan/phpst… by @mirko-pagliai in #147 - 2.14.x develop by @mirko-pagliai in #148
- 2.14.x develop executor by @mirko-pagliai in #149
- 2.14.x develop by @mirko-pagliai in #150
- significant improvement for
SqlExecutor
. Also, improved related tests by @mirko-pagliai in #151 - added
symfony/polyfill-php83
. This allowed the#[Override]
attrib… by @mirko-pagliai in #152 - we also begin to apply the
UsesClass
attribute and remove the old `… by @mirko-pagliai in #153 - 2.14.x develop by @mirko-pagliai in #154
- fixed by @mirko-pagliai in #155
- 2.14.x develop by @mirko-pagliai in #156
- 2.14.x develop executor by @mirko-pagliai in #158
- 2.14.x develop by @mirko-pagliai in #159
Full Changelog: 2.14.0...2.14.1