- Status changed to Needs review
11 months ago 9:39pm 29 February 2024 - Status changed to Needs work
11 months ago 7:48am 1 March 2024 - šµšPhilippines clarkssquared
Hi
I applied the MR !6 and there are PHPCS errors and warning that my terminal flagged
ā readonlymode git:(3abe435) curl https://git.drupalcode.org/project/readonlymode/-/merge_requests/6.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18417 0 18417 0 0 36829 0 --:--:-- --:--:-- --:--:-- 37432 patching file readonlymode.module patching file 'src/Plugin/Block/ReadonlymodeBlock.php' patching file 'tests/fixtures/drupal7.php' patching file 'tests/src/Functional/ReadonlymodeTest.php' ā readonlymode git:(3abe435) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml readonlymode FILE: ...web/modules/contrib/readonlymode/tests/src/Functional/ReadonlymodeTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 13 | ERROR | Class name doesn't match filename; expected "class | | ReadonlymodeTest" -------------------------------------------------------------------------------- FILE: ...al/web/modules/contrib/readonlymode/src/Plugin/Block/ReadonlymodeBlock.php -------------------------------------------------------------------------------- FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES -------------------------------------------------------------------------------- 15 | ERROR | Class name doesn't match filename; expected "class | | ReadonlymodeBlock" 22 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 24 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- Time: 339ms; Memory: 12MB ā contrib git:(master) ā
- Status changed to Needs review
11 months ago 2:48pm 1 March 2024 That's because the case of the files was changed, but changing the case of files doesn't work in certain operating systems (during patching). The code itself is correct. Look at the following line, the file is not
ReadonlymodeBlock.php
anymore; it'sReadOnlyModeBlock.php
.https://git.drupalcode.org/project/readonlymode/-/merge_requests/6/diffs...
- Status changed to Needs work
11 months ago 2:57pm 1 March 2024 - Status changed to Needs review
11 months ago 3:04pm 1 March 2024 - Status changed to Needs work
8 months ago 10:56am 24 May 2024 Hi @solideogloria,
Applied the plain diff, and found one error
FILE: ...web/modules/contrib/readonlymode/tests/src/Functional/ReadonlymodeTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 13 | ERROR | Class name doesn't match filename; expected "class | | ReadonlymodeTest" -------------------------------------------------------------------------------- Time: 256ms; Memory: 12MB
Kindly work on it, please.
Thank you.- Status changed to Needs review
8 months ago 1:55pm 24 May 2024 The file name was changed in the patch, so they actually do match. However, you cannot simply apply the patch with Composer, because Windows computers won't rename the file if the letters are the same, even if the case is different.
See my previous comments in #9. š Fixes for Drupal coding standards Needs review