Symlink project script needs to be PHP5.6 compatible

Issue information

From user: fjgarlin

Related to !426 (merged)

Contribution record

Fork management

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

Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information