17/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

----------------------------------
Line src/Tests/QuickNodeCloneExcludeParagraphFieldsTests.php
----------------------------------
17 Usage of deprecated trait Drupal\field_ui\Tests\FieldUiTestTrait in class Drupal\quick_node_clone\Tests\QuickNodeCloneExcludeParagraphFieldsTests:
in Drupal 8.7.x and will be removed before Drupal 9.0.0.
Use \Drupal\Tests\field_ui\Traits\FieldUiTestTrait. See
https://www.drupal.org/node/3001664
----------------------------------

[ERROR] Found 1 error

===========
Original summary:

89 Call to deprecated method entityManager() of class Drupal:
in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
Use \Drupal::entityTypeManager() instead in most cases. If the needed
method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
deprecated \Drupal\Core\Entity\EntityManager to find the
correct interface or service.

New deprecations as of 8.8.1

QuickNodeCloneExcludeNodeFieldsTests.php:

  • Class 'WebTestBase' is deprecated.

QuickNodeCloneNodeFinder.php:

  • Class 'AliasManager' is deprecated.

QuickNodeCloneTests.php:

  • Class 'WebTestBase' is deprecated.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

raushan created an issue. See original summary.

Tolyan4ik’s picture

Status: Active » Needs review
FileSize
643 bytes

17/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ ----------------------------------------------------------------------------------------------------------------------------------------------------
Line src/Tests/QuickNodeCloneExcludeParagraphFieldsTests.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------
17 Usage of deprecated trait Drupal\field_ui\Tests\FieldUiTestTrait in class Drupal\quick_node_clone\Tests\QuickNodeCloneExcludeParagraphFieldsTests:
in Drupal 8.7.x and will be removed before Drupal 9.0.0.
Use \Drupal\Tests\field_ui\Traits\FieldUiTestTrait. See
https://www.drupal.org/node/3001664
------ ----------------------------------------------------------------------------------------------------------------------------------------------------

[ERROR] Found 1 error

Kristen Pol’s picture

The issue summary doesn't match the patch. So updating the summary to be based on the comment instead to avoid confusion.

Kristen Pol’s picture

Issue summary: View changes
Kristen Pol’s picture

Assigned: raushan » Unassigned
Status: Needs review » Reviewed & tested by the community

Since this has been sitting for 27 days, reviewing this. Tests pass and code has been changed correctly based on the deprecation warning, so marking RTBC.

jkswoods’s picture

Status: Reviewed & tested by the community » Needs work

Further deprecation notices are reported...

QuickNodeCloneExcludeNodeFieldsTests.php:

  • Class 'WebTestBase' is deprecated.

QuickNodeCloneNodeFinder.php:

  • Class 'AliasManager' is deprecated.

QuickNodeCloneTests.php:

  • Class 'WebTestBase' is deprecated.
jkswoods’s picture

Version: 8.x-1.9 » 8.x-1.x-dev
Status: Needs work » Needs review
FileSize
2.32 KB
1.69 KB

Patch to address #6

jkswoods’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 7: 3076998-06-deprecated-code-report.patch, failed testing. View results

jkswoods’s picture

FileSize
2.96 KB

Fixing tests.

jkswoods’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 10: 3076998-10-deprecated-code-report.patch, failed testing. View results

jkswoods’s picture

FileSize
4.99 KB
jkswoods’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 13: 3076998-13-deprecated-code-report.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jkswoods’s picture

FileSize
5.09 KB

Right, two of the tests have been converted to use the new PHPunit structure. ParagraphsTestBase extends WebTestBase, which is simpletest and deprecated so leaving it where it is for now - we can't do anything until paragraphs sort that out.

The namespaces for the PHPUnit-based tests have been updated which was missed in the previous patch, so I'd expect the tests to pass for this one.

The reasoning behind the removal of 'body[0][format]' is it can't be found on the page (ElementNotFoundException) and it is not necessary to prove the functionality of the module works.

jkswoods’s picture

Status: Needs work » Needs review
jkswoods’s picture

FileSize
5.14 KB

Fixing coding standards in QuickNodeCloneExcludeParagraphFieldsTest.

jkswoods’s picture

mbovan’s picture

FileSize
5.22 KB
1016 bytes

I also removed an unused reference to Drupal\paragraphs\Tests\Classic\ParagraphsCoreVersionUiTestTrait since it is Simpletest helper.

See #3121134: Remove Simpletest test base classes for more details.

mbovan’s picture

jcnventura’s picture

FileSize
1.38 KB
6.42 KB

