Welcome Guest, Not a member yet? Register   Sign In
Upgrade to 4.3.1 help
#1

Hi, I upgraded manually CI to 4.1.3:
1. I copied system directory
2. I launched composer update

Spark doesn't work anymore:
Quote:[Error]

Call to a member function getStatusCode() on null

at ROOTPATH\spark:100
In breaking changes paragraph is written

Quote:If you do not update this file, Spark commands will not work at all after running
composer update

The upgrade procedure, for example, is as follows:[/php]

If you do not update this file, Spark commands will not work at all after running composer update.

The upgrade procedure, for example, is as follows:

> composer update
> cp vendor/codeigniter4/framework/spark .

But such file doesn't exists.
Reply
#2

(This post was last modified: 01-20-2023, 04:55 AM by kenjis.)

It is the example when you installed CI via Composer.
When you installed CI manually, download a new copy of the framework, and then copy the files.
https://github.com/CodeIgniter4/framewor...tag/v4.3.1
Reply
#3

(This post was last modified: 01-21-2023, 12:18 AM by chaos.)

(01-20-2023, 04:55 AM)kenjis Wrote: It is the example when you installed CI via Composer.
When you installed CI manually, download a new copy of the framework, and then copy the files.
https://github.com/CodeIgniter4/framewor...tag/v4.3.1

Hi, I confirm I followed the manual procedure, i have copied the system directory. I confirm spark gives that error,


Quote:Call to a member function getStatusCode() on null

at ROOTPATH\spark:100

I have another question: so if I update the CI new release manually, i have to avoid running composer update? If yes, how can i update the vendor libraries?

Thanks
Reply
#4

You need to copy the spark file in the new framework to your project.

You don't need to run `composer update` when you upgrade the framework,
because the framework does not exists in your vendor directory.

> how can i update the vendor libraries?

When you want to update vendor libraries, run `composer update`.
Reply
#5

Thank you, spark problem solved.

Now i have the following problem: when i apply the manual changes for Kint:

Quote:app/Config/Kint.php has been updated for Kint 5.0.You need to replace:Kint\Renderer\Rendererwith Kint\Renderer\AbstractRendererRenderer::SORT_FULLwith AbstractRenderer::SORT_FULL
I receive this error when running spark:


Quote:Class 'Kint\Renderer\AbstractRenderer' not found

at SYSTEMPATH\Config\Factories.php:129

Backtrace:
  1    SYSTEMPATH\Common.php:206
      CodeIgniter\Config\Factories::__callStatic('config', [])

  2    SYSTEMPATH\CodeIgniter.php:272
      config('Config\\Kint')

  3    SYSTEMPATH\CodeIgniter.php:237
      CodeIgniter\CodeIgniter()->configureKint()

  4    SYSTEMPATH\CodeIgniter.php:199
      CodeIgniter\CodeIgniter()->initializeKint()

  5    ROOTPATH\spark:83
      CodeIgniter\CodeIgniter()->initialize()
Reply
#6

Remove the "kint-php/kint" line in your composer.json, and run `composer update`.

Code:
    {
        ...
        "require": {
            ...
            "kint-php/kint": "^4.2",  <-- Remove this line
            ...
        },
        ...
    }
Reply
#7

Hello, if i remove that line, make composer update, then i have the following error. 
Note: If I do not apply the manual changes to Kint Configuration suggested in the upgrade procedure everything works fine.
I wonder if the correct solution could be to change the configure.json to require kint 5.0...


Quote:C:\laragon\www\chronicles_dev>php spark

Warning: Uncaught ErrorException: require_once(C:\laragon\www\chronicles_dev\system\ThirdParty/Kint/init.php): failed to open stream: No such file or directory in C:\laragon\www\chronicles_dev\system\CodeIgniter.php:265
Stack trace:
#0 C:\laragon\www\chronicles_dev\system\CodeIgniter.php(265): CodeIgniter\Debug\Exceptions->errorHandler(2, 'require_once(C:...', 'C:\\laragon\\www\\...', 265, Array)
#1 C:\laragon\www\chronicles_dev\system\CodeIgniter.php(265): require_once()
#2 C:\laragon\www\chronicles_dev\system\CodeIgniter.php(236): CodeIgniter\CodeIgniter->autoloadKint()
#3 C:\laragon\www\chronicles_dev\system\CodeIgniter.php(199): CodeIgniter\CodeIgniter->initializeKint()
#4 C:\laragon\www\chronicles_dev\spark(83): CodeIgniter\CodeIgniter->initialize()
#5 {main}
  thrown in C:\laragon\www\chronicles_dev\system\CodeIgniter.php on line 265

Fatal error: CodeIgniter\CodeIgniter::autoloadKint(): Failed opening required 'C:\laragon\www\chronicles_dev\system\ThirdParty/Kint/init.php' (include_path='.;C:/laragon/etc/php/pear') in C:\laragon\www\chronicles_dev\system\CodeIgniter.php on line 265


[ErrorException]

CodeIgniter\CodeIgniter::autoloadKint(): Failed opening required 'C:\laragon\www\chronicles_dev\system\ThirdParty/Kint/init.php' (include_path='.;C:/laragon/etc/php/pear')

at SYSTEMPATH\CodeIgniter.php:265

Backtrace:
  1    [internal function]

      CodeIgniter\Debug\Exceptions()->shutdownHandler()
Reply
#8

You should have "C:\laragon\www\chronicles_dev\system\ThirdParty/Kint/init.php".
Why don't you have it?

See https://github.com/codeigniter4/framewor...t/init.php
Reply
#9

(This post was last modified: 01-28-2023, 08:08 AM by ikesela.)

i have same problem, but solve by install kint:

composer require kint-php/kint


* kint-php will be remove if using composer update --no-dev
* in my case, im using appstarter ( kint install under required-dev)
Reply
#10

(01-28-2023, 02:57 AM)kenjis Wrote: You should have "C:\laragon\www\chronicles_dev\system\ThirdParty/Kint/init.php".
Why don't you have it?

See https://github.com/codeigniter4/framewor...t/init.php

I didn't have it cause you told me to remove the line in configure.json 

Quote:"kint-php/kint": "^4.2",  <-- Remove this line

and when i ran composer update it removed kint installation...

So to resume: If I don't apply the manual configuration for Kint 5.0 that is suggested, everything is working fine. If i apply it, somehow i think Kint 5.0 should be installed by composer.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB