Welcome Guest, Not a member yet? Register   Sign In
Case Sensitive Filenames - Stop Bad Practice
#1

Please stop requiring the first letter of model, controller and library files to have an uppercase first letter.  This has been nothing but annoying for me since the launch of CI3.  I see no point in doing it this way.  Developers using a Mac or PC will have no issues during local development if one or more files do not have the required uppercase first letter, but once deployed on a case-sensitive linux production web server, that's when you will have issues.  This is bad practice in my opinion.

Thanks for your consideration.
Reply
#2

You must have missed the discussion over the last couple of years - you can use whatever case & namespace you want within your app, with CI4. Contributions to the framework are still expected to conform to our style guidelines, but developers are free to choose.
Reply
#3

That is great news. Thank you!
Reply
#4

(12-13-2017, 02:23 PM)rothkj1022 Wrote: Developers using a Mac or PC will have no issues during local development if one or more files do not have the required uppercase first letter, but once deployed on a case-sensitive linux production web server, that's when you will have issues.

The bad practice is not using Linux for development. You have a lot of options for developing on a Linux O/S, so there shouldn't be any excuses. If you know your production environment is a Linux server, it's smart to try to replicate that environment as much as possible.
Reply
#5

(This post was last modified: 12-13-2017, 09:58 PM by albertleao. Edit Reason: Smiley! )

Bad practice is developing on 2 different environments and expecting things to work the same way...

There are endless options that overcome what you're facing.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply
#6

If your using Windows use Filezilla to ftp your application, you can tell it
to upload the files all with lower case.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

The autoloader in CI4 requires the case of the class name and namespace to match the directories and filename in order for the file to be autoloaded. That's pretty standard for autoloaders.
Reply
#8

(12-13-2017, 02:23 PM)rothkj1022 Wrote: Please stop requiring the first letter of model, controller and library files to have an uppercase first letter.  This has been nothing but annoying for me since the launch of CI3.  I see no point in doing it this way.  Developers using a Mac or PC will have no issues during local development if one or more files do not have the required uppercase first letter, but once deployed on a case-sensitive linux production web server, that's when you will have issues.  This is bad practice in my opinion.

Thanks for your consideration.

Bad Practice is youclass.php Dodgy
Reply




Theme © iAndrew 2016 - Forum software by © MyBB