Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Order of configure() / loading from lib/ #28

Closed
sethkinast opened this Issue · 2 comments

2 participants

@sethkinast

The documentation says libraries are loaded before configure():

PHP files contained in the option('lib_dir') folder (lib/ by default) are loaded with require_once just before executing configure. So you can place in this folder all your PHP libraries and functions so that they will be loaded and available at application launch.

However the source code runs configure() before loading libraries:

# 2. Set user configuration
call_if_exists('configure');

[...]

# 3. Loading libs
require_once_dir(option('lib_dir'));

This broke an app I was writing when I assumed that my ORM in lib/ would be loaded before configure() was executed. Which is the intended behavior, please?

@sofadesign
Owner

You're right, the documentation isn't up to date. Libraries are loaded after configure since this fix:

@sofadesign sofadesign closed this in 0d357db
@sethkinast

Thanks for the clarification! Loving Limonade for development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.