From e1192004c6a71618bf0320a05e8a67e5fd3283f4 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sun, 12 Feb 2023 23:11:47 +0100 Subject: [PATCH 1/7] 4.x: fix ci --- tests/TestCase/DebugSqlTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestCase/DebugSqlTest.php b/tests/TestCase/DebugSqlTest.php index 2c128422..11ad4c40 100644 --- a/tests/TestCase/DebugSqlTest.php +++ b/tests/TestCase/DebugSqlTest.php @@ -78,9 +78,9 @@ public function testSqlHtml()
%s (line %d)
-SELECT
-  panels.id AS %s
-FROM
+SELECT 
+  panels.id AS %s 
+FROM 
   panels panels
 
From 368e6b872c366ca5a1f252f3b17fac4cec11069e Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sat, 18 Mar 2023 15:01:34 -0400 Subject: [PATCH 2/7] Update base image to ghcr.io image. --- docs.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs.Dockerfile b/docs.Dockerfile index cb30b3ed..f5613cac 100644 --- a/docs.Dockerfile +++ b/docs.Dockerfile @@ -1,5 +1,5 @@ # Generate the HTML output. -FROM markstory/cakephp-docs-builder as builder +FROM ghcr.io/cakephp/docs-builder as builder RUN pip install git+https://github.com/sphinx-contrib/video.git@master @@ -15,7 +15,7 @@ RUN cd /data/docs-builder \ && cp /data/docs/static/* /data/website/html/_static/ # Build a small nginx container with just the static site in it. -FROM markstory/cakephp-docs-builder:runtime as runtime +FROM ghcr.io/cakephp/docs-builder:runtime as runtime # Configure search index script ENV LANGS="en fr ja pt" From a13b9834c7d2fcb19bebac5f10fd360a2e909b76 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Tue, 25 Apr 2023 19:49:03 +0200 Subject: [PATCH 3/7] update CI config --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d07e780..f5a0d098 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ permissions: jobs: testsuite-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -98,7 +98,7 @@ jobs: cs-stan: name: Coding Standard & Static Analysis - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 From c4f7664d6768bdbfc8854a02c2507d31c30e1a24 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Tue, 25 Apr 2023 20:08:25 +0200 Subject: [PATCH 4/7] add global functions to tests bootstrap --- tests/bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index ceb4e397..a47c0e3a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -42,6 +42,7 @@ define('LOGS', TMP); require_once CORE_PATH . 'config/bootstrap.php'; +require_once CAKE . 'functions.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); From 487bee4594b66ebe81638b9f84f15c325ef562fe Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Tue, 25 Apr 2023 20:18:46 +0200 Subject: [PATCH 5/7] fix cs --- src/Cache/Engine/DebugEngine.php | 1 + src/DebugPanel.php | 2 ++ tests/TestCase/Controller/RequestsControllerTest.php | 2 +- tests/TestCase/ToolbarServiceTest.php | 8 -------- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Cache/Engine/DebugEngine.php b/src/Cache/Engine/DebugEngine.php index 54ab6b9e..46a839f5 100644 --- a/src/Cache/Engine/DebugEngine.php +++ b/src/Cache/Engine/DebugEngine.php @@ -336,6 +336,7 @@ public function __toString(): string { /** @psalm-suppress RedundantPropertyInitializationCheck */ if (isset($this->_engine)) { + // phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable [$ns, $class] = namespaceSplit(get_class($this->_engine)); return str_replace('Engine', '', $class); diff --git a/src/DebugPanel.php b/src/DebugPanel.php index 04673cc8..567b066f 100644 --- a/src/DebugPanel.php +++ b/src/DebugPanel.php @@ -47,6 +47,7 @@ class DebugPanel implements EventListenerInterface */ public function title(): string { + // phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable [$ns, $name] = namespaceSplit(static::class); $name = substr($name, 0, strlen('Panel') * -1); @@ -60,6 +61,7 @@ public function title(): string */ public function elementName(): string { + // phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable [$ns, $name] = namespaceSplit(static::class); if ($this->plugin) { return $this->plugin . '.' . Inflector::underscore($name); diff --git a/tests/TestCase/Controller/RequestsControllerTest.php b/tests/TestCase/Controller/RequestsControllerTest.php index 783ec815..eb7580b5 100644 --- a/tests/TestCase/Controller/RequestsControllerTest.php +++ b/tests/TestCase/Controller/RequestsControllerTest.php @@ -57,7 +57,7 @@ public function setUp(): void public function testView() { $request = $this->makeRequest(); - $panel = $this->makePanel($request); + $this->makePanel($request); $this->configRequest(['headers' => ['Accept' => 'application/json']]); $this->get("/debug-kit/toolbar/{$request->id}"); diff --git a/tests/TestCase/ToolbarServiceTest.php b/tests/TestCase/ToolbarServiceTest.php index d06f69dc..c2b74b2d 100644 --- a/tests/TestCase/ToolbarServiceTest.php +++ b/tests/TestCase/ToolbarServiceTest.php @@ -322,10 +322,6 @@ public function testInjectScriptsLastBodyTag() */ public function testInjectScriptsFileBodies() { - $request = new Request([ - 'url' => '/articles', - 'params' => ['plugin' => null], - ]); $response = new Response([ 'statusCode' => 200, 'type' => 'text/html', @@ -348,10 +344,6 @@ public function testInjectScriptsFileBodies() */ public function testInjectScriptsStreamBodies() { - $request = new Request([ - 'url' => '/articles', - 'params' => ['plugin' => null], - ]); $response = new Response([ 'statusCode' => 200, 'type' => 'text/html', From 8a7980057e7e4c4297e1f4e6b992c251f75f3338 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Thu, 27 Apr 2023 11:16:48 +0200 Subject: [PATCH 6/7] use Core/functions_global.php instead of namespaced functions --- tests/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index a47c0e3a..72483379 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -42,7 +42,7 @@ define('LOGS', TMP); require_once CORE_PATH . 'config/bootstrap.php'; -require_once CAKE . 'functions.php'; +require_once CAKE . 'Core/functions_global.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); From cbb9321df0338841526ab0b40ee076d726787376 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Thu, 27 Apr 2023 11:19:58 +0200 Subject: [PATCH 7/7] fix stan --- tests/bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 72483379..e708ffdf 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -43,6 +43,7 @@ require_once CORE_PATH . 'config/bootstrap.php'; require_once CAKE . 'Core/functions_global.php'; +require_once CAKE . 'Collection/functions_global.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8');