Problem/Motivation

Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 9.

To read more about this effort by the Drupal Association, please read: Accelerating Drupal 9 module and theme readiness with automated patches

Periodically patches will be added to this issue that remove Drupal 9 deprecations. To stop further patches from being posted simply close this issue(any status besides Active, Needs Review or Needs work) or remove the "ProjectUpdateBotD9" tag from the issue.

The patches will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open(status of Active, Needs Review or Needs work) and the "ProjectUpdateBotD9" tag is left on this issue, new patches will be posted periodically if new deprecations are needed.

    As the Drupal Rector project improves and is able to fix more deprecations the patches posted here will cover more of the deprecations in the module.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecations but don't want new automated patches simply leave this issue open but remove the "ProjectUpdateBotD9" from the issue.

    You can use Drupal Rector yourself to make these patches.

    If you want to receive automated patches again simply add back the "ProjectUpdateBotD9" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful they can simply close this issue(any status besides Active, Needs Review or Needs work) and no more automated patches will be posted here.

    If the issue is reopened then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 9 compatibility it may be useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the patch in the comment by Project Update Bot
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot, such as it does not correctly replace a deprecation, you can file an issue in the Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear,  use the Infrastructure project issue queue using the component “Bot: Drupal Rector”.

Comments

Project Update Bot created an issue. See original summary.

project update bot’s picture

Status: Active » Needs review
StatusFileSize
new1.52 KB

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

Drupal 9 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 9.

Currently Drupal-Rector, version 0.5.6, cannot fix all Drupal 9 compatibility problems.

This patch does not update the info.yml file for Drupal 9 compatibility.

Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 9 compatibility fixes as they become available in Drupal-Rector.

Debug info

Bot run #1478

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 0.12.3
  2. palantirnet/drupal-rector: 0.5.6
  3. rector/rector-prefixed: v0.7.29

akalata’s picture

Issue summary: View changes
Status: Needs review » Active
bramdriesen’s picture

Status: Active » Fixed

Should be set to fixed?

bramdriesen’s picture

Priority: Normal » Critical
Status: Fixed » Needs work

I'm sorry to be a bit negative, but this issue queue is a mess, so many issues that are being fixed without patches being provided, no reviews and so many cross references. It's difficult to see the forrest between all the trees (dutch saying).

#3036687 was closed over a year ago, yet the errors are there.

 [notice] Processing /app/web/modules/contrib/sitemap.
PHP Warning:  Class 'PHPUnit\Framework\AssertionFailedError' not found in /app/web/core/tests/bootstrap.php on line 191
Warning: Class 'PHPUnit\Framework\AssertionFailedError' not found in /app/web/core/tests/bootstrap.php on line 191
PHP Warning:  Class 'PHPUnit\Framework\Constraint\Count' not found in /app/web/core/tests/bootstrap.php on line 192
Warning: Class 'PHPUnit\Framework\Constraint\Count' not found in /app/web/core/tests/bootstrap.php on line 192
PHP Warning:  Class 'PHPUnit\Framework\Error\Error' not found in /app/web/core/tests/bootstrap.php on line 193
Warning: Class 'PHPUnit\Framework\Error\Error' not found in /app/web/core/tests/bootstrap.php on line 193
PHP Warning:  Class 'PHPUnit\Framework\Error\Warning' not found in /app/web/core/tests/bootstrap.php on line 194
Warning: Class 'PHPUnit\Framework\Error\Warning' not found in /app/web/core/tests/bootstrap.php on line 194
PHP Warning:  Class 'PHPUnit\Framework\ExpectationFailedException' not found in /app/web/core/tests/bootstrap.php on line 195
Warning: Class 'PHPUnit\Framework\ExpectationFailedException' not found in /app/web/core/tests/bootstrap.php on line 195
PHP Warning:  Class 'PHPUnit\Framework\Exception' not found in /app/web/core/tests/bootstrap.php on line 196
Warning: Class 'PHPUnit\Framework\Exception' not found in /app/web/core/tests/bootstrap.php on line 196
PHP Warning:  Class 'PHPUnit\Framework\MockObject\Matcher\InvokedRecorder' not found in /app/web/core/tests/bootstrap.php on line 197
Warning: Class 'PHPUnit\Framework\MockObject\Matcher\InvokedRecorder' not found in /app/web/core/tests/bootstrap.php on line 197
PHP Warning:  Class 'PHPUnit\Framework\SkippedTestError' not found in /app/web/core/tests/bootstrap.php on line 198
Warning: Class 'PHPUnit\Framework\SkippedTestError' not found in /app/web/core/tests/bootstrap.php on line 198
PHP Warning:  Class 'PHPUnit\Framework\TestCase' not found in /app/web/core/tests/bootstrap.php on line 199
Warning: Class 'PHPUnit\Framework\TestCase' not found in /app/web/core/tests/bootstrap.php on line 199
PHP Warning:  Class 'PHPUnit\Util\Test' not found in /app/web/core/tests/bootstrap.php on line 200
Warning: Class 'PHPUnit\Util\Test' not found in /app/web/core/tests/bootstrap.php on line 200
PHP Warning:  Class 'PHPUnit\Util\Xml' not found in /app/web/core/tests/bootstrap.php on line 201
Warning: Class 'PHPUnit\Util\Xml' not found in /app/web/core/tests/bootstrap.php on line 201
 33/33 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


