------ ---------------------------------------------------------------------------
Line src/Commands/PermanentEntitiesCommands.php
------ ---------------------------------------------------------------------------
Class Drush\Commands\DrushCommands not found and could not be autoloaded.
12 Class Drush\Commands\DrushCommands not found and could not be autoloaded.
------ ---------------------------------------------------------------------------

------ -------------------------------------------------------------------------------------------
Line src/Controller/PermanentEntityController.php
------ -------------------------------------------------------------------------------------------
28 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Most of the time static::entityTypeManager() is supposed to be used
instead.
29 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Most of the time static::entityTypeManager() is supposed to be used
instead.
44 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Most of the time static::entityTypeManager() is supposed to be used
instead.
45 Call to deprecated function format_date():
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal::service('date.formatter')->format().
63 Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Most of the time static::entityTypeManager() is supposed to be used
instead.
91 Call to deprecated method l() of class Drupal\Core\Controller\ControllerBase:
in drupal:8.0.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\Link::fromTextAndUrl() instead.
94 Call to deprecated method link() of class Drupal\Core\Entity\EntityInterface:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\EntityInterface::toLink()->toString() instead.
------ -------------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------------------------------------
Line src/Form/PermanentEntityForm.php
------ ------------------------------------------------------------------------------------------------------------
47 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal::time()->getRequestTime();
58 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
64 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Form/PermanentEntityRevisionDeleteForm.php
------ ----------------------------------------------------------------------
76 Call to deprecated function format_date():
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal::service('date.formatter')->format().
110 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
110 Call to deprecated function format_date():
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal::service('date.formatter')->format().
------ ----------------------------------------------------------------------

------ ------------------------------------------------------------------------------------------------------------
Line src/Form/PermanentEntityRevisionRevertForm.php
------ ------------------------------------------------------------------------------------------------------------
123 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
144 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal::time()->getRequestTime();
------ ------------------------------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------------------------------------
Line src/Form/PermanentEntityRevisionRevertTranslationForm.php
------ ------------------------------------------------------------------------------------------------------------
110 Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
\Drupal::time()->getRequestTime();
------ ------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Form/PermanentEntityTypeDeleteForm.php
------ ----------------------------------------------------------------------
41 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ----------------------------------------------------------------------
Line src/Form/PermanentEntityTypeForm.php
------ ----------------------------------------------------------------------
57 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
63 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------

------ ---------------------------------------------------------------------------------------------------------------------------
Line src/PermanentEntityPermissions.php
------ ---------------------------------------------------------------------------------------------------------------------------
33 Parameter $entity_manager of method Drupal\permanent_entities\PermanentEntityPermissions::__construct() has typehint with
deprecated interface Drupal\Core\Entity\EntityManagerInterface:
in drupal:8.0.0 and is removed from drupal:9.0.0.
------ ---------------------------------------------------------------------------------------------------------------------------

Comments

pavnish created an issue. See original summary.

neelam_wadhwani’s picture

Assigned: Unassigned » neelam_wadhwani
neelam_wadhwani’s picture

Status: Active » Needs review
StatusFileSize
new11.6 KB

Kindly review patch

neelam_wadhwani’s picture

Assigned: neelam_wadhwani » Unassigned
pavnish’s picture

@neelam_wadhwani Thanks for this.
Could you please replace t() function in PermanentEntityRevisionRevertForm.php and or other files where it is feasible to fix .

neelam_wadhwani’s picture

Issue tags: +VbContribution2020

Hello @pavnish
Sure it will be done.

neelam_wadhwani’s picture

StatusFileSize
new14.1 KB
new14.1 KB

Hello @pavnish

FILE: \modules\permanent_entities\src\Form\PermanentEntityRevisionDeleteForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------
76 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
90 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
110 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

FILE:\modules\permanent_entities\src\Form\PermanentEntityRevisionRevertForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------
76 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
90 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
119 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
123 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

FILE: \modules\permanent_entities\src\Form\PermanentEntityRevisionRevertTranslationForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
71 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Please review patch

dagmar’s picture

Status: Needs review » Needs work

@neelam_wadhwani Thanks for working on this! Please see my comment in https://www.drupal.org/project/permanent_entities/issues/3116381#comment...

neelam_wadhwani’s picture

StatusFileSize
new14.7 KB
dagmar’s picture

Status: Needs work » Needs review
neelam_wadhwani’s picture

StatusFileSize
new14.71 KB
neelam_wadhwani’s picture

StatusFileSize
new14.33 KB
dagmar’s picture

It seems I was wrong. Metatags module did this in two steps too: #3109835: Declare compatibility with Drupal 9

dagmar’s picture

Status: Needs review » Needs work

@neelam_wadhwani I merged #3116381: Add core version requirement support for drupal 9 This patch needs a re-roll.

neelam_wadhwani’s picture

StatusFileSize
new13.98 KB

Hello @dagmar.
Thanks for response.
Though you have merged the info issue..Yet this changes also need to be merged as they are drupal coding standards.
We have to fix them also.

neelam_wadhwani’s picture

StatusFileSize
new11.6 KB
neelam_wadhwani’s picture

StatusFileSize
new14.21 KB
new14.21 KB

@dagmar
Though the above patch pass, there were still "Coding standard message"
src/Controller/PermanentEntityController.php ✗ 1 more
line 11 Unused use statement
src/Form/PermanentEntityRevisionDeleteForm.php
32 Class property $PermanentEntityStorage should use lowerCamel naming without underscores
src/Form/PermanentEntityRevisionRevertForm.php
33 Class property $PermanentEntityStorage should use lowerCamel naming without underscores
src/PermanentEntityPermissions.php ✗ 1 more
34 Equals sign not aligned correctly; expected 1 space but found 2 spaces

Solved that.
Kindly review the patch.

neelam_wadhwani’s picture

StatusFileSize
new14.21 KB
neelam_wadhwani’s picture

Status: Needs work » Needs review
neelam_wadhwani’s picture

StatusFileSize
new14.63 KB

Status: Needs review » Needs work

The last submitted patch, 20: 3116378-20.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

neelam_wadhwani’s picture

StatusFileSize
new15.06 KB
neelam_wadhwani’s picture

Status: Needs work » Needs review
dagmar’s picture

Status: Needs review » Needs work

@neelam_wadhwani This looks great! Thanks!

There is one change that I'm not sure about. And is this:

@@ -84,7 +89,7 @@ class CrudTest extends BrowserTestBase {
     $this->assertRaw('Jupiter');
     $assert_session = $this->assertSession();
     $assert_session->elementNotExists('css', '.button--primary');
-    $assert_session->elementExists('css', '.dropbutton .edit');
+    $assert_session->elementNotExists('css', '.dropbutton .edit');
     $assert_session->elementNotExists('css', '.dropbutton .delete');

The idea behind this assertion is to ensure the 'Edit' Button is visible in the user interface, this change in the assertion means either the button is no longer here, or the selector changed in D9 or is different in the stark theme.

In any case we should refactor this to expect to see this edit button.

neelam_wadhwani’s picture

StatusFileSize
new15.04 KB
dagmar’s picture

@neelam_wadhwani This is the html of the edit button in the stark theme.

<div class="dropbutton-wrapper dropbutton-single">
    <div class="dropbutton-widget">
        <ul class="dropbutton">
            <li class="dropbutton-action">
                <a href="/admin/content/permanent_entities/test/edit?destination=/admin/content/permanent_entities" hreflang="en">Edit</a>
            </li>
        </ul>
    </div>
</div>

I think you will need to use cssSelect. Can you try with $this->cssSelect("ul.dropbutton > li.dropbutton-action a:contains('Edit')"); instead?

neelam_wadhwani’s picture

StatusFileSize
new15.19 KB
neelam_wadhwani’s picture

StatusFileSize
new15.14 KB

Hello @dagmar.
It worked.
Kindly review updated patch.

Thanks for it.

neelam_wadhwani’s picture

Status: Needs work » Needs review
kristen pol’s picture

Fixing outdated tag.

dagmar’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new613 bytes

Thanks! I finally checked this, fixed a small issue with the REQUEST_TIME port.

dagmar’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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