- Issue created by @project update bot
This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module → these changes make this module compatible with Drupal 11! 🎉
Therefore these changes update theinfo.yml
file for Drupal 11 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug info
Bot run #11-121090This patch was created using these packages:
- drupal/upgrade_status: 4.1.0
- mglaman/phpstan-drupal: 1.2.7
- palantirnet/drupal-rector: 0.20.1
- 🇨🇦Canada alberto56
Hi all, is there a plan to release a Drupal 11 version of this module? If not, would the maintainers be open to having a co-maintaner?
- 🇺🇦Ukraine Anna D
+1 for a Drupal 11 release of this module. Thank you!
- 🇮🇳India flutterstack
php vendor/bin/drupal-check -d web/modules/custom/entity_language_fallback/
Deprecated: The drupal_root parameter is deprecated. Remove it from your configuration. Drupal Root is discovered automatically. in /var/www/html/vendor/mglaman/phpstan-drupal/src/Drupal/DrupalAutoloader.php on line 94
7/7 [â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“] 100%------ --------------------------------------------------------------------------
Line entity_language_fallback.module
------ --------------------------------------------------------------------------
37 Call to an undefined method
Drupal\Core\Form\FormInterface::getEntity().
105 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$search_api_skip_tracking.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
142 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$search_api_skip_tracking.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
152 Variable $fallback_controller in isset() always exists and is not
nullable.
162 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$original.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
220 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$search_api_skip_tracking.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
243 Parameter $index of function
entity_language_fallback_search_api_index_items_alter() has invalid
type Drupal\search_api\IndexInterface.
245 PHPDoc tag @var for variable $item contains unknown class
Drupal\search_api\Item\Item.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
246 Call to method getOriginalObject() on an unknown class
Drupal\search_api\Item\Item.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
249 Call to method setLanguage() on an unknown class
Drupal\search_api\Item\Item.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ -------------------------------------------------------------------------------- --------------------------------------------------------------------------
Line src/AccessHelper.php
------ --------------------------------------------------------------------------
49 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$search_api_skip_tracking.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
64 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$preventLooping.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ -------------------------------------------------------------------------------- --------------------------------------------------------------------------
Line src/FallbackController.php
------ --------------------------------------------------------------------------
49 Access to an undefined property
Drupal\entity_language_fallback\FallbackController::$entityTypeManager.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
Line src/Plugin/search_api/datasource/ContentEntityFallback.php
------ -------------------------------------------------------------------------------------------------------------
28 Class
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback
extends unknown class
Drupal\search_api\Plugin\search_api\datasource\ContentEntity.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
42 Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::create()
calls parent::create() but
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback
does not extend any class.
70 Call to an undefined method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getEntityStorage().
72 Call to an undefined method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getBundles().
77 Access to an undefined property
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::$languages.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
84 Access to an undefined property
Drupal\Core\TypedData\ComplexDataInterface::$language.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
93 Access to an undefined property
Drupal\Core\TypedData\ComplexDataInterface::$language.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
94 Access to an undefined property
Drupal\Core\TypedData\ComplexDataInterface::$fallbackLanguage.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
106 Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getPartialItemIds()
calls parent::getPartialItemIds() but
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback
does not extend any class.
113 Call to static method splitPropertyPath() on an unknown class
Drupal\search_api\Utility\Utility.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
118 Call to an undefined method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getEntityStorage().
119 Access to an undefined property
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::$languages.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
125 Access to an undefined property
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::$fallback_chain.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
138 Variable $item_ids might not be defined.
145 Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getLanguages()
calls parent::getLanguages() but
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback
does not extend any class.
147 Access to an undefined property
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::$languages.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
149 Access to an undefined property
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::$fallback_chain.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
163 Call to static method loadMultiple() on an unknown class
Drupal\search_api\Entity\Index.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
217 Parameter $index of method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::filterValidItemIds()
has invalid type Drupal\search_api\IndexInterface.
217 Parameter $index of method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::filterValidItemIds()
has invalid type Drupal\search_api\IndexInterface.
218 Class
Drupal\search_api\Plugin\search_api\datasource\ContentEntityTrackingManager
not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
222 Call to static method filterValidItemIds() on an unknown class
Drupal\search_api\Plugin\search_api\datasource\ContentEntity.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
231 Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getItemAccessResult()
calls parent::getItemAccessResult() but
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback
does not extend any class.
233 Call to an undefined method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getEntity().
235 Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getItemAccessResult()
calls parent::getItemAccessResult() but
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback
does not extend any class.
238 Call to an undefined method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getEntityTypeManager().
239 Call to an undefined method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback::getEntityTypeId().
------ ------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
Line src/Plugin/search_api/datasource/ContentEntityFallbackDeriver.php
------ -----------------------------------------------------------------------------------------------------------------------
10 Class
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallbackDeriver
extends unknown class
Drupal\search_api\Plugin\search_api\datasource\ContentEntityDeriver.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
17 Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallbackDeriver::getDerivativeDefinitions()
calls parent::getDerivativeDefinitions() but
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallbackDeriver
does not extend any class.
19 Call to an undefined method
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallbackDeriver::t().
21 Access to an undefined property
Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallbackDeriver::$derivatives.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ ----------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------
Line src/Plugin/search_api/processor/FallbackLanguage.php
------ ----------------------------------------------------------------------------------------
25 Class
Drupal\entity_language_fallback\Plugin\search_api\processor\FallbackLanguage
extends unknown class
Drupal\search_api\Processor\ProcessorPluginBase.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
41 PHPDoc tag @var for variable $item contains unknown class
Drupal\search_api\Item\ItemInterface.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
42 Call to method getOriginalObject() on an unknown class
Drupal\search_api\Item\ItemInterface.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
52 Access to an undefined property
Drupal\Core\Entity\ContentEntityInterface::$content_translation_source.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
70 Variable $candidate might not be defined.
71 Variable $candidate might not be defined.
72 Call to method getDatasource() on an unknown class
Drupal\search_api\Item\ItemInterface.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
72 Call to method getIndex() on an unknown class
Drupal\search_api\Item\ItemInterface.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
72 Instantiated class Drupal\search_api\Item\Item not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
74 Call to method setOriginalObject() on an unknown class
Drupal\search_api\Item\Item.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
75 Call to method setLanguage() on an unknown class
Drupal\search_api\Item\Item.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
96 Drupal\entity_language_fallback\Plugin\search_api\processor\FallbackLanguage::create()
calls parent::create() but
Drupal\entity_language_fallback\Plugin\search_api\processor\FallbackLanguage
does not extend any class.
------ ----------------------------------------------------------------------------------------[ERROR] Found 56 errors
Thanks for using drupal-check!
Consider sponsoring the development of the maintainers which make drupal-check possible:
- phpstan (ondrejmirtes): https://github.com/sponsors/ondrejmirtes
- phpstan-deprecation-rules (ondrejmirtes)): https://github.com/sponsors/ondrejmirtes
- phpstan-drupal (mglaman)): https://github.com/sponsors/mglaman
- drupal-check (mglaman)): https://github.com/sponsors/mglaman - 🇮🇳India flutterstack
1.
------ ---------------------------------------------------------------------------------------------------------------------------------------------
Line entity_language_fallback.module
------ ---------------------------------------------------------------------------------------------------------------------------------------------
124 Call to deprecated method filterValidItemIds() of class Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback:
in search_api:8.x-1.22 and is removed from search_api:2.0.0.
Use
\Drupal\search_api\Plugin\search_api\datasource\ContentEntityTrackingManager::filterValidItemIds()
instead.
184 Call to deprecated method filterValidItemIds() of class Drupal\entity_language_fallback\Plugin\search_api\datasource\ContentEntityFallback:
in search_api:8.x-1.22 and is removed from search_api:2.0.0.
Use
\Drupal\search_api\Plugin\search_api\datasource\ContentEntityTrackingManager::filterValidItemIds()
instead.regarding above deprecated issues are already taken care by creating wrapper in filterValidItemIds method:
In entity_language_fallback/src/Plugin/search_api/datasource/ContentEntityFallback.php file in 8.1.x. we will ignore this error.2.
$languages and $fallback_chain properties added in src/Plugin/search_api/datasource/ContentEntityFallback.php in #7 patch.
You can verify entity-language-fallback-drupal-11-compatibility-fixes-3430185-7.patch by
downloading https://git.drupalcode.org/project/entity_language_fallback.git into your drupal 11 instance and apply the #7 patch.
* enable the entity_language_fallback module
* Create multiple languages in /admin/config/regional/language.
for example :- default language English , add French and Spanish as a new languages to the site.* Edit each language and select fallback languages .
for example :- Edit Spanish and select French as language fallback in priority 1, select English as language fallback in priority 2* Now create a content and add translation for few languages .
for example :- If you created the node/1 in default language English , add translation for French.* Now try to access the content in spanish /es/node/1 it should show french version content.