File tree 3 files changed +4
-22
lines changed
3 files changed +4
-22
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env php
2
2
<?php
3
3
4
- if (PHP_VERSION_ID < 70200 ) {
5
- fwrite (
6
- STDERR ,
7
- sprintf (
8
- 'This version of PHPBrew is supported on PHP 7.2.0 or newer ' . PHP_EOL .
9
- 'You are using PHP %s (%s). ' . PHP_EOL ,
10
- PHP_VERSION ,
11
- PHP_BINARY
12
- )
13
- );
14
-
15
- die (1 );
4
+ if (PHP_VERSION_ID < 70200 && function_exists ('posix_isatty ' ) && posix_isatty (STDOUT )) {
5
+ fwrite (STDOUT , "\033[33mWarning! The usage of PHP older than 7.2.0 as the interpreter is deprecated. \n" );
6
+ fwrite (STDOUT , "Please set the system interpreter using \033[0m'phpbrew system <version>' \033[33m. \n" );
7
+ fwrite (STDOUT , "See https://github.com/phpbrew/phpbrew/wiki/System-Interpreter for details. \033[0m \n" );
16
8
}
17
9
18
10
$ includeIfExists = function ($ file )
Original file line number Diff line number Diff line change @@ -205,8 +205,6 @@ function phpbrew ()
205
205
else
206
206
local PHP_BUILD=$( __phpbrew_normalize_build $2 )
207
207
208
- __phpbrew_can_use_build $PHP_BUILD || return 1
209
-
210
208
# checking if php source exists
211
209
NEW_PHPBREW_PHP_PATH=" $PHPBREW_ROOT /php/$PHP_BUILD "
212
210
if [ -d $NEW_PHPBREW_PHP_PATH ]; then
@@ -236,8 +234,6 @@ function phpbrew ()
236
234
else
237
235
local PHP_BUILD=$( __phpbrew_normalize_build $2 )
238
236
239
- __phpbrew_can_use_build $PHP_BUILD || return 1
240
-
241
237
__phpbrew_reinit $PHP_BUILD
242
238
fi
243
239
;;
Original file line number Diff line number Diff line change @@ -183,9 +183,6 @@ function phpbrew
183
183
else
184
184
set PHP_BUILD (__phpbrew_normalize_build $argv [2])
185
185
186
- __phpbrew_can_use_build $PHP_BUILD
187
- or return 1
188
-
189
186
# checking if php source exists
190
187
set NEW_PHPBREW_PHP_PATH " $PHPBREW_ROOT /php/$PHP_BUILD "
191
188
if [ -d $NEW_PHPBREW_PHP_PATH ]
@@ -213,9 +210,6 @@ function phpbrew
213
210
else
214
211
set -l build (__phpbrew_normalize_build $argv [2])
215
212
216
- __phpbrew_can_use_build $build
217
- or return 1
218
-
219
213
__phpbrew_reinit $build
220
214
end
221
215
case lookup-prefix
You can’t perform that action at this time.
0 commit comments