1

According to Shopware 6.4.13.0 upgrade instructions, EntityRepositoryInterface has been deprecated and should be replaced by EntityRepository. But EntityRepository is also marked as deprecated in my IDE, using the recommended development setup all upgraded to the latest versions:

  • PhpStorm (2022.1.3 Build #PS-221.5921.28)
  • Symfony Support plugin 2022.1.230
  • Shopware plugin 4.4.3
  • Shopware development setup cloned from github.com/shopware/development
  • Shopware platform "6.4.9999999.9999999 Developer Version" loaded and upgraded by psh according to composer.json in development setup:
    "require": {
        "shopware/platform": "6.4.x@dev || dev-trunk"

Deprecation note in my PhpStorm IDE: screenshot of deprecation message in PhpStorm IDE

Class 'EntityRepository' is deprecated

class EntityRepository implements EntityRepositoryInterface \Shopware\Core\Framework\DataAbstractionLayer\EntityRepository

Deprecated: 5.6.0 Namespace: \Shopware\Core\Framework\DataAbstractionLayer\

Source: development/vendor/shopware/platform/src/Core/Framework/DataAbstractionLayer/EntityRepository.php

How to handle the deprecation and what to use instead of EntityRepositoryInterface that will not be deprecated as well?

How to know if the IDE's deprecation notice can be safely ignored? I suppose that it can be ignored, as the mentioned version number "5.6.0" does not match any current or upcoming Shopware 6 release.

How to turn off misleading deprecation notices in my IDE?

1 Answer 1

2

Has been fixed with commit https://github.com/shopware/platform/commit/99cf9093464d679f6abcb91bb68cc4205bc6ccf0

it has now only @final https://github.com/shopware/platform/blob/trunk/src/Core/Framework/DataAbstractionLayer/EntityRepository.php#L29

1
  • Thanks! There are still a lot more deprecations though, after git pull, and psh.phar update, like > bin/console dal:refresh:index 15:03:56 INFO [php] User Deprecated: Since shopware/core : Class "Shopware\Core\Framework\Routing\Annotation\RouteScope" is deprecated and will be removed in v6.5.0.0. Use ""@Route(defaults={"_routeScope"={"storefront"}})"" instead. I have updated my blog post with the latest information. Thanks again! Jul 9, 2022 at 15:05

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.