Commit e355121b authored by Ludwig Ruderstaller's avatar Ludwig Ruderstaller

Enable xdebug for php 8

parent 6a5cfb1b
......@@ -118,6 +118,18 @@ before_script:
##########################################
8.0-cli-xdebug:
stage: build.xdebug
tags:
- autoscale
when: manual
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/cli-xdebug:8.0.0beta1" -t "$CI_REGISTRY_IMAGE/cli-xdebug:8.0" "dist/8.0/cli-xdebug"
- docker push "$CI_REGISTRY_IMAGE/cli-xdebug:8.0.0beta1"
- docker push "$CI_REGISTRY_IMAGE/cli-xdebug:8.0"
##########################################
7.1-fpm:
stage: build
tags:
......@@ -226,3 +238,15 @@ before_script:
##########################################
8.0-fpm-xdebug:
stage: build.xdebug
tags:
- autoscale
when: manual
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/fpm-xdebug:8.0.0beta1" -t "$CI_REGISTRY_IMAGE/fpm-xdebug:8.0" "dist/8.0/fpm-xdebug"
- docker push "$CI_REGISTRY_IMAGE/fpm-xdebug:8.0.0beta1"
- docker push "$CI_REGISTRY_IMAGE/fpm-xdebug:8.0"
##########################################
FROM dockerhub.cwd.at/docker/php/cli:8.0
RUN set -xe \
&& apk add --no-cache --virtual .build-deps \
tzdata \
git \
$PHPIZE_DEPS \
&& git clone git://github.com/xdebug/xdebug.git \
&& cd xdebug \
&& phpize \
&& ./configure --enable-xdebug \
&& make -j2 \
&& make install \
&& docker-php-ext-enable xdebug \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& apk del .build-deps \
&& rm -rf /tmp/* /var/cache/apk/* \
&& echo "error_reporting = E_ALL" > /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.default_enable = 0" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "display_errors = On" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.idekey=\"PHPSTORM\"" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/custom-xdebug.ini
From 7f1f2f9688d6ca75d99235ccfac3693f281fe2c9 Mon Sep 17 00:00:00 2001
From: Jeroen <jeroenooms@gmail.com>
Date: Thu, 9 Aug 2018 17:34:30 +0200
Subject: [PATCH] Fix for LibreSSL 2.7 LibreSSL version 2.7.0 and up use the
OpenSSL 1.1 API See also: https://wiki.freebsd.org/LibreSSL
---
src/libmongoc/src/mongoc/mongoc-crypto-openssl.c | 2 +-
src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c | 2 +-
src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c b/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c
index 6e4f7587e..476f0b6ce 100644
--- a/src/libmongoc/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c
+++ b/src/libmongoc/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c
@@ -38,7 +38,7 @@ mongoc_crypto_openssl_hmac_sha1 (mongoc_crypto_t *crypto,
HMAC (EVP_sha1 (), key, key_len, data, data_len, hmac_out, NULL);
}
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
EVP_MD_CTX *
EVP_MD_CTX_new (void)
{
diff --git a/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c b/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c
index 59aa4f02a..f79232a16 100644
--- a/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c
+++ b/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c
@@ -39,7 +39,7 @@
#define MONGOC_LOG_DOMAIN "stream-tls-openssl-bio"
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
/* Magic vtable to make our BIO shim */
static BIO_METHOD gMongocStreamTlsOpenSslRawMethods = {
diff --git a/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c b/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c
index ecfcfa306..9e2694dd4 100644
--- a/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c
+++ b/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c
@@ -45,7 +45,7 @@
#define MONGOC_STREAM_TLS_OPENSSL_BUFFER_SIZE 4096
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
static void
BIO_meth_free (BIO_METHOD *meth)
{
FROM dockerhub.cwd.at/docker/php/fpm:8.0
RUN set -xe \
&& apk add --no-cache --virtual .build-deps \
tzdata \
git \
$PHPIZE_DEPS \
&& git clone git://github.com/xdebug/xdebug.git \
&& cd xdebug \
&& phpize \
&& ./configure --enable-xdebug \
&& make -j2 \
&& make install \
&& docker-php-ext-enable xdebug \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& apk del .build-deps \
&& rm -rf /tmp/* /var/cache/apk/* \
&& echo "error_reporting = E_ALL" > /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.default_enable = 0" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "display_errors = On" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.idekey=\"PHPSTORM\"" >> /usr/local/etc/php/conf.d/custom-xdebug.ini \
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/custom-xdebug.ini
From 7f1f2f9688d6ca75d99235ccfac3693f281fe2c9 Mon Sep 17 00:00:00 2001
From: Jeroen <jeroenooms@gmail.com>
Date: Thu, 9 Aug 2018 17:34:30 +0200
Subject: [PATCH] Fix for LibreSSL 2.7 LibreSSL version 2.7.0 and up use the
OpenSSL 1.1 API See also: https://wiki.freebsd.org/LibreSSL
---
src/libmongoc/src/mongoc/mongoc-crypto-openssl.c | 2 +-
src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c | 2 +-
src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c b/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c
index 6e4f7587e..476f0b6ce 100644
--- a/src/libmongoc/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c
+++ b/src/libmongoc/src/libmongoc/src/mongoc/mongoc-crypto-openssl.c
@@ -38,7 +38,7 @@ mongoc_crypto_openssl_hmac_sha1 (mongoc_crypto_t *crypto,
HMAC (EVP_sha1 (), key, key_len, data, data_len, hmac_out, NULL);
}
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
EVP_MD_CTX *
EVP_MD_CTX_new (void)
{
diff --git a/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c b/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c
index 59aa4f02a..f79232a16 100644
--- a/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c
+++ b/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c
@@ -39,7 +39,7 @@
#define MONGOC_LOG_DOMAIN "stream-tls-openssl-bio"
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
/* Magic vtable to make our BIO shim */
static BIO_METHOD gMongocStreamTlsOpenSslRawMethods = {
diff --git a/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c b/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c
index ecfcfa306..9e2694dd4 100644
--- a/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c
+++ b/src/libmongoc/src/libmongoc/src/mongoc/mongoc-stream-tls-openssl.c
@@ -45,7 +45,7 @@
#define MONGOC_STREAM_TLS_OPENSSL_BUFFER_SIZE 4096
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
static void
BIO_meth_free (BIO_METHOD *meth)
{
......@@ -23,7 +23,7 @@
"8.0": {
"tags": ["8.0.0beta1", "8.0"],
"image": "php:8.0.0beta1-alpine",
"use_xdebug": false
"use_xdebug": true
}
},
......@@ -52,7 +52,7 @@
"8.0": {
"tags": ["8.0.0beta1", "8.0"],
"image": "php:8.0.0beta1-fpm-alpine",
"use_xdebug": false
"use_xdebug": true
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment