Skip to content

Conversation

@itafroma
Copy link
Contributor

The solution currently being used for conditionally autoloading functions does not work: PHP will attempt to load the functions before the conditional is evaluated. React had a similar problem (see reactphp/promise#25) which which was solved using a shim functions_include.php file that checks for the existence of the first function within functions.php before including functions.php. This PR modifies the conditional require to use React's method.

@itafroma
Copy link
Contributor Author

Mostly-identical PRs for guzzle/guzzle and guzzle/psr7 were filed:

mtdowling added a commit that referenced this pull request Jun 30, 2015
Fix conditionally requiring functions.php
@mtdowling mtdowling merged commit f596be0 into guzzle:master Jun 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants