Yii2 Upgrade version step by step - yii2

Im trying upgrade from version Yii 2.0.13 to the last version (2.0.23), but step by step, now need upgrade to 2.0.14 and next to 2.0.15 etc..
I follow the instructions in documentation and use this command, but the app upgrade automatically to the last version 2.0.23
composer require "yiisoft/yii2:~2.0.14" --update-with-dependencies

you have "~" before "2.0.14" which tells composer to use a newer version up to but not including 3.0
do
composer require "yiisoft/yii2:2.0.14" --update-with-dependencies
instead
source: https://getcomposer.org/doc/articles/versions.md

You don't need to upgrade step by step, you can upgrade Yii directly from 2.0.13 to 2.0.23. You need to follow all upgrade instructions for all versions between 2.0.13 and 2.0.23, but no need to install all versions between - you can install 2.0.23 directly and make all necessary upgrade changes in one step. This usually gives you less work and possible problems.

Related

PHP Language level missing latest (version 7.3 is the highest)

I'm trying to setup Xdebug and while doing that I'm trying to ensure that all PHP-versions and setup of that is exactly right.
I've matched the PHP-version on the server (7.4), by installing and linking the right PHP-version using Brew (I'm on a Mac).
So in a terminal, if I write php --version I get: version: 7.4.14:
I've set the CLI-interpreter in PhpStorm to point to that same PHP-executable:
But in spite of this, I can only set PHP version 7.3 to be the highest language level:
Solution attempts:
All these things have been found in random cracks and articles. None of them worked.
Invalidated Cached and restarted PhpStorm ( File >> Invalidate Cache and restart ).
Uncheck 'Synchronize IDE Settings with composer.json' in Settings >> Languages & Frameworks >> PHP >> Composer. I had to first insert a path to remove it. But it didn't do anything anyway.
Tried to see if there was any upgrades to the "PHP Latest"-plugin, but I couldn't see any pending updates (v. 0.4).
Overarching question
How do I get the latest version in the PHP Language Level field (to also get better code hints)?
My version was this: 2018.2.3 - Build #PS-182.4323.68 built September 13, 2018
You need to upgrade your IDE. Latest stable version is 2020.3.1.
Partial PHP 7.4 support is present since PhpStorm 2019.2 version.
Proper PHP 7.4 support was added in PhpStorm 2019.3.
Initial/partial PHP 8 support was added in PhpStorm 2020.2.
Current 2020.3 version has more complete PHP 8 support.

Trouble Setting Up Ruby On Rails

I'm attempting to start learning Ruby on Rails via a YouTube tutorial series(https://www.youtube.com/watch?v=GY7Ps8fqGdc), but seem to be struggling getting everything properly installed and set up to do so. The tutorial requires MySQL with MySQL Workbench and Ruby on Rails. I've gotten several errors in the first few steps and taken some steps to try to resolve them, here's basically where I've gotten.
Installed the most recent version of MySQL and Ruby on Rails. I ran the rails new [name] -d mysql command without issue and it ran to completion. I then navigated to the newly created project folder and ran the bundle install at which point I was given the following error:
Gem::InstallError: nio4r requires Ruby version >= 2.3.
An error occurred while installing nio4r (2.5.2), and Bundler cannot continue.
Make sure that `gem install nio4r -v '2.5.2'` succeeds before bundling.
At this point I installed version 2.6 of Ruby on the machine, which did not seem to yield any improvements. Basically I think I'm overcomplicating all of this and want to know if anyone has an easy solution to install all the tools required for working in Ruby on Rails.
Thanks
First thing first, you're following a 5 yr old tutorial on youtube.
I would advise to always follow the newer ones even though some of the old ones might still work and the reason is simple; recent tutorials will probably work off the bat.
Now, judging by the video you shared, I can see that you should've installed RVM at some point. Official RVM website
In your terminal run ruby -v and check if you're actually using the Ruby version you just downloaded. To change the ruby version while using rvm you should use in your terminal:
$ rvm list
To check on your available ruby versions installed and then
$ rvm use <version>
This will switch your ruby version to the one you want. ( If you already installed it of course. ) and then try bundle install again.
Since you were asking for an easier solution I'd say to try following Rails official getting started guide. This guide installs the minimum amount of gems which will help you avoid all these version issues and even though it uses sqlite instead of mysql, later on you will be able to switch to mysql if you want with a better understanding of it.

How to install the new version of Redactor Imperavi?

I have this one
Redactor v10.0.9
I try this
php composer.phar require --prefer-dist vova07/yii2-imperavi-widget": "1.2.2
But i always get the same version v10.0.9
You should upgrade to the latest version of the widget, which at the time of writing is 1.2.10.
Just put "vova07/yii2-imperavi-widget": "^1.2.10" into your composer.json file. Putting the caret symbol before the version ensures that future non-breaking updates will be loaded automatically when you run composer update.

Symfony upgrade from 2.0 to current version

I got a site using Symfony 2.0 and want to upgrade it to last version of Symfony (2.4 from what I see on github).
I have already done one step: upgrade to 2.1. I fixed all issues and now I am ready to upgrade to 2.2 (I am not sure I could go to the current version directly). From my understanding, to do so, I need to retrieve the composer.json on github and add my own dependencies (only one). Is that right?
I tried to do it and it failed. Furthermore Symfony folder under vendor is empty after this attempt. I checked the composer.json for 2.2 and I do not see any symfony specified in it. Did I miss something?
Any help would be more than welcome :o)
ok the problem was only due to the fact that I was getting the composer.json from the wrong github repository. Be sure to use the one from the symfony-standard repository.
You can update from Symfony 2.0 to Symfony 2.4 directly. And yes, for it you need original composer.json file of Symfony 2.4 in symfony/symfony-standard repository and add to it your own dependencies if you have

Creating local environment with sts, maven, mysql and tomcat

HI - I want my local environment in chronology so everything works. Is there any or my approach should work?
I have jdk version 1.6 and my path and java_home are set in environment var
I have STS version 2.3.2, shall I upgrade and how?
I need maven to build my projects. Where and how to install it?
I need a server Tomcat? Anything else which is better to go with it?
I need preferable MySQL, how to install?
What is the chronology of these installs I need to make?
For maven install see:
http://maven.apache.org/download.html#Installation_Instructions
For tomcat install see:
http://tomcat.apache.org/tomcat-7.0-doc/setup.html
For grails install see:
http://www.grails.org/Installation
For mysql install see:
http://www.apachefriends.org/en/xampp-windows.html
Install chronology doesn't matter.