Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30093

Service extending eZ\Publish\Core\Repository\LocationService will make cache:clear fail

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • Customer request
    • None
    • None
    • None

    Description

      Running cache:clear with service enabled that extends eZ\Publish\Core\Repository\LocationService will fail with exception:

      Cannot autowire service "EzSystems\EzPlatformAdminUiBundle\Templating\Twig\PathStringExtension": argument "$locationService" of method "__construct()" references class "eZ\Publish\Core\Repository\LocationServ
      ice" but no such service exists. Try changing the type-hint to "eZ\Publish\API\Repository\LocationService" instead.

      Steps to reproduce
      1. Clean version of eZ Platform 2.4.1
      2. Create file {src/AppBundle/Service/TestLocationService.php}} that contains:

      <?php
      
      namespace AppBundle\Service;
      
      use eZ\Publish\Core\Repository\LocationService;
      
      class TestLocationService extends LocationService
      {
      
      }
      

      3. Add service definition at the end of app/config/services.yml:

          test_location_service:
              class: AppBundle\Service\TestLocationService
      

      4. Run php bin/console cache:clear from project root directory.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mateusz.bieniek@ibexa.co Mateusz Bieniek
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: