File tree Expand file tree Collapse file tree 2 files changed +26
-18
lines changed
Expand file tree Collapse file tree 2 files changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,16 @@ if($ThreadSafe) {
8888 $ts = ' ts'
8989}
9090" xdebug" , " pcov" | ForEach-Object { Get-File - Url " https://github.com/shivammathur/php-extensions-windows/releases/latest/download/php$Version `_$ts `_$Architecture `_$_ .dll" - OutFile $Path " \ext\php`_$_ .dll" }
91- $ini_content = @"
92- extension_dir=$Path \ext
93- default_charset=UTF-8
94- zend_extension=php_opcache.dll
95- opcache.enable=1
96- opcache.jit_buffer_size=256M
97- opcache.jit=1235
98- "@
99- Add-Content - Path $Path \php.ini - Value $ini_content
91+ $ini_content = @ (
92+ " extension_dir=$Path \ext"
93+ " default_charset=UTF-8"
94+ " opcache.enable=1"
95+ " opcache.jit_buffer_size=256M"
96+ " opcache.jit=1235"
97+ )
98+ if ($Version -lt [version ]' 8.5' ) {
99+ $ini_content += " zend_extension=php_opcache.dll"
100+ } elseif (Test-Path $Path \ext\php_opcache.dll) {
101+ Remove-Item $Path \ext\php_opcache.dll - Force
102+ }
103+ Add-Content - Path $Path \php.ini - Value ($ini_content -join [Environment ]::NewLine)
Original file line number Diff line number Diff line change @@ -83,12 +83,16 @@ if($ThreadSafe) {
8383 $ts = ' ts'
8484}
8585" xdebug" , " pcov" | ForEach-Object { Get-File - Url " https://github.com/shivammathur/php-extensions-windows/releases/latest/download/php$Version `_$ts `_$Architecture `_$_ .dll" - OutFile $Path " \ext\php`_$_ .dll" }
86- $ini_content = @"
87- extension_dir=$Path \ext
88- default_charset=UTF-8
89- zend_extension=php_opcache.dll
90- opcache.enable=1
91- opcache.jit_buffer_size=256M
92- opcache.jit=1235
93- "@
94- Add-Content - Path $Path \php.ini - Value $ini_content
86+ $ini_content = @ (
87+ " extension_dir=$Path \ext"
88+ " default_charset=UTF-8"
89+ " opcache.enable=1"
90+ " opcache.jit_buffer_size=256M"
91+ " opcache.jit=1235"
92+ )
93+ if ($Version -lt [version ]' 8.5' ) {
94+ $ini_content += " zend_extension=php_opcache.dll"
95+ } elseif (Test-Path $Path \ext\php_opcache.dll) {
96+ Remove-Item $Path \ext\php_opcache.dll - Force
97+ }
98+ Add-Content - Path $Path \php.ini - Value ($ini_content -join [Environment ]::NewLine)
You can’t perform that action at this time.
0 commit comments