This was missing the core_version_requirement change, and was still using the "path.alias_manager", and not the new "path_alias.manager" as per https://www.drupal.org/node/3092086

pavnish’s picture

Assigned: Unassigned » pavnish
Taran2L’s picture

FileSize
15.94 KB
12.12 KB
Taran2L’s picture

FileSize
16 KB
12.18 KB

The wrong namespace, one test is missing, let's fix this

Tests on D9+ cannot run because core_version_requirement must be committed first

Taran2L’s picture

FileSize
16 KB
0 bytes
Taran2L’s picture

FileSize
16 KB
202 bytes

well, let's try this again

jcnventura’s picture

Assigned: pavnish » Unassigned

Removing stale assignment

stopopol’s picture

I just cleanly applied the patch #27 on 8.x-1.x-dev and then used "Upgrade Status"
(https://www.drupal.org/project/upgrade_status) to check for warning or errors. There were no errors, only 8 warnings:

  1. web/modules/contrib/quick_node_clone/src/EventSubscriber/AddressEventSubscriber.php 69 Fetching deprecated class constant INITIAL_VALUES of class Drupal\address\Event\AddressEvents: No longer fired since 1.5. Use hook_field_widget_form_alter() to change the address #default_value instead.
  2. web/modules/contrib/quick_node_clone/src/EventSubscriber/AddressEventSubscriber.php 138 Parameter $event of method Drupal\quick_node_clone\EventSubscriber\AddressEventSubscriber::onInitialValues() has typehint with deprecated class Drupal\address\Event\InitialValuesEvent: No longer fired since 1.5. Use hook_field_widget_form_alter() to change the address #default_value instead.
  3. web/modules/contrib/quick_node_clone/tests/src/Functional/QuickNodeCloneExcludeNodeFieldsTest.php Class PHPUnit\Framework\TestCase not found.
  4. web/modules/contrib/quick_node_clone/tests/src/Functional/QuickNodeCloneExcludeNodeFieldsTest.php 12 Class PHPUnit\Framework\TestCase not found.
  5. web/modules/contrib/quick_node_clone/tests/src/Functional/QuickNodeCloneExcludeParagraphFieldsTest.php Class Drupal\Tests\paragraphs\Functional\WidgetLegacy\ParagraphsTestBase not found.
  6. web/modules/contrib/quick_node_clone/tests/src/Functional/QuickNodeCloneExcludeParagraphFieldsTest.php 14 Class Drupal\Tests\paragraphs\Functional\WidgetLegacy\ParagraphsTestBase not found.
  7. web/modules/contrib/quick_node_clone/tests/src/Functional/QuickNodeCloneTest.php Class PHPUnit\Framework\TestCase not found.
  8. web/modules/contrib/quick_node_clone/tests/src/Functional/QuickNodeCloneTest.php 12 Class PHPUnit\Framework\TestCase not found.
Berdir’s picture

The first two are not Drupal core deprecations but deprecations from the address module and the others are because you're missing development dependencies on your site.

stopopol’s picture

In that case, it's safe to say that the patch works :)

batigolix’s picture

I cleanly applied the patch on 8.x-1.x-dev and then used "Upgrade Status" to check for warning or errors.

There were no errors.

I got 2 x the warning "Class Drupal\Tests\paragraphs\Functional\WidgetLegacy\ParagraphsTestBase not found". Could it be that this class has been removed from the paragraphs module?
I checked it using paragraphs 1.12

Berdir’s picture

> I checked it using paragraphs 1.12

That's why. The new base class is only in paragraphs 8.x-1.x-dev atm, which is also the version that composer.json require-dev specifies.

batigolix’s picture

Status: Needs review » Reviewed & tested by the community

I applied the patch without problems (and using paragraphs 1.x-dev) I checked upgrade_status:

~/S/d9up ❯❯❯ fin drush upgrade_status:analyze quick_node_clone
 [notice] Processing /var/www/web/modules/contrib/quick_node_clone.
 17/17 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


================================================================================
Quick Node Clone, --
Scanned on Mon, 08/31/2020 - 09:41

No known issues found.

Upgrade status does not report any problems. This patch is ready to be committed.

marco-s’s picture

I have successfully tested the patch with Drupal 9.

Neslee Canil Pinto’s picture

@Berdir are you ok with #27, I too tested it with the dev version(Paragraphs) which was specified and tests got passed for me in my local machine and no errors/warning where given from Upgrade status module too.

Neslee Canil Pinto’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev.

Status: Fixed » Closed (fixed)

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