@@ -29,7 +29,7 @@ class ServerRunCommand extends ContainerAwareCommand
29
29
*/
30
30
public function isEnabled ()
31
31
{
32
- if (version_compare (phpversion (), '5.4.0 ' , '< ' )) {
32
+ if (version_compare (phpversion (), '5.4.0 ' , '< ' ) || defined ( ' HHVM_VERSION ' ) ) {
33
33
return false ;
34
34
}
35
35
@@ -96,12 +96,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
96
96
->locateResource (sprintf ('@FrameworkBundle/Resources/config/router_%s.php ' , $ env ))
97
97
;
98
98
99
- if (defined ('HHVM_VERSION ' )) {
100
- $ builder = $ this ->createHhvmProcessBuilder ($ input , $ output , $ env );
101
- } else {
102
- $ builder = $ this ->createPhpProcessBuilder ($ input , $ output , $ env );
103
- }
104
-
99
+ $ builder = $ this ->createPhpProcessBuilder ($ input , $ output , $ env );
105
100
$ builder ->setWorkingDirectory ($ input ->getOption ('docroot ' ));
106
101
$ builder ->setTimeout (null );
107
102
$ builder ->getProcess ()->run (function ($ type , $ buffer ) use ($ output ) {
@@ -121,59 +116,4 @@ private function createPhpProcessBuilder(InputInterface $input, OutputInterface
121
116
122
117
return new ProcessBuilder (array (PHP_BINARY , '-S ' , $ input ->getArgument ('address ' ), $ router ));
123
118
}
124
-
125
- private function createHhvmProcessBuilder (InputInterface $ input , OutputInterface $ output , $ env )
126
- {
127
- list ($ ip , $ port ) = explode (': ' , $ input ->getArgument ('address ' ));
128
-
129
- $ docroot = realpath ($ input ->getOption ('docroot ' ));
130
- $ bootstrap = 'prod ' === $ env ? 'app.php ' : 'app_dev.php ' ;
131
- $ config = <<<EOF
132
- Server {
133
- IP = $ ip
134
- Port = $ port
135
- SourceRoot = $ docroot
136
- RequestTimeoutSeconds = -1
137
- RequestMemoryMaxBytes = -1
138
- }
139
-
140
- VirtualHost {
141
- * {
142
- Pattern = .*
143
- RewriteRules {
144
- * {
145
- pattern = .?
146
-
147
- # app bootstrap
148
- to = $ bootstrap
149
-
150
- # append the original query string
151
- qsa = true
152
- }
153
- }
154
- }
155
- }
156
-
157
- StaticFile {
158
- Extensions {
159
- css = text/css
160
- gif = image/gif
161
- html = text/html
162
- jpe = image/jpeg
163
- jpeg = image/jpeg
164
- jpg = image/jpeg
165
- png = image/png
166
- tif = image/tiff
167
- tiff = image/tiff
168
- txt = text/plain
169
- php = text/plain
170
- }
171
- }
172
- EOF ;
173
-
174
- $ configFile = $ this ->getContainer ()->get ('kernel ' )->getCacheDir ().'/hhvm-server- ' .md5 ($ config ).'.hdf ' ;
175
- file_put_contents ($ configFile , $ config );
176
-
177
- return new ProcessBuilder (array (PHP_BINARY , '--mode ' , 'server ' , '--config ' , $ configFile ));
178
- }
179
119
}
0 commit comments