Skip to content

Commit b4d7ca7

Browse files
committed
Merge branch '5.x' into 5.next
2 parents d6e1bd9 + 291e9c9 commit b4d7ca7

File tree

12 files changed

+29
-11
lines changed

12 files changed

+29
-11
lines changed

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/stale@v9
19+
- uses: actions/stale@v10
2020
with:
2121
repo-token: ${{ secrets.GITHUB_TOKEN }}
2222
stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. Remove the `stale` label or comment or this will be closed in 15 days'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CakePHP DebugKit
2-
![Build Status](https://github.com/cakephp/debug_kit/actions/workflows/ci.yml/badge.svg?branch=master)
2+
[![CI](https://github.com/cakephp/debug_kit/actions/workflows/ci.yml/badge.svg)](https://github.com/cakephp/debug_kit/actions/workflows/ci.yml)
33
[![Coverage Status](https://img.shields.io/codecov/c/github/cakephp/debug_kit.svg?style=flat-square)](https://codecov.io/github/cakephp/debug_kit)
44
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.txt)
55
[![Total Downloads](https://img.shields.io/packagist/dt/cakephp/cakephp.svg?style=flat-square)](https://packagist.org/packages/cakephp/debug_kit)

docs.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Generate the HTML output.
22
FROM ghcr.io/cakephp/docs-builder as builder
33

4-
RUN pip install git+https://github.com/sphinx-contrib/video.git@master
4+
RUN pip install sphinxcontrib-video
55

66
# Copy entire repo in with .git so we can build all versions in one image.
77
COPY docs /data/docs
@@ -12,7 +12,7 @@ RUN cd /data/docs-builder \
1212
&& make website LANGS="$LANGS" SOURCE=/data/docs DEST=/data/website \
1313
# Move media files into the output directory so video elements work.
1414
&& mkdir -p /data/website/html/_static \
15-
&& cp /data/docs/static/* /data/website/html/_static/
15+
&& cp /data/docs/_static/* /data/website/html/_static/
1616

1717
# Build a small nginx container with just the static site in it.
1818
FROM ghcr.io/cakephp/docs-builder:runtime as runtime

docs/en/index.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,23 @@ Helper Functions
323323
* ``sql()`` Dumps out the SQL from an ORM query.
324324
* ``sqld()`` Dumps out the SQL from an ORM query, and exits.
325325

326+
Using DebugTimer
327+
----------------
328+
329+
Use the `DebugTimer` to measure parts of the code that are not captured by the default timers,
330+
such as portions of a controller action, service logic or view rendering::
331+
332+
use DebugKit\DebugTimer;
333+
334+
public function view($id)
335+
{
336+
DebugTimer::start('load_article', 'Fetching article from database');
337+
// Code to measure the execution time for
338+
DebugTimer::stop('load_article');
339+
}
340+
341+
When that request finishes, the Timer panel will include the custom timers.
342+
326343
Tracing query execution
327344
=======================
328345

phpcs.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0"?>
22
<ruleset name="CakePHP DebugKit">
3-
<config name="installed_paths" value="../../cakephp/cakephp-codesniffer" />
3+
<file>src/</file>
4+
<file>tests/</file>
45

5-
<rule ref="CakePHP" />
6+
<rule ref="CakePHP"/>
7+
8+
<arg value="s"/>
69
</ruleset>

src/Controller/MailPreviewController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ public function sent(string $panelId, string $number): ?ResponseInterface
6969
/** @var \DebugKit\Model\Entity\Panel $panel */
7070
$panel = $this->fetchTable('DebugKit.Panels')->get($panelId);
7171

72-
// @codingStandardsIgnoreStart
72+
// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
7373
$content = @unserialize($panel->content);
74-
// @codingStandardsIgnoreEnd
7574

7675
if (empty($content['emails'][$number])) {
7776
throw new NotFoundException('No emails found in this request');

0 commit comments

Comments
 (0)