[Wikitech-l] MediaWikiTestCase now validates @cover tags

2017-12-29 Thread Kunal Mehta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

MediaWikiTestCase will now verify[1] that @covers tags are sane when
running normal PHPUnit tests. Previously PHPUnit would only verify
that when it ran the twice daily coverage job, and fail if even a
single one was wrong.

This also affects extensions, even though we don't generate coverage
reports for them yet[2]!

If your tests extend the PHPUnit_Framework_TestCase class, you can
just add "use MediaWikiCoversValidator" so the trait is invoked and
will still validate @covers tags.

[1] https://gerrit.wikimedia.org/r/#/c/399775/
[2] https://phabricator.wikimedia.org/T71685

- -- Legoktm
-BEGIN PGP SIGNATURE-

iQJLBAEBCgA1FiEE+h6fmkHn9DUCyl1jUvyOe+23/KIFAlpGqdUXHGxlZ29rdG1A
bWVtYmVyLmZzZi5vcmcACgkQUvyOe+23/KK3+Q/9GipyKlAjx1GqI/uJQNrpAbzR
IqWa8aAU2xueeVdrzfbsHblYmdpOJvu1xFNXuUY1X1/rG8sgVn45MaYy/KEE+wZO
W3uLqMfRZHRa8crUqoK8Y4jnj+CBKXvF9HpKqXRzg18O2g0L4ayyxC9kpkTSIyRx
WQy6+Pp1o+F0yywujpCDu6KAZ6LrpHgdOE3hdnXnWQLzuFmc/9UIYfx4/yp3u1Bf
yZ0z/+OmlCBXuReqrilTliy6Ow5F8I8GNQwlPHaB+cIOHubBa2Ubu8AA6O5TY1bh
zQeen8UeZfAzBofpX3NlvJcSvUfJTaZ+e7XKs/H+9g8vcThFHhVqU2uUj48GU3sO
fLFQqla4D7kZGXt4xlU2yDCnwKxBTgCHiz2wbqKdrSTzYxVEWr9zxwm0CxmUsH7g
4tqaxRo/NhKNj7F+g+bgfkbXxmqn49aBhJGVXTYYEFPCBQHu0xef6LzCApuVvVar
gjGA2jnw/OLlVrnTZdK+S0GChxtnonripTqCKUplUmZIFyrwQ7DFbckjBeyZ+etv
4e/9h0NljMytqnXu9vBjWkCGFQ1pyvU8Pz5+IzAS3umh6DSGx04wAXzDDvn5AQCI
NJxNzfmkBfe93khRL8m4jj+FNa5hIhcLNi4cEpzNb97ILjKhSTZ7O13J0npriiSe
Pl3RL3U3gfstPEGfgPQ=
=VemP
-END PGP SIGNATURE-

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] MediaWiki-CodeSniffer 15.0.0 released

2017-12-29 Thread Kunal Mehta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hello!

MediaWiki-CodeSniffer 15.0.0 is now available for use in your MediaWiki
extensions and other projects. This release features a lot of
different improvements, and new upstream features. Specifically,
there's a new comment syntax for enabling/disabling sniffs for
specific lines of code:

// phpcs:disable Some.Sniff.Name
weird_code();
// phpcs:enable Some.Sniff.Name

You can also use // phpcs:ignore Some.Sniff.Name
to just ignore the next line instead of doing a disable/enable pair.

The full conversion details are in the upstream release notes[1].

The full MediaWiki-CodeSniffer changelog since 14.1.0:

* Add sniff for using is_int over is_integer (Kunal Mehta)
* Allow _ in unit test method names (Gergő Tisza)
* Check function definitions for the same variable name (Kunal Mehta)
* Fix handling of alternative if in IfElseStructureSniff (Umherirrender)
* Forbid usage of extract() (Kunal Mehta)
* Ignore maintenance scripts in ClassMatchesFilenameSniff (Kunal Mehta)
* Improve phpdoc classname parsing (Gergő Tisza)
* Move phpcs.xml to .phpcs.xml (Umherirrender)
* Remove WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment (Gergő
Tisza)
* Replace PEAR with Packagist in README.md link (Ricordisamoa)
* Require that an explicit visiblity is set on methods and properties
(Kunal Mehta)
* Rework ExtendClassUageSniff to avoid private class member
(Umherirrender)
* Skip inner functions in FunctionCommentSniff::processReturn
(Umherirrender)
* Update PHP_CodeSniffer to 3.2.2 (Ricordisamoa, Kunal Mehta)
* Use backticks in HISTORY.md (Ricordisamoa)
* Use only PSR2.Files.EndFileNewline (Kunal Mehta)
* Use upstream Generic.Files.OneObjectStructurePerFile sniff (Kunal Meht
a)
* Use upstream Generic.PHP.DiscourageGoto (Kunal Mehta)
* Warn on usage of create_function() (Kunal Mehta)

Thank you to all of the contributors for this release!

- -- Legoktm

[1] https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.2.0
-BEGIN PGP SIGNATURE-

iQJLBAEBCgA1FiEE+h6fmkHn9DUCyl1jUvyOe+23/KIFAlpGyDoXHGxlZ29rdG1A
bWVtYmVyLmZzZi5vcmcACgkQUvyOe+23/KKL8RAAjXyjkwf5o+wTBxQBU+rssuim
LxytTUh7mzACyJxSWfHPhZN2UYJ5FjdlHu4P56880qrhA6ZAfcudSIMKqkvUsp9Z
/TZn4iYyc7WmpWME8TPQZX5iU/hDfcBvF0KFgK+IDqm+GFsH31EkjcuCSVFCSfjQ
UroX+iY59dUYieIFKZEQ9gZE7twJYOsRiBW3kt+VSCzXmeMEWXOc5Qg47+TYSWTN
AhGG4lwI55/Gpdt27NaaCai2d7hLeTra8XuI1pYo5sRfMA9Jr6imHD3mGQVCv+dA
wL0VP9IUsaDgXmSlb2Zt7FNq9N+a2u+xPQtPwDcA4nibvjXpvz+hYTVcXNrLY4yX
PZnN6ma+SeMbJtypv3ZP6U2axZ1Da4ZzcndyKPCKjrFhazQ2lDuAu6SLNVf361XF
PsCDmSYl/U1jOvzDuuxmM0cgZwHfCslYt0H1yACauHV8rCHRI4J1V6jfbTZlAorB
yXWF/Qv0chi4oXVxm2PcSNhRCF25WZ28YAeJgvED8Dtk0Y23qgpG6bfoVaqbtdR2
NkBPc2dEKD9IJo+t5zY4d8Y+2N5OjmxYk4OMlpKzMDydt+hsV3yUEUAKALVmZZ9I
G4LS8h0QIf7EPgzkGBYcH8DagMcUg3IQEaMKtarXimbhwAVKIZzLeWTLaff4G9ww
etV2oZ7Pc+qGwO05LDk=
=gIvp
-END PGP SIGNATURE-

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l