wardrobecms / wardrobe-archived

A minimal blogging application
http://wardrobecms.com/
MIT License
705 stars 111 forks source link

Magic Constants. #8

Closed timothymarois closed 11 years ago

timothymarois commented 11 years ago

I love simplicity. I've built a very basic CMS in the past. Curious to test this out, however you rely too much on DIR, magic constants shouldn't be relied upon. It was very difficult to get this working since the file system needs to be completely redone. The start file, should have a root file variable, where the user places the location, and then the app uses that to know where the files are located. Don't rely on the internal system, too many OS and software changes to know if it works or not. Other than that, looks interesting.

ericlbarnes commented 11 years ago

Can you elaborate more on this?

however you rely too much on DIR, magic constants shouldn't be relied upon

Not sure I'm following what you are looking at.

timothymarois commented 11 years ago

http://php.net/manual/en/language.constants.predefined.php It was your file system I was unable to fully test the app. All of the files where not found, then I changed the DIR constants to actual locations, and internally the system wasn't able to find a bunch of directories. I know its a pre-beta version. Just thought to let you know as a first time user it wasn't easy installation and for me to get it working, I'd need to change a lot of the code itself because of the file locations which aren't found. Not sure if I missed something in your readme.

ericlbarnes commented 11 years ago

I assume you are talking about this file? https://github.com/wardrobecms/wardrobe/blob/master/bootstrap/start.php

Basically this whole repo is just a laravel shell. The main codebase (wardrobe/core) is pulled in via composer.

timothymarois commented 11 years ago

That now makes more sense. I was under the impression it was it's own framework from the ground up.

rtablada commented 11 years ago

I've never had a problem using DIR in an application. It's pretty standard.

There are definitely customizable paths in Laravel that let you move things about, but if you say that you don't use applications that use the DIR constraint at all, you are gonna be seriously limited.

timothymarois commented 11 years ago

Yeah my current server setup doesn't have magic constants enabled, Thats why nothing was defined. But thanks for clarifying this.

rtablada commented 11 years ago

Laravel and thus Wardrobe require PHP ~5.3 which defined the DIR constant. For full support you should be running PHP 5.3.10