Closed (fixed)
Project:
Metatag
Version:
2.1.x-dev
Component:
Tests
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2024 at 17:53 UTC
Updated:
21 Oct 2025 at 11:09 UTC
Jump to comment: Most recent
Resolve phpcs issues in the 2.0.x and 2.1.x branches.
These are important to resolve because not marking nullable with ? is deprecated in PHP 8.4 and produces a warning.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
kul.pratap commentedComment #5
kul.pratap commentedI have solved all the phpcs error, will i also solve phpstan and phpunit error to pass pipeline fully green?
Comment #6
a.aaronjake commentedHi @kul.pratap.,
I have re-ran the pipeline, confirmed the phpcs errors are now fixed and the pipeline passed: Gitlab CI pipeline passed phpcs
Will now move this to RTBC since this issue is for the phpcs only.
Thanks,
Jake
Comment #7
damienmckennaPlease don't mark something RTBC if you haven't checked the test pipeline, because unfortunately these changes broke a lot of tests. Also, it seems to have added a cspell issue.
Comment #13
kul.pratap commentedAll PHPCS issues have been resolved in versions 2.0.x and 2.1.x. Please review.
Comment #14
ptmkenny commentedMR157 needs the merge conflicts fixed.
Also added a note to the issue summary that this is an important issue because this fixes deprecation warnings in PHP 8.4.
Comment #15
kul.pratap commentedComment #16
ptmkenny commented@kul.pratap Please make sure the test icon is green before setting to "Needs review." On the 2.0.x branch (3484975-phpcs-fixes), phpunit is failing, but it is not failing in dev (you can check the 2.0.x GitLab CI pipeline from the module page, which is currently here: https://git.drupalcode.org/project/metatag/-/pipelines/332334)
Since phpunit passes in dev but fails in 3484975-phpcs-fixes, then the 3484975-phpcs-fixes is broken and needs to be fixed before it can be reviewed.
Comment #17
kul.pratap commented@ptmkenny As the issue summary only mentions PHPCS, I have resolved the PHPCS errors and changed the issue state to 'Needs Review.' However, since you mentioned that I need to resolve PHPUnit errors and pass the pipeline, I am now working on it.
Comment #18
kul.pratap commentedComment #23
kul.pratap commented@ptmkenny you can check MR!154 now it is passing.
Comment #24
ptmkenny commentedYes, this issue is to fix the PHPCS test. However, the phpunit tests are passing on dev, so if as a result of fixing the PHPCS test, the phpunit test breaks, it needs to be fixed here.
Thank you for fixing MR!154. However, as stated in the issue summary, we need to fix PHPCS issues in both the 2.0.x and the 2.1.x branches. It seems you hid the branch for 2.1.x--(3484975-phpcs-fixes-2.1.x)-- but this branch also needs to have an MR with the same fixes as 2.0.x. The reason is that both 2.0.x and 2.1.x are currently supported by the module. (Also, work generally must always be committed to the latest dev branch, which in this case is 2.1.x-dev, so there is no way we can commit 2.0.x without 2.1.x.)
Setting back to "Needs work" because we need an MR for 2.1.x-dev as well with green tests.
Comment #25
kul.pratap commentedOk i will work on it
Comment #31
damienmckennaComment #33
damienmckennaComment #35
damienmckennaCommitted. Thank you all.