jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/375849 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
......................................................................


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Also added "composer fix" command.

Change-Id: Ic810abedcbe96a4eda1f211ca9ae8b87016977cc
---
M .travis.yml
M composer.json
M phpcs.xml
M src/Functions.php
M tests/FunctionsTest.php
5 files changed, 16 insertions(+), 15 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 5b4fcc5..ca6ccdd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,14 @@
 language: php
 php:
-  - "5.3.3"
-  - "5.3"
-  - "5.4"
   - "5.5"
   - "5.6"
+  - "7.0"
+  - "7.1"
   - "hhvm"
 sudo: false
 env:
   global:
     - COMPOSER_DISABLE_XDEBUG_WARN=1
-before_install:
-  - if [ "$TRAVIS_PHP_VERSION" = "5.3.3" ]; then composer config disable-tls 
true; composer config secure-http false; fi
 install:
   - composer install
 script:
diff --git a/composer.json b/composer.json
index 85e98a9..9d4fd69 100644
--- a/composer.json
+++ b/composer.json
@@ -19,18 +19,21 @@
                ]
        },
        "require": {
-               "php": ">=5.3.3"
+               "php": ">=5.5.9"
        },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9",
-               "mediawiki/mediawiki-codesniffer": "0.5.0",
+               "mediawiki/mediawiki-codesniffer": "0.12.0",
                "phpunit/phpunit": "~4.5"
        },
        "scripts": {
                "test": [
                        "parallel-lint . --exclude vendor",
-                       "phpcs -p",
+                       "phpcs -ps",
                        "phpunit"
+               ],
+               "fix": [
+                       "phpcbf"
                ]
        }
 }
diff --git a/phpcs.xml b/phpcs.xml
index 2c5d9d3..de78f6a 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
 <ruleset name="at-ease">
-       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
+       <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+       </rule>
        <file>.</file>
        <exclude-pattern>coverage</exclude-pattern>
        <exclude-pattern>vendor</exclude-pattern>
diff --git a/src/Functions.php b/src/Functions.php
index 0be91eb..8c342c2 100644
--- a/src/Functions.php
+++ b/src/Functions.php
@@ -23,7 +23,7 @@
 /**
  * Reference-counted warning suppression
  *
- * @param bool $end
+ * @param bool $end Whether to restore warnings
  */
 function suppressWarnings( $end = false ) {
        static $suppressCount = 0;
@@ -59,11 +59,10 @@
        suppressWarnings( true );
 }
 
-
 /**
  * Call the callback given by the first parameter, suppressing any warnings.
  *
- * @param callable $callback
+ * @param callable $callback Function to call
  * @return mixed
  */
 function quietCall( $callback /*, parameters... */ ) {
diff --git a/tests/FunctionsTest.php b/tests/FunctionsTest.php
index 9582818..2f57f31 100644
--- a/tests/FunctionsTest.php
+++ b/tests/FunctionsTest.php
@@ -25,7 +25,7 @@
         * over in silence when enclosed in warning suppress / restore calls.
         */
        public function testWarningSuppression() {
-               $a = array();
+               $a = [];
                MediaWiki\suppressWarnings();
                $a['unsetkey'];
                MediaWiki\restoreWarnings();
@@ -59,12 +59,12 @@
 
                $this->assertEquals(
                        MediaWiki\quietCall( 
'FunctionsTest::dummyStaticMethod', 24 ),
-                       FunctionsTest::dummyStaticMethod( 24 ),
+                       self::dummyStaticMethod( 24 ),
                        'MediaWiki\quietCall() with static method'
                );
 
                $this->assertEquals(
-                       MediaWiki\quietCall( array( $this, 
'dummyInstanceMethod' ), 24 ),
+                       MediaWiki\quietCall( [ $this, 'dummyInstanceMethod' ], 
24 ),
                        $this->dummyInstanceMethod( 24 ),
                        'MediaWiki\quietCall() with instance method'
                );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic810abedcbe96a4eda1f211ca9ae8b87016977cc
Gerrit-PatchSet: 2
Gerrit-Project: at-ease
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <tools.libraryupgra...@tools.wmflabs.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to