Welcome Guest, Not a member yet? Register   Sign In
Upgrade instructions 4.1.4 to latest 4.2.6
#1

Hello,

The upgrade instructions are not clear as to how to go from 4.1.4, etc to the latest version which is 4.2.6. I used composer upgrade to get to version 4.1.4, when I run composer upgrade again, there is nothing to update.

I downloaded 4.2.6 but the upgrade instructions just states to "Download a new copy of the framework, and then replace the system folder.".

So, I only need to add the new system folder to my existing app?
Reply
#2

You need to read the following to get breaking changes for you:
https://codeigniter4.github.io/CodeIgnit...e_415.html
https://codeigniter4.github.io/CodeIgnit...e_416.html
https://codeigniter4.github.io/CodeIgnit...e_417.html
https://codeigniter4.github.io/CodeIgnit...e_418.html
https://codeigniter4.github.io/CodeIgnit...e_420.html
https://codeigniter4.github.io/CodeIgnit...e_421.html
https://codeigniter4.github.io/CodeIgnit...e_423.html
https://codeigniter4.github.io/CodeIgnit...e_425.html
https://codeigniter4.github.io/CodeIgnit...e_426.html

But,
> I used composer upgrade to get to version 4.1.4, when I run composer upgrade again, there is nothing to update.

If you really got v4.1.4 by `composer update` command, your situation is weird.
Because there is v4.1.9, so at least your CI should be upgraded to v4.1.9.
(v4.2.0 requires PHP 7.4 or later.)
Reply
#3

(09-27-2022, 04:26 PM)kenjis Wrote: You need to read the following to get breaking changes for you:
https://codeigniter4.github.io/CodeIgnit...e_415.html
https://codeigniter4.github.io/CodeIgnit...e_416.html
https://codeigniter4.github.io/CodeIgnit...e_417.html
https://codeigniter4.github.io/CodeIgnit...e_418.html
https://codeigniter4.github.io/CodeIgnit...e_420.html
https://codeigniter4.github.io/CodeIgnit...e_421.html
https://codeigniter4.github.io/CodeIgnit...e_423.html
https://codeigniter4.github.io/CodeIgnit...e_425.html
https://codeigniter4.github.io/CodeIgnit...e_426.html

But,
> I used composer upgrade to get to version 4.1.4, when I run composer upgrade again, there is nothing to update.

If you really got v4.1.4 by `composer update` command, your situation is weird.
Because there is v4.1.9, so at least your CI should be upgraded to v4.1.9.
(v4.2.0 requires PHP 7.4 or later.)

See images below of version and command prompt. I have a backup of my project, I think I may just fresh install 4.2.6 and then manually add my files and update configs. Then install shield.

[Image: composer_capture.PNG]

[Image: ci_info.PNG]
Reply
#4

Can you show the output of `composer show`?
Maybe you installed CI4.1.4 from Zip file.
Reply
#5

My guess would be the composer.lock file, `composer update --lock`
Reply
#6

(09-28-2022, 01:21 AM)kenjis Wrote: Can you show the output of `composer show`?
Maybe you installed CI4.1.4 from Zip file.

Output below:

