Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Deprecation errors #335

Open
stephen-cox opened this issue Jan 11, 2024 · 4 comments
Open

Code Deprecation errors #335

stephen-cox opened this issue Jan 11, 2024 · 4 comments

Comments

@stephen-cox
Copy link
Member


Error: Usage of deprecated trait Drupal\Tests\field\Traits\EntityReferenceTestTrait in class Drupal\Tests\localgov_directories\Functional\ChannelFacetsWidgetAdminTest:
in drupal:10.2.0 and is removed from drupal:11.0.0. Use
   \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.
Error: Usage of deprecated trait Drupal\Tests\field\Traits\EntityReferenceTestTrait in class Drupal\Tests\localgov_directories\FunctionalJavascript\EntityReferenceFacetsWidgetTest:
in drupal:10.2.0 and is removed from drupal:11.0.0. Use
   \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.
Error: Usage of deprecated trait Drupal\Tests\field\Traits\EntityReferenceTestTrait in class Drupal\Tests\localgov_directories\Kernel\EntityReferenceChannelsSelectionTest:
in drupal:10.2.0 and is removed from drupal:11.0.0. Use
   \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.
Error: Usage of deprecated trait Drupal\Tests\field\Traits\EntityReferenceTestTrait in class Drupal\Tests\localgov_directories\Kernel\EntityReferenceDirectoryEntryTypesTest:
in drupal:10.2.0 and is removed from drupal:11.0.0. Use
   \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.
Error: Usage of deprecated trait Drupal\Tests\field\Traits\EntityReferenceTestTrait in class Drupal\Tests\localgov_directories\Kernel\FacetIndexFieldSetupTest:
in drupal:10.2.0 and is removed from drupal:11.0.0. Use
   \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.
Error: Usage of deprecated trait Drupal\Tests\field\Traits\EntityReferenceTestTrait in class Drupal\Tests\localgov_directories\Kernel\IndexTitleSortTest:
in drupal:10.2.0 and is removed from drupal:11.0.0. Use
   \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait instead.
 ------ ---------------------------------------------------------------------------- 
  Line   tests/src/Functional/ChannelFacetsWidgetAdminTest.php                       
 ------ ---------------------------------------------------------------------------- 
  21     Usage of deprecated trait                                                   
         Drupal\Tests\field\Traits\EntityReferenceTestTrait in class                 
         Drupal\Tests\localgov_directories\Functional\ChannelFacetsWidgetAdminTest:  
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use                     
            \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait             
         instead.                                                                    
 ------ ---------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------- 
  Line   tests/src/FunctionalJavascript/EntityReferenceFacetsWidgetTest.php                       
 ------ ----------------------------------------------------------------------------------------- 
  23     Usage of deprecated trait                                                                
         Drupal\Tests\field\Traits\EntityReferenceTestTrait in class                              
         Drupal\Tests\localgov_directories\FunctionalJavascript\EntityReferenceFacetsWidgetTest:  
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use                                  
            \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait                          
         instead.                                                                                 
 ------ ----------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------- 
  Line   tests/src/Kernel/EntityReferenceChannelsSelectionTest.php                       
 ------ -------------------------------------------------------------------------------- 
  19     Usage of deprecated trait                                                       
         Drupal\Tests\field\Traits\EntityReferenceTestTrait in class                     
         Drupal\Tests\localgov_directories\Kernel\EntityReferenceChannelsSelectionTest:  
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use                         
            \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait                 
         instead.                                                                        
 ------ -------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   tests/src/Kernel/EntityReferenceDirectoryEntryTypesTest.php                       
 ------ ---------------------------------------------------------------------------------- 
  18     Usage of deprecated trait                                                         
         Drupal\Tests\field\Traits\EntityReferenceTestTrait in class                       
         Drupal\Tests\localgov_directories\Kernel\EntityReferenceDirectoryEntryTypesTest:  
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use                           
            \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait                   
         instead.                                                                          
 ------ ---------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   tests/src/Kernel/FacetIndexFieldSetupTest.php                       
 ------ -------------------------------------------------------------------- 
  20     Usage of deprecated trait                                           
         Drupal\Tests\field\Traits\EntityReferenceTestTrait in class         
         Drupal\Tests\localgov_directories\Kernel\FacetIndexFieldSetupTest:  
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use             
            \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait     
         instead.                                                            
 ------ -------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------- 
  Line   tests/src/Kernel/IndexTitleSortTest.php                          
 ------ ----------------------------------------------------------------- 
  25     Usage of deprecated trait                                        
         Drupal\Tests\field\Traits\EntityReferenceTestTrait in class      
         Drupal\Tests\localgov_directories\Kernel\IndexTitleSortTest:     
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use          
            \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait  
         instead.                                                         
 ------ ----------------------------------------------------------------- 
@stephen-cox
Copy link
Member Author

Also when running PHPUnit tests:

There were 2 errors:

1) Drupal\Tests\localgov_directories\Functional\FacetsTest::testFacetsGroupFilters
Exception: Deprecated function: Creation of dynamic property Drupal\facets\Result\Result::$transliterateDisplayValue is deprecated
Drupal\facets\Plugin\facets\processor\DisplayValueWidgetOrderProcessor->sortResults()() (Line: 72)


/var/www/html/web/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:55
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:209
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:158
/var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php:52
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:251
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:227
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:272
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:229
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:69
/var/www/html/vendor/guzzlehttp/guzzle/src/Client.php:189
/var/www/html/web/core/tests/Drupal/Tests/DrupalTestBrowser.php:137
/var/www/html/vendor/symfony/browser-kit/AbstractBrowser.php:385
/var/www/html/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:122
/var/www/html/vendor/behat/mink/src/Session.php:175
/var/www/html/web/core/tests/Drupal/Tests/UiHelperTrait.php:238
/var/www/html/web/modules/contrib/localgov_directories/tests/src/Functional/FacetsTest.php:253
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

2) Drupal\Tests\localgov_directories\Functional\FacetsTest::testFacetSearchShowsAccessibleFacet
Exception: Deprecated function: Creation of dynamic property Drupal\facets\Result\Result::$transliterateDisplayValue is deprecated
Drupal\facets\Plugin\facets\processor\DisplayValueWidgetOrderProcessor->sortResults()() (Line: 72)


/var/www/html/web/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:55
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:209
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:158
/var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php:52
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:251
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:227
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:272
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:229
/var/www/html/vendor/guzzlehttp/promises/src/Promise.php:69
/var/www/html/vendor/guzzlehttp/guzzle/src/Client.php:189
/var/www/html/web/core/tests/Drupal/Tests/DrupalTestBrowser.php:137
/var/www/html/vendor/symfony/browser-kit/AbstractBrowser.php:385
/var/www/html/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:122
/var/www/html/vendor/behat/mink/src/Session.php:175
/var/www/html/web/core/tests/Drupal/Tests/UiHelperTrait.php:238
/var/www/html/web/modules/contrib/localgov_directories/tests/src/Functional/FacetsTest.php:425
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

FAILURES!                             

@ekes
Copy link
Member

ekes commented Jan 16, 2024

How we dealing with patches from branches https://www.drupal.org/project/facets/issues/3336646 fixes the Facets dynamic property error, but it's two commits on a branch, and I don't want to add a .diff or a MR as anyone can push to that.

Ignore me it's not it's one commit https://git.drupalcode.org/project/facets/-/commit/834e05169a282f83604cf00db94ffd7458c1ab9c?merge_request_iid=129

@ekes
Copy link
Member

ekes commented Jan 16, 2024

Seems to be there 5517c81 but not applying? Well it's not applied to my composer install, and it is there in the composer file.

@finnlewis
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants