Skip to content

feat: add support for scalingo-26#597

Merged
EtienneM merged 13 commits into
masterfrom
feat/STORY-3771/scalingo-26
May 29, 2026
Merged

feat: add support for scalingo-26#597
EtienneM merged 13 commits into
masterfrom
feat/STORY-3771/scalingo-26

Conversation

@EtienneM

Copy link
Copy Markdown
Member

No description provided.

@EtienneM EtienneM self-assigned this May 22, 2026
@notion-workspace

Copy link
Copy Markdown

@EtienneM EtienneM force-pushed the feat/STORY-3771/scalingo-26 branch from e4dc31d to c73ce92 Compare May 26, 2026 06:04
Comment thread conf/versions.sh Outdated
Comment thread support/get_tidy Outdated
Comment thread support/ext-internal/tidy
@EtienneM EtienneM force-pushed the feat/STORY-3771/scalingo-26 branch from 84c47c8 to f24773f Compare May 27, 2026 08:37

@Frzk Frzk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few concerns regarding tidy and gmp.
And another detail related to amqp (we may have to package this extension).
Else LGTM, nice work <3

Comment thread support/ext/mongodb

if [ "$STACK" = "scalingo-26" ] && [ "${zend_api_version}" -ge "${PHP_MODULE_API_VERSIONS['8.5']}" ]; then
echo "Apply the patch to fix a call to IS_INTERNED"
patch -p1 < /buildpack/support/ext/mongodb-is-interned.patch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: I love how you handled this <3

Comment thread support/get_gmp
mkdir -p /app/vendor/gmp
pushd "gmp-${gmp_version}" > /dev/null
./configure --prefix=/app/vendor/gmp
# We need the `CC` flag since gcc v15 (used in scalingo-26).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: shall we have a conditional here for stacks < scalingo-26? (or does it work?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though the default changed in gcc, the flag -std=gnu17 is supported by all gcc versions since a long time.

I double checked by executing this script in the scalingo-22 container and I confirm it works.

Comment thread support/ext-internal/tidy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: this file is not required anymore for scalingo-26, but is it for older stacks?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I restored this file.

Comment thread support/get_tidy Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: this file is not required anymore for scalingo-26, but is it for older stacks?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this file to get_libtidy but it eventually still exists.

Comment thread support/package_php Outdated
--with-pdo-sqlite
--with-pgsql
--with-readline
--with-tidy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is this option valid for PHP < 8.5? And stacks < scalingo-26?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great question, I hadn't thought about it.

I tried to compile PHP 8.2.31 on scalingo-22 with this with-tidy flag and it seems to work. During the configure step, I can see:

checking for TIDY support... yes                                                               
checking for tidyOptGetDoc in -ltidy... yes                                                    
checking for tidyReleaseDate in -ltidy... yes                                                  

If I remove this flag, there is:

checking for TIDY support... no                

Hence I think it's ok for all PHP versions on all supported stacks. WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some internal discussions, I eventually dropped it

Comment thread support/package_all Outdated
@@ -32,9 +32,12 @@ source "../conf/versions.sh"
#
skip=( "imap" "amqp" "igbinary" )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, amqp is now supported with PHP 8.5.x (https://doc.scalingo.com/changelog#changelog-buildpacks-php-amqp-ext-2-2-0), so (my bad, actually):

Suggested change
skip=( "imap" "amqp" "igbinary" )
skip=( "imap" "igbinary" )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread support/package_php Outdated
php::pkg::download_extract "${zlib_url}" "${tempdir}" "${tempdir}"
php::pkg::zlib::compile "${tempdir}/zlib-${zlib_version}" "${zlib_dir}"

echo "-----> Installing libtidy from APT repository"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: same as above, is this OK/required for stacks < scalingo-26?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required for the with-tidy flag to work. It works on scalingo-22 with PHP 8.2.31.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some internal discussions, I eventually dropped it

Comment thread support/package_all

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: thanks for adding the comments 👍

@EtienneM EtienneM marked this pull request as ready for review May 27, 2026 12:56
@EtienneM EtienneM force-pushed the feat/STORY-3771/scalingo-26 branch 4 times, most recently from 374120c to 2316e58 Compare May 29, 2026 08:12
@EtienneM EtienneM requested a review from a team as a code owner May 29, 2026 08:12
@EtienneM EtienneM requested review from SCedricThomas and removed request for a team May 29, 2026 08:12
@EtienneM EtienneM force-pushed the feat/STORY-3771/scalingo-26 branch 3 times, most recently from 6c83b56 to eb12c53 Compare May 29, 2026 08:44
@EtienneM EtienneM force-pushed the feat/STORY-3771/scalingo-26 branch from eb12c53 to 576eab6 Compare May 29, 2026 08:45
@EtienneM EtienneM requested a review from Frzk May 29, 2026 08:58

@Frzk Frzk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: thanks for all the hard work, adding comments where necessary, and cleaning things <333

Comment thread support/ext-internal/tidy
@@ -1,22 +1,25 @@
#!/bin/bash
#
# Compile the Tidy PHP extension (https://www.php.net/manual/en/book.tidy.php). The outcome is a .so file that is uploaded to the object storage. This file is downloaded during the deployment if a customer enables the Tidy extension.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: <3

Comment thread support/get_libtidy

cd build/cmake
# The flag `-DCMAKE_POLICY_VERSION_MINIMUM=3.5` is mandatory for the call to CMake to succeed with versions available in scalingo-26 and more recent.
cmake ../.. -DCMAKE_INSTALL_PREFIX=/app/vendor/libtidy -DTIDY_COMPAT_HEADERS=true -DCMAKE_POLICY_VERSION_MINIMUM=3.5

@EtienneM EtienneM May 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag -DCMAKE_POLICY_VERSION_MINIMUM=3.5 is mandatory starting with scalingo-26, but it works whatever the stack.

It is mandatory or we face the error:

CMake Error at CMakeLists.txt:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

@EtienneM EtienneM merged commit 4ff0b38 into master May 29, 2026
5 checks passed
@EtienneM EtienneM deleted the feat/STORY-3771/scalingo-26 branch May 29, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants