Repository navigation
Expand file tree
/
Copy pathinstall.yaml
More file actions
70 lines (66 loc) · 3.12 KB
/
Copy pathinstall.yaml
File metadata and controls
70 lines (66 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: frankenphp
project_files:
- config.frankenphp.yaml
- docker-compose.frankenphp.yaml
- web-build/Caddyfile.frankenphp
- web-build/Dockerfile.frankenphp
- web-build/pre.Dockerfile.frankenphp
pre_install_actions:
- |
#ddev-description:Checking PHP version compatibility
UNSUPPORTED_PHP_VERSIONS=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1")
if [[ " ${UNSUPPORTED_PHP_VERSIONS[*]} " == *" ${DDEV_PHP_VERSION} "* ]]; then
echo "FrankenPHP is not supported for PHP version ${DDEV_PHP_VERSION}."
echo "Please upgrade your project to at least PHP 8.2 to use FrankenPHP."
echo "Run 'ddev config --php-version=8.2' to upgrade your PHP version."
exit 2
fi
- |
#ddev-description:Removing old files
files=(
"${DDEV_APPROOT}/.ddev/commands/host/xdebug"
"${DDEV_APPROOT}/.ddev/php/docker-php-ext-xdebug.ini"
"${DDEV_APPROOT}/.ddev/frankenphp/Caddyfile"
"${DDEV_APPROOT}/.ddev/commands/frankenphp/php"
"${DDEV_APPROOT}/.ddev/frankenphp/Dockerfile"
"${DDEV_APPROOT}/.ddev/web-build/prepend.Dockerfile.frankenphp"
)
for file in "${files[@]}"; do
if [ -f "${file}" ]; then
if grep -q '#ddev-generated' "${file}"; then
rm -f "${file}"
else
echo "${file} needs to be removed but has been modified by the user. Please check it and remove it"
exit 2
fi
fi
done
- |
#ddev-description:Checking for old configuration in .ddev/.env.web
if grep -q 'FRANKENPHP_DEBIAN_CODENAME=' "${DDEV_APPROOT}/.ddev/.env.web" 2>/dev/null; then
echo "You have FRANKENPHP_DEBIAN_CODENAME set in your .ddev/.env.web which is no longer needed."
echo "Remove it from '${DDEV_APPROOT}/.ddev/.env.web' or delete the file and try again."
exit 2
fi
if grep -q 'FRANKENPHP_DEFAULT_EXTENSIONS=' "${DDEV_APPROOT}/.ddev/.env.web" 2>/dev/null; then
echo "You have FRANKENPHP_DEFAULT_EXTENSIONS set in your .ddev/.env.web which is no longer needed."
echo "Remove it from '${DDEV_APPROOT}/.ddev/.env.web' or delete the file and try again."
exit 2
fi
if grep -q 'FRANKENPHP_CUSTOM_EXTENSIONS=' "${DDEV_APPROOT}/.ddev/.env.web" 2>/dev/null; then
echo "You have FRANKENPHP_CUSTOM_EXTENSIONS set in your .ddev/.env.web which is no longer needed."
echo "Remove it from '${DDEV_APPROOT}/.ddev/.env.web' or delete the file and try again."
echo "Extra PHP extensions should now be installed via webimage_extra_packages, see https://github.com/ddev/ddev-frankenphp"
echo "For example, to install the grpc extension, add 'php-zts-grpc' to webimage_extra_packages in your .ddev/config.yaml"
exit 2
fi
post_install_actions:
- |
#ddev-description:Removing PHP extensions not available for PHP 8.6
# TODO: Remove when memcached and redis are available for PHP 8.6
config_file="${DDEV_APPROOT}/.ddev/config.frankenphp.yaml"
if [ "${DDEV_PHP_VERSION}" = "8.6" ] && grep -q '#ddev-generated' "${config_file}"; then
sed -i.bak '/php-zts-memcached/d; /php-zts-redis/d' "${config_file}"
rm -f "${config_file}.bak"
fi
ddev_version_constraint: '>= v1.24.10'