Skip to content

Commit 586f208

Browse files
committed
Conditionally require functions.php
This allows a global version of React\Promise alongside a local version. Closes #23
1 parent 937b04f commit 586f208

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"psr-4": {
1313
"React\\Promise\\": "src/"
1414
},
15-
"files": ["src/functions.php"]
15+
"files": ["src/functions_include.php"]
1616
},
1717
"extra": {
1818
"branch-alias": {

src/functions_include.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
if (!function_exists('React\Promise\resolve')) {
4+
require __DIR__.'/functions.php';
5+
}

0 commit comments

Comments
 (0)