Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Latest 4.4.0 #7859

Closed
ALTITUDE-DEV-FR opened this issue Aug 25, 2023 · 11 comments
Closed

Bug: Latest 4.4.0 #7859

ALTITUDE-DEV-FR opened this issue Aug 25, 2023 · 11 comments

Comments

@ALTITUDE-DEV-FR
Copy link
Contributor

PHP Version

8.2

CodeIgniter4 Version

4.4.0

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

No response

What happened?

After latest update 4.4.0

Fatal error: Uncaught Error: Undefined constant "CodeIgniter\ENVIRONMENT" in C:\wamp64\www\vendor\codeigniter4\framework\system\CodeIgniter.php on line 581

Steps to Reproduce

Just composer Update (3.7.0 > 4.4.0)

Expected Output

Fatal error: Uncaught Error: Undefined constant "CodeIgniter\ENVIRONMENT" in C:\wamp64\www\vendor\codeigniter4\framework\system\CodeIgniter.php on line 581

Anything else?

No response

@ALTITUDE-DEV-FR ALTITUDE-DEV-FR added the bug Verified issues on the current code behavior or pull requests that will fix them label Aug 25, 2023
@samsonasik
Copy link
Member

samsonasik commented Aug 25, 2023

You may need to replace spark file

if (! defined('ENVIRONMENT')) {

and various configs/files see changelog

https://github.com/codeigniter4/CodeIgniter4/blob/develop/user_guide_src/source/changelogs/v4.4.0.rst

@ddevsr
Copy link
Collaborator

ddevsr commented Aug 25, 2023

@kenjis @samsonasik

I have another bug,

Uncaught Error: Class "Kint\Renderer\AbstractRenderer" not found in D:\Project\laragon\www\askred\app\Config\Kint.php on line 46

image

When install kint-php/kint to require-dev, appear other message

Uncaught Error: Call to undefined method Config\DocTypes::__set_state() in D:\Project\laragon\www\askred\writable\cache\FactoriesCache_config on line 681

image

@samsonasik
Copy link
Member

I can't reproduce with fresh install appstarter, you may need to copy various files:

  • env
  • public/index.php
  • spark
  • also sync app/Config/*

@samsonasik
Copy link
Member

@samsonasik
Copy link
Member

upgrade guide: https://codeigniter4.github.io/userguide/installation/upgrade_440.html

changelog: https://codeigniter4.github.io/userguide/changelogs/v4.4.0.html

@kenjis kenjis removed the bug Verified issues on the current code behavior or pull requests that will fix them label Aug 25, 2023
@kenjis
Copy link
Member

kenjis commented Aug 25, 2023

@ddevsr If you use Config Caching, read:
https://codeigniter4.github.io/CodeIgniter4/concepts/factories.html#prerequisite

@ALTITUDE-DEV-FR
Copy link
Contributor Author

All are working now in my side, Good Job @kenjis best Update <3 next support 8.3 =)

@ddevsr
Copy link
Collaborator

ddevsr commented Aug 25, 2023

@samsonasik @kenjis I cleared cache files, and refresh page its OK. and next refresh appear error.

I added BaseConfig in app\Config\DocTypes really done to me

--- a/app/Config/DocTypes.php
+++ b/app/Config/DocTypes.php
@@ -2,7 +2,9 @@

 namespace Config;

-class DocTypes
+use CodeIgniter\Config\BaseConfig;
+
+class DocTypes extends BaseConfig

@paulbalandan
Copy link
Member

I think this is because config(DocTypes::class) is called even though it is not a config.

@ddevsr
Copy link
Collaborator

ddevsr commented Aug 25, 2023

Yes, i called html helper in autoload helper BaseController

@kenjis
Copy link
Member

kenjis commented Aug 25, 2023

Ah, yes, there are two config(DocTypes::class) in the src/.

Extending BaseConfig and using config(DocTypes::class) make very slow to load.
If it is possible, I would like to use new DocTypes().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants