Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-1993

GraphQL response contains PHP deprecations

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.3.16, 4.0.3
    • 3.3.13, 4.0.0-rc2
    • None
    • None
    • Ibexa Commerce, Ibexa Content, Ibexa Experience, Ibexa Open Source

    Description

      When a PHP deprecation is triggered in GraphQL then it's included in the response.
      I've seen in happen when PHP 8.1 is used.

      Steps to reproduce:
      1. Create a new user, according to the Scenario from https://github.com/ezsystems/BehatBundle/blob/8.3/features/personas/add_location.feature#L3-L29
      2. Login as user "Add", password Passw0rd-42
      3. Go to Content -> Content Structure

      Expected:
      Page loads correctly

      Actual:
      "Cannot load location" notification is shown

      If you look into the GraphQL response in the browser network tab that then it starts with:

      <br />
      <b>Deprecated</b>:  Optional parameter $formatter declared before required parameter $debug is implicitly treated as a required parameter in <b>/Users/mareknocon/Desktop/Sites/v3_4/vendor/webonyx/graphql-php/src/Error/FormattedError.php</b> on line <b>304</b><br />
      {"errors":[{"debugMessage":"The User does not have the \u0027view\u0027 \u0027section\u0027 permission","message":"Internal server Error","extensions":{"category":"internal"},"locations":[{"line":47,"column":37}],"path":["_repository","location","children","edges",0,"node","content","_info","section"],"trace":[{"file":"\/Users\/mareknocon\/Desktop\/Sites\/v3_4\/var\/cache\/behat\/Container8WvLGSh\/SectionService_1c1d5e0.php","line":43,"call":"eZ\\Publish\\Core\\Repository\\SectionService::loadSection(1)"},{"file":"\/Users\/mareknocon\/Desktop\/Sites\/v3_4\/vendor\/ezsystems\/ezplatform-kernel\/eZ\/Publish\/SPI\/Repository\/Decorator\/SectionServiceDecorator.php","line":46,"call":"Container8WvLGSh\\SectionService_1c1d5e0::loadSection(1)"},{"file":"\/Users\/mareknocon\/Desktop\/Sites\/v3_4\/vendor\/ezsystems\/ezplatform-kernel\/eZ\/Publish\/Core\/Repository\/SiteAccessAware\/SectionService.php","line":51,"call":"eZ\\Publish\\SPI\\Repository\\Decorator\\SectionServiceDecorator::loadSection(1)"},{"file":"\/Users\/mareknocon\/Desktop\/Sites\/v3_4\/vendor\/ezsystems\/ezplatform-graphql\/src\/GraphQL\/Resolver\/SectionResolver.php","line":28,"call":"eZ\\Publish\\Core\\Repository\\SiteAccessAware\\SectionService::loadSection(1)"},{"file":"\/Users\/mareknocon\/Desktop\/Sites\/v3_4\/vendor\/overblog\/graphql
      

      Which seems like an upstream problem that has been fixed in https://github.com/webonyx/graphql-php/pull/743

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              marek.nocon@ibexa.co Marek Nocoń
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: