Skip to content

Commit

Permalink
Merge pull request #1004 from cakephp/fix-empty-deprecations
Browse files Browse the repository at this point in the history
Add empty state for deprecations
  • Loading branch information
markstory authored May 28, 2024
2 parents fd37f04 + 674524d commit a38d33e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/element/deprecations_panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

use function Cake\Core\h;

$hasAny = count($app) + count($plugins) + count($cake) + count($vendor);

$printer = function ($section, $data) {
?>
<h3><?= h(ucfirst($section)) ?> </h3>
Expand All @@ -39,7 +41,11 @@
}
?>
<div class="c-deprecations-panel">
<?php
<?php if ($hasAny) : ?>
<p class="c-flash c-flash--info">No deprecations</p>
<?php
endif;

if (count($app)) :
$printer('app', $app);
endif;
Expand Down

0 comments on commit a38d33e

Please sign in to comment.