yireo/shopware6-file-link-mapper

Shopware 6 file link mapper

1.0.0 2023-09-19 13:25 UTC

This package is auto-updated.

Last update: 2024-04-21 10:49:36 UTC


README

Symfony bundle that allows you to map the file paths used by for instance the Symfony Profiler. For instance, when Shopware is running inside Docker, this plugin allows you to change the internal Docker path to Shopware towards the host path used by PHPStorm.

Installation

composer require yireo/shopware6-file-link-mapper --dev

Next, add the following line to your config/bundles.php file:

return [
    ...
    Yireo\FileLinkMapper\YireoFileLinkMapper::class => ['dev' => true],
];

Proof of concept

Symfony allows you to set an IDE per configuration, so that - when using the Symfony Profiler toolbar - links are opened up in, for example, PHPStorm. This is done by configuring a file config/packages/dev/framework.yaml like so:

framework:
    ide: phpstorm

If you are using a Docker-based development environment, where the PHP processes are run inside a Docker container, then all the links will be generated with a path pointing towards the Docker container folder (for example /var/www/html) and not the host folder (for example /home/foobar/my-project). This plugin allows you to fix this.

Configuration

File config/packages/yireo_file_link_mapper.yaml

when@dev:
    yireo_file_link_mapper:
        docker_path: "/var/www/html"
        host_path: "/home/foobar/my-project"