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

API Repository::sudo method signature should not use self as a typehint

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 2.5.2, 3.0.0-beta2
    • None
    • None
    • None

    Description

      Current method signature:

      public function sudo(callable $callback, self $outerRepository = null);
      

      It forces descendants to change typehint to Repository. While it works (because descendants inherits Repository anyway), self is invalid in this context. self should be used only in case of indicating self-referenced instances, and not for typehinting current interface.

      Attachments

        Activity

          People

            Unassigned Unassigned
            slawomir.uchto@ibexa.co Sławomir Dołżycki-Uchto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: