Problem/Motivation

drupal-check on version:
f50afecb6130c62a887f96167d8a980363484ecb




Notice: Constant DATETIME_STORAGE_TIMEZONE already defined in /home/vagrant/midcamp2019-drupal/web/modules/contrib/search_api_solr/tests/src/Unit/SearchApiBackendUnitTest.php on line 21


 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   modules/search_api_solr_defaults/src/Tests/IntegrationTest.php                                                                                         
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------- 
  19     Usage of deprecated trait Drupal\field\Tests\EntityReference\EntityReferenceTestTrait in class Drupal\search_api_solr_defaults\Tests\IntegrationTest.  
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------- 
  Line   src/Form/SolrConfigForm.php                                                                    
 ------ ----------------------------------------------------------------------------------------------- 
  125    Call to deprecated method cacheUntilEntityChanges() of class Drupal\Core\Access\AccessResult.  
 ------ ----------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------ 
  Line   src/Form/SolrFieldTypeExportForm.php                                                      
 ------ ------------------------------------------------------------------------------------------ 
  126    Call to deprecated method urlInfo() of class Drupal\Core\Config\Entity\ConfigEntityBase.  
 ------ ------------------------------------------------------------------------------------------ 

 ------ ----------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/search_api_autocomplete/suggester/Spellcheck.php                                                
 ------ ----------------------------------------------------------------------------------------------------------- 
         Class Drupal\search_api_autocomplete\Suggester\SuggesterPluginBase not found and could not be autoloaded.  
 ------ ----------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/search_api_autocomplete/suggester/Suggester.php                                                 
 ------ ----------------------------------------------------------------------------------------------------------- 
         Class Drupal\search_api_autocomplete\Suggester\SuggesterPluginBase not found and could not be autoloaded.  
 ------ ----------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/search_api_autocomplete/suggester/Terms.php                                                                       
 ------ ----------------------------------------------------------------------------------------------------------------------------- 
         Class Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\suggester\Server not found and could not be autoloaded.  
 ------ ----------------------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------- 
  Line   tests/src/Functional/FacetsTest.php                                                         
 ------ -------------------------------------------------------------------------------------------- 
  19     Class Drupal\Tests\facets\Functional\BlockTestTrait not found and could not be autoloaded.  
 ------ -------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------- 
  Line   tests/src/Kernel/SolrFieldNamesTest.php                                              
 ------ ------------------------------------------------------------------------------------- 
  100    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.  
  102    Call to deprecated method assertEqual() of class Drupal\KernelTests\KernelTestBase.  
 ------ ------------------------------------------------------------------------------------- 

 [ERROR] Found 9 errors                                                                                                 

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

josephdpurcell created an issue. See original summary.

sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new4.68 KB

Here is the patch, please review.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Seems fine...
Tests only work on travis I guess?

mkalkbrenner’s picture

Status: Reviewed & tested by the community » Needs work

Patch doesn't apply

idebr’s picture

Status: Needs work » Needs review
StatusFileSize
new11.06 KB

Rerolled the patch against 8.x-3.x. Also ported a Simpletest to PHPUnit that I'm pretty sure was not working before, since it contains text assertions for Search API Database defaults instead.

  • mkalkbrenner committed abb14fb on 8.x-3.x authored by idebr
    Issue #3042605 by Sergiu Stici, idebr, josephdpurcell, aspilicious,...
mkalkbrenner’s picture

Status: Needs review » Needs work
± vendor/bin/drupal-check modules/contrib/search_api_solr
 128/128 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/SolrConnectorInterface.php                                                                                                             
 ------ ------------------------------------------------------------------------------------------------------------------------------------------- 
  18     Interface Drupal\search_api_solr\SolrConnectorInterface extends deprecated interface Drupal\Component\Plugin\ConfigurablePluginInterface:  
         Drupal\Component\Plugin\ConfigurablePluginInterface is deprecated                                                                          
         in Drupal 8.7.0 and will be removed before Drupal 9.0.0. You should implement                                                              
         ConfigurableInterface and/or DependentPluginInterface directly as needed. If                                                               
         you implement ConfigurableInterface you may choose to implement                                                                            
         ConfigurablePluginInterface in Drupal 8 as well for maximum compatibility,                                                                 
         however this must be removed prior to Drupal 9.                                                                                            
 ------ -------------------------------------------------------------------------------------------------------------------------------------------

So we have one task left. But we need to check how to deal with Drupal 8.6 first.

  • mkalkbrenner committed 96b690d on 8.x-3.x
    Issue #3042605 by Sergiu Stici, idebr, mkalkbrenner: Drupal 9 Deprecated...
mkalkbrenner’s picture

Next:

 ------ --------------------------------------------------------------------- 
  Line   tests/src/Kernel/SolrFieldTypeTest.php                               
 ------ --------------------------------------------------------------------- 
  51     Call to deprecated function file_scan_directory():                   
         in drupal:8.8.0 and is removed from drupal:9.0.0.                    
         Use \Drupal\Core\File\FileSystemInterface::scanDirectory() instead.  
 ------ --------------------------------------------------------------------- 
berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new7.67 KB

Worked a bit on this.

Note that drupal-check doesn't find all deprecations, specifically not dynamic stuff. For example, config entities since 8.0 I think require the config_export property, I'm not sure if I added that properly everywhere, the parent class has for example a label and recommended property but that doesn't seem to be overridden/subclasses/defined in the schema anywhere, so I didn't add it. Another common dynamic deprecation is the new $defaultTheme property that need to be added to functional tests, didn't do that yet.

I also used the new core_version_requirement key that you can add since 8.7.7 (lower versions will throw a parse error due to missing core key and disallow install/update), as that is required to actually install this on D9.

This is now automatically added as a requirement to composer.json on drupal/core, so I also removed the conflict line and it also removes the need for the drupal:system 8.7 dependency.

I only did run some of the tests, as I didn't actually have a solr version installed, at least not in the way that the tests expect it.

berdir’s picture

(To see these make sure SYMFONY_DEPRECATIONS_HELPER is set to strict)

mkalkbrenner’s picture

  • mkalkbrenner committed 17c491b on 8.x-3.x
    Issue #3042605 by Berdir, idebr, Sergiu Stici, mkalkbrenner: Drupal 9...
  • mkalkbrenner committed 67f73cd on 8.x-3.x
    Issue #3042605 by Berdir, idebr, Sergiu Stici, mkalkbrenner: Drupal 9...
  • mkalkbrenner committed a8f9837 on 8.x-3.x
    Issue #3042605 by Berdir, idebr, Sergiu Stici, mkalkbrenner: Drupal 9...
  • mkalkbrenner committed c45b0e6 on 8.x-3.x
    Issue #3042605 by Berdir, idebr, Sergiu Stici, mkalkbrenner: Drupal 9...
  • mkalkbrenner committed dd54153 on 8.x-3.x
    Issue #3042605 by Berdir, idebr, Sergiu Stici, mkalkbrenner: Drupal 9...
berdir’s picture

Note: #3123377: Drupal 9 readiness should unblock travis from running against D9.

douggreen’s picture

StatusFileSize
new3.91 KB

Rerolled patch because core_version_requirement has already been committed.

berdir’s picture

@douggreen: The entity type annotation changes were committed too and I think are duplicated now in your patch?

The only thing left here is the file system change, and is part of my PR: https://github.com/mkalkbrenner/search_api_solr/pull/54

mkalkbrenner’s picture

We have first successful builds on travis-ci for Drupal 9. Unfortunately travis-ci is under maintenance at the moment so we can't see what is going wrong in cloud mode.

mkalkbrenner’s picture

The failures in cloud mode were caused by the latest changes in solarium master.

If these builds succeed, we could close this issue here:
https://travis-ci.org/github/mkalkbrenner/search_api_solr/builds/673902806

mkalkbrenner’s picture

Status: Needs review » Fixed

I think we're done for now. If anything occurs we should open additional small issues. Thanks for your contribution.

Status: Fixed » Closed (fixed)

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