Problem/Motivation

There are various instances of usage deprecated code and all those will have to be removed to make module compatible with Drupal 9.

Steps to reproduce

Run the Drupal check and Upgrade Status check modules.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

gaurav.kapoor created an issue. See original summary.

gaurav.kapoor’s picture

------ -----------------------------------------------------------------------
Line disqus.install
------ -----------------------------------------------------------------------
33 Call to an undefined method
Drupal\Core\Entity\Sql\TableMappingInterface::getDedicatedDataTableNa
me().
41 Call to an undefined method
Drupal\Core\Entity\Sql\TableMappingInterface::getDedicatedRevisionTab
leName().
------ -----------------------------------------------------------------------

------ ---------------------------------------------------------------
Line disqus.module
------ ---------------------------------------------------------------
76 Access to an undefined property
Drupal\Core\Field\FieldItemListInterface::$status.
129 If condition is always true.
198 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$original.
198 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$original.
200 If condition is always true.
282 Function disqus_api() should return object but returns false.
------ ---------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Controller/DisqusController.php
------ --------------------------------------------------------------------
10 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ -------------------------------------------------------------
Line src/DisqusCommentManager.php
------ -------------------------------------------------------------
113 Call to an undefined method Drupal\file\Entity\File::url().
169 Access to an undefined property
Drupal\Core\Field\FieldItemListInterface::$entity.
------ -------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Element/Disqus.php
------ --------------------------------------------------------------------
12 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Form/DisqusSettingsForm.php
------ --------------------------------------------------------------------
16 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Block/DisqusBaseBlock.php
------ --------------------------------------------------------------------
20 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Block/DisqusCombinationWidgetBlock.php
------ --------------------------------------------------------------------
16 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Block/DisqusPopularThreadsBlock.php
------ --------------------------------------------------------------------
14 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Block/DisqusRecentCommentBlock.php
------ --------------------------------------------------------------------
16 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Block/DisqusTopCommentersBlock.php
------ --------------------------------------------------------------------
16 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/DisqusFormatter.php
------ --------------------------------------------------------------------
23 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
81 Access to an undefined property
Drupal\Core\Field\FieldItemListInterface::$status.
86 Access to an undefined property
Drupal\Core\Field\FieldItemListInterface::$status.
91 Access to an undefined property
Drupal\Core\Field\FieldItemListInterface::$identifier.
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Field/FieldType/DisqusItem.php
------ --------------------------------------------------------------------
21 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/Field/FieldWidget/DisqusWidget.php
------ --------------------------------------------------------------------
24 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
63 Call to an undefined method
Drupal\Core\Field\FieldDefinitionInterface::get().
64 Call to an undefined method
Drupal\Core\Field\FieldDefinitionInterface::get().
71 Access to an undefined property
Drupal\Core\Field\FieldItemListInterface::$status.
------ --------------------------------------------------------------------

------ ---------------------------------------------------------
Line src/Plugin/migrate/destination/DisqusComment.php
------ ---------------------------------------------------------
162 Syntax error, unexpected ')', expecting ']' on line 162
------ ---------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/migrate/process/DisqusEntityId.php
------ --------------------------------------------------------------------
17 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ -----------------------------------------------------------------------
Line src/Plugin/migrate/process/DisqusEntityType.php
------ -----------------------------------------------------------------------
21 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
28 Property
Drupal\disqus\Plugin\migrate\process\DisqusEntityType::$entityTypeMan
ager has unknown class Drupal\Core\Entity\EntityManager as its type.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
44 Property
Drupal\disqus\Plugin\migrate\process\DisqusEntityType::$entityTypeMan
ager (Drupal\Core\Entity\EntityManager) does not accept
Drupal\Core\Entity\EntityTypeManagerInterface.
50 Parameter $migration of method
Drupal\disqus\Plugin\migrate\process\DisqusEntityType::create() has
invalid typehint type Drupal\migrate\Entity\MigrationInterface.
64 Call to method getDefinition() on an unknown class
Drupal\Core\Entity\EntityManager.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ -----------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/migrate/source/DisqusComment.php
------ --------------------------------------------------------------------
23 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
148 If condition is always true.
------ --------------------------------------------------------------------

------ -----------------------------------------------------------------------
Line src/Plugin/migrate/source/DisqusCommentsStatus.php
------ -----------------------------------------------------------------------
16 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
78 Method
Drupal\disqus\Plugin\migrate\source\DisqusCommentsStatus::prepareRow(
) should return bool but return statement is missing.
------ -----------------------------------------------------------------------

------ --------------------------------------------------------------------
Line src/Plugin/migrate/source/DisqusEnabledNodeTypes.php
------ --------------------------------------------------------------------
15 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ --------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Plugin/views/field/DisqusCommentCount.php
------ ----------------------------------------------------------------------
19 Class PHPUnit\Framework\TestCase not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
87 Method Drupal\disqus\Plugin\views\field\DisqusCommentCount::render()
should return Drupal\Component\Render\MarkupInterface|string but
empty return statement found.
90 Call to an undefined method
Drupal\Core\Entity\EntityInterface::hasField().
91 Method Drupal\disqus\Plugin\views\field\DisqusCommentCount::render()
should return Drupal\Component\Render\MarkupInterface|string but
empty return statement found.
93 Call to an undefined method
Drupal\Core\Entity\EntityInterface::get().
93 Method Drupal\disqus\Plugin\views\field\DisqusCommentCount::render()
should return Drupal\Component\Render\MarkupInterface|string but
return statement is missing.
119 Method Drupal\disqus\Plugin\views\field\DisqusCommentCount::render()
should return Drupal\Component\Render\MarkupInterface|string but
returns array mixed>>|string>.
------ ----------------------------------------------------------------------

[ERROR] Found 46 errors

  • 7060f15 committed on 8.x-1.x
    Issue #3231104 by gaurav.kapoor: Drupal 9 Compatible Changes
    
gaurav.kapoor’s picture

Status: Active » Fixed

For now, I have resolved the syntax error shown by the Drupal check tool. The rest of the improvements can be taken up in later phases.

Status: Fixed » Closed (fixed)

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