cboden/ratchet v0.4.4 PHP WebSocket library
codeigniter/coding-standard v1.5.0 Official Coding Standards for CodeIgniter based on PHP CS F...
codeigniter4/settings v2.1.0 Settings library for CodeIgniter 4
codeigniter4/shield dev-develop 3cf4f0b Authentication and Authorization for CodeIgniter 4
composer/pcre 3.0.0 PCRE wrapping library that offers type-safe preg_* replacem...
composer/semver 3.3.2 Semver library that offers utilities, version constraint pa...
composer/xdebug-handler 3.0.3 Restarts a process without Xdebug.
doctrine/annotations 1.13.3 Docblock Annotations Parser
doctrine/instantiator 1.4.1 A small, lightweight utility to instantiate objects in PHP ...
doctrine/lexer 1.2.3 PHP Doctrine Lexer parser library that can be used in Top-D...
evenement/evenement v3.0.1 Événement is a very simple event dispatching library for PHP
fakerphp/faker v1.20.0 Faker is a PHP library that generates fake data for you.
friendsofphp/php-cs-fixer v3.11.0 A tool to automatically fix PHP code style
guzzlehttp/psr7 2.4.1 PSR-7 message implementation that also provides common util...
kint-php/kint 3.3 Kint - debugging tool for PHP developers
laminas/laminas-escaper 2.10.0 Securely and safely escape HTML, HTML attributes, JavaScrip...
mikey179/vfsstream v1.6.11 Virtual file system to mock the real file system in unit te...
myclabs/deep-copy 1.11.0 Create deep copies (clones) of your objects
nexusphp/cs-config v3.6.0 A factory for custom rulesets for PHP CS Fixer.
nikic/php-parser v4.15.1 A PHP parser written in PHP
phar-io/manifest 2.0.3 Component for reading phar.io manifest information from a P...
phar-io/version 3.2.1 Library for handling version information and constraints
phpunit/php-code-coverage 9.2.17 Library that provides collection, processing, and rendering...
phpunit/php-file-iterator 3.0.6 FilterIterator implementation that filters files based on a...
phpunit/php-invoker 3.1.1 Invoke callables with a timeout
phpunit/php-text-template 2.0.4 Simple template engine.
phpunit/php-timer 5.0.3 Utility class for timing
phpunit/phpunit 9.5.25 The PHP Unit Testing framework.
predis/predis v1.1.10 Flexible and feature-complete Redis client for PHP and HHVM
psr/cache 3.0.0 Common interface for caching libraries
psr/container 2.0.2 Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher 1.0.0 Standard interfaces for event handling.
psr/http-factory 1.0.1 Common interfaces for PSR-7 HTTP message factories
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.1.4 Common interface for logging libraries
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
ratchet/rfc6455 v0.3.1 RFC6455 WebSocket protocol handler
react/cache v1.1.1 Async, Promise-based cache interface for ReactPHP
react/dns v1.10.0 Async DNS resolver for ReactPHP
react/event-loop v1.3.0 ReactPHP's core reactor event loop that libraries can use f...
react/promise v2.9.0 A lightweight implementation of CommonJS Promises/A for PHP
react/promise-timer v1.9.0 A trivial implementation of timeouts for Promises, built on...
react/socket v1.12.0 Async, streaming plaintext TCP/IP and secure TLS socket ser...
react/stream v1.2.0 Event-driven readable and writable streams for non-blocking...
sebastian/cli-parser 1.0.1 Library for parsing CLI options
sebastian/code-unit 1.0.8 Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3 Looks up which function or method a line of code belongs to
sebastian/comparator 4.0.8 Provides the functionality to compare PHP values for equality
sebastian/complexity 2.0.2 Library for calculating the complexity of PHP code units
sebastian/diff 4.0.4 Diff implementation
sebastian/environment 5.1.4 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 4.0.5 Provides the functionality to export PHP variables for visu...
sebastian/global-state 5.0.5 Snapshotting of global state
sebastian/lines-of-code 1.0.3 Library for counting the lines of code in PHP source code
sebastian/object-enumerator 4.0.4 Traverses array structures and object graphs to enumerate a...
sebastian/object-reflector 2.0.4 Allows reflection of object attributes, including inherited...
sebastian/recursion-context 4.0.4 Provides functionality to recursively process PHP variables
sebastian/resource-operations 3.0.3 Provides a list of PHP built-in functions that operate on r...
sebastian/type 3.2.0 Collection of value objects that represent the types of the...
sebastian/version 3.0.2 Library that helps with managing the version number of Git-...
symfony/console v6.0.12 Eases the creation of beautiful and testable command line i...
symfony/deprecation-contracts v3.0.2 A generic function and convention to trigger deprecation no...
symfony/event-dispatcher v6.0.9 Provides tools that allow your application components to co...
symfony/event-dispatcher-contracts v3.0.2 Generic abstractions related to dispatching event
symfony/filesystem v6.0.12 Provides basic utilities for the filesystem
symfony/finder v6.0.11 Finds files and directories via an intuitive fluent interface
symfony/http-foundation v6.0.12 Defines an object-oriented layer for the HTTP specification
symfony/options-resolver v6.0.3 Provides an improved replacement for the array_replace PHP ...
symfony/polyfill-ctype v1.26.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme v1.26.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-normalizer v1.26.0 Symfony polyfill for intl's Normalizer class and related fu...
symfony/polyfill-mbstring v1.26.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php80 v1.26.0 Symfony polyfill backporting some PHP 8.0+ features to lowe...
symfony/polyfill-php81 v1.26.0 Symfony polyfill backporting some PHP 8.1+ features to lowe...
symfony/process v6.0.11 Executes commands in sub-processes
symfony/routing v6.0.11 Maps an HTTP request to a set of configuration variables
symfony/service-contracts v3.0.2 Generic abstractions related to writing services
symfony/stopwatch v6.0.5 Provides a way to profile code
symfony/string v6.0.12 Provides an object-oriented API to strings and deals with b...
theseer/tokenizer 1.2.1 A small library for converting tokenized PHP source code in...
Reply
#7

I downloaded 4.2.6 and am installing under another local domain, I will just start new and then use composer for Shield. I am trying to find the correct .htaccess for the install. I am receiving a 403 error on the new install.

Receiving "Forbidden You don't have permission to access this resource.".

htaccess below.

<IfModule mod_rewrite.c>
Options -Indexes
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Reply
#8

You don't have codeigniter4/framework, so you did not install CI4 via Composer.
Reply
#9

(09-28-2022, 02:37 PM)kenjis Wrote: You don't have codeigniter4/framework, so you did not install CI4 via Composer.

OK, think I am set now. Now trying to configure Apache, mysite.local is throwing 403.

C:\xampp\htdocs\mysite\project-root>composer update
Loading composer repositories with package information

Token stored successfully.

Updating dependencies
Lock file operations: 1 install, 0 updates, 1 removal
- Removing codeigniter4/framework (v4.2.6)
- Locking codeigniter4/codeigniter4 (dev-develop 979baa1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 1 removal
- Downloading codeigniter4/codeigniter4 (dev-develop 979baa1)
- Removing codeigniter4/framework (v4.2.6)
- Installing codeigniter4/codeigniter4 (dev-develop 979baa1): Extracting archive
8 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
27 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Reply
#10

See https://jaironlanda.com/blog/CodeIgniter...windows-10
Reply




Theme © iAndrew 2016 - Forum software by © MyBB