Compare commits
No commits in common. "dev_2.x_OX7" and "main" have entirely different histories.
dev_2.x_OX
...
main
@ -1,35 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
$finder = PhpCsFixer\Finder::create()
|
||||||
|
->in(__DIR__)
|
||||||
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
|
;
|
||||||
|
|
||||||
$header = <<<EOF
|
|
||||||
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
|
||||||
|
|
||||||
For the full copyright and license information, please view
|
|
||||||
the LICENSE file that was distributed with this source code.
|
|
||||||
|
|
||||||
https://www.d3data.de
|
|
||||||
|
|
||||||
@copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
|
||||||
@author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
|
||||||
@link https://www.oxidmodule.com
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$config = new PhpCsFixer\Config();
|
$config = new PhpCsFixer\Config();
|
||||||
return $config->setRules(
|
return $config->setRules([
|
||||||
[
|
'@PHP73Migration' => true,
|
||||||
'@PHP80Migration' => true,
|
'@PSR12' => true
|
||||||
'@PSR12' => true,
|
])
|
||||||
'header_comment' => [
|
->setFinder($finder)
|
||||||
'comment_type' => 'PHPDoc',
|
;
|
||||||
'header' => $header,
|
|
||||||
'location' => 'after_open',
|
|
||||||
'separate' => 'both',
|
|
||||||
],
|
|
||||||
'php_unit_test_class_requires_covers' => true,
|
|
||||||
'doctrine_annotation_indentation' => true,
|
|
||||||
]
|
|
||||||
)
|
|
||||||
->setFinder($finder);
|
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -21,12 +19,11 @@ use D3\DebugBar\Application\Models\AvailabilityCheck;
|
|||||||
use D3\DebugBar\Application\Models\Collectors\OxidConfigCollector;
|
use D3\DebugBar\Application\Models\Collectors\OxidConfigCollector;
|
||||||
use D3\DebugBar\Application\Models\Collectors\OxidShopCollector;
|
use D3\DebugBar\Application\Models\Collectors\OxidShopCollector;
|
||||||
use D3\DebugBar\Application\Models\Collectors\OxidVersionCollector;
|
use D3\DebugBar\Application\Models\Collectors\OxidVersionCollector;
|
||||||
use D3\DebugBar\Application\Models\Collectors\TemplateVariablesCollector;
|
use D3\DebugBar\Application\Models\Collectors\SmartyCollector;
|
||||||
use D3\DebugBar\Application\Models\Exceptions\UnavailableException;
|
use D3\DebugBar\Application\Models\Exceptions\UnavailableException;
|
||||||
use D3\DebugBar\Application\Models\TimeDataCollectorHandler;
|
use D3\DebugBar\Application\Models\TimeDataCollectorHandler;
|
||||||
use DebugBar\Bridge\DoctrineCollector;
|
use DebugBar\Bridge\DoctrineCollector;
|
||||||
use DebugBar\Bridge\MonologCollector;
|
use DebugBar\Bridge\MonologCollector;
|
||||||
use DebugBar\Bridge\NamespacedTwigProfileCollector;
|
|
||||||
use DebugBar\DataCollector\ExceptionsCollector;
|
use DebugBar\DataCollector\ExceptionsCollector;
|
||||||
use DebugBar\DataCollector\MemoryCollector;
|
use DebugBar\DataCollector\MemoryCollector;
|
||||||
use DebugBar\DataCollector\MessagesCollector;
|
use DebugBar\DataCollector\MessagesCollector;
|
||||||
@ -40,23 +37,18 @@ use Doctrine\DBAL\Connection;
|
|||||||
use Doctrine\DBAL\Logging\DebugStack;
|
use Doctrine\DBAL\Logging\DebugStack;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use OxidEsales\Eshop\Core\Controller\BaseController;
|
use OxidEsales\Eshop\Core\Controller\BaseController;
|
||||||
|
use OxidEsales\Eshop\Core\DatabaseProvider;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Database\ConnectionProviderInterface;
|
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRenderer;
|
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridge;
|
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Templating\TemplateRendererBridgeInterface;
|
|
||||||
use OxidEsales\Twig\TwigEngine;
|
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Twig\Profiler\Profile;
|
|
||||||
|
|
||||||
class DebugBarComponent extends BaseController
|
class DebugBarComponent extends BaseController
|
||||||
{
|
{
|
||||||
protected DebugBar|null $debugBar = null;
|
/** @var DebugBar|null */
|
||||||
protected null|JavascriptRenderer $debugBarRenderer = null;
|
protected $debugBar = null;
|
||||||
|
/** @var JavascriptRenderer */
|
||||||
|
protected $debugBarRenderer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marking object as component
|
* Marking object as component
|
||||||
@ -65,9 +57,9 @@ class DebugBarComponent extends BaseController
|
|||||||
protected $_blIsComponent = true;
|
protected $_blIsComponent = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws DebugBarException
|
* @throws DebugBarException
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws DatabaseConnectionException
|
||||||
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -97,50 +89,27 @@ class DebugBarComponent extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return DoctrineCollector
|
* @return DoctrineCollector
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ReflectionException
|
||||||
* @throws DebugBarException
|
* @throws DebugBarException
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws DatabaseConnectionException
|
||||||
*/
|
*/
|
||||||
public function getDoctrineCollector(): DoctrineCollector
|
public function getDoctrineCollector(): DoctrineCollector
|
||||||
{
|
{
|
||||||
/** @var Connection $connection */
|
$db = DatabaseProvider::getDb();
|
||||||
$connection = ContainerFactory::getInstance()->getContainer()->get(ConnectionProviderInterface::class)->get();
|
|
||||||
$debugStack = new DebugStack();
|
$debugStack = new DebugStack();
|
||||||
|
/** @var Connection $connection */
|
||||||
|
$connection = $this->getNonPublicProperty($db, 'connection');
|
||||||
$connection->getConfiguration()->setSQLLogger($debugStack);
|
$connection->getConfiguration()->setSQLLogger($debugStack);
|
||||||
return new DoctrineCollector($debugStack);
|
return new DoctrineCollector($debugStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return TemplateVariablesCollector
|
* @return SmartyCollector
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
*/
|
||||||
public function getTemplateVariablesCollector(): TemplateVariablesCollector
|
public function getSmartyCollector(): SmartyCollector
|
||||||
{
|
{
|
||||||
/** @var TemplateRenderer $renderer */
|
$smarty = Registry::getUtilsView()->getSmarty();
|
||||||
$renderer = ContainerFactory::getInstance()->getContainer()
|
return new SmartyCollector($smarty);
|
||||||
->get(TemplateRendererBridgeInterface::class)
|
|
||||||
->getTemplateRenderer();
|
|
||||||
$templateEngine = $renderer->getTemplateEngine();
|
|
||||||
|
|
||||||
return new TemplateVariablesCollector(
|
|
||||||
array_merge(
|
|
||||||
Registry::getConfig()->getActiveView()->getViewData(),
|
|
||||||
$templateEngine->getGlobals()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return NamespacedTwigProfileCollector
|
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
|
||||||
public function getTwigCollector(): NamespacedTwigProfileCollector
|
|
||||||
{
|
|
||||||
/** @var Profile $profile */
|
|
||||||
$profile = ContainerFactory::getInstance()->getContainer()->get(Profile::class);
|
|
||||||
return new NamespacedTwigProfileCollector($profile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -167,12 +136,27 @@ class DebugBarComponent extends BaseController
|
|||||||
return oxNew(OxidVersionCollector::class);
|
return oxNew(OxidVersionCollector::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param object $object
|
||||||
|
* @param string $propName
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
* @throws ReflectionException
|
||||||
|
*/
|
||||||
|
protected function getNonPublicProperty(object $object, string $propName)
|
||||||
|
{
|
||||||
|
$reflection = new ReflectionClass($object);
|
||||||
|
$property = $reflection->getProperty($propName);
|
||||||
|
$property->setAccessible(true);
|
||||||
|
return $property->getValue($object);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param DebugBar $debugbar
|
* @param DebugBar $debugbar
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
* @throws DatabaseConnectionException
|
||||||
* @throws DebugBarException
|
* @throws DebugBarException
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function addCollectors(DebugBar $debugbar): void
|
public function addCollectors(DebugBar $debugbar): void
|
||||||
{
|
{
|
||||||
@ -187,18 +171,7 @@ class DebugBarComponent extends BaseController
|
|||||||
// add custom collectors
|
// add custom collectors
|
||||||
$debugbar->addCollector($this->getOxidShopCollector());
|
$debugbar->addCollector($this->getOxidShopCollector());
|
||||||
$debugbar->addCollector($this->getOxidConfigCollector());
|
$debugbar->addCollector($this->getOxidConfigCollector());
|
||||||
$debugbar->addCollector($this->getTemplateVariablesCollector());
|
$debugbar->addCollector($this->getSmartyCollector());
|
||||||
|
|
||||||
/** @var TemplateRendererBridge $templateRendererBridge */
|
|
||||||
$templateRendererBridge = ContainerFactory::getInstance()->getContainer()->get(TemplateRendererBridgeInterface::class);
|
|
||||||
switch (get_class($templateRendererBridge->getTemplateRenderer()->getTemplateEngine())) {
|
|
||||||
case TwigEngine::class:
|
|
||||||
$debugbar->addCollector($this->getTwigCollector());
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
dumpvar(get_class($templateRendererBridge->getTemplateRenderer()->getTemplateEngine()));
|
|
||||||
}
|
|
||||||
|
|
||||||
$debugbar->addCollector($this->getMonologCollector());
|
$debugbar->addCollector($this->getMonologCollector());
|
||||||
$debugbar->addCollector($this->getDoctrineCollector());
|
$debugbar->addCollector($this->getDoctrineCollector());
|
||||||
$debugbar->addCollector($this->getOxidVersionCollector());
|
$debugbar->addCollector($this->getOxidVersionCollector());
|
||||||
@ -206,10 +179,8 @@ class DebugBarComponent extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws UnavailableException
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function addTimelineMeasures(): void
|
public function addTimelineMessures(): void
|
||||||
{
|
{
|
||||||
if (false === $this->debugBar instanceof DebugBar) {
|
if (false === $this->debugBar instanceof DebugBar) {
|
||||||
throw new UnavailableException();
|
throw new UnavailableException();
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -17,6 +15,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace D3\DebugBar\Application\Models;
|
namespace D3\DebugBar\Application\Models;
|
||||||
|
|
||||||
|
use OxidEsales\Eshop\Application\Model\User;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
class AvailabilityCheck
|
class AvailabilityCheck
|
||||||
@ -29,7 +28,7 @@ class AvailabilityCheck
|
|||||||
return !isAdmin() && (
|
return !isAdmin() && (
|
||||||
Registry::getConfig()->getShopConfVar('d3debugbar_showForAdminUsersOnly') != true ||
|
Registry::getConfig()->getShopConfVar('d3debugbar_showForAdminUsersOnly') != true ||
|
||||||
self::userIsMallAdmin()
|
self::userIsMallAdmin()
|
||||||
) && !Registry::getConfig()->isProductiveMode();
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -22,64 +20,37 @@ use DebugBar\DataCollector\Renderable;
|
|||||||
use OxidEsales\Eshop\Core\Config;
|
use OxidEsales\Eshop\Core\Config;
|
||||||
use OxidEsales\Eshop\Core\ConfigFile;
|
use OxidEsales\Eshop\Core\ConfigFile;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridge;
|
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridgeInterface;
|
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
|
|
||||||
class OxidConfigCollector extends DataCollector implements Renderable
|
class OxidConfigCollector extends DataCollector implements Renderable
|
||||||
{
|
{
|
||||||
public const HIDDEN_TEXT = '[hidden]';
|
/** @var Config */
|
||||||
|
protected $config;
|
||||||
|
|
||||||
protected array $configVars = [];
|
/** @var array */
|
||||||
|
protected $configVars = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $useHtmlVarDumper = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Config $config
|
* @param Config $config
|
||||||
*
|
*
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function __construct(Config $config)
|
public function __construct(Config $config)
|
||||||
{
|
{
|
||||||
$config->init();
|
$config->init();
|
||||||
|
$this->config = $config;
|
||||||
$this->configVars['config table'] = (array) $this->getNonPublicProperty($config, '_aConfigParams');
|
$this->configVars = array_merge(
|
||||||
$this->configVars['config file'] = Registry::get(ConfigFile::class)->getVars();
|
(array) $this->getNonPublicProperty($this->config, '_aConfigParams'),
|
||||||
$this->configVars = array_merge($this->configVars, $this->getModuleSettings());
|
Registry::get(ConfigFile::class)->getVars()
|
||||||
|
);
|
||||||
|
|
||||||
$this->sanitizeCriticalProperties();
|
$this->sanitizeCriticalProperties();
|
||||||
|
|
||||||
$this->useHtmlVarDumper(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
|
||||||
protected function getModuleSettings(): array
|
|
||||||
{
|
|
||||||
$container = ContainerFactory::getInstance()->getContainer();
|
|
||||||
/** @var ShopConfigurationDaoBridge $shopConfigurationDaoBridge */
|
|
||||||
$shopConfigurationDaoBridge = $container->get(ShopConfigurationDaoBridgeInterface::class);
|
|
||||||
$shopConfiguration = $shopConfigurationDaoBridge->get();
|
|
||||||
|
|
||||||
$moduleSettings = [];
|
|
||||||
|
|
||||||
foreach ($shopConfiguration->getModuleConfigurations() as $moduleConfiguration) {
|
|
||||||
foreach ($moduleConfiguration->getModuleSettings() as $setting) {
|
|
||||||
$moduleSettings[$moduleConfiguration->getId()][$setting->getName()] =
|
|
||||||
strtolower($setting->getType()) == 'password' ?
|
|
||||||
self::HIDDEN_TEXT :
|
|
||||||
$setting->getValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $moduleSettings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,13 +62,11 @@ class OxidConfigCollector extends DataCollector implements Renderable
|
|||||||
$specific = ['sSerialNr', 'aSerials', 'dbPwd'];
|
$specific = ['sSerialNr', 'aSerials', 'dbPwd'];
|
||||||
$search = array_merge($generic, $specific);
|
$search = array_merge($generic, $specific);
|
||||||
|
|
||||||
foreach ($this->configVars as $group => $values) {
|
array_walk($this->configVars, function ($item, $key) use ($search) {
|
||||||
array_walk($this->configVars[$group], function ($item, $key) use ($group, $search) {
|
if (in_array($key, $search)) {
|
||||||
if (in_array($key, $search)) {
|
$this->configVars[$key] = '[hidden]';
|
||||||
$this->configVars[$group][ $key ] = self::HIDDEN_TEXT;
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,7 +76,7 @@ class OxidConfigCollector extends DataCollector implements Renderable
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
protected function getNonPublicProperty(object $object, string $propName): mixed
|
protected function getNonPublicProperty(object $object, string $propName)
|
||||||
{
|
{
|
||||||
$reflection = new ReflectionClass($object);
|
$reflection = new ReflectionClass($object);
|
||||||
$property = $reflection->getProperty($propName);
|
$property = $reflection->getProperty($propName);
|
||||||
@ -143,6 +112,17 @@ class OxidConfigCollector extends DataCollector implements Renderable
|
|||||||
return ['vars' => $data, 'count' => count($data)];
|
return ['vars' => $data, 'count' => count($data)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the Symfony HtmlDumper will be used to dump variables for rich variable
|
||||||
|
* rendering.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isHtmlVarDumperUsed(): bool
|
||||||
|
{
|
||||||
|
return $this->useHtmlVarDumper;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -22,21 +20,28 @@ use DebugBar\DataCollector\DataCollector;
|
|||||||
use DebugBar\DataCollector\Renderable;
|
use DebugBar\DataCollector\Renderable;
|
||||||
use Exception;
|
use Exception;
|
||||||
use OxidEsales\Eshop\Core\Config;
|
use OxidEsales\Eshop\Core\Config;
|
||||||
|
use OxidEsales\Eshop\Core\Module\Module;
|
||||||
use OxidEsales\Eshop\Core\ShopVersion;
|
use OxidEsales\Eshop\Core\ShopVersion;
|
||||||
use OxidEsales\Eshop\Core\Theme;
|
use OxidEsales\Eshop\Core\Theme;
|
||||||
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridge;
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridge;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridgeInterface;
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridgeInterface;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\DataObject\ModuleConfiguration;
|
|
||||||
use OxidEsales\Facts\Facts;
|
use OxidEsales\Facts\Facts;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
|
||||||
class OxidShopCollector extends DataCollector implements Renderable
|
class OxidShopCollector extends DataCollector implements Renderable
|
||||||
{
|
{
|
||||||
protected Config $config;
|
/** @var Config */
|
||||||
|
protected $config;
|
||||||
|
|
||||||
protected array $configVars = [];
|
/** @var array */
|
||||||
|
protected $configVars = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $useHtmlVarDumper = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
@ -52,11 +57,11 @@ class OxidShopCollector extends DataCollector implements Renderable
|
|||||||
$parentThemeId = $parent ? $parent->getId() : '--';
|
$parentThemeId = $parent ? $parent->getId() : '--';
|
||||||
|
|
||||||
$moduleList = $this->getInstalledModules();
|
$moduleList = $this->getInstalledModules();
|
||||||
$list = [];
|
|
||||||
array_walk(
|
array_walk(
|
||||||
$moduleList,
|
$moduleList,
|
||||||
function (ModuleConfiguration $module) use (&$list) {
|
function (Module &$module) {
|
||||||
$list[] = trim(strip_tags(current($module->getTitle()))).' - '.$module->getVersion();
|
$str = trim(strip_tags($module->getTitle())).' - '.$module->getInfo('version').' ';
|
||||||
|
$module = $str;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -66,10 +71,8 @@ class OxidShopCollector extends DataCollector implements Renderable
|
|||||||
'CE Version:' => InstalledVersions::getVersion('oxid-esales/oxideshop-ce'),
|
'CE Version:' => InstalledVersions::getVersion('oxid-esales/oxideshop-ce'),
|
||||||
'Theme:' => $theme->getActiveThemeId(),
|
'Theme:' => $theme->getActiveThemeId(),
|
||||||
'Parent Theme:' => $parentThemeId,
|
'Parent Theme:' => $parentThemeId,
|
||||||
'Modules:' => $list,
|
'Modules:' => implode(chr(10), $moduleList),
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->useHtmlVarDumper(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,6 +103,17 @@ class OxidShopCollector extends DataCollector implements Renderable
|
|||||||
return ['vars' => $data, 'count' => count($data)];
|
return ['vars' => $data, 'count' => count($data)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the Symfony HtmlDumper will be used to dump variables for rich variable
|
||||||
|
* rendering.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isHtmlVarDumperUsed(): bool
|
||||||
|
{
|
||||||
|
return $this->useHtmlVarDumper;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -119,7 +133,7 @@ class OxidShopCollector extends DataCollector implements Renderable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return ModuleConfiguration[]
|
* @return array
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
@ -133,13 +147,13 @@ class OxidShopCollector extends DataCollector implements Renderable
|
|||||||
$modules = [];
|
$modules = [];
|
||||||
|
|
||||||
foreach ($shopConfiguration->getModuleConfigurations() as $moduleConfiguration) {
|
foreach ($shopConfiguration->getModuleConfigurations() as $moduleConfiguration) {
|
||||||
$modules[] = $moduleConfiguration;
|
$module = oxNew(Module::class);
|
||||||
|
$module->load($moduleConfiguration->getId());
|
||||||
|
$modules[] = $module;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var $a ModuleConfiguration */
|
|
||||||
/** @var $b ModuleConfiguration */
|
|
||||||
usort($modules, function ($a, $b) {
|
usort($modules, function ($a, $b) {
|
||||||
return strcmp(current($a->getTitle()), current($b->getTitle()));
|
return strcmp($a->getTitle(), $b->getTitle());
|
||||||
});
|
});
|
||||||
|
|
||||||
return $modules;
|
return $modules;
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
* @copyright (c) 2016 Dmitry Kosenkov
|
||||||
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
@ -20,11 +19,49 @@ namespace D3\DebugBar\Application\Models\Collectors;
|
|||||||
use DebugBar\DataCollector\DataCollector;
|
use DebugBar\DataCollector\DataCollector;
|
||||||
use DebugBar\DataCollector\Renderable;
|
use DebugBar\DataCollector\Renderable;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
use Smarty;
|
||||||
|
|
||||||
class TemplateVariablesCollector extends DataCollector implements Renderable
|
class SmartyCollector extends DataCollector implements Renderable
|
||||||
{
|
{
|
||||||
public function __construct(protected array $templateVariables)
|
/** @var Smarty */
|
||||||
|
protected $smarty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $useHtmlVarDumper = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a flag indicating whether the Symfony HtmlDumper will be used to dump variables for
|
||||||
|
* rich variable rendering.
|
||||||
|
*
|
||||||
|
* @param bool $value
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function useHtmlVarDumper(bool $value = true): SmartyCollector
|
||||||
{
|
{
|
||||||
|
$this->useHtmlVarDumper = $value;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the Symfony HtmlDumper will be used to dump variables for rich variable
|
||||||
|
* rendering.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isHtmlVarDumperUsed(): bool
|
||||||
|
{
|
||||||
|
return $this->useHtmlVarDumper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Smarty $smarty
|
||||||
|
*/
|
||||||
|
public function __construct(Smarty $smarty)
|
||||||
|
{
|
||||||
|
$this->smarty = $smarty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,7 +71,7 @@ class TemplateVariablesCollector extends DataCollector implements Renderable
|
|||||||
{
|
{
|
||||||
$data = ['current view template' => Registry::getConfig()->getTopActiveView()->getTemplateName()];
|
$data = ['current view template' => Registry::getConfig()->getTopActiveView()->getTemplateName()];
|
||||||
|
|
||||||
$vars = $this->templateVariables;
|
$vars = $this->smarty->get_template_vars();
|
||||||
|
|
||||||
foreach ($vars as $idx => $var) {
|
foreach ($vars as $idx => $var) {
|
||||||
if ($this->isHtmlVarDumperUsed()) {
|
if ($this->isHtmlVarDumperUsed()) {
|
||||||
@ -52,7 +89,7 @@ class TemplateVariablesCollector extends DataCollector implements Renderable
|
|||||||
*/
|
*/
|
||||||
public function getName(): string
|
public function getName(): string
|
||||||
{
|
{
|
||||||
return 'template_variables';
|
return 'smarty';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,14 +101,14 @@ class TemplateVariablesCollector extends DataCollector implements Renderable
|
|||||||
? "PhpDebugBar.Widgets.HtmlVariableListWidget"
|
? "PhpDebugBar.Widgets.HtmlVariableListWidget"
|
||||||
: "PhpDebugBar.Widgets.VariableListWidget";
|
: "PhpDebugBar.Widgets.VariableListWidget";
|
||||||
return [
|
return [
|
||||||
"template_variables" => [
|
"smarty" => [
|
||||||
"icon" => "file-text",
|
"icon" => "file-text",
|
||||||
"widget" => $widget,
|
"widget" => $widget,
|
||||||
"map" => "template_variables.vars",
|
"map" => "smarty.vars",
|
||||||
"default" => "{}",
|
"default" => "{}",
|
||||||
],
|
],
|
||||||
"template_variables:badge" => [
|
"smarty:badge" => [
|
||||||
"map" => "template_variables.count",
|
"map" => "smarty.count",
|
||||||
"default" => 0,
|
"default" => 0,
|
||||||
],
|
],
|
||||||
];
|
];
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -21,7 +19,8 @@ use DebugBar\DataCollector\TimeDataCollector;
|
|||||||
|
|
||||||
class TimeDataCollectorHandler
|
class TimeDataCollectorHandler
|
||||||
{
|
{
|
||||||
private static TimeDataCollector|null $instance = null;
|
/** @var TimeDataCollector */
|
||||||
|
private static $instance = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return TimeDataCollector
|
* @return TimeDataCollector
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -54,14 +52,20 @@ class DebugBarErrorHandler
|
|||||||
[ $file, $line ] = $smartyTemplate;
|
[ $file, $line ] = $smartyTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw match ($severity) {
|
switch ($severity) {
|
||||||
E_CORE_ERROR => new CoreErrorException($message, 0, $severity, $file, $line),
|
case E_CORE_ERROR:
|
||||||
E_COMPILE_ERROR => new CompileErrorException($message, 0, $severity, $file, $line),
|
throw new CoreErrorException($message, 0, $severity, $file, $line);
|
||||||
E_USER_ERROR => new UserErrorException($message, 0, $severity, $file, $line),
|
case E_COMPILE_ERROR:
|
||||||
E_PARSE => new ParseException($message, 0, $severity, $file, $line),
|
throw new CompileErrorException($message, 0, $severity, $file, $line);
|
||||||
E_ERROR => new ErrorException($message, 0, $severity, $file, $line),
|
case E_USER_ERROR:
|
||||||
default => $this->handleUnregisteredErrorTypes($message, $severity, $file, $line),
|
throw new UserErrorException($message, 0, $severity, $file, $line);
|
||||||
};
|
case E_PARSE:
|
||||||
|
throw new ParseException($message, 0, $severity, $file, $line);
|
||||||
|
case E_ERROR:
|
||||||
|
throw new ErrorException($message, 0, $severity, $file, $line);
|
||||||
|
default:
|
||||||
|
$this->handleUnregisteredErrorTypes($message, $severity, $file, $line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,7 +75,7 @@ class DebugBarErrorHandler
|
|||||||
protected function getSmartyTemplateLocationFromError(string $messsage): ?array
|
protected function getSmartyTemplateLocationFromError(string $messsage): ?array
|
||||||
{
|
{
|
||||||
if (stristr($messsage, 'Smarty error: [in ')) {
|
if (stristr($messsage, 'Smarty error: [in ')) {
|
||||||
$start = strpos($messsage, '[') + 1;
|
$start = strpos($messsage, '[')+1;
|
||||||
$end = strpos($messsage, ']');
|
$end = strpos($messsage, ']');
|
||||||
$parts = explode(' ', substr($messsage, $start, $end - $start));
|
$parts = explode(' ', substr($messsage, $start, $end - $start));
|
||||||
return [Registry::getConfig()->getTemplateDir(isAdmin()).$parts[1], (int) $parts[3]];
|
return [Registry::getConfig()->getTemplateDir(isAdmin()).$parts[1], (int) $parts[3]];
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -22,10 +20,11 @@ use D3\DebugBar\Application\Models\AvailabilityCheck;
|
|||||||
use D3\DebugBar\Application\Models\Exceptions\UnavailableException;
|
use D3\DebugBar\Application\Models\Exceptions\UnavailableException;
|
||||||
use DebugBar\DataCollector\ExceptionsCollector;
|
use DebugBar\DataCollector\ExceptionsCollector;
|
||||||
use DebugBar\DebugBarException;
|
use DebugBar\DebugBarException;
|
||||||
|
use OxidEsales\Eshop\Core\ConfigFile;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\ExceptionHandler;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\EshopCommunity\Internal\Framework\Logger\LoggerServiceFactory;
|
use OxidEsales\EshopCommunity\Internal\Framework\Logger\LoggerServiceFactory;
|
||||||
use OxidEsales\EshopCommunity\Internal\Transition\Utility\Context;
|
use OxidEsales\EshopCommunity\Internal\Transition\Utility\Context;
|
||||||
use ReflectionException;
|
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class DebugBarExceptionHandler
|
class DebugBarExceptionHandler
|
||||||
@ -34,25 +33,27 @@ class DebugBarExceptionHandler
|
|||||||
* Handler for uncaught exceptions.
|
* Handler for uncaught exceptions.
|
||||||
*
|
*
|
||||||
* @param Throwable $exception exception object
|
* @param Throwable $exception exception object
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function handleUncaughtException(Throwable $exception): void
|
public function handleUncaughtException(Throwable $exception): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Registry::getLogger()->error(
|
/** @var int $debugMode */
|
||||||
$exception->getMessage(),
|
$debugMode = Registry::get(ConfigFile::class)->getVar('iDebug');
|
||||||
[$exception]
|
$defaultExceptionHandler = new ExceptionHandler($debugMode);
|
||||||
);
|
$defaultExceptionHandler->writeExceptionToLog($exception);
|
||||||
} catch (Throwable) {
|
} catch (Throwable $loggerException) {
|
||||||
/**
|
/**
|
||||||
* It's not possible to get the logger from the DI container.
|
* It's not possible to get the logger from the DI container.
|
||||||
* Try again to log original exception (without DI container) in order to show the root cause of a problem.
|
* Try again to log original exception (without DI container) in order to show the root cause of a problem.
|
||||||
*/
|
*/
|
||||||
$loggerServiceFactory = new LoggerServiceFactory(new Context());
|
try {
|
||||||
$logger = $loggerServiceFactory->getLogger();
|
$loggerServiceFactory = new LoggerServiceFactory(new Context());
|
||||||
$logger->error($exception);
|
$logger = $loggerServiceFactory->getLogger();
|
||||||
|
$logger->error($exception->getTraceAsString());
|
||||||
|
} catch (Throwable $throwableWithoutPossibilityToWriteToLogFile) {
|
||||||
|
// It's not possible to log because e.g. the log file is not writable.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AvailabilityCheck::isAvailable() && AvailabilityCheck::ifDebugBarNotSet()) {
|
if (AvailabilityCheck::isAvailable() && AvailabilityCheck::ifDebugBarNotSet()) {
|
||||||
@ -65,23 +66,23 @@ class DebugBarExceptionHandler
|
|||||||
$excCollector->addThrowable($exception);
|
$excCollector->addThrowable($exception);
|
||||||
|
|
||||||
echo <<<HTML
|
echo <<<HTML
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
HTML;
|
HTML;
|
||||||
echo $debugBarComponent->getRenderer()->renderHead();
|
echo $debugBarComponent->getRenderer()->renderHead();
|
||||||
$debugBarComponent->addTimelineMeasures();
|
$debugBarComponent->addTimelineMessures();
|
||||||
echo <<<HTML
|
echo <<<HTML
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
HTML;
|
HTML;
|
||||||
AvailabilityCheck::markDebugBarAsSet();
|
AvailabilityCheck::markDebugBarAsSet();
|
||||||
echo $debugBarComponent->getRenderer()->render();
|
echo $debugBarComponent->getRenderer()->render();
|
||||||
echo <<<HTML
|
echo <<<HTML
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
HTML;
|
HTML;
|
||||||
} catch (DebugBarException|UnavailableException $e) {
|
} catch (DebugBarException|UnavailableException $e) {
|
||||||
Registry::getLogger()->error($e->getMessage());
|
Registry::getLogger()->error($e->getMessage());
|
||||||
Registry::getUtilsView()->addErrorToDisplay($e);
|
Registry::getUtilsView()->addErrorToDisplay($e);
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -20,11 +18,9 @@ namespace D3\DebugBar\Modules\Core;
|
|||||||
use D3\DebugBar\Application\Component\DebugBarComponent;
|
use D3\DebugBar\Application\Component\DebugBarComponent;
|
||||||
use D3\DebugBar\Application\Models\AvailabilityCheck;
|
use D3\DebugBar\Application\Models\AvailabilityCheck;
|
||||||
use D3\DebugBar\Application\Models\DebugBarHandler;
|
use D3\DebugBar\Application\Models\DebugBarHandler;
|
||||||
use D3\DebugBar\Application\Models\Exceptions\UnavailableException;
|
|
||||||
use D3\DebugBar\Core\DebugBarExceptionHandler;
|
use D3\DebugBar\Core\DebugBarExceptionHandler;
|
||||||
use OxidEsales\Eshop\Core\Exception\StandardException;
|
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use ReflectionException;
|
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
||||||
@ -43,11 +39,8 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
|||||||
/**
|
/**
|
||||||
* @param string|null $controllerKey
|
* @param string|null $controllerKey
|
||||||
* @param string|null $function
|
* @param string|null $function
|
||||||
* @param array|null $parameters
|
* @param array $parameters
|
||||||
* @param array|null $viewsChain
|
* @param array $viewsChain
|
||||||
*
|
|
||||||
* @throws UnavailableException
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function start($controllerKey = null, $function = null, $parameters = null, $viewsChain = null)
|
public function start($controllerKey = null, $function = null, $parameters = null, $viewsChain = null)
|
||||||
{
|
{
|
||||||
@ -62,7 +55,7 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
|||||||
if ($debugBarComponent) {
|
if ($debugBarComponent) {
|
||||||
AvailabilityCheck::markDebugBarAsSet();
|
AvailabilityCheck::markDebugBarAsSet();
|
||||||
echo $debugBarComponent->getRenderer()->renderHead();
|
echo $debugBarComponent->getRenderer()->renderHead();
|
||||||
$debugBarComponent->addTimelineMeasures();
|
$debugBarComponent->addTimelineMessures();
|
||||||
echo $debugBarComponent->getRenderer()->render();
|
echo $debugBarComponent->getRenderer()->render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -70,9 +63,7 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Throwable $exception
|
* @param Throwable $exception
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
protected function debugBarHandleException(Throwable $exception): void
|
protected function debugBarHandleException(Throwable $exception): void
|
||||||
{
|
{
|
||||||
@ -82,8 +73,6 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param StandardException $exception
|
* @param StandardException $exception
|
||||||
*
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
protected function _handleSystemException($exception)
|
protected function _handleSystemException($exception)
|
||||||
{
|
{
|
||||||
@ -92,8 +81,6 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param StandardException $exception
|
* @param StandardException $exception
|
||||||
*
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
protected function _handleCookieException($exception)
|
protected function _handleCookieException($exception)
|
||||||
{
|
{
|
||||||
@ -102,8 +89,6 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param StandardException $exception
|
* @param StandardException $exception
|
||||||
*
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
protected function _handleBaseException($exception)
|
protected function _handleBaseException($exception)
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -83,7 +81,7 @@ function stopProfile(string $sProfileName): void
|
|||||||
* @throws DebugBarException
|
* @throws DebugBarException
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function debugVar(mixed $mVar, bool $blToFile = false): void
|
function debugVar($mVar, bool $blToFile = false): void
|
||||||
{
|
{
|
||||||
if ($blToFile) {
|
if ($blToFile) {
|
||||||
$out = var_export($mVar, true);
|
$out = var_export($mVar, true);
|
||||||
@ -108,9 +106,10 @@ function debugVar(mixed $mVar, bool $blToFile = false): void
|
|||||||
/** @var MessagesCollector $messages */
|
/** @var MessagesCollector $messages */
|
||||||
$messages = $debugBarComponent->getDebugBar()->getCollector('messages');
|
$messages = $debugBarComponent->getDebugBar()->getCollector('messages');
|
||||||
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||||
|
//$location = $trace[1]['class'] . '::' . $trace[1]['function']. '(' . $trace[0]['line'] . ')';
|
||||||
$location = $trace[1]['class'] . '::' . $trace[1]['function'];
|
$location = $trace[1]['class'] . '::' . $trace[1]['function'];
|
||||||
$messages->addMessage($mVar, $location);
|
$messages->addMessage($mVar, $location);
|
||||||
} catch (UnavailableException) {
|
} catch (UnavailableException $e) {
|
||||||
dumpVar($mVar, $blToFile);
|
dumpVar($mVar, $blToFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
24
README.en.md
24
README.en.md
@ -1,7 +1,3 @@
|
|||||||

|
|
||||||
[](https://packagist.org/packages/d3/oxid-debugbar)
|
|
||||||

|
|
||||||
|
|
||||||
[](README.md)
|
[](README.md)
|
||||||
[](README.en.md)
|
[](README.en.md)
|
||||||
|
|
||||||
@ -9,7 +5,7 @@
|
|||||||
|
|
||||||
The debug bar enables the display of relevant debug information in the shop frontend.
|
The debug bar enables the display of relevant debug information in the shop frontend.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Table of content
|
## Table of content
|
||||||
|
|
||||||
@ -29,14 +25,14 @@ Please enter the following section in the `composer.json` of your project:
|
|||||||
```
|
```
|
||||||
"extra": {
|
"extra": {
|
||||||
"ajgl-symlinks": {
|
"ajgl-symlinks": {
|
||||||
"php-debugbar/php-debugbar": {
|
"maximebf/debugbar": {
|
||||||
"src/DebugBar/Resources": "source/out/debugbar"
|
"src/DebugBar/Resources": "source/out/debugbar"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enable-patching": "true",
|
"enable-patching": "true",
|
||||||
"patches": {
|
"patches": {
|
||||||
"oxid-esales/oxideshop-ce": {
|
"oxid-esales/oxideshop-ce": {
|
||||||
"Add overridable functions for advanced profiling in Debug Bar": "https://git.d3data.de/D3Public/DebugBar/raw/branch/patches/overridablefunctions_2.0.patch"
|
"Add overridable functions for advanced profiling in Debug Bar": "https://git.d3data.de/D3Public/DebugBar/raw/branch/patches/overridablefunctions.patch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,24 +41,18 @@ Please enter the following section in the `composer.json` of your project:
|
|||||||
Open a command line and navigate to the root directory of the shop (parent directory of source and vendor). Execute the following command. Adapt the path details to your installation environment.
|
Open a command line and navigate to the root directory of the shop (parent directory of source and vendor). Execute the following command. Adapt the path details to your installation environment.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
php composer require d3/oxid-debugbar:^2.0
|
php composer require d3/oxid-debugbar:^1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
If necessary, please confirm that you allow `composer-symlinker` and `composer-patches` to execute code.
|
If necessary, please confirm that you allow `composer-symlinker` and `composer-patches` to execute code.
|
||||||
|
|
||||||
```bash
|
|
||||||
rm -rf vendor/oxid-esales/oxideshop-ce
|
|
||||||
php composer install
|
|
||||||
php composer update --lock
|
|
||||||
```
|
|
||||||
|
|
||||||
Have the files of the package `oxid-esales/oxideshop-ce` overwritten.
|
Have the files of the package `oxid-esales/oxideshop-ce` overwritten.
|
||||||
|
|
||||||
Activate the module in Shopadmin under "Extensions -> Modules".
|
Activate the module in Shopadmin under "Extensions -> Modules".
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
__Please note that the DebugBar contains security-relevant information. It should therefore never be activated in a public installation__.
|
__Please note that the DebugBar contains security-relevant information. It should therefore not be activated under any circumstances in a freely accessible installation.__
|
||||||
|
|
||||||
The DebugBar displays the following tabs:
|
The DebugBar displays the following tabs:
|
||||||
- Messages
|
- Messages
|
||||||
@ -75,10 +65,8 @@ The DebugBar displays the following tabs:
|
|||||||
shows basic shop information (edition, versions, theme information)
|
shows basic shop information (edition, versions, theme information)
|
||||||
- Configuration
|
- Configuration
|
||||||
provides all configuration settings of the shop from database and config files
|
provides all configuration settings of the shop from database and config files
|
||||||
- Template variables
|
- Smarty
|
||||||
lists all variables of the template engine that are available on the current shop page
|
lists all variables of the template engine that are available on the current shop page
|
||||||
- Twig
|
|
||||||
shows Twig internal profiling (only when using the Twig Template Engine)
|
|
||||||
- Monolog
|
- Monolog
|
||||||
lists all log messages passed to the Monolog Logger
|
lists all log messages passed to the Monolog Logger
|
||||||
- Database
|
- Database
|
||||||
|
22
README.md
22
README.md
@ -1,7 +1,3 @@
|
|||||||

|
|
||||||
[](https://packagist.org/packages/d3/oxid-debugbar)
|
|
||||||

|
|
||||||
|
|
||||||
[](README.md)
|
[](README.md)
|
||||||
[](README.en.md)
|
[](README.en.md)
|
||||||
|
|
||||||
@ -9,7 +5,7 @@
|
|||||||
|
|
||||||
Die Debug Bar ermöglicht die Darstellung relevanter Debuginformationen im Shopfrontend.
|
Die Debug Bar ermöglicht die Darstellung relevanter Debuginformationen im Shopfrontend.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Inhaltsverzeichnis
|
## Inhaltsverzeichnis
|
||||||
|
|
||||||
@ -29,14 +25,14 @@ Bitte tragen Sie den folgenden Abschnitt in die `composer.json` Ihres Projektes
|
|||||||
```
|
```
|
||||||
"extra": {
|
"extra": {
|
||||||
"ajgl-symlinks": {
|
"ajgl-symlinks": {
|
||||||
"php-debugbar/php-debugbar": {
|
"maximebf/debugbar": {
|
||||||
"src/DebugBar/Resources": "source/out/debugbar"
|
"src/DebugBar/Resources": "source/out/debugbar"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enable-patching": "true",
|
"enable-patching": "true",
|
||||||
"patches": {
|
"patches": {
|
||||||
"oxid-esales/oxideshop-ce": {
|
"oxid-esales/oxideshop-ce": {
|
||||||
"Add overridable functions for advanced profiling in Debug Bar": "https://git.d3data.de/D3Public/DebugBar/raw/branch/patches/overridablefunctions_2.0.patch"
|
"Add overridable functions for advanced profiling in Debug Bar": "https://git.d3data.de/D3Public/DebugBar/raw/branch/patches/overridablefunctions.patch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,17 +41,11 @@ Bitte tragen Sie den folgenden Abschnitt in die `composer.json` Ihres Projektes
|
|||||||
Ă–ffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). FĂĽhren Sie den folgenden Befehl aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
|
Ă–ffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). FĂĽhren Sie den folgenden Befehl aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
php composer require d3/oxid-debugbar:^2.0
|
php composer require d3/oxid-debugbar:^1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Sofern nötig, bestätigen Sie bitte, dass Sie `composer-symlinker` und `composer-patches` erlauben, Code auszuführen.
|
Sofern nötig, bestätigen Sie bitte, dass Sie `composer-symlinker` und `composer-patches` erlauben, Code auszuführen.
|
||||||
|
|
||||||
```bash
|
|
||||||
rm -rf vendor/oxid-esales/oxideshop-ce
|
|
||||||
php composer install
|
|
||||||
php composer update --lock
|
|
||||||
```
|
|
||||||
|
|
||||||
Lassen Sie die Dateien des Paketes `oxid-esales/oxideshop-ce` ĂĽberschreiben.
|
Lassen Sie die Dateien des Paketes `oxid-esales/oxideshop-ce` ĂĽberschreiben.
|
||||||
|
|
||||||
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
||||||
@ -75,10 +65,8 @@ Die DebugBar stellt folgende Tabs dar:
|
|||||||
zeigt grundlegende Shopinformationen (Edition, Versionen, Themeinformationen)
|
zeigt grundlegende Shopinformationen (Edition, Versionen, Themeinformationen)
|
||||||
- Configuration
|
- Configuration
|
||||||
stellt alle Konfigurationseinstellungen des Shops aus Datenbank und config-Dateien zur VerfĂĽgung
|
stellt alle Konfigurationseinstellungen des Shops aus Datenbank und config-Dateien zur VerfĂĽgung
|
||||||
- Template Variablen
|
- Smarty
|
||||||
listet alle Variablen der Template-Engine, die auf der aktuellen Shopseite zur VerfĂĽgung stehen
|
listet alle Variablen der Template-Engine, die auf der aktuellen Shopseite zur VerfĂĽgung stehen
|
||||||
- Twig
|
|
||||||
zeigt Twig internes Profiling (nur bei Verwendung der Twig Template Engine)
|
|
||||||
- Monolog
|
- Monolog
|
||||||
listet alle an den Monolog Logger ĂĽbergebenen Lognachrichten
|
listet alle an den Monolog Logger ĂĽbergebenen Lognachrichten
|
||||||
- Database
|
- Database
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
|
1
ToDo.md
1
ToDo.md
@ -2,3 +2,4 @@
|
|||||||
|
|
||||||
- clear tpl cache button
|
- clear tpl cache button
|
||||||
- phpinfo() overview
|
- phpinfo() overview
|
||||||
|
- automatic switch between Smarty and Twig
|
||||||
|
@ -25,23 +25,34 @@
|
|||||||
"GPL-3.0-or-later"
|
"GPL-3.0-or-later"
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.0",
|
"php": ">=7.3",
|
||||||
"oxid-esales/oxideshop-ce": "7.0 - 7.2",
|
"oxid-esales/oxideshop-ce": "6.8 - 6.13",
|
||||||
"php-debugbar/php-debugbar": "^2.1.6",
|
"maximebf/debugbar": "^1.18",
|
||||||
"ajgl/composer-symlinker": "^0.3.1",
|
"ajgl/composer-symlinker": "^0.3.1",
|
||||||
"cweagans/composer-patches": "^1.7.2"
|
"cweagans/composer-patches": "^1.7.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"php": "^7.4",
|
||||||
"phpunit/phpunit" : "^9.5",
|
"phpunit/phpunit" : "^9.5",
|
||||||
"friendsofphp/php-cs-fixer": "^3.9",
|
"friendsofphp/php-cs-fixer": "^3.9",
|
||||||
"phpstan/phpstan": "^1.8"
|
"phpstan/phpstan": "^1.8"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"extra": {
|
||||||
"psr-4": {
|
"oxideshop": {
|
||||||
"D3\\DebugBar\\": ""
|
"blacklist-filter": [
|
||||||
|
"*.md",
|
||||||
|
"composer.json",
|
||||||
|
".php-cs-fixer.php",
|
||||||
|
"*.xml",
|
||||||
|
"*.neon",
|
||||||
|
"*.jpg"
|
||||||
|
],
|
||||||
|
"target-directory": "d3/debugbar"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"autoload": {
|
||||||
"php-cs-fixer": "./vendor/bin/php-cs-fixer fix --config=vendor/d3/oxid-debugbar/.php-cs-fixer.php"
|
"psr-4": {
|
||||||
|
"D3\\DebugBar\\": "../../../source/modules/d3/debugbar"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
* For the full copyright and license information, please view the LICENSE
|
||||||
*
|
* file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view
|
|
||||||
* the LICENSE file that was distributed with this source code.
|
|
||||||
*
|
*
|
||||||
* https://www.d3data.de
|
* https://www.d3data.de
|
||||||
*
|
*
|
||||||
@ -23,13 +21,14 @@ use OxidEsales\Eshop\Core\ShopControl;
|
|||||||
$sMetadataVersion = '2.1';
|
$sMetadataVersion = '2.1';
|
||||||
|
|
||||||
$sModuleId = 'd3debugbar';
|
$sModuleId = 'd3debugbar';
|
||||||
|
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module information
|
* Module information
|
||||||
*/
|
*/
|
||||||
$aModule = [
|
$aModule = [
|
||||||
'id' => $sModuleId,
|
'id' => $sModuleId,
|
||||||
'title' => '(D3) DebugBar',
|
'title' => $logo.' DebugBar',
|
||||||
'description' => [
|
'description' => [
|
||||||
'de' => '',
|
'de' => '',
|
||||||
'en' => '',
|
'en' => '',
|
||||||
|
BIN
screenshot.jpg
Normal file
BIN
screenshot.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
@ -6,12 +6,4 @@ services:
|
|||||||
Psr\Log\LoggerInterface:
|
Psr\Log\LoggerInterface:
|
||||||
class: Monolog\Logger
|
class: Monolog\Logger
|
||||||
factory: ['@OxidEsales\EshopCommunity\Internal\Framework\Logger\Factory\LoggerFactoryInterface', 'create']
|
factory: ['@OxidEsales\EshopCommunity\Internal\Framework\Logger\Factory\LoggerFactoryInterface', 'create']
|
||||||
public: true
|
public: true
|
||||||
|
|
||||||
Twig\Profiler\Profile:
|
|
||||||
class: Twig\Profiler\Profile
|
|
||||||
public: true
|
|
||||||
shared: true
|
|
||||||
|
|
||||||
Twig\Extension\ProfilerExtension:
|
|
||||||
tags: [ 'twig.extension' ]
|
|
Loading…
x
Reference in New Issue
Block a user