================================================================================
Sitemap,  8.x-2.0-beta1
Scanned on vr, 12/06/2020 - 08:58

FILE: web/modules/contrib/sitemap/sitemap.theme.inc

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually 165  Call to deprecated method entityManager() of class Drupal.
                    Deprecated in drupal:8.0.0 and is removed from 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.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Form/SitemapSettingsForm.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually 89   Call to deprecated method l() of class
                    Drupal\Core\Form\FormBase. Deprecated in drupal:8.0.0 and is
                    removed from drupal:9.0.0. Use
                    \Drupal\Core\Link::fromTextAndUrl() instead.
--------------------------------------------------------------------------------
Check manually 266  Call to deprecated method l() of class
                    Drupal\Core\Form\FormBase. Deprecated in drupal:8.0.0 and is
                    removed from drupal:9.0.0. Use
                    \Drupal\Core\Link::fromTextAndUrl() instead.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapBookTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 12   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapBrowserTestBase.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 7    Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapContentTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 12   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapCssTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 10   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapFrontpageTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 10   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapMenuTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 10   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapMenuTestBase.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 8    Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapTaxonomyTermsRssTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 10   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapTaxonomyTermsTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 12   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapTaxonomyTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 10   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapTaxonomyTestBase.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 14   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapTest.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 10   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE: web/modules/contrib/sitemap/src/Tests/SitemapTestBase.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 10   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

FILE:
web/modules/contrib/sitemap/tests/src/Functional/Update/SitemapVersionUpdateTest
.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually      Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------
Check manually 14   Class PHPUnit\Framework\TestCase not found.
--------------------------------------------------------------------------------

The 8.x-2.x branch supports both Drupal 8 and Drupal 9.
bramdriesen’s picture

Referencing issue. This is a major critical issue in order to move to Drupal 9.

akalata’s picture

Priority: Critical » Normal
Status: Needs work » Active

Hi Bram. This issue is specifically for the Automated compatibility fixes provided by the Drupal Rector tool as noted in the Issue Summary and comment #1. It was left Active since there may be additional patched provided by the bot, and we want to have a consistent place to be open for them.

In response to your feedback on the issue queue, I'm the only one working on this module, so if I waited for reviews I'd be waiting awhile. The high majority of activity from others has been fishing for commit credits by patching code style issues. Closed issues should at least have commits referenced.

If you could open a new issue for this, I'm happy to work on it with you. How did you generate the report that you included?

energee’s picture

There is a D9 compatibility issue, present in 2.x and 2.0-beta2.

A default theme must be present in unit tests:

 ------ --------------------------------------------------------------------- 
  Line   tests/src/Functional/Update/SitemapVersionUpdateTest.php             
 ------ --------------------------------------------------------------------- 
  14     Drupal\Tests\BrowserTestBase::$defaultTheme is required. See         
         https://www.drupal.org/node/3083055, which includes recommendations  
         on which theme to use.                                               
 ------ --------------------------------------------------------------------- 

 [ERROR] Found 1 error      
energee’s picture

StatusFileSize
new512 bytes
kristen pol’s picture

This may be duplicate as the module is already D9 compatible but I haven't looked at the details.

kristen pol’s picture

Status: Active » Needs review

  • akalata committed 42aad95 on 8.x-2.x authored by energee
    Issue #3148838 by Project Update Bot, energee, akalata: Automated Drupal...
akalata’s picture

Status: Needs review » Fixed

Thanks @energee!

Status: Fixed » Closed (fixed)

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