Skip to content

Commit

Permalink
Fix vardump server, fixes #109
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Aug 20, 2019
1 parent d7dd101 commit 4c7d925
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Components/VarDumper/RequestContextProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getContext(): ?array
return [
'uri' => $request->getScheme() . '//' . $request->getHttpHost() . $request->getRequestUri(),
'method' => $request->getMethod(),
'controller' => $request->getControllerName(),
'controllerName' => $request->getControllerName(),
'identifier' => spl_object_hash($request),
];
}
Expand Down
15 changes: 0 additions & 15 deletions Resources/services/var_dump.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,6 @@

<service id="var_dumper.command.server_dump" class="Symfony\Component\VarDumper\Command\ServerDumpCommand">
<argument type="service" id="var_dumper.dump_server" />
<argument type="collection">
<argument type="service" key="cli">
<service class="Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor">
<argument type="service" id="var_dumper.cli_dumper" />
</service>
</argument>
<argument type="service" key="html">
<service class="Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor">
<argument type="service" id="var_dumper.html_dumper" />
</service>
</argument>
</argument>
<call method="setName">
<argument type="string">server:dump</argument>
</call>
<tag name="console.command" command="server:dump" />
</service>

Expand Down
3 changes: 3 additions & 0 deletions Subscriber/VarDumpServerSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Enlight\Event\SubscriberInterface;
use Enlight_Event_EventArgs;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\ServerDumper;
use Symfony\Component\VarDumper\VarDumper;

/**
Expand Down Expand Up @@ -39,6 +40,8 @@ public function initVarDumper(Enlight_Event_EventArgs $args): void

$cloner = new VarCloner();
$cloner->setMaxItems(-1);

/** @var ServerDumper $serverDumper */
$serverDumper = $args->get('subject')->get('var_dumper.server_dumper');

VarDumper::setHandler(function ($var) use ($cloner, $serverDumper) {
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ mkdir -p FroshProfiler
git archive ${commit} | tar -x -C FroshProfiler
composer install --no-dev -n -o -d FroshProfiler
( find ./FroshProfiler -type d -name ".git" && find ./FroshProfiler -name ".gitignore" && find ./FroshProfiler -name ".gitmodules" ) | xargs rm -r
rm -r ./FroshProfiler/vendor/shyim/var-dumper/Tests/
rm -r ./FroshProfiler/vendor/symfony/var-dumper/Tests
zip -x "*build.sh*" -x "*.MD" -r FroshProfiler-${commit}.zip FroshProfiler
18 changes: 17 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,28 @@
xsi:noNamespaceSchemaLocation="../../../engine/Shopware/Components/Plugin/schema/plugin.xsd">
<label lang="de">Profiler</label>
<label lang="en">Profiler</label>
<version>1.4.1</version>
<version>1.4.2</version>
<copyright>Friends of Shopware</copyright>
<license>MIT</license>
<link>https://friendsofshopware.github.io/</link>
<author>Friends of Shopware</author>
<compatibility minVersion="5.6.0" />
<changelog version="1.4.2">
<changes lang="en">
<![CDATA[
<ul>
<li>Fixed Symfony Var-Dump Server</li>
</ul>
]]>
</changes>
<changes lang="de">
<![CDATA[
<ul>
<li>Symfony VarDump Server behoben</li>
</ul>
]]>
</changes>
</changelog>
<changelog version="1.4.1">
<changes lang="en">
<![CDATA[
Expand Down

0 comments on commit 4c7d925

Please sign in to comment.