[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Prevent PHPDBG from issuing notices in unit tests

2017-04-11 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347355 )

Change subject: Prevent PHPDBG from issuing notices in unit tests
..


Prevent PHPDBG from issuing notices in unit tests

Although issuing PHP notices in unit tests is only a nice-to-have, the cause
is PHPDBG has no special treatment in JobQueueGroup at the contrary of the
PHP SAPI 'cli', and it may be desirable both 'command line SAPIs' have the
same behaviour.

This is the most apparent difference between cli and phpdbg but there could
be a dozen of other occurrences (see bug), potentially creating differences
in unit tests depending on the SAPI.

Bug: T162591
Change-Id: Idf9c14db72f1f768c5a17b49ed689a05922c57d3
---
M includes/jobqueue/JobQueueGroup.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/jobqueue/JobQueueGroup.php 
b/includes/jobqueue/JobQueueGroup.php
index 71d68d9..9f78404 100644
--- a/includes/jobqueue/JobQueueGroup.php
+++ b/includes/jobqueue/JobQueueGroup.php
@@ -170,7 +170,7 @@
 * @since 1.26
 */
public function lazyPush( $jobs ) {
-   if ( PHP_SAPI === 'cli' ) {
+   if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ) {
$this->push( $jobs );
return;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/347355
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf9c14db72f1f768c5a17b49ed689a05922c57d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Seb35 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Prevent PHPDBG from issuing notices in unit tests

2017-04-10 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347355 )

Change subject: Prevent PHPDBG from issuing notices in unit tests
..

Prevent PHPDBG from issuing notices in unit tests

Although issuing PHP notices in unit tests is only a nice-to-have, the cause
is PHPDBG has no special treatment in JobQueueGroup at the contrary of the
PHP SAPI 'cli', and it may be desirable both 'command line SAPIs' have the
same behaviour.

This is the most apparent difference between cli and phpdbg but there could
be a dozen of other occurrences (see bug), potentially creating differences
in unit tests depending on the SAPI.

Bug: T162591
Change-Id: Idf9c14db72f1f768c5a17b49ed689a05922c57d3
---
M includes/jobqueue/JobQueueGroup.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/347355/1

diff --git a/includes/jobqueue/JobQueueGroup.php 
b/includes/jobqueue/JobQueueGroup.php
index 71d68d9..9f78404 100644
--- a/includes/jobqueue/JobQueueGroup.php
+++ b/includes/jobqueue/JobQueueGroup.php
@@ -170,7 +170,7 @@
 * @since 1.26
 */
public function lazyPush( $jobs ) {
-   if ( PHP_SAPI === 'cli' ) {
+   if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ) {
$this->push( $jobs );
return;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/347355
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf9c14db72f1f768c5a17b49ed689a05922c57d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Seb35 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits