Skip to content

Commit

Permalink
Bump various dependencies
Browse files Browse the repository at this point in the history
- moodle-cs 3.4.8
  • Loading branch information
stronk7 committed Jun 14, 2024
1 parent 07d0f27 commit d0bd783
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 36 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
],
"require": {
"php": ">=7.4",
"moodlehq/moodle-cs": "^3.4.7",
"moodlehq/moodle-cs": "^3.4.8",
"moodlehq/moodle-local_ci": "^1.0.30",
"moodlehq/moodle-local_moodlecheck": "^1.3.2",
"sebastian/phpcpd": "^6.0.3",
Expand Down
65 changes: 33 additions & 32 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com).

## [Unreleased]
### Changed
- Updated project dependencies to current [moodle-cs v3.4.8](https://github.com/moodlehq/moodle-cs) release.

### Fixed
- Fixed a problem with the `grunt` command running the `stylelint` tasks against the whole Moodle directory (including both core and other optional plugins installed). Now only the plugin being checked is effectively analysed.

Expand Down
4 changes: 2 additions & 2 deletions tests/Command/CodeCheckerCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ abstract private function somefunc() { // To verify PHPCompatibility sniff.
$this->assertMatchesRegularExpression('/E\.* 10\.* \/ 10 \(100%\)/', $output); // Progress.
$this->assertMatchesRegularExpression('/\/fixable.php/', $output); // File.
$this->assertMatchesRegularExpression('/ 11 ERRORS AND 1 WARNING AFFECTING 8 /', $output); // Summary.
$this->assertMatchesRegularExpression('/moodle\.Files\.BoilerplateComment\.Wrong/', $output); // Moodle sniff.
$this->assertMatchesRegularExpression('/BoilerplateComment\.NoBoilerplateComment/', $output); // Moodle sniff.
$this->assertMatchesRegularExpression('/Expected MOODLE_INTERNAL check/', $output); // Moodle sniff.
$this->assertMatchesRegularExpression('/print_error\(\) has been deprecated/', $output); // Moodle sniff.
$this->assertMatchesRegularExpression('/Usage of ELSEIF not allowed; use ELSE IF/', $output); // Squiz sniff.
Expand All @@ -109,7 +109,7 @@ abstract private function somefunc() { // To verify PHPCompatibility sniff.
$this->assertMatchesRegularExpression('/AbstractPrivateMethods\.Found/', $output); // PHPCompatibility sniff.
$this->assertMatchesRegularExpression('/Opening brace must be the last content/', $output); // Generic sniff.
$this->assertMatchesRegularExpression('/Files\.EndFileNewline\.NotFound/', $output); // Generic of file.
$this->assertMatchesRegularExpression('/PHPCBF CAN FIX THE 3 MARKED SNIFF/', $output); // PHPCBF note.
$this->assertMatchesRegularExpression('/PHPCBF CAN FIX THE 4 MARKED SNIFF/', $output); // PHPCBF note.
$this->assertMatchesRegularExpression('/Time:.*Memory:/', $output); // Time.

// Also verify display info is correct.
Expand Down
16 changes: 15 additions & 1 deletion tests/Command/CodeFixerCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,28 @@ public function testExecute()
$output = $commandTester->getDisplay();
$this->assertMatchesRegularExpression('/F\.* 10\.* \/ 10 \(100%\)/', $output); // Progress.
$this->assertMatchesRegularExpression('/\/fixable.php/', $output); // File.
$this->assertMatchesRegularExpression('/A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE/', $output); // Summary.
$this->assertMatchesRegularExpression('/A TOTAL OF 2 ERRORS WERE FIXED IN 1 FILE/', $output); // Summary.
$this->assertMatchesRegularExpression('/Time:.*Memory:/', $output); // Time.

// Also verify display info is correct.
$this->assertMatchesRegularExpression('/RUN Code Beautifier and Fixer/', $commandTester->getDisplay());

$expected = <<<'EOT'
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
if (true) {
Expand Down

0 comments on commit d0bd783

Please sign in to comment.