Skip to content

FR: Autodetect Sulu CMS services.xml #2409

Open
@RafaelKr

Description

@RafaelKr

The Sulu project (https://sulu.io/), which is based on Symfony, splits up the Container Cache for the user-facing (website) and CMS (admin) parts of the application. Also there's preview for previewing a website page in the CMS editor.

It adds the following paths:

  • var/cache/admin/dev/App_KernelDevDebugContainer.xml
  • var/cache/website/dev/App_KernelDevDebugContainer.xml
  • var/cache/preview/dev/App_KernelDevDebugContainer.xml

Currently I manually need to add those paths, so IntelliJ IDEA (Symfony Support) is able to resolve all services correctly:

image

Would it be possible to make Symfony Support detect those paths automatically for Sulu projects?

Alternatively I could imagine that projects based on Symfony could modify the .idea/symfony2.xml at container compile time. Sulu then could modify that file to look like:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Symfony2PluginSettings">
    <option name="pathToTranslation" value="var/cache/website/dev/translations" />
    <option name="pluginEnabled" value="true" />
    <option name="profilerLocalEnabled" value="true" />
    <option name="profilerCsvPath" value="var/cache/website/dev/profiler/index.csv" />
    <option name="containerFiles">
      <list>
        <container_file path="var/cache/website/dev/App_KernelDevDebugContainer.xml" />
        <container_file path="var/cache/admin/dev/App_KernelDevDebugContainer.xml" />
      </list>
    </option>
  </component>
</project>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions