@@ -7,7 +7,7 @@ SOURCE="${BASH_SOURCE[0]}"
7
7
# do it in pure Bash. So, we'll call into PHP CLI here to resolve.
8
8
if [[ -L " $SOURCE " ]]
9
9
then
10
- DIR=$( php -r " echo dirname(realpath('$SOURCE '));" )
10
+ DIR=$( php -d error_reporting=1 - r " echo dirname(realpath('$SOURCE '));" )
11
11
else
12
12
DIR=" $( cd " $( dirname " $SOURCE " ) " && pwd ) "
13
13
fi
17
17
# Valet CLI script which is written in PHP. Will use PHP to do it.
18
18
if [ ! -f " $DIR /cli/valet.php" ]
19
19
then
20
- DIR=$( php -r " echo realpath('$DIR /../laravel/valet');" )
20
+ DIR=$( php -d error_reporting=1 - r " echo realpath('$DIR /../laravel/valet');" )
21
21
fi
22
22
23
23
# Get a command-line executable we can use for php that's 8+; if this
24
24
# is the inside loop (Valet runs itself 2x in some settings), skip
25
25
# checking and pulling again by reading the exported env var
26
26
if [[ " $PHP_EXECUTABLE " = " " ]]
27
27
then
28
- PHP=" $( php $DIR /find-usable-php.php) "
28
+ PHP=" $( php -d error_reporting=1 $DIR /find-usable-php.php) "
29
29
30
30
# Validate output before running it on the CLI
31
31
if [[ ! -f " $PHP " ]]; then
45
45
# process to retrieve the live the share tool tunnel URL in the background.
46
46
if [[ " $1 " = " share" ]]
47
47
then
48
- SHARETOOL=" $( " $PHP " " $DIR /cli/valet.php" share-tool) "
48
+ SHARETOOL=" $( " $PHP " -d error_reporting=1 " $DIR /cli/valet.php" share-tool) "
49
49
50
50
# Check for parameters to pass through to share tool (these will start with '-' or '--')
51
51
PARAMS=(${@: 2} )
72
72
73
73
# Lowercase the host to match how the rest of our domains are looked up
74
74
HOST=$( echo " $HOST " | tr ' [:upper:]' ' [:lower:]' )
75
- TLD=$( " $PHP " " $DIR /cli/valet.php" tld)
75
+ TLD=$( " $PHP " -d error_reporting=1 " $DIR /cli/valet.php" tld)
76
76
$( grep --quiet --no-messages 443 ~ /.config/valet/Nginx/$HOST * )
77
77
SECURED=$?
78
78
@@ -140,9 +140,9 @@ elif [[ "$1" = "php" ]]
140
140
then
141
141
if [[ $2 == * " --site=" * ]]; then
142
142
SITE=${2#* =}
143
- $( " $PHP " " $DIR /cli/valet.php" which-php $SITE ) " ${@: 3} "
143
+ $( " $PHP " -d error_reporting=1 " $DIR /cli/valet.php" which-php $SITE ) " ${@: 3} "
144
144
else
145
- $( " $PHP " " $DIR /cli/valet.php" which-php) " ${@: 2} "
145
+ $( " $PHP " -d error_reporting=1 " $DIR /cli/valet.php" which-php) " ${@: 2} "
146
146
fi
147
147
148
148
exit
@@ -152,9 +152,9 @@ elif [[ "$1" = "composer" ]]
152
152
then
153
153
if [[ $2 == * " --site=" * ]]; then
154
154
SITE=${2#* =}
155
- $( " $PHP " " $DIR /cli/valet.php" which-php $SITE ) $( which composer) " ${@: 3} "
155
+ $( " $PHP " -d error_reporting=1 " $DIR /cli/valet.php" which-php $SITE ) $( which composer) " ${@: 3} "
156
156
else
157
- $( " $PHP " " $DIR /cli/valet.php" which-php) $( which composer) " ${@: 2} "
157
+ $( " $PHP " -d error_reporting=1 " $DIR /cli/valet.php" which-php) $( which composer) " ${@: 2} "
158
158
fi
159
159
160
160
exit
169
169
exit
170
170
fi
171
171
172
- " $PHP " " $DIR /cli/valet.php" " $@ "
172
+ " $PHP " -d error_reporting=1 " $DIR /cli/valet.php" " $@ "
173
173
fi
0 commit comments