Skip to content

Commit

Permalink
Stop lying that CAKE_VERSION is a constant.
Browse files Browse the repository at this point in the history
Tweak Environment panel's display.
  • Loading branch information
ADmad committed Jul 2, 2024
1 parent 5116f54 commit a44559a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/Panel/EnvironmentPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
namespace DebugKit\Panel;

use Cake\Core\Configure;
use Cake\Error\Debugger;
use Cake\Event\EventInterface;
use DebugKit\DebugInclude;
Expand Down Expand Up @@ -74,7 +73,6 @@ protected function _prepare(): array
'CAKE_CORE_INCLUDE_PATH' => CAKE_CORE_INCLUDE_PATH,
'CONFIG' => CONFIG,
'CORE_PATH' => CORE_PATH,
'CAKE_VERSION' => Configure::version(),
'DS' => DS,
'LOGS' => LOGS,
'ROOT' => ROOT,
Expand Down
13 changes: 8 additions & 5 deletions templates/element/environment_panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @link https://cakephp.org CakePHP(tm) Project
* @license https://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Core\Configure;
use Cake\Error\Debugger;
use function Cake\Core\h;

Expand All @@ -31,7 +32,9 @@
*/
?>
<div class="c-environment-panel">
<h2>Application Constants</h2>
<h2>CakePHP Version: <?= Configure::version() ?></h2>

<h3>Application Constants</h3>

<?php if (!empty($app)) : ?>
<table class="c-debug-table">
Expand All @@ -56,7 +59,7 @@
</div>
<?php endif; ?>

<h2>CakePHP Constants</h2>
<h3>CakePHP Constants</h3>

<?php if (!empty($cake)) : ?>
<table class="c-debug-table">
Expand All @@ -81,7 +84,7 @@
</div>
<?php endif; ?>

<h2>INI Environment</h2>
<h3>INI Environment</h3>

<?php if (!empty($ini)) : ?>
<table class="c-debug-table">
Expand All @@ -106,7 +109,7 @@
</div>
<?php endif; ?>

<h2>PHP Environment</h2>
<h3>PHP Environment</h3>

<?php if (!empty($php)) : ?>
<table class="c-debug-table">
Expand All @@ -131,7 +134,7 @@
</div>
<?php endif; ?>

<h2>Included Files</h2>
<h3>Included Files</h3>

<h4>Include Paths</h4>
<?= $this->Toolbar->dumpNodes($includePaths) ?>
Expand Down

0 comments on commit a44559a

Please sign in to comment.