Page MenuHomePhabricator

Jenkins should not accept PHP files with spurious output (without <?php)
Closed, DeclinedPublic

Description

I was surprised to see that Jenkins run https://integration.mediawiki.org/ci/job/MediaWiki-GIT-Fetching/588/console passed. (I understand there were no tests run yet, though).

This was introduced by this change:

https://gerrit.wikimedia.org/r/#patch,unified,4672,2,includes/db/DatabasePostgres.php


Version: unspecified
Severity: normal
URL: https://gerrit.wikimedia.org/r/#patch,unified,4672,2,includes/db/DatabasePostgres.php

Details

Reference
bz35871

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:12 AM
bzimport added a project: Gerrit.
bzimport set Reference to bz35871.
saper created this task.Apr 10 2012, 11:52 PM

this would be a good place to put some "lint" like checks. Hrm... and this really isn't Git or Gerrit.

As a summary, the change replaced a '<?php' by '19php'. The end result is that all the file content is interpreted as a full text file making all the file content looking perfectly legit to PHP linter.

I am going to wont fix this issue:

  • I believe most syntax highlighter will choke over that kind of change.
  • people testing their change will surely have their local wiki to choke on it
  • it is a rare corner case
  • It is surely going to crash any test suite that rely on postgre (they are not run yet though on jenkins).