My life be like

Apple file system is case insensitive

“You should know your filesystem.” Published at: 2019-01-07

In my development career I have been working mostly in PHP. I know some other languages but mostly worked in PHP. In PHP you need to autoload classes. Almost everybody in the PHP world does this with composer. This is the package manager for PHP applications and also autoloads all classes for your application. In the production environment you can dump the classes to optimise the autoloading in the production environment. Composer is case sensitive and that means that when a file name is different from the class name composer gives warning that there is something wrong with that file. We found out that there was a problem in the production environment with autoloading some files. But only in the production environment! We looked at the file in our development environment but we couldn’t find the problem.

After a couple of hours we found out that in our git repo there are 2 files that are named the same but with one character difference. In one file the character was capitalised and in the other it wasn’t. We could not see this in our local environment because Apple filesystem is case insensitive and does’t see a difference in files. When renaming the file we saw on our local development git gave some strange behaviour. It thought we had removed the file, renamed it AND added it, all at the same time. We removed the wrong file in our remote repository and fixed our problem.

Lesson learned: Apple filesystem is case insensitive.

Oscar te Giffel

Oscar te Giffel. I wan't to learn so many things. This is just my journey through life.