snathan
(snathan)
November 21, 2022, 1:01am
1
I noticed that in 2.0.46 / 2.047 release says the following in combination with installing advanced template:
Templates are now tested on PHP 8.1, minimum required version is raised to 7.4.
However composer still shows only “php”: “>=5.6.0”
Updated to Bootstrap5
Again, composer defaults to “yiisoft/yii2-bootstrap4”: “~2.0.0”
Swiftmailer replaced with Symfonymailer.
Composer has “yiisoft/yii2-swiftmailer”: “~2.0.0 || ~2.1.0”
Also found swift in environments/*/common/config/main-local.php
Same consideration for Updated to Codeception 5.
Questions:
if using advanced template, should I be updating the PHP version?
Should I manually update the rest as well. Is this just for safety that the recommended versions are older?
Any notes on updating to Bootstrap5 (from 4)?
Thanks everyone!
samdark
(Alexander Makarov)
November 21, 2022, 6:59am
2
I think you’re looking somewhere else:
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "https://www.yiiframework.com/forum/",
"wiki": "https://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=7.4.0",
"yiisoft/yii2": "~2.0.45",
"yiisoft/yii2-bootstrap5": "~2.0.2",
"yiisoft/yii2-symfonymailer": "~2.0.3"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.1.0",
"yiisoft/yii2-gii": "~2.2.0",
"yiisoft/yii2-faker": "~2.0.0",
"phpunit/phpunit": "~9.5.0",
"codeception/codeception": "^5.0.0 || ^4.0",
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "https://www.yiiframework.com/forum/",
"wiki": "https://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=7.4.0",
"yiisoft/yii2": "~2.0.45",
"yiisoft/yii2-bootstrap5": "~2.0.2",
"yiisoft/yii2-symfonymailer": "~2.0.3"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.1.0",
"yiisoft/yii2-gii": "~2.2.0",
"yiisoft/yii2-faker": "~2.0.0",
"phpunit/phpunit": "~9.5.0",
"codeception/codeception": "^5.0.0 || ^4.0",
"codeception/lib-innerbrowser": "^3.0 || ^1.1",
"codeception/module-asserts": "^3.0 || ^1.1",
"forum": "https://www.yiiframework.com/forum/",
"wiki": "https://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=7.4.0",
"yiisoft/yii2": "~2.0.45",
"yiisoft/yii2-bootstrap5": "~2.0.2",
"yiisoft/yii2-symfonymailer": "~2.0.3"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.1.0",
"yiisoft/yii2-gii": "~2.2.0",
"yiisoft/yii2-faker": "~2.0.0",
"phpunit/phpunit": "~9.5.0",
"codeception/codeception": "^5.0.0 || ^4.0",
"codeception/lib-innerbrowser": "^3.0 || ^1.1",
"codeception/module-asserts": "^3.0 || ^1.1",
"codeception/module-yii2": "^1.1",
if using advanced template, should I be updating the PHP version?
Updating PHP version is a good idea regardless.
Should I manually update the rest as well. Is this just for safety that the recommended versions are older?
Updating is a good idea.
Any notes on updating to Bootstrap5 (from 4)?
snathan
(snathan)
November 21, 2022, 12:26pm
3
Thanks @samdark
I realized where the issue is.
I ran the below on php 7.3
composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application`
Did not notice the message on top saying
Cannot use yiisoft/yii2-app-advanced's latest version 2.0.47 as it requires php >=7.4.0 which is not satisfied by your platform.
Installing yiisoft/yii2-app-advanced (2.0.45)
About the upgrade from Bootstrap4 to 5, I was asking about the changes to be made to Yii application. For e.g. the changes such as
use yii\bootstrap4\Nav;
use yii\bootstrap4\NavBar;
use yii\bootstrap4\Html;
\yii\bootstrap4\ToggleButtonGroup
...
etc.
I am sure I will miss something if I update by search and replace only.
samdark
(Alexander Makarov)
November 21, 2022, 2:38pm
4
There’s no upgrade guide but we’ve tried to make it as compatible as possible.
1 Like