From 2a23ef7eb5a87622379884c4cb3db6cb8eeca9f5 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 23:35:09 +0200 Subject: [PATCH 01/15] feature(ci): add release github actions Signed-off-by: Dusan Malusev --- .github/workflows/release.yml | 54 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 - scripts/scyladb-driver | 1 - 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 160000 scripts/scyladb-driver diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..a1184b504 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,54 @@ +name: "Release" + +permissions: + contents: write + +on: + push: + tags: + - "v*" + +jobs: + tag: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.version_tag.outputs.tag }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Get Tag + if: startsWith(github.ref, 'refs/tags/v') + uses: olegtarasov/get-tag@v2.1.3 + id: version_tag + with: + tagRegex: "v(.*)" + release: + runs-on: ubuntu-latest + needs: tag + steps: + - name: Release + uses: softprops/action-gh-release@v2 + id: release + with: + make_latest: true + name: "v${{ needs.tag.outputs.version }}" + tag_name: "v${{ needs.tag.outputs.version }}" + generate_release_notes: true + append_body: true + prerelease: false + fail_on_unmatched_files: true + - name: "Generate release changelog" + uses: heinrichreimer/action-github-changelog-generator@v2.4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + author: true + releaseUrl: ${{ steps.release.outputs.url }} + issues: false + pullRequests: true + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Update CHANGELOG.md" + branch: v1.3.x + commit_options: '--no-verify --signoff' + file_pattern: CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 1245d8093..344c32807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ -# Development # 1.3.10 diff --git a/scripts/scyladb-driver b/scripts/scyladb-driver deleted file mode 160000 index fa0f27069..000000000 --- a/scripts/scyladb-driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fa0f27069a625057984d1fa58f434ea99b86c83f From 863b7dffaf9829d0504da4a246672bc794184a9e Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Mon, 12 Aug 2024 00:01:04 +0200 Subject: [PATCH 02/15] fix(ci): use issues in the changelog that are closed Signed-off-by: Dusan Malusev --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1184b504..f431048c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} author: true releaseUrl: ${{ steps.release.outputs.url }} - issues: false + issues: true pullRequests: true - uses: stefanzweifel/git-auto-commit-action@v5 with: From e9cdbf7474ac859d7458cd88fc9d2bdb8a37d8a4 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 22:52:32 +0200 Subject: [PATCH 03/15] feature(dockerimage): better docker image 1. Support for mutilple ubuntu versions (22.04, 24.04) 2. Foundations for Release builds to be provided from GitHub release cassandra.so will be provided in GitHub Releases having ubuntu 22.04 (possibly 20.04) we can have better compatiblity with systems (and libraries -> mainly glibc) that are running in production without users having to download the source and build for every patch release 3. fix install path inside docker image -> CIScylla and CICassandra Signed-off-by: Dusan Malusev --- .github/workflows/docker-image.yml | 17 ++- .github/workflows/test-images.yml | 2 + .github/workflows/test.yml | 15 +- CMakePresets.json | 6 +- docker/Dockerfile | 229 +++++++++++++++++++++-------- scripts/compile-php.sh | 10 +- 6 files changed, 194 insertions(+), 85 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2fec24956..8f697b48a 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -9,6 +9,11 @@ on: zts: description: 'ZTS (Zend Thread Safety)' required: true + ubuntu_version: + type: string + description: 'Ubuntu Version' + required: false + default: '22.04' workflow_call: inputs: php: @@ -19,6 +24,11 @@ on: type: string description: 'ZTS (Zend Thread Safety)' required: true + ubuntu_version: + type: string + description: 'Ubuntu Version' + required: false + default: '22.04' secrets: DOCKER_USERNAME: required: true @@ -53,13 +63,15 @@ jobs: pull: true platforms: linux/amd64 target: base - tags: malusevd99/scylladb-php-driver:php-${{ inputs.php }}-zts + tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-php-${{ inputs.php }}-zts cache-from: type=gha cache-to: type=gha,mode=max build-args: | PHP_VERSION=${{ inputs.php }} PHP_ZTS=${{ inputs.zts }} + UBUNTU_VERSION=${{ inputs.ubuntu_version }} PHP_DEBUG="yes" + - name: Build and push API id: docker_build_nts uses: docker/build-push-action@v5 @@ -71,10 +83,11 @@ jobs: pull: true platforms: linux/amd64 target: base - tags: malusevd99/scylladb-php-driver:php-${{ inputs.php }} + tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-php-${{ inputs.php }} cache-from: type=gha cache-to: type=gha,mode=max build-args: | PHP_VERSION=${{ inputs.php }} PHP_ZTS=${{ inputs.zts }} + UBUNTU_VERSION=${{ inputs.ubuntu_version }} PHP_DEBUG="yes" diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index fa2c658ac..1eef5a8a3 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -12,10 +12,12 @@ jobs: matrix: tag: ['8.1.29', '8.2.20', '8.3.8'] zts: [yes, no] + ubuntu_version: ['22.04', '24.04'] uses: "./.github/workflows/docker-image.yml" with: php: ${{ matrix.tag }} zts: ${{ matrix.zts }} + ubuntu_version: ${{ matrix.ubuntu_version }} secrets: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a64f98aa..645c0acf7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,10 +13,10 @@ jobs: strategy: matrix: php: ['8.1.29', '8.2.20', '8.3.8', '8.1.29-zts', '8.2.20-zts', '8.3.8-zts'] - os: ['ubuntu-latest'] + os: ['ubuntu-24.04'] preset: ['CICassandra', 'CIScylla'] - runs-on: ${{ matrix.os }} - container: malusevd99/scylladb-php-driver:php-${{ matrix.php }} + runs-on: ubuntu-latest + container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }} steps: - uses: actions/checkout@v4 with: @@ -24,19 +24,14 @@ jobs: submodules: recursive - name: Run tests run: | - export PATH="$PATH:/usr/local/bin:/root/php/bin" - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib/x86_64-linux-gnu:/usr/local/lib/:/usr/lib:/lib:/usr/local/lib/x86_64-linux-gnu" - cmake --preset ${{ matrix.preset }} || exit 1 cd out/${{ matrix.preset }} || exit 1 ninja install || exit 1 cd ../../ - PHP_INI=$("php" --ini | grep "php.ini" | awk '{ print $5 }' | xargs -I {} printf '%s/php.ini' {}) - - cat cassandra.ini >> "$PHP_INI" || exit 1 + cat cassandra.ini >> "$(php-config --ini-path | xargs -I {} printf '%s/php.ini' {})" || exit 1 cd tests - php /bin/composer install + composer install php ./vendor/bin/pest diff --git a/CMakePresets.json b/CMakePresets.json index a4b603d13..5a3318c39 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -102,11 +102,10 @@ "binaryDir": "${sourceDir}/out/${presetName}", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithInfo", - "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}", "PHP_SCYLLADB_ENABLE_SANITIZERS": "ON", "SANITIZE_UNDEFINED": "ON", "SANITIZE_ADDRESS": "ON", - "CUSTOM_PHP_CONFIG": "/root/php/bin/php-config" + "CUSTOM_PHP_CONFIG": "/php/bin/php-config" } }, { @@ -118,11 +117,10 @@ "binaryDir": "${sourceDir}/out/${presetName}", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithInfo", - "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}", "PHP_SCYLLADB_ENABLE_SANITIZERS": "ON", "SANITIZE_UNDEFINED": "ON", "SANITIZE_ADDRESS": "ON", - "CUSTOM_PHP_CONFIG": "/root/php/bin/php-config" + "CUSTOM_PHP_CONFIG": "/php/bin/php-config" } } ] diff --git a/docker/Dockerfile b/docker/Dockerfile index cb0b39936..271a6113d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,82 +1,183 @@ -FROM ubuntu:24.04 as base +ARG UBUNTU_VERSION="24.04" -ARG PHP_VERSION=8.3.8 -ARG PHP_ZTS="no" +FROM ubuntu:$UBUNTU_VERSION AS base -ENV PATH="$PATH:$HOME/.local/bin:$HOME/php/bin" -ENV LD_LIBRARY_PATH="/lib/x86_64-linux-gnu/:/usr/local/lib/:/usr/lib:/lib:/lib64" +ARG LIBUV_VERSION="v1.48.0" +ARG LIBUV_BUILD_TYPE="RelWithInfo" +ARG LIBUV_REPO="https://github.com/libuv/libuv.git" -RUN apt-get update -y \ - && apt-get upgrade -y \ +ENV CC="gcc" +ENV CXX="g++" + +ENV CFLAGS="-fPIC" +ENV CXXFLAGS="-fPIC" +ENV CMAKE_CXX_COMPILER_LAUNCHER="ccache" +ENV PATH="$PATH:/usr/local/bin" +ENV LD_LIBRARY_PATH="/lib/x86_64-linux-gnu:/usr/local/lib:/usr/lib:/lib:/lib64:/usr/local/lib/x86_64-linux-gnu" +ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" +ENV DEBIAN_FRONTEND="noninteractive" +ENV TZ="UTC" + +RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime \ + && echo "$TZ" > /etc/timezone \ + && apt-get update -y \ && apt-get install -y \ - autoconf \ - pkg-config \ - sudo \ - wget \ - git \ - gcc \ - g++ \ - gdb \ - python3 \ - python3-pip \ - unzip \ - plocate \ - build-essential \ - ninja-build \ - libasan8 \ - libssl-dev \ - libubsan1 \ - cmake \ - pipx \ - libssl-dev \ - bison \ - re2c \ - libxml2-dev \ - libicu-dev \ - libsqlite3-dev \ - zlib1g-dev \ - libcurl4-openssl-dev \ - libreadline-dev \ - libffi-dev \ - libonig-dev \ - libsodium-dev \ - libgmp-dev \ - libasan8 \ - libubsan1 \ - libzip-dev \ - && pipx install cqlsh + pkg-config \ + ccache \ + wget \ + git \ + gcc \ + g++ \ + clang \ + build-essential \ + ninja-build \ + libasan8 \ + libubsan1 \ + libssl-dev \ + zlib1g-dev \ + libasan8 \ + libubsan1 \ + cmake + +RUN git clone --depth 1 $LIBUV_REPO /libuv-src \ + && cd libuv-src \ + && git fetch --tags \ + && git checkout -b $LIBUV_VERSION tags/$LIBUV_VERSION \ + && mkdir build \ + && cd build \ + && LDFLAGS="-flto -g" cmake -G Ninja \ + -DBUILD_TESTING=OFF \ + -DBUILD_BENCHMARKS=OFF \ + -DLIBUV_BUILD_SHARED=ON \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_BUILD_TYPE="$LIBUV_BUILD_TYPE" .. \ + && ninja install \ + && cd .. rm -rf build + +FROM base AS php_build + +ARG PHP_VERSION="8.3.8" +ARG PHP_ZTS="no" +ARG PHP_DEBUG="no" +ARG PHP_MEM_SANITIZERS="no" COPY ./scripts /tmp/scripts -WORKDIR /tmp +RUN apt-get -y install \ + bison \ + autoconf \ + re2c \ + libxml2-dev \ + libicu-dev \ + libsqlite3-dev \ + zlib1g-dev \ + libcurl4-openssl-dev \ + libffi-dev \ + libonig-dev \ + libzip-dev -RUN ./scripts/compile-php.sh -v $PHP_VERSION -o $HOME -s -d no -zts $PHP_ZTS \ - && $HOME/php/bin/php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && $HOME/php/bin/php composer-setup.php --install-dir=/bin --filename=composer \ - && $HOME/php/bin/php -r "unlink('composer-setup.php');" \ +ENV PATH="$PATH:/php/bin" + +RUN /tmp/scripts/compile-php.sh -v $PHP_VERSION -o /php -s $PHP_MEM_SANITIZERS -d $PHP_DEBUG -z $PHP_ZTS \ + && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ + && php composer-setup.php --install-dir=/php/bin --filename=composer \ + && chmod +x /php/bin/composer \ + && php -r "unlink('composer-setup.php');" \ && rm -rf /tmp/scripts -RUN git clone --depth 1 -b v1.46.0 https://github.com/libuv/libuv.git \ - && cd libuv \ - && mkdir build \ - && cd build \ - && cmake -DBUILD_TESTING=OFF -DBUILD_BENCHMARKS=OFF -DLIBUV_BUILD_SHARED=ON CMAKE_C_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE="RelWithInfo" -G Ninja .. \ - && ninja install \ - && cd ../.. \ - && rm -rf libuv +COPY ./docker/php.ini /php/lib/php.ini + +FROM base AS scylladb_cpp_driver_build + +ARG SCYLLADB_DRIVER_BUILD_TYPE="RelWithInfo" +ARG SCYLLADB_DRIVER_REPO="https://github.com/scylladb/cpp-driver.git" + +ENV CXXFLAGS="-fPIC -Wno-error=redundant-move" +ENV LDFLAGS="-flto -g" -RUN git clone --depth 1 https://github.com/scylladb/cpp-driver.git scylladb-driver \ - && cd scylladb-driver \ +RUN git clone --depth 1 $SCYLLADB_DRIVER_REPO /scylladb-cpp-src \ + && cd /scylladb-cpp-src \ && mkdir build \ && cd build \ - && cmake -DCASS_CPP_STANDARD=17 -DCASS_BUILD_STATIC=ON -DCASS_BUILD_SHARED=ON -DCASS_USE_STD_ATOMIC=ON -DCASS_USE_TIMERFD=ON -DCASS_USE_LIBSSH2=ON -DCASS_USE_ZLIB=ON CMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC -Wno-error=redundant-move" -DCMAKE_BUILD_TYPE="RelWithInfo" -G Ninja .. \ + && cmake -G Ninja \ + -DCASS_CPP_STANDARD=17 \ + -DCASS_BUILD_STATIC=ON \ + -DCASS_BUILD_SHARED=ON \ + -DCASS_USE_STD_ATOMIC=ON \ + -DCASS_USE_STATIC_LIBS=ON \ + -DCASS_USE_TIMERFD=ON \ + -DCASS_USE_LIBSSH2=ON \ + -DCASS_USE_ZLIB=ON \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="OFF" \ + -DCMAKE_INSTALL_PREFIX="/scylladb-cpp" \ + -DCMAKE_BUILD_TYPE="$SCYLLADB_DRIVER_BUILD_TYPE" .. \ && ninja install \ - && cd ../.. + && cd ../ && rm -rf build + +FROM base AS cassandra_cpp_driver_build + +ARG CASSANDRA_DRIVER_BUILD_TYPE="RelWithInfo" +ARG CASSANDRA_DRIVER_REPO="https://github.com/datastax/cpp-driver.git" + +ENV CXXFLAGS="-fPIC -Wno-error=redundant-move" +ENV LDFLAGS="-flto -g" -RUN git clone --depth 1 https://github.com/datastax/cpp-driver.git cassandra-driver \ - && cd cassandra-driver \ +RUN git clone --depth 1 $CASSANDRA_DRIVER_REPO /cassandra-cpp-src \ + && cd /cassandra-cpp-src \ && mkdir build \ && cd build \ - && cmake -DCASS_CPP_STANDARD=17 -DCASS_BUILD_STATIC=ON -DCASS_BUILD_SHARED=ON -DCASS_USE_STD_ATOMIC=ON -DCASS_USE_TIMERFD=ON -DCASS_USE_LIBSSH2=ON -DCASS_USE_ZLIB=ON CMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC -Wno-error=redundant-move" -DCMAKE_BUILD_TYPE="RelWithInfo" -G Ninja .. \ + && cmake -G Ninja \ + -DCASS_CPP_STANDARD=17 \ + -DCASS_BUILD_STATIC=ON \ + -DCASS_BUILD_SHARED=ON \ + -DCASS_USE_STD_ATOMIC=ON \ + -DCASS_USE_TIMERFD=ON \ + -DCASS_USE_LIBSSH2=ON \ + -DCASS_USE_STATIC_LIBS=ON \ + -DCASS_USE_ZLIB=ON \ + -DCASS_BUILD_TESTS=OFF \ + -DCASS_BUILD_EXAMPLES=OFF \ + -DCASS_BUILD_UNIT_TESTS=OFF \ + -DCASS_BUILD_INTEGRATION_TESTS=OFF \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_EXPORT_COMPILE_COMMANDS="OFF" \ + -DCMAKE_INSTALL_PREFIX="/cassandra-cpp" \ + -DCMAKE_BUILD_TYPE="$CASSANDRA_DRIVER_BUILD_TYPE" \ + .. \ && ninja install \ - && cd ../.. + && cd ../ && rm -rf build + +FROM base AS final + +COPY --from=cassandra_cpp_driver_build /cassandra-cpp /cassandra-cpp +COPY --from=cassandra_cpp_driver_build /cassandra-cpp-src /cassandra-cpp-src + +COPY --from=scylladb_cpp_driver_build /scylladb-cpp /scylladb-cpp +COPY --from=scylladb_cpp_driver_build /scylladb-cpp-src /scylladb-cpp-src +COPY --from=php_build /php /php + +ENV PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/cassandra-cpp/lib/pkgconfig:/scylladb-cpp/lib/pkgconfig" +ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/scylladb-cpp/lib:/cassandra-cpp/lib" +ENV PATH="$PATH:/root/.local/bin:/php/bin" + +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y \ + pipx \ + gdb \ + python3 \ + python3-pip \ + unzip \ + plocate \ + clang-format \ + lldb \ + libonig5 \ + libgmp-dev \ + vim \ + ca-certificates \ + procps \ + curl \ + wget \ + && pipx install cqlsh \ + && updatedb \ No newline at end of file diff --git a/scripts/compile-php.sh b/scripts/compile-php.sh index ccbcc9b59..3a9a02930 100755 --- a/scripts/compile-php.sh +++ b/scripts/compile-php.sh @@ -168,7 +168,7 @@ compile_php() { --enable-calendar ) - local OUTPUT_PATH="$OUTPUT/php/" + local OUTPUT_PATH="$OUTPUT" if [[ "$WITHOUT_VERSION" == "yes" ]]; then OUTPUT_PATH="$OUTPUT_PATH/$PHP_BASE_VERSION" @@ -231,14 +231,14 @@ check_deps() { check_deps -while getopts "v:zo:sdka" option; do +while getopts "v:zo:s:d:ka" option; do case "$option" in "v") PHP_VERSION="$OPTARG" ;; - "z") PHP_ZTS="yes" ;; + "z") PHP_ZTS="$OPTARG" ;; "o") OUTPUT="$OPTARG" ;; - "d") ENABLE_DEBUG="yes" ;; + "d") ENABLE_DEBUG="$OPTARG" ;; "k") KEEP_PHP_SOURCE="yes" ;; - "s") ENABLE_SANITIZERS="yes" ;; + "s") ENABLE_SANITIZERS="$OPTARG" ;; "a") WITHOUT_VERSION="yes" ;; *) print_usage ;; esac From 056e849ef78412575fc6071ae6f07d611373d6dc Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 23:14:56 +0200 Subject: [PATCH 04/15] feature(docker): support ubuntu 20.04 for the base image Signed-off-by: Dusan Malusev --- .github/workflows/test-images.yml | 2 +- docker/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index 1eef5a8a3..e749bd29f 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -12,7 +12,7 @@ jobs: matrix: tag: ['8.1.29', '8.2.20', '8.3.8'] zts: [yes, no] - ubuntu_version: ['22.04', '24.04'] + ubuntu_version: ['20.04', '22.04', '24.04'] uses: "./.github/workflows/docker-image.yml" with: php: ${{ matrix.tag }} diff --git a/docker/Dockerfile b/docker/Dockerfile index 271a6113d..9ae224ba5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,6 +21,8 @@ ENV TZ="UTC" RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime \ && echo "$TZ" > /etc/timezone \ && apt-get update -y \ + && CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d= -f2); [ "$CODENAME" = "focal" ] && apt-get install -y libasan6 \ + || apt-get install -y libasan8 \ && apt-get install -y \ pkg-config \ ccache \ @@ -31,11 +33,9 @@ RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime \ clang \ build-essential \ ninja-build \ - libasan8 \ libubsan1 \ libssl-dev \ zlib1g-dev \ - libasan8 \ libubsan1 \ cmake From 553c5bd8816364912e177438c3570584e25896d6 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 23:15:33 +0200 Subject: [PATCH 05/15] fix(docker): use the correct target in Dockerfile final instead of base Signed-off-by: Dusan Malusev --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8f697b48a..e0fd86034 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -62,7 +62,7 @@ jobs: push: true pull: true platforms: linux/amd64 - target: base + target: final tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-php-${{ inputs.php }}-zts cache-from: type=gha cache-to: type=gha,mode=max @@ -82,7 +82,7 @@ jobs: push: true pull: true platforms: linux/amd64 - target: base + target: final tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-php-${{ inputs.php }} cache-from: type=gha cache-to: type=gha,mode=max From 621f593384973c4e88b85bc78188d860872efd18 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 23:19:30 +0200 Subject: [PATCH 06/15] fix(docker): add missing docker/php.ini file Signed-off-by: Dusan Malusev --- docker/php.ini | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docker/php.ini diff --git a/docker/php.ini b/docker/php.ini new file mode 100644 index 000000000..2cef89243 --- /dev/null +++ b/docker/php.ini @@ -0,0 +1,64 @@ +[PHP] +post_max_size = 100M +upload_max_filesize = 100M +variables_order = EGPCS +output_buffering = 4096 +register_argc_argv = On +request_order = GP +short_open_tag = Off +precision = 14 +max_input_nesting_level = 32 +implicit_flush = Off +serialize_precision = 14 +ignore_user_abort = On +realpath_cache_size = 4096k +zend.enable_gc = On +zend.exception_ignore_args = On +log_errors = On +ignore_repeated_errors = Off +default_mimetype = "text/html" +default_charset = "UTF-8" +enable_dl = Off +file_uploads = On +max_file_uploads = 20 +allow_url_fopen = On +allow_url_include = 0 +default_socket_timeout = 60 +user_agent = "" +zend.detect_unicode = 0 +realpath_cache_ttl = 600 +expose_php = On +error_reporting = E_ALL +display_errors = On +report_memleaks = On +html_errors = On +auto_globals_jit = Off +max_input_time = -1 +max_execution_time = -1 + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = UTC + +[intl] +intl.error_level = E_WARNING +intl.use_exceptions = 1 + +[Pcre] +pcre.recursion_limit = 100000 +pcre.jit = 1 + + + +[opcache] +opcache.jit = disable + +[Assertion] +zend.assertions = 1 +assert.exception = On +assert.warning = On + +[ffi] +ffi.enable = true \ No newline at end of file From d56f66e848dfc0933a3f56e835ac7e41b73335ea Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 23:51:28 +0200 Subject: [PATCH 07/15] fix(docker): use mlocate in 20.04 image and plocate in >=22.04 Signed-off-by: Dusan Malusev --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9ae224ba5..6b05e0b0e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -163,13 +163,14 @@ ENV PATH="$PATH:/root/.local/bin:/php/bin" RUN apt-get update \ && apt-get upgrade -y \ + && CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d= -f2); [ "$CODENAME" = "focal" ] && apt-get install -y mlocate python3.8-venv \ + || apt-get install -y plocate \ && apt-get install -y \ pipx \ gdb \ python3 \ python3-pip \ unzip \ - plocate \ clang-format \ lldb \ libonig5 \ From 403d6aadd69a48451ff0dfba7789938aa8fd4197 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Mon, 12 Aug 2024 00:26:54 +0200 Subject: [PATCH 08/15] fix(composer): fixing issue with installing deps on php 8.1 1. Using lowest required php version (8.1) to install composer deps 2. fixing issue with installing cassandra.ini into php.ini in docker image 3. adding a missing new line in php.ini Signed-off-by: Dusan Malusev --- CMakeLists.txt | 96 ++++---- cassandra.ini | 1 + docker/php.ini | 4 - tests/composer.json | 6 +- tests/composer.lock | 545 +++++++++++++++++++------------------------- 5 files changed, 283 insertions(+), 369 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fdbe780a..a5cfdeb93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,39 +1,37 @@ cmake_minimum_required(VERSION 3.24) -if (POLICY CMP0074) +if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) -endif () +endif() -if (POLICY CMP0054) +if(POLICY CMP0054) cmake_policy(SET CMP0054 NEW) -endif () +endif() -if (POLICY CMP0079) +if(POLICY CMP0079) cmake_policy(SET CMP0079 NEW) -endif () +endif() -if (POLICY CMP0108) +if(POLICY CMP0108) cmake_policy(SET CMP0108 NEW) -endif () +endif() -if (POLICY CMP0109) +if(POLICY CMP0109) cmake_policy(SET CMP0109 NEW) -endif () +endif() -if (POLICY CMP0128) +if(POLICY CMP0128) cmake_policy(SET CMP0128 NEW) -endif () - +endif() project(php-ext-scylladb LANGUAGES C CXX) add_library(ext_scylladb SHARED) # if build type is not set, default to debug -if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") +if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") set(CMAKE_BUILD_TYPE "Debug") -endif () +endif() -include(GNUInstallDirs) include(CheckSymbolExists) include(CheckIncludeFile) include(CMakePackageConfigHelpers) @@ -65,27 +63,27 @@ set(PHP_VERSION_FOR_PHP_CONFIG "8.3" CACHE STRING "PHP version") option(PHP_DEBUG_FOR_PHP_CONFIG "Debug or Release" ON) option(PHP_THREAD_SAFE_FOR_PHP_CONFIG "ZTS(zts) or NTS(nts)" OFF) -if (CMAKE_HOST_APPLE) +if(CMAKE_HOST_APPLE) option(PHP_SCYLLADB_LIBUV_STATIC "Statically link libuv" ON) -else () +else() option(PHP_SCYLLADB_LIBUV_STATIC "Statically link libuv" OFF) -endif () +endif() option(PHP_SCYLLADB_LIBUV_FROM_SRC "Build LibUV from Source" ON) -if (CMAKE_HOST_APPLE) +if(CMAKE_HOST_APPLE) option(PHP_SCYLLADB_LIBSCYLLADB_STATIC "Statically link LibScyllaDB" ON) -else () +else() option(PHP_SCYLLADB_LIBSCYLLADB_STATIC "Statically link LibScyllaDB" OFF) -endif () +endif() option(PHP_SCYLLADB_USE_LIBCASSANDRA "Use DataStax LibCassandra instead of LibScyllaDB" OFF) -if (CMAKE_HOST_APPLE) +if(CMAKE_HOST_APPLE) option(PHP_SCYLLADB_LIBCASSANDRA_STATIC "Statically link LibCassandra" ON) -else () +else() option(PHP_SCYLLADB_LIBCASSANDRA_STATIC "Statically link LibCassandra" OFF) -endif () +endif() find_package(PHPConfig REQUIRED) find_package(PHP REQUIRED) @@ -93,11 +91,11 @@ find_package(Sanitizers REQUIRED) find_package(Libuv REQUIRED) find_package(LibGMP REQUIRED) -if (PHP_SCYLLADB_USE_LIBCASSANDRA) +if(PHP_SCYLLADB_USE_LIBCASSANDRA) find_package(CassandraDriver REQUIRED) -else () +else() find_package(ScyllaDBDriver REQUIRED) -endif () +endif() add_subdirectory(ZendCPP) add_subdirectory(util) @@ -120,19 +118,19 @@ target_sources(ext_scylladb PUBLIC FILE_SET headers TYPE HEADERS FILES "${HEADER target_sources(ext_scylladb PRIVATE php_driver.cpp) target_link_libraries( - ext_scylladb PRIVATE - Zend - ext_scylladb::src - ext_scylladb::utils - ext_scylladb::type - ext_scylladb::datetime - ext_scylladb::database - ext_scylladb::numbers - ext_scylladb::ssl_options - ext_scylladb::exceptions - ext_scylladb::cluster::builder - ext_scylladb::retry_policy - ext_scylladb::timestamp_generator + ext_scylladb PRIVATE + Zend + ext_scylladb::src + ext_scylladb::utils + ext_scylladb::type + ext_scylladb::datetime + ext_scylladb::database + ext_scylladb::numbers + ext_scylladb::ssl_options + ext_scylladb::exceptions + ext_scylladb::cluster::builder + ext_scylladb::retry_policy + ext_scylladb::timestamp_generator ) check_include_file("dlfcn.h" HAVE_DLFCN_H) @@ -148,17 +146,17 @@ check_include_file("unistd.h" HAVE_UNISTD_H) set(HAVE_STRINGS_H 0) configure_file( - config.in - config.h - USE_SOURCE_PERMISSIONS - NEWLINE_STYLE UNIX + config.in + config.h + USE_SOURCE_PERMISSIONS + NEWLINE_STYLE UNIX ) configure_file( - version.h.in - version.h - USE_SOURCE_PERMISSIONS - NEWLINE_STYLE UNIX + version.h.in + version.h + USE_SOURCE_PERMISSIONS + NEWLINE_STYLE UNIX ) target_compile_definitions(ext_scylladb PRIVATE -DCOMPILE_DL_CASSANDRA -DHAVE_CONFIG_H) diff --git a/cassandra.ini b/cassandra.ini index 0bcc37ba8..439a749c0 100644 --- a/cassandra.ini +++ b/cassandra.ini @@ -1,3 +1,4 @@ + extension = cassandra [cassandra] diff --git a/docker/php.ini b/docker/php.ini index 2cef89243..4c28de5eb 100644 --- a/docker/php.ini +++ b/docker/php.ini @@ -51,7 +51,6 @@ pcre.recursion_limit = 100000 pcre.jit = 1 - [opcache] opcache.jit = disable @@ -59,6 +58,3 @@ opcache.jit = disable zend.assertions = 1 assert.exception = On assert.warning = On - -[ffi] -ffi.enable = true \ No newline at end of file diff --git a/tests/composer.json b/tests/composer.json index b1c2425cf..c71f80143 100644 --- a/tests/composer.json +++ b/tests/composer.json @@ -15,12 +15,12 @@ } }, "require": { - "php": "^8.1", - "symfony/process": "^7.1", + "php": "^8.1|^8.2|^8.3", + "symfony/process": "^6", "nesbot/carbon": "^3.5" }, "require-dev": { - "pestphp/pest": "^2.34" + "pestphp/pest": "^2.35" }, "config": { "allow-plugins": { diff --git a/tests/composer.lock b/tests/composer.lock index 021f199be..1268411e1 100644 --- a/tests/composer.lock +++ b/tests/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a90da9866c03b78a3f71997ba0347315", + "content-hash": "4417e53cfe358473c38a41f421fa042b", "packages": [ { "name": "carbonphp/carbon-doctrine-types", @@ -77,16 +77,16 @@ }, { "name": "nesbot/carbon", - "version": "3.5.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "415782b7e48223342f1a616c16c45a95b15b2318" + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/415782b7e48223342f1a616c16c45a95b15b2318", - "reference": "415782b7e48223342f1a616c16c45a95b15b2318", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cb4374784c87d0a0294e8513a52eb63c0aff3139", + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139", "shasum": "" }, "require": { @@ -179,7 +179,7 @@ "type": "tidelift" } ], - "time": "2024-06-03T17:25:54+00:00" + "time": "2024-07-16T22:29:20+00:00" }, { "name": "psr/clock", @@ -231,20 +231,20 @@ }, { "name": "symfony/clock", - "version": "v7.1.1", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/clock.git", - "reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7" + "reference": "7a4840efd17135cbd547e41ec49fb910ed4f8b98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/clock/zipball/3dfc8b084853586de51dd1441c6242c76a28cbe7", - "reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7", + "url": "https://api.github.com/repos/symfony/clock/zipball/7a4840efd17135cbd547e41ec49fb910ed4f8b98", + "reference": "7a4840efd17135cbd547e41ec49fb910ed4f8b98", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "psr/clock": "^1.0", "symfony/polyfill-php83": "^1.28" }, @@ -285,7 +285,7 @@ "time" ], "support": { - "source": "https://github.com/symfony/clock/tree/v7.1.1" + "source": "https://github.com/symfony/clock/tree/v6.4.8" }, "funding": [ { @@ -301,45 +301,39 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-05-31T14:51:39+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "name": "symfony/deprecation-contracts", + "version": "v3.5.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" + "php": ">=8.1" }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } + "function.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -355,17 +349,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -381,25 +368,31 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "thanks": { @@ -412,21 +405,14 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -436,16 +422,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -461,25 +448,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff" + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-php80": "^1.14" + "php": ">=7.1" }, "type": "library", "extra": { @@ -522,7 +508,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0" }, "funding": [ { @@ -538,24 +524,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:35:24+00:00" }, { "name": "symfony/process", - "version": "v7.1.1", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028" + "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/febf90124323a093c7ee06fdb30e765ca3c20028", - "reference": "febf90124323a093c7ee06fdb30e765ca3c20028", + "url": "https://api.github.com/repos/symfony/process/zipball/8d92dd79149f29e89ee0f480254db595f6a6a2c5", + "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -583,7 +569,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.1" + "source": "https://github.com/symfony/process/tree/v6.4.8" }, "funding": [ { @@ -599,36 +585,37 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/translation", - "version": "v7.1.1", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3" + "reference": "94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3", - "reference": "cf5ae136e124fc7681b34ce9fac9d5b9ae8ceee3", + "url": "https://api.github.com/repos/symfony/translation/zipball/94041203f8ac200ae9e7c6a18fa6137814ccecc9", + "reference": "94041203f8ac200ae9e7c6a18fa6137814ccecc9", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<6.4", + "symfony/http-kernel": "<5.4", "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<6.4", - "symfony/yaml": "<6.4" + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { "symfony/translation-implementation": "2.3|3.0" @@ -636,17 +623,17 @@ "require-dev": { "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/intl": "^5.4|^6.0|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^6.4|^7.0", + "symfony/routing": "^5.4|^6.0|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -677,7 +664,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.1.1" + "source": "https://github.com/symfony/translation/tree/v6.4.10" }, "funding": [ { @@ -693,7 +680,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/translation-contracts", @@ -777,16 +764,16 @@ "packages-dev": [ { "name": "brianium/paratest", - "version": "v7.4.3", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "64fcfd0e28a6b8078a19dbf9127be2ee645b92ec" + "reference": "551f46f52a93177d873f3be08a1649ae886b4a30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/64fcfd0e28a6b8078a19dbf9127be2ee645b92ec", - "reference": "64fcfd0e28a6b8078a19dbf9127be2ee645b92ec", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/551f46f52a93177d873f3be08a1649ae886b4a30", + "reference": "551f46f52a93177d873f3be08a1649ae886b4a30", "shasum": "" }, "require": { @@ -794,27 +781,28 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "fidry/cpu-core-counter": "^1.1.0", + "fidry/cpu-core-counter": "^0.5.1 || ^1.0.0", "jean85/pretty-package-versions": "^2.0.5", - "php": "~8.2.0 || ~8.3.0", - "phpunit/php-code-coverage": "^10.1.11 || ^11.0.0", - "phpunit/php-file-iterator": "^4.1.0 || ^5.0.0", - "phpunit/php-timer": "^6.0.0 || ^7.0.0", - "phpunit/phpunit": "^10.5.9 || ^11.0.3", - "sebastian/environment": "^6.0.1 || ^7.0.0", - "symfony/console": "^6.4.3 || ^7.0.3", - "symfony/process": "^6.4.3 || ^7.0.3" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "phpunit/php-code-coverage": "^10.1.7", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-timer": "^6.0", + "phpunit/phpunit": "^10.4.2", + "sebastian/environment": "^6.0.1", + "symfony/console": "^6.3.4 || ^7.0.0", + "symfony/process": "^6.3.4 || ^7.0.0" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "phpstan/phpstan": "^1.10.58", + "infection/infection": "^0.27.6", + "phpstan/phpstan": "^1.10.40", "phpstan/phpstan-deprecation-rules": "^1.1.4", "phpstan/phpstan-phpunit": "^1.3.15", "phpstan/phpstan-strict-rules": "^1.5.2", - "squizlabs/php_codesniffer": "^3.9.0", - "symfony/filesystem": "^6.4.3 || ^7.0.3" + "squizlabs/php_codesniffer": "^3.7.2", + "symfony/filesystem": "^6.3.1 || ^7.0.0" }, "bin": [ "bin/paratest", @@ -855,7 +843,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.4.3" + "source": "https://github.com/paratestphp/paratest/tree/v7.3.1" }, "funding": [ { @@ -867,7 +855,7 @@ "type": "paypal" } ], - "time": "2024-02-20T07:24:02+00:00" + "time": "2023-10-31T09:24:17+00:00" }, { "name": "doctrine/deprecations", @@ -1109,16 +1097,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1126,11 +1114,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -1156,7 +1145,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -1164,20 +1153,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -1188,7 +1177,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -1220,44 +1209,46 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "nunomaduro/collision", - "version": "v8.1.1", + "version": "v7.10.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9" + "reference": "49ec67fa7b002712da8526678abd651c09f375b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/13e5d538b95a744d85f447a321ce10adb28e9af9", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", + "reference": "49ec67fa7b002712da8526678abd651c09f375b2", "shasum": "" }, "require": { - "filp/whoops": "^2.15.4", - "nunomaduro/termwind": "^2.0.1", - "php": "^8.2.0", - "symfony/console": "^7.0.4" + "filp/whoops": "^2.15.3", + "nunomaduro/termwind": "^1.15.1", + "php": "^8.1.0", + "symfony/console": "^6.3.4" }, "conflict": { - "laravel/framework": "<11.0.0 || >=12.0.0", - "phpunit/phpunit": "<10.5.1 || >=12.0.0" + "laravel/framework": ">=11.0.0" }, "require-dev": { - "larastan/larastan": "^2.9.2", - "laravel/framework": "^11.0.0", - "laravel/pint": "^1.14.0", - "laravel/sail": "^1.28.2", - "laravel/sanctum": "^4.0.0", - "laravel/tinker": "^2.9.0", - "orchestra/testbench-core": "^9.0.0", - "pestphp/pest": "^2.34.1 || ^3.0.0", - "sebastian/environment": "^6.0.1 || ^7.0.0" + "brianium/paratest": "^7.3.0", + "laravel/framework": "^10.28.0", + "laravel/pint": "^1.13.3", + "laravel/sail": "^1.25.0", + "laravel/sanctum": "^3.3.1", + "laravel/tinker": "^2.8.2", + "nunomaduro/larastan": "^2.6.4", + "orchestra/testbench-core": "^8.13.0", + "pestphp/pest": "^2.23.2", + "phpunit/phpunit": "^10.4.1", + "sebastian/environment": "^6.0.1", + "spatie/laravel-ignition": "^2.3.1" }, "type": "library", "extra": { @@ -1265,9 +1256,6 @@ "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" ] - }, - "branch-alias": { - "dev-8.x": "8.x-dev" } }, "autoload": { @@ -1319,36 +1307,37 @@ "type": "patreon" } ], - "time": "2024-03-06T16:20:09+00:00" + "time": "2023-10-11T15:45:01+00:00" }, { "name": "nunomaduro/termwind", - "version": "v2.0.1", + "version": "v1.15.1", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a" + "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/58c4c58cf23df7f498daeb97092e34f5259feb6a", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^8.2", - "symfony/console": "^7.0.4" + "php": "^8.0", + "symfony/console": "^5.3.0|^6.0.0" }, "require-dev": { - "ergebnis/phpstan-rules": "^2.2.0", - "illuminate/console": "^11.0.0", - "laravel/pint": "^1.14.0", - "mockery/mockery": "^1.6.7", - "pestphp/pest": "^2.34.1", - "phpstan/phpstan": "^1.10.59", - "phpstan/phpstan-strict-rules": "^1.5.2", - "symfony/var-dumper": "^7.0.4", + "ergebnis/phpstan-rules": "^1.0.", + "illuminate/console": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "laravel/pint": "^1.0.0", + "pestphp/pest": "^1.21.0", + "pestphp/pest-plugin-mock": "^1.0", + "phpstan/phpstan": "^1.4.6", + "phpstan/phpstan-strict-rules": "^1.1.0", + "symfony/var-dumper": "^5.2.7|^6.0.0", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -1357,9 +1346,6 @@ "providers": [ "Termwind\\Laravel\\TermwindServiceProvider" ] - }, - "branch-alias": { - "dev-2.x": "2.x-dev" } }, "autoload": { @@ -1391,7 +1377,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v2.0.1" + "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" }, "funding": [ { @@ -1407,25 +1393,25 @@ "type": "github" } ], - "time": "2024-03-06T16:17:14+00:00" + "time": "2023-02-08T01:06:31+00:00" }, { "name": "pestphp/pest", - "version": "v2.34.8", + "version": "v2.35.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "e8f122bf47585c06431e0056189ec6bfd6f41f57" + "reference": "d0ff2c8ec294b7aa7fcb0f3ddc4fdec864234646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/e8f122bf47585c06431e0056189ec6bfd6f41f57", - "reference": "e8f122bf47585c06431e0056189ec6bfd6f41f57", + "url": "https://api.github.com/repos/pestphp/pest/zipball/d0ff2c8ec294b7aa7fcb0f3ddc4fdec864234646", + "reference": "d0ff2c8ec294b7aa7fcb0f3ddc4fdec864234646", "shasum": "" }, "require": { "brianium/paratest": "^7.3.1", - "nunomaduro/collision": "^7.10.0|^8.1.1", + "nunomaduro/collision": "^7.10.0|^8.3.0", "nunomaduro/termwind": "^1.15.1|^2.0.1", "pestphp/pest-plugin": "^2.1.1", "pestphp/pest-plugin-arch": "^2.7.0", @@ -1439,8 +1425,8 @@ }, "require-dev": { "pestphp/pest-dev-tools": "^2.16.0", - "pestphp/pest-plugin-type-coverage": "^2.8.3", - "symfony/process": "^6.4.0|^7.1.1" + "pestphp/pest-plugin-type-coverage": "^2.8.5", + "symfony/process": "^6.4.0|^7.1.3" }, "bin": [ "bin/pest" @@ -1503,7 +1489,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.34.8" + "source": "https://github.com/pestphp/pest/tree/v2.35.0" }, "funding": [ { @@ -1515,7 +1501,7 @@ "type": "github" } ], - "time": "2024-06-10T22:02:16+00:00" + "time": "2024-08-02T10:57:29+00:00" }, { "name": "pestphp/pest-plugin", @@ -2000,16 +1986,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.14", + "version": "10.1.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", - "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", + "reference": "5da8b1728acd1e6ffdf2ff32ffbdfd04307f26ae", "shasum": "" }, "require": { @@ -2066,7 +2052,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.15" }, "funding": [ { @@ -2074,7 +2060,7 @@ "type": "github" } ], - "time": "2024-03-12T15:33:41+00:00" + "time": "2024-06-29T08:25:15+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3441,46 +3427,47 @@ }, { "name": "symfony/console", - "version": "v7.1.1", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9b008f2d7b21c74ef4d0c3de6077a642bc55ece3" + "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9b008f2d7b21c74ef4d0c3de6077a642bc55ece3", - "reference": "9b008f2d7b21c74ef4d0c3de6077a642bc55ece3", + "url": "https://api.github.com/repos/symfony/console/zipball/504974cbe43d05f83b201d6498c206f16fc0cdbc", + "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -3514,7 +3501,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.1.1" + "source": "https://github.com/symfony/console/tree/v6.4.10" }, "funding": [ { @@ -3530,94 +3517,27 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/finder", - "version": "v7.1.1", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6" + "reference": "af29198d87112bebdd397bd7735fbd115997824c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/fbb0ba67688b780efbc886c1a0a0948dcf7205d6", - "reference": "fbb0ba67688b780efbc886c1a0a0948dcf7205d6", + "url": "https://api.github.com/repos/symfony/finder/zipball/af29198d87112bebdd397bd7735fbd115997824c", + "reference": "af29198d87112bebdd397bd7735fbd115997824c", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0" + "symfony/filesystem": "^6.0|^7.0" }, "type": "library", "autoload": { @@ -3645,7 +3565,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.1.1" + "source": "https://github.com/symfony/finder/tree/v6.4.10" }, "funding": [ { @@ -3661,20 +3581,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:57:53+00:00" + "time": "2024-07-24T07:06:38+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -3724,7 +3644,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -3740,20 +3660,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -3802,7 +3722,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -3818,20 +3738,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -3883,7 +3803,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -3899,7 +3819,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/service-contracts", @@ -3986,20 +3906,20 @@ }, { "name": "symfony/string", - "version": "v7.1.1", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "60bc311c74e0af215101235aa6f471bcbc032df2" + "reference": "ccf9b30251719567bfd46494138327522b9a9446" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/60bc311c74e0af215101235aa6f471bcbc032df2", - "reference": "60bc311c74e0af215101235aa6f471bcbc032df2", + "url": "https://api.github.com/repos/symfony/string/zipball/ccf9b30251719567bfd46494138327522b9a9446", + "reference": "ccf9b30251719567bfd46494138327522b9a9446", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -4009,12 +3929,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -4053,7 +3972,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.1" + "source": "https://github.com/symfony/string/tree/v6.4.10" }, "funding": [ { @@ -4069,7 +3988,7 @@ "type": "tidelift" } ], - "time": "2024-06-04T06:40:14+00:00" + "time": "2024-07-22T10:21:14+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", @@ -4245,7 +4164,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.1" + "php": "^8.1|^8.2|^8.3" }, "platform-dev": [], "plugin-api-version": "2.6.0" From 685962c42d178724b9a966bdc4e83aacce3d1511 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Mon, 12 Aug 2024 00:32:18 +0200 Subject: [PATCH 09/15] fix(ci): allow all tests to run even if one fails Signed-off-by: Dusan Malusev --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 645c0acf7..9b647dfb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: php: ['8.1.29', '8.2.20', '8.3.8', '8.1.29-zts', '8.2.20-zts', '8.3.8-zts'] os: ['ubuntu-24.04'] preset: ['CICassandra', 'CIScylla'] + fail-fast: false runs-on: ubuntu-latest container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }} steps: From 691968b81bcb7a3ee7fda595ddb79e9b122ad1a1 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Mon, 12 Aug 2024 00:33:12 +0200 Subject: [PATCH 10/15] feature(ci): add ubuntu 20.04 to run tests Signed-off-by: Dusan Malusev --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b647dfb6..bc83706e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: php: ['8.1.29', '8.2.20', '8.3.8', '8.1.29-zts', '8.2.20-zts', '8.3.8-zts'] - os: ['ubuntu-24.04'] + os: ['ubuntu-20.04', 'ubuntu-24.04'] preset: ['CICassandra', 'CIScylla'] fail-fast: false runs-on: ubuntu-latest From 819ffb72823e5e7b7c2edc21d1de81f9f404c90f Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 23:35:09 +0200 Subject: [PATCH 11/15] feature(ci): add release github actions Signed-off-by: Dusan Malusev --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f431048c3..87a38a682 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,11 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} author: true releaseUrl: ${{ steps.release.outputs.url }} +<<<<<<< HEAD issues: true +======= + issues: false +>>>>>>> d34657b4 (feature(ci): add release github actions) pullRequests: true - uses: stefanzweifel/git-auto-commit-action@v5 with: From 9e83de93aa7e46189786820ae13101a8b100ca85 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 22:52:32 +0200 Subject: [PATCH 12/15] feature(dockerimage): better docker image 1. Support for mutilple ubuntu versions (22.04, 24.04) 2. Foundations for Release builds to be provided from GitHub release cassandra.so will be provided in GitHub Releases having ubuntu 22.04 (possibly 20.04) we can have better compatiblity with systems (and libraries -> mainly glibc) that are running in production without users having to download the source and build for every patch release 3. fix install path inside docker image -> CIScylla and CICassandra Signed-off-by: Dusan Malusev --- .github/workflows/docker-image.yml | 18 +++++++++--------- .github/workflows/test-images.yml | 10 +++++----- .github/workflows/test.yml | 9 +++++---- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e0fd86034..cee208a6e 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,34 +1,34 @@ -name: 'Docker Test Image' +name: "Docker Test Image" on: workflow_dispatch: inputs: php: - description: 'PHP Version' + description: "PHP Version" required: true zts: - description: 'ZTS (Zend Thread Safety)' + description: "ZTS (Zend Thread Safety)" required: true ubuntu_version: type: string - description: 'Ubuntu Version' + description: "Ubuntu Version" required: false - default: '22.04' + default: "22.04" workflow_call: inputs: php: type: string - description: 'PHP Version' + description: "PHP Version" required: true zts: type: string - description: 'ZTS (Zend Thread Safety)' + description: "ZTS (Zend Thread Safety)" required: true ubuntu_version: type: string - description: 'Ubuntu Version' + description: "Ubuntu Version" required: false - default: '22.04' + default: "22.04" secrets: DOCKER_USERNAME: required: true diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index e749bd29f..2d084d391 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -1,8 +1,8 @@ -name: 'Build Docker Images for Testing' +name: "Build Docker Images for Testing" on: schedule: - - cron: '0 0 1,15 * *' + - cron: "0 0 1,15 * *" workflow_call: workflow_dispatch: @@ -10,9 +10,9 @@ jobs: build: strategy: matrix: - tag: ['8.1.29', '8.2.20', '8.3.8'] + tag: ["8.1.29", "8.2.20", "8.3.8"] zts: [yes, no] - ubuntu_version: ['20.04', '22.04', '24.04'] + ubuntu_version: ["20.04", "22.04", "24.04"] uses: "./.github/workflows/docker-image.yml" with: php: ${{ matrix.tag }} @@ -20,4 +20,4 @@ jobs: ubuntu_version: ${{ matrix.ubuntu_version }} secrets: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc83706e7..3581671a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: 'Test PHP Extension' +name: "Test PHP Extension" on: workflow_call: @@ -12,9 +12,10 @@ jobs: test: strategy: matrix: - php: ['8.1.29', '8.2.20', '8.3.8', '8.1.29-zts', '8.2.20-zts', '8.3.8-zts'] - os: ['ubuntu-20.04', 'ubuntu-24.04'] - preset: ['CICassandra', 'CIScylla'] + php: + ["8.1.29", "8.2.20", "8.3.8", "8.1.29-zts", "8.2.20-zts", "8.3.8-zts"] + os: ["ubuntu-20.04", "ubuntu-24.04"] + preset: ["CICassandra", "CIScylla"] fail-fast: false runs-on: ubuntu-latest container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }} From 1324ff102df7b248831f971280fa242edbecc0ad Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Sun, 11 Aug 2024 23:35:09 +0200 Subject: [PATCH 13/15] feature(ci): add release github actions Signed-off-by: Dusan Malusev --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87a38a682..350fc8df3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,15 +44,11 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} author: true releaseUrl: ${{ steps.release.outputs.url }} -<<<<<<< HEAD issues: true -======= - issues: false ->>>>>>> d34657b4 (feature(ci): add release github actions) pullRequests: true - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update CHANGELOG.md" branch: v1.3.x - commit_options: '--no-verify --signoff' + commit_options: "--no-verify --signoff" file_pattern: CHANGELOG.md From a2149f37d6da6efd63da43784824e89948f9da73 Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Mon, 12 Aug 2024 19:35:14 +0200 Subject: [PATCH 14/15] feature(ci): better docker image building 1. creating image with debug and release versions of php 2. docker image tags do not contain full php version, just major and minor 3. removing #define in version.h.in for brevitty Signed-off-by: Dusan Malusev --- .github/workflows/docker-image.yml | 47 +++++++++++++----------------- .github/workflows/test-images.yml | 4 ++- CMakeLists.txt | 7 +---- src/Core.cpp | 3 +- version.h.in | 7 +---- 5 files changed, 27 insertions(+), 41 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index b54874b7e..f1fb762e4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -20,13 +20,17 @@ on: type: string description: "PHP Version" required: true + debug: + type: string + description: "PHP Debug -> Options [yes, no]" + required: false zts: type: string - description: "ZTS (Zend Thread Safety)" + description: "ZTS (Zend Thread Safety) -> Options [yes, no]" required: true ubuntu_version: type: string - description: "Ubuntu Version" + description: "Ubuntu Version -> Options [20.04, 22.04, 24.04]" required: false default: "24.04" secrets: @@ -52,30 +56,20 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push API - id: docker_build_zts - uses: docker/build-push-action@v5 - if: ${{ inputs.zts == 'yes' }} - with: - file: ./docker/Dockerfile - context: . - push: true - pull: true - platforms: linux/amd64 - target: final - tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-php-${{ inputs.php }}-zts - cache-from: type=gha - cache-to: type=gha,mode=max - build-args: | - PHP_VERSION=${{ inputs.php }} - PHP_ZTS=${{ inputs.zts }} - UBUNTU_VERSION=${{ inputs.ubuntu_version }} - PHP_DEBUG="yes" + - name: Extract PHP Version and ZTS + id: version + run: | + export PHP_VERSION="$(echo ${{ inputs.php }} | grep -oP '^\d+\.\d+')" + PHP_ENDING="php-$PHP_VERSION" + + [[ ${{ inputs.zts }} == "yes" ]] && PHP_ENDING="$PHP_ENDING-zts" + [[ ${{ inputs.debug }} == "yes" ]] && PHP_ENDING="$PHP_ENDING-debug" + + echo "php_ending=$PHP_ENDING" >> $GITHUB_ENV - name: Build and push API - id: docker_build_nts + id: docker_build uses: docker/build-push-action@v5 - if: ${{ inputs.zts == 'no' }} with: file: ./docker/Dockerfile context: . @@ -83,11 +77,12 @@ jobs: pull: true platforms: linux/amd64 target: final - tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-php-${{ inputs.php }} + tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-${{ steps.version.outputs.php }} cache-from: type=gha cache-to: type=gha,mode=max build-args: | + UBUNTU_VERSION=${{ inputs.ubuntu_version }} PHP_VERSION=${{ inputs.php }} PHP_ZTS=${{ inputs.zts }} - UBUNTU_VERSION=${{ inputs.ubuntu_version }} - PHP_DEBUG="yes" + PHP_DEBUG=${{ inputs.debug }} + PHP_MEM_SANITIZERS=${{ inputs.debug }} diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index 2d084d391..aa415509b 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -11,13 +11,15 @@ jobs: strategy: matrix: tag: ["8.1.29", "8.2.20", "8.3.8"] - zts: [yes, no] + zts: ['yes', 'no'] + debug: ['yes', 'no'] ubuntu_version: ["20.04", "22.04", "24.04"] uses: "./.github/workflows/docker-image.yml" with: php: ${{ matrix.tag }} zts: ${{ matrix.zts }} ubuntu_version: ${{ matrix.ubuntu_version }} + debug: ${{ matrix.debug }} secrets: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/CMakeLists.txt b/CMakeLists.txt index a5cfdeb93..216b1b259 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,12 +39,7 @@ include(cmake/CPM.cmake) include(cmake/TargetOptimizations.cmake) include(cmake/ScyllaDBPHPLibrary.cmake) -set(PHP_SCYLLADB_VERSION_MAJOR 1) -set(PHP_SCYLLADB_VERSION_MINOR 3) -set(PHP_SCYLLADB_VERSION_PATCH 12) -set(PHP_SCYLLADB_STABILITY "devel") -set(PHP_SCYLLADB_VERSION_FULL "${PHP_SCYLLADB_VERSION_MAJOR}.${PHP_SCYLLADB_VERSION_MINOR}.${PHP_SCYLLADB_VERSION_PATCH}-${PHP_SCYLLADB_STABILITY}") -set(PHP_SCYLLADB_VERSION "${PHP_SCYLLADB_VERSION_MAJOR}.${PHP_SCYLLADB_VERSION_MINOR}.${PHP_SCYLLADB_VERSION_PATCH}-dev") +set(PHP_SCYLLADB_VERSION "1.4.0-dev") set(CMAKE_C_STANDARD 17) set(CMAKE_CXX_STANDARD 20) diff --git a/src/Core.cpp b/src/Core.cpp index 52a97204d..8be4128f1 100644 --- a/src/Core.cpp +++ b/src/Core.cpp @@ -142,8 +142,7 @@ void php_driver_define_Core() { zend_declare_class_constant_string(php_driver_core_ce, ZEND_STRL("TYPE_INET"), "inet"); - zend_declare_class_constant_string(php_driver_core_ce, ZEND_STRL("VERSION"), - PHP_DRIVER_VERSION_FULL); + zend_declare_class_constant_string(php_driver_core_ce, ZEND_STRL("VERSION"), PHP_DRIVER_VERSION); snprintf(buf, sizeof(buf), "%d.%d.%d%s", CASS_VERSION_MAJOR, CASS_VERSION_MINOR, CASS_VERSION_PATCH, diff --git a/version.h.in b/version.h.in index f193bfc09..8df52f223 100644 --- a/version.h.in +++ b/version.h.in @@ -1,9 +1,4 @@ #pragma once #define PHP_DRIVER_NAME "cassandra" -#define PHP_DRIVER_MAJOR @PHP_SCYLLADB_VERSION_MAJOR@ -#define PHP_DRIVER_MINOR @PHP_SCYLLADB_VERSION_MINOR@ -#define PHP_DRIVER_RELEASE @PHP_SCYLLADB_VERSION_PATCH@ -#define PHP_DRIVER_STABILITY "@PHP_SCYLLADB_STABILITY@" -#define PHP_DRIVER_VERSION "@PHP_SCYLLADB_VERSION@" -#define PHP_DRIVER_VERSION_FULL "@PHP_SCYLLADB_VERSION_FULL@" \ No newline at end of file +#define PHP_DRIVER_VERSION "@PHP_SCYLLADB_VERSION@" \ No newline at end of file From ab29c6726831de33daf1cbf5ee1fe0f6228dea3d Mon Sep 17 00:00:00 2001 From: Dusan Malusev Date: Mon, 12 Aug 2024 20:16:39 +0200 Subject: [PATCH 15/15] feature(ci): full release script ti uploaded artifacts Signed-off-by: Dusan Malusev --- .github/workflows/docker-image.yml | 4 +- .github/workflows/release.yml | 67 +++++++++++++++++++++++++++--- .github/workflows/test-images.yml | 2 +- .github/workflows/test.yml | 6 +-- .vscode/settings.json | 3 +- CMakePresets.json | 34 ++++++++++++++- 6 files changed, 101 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f1fb762e4..715c42029 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,4 +1,4 @@ -name: "Docker Test Image" +name: "Build Docker Image" on: workflow_dispatch: @@ -77,7 +77,7 @@ jobs: pull: true platforms: linux/amd64 target: final - tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-${{ steps.version.outputs.php }} + tags: malusevd99/scylladb-php-driver:ubuntu-${{ inputs.ubuntu_version }}-${{ steps.version.outputs.php_ending }} cache-from: type=gha cache-to: type=gha,mode=max build-args: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 350fc8df3..24a7b0193 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,8 @@ jobs: tag: runs-on: ubuntu-latest outputs: - version: ${{ steps.version_tag.outputs.tag }} + version: ${{ steps.tag.outputs.tag }} + prerelease: ${{ (!!steps.prerelease.outputs.is_prerelease) || false }} steps: - uses: actions/checkout@v4 with: @@ -20,23 +21,77 @@ jobs: - name: Get Tag if: startsWith(github.ref, 'refs/tags/v') uses: olegtarasov/get-tag@v2.1.3 - id: version_tag + id: tag with: tagRegex: "v(.*)" + - name: Get Prerelease + if: contains(github.ref, '-rc') || contains(github.ref, '-pre') || contains(github.ref, '-alpha') || contains(github.ref, '-beta') + run: echo "is_prerelease=true" >> $GITHUB_OUTPUT + id: prerelease + + build: + runs-on: ubuntu-latest + needs: ['tag'] + strategy: + matrix: + php: ['8.1', '8.1-zts', '8.2', '8.2-zts', '8.3', '8.3-zts'] + os: ['ubuntu-20.04', 'ubuntu-24.04'] + preset: ['CICassandra', 'CIScylla'] + fail-fast: true + container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: Extract PHP Version and ZTS + id: name + run: | + [ "CICassandra" = "${{ matrix.preset }}" ] && echo 'extension="cassandra-${{ matrix.os }}-${{ matrix.php }}"' >> $GITHUB_ENV + + [ "CIScylla" = "${{ matrix.preset }}" ] && echo 'extension="scylla-${{ matrix.os }}-${{ matrix.php }}"' >> $GITHUB_ENV + + - name: Build Driver + run: | + cmake --preset ${{ matrix.preset }} -DPHP_SCYLLADB_VERSION=${{ needs.tag.outputs.version }} || exit 1 + + cd out/${{ matrix.preset }} || exit 1 + ninja build || exit 1 + cd ../../ + + mv out/${{ matrix.preset }}/cassandra.so || exit 1 + sed -i "s/extension = cassandra/extension = ${{ steps.name.outputs.extension }}/g" cassandra.ini || exit 1 + + tar czf ${{ steps.name.outputs.extension }}.tar.gz ${{ steps.name.outputs.extension }}.so cassandra.ini + + - uses: actions/upload-artifact@v4 + with: + name: ${{ steps.name.outputs.extension }} + path: ${{ steps.name.outputs.extension }}.tar.gz + if-no-files-found: error + retention-days: 5 + overwrite: true + release: runs-on: ubuntu-latest - needs: tag + needs: ["build", 'tag'] steps: + - uses: actions/download-artifact@v4 + id: artifacts + with: + merge-multiple: true - name: Release uses: softprops/action-gh-release@v2 id: release with: - make_latest: true - name: "v${{ needs.tag.outputs.version }}" + make_latest: ${{ !needs.tag.outputs.prerelease }} + name: "v${{ needs.tag.outputs.version }}" tag_name: "v${{ needs.tag.outputs.version }}" generate_release_notes: true append_body: true - prerelease: false + prerelease: ${{ needs.tag.outputs.prerelease }} + files: | + ${{ steps.artifacts.outputs.download-path }}/*.tar.gz fail_on_unmatched_files: true - name: "Generate release changelog" uses: heinrichreimer/action-github-changelog-generator@v2.4 diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index aa415509b..1ef12f2db 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -1,4 +1,4 @@ -name: "Build Docker Images for Testing" +name: "Build Docker Images" on: schedule: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f85c511b..1cd5b83f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,12 +12,12 @@ jobs: test: strategy: matrix: - php: ['8.1.29', '8.2.20', '8.3.8', '8.1.29-zts', '8.2.20-zts', '8.3.8-zts'] + php: ['8.1', '8.2', '8.3', '8.1-zts', '8.2-zts', '8.3-zts'] os: ['ubuntu-20.04', 'ubuntu-24.04'] - preset: ['CICassandra', 'CIScylla'] + preset: ['CICassandraDebug', 'CIScyllaDebug'] fail-fast: false runs-on: ubuntu-latest - container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }} + container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }}-debug steps: - uses: actions/checkout@v4 with: diff --git a/.vscode/settings.json b/.vscode/settings.json index 107a79ca8..261acbfb3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,6 +21,7 @@ "files.associations": { "*main.yml": "ansible", "php_driver.h": "c", - "types.h": "c" + "types.h": "c", + "*.in": "c" } } diff --git a/CMakePresets.json b/CMakePresets.json index 5a3318c39..bd39d7ee4 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -102,6 +102,36 @@ "binaryDir": "${sourceDir}/out/${presetName}", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithInfo", + "PHP_SCYLLADB_ENABLE_SANITIZERS": "OFF", + "SANITIZE_UNDEFINED": "OFF", + "SANITIZE_ADDRESS": "OFF", + "CUSTOM_PHP_CONFIG": "/php/bin/php-config" + } + }, + { + "name": "CICassandra", + "displayName": "GithubActions CI", + "description": "", + "generator": "Ninja", + "environment": {}, + "binaryDir": "${sourceDir}/out/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithInfo", + "PHP_SCYLLADB_ENABLE_SANITIZERS": "OFF", + "SANITIZE_UNDEFINED": "OFF", + "SANITIZE_ADDRESS": "OFF", + "CUSTOM_PHP_CONFIG": "/php/bin/php-config" + } + }, + { + "name": "CIScyllaDebug", + "displayName": "GithubActions CIScylla", + "description": "", + "generator": "Ninja", + "environment": {}, + "binaryDir": "${sourceDir}/out/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", "PHP_SCYLLADB_ENABLE_SANITIZERS": "ON", "SANITIZE_UNDEFINED": "ON", "SANITIZE_ADDRESS": "ON", @@ -109,14 +139,14 @@ } }, { - "name": "CICassandra", + "name": "CICassandraDebug", "displayName": "GithubActions CI", "description": "", "generator": "Ninja", "environment": {}, "binaryDir": "${sourceDir}/out/${presetName}", "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithInfo", + "CMAKE_BUILD_TYPE": "Debug", "PHP_SCYLLADB_ENABLE_SANITIZERS": "ON", "SANITIZE_UNDEFINED": "ON", "SANITIZE_ADDRESS": "ON",