Skip to content

Releases: moodlehq/moodle-cs

v3.6.0

09 Sep 10:47
9dd34ed

Choose a tag to compare

Take a look at the CHANGELOG for details about other releases.

v3.5.2

14 Aug 01:25
0d08e21

Choose a tag to compare

Fixed

  • The branch detector was not able to detect the Moodle version following MDL-83424.
  • The moodle.PHPUnit.TestCaseProvider sniff can now detect fully-qualified class names.

Added

  • A new NamespaceScopeUtil helper was added with methods to help qualify names within a file.

Take a look at the CHANGELOG for details about other releases.

v3.5.1

30 Jul 05:01
8601b38

Choose a tag to compare

Fixed

  • The moodle.Commenting.VariableComment sniff now accepts the following tags as valid on a @var:
    • @since
    • @link
    • @deprecated

Take a look at the CHANGELOG for details about other releases.

v3.5.0

17 Jul 05:46
d33f641

Choose a tag to compare

Changed

  • Bumped dependencies for:
    • squizlabs/php_codesniffer to 3.13.2
    • phpcsstandards/phpcsextra to 1.4.0
    • dealerdirect/phpcodesniffer-composer-installer to 1.1.1
  • A number of legacy Moodle rules have been removed. See MDLSITE-7597 for further information.
  • The Generic.Arrays.DisallowLongArraySyntax rule has been changed to an error as planned in #58.
  • The list of global variables has been updated to reflect the complete list of globals used in Moodle #182.

Take a look at the CHANGELOG for details about other releases.

v3.4.11

26 Jun 15:20
05f1823

Choose a tag to compare

Fixed

  • The moodle.Commenting.InlineComment sniff will now accept a full-stop inside a closing parentheses as valid English.
  • The @Transform tag is now an accepted tag for Behat tests
  • The moodle.Commenting.InlineComment sniff is now aware of PHP enum types.

Take a look at the CHANGELOG for details about other releases.

v3.4.10

04 Jul 16:40
89ff0ac

Choose a tag to compare

Changed

  • The moodle.NamingConventions.ValidFunctionName sniff will now ignore errors on methods employing the #[\Override] attribute.
  • The moodle.Commenting.MissingDocblock sniff no longer warns about missing docs on non-global anonymous classes, for example those written as an instance class in a unit test.

Fixed

  • Fixed an edge case leading to the file phpdoc block being incorrectly detected by various sniffs.
  • Fixed a couple of problems with the moodle.Files.BoilerplateComment related to empty comment lines and to comments in the <?php open tag line.

Take a look at the CHANGELOG for details about other releases.

v3.4.9

19 Jun 14:38
44ad668

Choose a tag to compare

Fixed

  • Fixed a recent regression by allowing to the moodle.Files.BoilerplateComment sniff to contain "extra" consecutive comment lines immediately after the official boilerplate ends.

Take a look at the CHANGELOG for details about other releases.

v3.4.8

14 Jun 14:52
91661a1

Choose a tag to compare

Added

  • The existing moodle.PHPUnit.TestCaseCovers sniff now detects multiple uses of the @coversDefaultClass annotation. Only one is allowed by class.
  • The existing moodle.Files.BoilerplateComment sniff now performs more checks (spacing, placement, blank lines, ...) and is able to fix many of them.

Changed

  • Made codes for moodle.Commenting.MissingDocblock more specific to the scenario (Fixes #154).

Take a look at the CHANGELOG for details about other releases.

v3.4.7

31 May 16:34
4f1bc63

Choose a tag to compare

Added

  • Add new moodle.PHPUnit.ParentSetUpTearDown sniff to verify, among other things, that all the setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass() methods in unit tests are properly calling to their parent counterparts. Applies to Moodle 4.5 and up.
  • Add new moodle.Commenting.ConstructorReturn sniff to check that constructors do not document a return value.

Changed

  • Update composer dependencies to current versions, notably PHP_CodeSniffer (3.10.1) and PHPCompatibility (96072c30).
  • The moodle.Commenting.MissingDocblock sniff will now detect use of the Override attribute (Fixes #155).

Fixed

  • Various fixes to own (GH workflow) integration tests.

Take a look at the CHANGELOG for details about other releases.

v3.4.6

03 Apr 08:07
02a279e

Choose a tag to compare

Fixed

  • Solved a problem where Windows file paths were not normalised leading to false positive results on some path-based sniffs.
  • Solved a problem with fetching the name of an anonymous class, or closure.