![]() |
Update from 4.6.0 to 4.6.1 failed - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Update from 4.6.0 to 4.6.1 failed (/showthread.php?tid=92887) |
Update from 4.6.0 to 4.6.1 failed - Vespa - 05-11-2025 I got in trouble with latest update...it's my fault for sure but each update it's a pain. I run composer update to update new files...then I downloaded the latest package and manually replaced the following files in the project space: Code: app/Config/Autoload.php Now, when I try to run spark serve file I got the follwoing error: Code: PHP Warning: require(D:\_GAVS_nuovo_sito\project-root\app\Config/../../system/Boot.php): Failed to open stream: No such file or directory in D:\_GAVS_nuovo_sito\project-root\spark on line 85 Honestly I have no idea what I did wrong...any hint or help? Thanks a lot RE: Update from 4.6.0 to 4.6.1 failed - captain-sensible - 05-11-2025 the new Paths.php in app/Config/ looks like this for 4.6.1 ( at least on mine it does ) 1) Code: class Paths but on another post i think there was consensus it should be : 2) Code: class Paths Code: /srv/http/CI4-CMS/vendor/codeigniter4/framework/system so edit /app/Config/Paths.php to code 2) above and see RE: Update from 4.6.0 to 4.6.1 failed - InsiteFX - 05-11-2025 This is one reason that I always make a backup of the whole project before modifying them. RE: Update from 4.6.0 to 4.6.1 failed - captain-sensible - 05-12-2025 too true, git is one way RE: Update from 4.6.0 to 4.6.1 failed - FlavioSuar - 05-12-2025 Hi, Yes, git is your friend! :-) You mixed up the Composer and the manual upgrade... When you download CI4, the system folder is a the same level as the app folder. And the file /app/Config/Paths.php know it. When you use the Composer appstart, the system folder is inside the vendor folder. And the file /app/Config/Paths.php also know it. What I do to upgrade is to use a composer update for the framework. Then I create a new project by doing a composer install appstarter and compare the project files and copy/merge the files that are different.. Hope this can help you. RE: Update from 4.6.0 to 4.6.1 failed - captain-sensible - 05-12-2025 @FlavioSuar quote " You mixed up the Composer and the manual upgrade..." i started with app starter , and always have updated with composer. Never any manual install . yet my latest Paths.php at Code: vendor/codeigniter4/framework/app looks like So my empirical observation and your comment its "confusing " from getting a path for a manual download but using composer, one might say its a bit of a dogs breakfast RE: Update from 4.6.0 to 4.6.1 failed - paulbalandan - 05-12-2025 @FlavioSuar 's suggestion is the best way to go, to be honest @captain-sensible if you are looking at the contents of Paths.php inside vendor/codeigniter4/framework/app, it will always be the value "__DIR__ . '/../../system'" for the system directory. __DIR__ there means "vendor/codeigniter4/framework/app/Config" so doing a realpath() call on that will give "vendor/codeigniter4/framework/system" Now, when you just blindly copy that value to your Paths.php which is located at "./app/Config", __DIR__ would get that directory as its value, so realpath() on that copy pasted value is just "./system" which does not exists as the system folder is inside vendor and not on the root level. RE: Update from 4.6.0 to 4.6.1 failed - FlavioSuar - 05-13-2025 @FlavioSuar quote " You mixed up the Composer and the manual upgrade..." @captain-sensible sorry the confusion. This answer was to @Vespa... As he said "I run composer update to update new files...then I downloaded the latest package and manually replaced the following files in the project space: [...] app/Config/Paths.php" The system folder defined at app/Config/Paths.php is different if you do a composer install or manually download the zip file. In the downloaded zip file, app/Config/Paths.php points to a system folder at the same level of app, and there is no vendor folder. In the composer install, the same app/Config/Paths.php points to a system folder inside the vendor folder. Then if you copy the app/Config/Paths.php from the zip file over the composer install, you'll loose the correct path to system folder. RE: Update from 4.6.0 to 4.6.1 failed - Vespa - 05-18-2025 Thanks a lot to you all for kind feedback and hints. It was an issue due to mixing Composer and manual upgrade ... You helped me a lot to fix that |