Problem/Motivation

Once PHP 8.3 is available (with an appropriate release) we should add an environment for testing PHP 8.3 in DrupalCI

Schedule https://wiki.php.net/todo/php83

Choosing pre-release versions of PHP 8.3 that are worth testing

There is a documented policy for pre-release versions of PHP containers, which we should follow (could use updating):
https://www.drupal.org/drupalorg/docs/drupal-ci/drupalci-php-support-pol...

But in general:

  • Updating a pre-release php container is a little tricky because the pre-releases can be hosted in non-standard ways (in individual developer namespaces) and because they may not have up-to-date extensions that we need.
  • Ideally, we deploy a pre-release container only at the first beta phase
  • In any case we want to try to avoid updating the container for every patch release, and select new betas to deploy strategically to save infra time.

This issue will be linked as a related issue to #3283358: [META] Make Drupal 9/10 compatible with PHP 8.2 and #3283449: Create a DrupalCI Environment for PHP 8.2

This issue will stay in 'postponed' until the appropriate release is available.

Proposed solution

To limit how much we have to chase head with this container- update it:

  • Once for alpha
  • Once for beta
  • Once for RC
  • Once for final

With an exception for an update if there's a known bug affecting us that has been fixed.

Remaining tasks

Make the new environment when this issue is 'un-postponed'

CommentFileSizeAuthor
#4 d11php83.png54.1 KBandypost
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

andypost’s picture

Status: Active » Needs review

Used to build fine locally

- upgraded APCu to latest https://github.com/krakjoe/apcu/releases/tag/v5.1.22 vs 8.2 using 8.3.5
- latest drush8 https://github.com/drush-ops/drush/releases/tag/8.4.12 vs 8.2 using 5.1.20

Needs to fix m4 file generators!

3 source will vary while not stable so I hardcoded to build locally

 # PHP Version
-ENV PHP_VERSION 8.2.3
-ENV PHP_URL="https://php.net/distributions/php-8.2.0.tar.xz"
+ENV PHP_VERSION 8.3.0
+#ENV PHP_URL="https://php.net/distributions/php-8.2.0.tar.xz"
+ENV PHP_URL="https://downloads.php.net/~jakub/php-8.3.0alpha1.tar.xz"

After build I was able to use it

root@5f266f15b850:/var/www/html# php -v
PHP 8.3.0alpha1 (cli) (built: Jun  7 2023 23:53:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.0alpha1, Copyright (c), by Zend Technologies
root@5f266f15b850:/var/www/html# php -m
[PHP Modules]
apcu
bcmath
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
andypost’s picture

StatusFileSize
new54.1 KB

I was able to install core and drush using sqlite DB,
Also using `--ignore-platform-reqs` for drush because

root@5f266f15b850:/var/www/html# composer require drush/drush ^12
./composer.json has been updated
Running composer update drush/drush
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpspec/prophecy v1.17.0 requires php ^7.2 || 8.0.* || 8.1.* || 8.2.* -> your php version (8.3.0alpha1) does not satisfy that requirement.
    - drupal/core-dev 11.x-dev requires phpspec/prophecy-phpunit ^2 -> satisfiable by phpspec/prophecy-phpunit[v2.0.2].
    - phpspec/prophecy-phpunit v2.0.2 requires phpspec/prophecy ^1.3 -> satisfiable by phpspec/prophecy[v1.17.0].
    - drupal/core-dev is locked to version 11.x-dev and an update of this package was not requested.

andypost’s picture

The image size is 1.56GB but it can be minified x3 so each job will download/run less (near 1 minute)

hestenet’s picture

Merged and waiting to confirm it works, with these 2 queued jobs:

Queueing: 8.3 and MySql8 on 11.x: https://www.drupal.org/pift-ci-job/2691057
Queuing: 8.3 and MySQL 8 on 10.1.x: https://www.drupal.org/pift-ci-job/2691058

andypost’s picture

Here's alpha2 tarballs https://downloads.php.net/~eric/

andypost’s picture

bradjones1’s picture

Per conversation at https://drupal.slack.com/archives/C1BMUQ9U6/p1689006958360499?thread_ts=... I think we would like to ensure this includes SQLite >= 3.38 to ensure it has support for pointer query syntax on JSON data storage.

daffie’s picture

Lets go for SQLite v3.42.

andypost’s picture

Beta 1 is out but API still not yet frozen.

As I see all deprecation RFCs are commited so it's time to fix'em

@hestenet https://git.drupalcode.org/project/drupalci_environments/-/merge_requests/9

hestenet’s picture

Images were updated to 8.3-beta1:

Still looking at how best to update the sqlite version, as we don't currently define explicitly in the same way.

andypost’s picture

There's idea about sqlite - we can upgrade PHP 8.3 image to use current stable debian https://packages.debian.org/bookworm/sqlite3

It has 3.40.1 and using it as test base brings CI inline with Debian derivatives

andypost’s picture

It is blocked on build infra upgrade to allow build the images based on bookworm (apt keys changed)

andypost’s picture

andypost’s picture

Assigned: Unassigned » hestenet

Created https://git.drupalcode.org/project/drupalci_environments/-/merge_request... which builds image but can't login to push (needs credentials)

Moreover it could use follow-ups to improve

-

Warning: apt-key is deprecated

- https://github.com/nodesource/distributions#debmanual
- https://docs.docker.com/build/building/multi-stage/ to slim down result image (option --squash even increases size)

andypost’s picture

hestenet’s picture

8.3 image is deployed, and the DCI labels have been updated.

It's built with the new GitlabCI based process and should be running on more modern debian thanks to @andypost - so hopefully this also addresses the sqlite version issue from #15

andypost’s picture

Used cherry-pick to move commit to production branch https://git.drupalcode.org/project/drupalci_environments/-/merge_request...

Updated php:8.3 image deployed https://git.drupalcode.org/project/drupalci_environments/-/jobs/72220

Only label updates are a question of remaining automation

Test run https://www.drupal.org/pift-ci-job/2751543

andypost’s picture

andypost’s picture

Assigned: hestenet » Unassigned

Further split onto cli/apache/yarn images still promissing after sqlite image landed

andypost’s picture

Status: Needs review » Fixed
Related issues: +#3387737: Split PHP image into php(cli/apache) and yarn(node/nightwatch)

Pushed 8.3.1 upgrade so consider it fixed, see you in optimization issue #3387737: Split PHP image into php(cli/apache) and yarn(node/nightwatch)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.