Skip to content

Commit 6b8dd7e

Browse files
committed
Add option --scss-depreactions for behat
1 parent fb9a165 commit 6b8dd7e

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
moodle-plugin-ci phpdoc
153153
moodle-plugin-ci phpunit --verbose --coverage-text --fail-on-warning
154154
moodle-plugin-ci behat --profile default
155-
moodle-plugin-ci behat --profile chrome
155+
moodle-plugin-ci behat --profile chrome --scss-deprecations
156156
moodle-plugin-ci behat --profile firefox --tags="@local_ci&&~@app"
157157
158158
buildphar:
@@ -279,7 +279,7 @@ jobs:
279279
php build/moodle-plugin-ci.phar phpdoc
280280
php build/moodle-plugin-ci.phar phpunit --verbose --coverage-text --fail-on-warning
281281
php build/moodle-plugin-ci.phar behat --profile default
282-
php build/moodle-plugin-ci.phar behat --profile chrome
282+
php build/moodle-plugin-ci.phar behat --profile chrome --scss-deprecations
283283
php build/moodle-plugin-ci.phar behat --profile firefox --tags="@local_ci&&~@app"
284284
285285
selfupdatetest:

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ This project adheres to [Semantic Versioning](https://semver.org/).
88

99
The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com).
1010

11+
## [Unreleased]
12+
### Added
13+
- Allow to run with PHP 8.4 (supported in Moodle 5.0)
14+
- New `--scss-deprecations` option added to the `behat` command
15+
1116
## [4.5.6] - 2025-01-31
1217
### Fixed
1318
- Removed the PHPUnit --verbose option to comply with Moodle 5.0

docs/CLI.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,16 @@ Print contents of Behat failure HTML files
347347
* Is negatable: no
348348
* Default: `false`
349349

350+
#### `--scss-deprecations`
351+
352+
Enable SCSS deprecation checks
353+
354+
* Accept value: no
355+
* Is value required: no
356+
* Is multiple: no
357+
* Is negatable: no
358+
* Default: `false`
359+
350360
#### `--help|-h`
351361

352362
Display help for the given command. When no command is given display help for the list command

src/Command/BehatCommand.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ protected function configure(): void
4848
->addOption('auto-rerun', null, InputOption::VALUE_REQUIRED, 'Number of times to rerun failures', 2)
4949
->addOption('selenium', null, InputOption::VALUE_REQUIRED, 'Selenium Docker image')
5050
->addOption('dump', null, InputOption::VALUE_NONE, 'Print contents of Behat failure HTML files')
51+
->addOption('scss-deprecations', null, InputOption::VALUE_NONE, 'Enable SCSS deprecation checks')
5152
->setDescription('Run Behat on a plugin');
5253
}
5354

@@ -72,6 +73,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7273

7374
$servers && $this->startServerProcesses($input);
7475

76+
if ($input->getOption('scss-deprecations')) {
77+
$enableprocess = new Process([
78+
'php', 'admin/tool/behat/cli/util.php',
79+
'--enable',
80+
'--add-core-features-to-theme',
81+
'--scss-deprecations',
82+
], $this->moodle->directory, null, null, null);
83+
$this->execute->passThroughProcess($enableprocess);
84+
}
85+
7586
$cmd = [
7687
'php', 'admin/tool/behat/cli/run.php',
7788
'--profile=' . $input->getOption('profile'),

0 commit comments

Comments
 (0)