mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Create php-memory-limits.ini only one time
Change how the php-memory-limits.ini is managed because when changed between PHP versions all the configuration added previously is overrided and it a waste of time if you work with several PHP versions during the day
This commit is contained in:
@@ -82,10 +82,12 @@ public function createConfigurationFiles(string $phpVersion): void
|
|||||||
$destDir = dirname(dirname($fpmConfigFile)).'/conf.d';
|
$destDir = dirname(dirname($fpmConfigFile)).'/conf.d';
|
||||||
$this->files->ensureDirExists($destDir, user());
|
$this->files->ensureDirExists($destDir, user());
|
||||||
|
|
||||||
$this->files->putAsUser(
|
if (!file_exists($destDir.'/php-memory-limits.ini')) {
|
||||||
$destDir.'/php-memory-limits.ini',
|
$this->files->putAsUser(
|
||||||
$this->files->getStub('php-memory-limits.ini')
|
$destDir.'/php-memory-limits.ini',
|
||||||
);
|
$this->files->getStub('php-memory-limits.ini')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$contents = str_replace(
|
$contents = str_replace(
|
||||||
['VALET_USER', 'VALET_HOME_PATH'],
|
['VALET_USER', 'VALET_HOME_PATH'],
|
||||||
|
|||||||
Reference in New Issue
Block a user