diff --git a/CHANGELOG.md b/CHANGELOG.md index 5915fac..d47da52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # nystudio107/craft Change Log +## 2.3.4 - 2020.09.02 +### Added +* Added a `queue` component with a longer `ttr` + +### Changed +* Refactor composer scripts to handle Craft not being installed, leveraging craft `install/check` +* Boilerplate now requires `craftcms/cms` `^3.5.8` + ## 2.3.3 - 2020.08.13 ### Fixed * Modern config only for local dev, [fixing multi-compiler issues](https://github.com/webpack/webpack-dev-server/issues/2355) with HRM diff --git a/cms/composer.json b/cms/composer.json index f501321..554c88c 100644 --- a/cms/composer.json +++ b/cms/composer.json @@ -1,6 +1,6 @@ { "require": { - "craftcms/cms": "^3.4.23", + "craftcms/cms": "^3.5.8", "vlucas/phpdotenv": "^3.4.0", "yiisoft/yii2-redis": "^2.0.6", "nystudio107/craft-imageoptimize": "^1.0.0", @@ -36,14 +36,27 @@ ], "scripts": { "craft-update": [ - "@php craft migrate/all", - "@php craft project-config/sync", - "@php craft clear-caches/all" + "@pre-craft-update", + "@post-craft-update" + ], + "pre-craft-update": [ + "@php craft install/check && php craft off --retry=60 || return 0" + ], + "post-craft-update": [ + "@php craft install/check && php craft clear-caches/all || return 0", + "@php craft install/check && php craft migrate/all || return 0", + "@php craft install/check && php craft project-config/sync || return 0", + "@php craft install/check && php craft on || return 0" ], "post-root-package-install": [ - "@php -r \"file_exists('.env') || copy('example.env', '.env');\"" + "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "@php craft setup/welcome" ], - "post-update-cmd": "@craft-update", - "post-install-cmd": "@craft-update" + "pre-update-cmd": "@pre-craft-update", + "pre-install-cmd": "@pre-craft-update", + "post-update-cmd": "@post-craft-update", + "post-install-cmd": "@post-craft-update" } } diff --git a/cms/config/app.php b/cms/config/app.php index 0fc9833..b113cbc 100644 --- a/cms/config/app.php +++ b/cms/config/app.php @@ -27,22 +27,26 @@ ], 'bootstrap' => ['site-module'], 'components' => [ + 'cache' => [ + 'class' => yii\redis\Cache::class, + 'redis' => [ + 'hostname' => App::env('REDIS_HOSTNAME'), + 'port' => App::env('REDIS_PORT'), + 'database' => App::env('REDIS_CRAFT_DB'), + ], + ], 'deprecator' => [ 'throwExceptions' => App::env('DEV_MODE'), ], + 'queue' => [ + 'class' => craft\queue\Queue::class, + 'ttr' => 10 * 60, + ], 'redis' => [ 'class' => yii\redis\Connection::class, 'hostname' => App::env('REDIS_HOSTNAME'), 'port' => App::env('REDIS_PORT'), 'database' => App::env('REDIS_DEFAULT_DB'), ], - 'cache' => [ - 'class' => yii\redis\Cache::class, - 'redis' => [ - 'hostname' => App::env('REDIS_HOSTNAME'), - 'port' => App::env('REDIS_PORT'), - 'database' => App::env('REDIS_CRAFT_DB'), - ], - ], ], ]; diff --git a/cms/config/general.php b/cms/config/general.php index 5913bd3..1fa316c 100644 --- a/cms/config/general.php +++ b/cms/config/general.php @@ -23,7 +23,6 @@ 'backupOnUpdate' => (bool)App::env('BACKUP_ON_UPDATE'), 'devMode' => (bool)App::env('DEV_MODE'), 'enableTemplateCaching' => (bool)App::env('ENABLE_TEMPLATE_CACHING'), - 'isSystemLive' => (bool)App::env('IS_SYSTEM_LIVE'), 'resourceBasePath' => App::env('WEB_ROOT_PATH').'/cpresources', 'runQueueAutomatically' => (bool)App::env('RUN_QUEUE_AUTOMATICALLY'), 'securityKey' => App::env('SECURITY_KEY'), diff --git a/cms/example.env b/cms/example.env index 546c7ac..17aa977 100644 --- a/cms/example.env +++ b/cms/example.env @@ -5,7 +5,6 @@ BACKUP_ON_UPDATE=0 DEV_MODE=1 ENABLE_TEMPLATE_CACHING=0 ENVIRONMENT=dev -IS_SYSTEM_LIVE=1 RUN_QUEUE_AUTOMATICALLY=1 SECURITY_KEY=EOdiVBONceb8zFGJP7InMui2pMkvNACz diff --git a/composer.json b/composer.json index c7a427d..75e9483 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "craftcms/craft", "description": "nystudio107 Craft 3.4 CMS scaffolding project", - "version": "2.3.3", + "version": "2.3.4", "keywords": [ "craft", "cms",