Problem/Motivation

Before 3.0.0, try to fix any further phpstan issues from latest pipeline run. These aren't all the issues when running locally, but it will help with green colors.

https://git.drupalcode.org/project/agreement/-/pipelines/144168/codequal...

Ignore the drupal 12.0.0 compatibility warning.

Proposed resolution

Fixes code quality issues without breaking compatibility.

Remaining tasks

Ensure automated tests pass after creating merge request with fixes

Issue fork agreement-3440317

Command icon Show commands

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

mradcliffe created an issue. See original summary.

mradcliffe’s picture

Status: Active » Needs review

mitthukumawat made their first commit to this issue’s fork.

mitthukumawat’s picture

Fixed some of the coding standard issues occurred when running phpcs with Drupal and DrupalPractice.

/modules/contrib $ phpcs --standard=DrupalPractice --extensions=php,module,inc,install agreement/

FILE: modules/contrib/agreement/agreement.module
------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------
 61 | WARNING | Unused variable $id.
------------------------------------------------------------------------

FILE: modules/contrib/agreement/src/Entity/AgreementForm.php
------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------
 106 | WARNING | Unused variable $role_name.
------------------------------------------------------------------------------------

 /modules/contrib $ phpcs --standard=Drupal --extensions=php,module,inc,install agreement/

FILE: modules/contrib/agreement/tests/src/Functional/AgreementCustomUnprivilegedUserTest.php
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------
 183 | WARNING | [x] '@todo: Log in following password reset link, go somewhere other than' should match the format '@todo Fix problem X here.'
------------------------------------------------------------------------------------------------------------------------------------------------

FILE: modules/contrib/agreement/agreement.install
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 64 | ERROR | Doc comment short description must start with a capital letter
-----------------------------------------------------------------------------
mradcliffe’s picture

Status: Needs review » Needs work

silvi.addweb made their first commit to this issue’s fork.

silvi.addweb’s picture

Status: Needs work » Needs review

Hi,
I have fixed below phpcs issue, Please review.

modules/custom/agreement/

FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/agreement.links.task.yml
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
 12 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/agreement.links.menu.yml
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/README.md
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------
  3 | WARNING | Line exceeds 80 characters; contains 348 characters
  5 | WARNING | Line exceeds 80 characters; contains 386 characters
 10 | WARNING | Line exceeds 80 characters; contains 126 characters
 21 | WARNING | Line exceeds 80 characters; contains 145 characters
 29 | WARNING | Line exceeds 80 characters; contains 126 characters
----------------------------------------------------------------------------------------------------------


FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/agreement/migrations/agreement_types.yml
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
 39 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

Time: 718ms; Memory: 12MB
mradcliffe’s picture

Status: Needs review » Needs work

Thank you for continuing work on this issue.

I would prefer not to change the README.md file from what it is in this issue.

The tests are still failing due to the is merge request so I am putting this back in Needs work.

ankitv18 made their first commit to this issue’s fork.

ankitv18 changed the visibility of the branch 3440317-fixes-for-remaining to hidden.

ankitv18’s picture

Status: Needs work » Needs review

MR!19 is ready for a review.

  • mradcliffe committed 055ff0ec on 3.0.x authored by ankitv18
    Issue #3440317 by ankitv18, mradcliffe, mitthukumawat, silvi.addweb:...
mradcliffe’s picture

Status: Needs review » Fixed

Thank you for all the effort. Following up with any 11 issues in the next project update bot run in #3428802: Automated Drupal 11 compatibility fixes for agreement.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.