mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 00:40:06 +01:00
fix: Warning: Constant VALET_* already defined in X
Similar issue as in https://github.com/laravel/prompts/pull/146. To make packages like `symfony/var-dumper` available globally you prepend the global Composer autoload.php like so: ``` // php.ini auto_prepend_file = ${HOME}/.composer/vendor/autoload.php ``` In Valet this can result in ``` ( ! ) Warning: Constant VALET_HOME_PATH already defined in ~/.composer/vendor/laravel/valet/server.php on line 12 Call Stack # Time Memory Function Location 1 0.0354 571296 {main}( ) .../server.php:0 2 0.0380 571488 define( $constant_name = 'VALET_HOME_PATH', $value = '~/.config/valet' ) .../server.php:12 ( ! ) Warning: Constant VALET_STATIC_PREFIX already defined in ~/.composer/vendor/laravel/valet/server.php on line 13 Call Stack # Time Memory Function Location 1 0.0354 571296 {main}( ) .../server.php:0 ```
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
/**
|
/**
|
||||||
* Define the user's "~/.config/valet" path.
|
* Define the user's "~/.config/valet" path.
|
||||||
*/
|
*/
|
||||||
define('VALET_HOME_PATH', posix_getpwuid(fileowner(__FILE__))['dir'].'/.config/valet');
|
defined('VALET_HOME_PATH') or define('VALET_HOME_PATH', posix_getpwuid(fileowner(__FILE__))['dir'].'/.config/valet');
|
||||||
define('VALET_STATIC_PREFIX', '41c270e4-5535-4daa-b23e-c269744c2f45');
|
defined('VALET_STATIC_PREFIX') or define('VALET_STATIC_PREFIX', '41c270e4-5535-4daa-b23e-c269744c2f45');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the Valet configuration.
|
* Load the Valet configuration.
|
||||||
|
|||||||
Reference in New Issue
Block a user