Wrong references in phpstan and nightwatch next major jobs.

Migrated issue

Reported by: fjgarlin

Related to !160 (merged)

Problem/Motivation

#3425959: Remove before_script in "next major" job introduced a new issue where too much was copy/pasted.

Steps to reproduce

Run phpstan next major or nightwacht next major.

Proposed resolution

Fix it.

Remaining tasks

MR