Skip to content

Commit be07668

Browse files
committed
Do not use Puli auto discovery on HHVM
1 parent f5c7b0d commit be07668

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Tests/Resources/app/AppKernel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ public function registerBundles()
2121
*/
2222
public function registerContainerConfiguration(LoaderInterface $loader)
2323
{
24-
$loader->load(__DIR__.'/config/config.yml');
24+
$runtime = 'php';
25+
if (defined('HHVM_VERSION')) {
26+
$runtime = 'hhvm';
27+
}
28+
$loader->load(__DIR__.'/config/config_'.$runtime.'.yml');
2529
}
2630

2731
/**
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
framework:
2+
secret: php-http
3+
test: ~
4+
5+
# Do not use auto discovery
6+
httplug:
7+
classes:
8+
client: Http\Adapter\Guzzle6\Client
9+
message_factory: Http\Message\MessageFactory\GuzzleMessageFactory
10+
uri_factory: Http\Message\UriFactory\GuzzleUriFactory
11+
stream_factory: Http\Message\StreamFactory\GuzzleStreamFactory

Tests/Resources/app/config/config.yml renamed to Tests/Resources/app/config/config_php.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ framework:
22
secret: php-http
33
test: ~
44

5+
# Use auto discovery
56
httplug: ~

0 commit comments

Comments
 (0)