Closed paulbalandan closed 1 year ago
On the default file system on macOS also case-insensitive. So the test also fails. See https://github.com/codeigniter4/CodeIgniter4/pull/7471#issuecomment-1531329060
I think we should add a check if the cell name is a single word and it is run through Windows. If that's the case, we forbid single word as cell name through a nice error message.
Do you mean to add the check in make:cell
?
If so, I think just displaying an error message for single words is fine, regardless of platform.
To begin with, now we get an error on Windows/macOS because we can't create the HTML file. On Linux we can create the files without error, but if we move to a Windows/macOS server it won't work.
PHP Version
8.2
CodeIgniter4 Version
develop
CodeIgniter4 Installation Method
Git
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
No response
What happened?
This test (CellGeneratorTest) currently fails on Windows:
This is because on Windows,
Cells/Another.php
is treated the same asCells/another.php
. Thus, only one file is generated, the class file. The view file is skipped.Steps to Reproduce
Run the test above in Windows. Linux and MacOS are not affected.
Expected Output
I think we should add a check if the cell name is a single word and it is run through Windows. If that's the case, we forbid single word as cell name through a nice error message.
Anything else?
No response