Skip to content

Commit

Permalink
Conditionally require functions.php
Browse files Browse the repository at this point in the history
This allows a global version of React\Promise alongside a local version.

Closes #23
  • Loading branch information
jsor committed Dec 3, 2014
1 parent 937b04f commit 586f208
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -12,7 +12,7 @@
"psr-4": {
"React\\Promise\\": "src/"
},
"files": ["src/functions.php"]
"files": ["src/functions_include.php"]
},
"extra": {
"branch-alias": {
Expand Down
5 changes: 5 additions & 0 deletions src/functions_include.php
@@ -0,0 +1,5 @@
<?php

if (!function_exists('React\Promise\resolve')) {
require __DIR__.'/functions.php';
}

0 comments on commit 586f208

Please sign in to comment.