<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[CodeIgniter Forums - All Forums]]></title>
		<link>https://forum.codeigniter.com/</link>
		<description><![CDATA[CodeIgniter Forums - https://forum.codeigniter.com]]></description>
		<pubDate>Thu, 23 Apr 2026 08:36:28 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[CLI Command Routing]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94031</link>
			<pubDate>Mon, 20 Apr 2026 13:33:20 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=905">Chroma</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94031</guid>
			<description><![CDATA[Hi,<br />
<br />
I am currently trying to put some CLI commands into a different folder than the standard app/Controllers folder.<br />
<br />
I want to put it into app/Modules/Mod1/Controller<br />
<br />
The putting the test CLI code into the folder is straightforward and all works fine in the main app/Controllers folder. But in my Modules folder, I cannot find the right set of paths to make it run.<br />
<br />
I have put my Mod1 into the autoload.php as with the other modules. They all run fine.<br />
<br />
So, what do I need to type on the command line to make the test code run.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;</span><span style="color: #0000BB">&#36;psr4&nbsp;</span><span style="color: #007700">=&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;APP_NAMESPACE&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">APPPATH</span><span style="color: #007700">,&nbsp;</span><span style="color: #FF8000">//&nbsp;For&nbsp;custom&nbsp;app&nbsp;namespace<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'Config'&nbsp;</span><span style="color: #0000BB"> &nbsp; </span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">APPPATH&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'Config'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">"Mod1"</span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">APPPATH&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'Modules/Mod1'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">];&nbsp;<br /></span></code></div></div></div><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">namespace&nbsp;</span><span style="color: #0000BB">Mod1</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">Controllers</span><span style="color: #007700">;<br /><br />use&nbsp;</span><span style="color: #0000BB">CodeIgniter</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">Controller</span><span style="color: #007700">;<br /><br />class&nbsp;</span><span style="color: #0000BB">Tester&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">Controller<br /></span><span style="color: #007700">{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">cliMessage</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;to&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'World'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;</span><span style="color: #007700">{</span><span style="color: #0000BB">&#36;to</span><span style="color: #007700">}</span><span style="color: #DD0000">!"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;</span><span style="color: #FF8000">//&nbsp;end&nbsp;of&nbsp;function<br /></span><span style="color: #007700">}&nbsp;</span><span style="color: #FF8000">//&nbsp;end&nbsp;of&nbsp;class&nbsp;<br /></span></code></div></div></div><br />
<br />
To be clear, I am using the new routing system.<br />
<br />
Your help is appreciated.]]></description>
			<content:encoded><![CDATA[Hi,<br />
<br />
I am currently trying to put some CLI commands into a different folder than the standard app/Controllers folder.<br />
<br />
I want to put it into app/Modules/Mod1/Controller<br />
<br />
The putting the test CLI code into the folder is straightforward and all works fine in the main app/Controllers folder. But in my Modules folder, I cannot find the right set of paths to make it run.<br />
<br />
I have put my Mod1 into the autoload.php as with the other modules. They all run fine.<br />
<br />
So, what do I need to type on the command line to make the test code run.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;</span><span style="color: #0000BB">&#36;psr4&nbsp;</span><span style="color: #007700">=&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;APP_NAMESPACE&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">APPPATH</span><span style="color: #007700">,&nbsp;</span><span style="color: #FF8000">//&nbsp;For&nbsp;custom&nbsp;app&nbsp;namespace<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'Config'&nbsp;</span><span style="color: #0000BB"> &nbsp; </span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">APPPATH&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'Config'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">"Mod1"</span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">APPPATH&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'Modules/Mod1'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">];&nbsp;<br /></span></code></div></div></div><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">namespace&nbsp;</span><span style="color: #0000BB">Mod1</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">Controllers</span><span style="color: #007700">;<br /><br />use&nbsp;</span><span style="color: #0000BB">CodeIgniter</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">Controller</span><span style="color: #007700">;<br /><br />class&nbsp;</span><span style="color: #0000BB">Tester&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">Controller<br /></span><span style="color: #007700">{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">cliMessage</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;to&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'World'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;</span><span style="color: #007700">{</span><span style="color: #0000BB">&#36;to</span><span style="color: #007700">}</span><span style="color: #DD0000">!"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;</span><span style="color: #FF8000">//&nbsp;end&nbsp;of&nbsp;function<br /></span><span style="color: #007700">}&nbsp;</span><span style="color: #FF8000">//&nbsp;end&nbsp;of&nbsp;class&nbsp;<br /></span></code></div></div></div><br />
<br />
To be clear, I am using the new routing system.<br />
<br />
Your help is appreciated.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Session problem from a Filter]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94030</link>
			<pubDate>Mon, 20 Apr 2026 12:22:30 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=3149">geirarnesen</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94030</guid>
			<description><![CDATA[I have an integration vs. Wordpress and set some data into the session. I am doing the operation in a Filter in the before function.<br />
My implementation did before use the FileHandler for session which worked as a dream.<br />
When switching to the DatabaseHandler, values being set to the session is not persisted and not available upon the next request.<br />
<br />
Any reason why the set doesn't work from a Filter with the Databasehandler ?<br />
<br />
Rgds Geir]]></description>
			<content:encoded><![CDATA[I have an integration vs. Wordpress and set some data into the session. I am doing the operation in a Filter in the before function.<br />
My implementation did before use the FileHandler for session which worked as a dream.<br />
When switching to the DatabaseHandler, values being set to the session is not persisted and not available upon the next request.<br />
<br />
Any reason why the set doesn't work from a Filter with the Databasehandler ?<br />
<br />
Rgds Geir]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[use url with underscore (_) in config  Fatal error]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94029</link>
			<pubDate>Mon, 20 Apr 2026 11:19:05 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=105570">khao_lek</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94029</guid>
			<description><![CDATA[i'm config baseURL = " <a href="https://intranet_new.mysite.com:8080/report/public/" target="_blank" rel="noopener" class="mycode_url">https://intranet_new.mysite.com:8080/report/public/</a> " on production ( CodeIgniter 4.7.2) .<br />
and my application display : <span style="color: #c10300;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">Fatal error</span>: Uncaught CodeIgniter\Exceptions\ConfigException: Config\App::&#36;baseURL "https://internet_new.mysite.com:8080/report/public/" is not a valid URL ...  #19 D:\www\report\system\Debug\Exceptions.php(117): service() #20 [internal function]: CodeIgniter\Debug\Exceptions-&gt;exceptionHandler() #21 {main} thrown in <span style="font-weight: bold;" class="mycode_b">D:\www\report\system\HTTP\SiteURI.php</span> on line <span style="font-weight: bold;" class="mycode_b">200</span> </span><br />
Thanks for help me. <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>app.baseURL = ' https://intranet_new.mysite.com:8080/report/public/'</code></div></div>]]></description>
			<content:encoded><![CDATA[i'm config baseURL = " <a href="https://intranet_new.mysite.com:8080/report/public/" target="_blank" rel="noopener" class="mycode_url">https://intranet_new.mysite.com:8080/report/public/</a> " on production ( CodeIgniter 4.7.2) .<br />
and my application display : <span style="color: #c10300;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">Fatal error</span>: Uncaught CodeIgniter\Exceptions\ConfigException: Config\App::&#36;baseURL "https://internet_new.mysite.com:8080/report/public/" is not a valid URL ...  #19 D:\www\report\system\Debug\Exceptions.php(117): service() #20 [internal function]: CodeIgniter\Debug\Exceptions-&gt;exceptionHandler() #21 {main} thrown in <span style="font-weight: bold;" class="mycode_b">D:\www\report\system\HTTP\SiteURI.php</span> on line <span style="font-weight: bold;" class="mycode_b">200</span> </span><br />
Thanks for help me. <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>app.baseURL = ' https://intranet_new.mysite.com:8080/report/public/'</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[php-flasher.io adapter for CI4]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94026</link>
			<pubDate>Mon, 20 Apr 2026 06:08:56 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=27176">tassman</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94026</guid>
			<description><![CDATA[Can anyone with bigger mind see and write an adapter for flasher?<br />
<a href="https://github.com/orgs/php-flasher/discussions/205" target="_blank" rel="noopener" class="mycode_url">https://github.com/orgs/php-flasher/discussions/205</a><br />
Its realy good tool.<br />
Thx]]></description>
			<content:encoded><![CDATA[Can anyone with bigger mind see and write an adapter for flasher?<br />
<a href="https://github.com/orgs/php-flasher/discussions/205" target="_blank" rel="noopener" class="mycode_url">https://github.com/orgs/php-flasher/discussions/205</a><br />
Its realy good tool.<br />
Thx]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Over 400k files in the sessions folder]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94024</link>
			<pubDate>Sat, 18 Apr 2026 08:59:36 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=3149">geirarnesen</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94024</guid>
			<description><![CDATA[I discovered that I had over 400k ci_session files in the writeable/session folder.<br />
The oldest files were back from February. I checked the Session.php which had<br />
public int &#36;expiration = 7200;<br />
<br />
What is causing those old session files not to be deleted ?<br />
<br />
Geir]]></description>
			<content:encoded><![CDATA[I discovered that I had over 400k ci_session files in the writeable/session folder.<br />
The oldest files were back from February. I checked the Session.php which had<br />
public int &#36;expiration = 7200;<br />
<br />
What is causing those old session files not to be deleted ?<br />
<br />
Geir]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[BUG: Inconsistent exception handling in testing environment]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94022</link>
			<pubDate>Fri, 17 Apr 2026 22:44:10 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=137513">giladsSG</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94022</guid>
			<description><![CDATA[Today, I have run into an issue with exception handling when testing. I was building an API and wanted to take advantage of the exception handler and use exceptions to drive responses and this worked perfectly in dev or production modes. but when I wrote tests for the api endpoints, these exceptions were not being handled by the handler I registered. On digging deeper, I found out that the error handler registered by ci4 was running instead of the exception handler. To be honest, I would not consider myself an exceptional developer, so I have no telling why the error handler was firing instead of the exception handler. Is this a BUG?(current version 4.7.2)<br />
Here is the exception handler: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">request&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;request</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;response</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;accessDeniedMessage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"You&nbsp;do&nbsp;not&nbsp;have&nbsp;permission&nbsp;to&nbsp;perform&nbsp;this&nbsp;action."</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;message&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMessage</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;isVerbose&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">ENVIRONMENT</span><span style="color: #007700">,&nbsp;[</span><span style="color: #DD0000">'development'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'testing'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">MfaRequiredException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_success</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getData</span><span style="color: #007700">(),&nbsp;</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">ValidationException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">422</span><span style="color: #007700">,&nbsp;[</span><span style="color: #DD0000">'errors'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getErrors</span><span style="color: #007700">()]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">AppException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getCode</span><span style="color: #007700">()&nbsp;?:&nbsp;</span><span style="color: #0000BB">400</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getData</span><span style="color: #007700">());<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">AccessDeniedException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;accessDeniedMessage</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">403</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;else&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;trackingId&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_log_exception</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;data&nbsp;</span><span style="color: #007700">=&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'tracking_id'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;trackingId<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;isVerbose</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;data</span><span style="color: #007700">[</span><span style="color: #DD0000">'trace'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getTrace</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;isVerbose&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">&#36;message&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">'An&nbsp;error&nbsp;occured.&nbsp;Please&nbsp;try&nbsp;again&nbsp;later.'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;500</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;data<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;response</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">exit(</span><span style="color: #0000BB">&#36;exitCode</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[Today, I have run into an issue with exception handling when testing. I was building an API and wanted to take advantage of the exception handler and use exceptions to drive responses and this worked perfectly in dev or production modes. but when I wrote tests for the api endpoints, these exceptions were not being handled by the handler I registered. On digging deeper, I found out that the error handler registered by ci4 was running instead of the exception handler. To be honest, I would not consider myself an exceptional developer, so I have no telling why the error handler was firing instead of the exception handler. Is this a BUG?(current version 4.7.2)<br />
Here is the exception handler: <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">request&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;request</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;response</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;accessDeniedMessage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"You&nbsp;do&nbsp;not&nbsp;have&nbsp;permission&nbsp;to&nbsp;perform&nbsp;this&nbsp;action."</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;message&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMessage</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;isVerbose&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">ENVIRONMENT</span><span style="color: #007700">,&nbsp;[</span><span style="color: #DD0000">'development'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'testing'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">MfaRequiredException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_success</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getData</span><span style="color: #007700">(),&nbsp;</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">ValidationException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">422</span><span style="color: #007700">,&nbsp;[</span><span style="color: #DD0000">'errors'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getErrors</span><span style="color: #007700">()]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">AppException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getCode</span><span style="color: #007700">()&nbsp;?:&nbsp;</span><span style="color: #0000BB">400</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getData</span><span style="color: #007700">());<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;exception&nbsp;</span><span style="color: #007700">instanceof&nbsp;</span><span style="color: #0000BB">AccessDeniedException</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;accessDeniedMessage</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">403</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;else&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;trackingId&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_log_exception</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;data&nbsp;</span><span style="color: #007700">=&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'tracking_id'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;trackingId<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;isVerbose</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;data</span><span style="color: #007700">[</span><span style="color: #DD0000">'trace'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;exception</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getTrace</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;response&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">api_error</span><span style="color: #007700">(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;isVerbose&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">&#36;message&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">'An&nbsp;error&nbsp;occured.&nbsp;Please&nbsp;try&nbsp;again&nbsp;later.'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;500</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;data<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;response</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">send</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">exit(</span><span style="color: #0000BB">&#36;exitCode</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[After calling software engineering 'dead,' Anthropic’s Claude Code creator Boris Cher]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94021</link>
			<pubDate>Fri, 17 Apr 2026 20:13:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=75">InsiteFX</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94021</guid>
			<description><![CDATA[<a href="https://timesofindia.indiatimes.com/technology/tech-news/after-calling-software-engineering-dead-anthropics-claude-code-creator-boris-cherny-says-coding-tools-like-microsoft-vs-code-apple-xcode-and-others-will-be-dead-soon/amp_articleshow/130329516.cms" target="_blank" rel="noopener" class="mycode_url">After calling software engineering 'dead,' Anthropic’s Claude Code creator Boris Cherny says coding tools like Microsoft VS Code, Apple Xcode, and others will be ‘dead soon’</a>]]></description>
			<content:encoded><![CDATA[<a href="https://timesofindia.indiatimes.com/technology/tech-news/after-calling-software-engineering-dead-anthropics-claude-code-creator-boris-cherny-says-coding-tools-like-microsoft-vs-code-apple-xcode-and-others-will-be-dead-soon/amp_articleshow/130329516.cms" target="_blank" rel="noopener" class="mycode_url">After calling software engineering 'dead,' Anthropic’s Claude Code creator Boris Cherny says coding tools like Microsoft VS Code, Apple Xcode, and others will be ‘dead soon’</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[*.env file in different location]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94011</link>
			<pubDate>Tue, 14 Apr 2026 16:39:24 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=7167">petewulf1</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94011</guid>
			<description><![CDATA[Hello guys,<br />
It seems there is no official way to place the *.env file at a different location than the projects root folder. Why?<br />
What would be an appropriate way to load from a different location without having to overwrite Boot.php?<br />
Thanks!<br />
Daniel]]></description>
			<content:encoded><![CDATA[Hello guys,<br />
It seems there is no official way to place the *.env file at a different location than the projects root folder. Why?<br />
What would be an appropriate way to load from a different location without having to overwrite Boot.php?<br />
Thanks!<br />
Daniel]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[feat(DI): Some dependency injection in CI]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94010</link>
			<pubDate>Tue, 14 Apr 2026 11:45:26 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=197882">patel-vansh</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94010</guid>
			<description><![CDATA[Hi everyone,<br />
After working with CodeIgniter 4, I wanted to share some thoughts on Dependency Injection and CodeIgniter 4:<br />
This is not a proposal to replace CI4’s simplicity or turn it into another framework. The goal would be to modernize dependency management in a way that still respects CI4’s philosophy: <span style="font-weight: bold;" class="mycode_b">simple, predictable, explicit, and lightweight</span>.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Why Discuss This?</span><br />
The current Services pattern works well and is easy to understand, but it also has some limitations for larger or more modular applications:<br />
- Uses a service locator pattern rather than constructor injection<br />
- Manual dependency wiring increases as projects grow<br />
For many apps this is not a problem. But for larger projects, cleaner dependency management can be valuable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Suggested Direction</span><br />
Introduce a <span style="font-weight: bold;" class="mycode_b">small optional container</span> that can coexist with the current system.<br />
Example:<br />
In the bootstrap process, you can inject any class:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">bind</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">UserRepositoryInterface</span><span style="color: #007700">::class,&nbsp;</span><span style="color: #0000BB">DatabaseUserRepository</span><span style="color: #007700">::class&nbsp;);&nbsp;<br /></span></code></div></div></div>And just use it via constructor injection:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">UserService&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">__construct</span><span style="color: #007700">(&nbsp;private&nbsp;</span><span style="color: #0000BB">readonly&nbsp;UserRepositoryInterface&nbsp;&#36;repo&nbsp;</span><span style="color: #007700">)&nbsp;{}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">getUser</span><span style="color: #007700">(</span><span style="color: #0000BB">int&nbsp;&#36;userId</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">repo</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getUser</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userId</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br />}&nbsp;<br /></span></code></div></div></div>Then, in controller:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;service&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #0000BB">UserService</span><span style="color: #007700">::class);&nbsp;<br /></span></code></div></div></div>This would automatically resolve dependencies recursively.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Example Binding Types</span><br />
Class to class:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">bind</span><span style="color: #007700">(&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;CacheInterface</span><span style="color: #007700">::class,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;FileCache</span><span style="color: #007700">::class<br />);&nbsp;<br /></span></code></div></div></div>Factory closure:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">bind</span><span style="color: #007700">(</span><span style="color: #0000BB">UserService</span><span style="color: #007700">::class,&nbsp;function&nbsp;(</span><span style="color: #0000BB">&#36;c</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;new&nbsp;</span><span style="color: #0000BB">UserService</span><span style="color: #007700">(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;c</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #0000BB">UserRepository</span><span style="color: #007700">::class),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'foo'<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">);<br />});&nbsp;<br /></span></code></div></div></div>Useful when primitives/config values are needed.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Why This Could Benefit CI4</span><br />
Better testability<br />
Cleaner architecture for medium/large apps<br />
Better package/module ecosystem<br />
Modern PHP patterns while preserving CI4 simplicity<br />
Gradual adoption with zero breakage<br />
<br />
After some time, maybe, we can make the current service calls go through this container system, like this:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">cache</span><span style="color: #007700">(</span><span style="color: #0000BB">bool&nbsp;&#36;getShared&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;getShared</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">singleton</span><span style="color: #007700">(</span><span style="color: #0000BB">CacheInterface</span><span style="color: #007700">::class);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">container</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #0000BB">CacheInterface</span><span style="color: #007700">::class);<br />}&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[Hi everyone,<br />
After working with CodeIgniter 4, I wanted to share some thoughts on Dependency Injection and CodeIgniter 4:<br />
This is not a proposal to replace CI4’s simplicity or turn it into another framework. The goal would be to modernize dependency management in a way that still respects CI4’s philosophy: <span style="font-weight: bold;" class="mycode_b">simple, predictable, explicit, and lightweight</span>.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Why Discuss This?</span><br />
The current Services pattern works well and is easy to understand, but it also has some limitations for larger or more modular applications:<br />
- Uses a service locator pattern rather than constructor injection<br />
- Manual dependency wiring increases as projects grow<br />
For many apps this is not a problem. But for larger projects, cleaner dependency management can be valuable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Suggested Direction</span><br />
Introduce a <span style="font-weight: bold;" class="mycode_b">small optional container</span> that can coexist with the current system.<br />
Example:<br />
In the bootstrap process, you can inject any class:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">bind</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">UserRepositoryInterface</span><span style="color: #007700">::class,&nbsp;</span><span style="color: #0000BB">DatabaseUserRepository</span><span style="color: #007700">::class&nbsp;);&nbsp;<br /></span></code></div></div></div>And just use it via constructor injection:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">UserService&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">__construct</span><span style="color: #007700">(&nbsp;private&nbsp;</span><span style="color: #0000BB">readonly&nbsp;UserRepositoryInterface&nbsp;&#36;repo&nbsp;</span><span style="color: #007700">)&nbsp;{}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">getUser</span><span style="color: #007700">(</span><span style="color: #0000BB">int&nbsp;&#36;userId</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">repo</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getUser</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userId</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br />}&nbsp;<br /></span></code></div></div></div>Then, in controller:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;service&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #0000BB">UserService</span><span style="color: #007700">::class);&nbsp;<br /></span></code></div></div></div>This would automatically resolve dependencies recursively.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Example Binding Types</span><br />
Class to class:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">bind</span><span style="color: #007700">(&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;CacheInterface</span><span style="color: #007700">::class,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;FileCache</span><span style="color: #007700">::class<br />);&nbsp;<br /></span></code></div></div></div>Factory closure:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">bind</span><span style="color: #007700">(</span><span style="color: #0000BB">UserService</span><span style="color: #007700">::class,&nbsp;function&nbsp;(</span><span style="color: #0000BB">&#36;c</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;new&nbsp;</span><span style="color: #0000BB">UserService</span><span style="color: #007700">(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;c</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #0000BB">UserRepository</span><span style="color: #007700">::class),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'foo'<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">);<br />});&nbsp;<br /></span></code></div></div></div>Useful when primitives/config values are needed.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Why This Could Benefit CI4</span><br />
Better testability<br />
Cleaner architecture for medium/large apps<br />
Better package/module ecosystem<br />
Modern PHP patterns while preserving CI4 simplicity<br />
Gradual adoption with zero breakage<br />
<br />
After some time, maybe, we can make the current service calls go through this container system, like this:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">cache</span><span style="color: #007700">(</span><span style="color: #0000BB">bool&nbsp;&#36;getShared&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;getShared</span><span style="color: #007700">)&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">container</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">singleton</span><span style="color: #007700">(</span><span style="color: #0000BB">CacheInterface</span><span style="color: #007700">::class);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">container</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #0000BB">CacheInterface</span><span style="color: #007700">::class);<br />}&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Boosting CI4 popularity]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=94009</link>
			<pubDate>Mon, 13 Apr 2026 15:50:33 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=7143">enlivenapp</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=94009</guid>
			<description><![CDATA[I've been a rabid supporter of CI since 1.7.2.  During the 'great lull' Codeigniter really took a hard hit with Laravel coming up and many devs jumping ship. I really want to do my part to help CI get back to the popularity it once had and (*gasp*) maybe rival Laravel.   <br />
<br />
While I've been working on my CMS, I've found, what I feel, would be one of the best ways to implement such functionality similar to what Laraval offers. Their Service Providers solution to adding whatever package you want to use would be a massive advantage to Codeigniter.<br />
<br />
The one argument I often hear/read is 'composer whatever' has this, just 'composer require' it and use it (usually coming across as kinda negative nancy since text has no real context).  I get that and it's 100% true, but that advice doesn't really cut it when CI is better than many frameworks in many ways but kinda can't get out of it's own way.  <br />
  <br />
As always, lively discussion is wanted, I'd really like to hear from the Foundation devs too.  Is there any interest from the Foundation to create a Service Provider/Packages and much expanded spark CLI kind of ecosystem for Codeigniter? <br />
<br />
Happy coding.]]></description>
			<content:encoded><![CDATA[I've been a rabid supporter of CI since 1.7.2.  During the 'great lull' Codeigniter really took a hard hit with Laravel coming up and many devs jumping ship. I really want to do my part to help CI get back to the popularity it once had and (*gasp*) maybe rival Laravel.   <br />
<br />
While I've been working on my CMS, I've found, what I feel, would be one of the best ways to implement such functionality similar to what Laraval offers. Their Service Providers solution to adding whatever package you want to use would be a massive advantage to Codeigniter.<br />
<br />
The one argument I often hear/read is 'composer whatever' has this, just 'composer require' it and use it (usually coming across as kinda negative nancy since text has no real context).  I get that and it's 100% true, but that advice doesn't really cut it when CI is better than many frameworks in many ways but kinda can't get out of it's own way.  <br />
  <br />
As always, lively discussion is wanted, I'd really like to hear from the Foundation devs too.  Is there any interest from the Foundation to create a Service Provider/Packages and much expanded spark CLI kind of ecosystem for Codeigniter? <br />
<br />
Happy coding.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Ragnos: A "Configuration over Code" Enterprise Add-on built on CI4]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=93997</link>
			<pubDate>Fri, 10 Apr 2026 00:19:02 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=512">cgarciagl</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=93997</guid>
			<description><![CDATA[Hello everyone,<br />
I have been using and loving CodeIgniter for years. I work as a developer and academic technician at a University Research Center, where we constantly build administrative and educational systems. While CI4 is blazing fast and elegantly structured, I found myself getting burned out writing the exact same CRUD controllers, HTML views, data tables, and permission logic for every new project.<br />
<br />
To keep my sanity, I built a higher-level enterprise add-on entirely on top of CodeIgniter 4 called Ragnos. I just released it as 100% open-source and wanted to share it with the community that makes CI4 possible.<br />
<br />
The core philosophy of Ragnos is "Configuration over Programming." Instead of writing standard MVC boilerplate for admin panels, you use our RDatasetController. You simply define a "Data Dictionary" (a plain PHP array) in your controller, and this add-on automatically renders a fully styled dashboard, handles pagination, advanced search filters, data exports, and forms.<br />
<br />
Because it runs native CI4 under the hood, it automatically benefits from its Query Builder, CSRF protection, and XSS filtering, but it adds a dynamic Role-Based Access Control (RBAC) layer on top. Also, since modules are generated from PHP arrays, it is incredibly easy to use AI to write your configurations and generate entire modules in seconds.<br />
<br />
You can check out the documentation, the philosophy, and the GitHub repository here: <a href="https://ragnos.build" target="_blank" rel="noopener" class="mycode_url">https://ragnos.build</a><br />
<br />
Because the project grew quite a bit, I also wrote a complete 162-page official manual called "Ragnos from Zero to Pro" (available in English and Spanish on Leanpub) for those who want to master the architecture or implement it at an enterprise level. But the core add-on is completely free and open for the community.<br />
<br />
I would love for the CI experts here to take a look at the code, install it, break it, and give me your honest feedback. I owe a lot to CodeIgniter, and I hope this contribution helps other developers save as much time as it has saved me.<br />
Thanks for reading and happy coding!]]></description>
			<content:encoded><![CDATA[Hello everyone,<br />
I have been using and loving CodeIgniter for years. I work as a developer and academic technician at a University Research Center, where we constantly build administrative and educational systems. While CI4 is blazing fast and elegantly structured, I found myself getting burned out writing the exact same CRUD controllers, HTML views, data tables, and permission logic for every new project.<br />
<br />
To keep my sanity, I built a higher-level enterprise add-on entirely on top of CodeIgniter 4 called Ragnos. I just released it as 100% open-source and wanted to share it with the community that makes CI4 possible.<br />
<br />
The core philosophy of Ragnos is "Configuration over Programming." Instead of writing standard MVC boilerplate for admin panels, you use our RDatasetController. You simply define a "Data Dictionary" (a plain PHP array) in your controller, and this add-on automatically renders a fully styled dashboard, handles pagination, advanced search filters, data exports, and forms.<br />
<br />
Because it runs native CI4 under the hood, it automatically benefits from its Query Builder, CSRF protection, and XSS filtering, but it adds a dynamic Role-Based Access Control (RBAC) layer on top. Also, since modules are generated from PHP arrays, it is incredibly easy to use AI to write your configurations and generate entire modules in seconds.<br />
<br />
You can check out the documentation, the philosophy, and the GitHub repository here: <a href="https://ragnos.build" target="_blank" rel="noopener" class="mycode_url">https://ragnos.build</a><br />
<br />
Because the project grew quite a bit, I also wrote a complete 162-page official manual called "Ragnos from Zero to Pro" (available in English and Spanish on Leanpub) for those who want to master the architecture or implement it at an enterprise level. But the core add-on is completely free and open for the community.<br />
<br />
I would love for the CI experts here to take a look at the code, install it, break it, and give me your honest feedback. I owe a lot to CodeIgniter, and I hope this contribution helps other developers save as much time as it has saved me.<br />
Thanks for reading and happy coding!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Claude Code Skills]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=93992</link>
			<pubDate>Wed, 08 Apr 2026 07:01:50 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=7143">enlivenapp</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=93992</guid>
			<description><![CDATA[I had mentioned this buried in one of my other posts.  I've had to keep claude code on a short leash because it seems to do whatever it wants. So, I had some skills for claude to use. Tonight I updated them, broke out Shield from the ci4 skill and went pretty detailed for the skills.  All free to use as cheat sheets or load up in claude (maybe other LLMs) and get something resembling what CI4 is supposed to be used for.  I'm working on a CI4 plugin too, but that's extra tokens when I have them. <br />
<br />
fork it, PR it, whatever you need.<br />
<a href="https://github.com/enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code" target="_blank" rel="noopener" class="mycode_url">https://github.com/enlivenapp/Codeignite...laude-Code</a><br />
<br />
Happy Coding!]]></description>
			<content:encoded><![CDATA[I had mentioned this buried in one of my other posts.  I've had to keep claude code on a short leash because it seems to do whatever it wants. So, I had some skills for claude to use. Tonight I updated them, broke out Shield from the ci4 skill and went pretty detailed for the skills.  All free to use as cheat sheets or load up in claude (maybe other LLMs) and get something resembling what CI4 is supposed to be used for.  I'm working on a CI4 plugin too, but that's extra tokens when I have them. <br />
<br />
fork it, PR it, whatever you need.<br />
<a href="https://github.com/enlivenapp/Codeigniter4-App-and-API-Skills-for-Claude-Code" target="_blank" rel="noopener" class="mycode_url">https://github.com/enlivenapp/Codeignite...laude-Code</a><br />
<br />
Happy Coding!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Testing same tables]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=93984</link>
			<pubDate>Sat, 04 Apr 2026 10:14:37 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=52428">ozornick</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=93984</guid>
			<description><![CDATA[I have several modules: <span style="font-weight: bold;" class="mycode_b">Main, Blog, Shop</span>...<br />
Each contains tests <span style="font-weight: bold;" class="mycode_b">modules/src/Shop/Tests/*</span> and data <span style="font-weight: bold;" class="mycode_b">Shop/Database/{Migrations|Seeders}</span> for them.<br />
Errors occurred with identical tables (posts, users..) in the same test database. I am using the SQLite3 file.<br />
<br />
How best to split the execution (random tests) without creating many connections: tests, tests_for_main, test_for_shop..? Because sometimes you may need data from modules that do not overlap.<br />
<br />
In general, working with migrations is very strict - you can't just execute import and seeder files. And auto-searching of this data may be unsuitable: for example, when the imported data is located outside of ./Database/* or has a non-standard FQCN.<br />
<br />
My test begin as:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">final&nbsp;class&nbsp;</span><span style="color: #0000BB">PostModelTest&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">CIUnitTestCase<br /></span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;use&nbsp;</span><span style="color: #0000BB">DatabaseTestTrait</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;namespace&nbsp;</span><span style="color: #007700">=&nbsp;[<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'Neznaika0&#092;Module&#092;Blog'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'Neznaika0&#092;Module&#092;Shop'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;];<br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;seed&nbsp;</span><span style="color: #007700">=&nbsp;[<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">UserSeeder</span><span style="color: #007700">::class,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PostSeeder</span><span style="color: #007700">::class,<br />&nbsp;&nbsp;&nbsp;&nbsp;];<br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;migrateOnce&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;seedOnce&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[I have several modules: <span style="font-weight: bold;" class="mycode_b">Main, Blog, Shop</span>...<br />
Each contains tests <span style="font-weight: bold;" class="mycode_b">modules/src/Shop/Tests/*</span> and data <span style="font-weight: bold;" class="mycode_b">Shop/Database/{Migrations|Seeders}</span> for them.<br />
Errors occurred with identical tables (posts, users..) in the same test database. I am using the SQLite3 file.<br />
<br />
How best to split the execution (random tests) without creating many connections: tests, tests_for_main, test_for_shop..? Because sometimes you may need data from modules that do not overlap.<br />
<br />
In general, working with migrations is very strict - you can't just execute import and seeder files. And auto-searching of this data may be unsuitable: for example, when the imported data is located outside of ./Database/* or has a non-standard FQCN.<br />
<br />
My test begin as:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">final&nbsp;class&nbsp;</span><span style="color: #0000BB">PostModelTest&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">CIUnitTestCase<br /></span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;use&nbsp;</span><span style="color: #0000BB">DatabaseTestTrait</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;namespace&nbsp;</span><span style="color: #007700">=&nbsp;[<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'Neznaika0&#092;Module&#092;Blog'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'Neznaika0&#092;Module&#092;Shop'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;];<br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;seed&nbsp;</span><span style="color: #007700">=&nbsp;[<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">UserSeeder</span><span style="color: #007700">::class,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PostSeeder</span><span style="color: #007700">::class,<br />&nbsp;&nbsp;&nbsp;&nbsp;];<br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;migrateOnce&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;</span><span style="color: #0000BB">&#36;seedOnce&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Best way to implement a Service Layer in CI4 for complex business logic?]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=93983</link>
			<pubDate>Fri, 03 Apr 2026 19:42:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=229483">marinkitagawa</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=93983</guid>
			<description><![CDATA[I’m working on a large-scale project in CodeIgniter 4 and I want to keep my controllers as lean as possible. Currently, I’m using centralized validation in <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Config/Validation.php</code></div></div>, but I’m struggling with where to put complex business logic that doesn't belong in the Model or the Controller.<br />
<span style="font-weight: bold;" class="mycode_b">My questions are:</span><br />
<ol type="1" class="mycode_list"><li>Is creating a separate <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>app/Services</code></div></div> directory the standard approach in CI4 for handling business logic?<br />
</li>
<li>How should I properly initialize these services? Should I use the <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Services</code></div></div> configuration file or just instantiate them normally in the controller?<br />
</li>
<li>Are there any performance overheads or architectural 'gotchas' I should be aware of when moving logic out of the controller?<br />
</li>
</ol>
I'd love to hear how you guys structure your enterprise-level applications<a href="http://oakllc.co" target="_blank" rel="noopener" class="mycode_url">.</a> Thanks!]]></description>
			<content:encoded><![CDATA[I’m working on a large-scale project in CodeIgniter 4 and I want to keep my controllers as lean as possible. Currently, I’m using centralized validation in <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Config/Validation.php</code></div></div>, but I’m struggling with where to put complex business logic that doesn't belong in the Model or the Controller.<br />
<span style="font-weight: bold;" class="mycode_b">My questions are:</span><br />
<ol type="1" class="mycode_list"><li>Is creating a separate <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>app/Services</code></div></div> directory the standard approach in CI4 for handling business logic?<br />
</li>
<li>How should I properly initialize these services? Should I use the <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Services</code></div></div> configuration file or just instantiate them normally in the controller?<br />
</li>
<li>Are there any performance overheads or architectural 'gotchas' I should be aware of when moving logic out of the controller?<br />
</li>
</ol>
I'd love to hear how you guys structure your enterprise-level applications<a href="http://oakllc.co" target="_blank" rel="noopener" class="mycode_url">.</a> Thanks!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[What do i need to do back to older version of a file]]></title>
			<link>https://forum.codeigniter.com/showthread.php?tid=93982</link>
			<pubDate>Fri, 03 Apr 2026 13:01:42 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=107513">mikehoague</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/showthread.php?tid=93982</guid>
			<description><![CDATA[I am having an issue going back old version af a file. I am usion both VsCode and PHPStotrm but I cant seme to fin were its is lacated.]]></description>
			<content:encoded><![CDATA[I am having an issue going back old version af a file. I am usion both VsCode and PHPStotrm but I cant seme to fin were its is lacated.]]></content:encoded>
		</item>
	</channel>
</rss>