Welcome Guest, Not a member yet? Register   Sign In
Config\Paths different on appStarter

Hi guys,

Whilst going through the upgrade from 4.2.1 to 4.2.2, I noted that the upgrade guide mentioned app/Config/Paths.php was changed.

Without much thought I copied that file over from vendor/codeigniter4/framework/app.

When I ran my app, it broke. I rechecked the file and noticed in appStarter github, line 28 was

public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';

compared to the vendor framework version which was:

PHP Code:
public $systemDirectory __DIR__ '/../../system'

Is this the only file that is different in the vendor directory for appstarter? Or is there potentially others that differ and can catch me out in future?

(This post was last modified: 08-06-2022, 06:04 AM by kenjis.)

See https://github.com/codeigniter4/appstart...c9f8fe376b
It is the change in app/Config/Paths.php

This might be tricky, but codeigniter4/framework/app/* is not the same as appstarter/app/*.

(This post was last modified: 08-06-2022, 05:48 PM by kenjis.)

Only the Paths.php is different.

$ diff -urN framework-4.2.3/app appstarter-4.2.3/app
diff -urN framework-4.2.3/app/Config/Paths.php appstarter-4.2.3/app/Config/Paths.php
--- framework-4.2.3/app/Config/Paths.php 2022-08-07 09:10:38.000000000 +0900
+++ appstarter-4.2.3/app/Config/Paths.php 2022-08-05 23:57:24.000000000 +0900
@@ -25,7 +25,7 @@
      * @var string
-    public $systemDirectory = __DIR__ . '/../../system';
+    public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';

      * ---------------------------------------------------------------

(08-06-2022, 05:55 AM)kenjis Wrote: This might be tricky, but codeigniter4/framework/app/* is not the same as appstarter/app/*.

I'd like to know how to handle the upgrade of the config files when using appStarter.

If I do a composer update, only files in vendor/codeigniter4/framework/app/Config are updated. appstarter/app/Config remains unchanged.

So I then merge changed files from codeigniter4/framework/app/Config to appstarter/app/Config. Please advise what I should be doing if this is the wrong way.

If it is correct, then my problem as described in the O.P. is that Paths.php from the vendor folder is not compatible with the appstarter one  - systemDirectory should not be merged. This is not documented anywhere, so I just wanted clarification if this is the only one that needed careful attention.

I hope my question makes sense.

I've checked. Yes, only $systemDirectory should not be merged.

To begin with, app/Config/* has configuration files for your app.
So you have responsible to the values.
I mean, you should know what you change. Because these are your app config.

If you blindly copies files from  vendor/codeigniter4/framework/app/Config/*,
for example, if the one CI4's default configuration changes,
Your application may stop working because of the changes.
It is a rare occurrence, though.

Thanks for confirming.

I do the merge taking note of what's in the upgrade guide.

In this case, I saw the system directory has changed, but thought nothing of it, assuming it was some cleanup.

It's a mistake on my end, and I will need to document being careful with Paths.php in the appstarter.

Theme © iAndrew 2016 - Forum software by © MyBB