Recommended way how to upgrade to 3.0?
- MKI-Miro
- Member | 278
Hi
Currently I have this version of Nette:
System info
PHP 7.2.13
Tracy 2.5.2
Server Apache
Composer Packages (20 + 1 dev)
dg/adminer-custom v1.18.0
latte/latte v2.4.8
nette/application v2.4.13
nette/bootstrap v2.4.6
nette/caching v2.5.8
nette/component-model v2.4.0
nette/database v2.4.8
nette/di v2.4.15
nette/finder v2.4.2
nette/forms v2.4.9
nette/http v2.4.11
nette/mail v2.4.6
nette/neon v2.4.3
nette/php-generator v2.6.4
nette/reflection v2.4.2
nette/robot-loader v3.1.1
nette/safe-stream v2.3.3
nette/security v2.4.4
nette/utils v2.5.3
tracy/tracy v2.5.8
Dev Packages
nette/tester v2.0.2
When I run composer update i get this:
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
What do I need to do to upgrade to version 3?
Thanks
- dkorpar
- Member | 136
you need to modify composer.json file and modify version of dependencies
there. However there are a lot of breaking changes in nette 3.0 so be prepared
that nothing will work and a lot of code will have to be updated.
this tools can also help you:
https://github.com/…code-checker
https://github.com/…e/type-fixer
- MKI-Miro
- Member | 278
thank you
I used code checker and it told me that i use spaces insted of tabs and that I have some whitespaces
I am trying to use type-fixer but I am not able to run that file
type-fixer>typefixer
'typefixer' is not recognized as an internal or external command,
operable program or batch file.
file name does not have any extension, so what type of file is it and how can I run it?
- MKI-Miro
- Member | 278
I moved forward and maybe it will help someone.
What I did:
- I download package from Download page
- Removed old vendor folder in my project and copy new vendor folder from downloaded package
- Updated UserManager and ErrorPresenter from "Sandbox project ":https://github.com/nette/sandbox
- Application seems to be running now but…
- I updated Boostrap.php in App Folder and index.php in www folder and now I get this error
Fatal error: Uncaught Error: Class 'App\Bootstrap' not found in /web/www/index.php:7 Stack trace: #0 {main} thrown in web/www/index.php on line 7
I cleared cache but no error is still present.
Did I forget something?
- MKI-Miro
- Member | 278
I found the problem, so next steps are:
- Download package seems to be old so I created empty project using Composer
and there are 3 differences
- Bootstrap.php changed to Booting.php in App folder
- index.php in www folder
- autoload_rel.php in vendore folder
- Renamed config.json to common.json
Application is now working
Last edited by MKI-Miro (2019-05-05 08:29)