mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-25 21:13:04 +07:00
Fix cache support for phalcon4
This commit is contained in:
parent
1fa3ba1b16
commit
bc0d607611
@ -15,7 +15,7 @@ add_phalcon3() {
|
|||||||
if [ "$phalcon_version" != "$extension_major_version" ]; then
|
if [ "$phalcon_version" != "$extension_major_version" ]; then
|
||||||
add_phalcon_helper
|
add_phalcon_helper
|
||||||
else
|
else
|
||||||
echo "extension=phalcon.so" | sudo tee -a "$phalcon_ini_file"
|
enable_extension phalcon extension
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
add_phalcon_helper
|
add_phalcon_helper
|
||||||
@ -24,16 +24,14 @@ add_phalcon3() {
|
|||||||
|
|
||||||
# Function to add phalcon4.
|
# Function to add phalcon4.
|
||||||
add_phalcon4() {
|
add_phalcon4() {
|
||||||
if shared_extension phalcon && ! php -m | grep -i -q -w psr; then
|
enable_extension psr extension
|
||||||
echo "extension=psr.so" | sudo tee -a "${ini_file:?}"
|
|
||||||
fi
|
|
||||||
if shared_extension phalcon; then
|
if shared_extension phalcon; then
|
||||||
if php -m | grep -i -q -w psr; then
|
if check_extension psr; then
|
||||||
phalcon_version=$(php -d="extension=phalcon" -r "echo phpversion('phalcon');" | cut -d'.' -f 1)
|
phalcon_version=$(php -d="extension=phalcon" -r "echo phpversion('phalcon');" | cut -d'.' -f 1)
|
||||||
if [ "$phalcon_version" != "$extension_major_version" ]; then
|
if [ "$phalcon_version" != "$extension_major_version" ]; then
|
||||||
add_phalcon_helper
|
add_phalcon_helper
|
||||||
else
|
else
|
||||||
echo "extension=phalcon.so" | sudo tee -a "$phalcon_ini_file"
|
enable_extension phalcon extension
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
add_phalcon_helper
|
add_phalcon_helper
|
||||||
@ -47,7 +45,6 @@ add_phalcon4() {
|
|||||||
add_phalcon() {
|
add_phalcon() {
|
||||||
extension=$1
|
extension=$1
|
||||||
status='Enabled'
|
status='Enabled'
|
||||||
phalcon_ini_file="${pecl_file:-${ini_file[@]}}"
|
|
||||||
extension_major_version=${extension: -1}
|
extension_major_version=${extension: -1}
|
||||||
if [ "$extension_major_version" = "4" ]; then
|
if [ "$extension_major_version" = "4" ]; then
|
||||||
add_phalcon4 >/dev/null 2>&1
|
add_phalcon4 >/dev/null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user