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

Make sure content handlers only return versions known to the API

    Details

      Description

      The current Legacy Content Handler & API will pass through any value that is known to the storage engine [eZ/Publish/Core/Persistence/Legacy/Content/Mapper.php](https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Persistence/Legacy/Content/Mapper.php#L310-310).

      The SPI knows about the legacy version statuses [eZ/Publish/SPI/Persistence/Content/VersionInfo.php](https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/SPI/Persistence/Content/VersionInfo.php#L23-30), while the API only knows about three statuses [eZ/Publish/API/Repository/Values/Content/VersionInfo.php](https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/API/Repository/Values/Content/VersionInfo.php#L30-32).

      A mapping must be added so that API value objects only contain API versions, and not SPI ones.

      The list of versions in the SPI also doesn't have to match what was done in legacy (it currently seems to), but should match the repository business requirements.

        Issue Links

          Activity

          Show
          André Rømcke added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/815
          Show
          André Rømcke added a comment - Merged in https://github.com/ezsystems/ezpublish-kernel/commit/55ded82350406a905724eafaa83281791969b560

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Dunogier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: