New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jabxjab archive:dump and archive:restore commands #5148
Merged
Merged
Changes from 206 commits
Commits
Show all changes
214 commits
Select commit
Hold shift + click to select a range
4cf7316
Add ArchiveCommands.php
81ba6c9
Add SQL dump operation
90a8681
Add "description", "tags", "destination" and "overwrite" options to a…
6e8911d
Refactor getDrupalFilesDir();
e3755c9
Refactor creating database and file archives
114071d
Add createMasterArchive()
421651d
Add createManifestFile()
099c8a7
Rename "db_dump" option into "db"
81ba0dd
Update default generator value
d6266dd
Add "--destination" and "--overwrite" options
4a25245
Update info messages
a225279
Log info when creating manifest file
06dfc08
Remove "master" archive mentions in logs
787493d
Refactor archive structure ("database" and "files" are now directories)
1b12911
Add "code" component
c4e62f4
Add getExcludesByPaths()
4e7828b
Refactor code excludes
13bc858
Exclude css, js, php and styles from file component
d70cbe0
Exclude from code archive everything from web/ except modules, themes…
409d5f0
Refactor Drupal contrib projects excludes
e55fce7
Exclude sites/*/settings.local.php from code archive
d3346ae
Add validateSensitiveData()
5fabfc5
Remove todo
17e2086
Fix method name
d97e02d
Fix getCodeComponentPath()
fe14016
Rename getCodeComponentPath() into getProjectPath()
4dec98b
Add site validation
12cd1fc
Update command description
d2df4ed
Fix validateSite()
e52ee2e
Add ArchiveTest
329bbca
Fix code style issues
dd40537
Add support for non-Composer managed, non-web docroot sites
9b5a6c8
Fix command for non-web docroot sites
8ac02b6
Exclude settings.*.php
a850997
Fix testArchiveDumpCommand() test
a300d59
Add cleanUp() shutdown function
2bfc9eb
Copy code archive component to archive dir
2199a09
Use constants for archive component names
9e4b75f
Refactor excludes
977900c
Simplify cleanUp()
d67faf6
Rename constants
95b74b4
Rename getExcludesByPaths() into getRegexpsForPaths()
7b7476e
Update phpdocs
95c2f1e
Merge branch '11.x' into archive-dump-command
jabxjab 90dc700
Rename var
5f81996
Use Path::join()
8a5ffd0
Use array_map in getRegexpsForPaths()
f86121e
Rename getIterator()
9bd56d7
Merge branch '11.x' into archive-dump-command
jabxjab 6eb1086
Fix missing manifest file
8a9d851
Return absolute path to the archive
7f05ffe
Delete temp archive.tar.gz if exists
948c7fe
Add scenarios to testArchiveDumpCommand()
910780b
Fix code style issues
a73e6f8
Merge remote-tracking branch 'origin/archive-dump-command' into archi…
d97616c
Fix testArchiveDumpCommand()
8231582
Rename ArchiveDumpCommands and refactor getDrupalFilesComponentPath()
c02c576
Remove setSimulated()
08a502c
Set php memory_limit to 256M in appveyor.yml
198821d
Fix file iterator local file path handling
ac05787
Remove unused constants
866e304
Merge branch '11.x' into archive-dump-command
jabxjab 83c448d
Create temp dir on command execution only
b0919a7
Merge remote-tracking branch 'origin/archive-dump-command' into archi…
646e1f6
Add ArchiveRestoreCommands backbone
046f089
Add confirmation prompts
7114237
Implement extractArchive()
cf638cb
Add check for file existence
53b8fc4
Add check for filename extension
05e8c81
Merge branch '11.x' into archive-dump-command
jabxjab ad0cbfc
Add todo
7bb8445
Import code file for a local target only
d9a3eaf
Import code files for a remote targets
accaa1c
Add 'docroot' property to the manifest file
2238007
Fix $aliasConfigContext
87faad9
Merge branch '11.x' into archive-dump-command
jabxjab 95fdf66
Fix nested php includes in validateSensitiveData()
ebdd7e1
Bootstrap Drupal core to get a path to Drupal public files
d6f76b9
Disable type3/phar-stream-wrapper which loads with Drupal core and pr…
57c5b83
Fix getDrupalFilesComponentPath()
a0978e7
Remove Site Alias manager
f9988db
Refactor validateSensitiveData() to include site/*/settings.php file …
8ef4743
Merge branch '11.x' into archive-dump-command
jabxjab b8e0682
Fix scenario when backup dir is inside code dir (and on Windows OS)
36ed35b
Merge remote-tracking branch 'origin/archive-dump-command' into archi…
ba3c0be
Fix scenario when backup dir is inside code dir (and on Windows OS) u…
3cbe088
Merge remote-tracking branch 'origin/archive-dump-command' into archi…
0f760ff
Fix getCodeComponentPath()
e0d03ba
Improve verbosity in validateSensitiveData()
4c939df
Add dt() to Exception messages
650a372
Refactor Drupal-related excludes - exclude paths defined in composer.…
0d7d837
Detect Drupal files exclude for code component
2fc7c92
Use 'composer info --path --format=json' to exclude packages installa…
a486209
Add "composer" as alias to "php composer.phar" in appveyor.yml
25cd93a
Rename $installedPackagesBaseDirs into $installedPackagesRelativePaths
da8a687
Use native Symfony\Process for "composer info" command execution
a3d1022
Add '%composer-root' to core:status command
ad44967
Add 'composer-root' to @field-labels/@default-fields of core:status c…
310162b
Detect composer root for a remote site
cbc4811
Add rsyncFiles()
b7a8e3a
Add importFiles()
454a390
Add getSiteAlias(), getSiteStatus()
cd827dc
Fix $evaluatedPath instantiation for a remote site
aa47e32
Detect composer root for a remote site
a97535c
Add rsyncFiles()
e6d28f9
Add importFiles()
6c7f2cb
Add getSiteAlias(), getSiteStatus()
ffaf9d0
Fix $evaluatedPath instantiation for a remote site
c508306
Add blueprint of importDatabase()
4ad10c2
Update importDatabase()
d235854
Fix todos
1a47d72
Fix code style issues
994c681
Merge remote-tracking branch 'upstream/11.x' into archive-restore-com…
54535ca
Add testArchiveRestoreCommand() to ArchiveTest
b724bf4
Merge branch '11.x' into archive-dump-command
jabxjab dcb9164
Merge branch '11.x' into archive-restore-command
jabxjab ed49878
Add test scenario for "--overwrite" option
dc0f3bb
Add test scenario for "--code", "--code_path", "--db", "--db_path", "…
4a8f260
Merge branch 'archive-dump-command' of https://github.com/jabxjab/dru…
greg-1-anderson 48a4765
PROPOSAL: Replace direct use of register_shutdown_function with Robo …
greg-1-anderson 4854e03
Proposal 2: Provide our own tmpDir service in FsUtils
greg-1-anderson f4bb527
Code style
greg-1-anderson 52ef17b
Simplify tests: do one less archive:dump, and instead use file_put_co…
greg-1-anderson 27bed6a
Update download url of cacert to new location
greg-1-anderson cfc8dce
Try curl instead of DownloadFile
greg-1-anderson 2058727
Merge branch 'archive-restore-command' of https://github.com/jabxjab/…
greg-1-anderson 9fb02c3
Merge branch '11.x' into jabxjab-archive-dump-command
greg-1-anderson 3f1b8ce
Skip tests of unsupported configurations
greg-1-anderson 16e51df
Remove eval() from validateSensitiveData()
b28124e
Remove support for a remote site for archive:restore command
1516fd5
Add an option to restore code into current dir if empty
e826896
Remove ssh-related option
3f5da75
Add --destination_path option
cecf35f
Rename archive:restore options
7ca3fbd
Do not check $destination dir (creates automatically by rsync)
af6d29f
Throw exception on Drupal bootstrap failure when getting Drupal files…
443c008
Add archive:restore options: db-name, db-port, db-host, db-user, db-p…
635b332
Replace underscores with dashes in option names
4c86392
Update tests for archive:restore
a016676
Remove $autodetectDestination
233e746
Fix indentations
f7e66e9
Disable SecurityUpdatesTest.php temporarily
85b87a9
Require database connection option(s) when --destination-path options…
5c3f925
Add support for relative paths in --destination-path option
e681e9b
Merge branch '11.x' into jabxjab-archive-dump-command
jabxjab 2989b10
Add test scenarios for testArchiveRestoreCommand()
a6bb6bb
Set sut db password to empty string
8c5ea64
Use self::getDbUrl() to construct --db-url
951c1a7
Add tearDown() to delete a test file
de2fbdc
Update testing scenario to use invalid db host instead of password
4f869fa
Add --db-driver option in tests
17e3184
Add testing scenarios for database component involving --destination-…
237c8f5
Revert "Disable SecurityUpdatesTest.php temporarily"
7394da5
Merge branch '11.x' into jabxjab-archive-dump-command
jabxjab d6ad8f7
Allow archive:restore to extract archive and files to cwd. Improve Fs…
greg-1-anderson 6c83ac8
Code style
greg-1-anderson 443c63f
WIP: Avoid overwriting sut in archive restore tests
greg-1-anderson 37bbae7
Fix var name typo
e309b62
Remove unused namespace, @throws tag and $root var
a73205d
Remove unused namespaces and ARCHIVE_SUBDIR_NAME const
e3a33f5
Refactor extractArchive() into getExtractDir()
50b21a9
Create database if not exists database import
6d99d63
Remove duplicated testing scenarios
79f132a
Update archive:restore tests
0aaf2f7
Remove tearDown()
0af00db
Use setDbSpec() before calling query() in ArchiveRestoreCommands::imp…
91bbff0
Fix drop/create db in importDatabase()
2cfc814
Remove escaping "\" in --exclude-code-paths
76453b5
Add composer.json and composer.lock to a SUT's archive
085bf85
Run 'composer install' after archive:restore in testArchiveRestoreCom…
977048a
Manage SUT's settings.php file
a1546dc
Refactor settings.php file setup procedures
d87be11
Remove unused arg
f17df0e
Delete destination directory in case when code component is involved …
bc3576d
Add confirmation dialog for Drupal files restore if destination path …
05b0014
Fix tests
663940a
Show prompt on file import if Drupal files dir exists and one of --co…
c0d7857
Refactor setupSettingsPhp()
f88d5e6
Refactor backupSettingsPhp()
bb57463
Add installComposerDependencies()
5409dcc
Add assertRestoredSiteStatus()
27a9c8a
Remove "composer install" code in favor of the method
21fd98c
Remove excessive assertion
a537380
Add "composer install" to testArchiveRestoreCommand()
8c4a526
Change $filesRelativePath to a real value
8470eee
Assert the restored site is OK
ca2ba94
Add more assertions that the restored site is OK
1d87ff0
Update dependencies to fix testNoInsecureProductionPhpPackage failure.
greg-1-anderson 6c1affb
Remove "composer install" from tests
713f7ff
Rename "destination path" property/method name
67545c7
Add --code-no-composer-install and --code-composer-install-timeout op…
4b5ad2c
Add "composer install" to importCode()
7a16377
Remove setupSettingsPhp() and backupSettingsPhp() from tests
9345138
Add --site-subdir and --setup-database-connection options
0e20a6b
Add getDrupalRootPath()
bd0bcbb
Update $options default value
79528c5
Add setupLocalSettingsPhp()
3ee5142
Update testArchiveRestoreCommand()
48fed8d
Fix code style issue
fa4668d
Add saveSettingsLocalPhp()
81e8d01
Add database connection settings to settings.local.php file
950c41b
Update dependencies to fix testNoInsecureProductionPhpPackage failure.
841fa04
Fix null command references (in service commands list) during Drupal …
2a0b7c9
Jabxjab archive dump command updates (#5165)
rwagner00 4639811
Validate that the Phar extension is available
greg-1-anderson f5cf904
Merge branch '11.x' into jabxjab-archive-dump-command
jabxjab 44fc67e
Remove class phpdoc descriptions
14b2a81
Remove unused "use" statement
b49910a
Remove --code-no-composer-install and --code-composer-install-timeout…
47b0cf7
Remove @var phpdocs on explicitly declared class properties
1224b03
Add @usage examples for archive:restore
9585fbc
Add @usage examples for archive:dump
2ec211c
Validate "rsync" exists for archive:restore command
5cdba2a
Merge branch '11.x' into jabxjab-archive-dump-command
greg-1-anderson File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why it became necessary to add this? Would it be possible to prevent empty items from being added to the list, rather than remove them every time the accessor is called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greg-1-anderson Spent some time investigating it and did not found a real cause of this. What I found is that the dependency references for
config.export.commands
andconfig.export.commands
turining intoNULL
once added which causes fatal error on Drupal10 CI pipeline but not on Drupal9-related ones.