Laravel 5.5

- Updated Laravel recipe to not run 'artisan:optimize' on Laravel >= 5.5, as that command is now deprecated ([see upgrade notes](https://laravel.com/docs/5.5/upgrade)).
- Version check defaults to 5.5 if not found.
This commit is contained in:
Michael Lake 2017-08-31 11:21:51 -05:00
parent 818dbdb7f2
commit fe27571212
2 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## beornlake PR
- Updated Laravel recipe to not run 'artisan:optimize' on Laravel >= 5.5, as that command is now deprecated ([see upgrade notes](https://laravel.com/docs/5.5/upgrade)).
- Laravel version check defaults to 5.5 if not found.
## master
[v6.0.2...master](https://github.com/deployphp/deployer/compare/v6.0.2...master)

View File

@ -40,7 +40,7 @@ set('laravel_version', function () {
preg_match_all('/(\d+\.?)+/', $result, $matches);
$version = $matches[0][0] ?? 5.4;
$version = $matches[0][0] ?? 5.5;
return $version;
});
@ -105,7 +105,12 @@ task('artisan:view:clear', function () {
desc('Execute artisan optimize');
task('artisan:optimize', function () {
$deprecatedVersion = 5.5;
$currentVersion = get('laravel_version');
if (version_compare($currentVersion, $deprecatedVersion, '<')) {
run('{{bin/php}} {{release_path}}/artisan optimize');
}
});
desc('Execute artisan queue:restart');