Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17041

Conflicting Symfony Components in Drupal 8

    Details

    • Type: Bug
    • Status: Won't Do
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: 4.6.6
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Drupal 8 and CiviCRM are both shipping Symfony components - versions 2.7 and 2.4 respectively.

      This causes race conditions. 2.7 is mostly backwards compatible, and so if Drupal's class loader gets added first, its Symfony components will be used by default and all is well (though warnings are generated due to use of deprecated functions). However, if CiviCRM's class loader makes it in there first, Drupal will attempt to call non-existent methods and the whole thing will die.

      In general with Drupal 8 this hasn't been an issue so long as we go in via the Drupal front end (as opposed to having CiviCRM try to bootstrap Drupal). But occasionally the issue pops up. For example if CiviCRM tries clearing the Drupal cache, or during when using buildkit — which is a current blocker.

      There are lots of hacky ways around this race condition (eg. trying to keep versions in sync, trying to control for load order of class loaders, etc.) but if, for example, Wordpress and Joomla also start shipping with their own components, any hacky solutions are going to get very messy.

      Open discussion for long-term solutions.

        Attachments

          Activity

            People

            • Assignee:
              torrance123 Torrance
              Reporter:
              torrance123 Torrance
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: