Skip to content

Commit

Permalink
Added support for PHP 8.4 (#130) (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
intuibase authored Nov 25, 2024
1 parent 0e8d560 commit c137dd4
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{ "name": "Sergey Kleyman" }
],
"require": {
"php": "8.0.*||8.1.*||8.2.*||8.3.*",
"php": "8.1.*||8.2.*||8.3.*||8.4.*",
"open-telemetry/exporter-otlp": "1.0.4",
"open-telemetry/opentelemetry-auto-curl": "0.0.2",
"open-telemetry/opentelemetry-auto-http-async": "1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion elastic-otel-php.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.2.0
supported_php_versions=(81 82 83)
supported_php_versions=(81 82 83 84)
php_headers_version=2.0
logger_features_enum_values=ALL=0,MODULE=1,REQUEST=2,TRANSPORT=3,BOOTSTRAP=4,HOOKS=5,INSTRUMENTATION=6,OTEL=7
1 change: 1 addition & 0 deletions prod/native/building/conan/profiles/linux-arm64-release
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ CC=/opt/gcc-14.2.0/bin/gcc
CXX=/opt/gcc-14.2.0/bin/g++
LDFLAGS+=-static-libgcc
LDFLAGS+=-static-libstdc++
CC_FOR_BUILD=/opt/gcc-14.2.0/bin/gcc
1 change: 1 addition & 0 deletions prod/native/building/conan/profiles/linux-x86-64-release
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ CC=/opt/gcc-14.2.0/bin/gcc
CXX=/opt/gcc-14.2.0/bin/g++
LDFLAGS+=-static-libgcc
LDFLAGS+=-static-libstdc++
CC_FOR_BUILD=/opt/gcc-14.2.0/bin/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ CC=/opt/gcc-14.2.0/bin/gcc
CXX=/opt/gcc-14.2.0/bin/g++
LDFLAGS+=-static-libgcc
LDFLAGS+=-static-libstdc++
CC_FOR_BUILD=/opt/gcc-14.2.0/bin/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ CC=/opt/gcc-14.2.0/bin/gcc
CXX=/opt/gcc-14.2.0/bin/g++
LDFLAGS+=-static-libgcc
LDFLAGS+=-static-libstdc++
CC_FOR_BUILD=/opt/gcc-14.2.0/bin/gcc
6 changes: 3 additions & 3 deletions prod/native/building/dependencies/php-headers/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ sources:
contentsRoot: "php-{}"
"84":
linux:
version: "8.4.0RC2"
url: "https://github.com/php/php-src/archive/refs/tags/php-{}.tar.gz"
contentsRoot: "php-src-php-{}"
version: "8.4.1"
url: "https://www.php.net/distributions/php-{}.tar.gz"
contentsRoot: "php-{}"
4 changes: 2 additions & 2 deletions prod/native/building/dependencies/php-headers/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def requirements(self):
self.requires("libxml2/2.9.9")
self.requires("sqlite3/3.46.1")

# def build_requirements(self):
# self.tool_requires("bison/3.8.2")
def build_requirements(self):
self.tool_requires("bison/3.8.2")

def init(self):
self.source_temp_dir = "php-src"
Expand Down
1 change: 1 addition & 0 deletions prod/native/conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gtest/1.15.0
php-headers-81/2.0
php-headers-82/2.0
php-headers-83/2.0
php-headers-84/2.0

[layout]
cmake_layout
Expand Down
2 changes: 1 addition & 1 deletion prod/native/extension/phpt/tests/includes/tests_util.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

declare(strict_types=1);

error_reporting(E_ALL | E_STRICT);
error_reporting(E_ALL);

function elasticApmOnAssertFailure(string $condDesc, string $expr, $actual, $expected)
{
Expand Down
2 changes: 1 addition & 1 deletion prod/native/loader/code/phpdetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ std::tuple<std::string_view, int, int, bool> getZendModuleApiVersion(std::string

// zendEngineVersion, phpVersion, zendModuleApiVersion, isVersionSupported
constexpr std::array<std::tuple<std::string_view, int, int, bool>, knownVersionsCount> knownPhpVersions{{
{"4.4"sv, 84, 20240924, false}, // PHP 8.4
{"4.4"sv, 84, 20240924, true}, // PHP 8.4
{"4.3"sv, 83, 20230831, true}, // PHP 8.3
{"4.2"sv, 82, 20220829, true}, // PHP 8.2
{"4.1"sv, 81, 20210902, true}, // PHP 8.1
Expand Down

0 comments on commit c137dd4

Please sign in to comment.