-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ARCANEDEV/develop
WIP
- Loading branch information
Showing
88 changed files
with
2,317 additions
and
432 deletions.
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* text=auto | ||
|
||
/.docker export-ignore | ||
/.github export-ignore | ||
/_docs export-ignore | ||
/tests export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.scrutinizer.yml export-ignore | ||
.travis.yml export-ignore | ||
CONTRIBUTING.md export-ignore | ||
CODE_OF_CONDUCT.md export-ignore | ||
docker-compose.yml export-ignore | ||
phpunit.xml.dist export-ignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
build | ||
/build | ||
/vendor | ||
/tests/temp/ | ||
composer.lock | ||
vendor | ||
.phpunit.result.cache | ||
/tests/temp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
filter: | ||
excluded_paths: [tests/*, vendor/*] | ||
|
||
checks: | ||
php: | ||
code_rating: true | ||
remove_extra_empty_lines: true | ||
remove_php_closing_tag: true | ||
remove_trailing_whitespace: true | ||
fix_use_statements: | ||
remove_unused: true | ||
preserve_multiple: false | ||
preserve_blanklines: true | ||
order_alphabetically: true | ||
fix_php_opening_tag: true | ||
fix_linefeed: true | ||
fix_line_ending: true | ||
fix_identation_4spaces: true | ||
fix_doc_comments: true | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
runs: 6 | ||
php_code_sniffer: | ||
enabled: true | ||
config: | ||
standard: PSR2 | ||
filter: | ||
paths: ['src'] | ||
php_loc: | ||
enabled: true | ||
php_cpd: | ||
enabled: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,13 @@ | |
*/ | ||
|
||
'destination' => [ | ||
|
||
'filename-prefix' => '', | ||
|
||
'disks' => [ | ||
'local', | ||
], | ||
|
||
], | ||
|
||
/* ----------------------------------------------------------------- | ||
|
@@ -49,6 +51,16 @@ | |
], | ||
|
||
'temporary-directory' => storage_path('app/_backup-temp'), | ||
|
||
'tasks' => [ | ||
Arcanedev\LaravelBackup\Actions\Backup\Tasks\CheckOptions::class, | ||
Arcanedev\LaravelBackup\Actions\Backup\Tasks\CheckBackupDestinations::class, | ||
Arcanedev\LaravelBackup\Actions\Backup\Tasks\CreateTemporaryDirectory::class, | ||
Arcanedev\LaravelBackup\Actions\Backup\Tasks\PrepareFilesToBackup::class, | ||
Arcanedev\LaravelBackup\Actions\Backup\Tasks\CreateBackupFile::class, | ||
Arcanedev\LaravelBackup\Actions\Backup\Tasks\MoveBackupToDisks::class, | ||
], | ||
|
||
], | ||
|
||
/* ----------------------------------------------------------------- | ||
|
@@ -96,6 +108,11 @@ | |
], | ||
], | ||
|
||
'tasks' => [ | ||
Arcanedev\LaravelBackup\Actions\Cleanup\Tasks\CheckBackupDestinations::class, | ||
Arcanedev\LaravelBackup\Actions\Cleanup\Tasks\ApplyCleanupStrategy::class, | ||
], | ||
|
||
], | ||
|
||
/* ----------------------------------------------------------------- | ||
|
@@ -104,6 +121,7 @@ | |
*/ | ||
|
||
'monitor' => [ | ||
|
||
'destinations' => [ | ||
[ | ||
'name' => env('APP_NAME', 'laravel-backup'), | ||
|
@@ -125,6 +143,11 @@ | |
], | ||
*/ | ||
], | ||
|
||
'tasks' => [ | ||
Arcanedev\LaravelBackup\Actions\Monitor\Tasks\CheckBackupsHealth::class, | ||
], | ||
|
||
], | ||
|
||
/* ----------------------------------------------------------------- | ||
|
@@ -133,7 +156,74 @@ | |
*/ | ||
|
||
'notifications' => [ | ||
// | ||
|
||
'supported' => [ | ||
Arcanedev\LaravelBackup\Notifications\BackupWasSuccessfulNotification::class => ['mail'], | ||
Arcanedev\LaravelBackup\Notifications\BackupHasFailedNotification::class => ['mail'], | ||
|
||
Arcanedev\LaravelBackup\Notifications\CleanupWasSuccessfulNotification::class => ['mail'], | ||
Arcanedev\LaravelBackup\Notifications\CleanupHasFailedNotification::class => ['mail'], | ||
|
||
Arcanedev\LaravelBackup\Notifications\HealthyBackupsWasFoundNotification::class => ['mail'], | ||
Arcanedev\LaravelBackup\Notifications\UnhealthyBackupsWasFoundNotification::class => ['mail'], | ||
], | ||
|
||
/* | ||
* Here you can specify the notifiable to which the notifications should be sent. The default | ||
* notifiable will use the variables specified in this config file. | ||
*/ | ||
'notifiable' => Arcanedev\LaravelBackup\Entities\Notifiable::class, | ||
|
||
'mail' => [ | ||
'to' => '[email protected]', | ||
'from' => [ | ||
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'), | ||
'name' => env('MAIL_FROM_NAME', 'Example'), | ||
], | ||
], | ||
|
||
'slack' => [ | ||
'webhook_url' => '', | ||
|
||
/* If this is set to null the default channel of the webhook will be used. */ | ||
'channel' => null, | ||
'username' => null, | ||
'icon' => null, | ||
], | ||
|
||
], | ||
|
||
/* ----------------------------------------------------------------- | ||
| Events | ||
| ----------------------------------------------------------------- | ||
*/ | ||
|
||
'events' => [ | ||
|
||
// Backup Action | ||
Arcanedev\LaravelBackup\Events\BackupActionWasSuccessful::class => [ | ||
Arcanedev\LaravelBackup\Listeners\SendBackupWasSuccessfulNotification::class, | ||
], | ||
Arcanedev\LaravelBackup\Events\BackupActionHasFailed::class => [ | ||
Arcanedev\LaravelBackup\Listeners\SendBackupHasFailedNotification::class | ||
], | ||
|
||
// Cleanup Action | ||
Arcanedev\LaravelBackup\Events\CleanupActionWasSuccessful::class => [ | ||
Arcanedev\LaravelBackup\Listeners\SendCleanupWasSuccessfulNotification::class | ||
], | ||
Arcanedev\LaravelBackup\Events\CleanupActionHasFailed::class => [ | ||
Arcanedev\LaravelBackup\Listeners\SendCleanupHasFailedNotification::class | ||
], | ||
|
||
// Monitor Action | ||
Arcanedev\LaravelBackup\Events\HealthyBackupsWasFound::class => [ | ||
Arcanedev\LaravelBackup\Listeners\SendHealthyBackupWasFoundNotification::class | ||
], | ||
Arcanedev\LaravelBackup\Events\UnhealthyBackupsWasFound::class => [ | ||
Arcanedev\LaravelBackup\Listeners\SendUnhealthyBackupWasFoundNotification::class | ||
], | ||
|
||
], | ||
|
||
]; |
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.