7/7 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ------------------------------------------------------------------------------
Line src/AddToCalendarApiWidget.php
------ ------------------------------------------------------------------------------
48 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/AddToCalendar.php
------ ------------------------------------------------------------------------------
80 \Drupal calls should be avoided in classes, use dependency injection instead
132 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/AddToCalendar.php
------ ------------------------------------------------------------------------------
80 \Drupal calls should be avoided in classes, use dependency injection instead
132 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------

Above warnings were shown while doing a drupal-check(https://github.com/mglaman/drupal-check) for deprecated codes.

Comments

hash6 created an issue. See original summary.

hash6’s picture

5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ ---------------------------------------------------
Line src/Plugin/Field/FieldType/AddToCalendarField.php
------ ---------------------------------------------------
47 Function _addtocalendar_build_form not found.
------ ---------------------------------------------------

[ERROR] Found 1 error

I have fixed the errors shown fixed earlier but I did get one more error which is as given below which is similar to this : https://www.drupal.org/project/addtocalendar/issues/2897562
while running drupal-check using this https://github.com/mglaman/drupal-check

hash6’s picture

Status: Needs work » Needs review
pratik_kamble’s picture

Status: Needs review » Needs work

@hash6 There are coding standard issues in the patch.

FILE: .../addtocalendar/src/Plugin/Field/FieldFormatter/AddToCalendar.php
----------------------------------------------------------------------
FOUND 27 ERRORS AFFECTING 23 LINES
----------------------------------------------------------------------
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
29 | ERROR | [x] Doc comment short description must end with a full
| | stop
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
35 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
36 | ERROR | [x] Doc comment short description must end with a full
| | stop
38 | ERROR | [x] Expected "\Drupal\Core\Utility\Token" but found
| | "\Drupal\Core\Utility\Token;" for @var tag in
| | member variable comment
40 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
42 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
45 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
46 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 5
57 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
57 | ERROR | [x] Expected 1 blank line after function; 0 found
58 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
58 | ERROR | [ ] Parameter $add_to_calendar_api_widget is not
| | described in comment
58 | ERROR | [ ] Parameter $token is not described in comment
75 | ERROR | [ ] Doc comment for parameter $addToCalendarApiWidget
| | does not match actual variable name $token
77 | ERROR | [ ] Missing parameter name
80 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
81 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
82 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 8
83 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 8
84 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 8
85 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
85 | ERROR | [x] Expected 1 blank line after function; 2 found
154 | ERROR | [x] Short array syntax must be used to define arrays
178 | ERROR | [ ] Missing parameter type
188 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

hash6’s picture

Version: 8.x-4.x-dev » 8.x-3.x-dev

working on 8.x-3.x-dev for deprecated code

hash6’s picture

Added Dependency Injection Container and checked for Deprecated Code for 8.x-3.x

hash6’s picture

Assigned: hash6 » Unassigned
Status: Needs work » Needs review
guptahemant’s picture

Assigned: Unassigned » guptahemant

  • guptahemant committed b73f9b1 on 8.x-3.x authored by hash6
    Issue #3094844 by hash6, pratik_kamble, guptahemant: Drupal 9 Deprecated...
guptahemant’s picture

HI @hash6

Thanks for the patch and @pratik_kamble for the review here. Patch is committed now on 8.x-3.x branch.

guptahemant’s picture

Assigned: guptahemant » Unassigned
guptahemant’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

lisa.rae’s picture

Issue tags: +Drupal 9 compatibility