fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Standardize constants in the differents entry points #1421

Closed fbnfgc closed 9 years ago

fbnfgc commented 11 years ago

Today there are 3 standard entry points for a fuelphp app :

Each entry point defines its own constants : _DOCROOT, APPPATH, PKGPATH, COREPATH, FUEL_START_TIME, FUEL_STARTMEM... ... which are the same.

I think it would be a good idea to group them in a single file.

RyanDawkins commented 11 years ago

I agree this would be cool.

WanWizard commented 11 years ago

For index.php and oil, they could be moved to app/bootstrap.php.

For phpunit, that is a bit different, since that uses an XML file for path configuration. I'll have to see if those XML file entries are really needed (for phpunit).

WanWizard commented 11 years ago

I spoke to soon, obviously APPPATH is required to be able to call the app bootstrap, bit of a chicken-and-egg issue...

mrDlef commented 11 years ago

+1

WanWizard commented 11 years ago

It is not at all easy, paths are defined relative to the location of the file they are in, of you move them to a separate file, you have to hardcode them all, which is not something we are prepared to do.

Pleasse send a PR with your suggested solution that doesn't include hardcoding.

WanWizard commented 9 years ago

This can't be addressed in the current setup.