Problem with Project-tests |
First,
Thank you MGatner for all the effort on this GREAT CI4 code ! Really awesome ! Also, thank you very much for all the help you have being given me ! The first problem I encountered with project-tests was right after installing it. I even started a new CI4 installation to check if the problem was me. On a brand-new CI4 installation, just after after adding the requirements in COMPOSER.JSON file I got the following error: Code: λ php spark serve The error happens after adding this line into composer: Code: "autoload-dev": { Without it the command php spark serve will work OK
That's an odd one. Just to be clear, you copied the folder from ProjectTests/src into the root of your App, and you also have a regular framework System folder located somewhere that your Paths.php file can find?
The tests bootstrap does load a constant for the framework tests (https://github.com/codeigniter4projects/...ap.php#L23) but I don't know how that would affect a non-testing instance. (11-07-2019, 01:10 PM)MGatner Wrote: That's an odd one. Just to be clear, you copied the folder from ProjectTests/src into the root of your App, and you also have a regular framework System folder located somewhere that your Paths.php file can find? I tried everything... Installing a new CI4 using composer... using the manual installation... etc... Whenever I add the PS4 autoload in composer the SPARK command will give me that error... If you want to I can make a video to show you the issue...
Can you edit system\Config\BaseConfig.php and modify line 206 to look like this:
PHP Code: $className = $locator->getClassname($file); And share the output? Code: �������������������������������������������������������������������������������� Need more ? Or that part is good ? And the file is there... Just checked...
I was actually hoping for the `trace()` output - I'm curious how this is being called to being with, and why it is trying to load the tests registrar in a production instance.
(11-08-2019, 07:12 AM)MGatner Wrote: I was actually hoping for the `trace()` output - I'm curious how this is being called to being with, and why it is trying to load the tests registrar in a production instance. Code: CodeIgniter CLI Tool - Version 4.0.0-rc.3 - Server-Time: 2019-11-08 13:07:29pm I hope it helps find the BUG... I hope it helps find the BUG... I hope it helps find the BUG...
Thanks! I’m on mobile and that’s a nightmare to try to read but I’ll take a look when I get a chance. Thanks for helping troubleshoot this.
No problem... I hope you can solve this... It is a bitch have to change composer everytime...
Okay, I think I see what is happening. I believe you have the CodeIgniter "tests" folder in your root (this one: https://github.com/codeigniter4/CodeIgni...elop/tests) but you are forcing it to the ProjectTests namespace via composer.json ("ProjectTests\\Support\\": "tests/_support"). Make sure you have removed the CodeIgniter tests folder and all subfolders, then copy in the version from CodeIgniter4Projects/ProjectTests.
If I'm wrong about that let me know and we'll try something else. |
Welcome Guest, Not a member yet? Register Sign In |