stable

Clone or download

Read-only

Fix incorrect type in one ForgeUpgrade migration

Since ab23715a348c92bd1452b9cd7e7838b67d69ef33 ForgeUpgrade uses the same configuration for PDO than the rest of Tuleap. This notably means we now get data typed according to the DB schema instead of getting everything as strings. One of the ForgeUpgrade with the strict types enabled is failing due to that: ``` PHP Fatal error: Uncaught TypeError: Return value of b202006161036_add_reference_group_for_project::getGitReference() must be of the type string, int returned in /usr/share/tuleap/plugins/git/db/mysql/updates/2020/202006161036_add_reference_group_for_project.php:84 Stack trace: thrown in /usr/share/tuleap/plugins/git/db/mysql/updates/2020/202006161036_add_reference_group_for_project.php on line 84 ``` After a manual inspection (potentially impacted migrations have been identified with the regex "(?s)strict_types=1.*extends ForgeUpgrade_Bucket"), it seems it is the only migration affected by the issue, the others either do not have strict types, do not have return value set on methods or have only methods returnuing nothing. Part of request #21864 Import forgeupgrade into Tuleap Change-Id: I2501d5faae9112ab5085b6702d281daa0e96f720

Modified Files

Name
M plugins/git/db/mysql/updates/2020/202006161036_add_reference_group_for_project.php +1 −1 Go to diff View file