Symlink project script needs to be PHP5.6 compatible

Created on 12 November 2025, 1 day ago

Problem/Motivation

Running D7 pipelines I found this error: https://git.drupalcode.org/project/api/-/jobs/7254110#L603

This is due to the symlink_project.php script no longer being PHP5.6 compatible, which we need if we want to support D7 projects.

$ php symlink_project.php $VERBOSE_FLAG $COPY_OPTION
PHP Warning:  getopt() expects at most 2 parameters, 3 given in /builds/project/api/symlink_project.php on line 26
PHP Warning:  array_key_exists() expects parameter 2 to be array, boolean given in /builds/project/api/symlink_project.php on line 27
PHP Warning:  array_key_exists() expects parameter 2 to be array, boolean given in /builds/project/api/symlink_project.php on line 27
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Positional parameters are no longer used. Ignoring symlink_project.php' in /builds/project/api/symlink_project.php:34

The fatal error is just a consequence of the previous warnings.

Proposed resolution

Make the script PHP5.6 compatible. getopt changed number of params accepted in PHP7.1.

Remaining tasks

MR

🐛 Bug report
Status

Needs work

Component

gitlab-ci

Created by

🇪🇸Spain fjgarlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024