Skip to content

Commit 69e7b41

Browse files
committed
Merge branch '4.x' into 5.x-merge
# Conflicts: # composer.json # phpcs.xml
2 parents e4f5b56 + e6104bd commit 69e7b41

8 files changed

Lines changed: 24 additions & 12 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*.phar binary
2424
*.woff binary
2525
*.woff2 binary
26+
*.ttc binary
2627
*.ttf binary
2728
*.otf binary
2829
*.eot binary

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
uses: ramsey/composer-install@v2
7070

7171
- name: Run PHP CodeSniffer
72-
run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr
72+
run: vendor/bin/phpcs --report=checkstyle | cs2pr
7373

7474
- name: Run phpstan
7575
if: always()

.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@v7
19+
- uses: actions/stale@v8
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'

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"@test",
4343
"@cs-check"
4444
],
45-
"cs-check": "phpcs --colors -p src/ tests/",
46-
"cs-fix": "phpcbf --colors -p src/ tests/",
45+
"cs-check": "phpcs --colors -p",
46+
"cs-fix": "phpcbf --colors -p",
4747
"stan": "phpstan analyse",
4848
"test": "phpunit --colors=always"
4949
},

config/routes.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
use Cake\Routing\Route\DashedRoute;
2525
use Cake\Routing\RouteBuilder;
2626

27-
return static function (RouteBuilder $routes) {
27+
/*
28+
* This file is loaded in the context of the `Application` class.
29+
* So you can use `$this` to reference the application class instance
30+
* if required.
31+
*/
32+
return function (RouteBuilder $routes): void {
2833
/*
2934
* The default class to use for all routes
3035
*
@@ -44,7 +49,7 @@
4449
*/
4550
$routes->setRouteClass(DashedRoute::class);
4651

47-
$routes->scope('/', function (RouteBuilder $builder) {
52+
$routes->scope('/', function (RouteBuilder $builder): void {
4853
/*
4954
* Here, we are connecting '/' (base path) to a controller called 'Pages',
5055
* its action called 'display', and we pass a param to select the view file
@@ -78,7 +83,7 @@
7883
* open new scope and define routes there.
7984
*
8085
* ```
81-
* $routes->scope('/api', function (RouteBuilder $builder) {
86+
* $routes->scope('/api', function (RouteBuilder $builder): void {
8287
* // No $builder->applyMiddleware() here.
8388
*
8489
* // Parse specified extensions from URLs

phpcs.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
77
<exclude-pattern>*/src/Controller/*</exclude-pattern>
88
</rule>
9+
10+
<file>src/</file>
11+
<file>tests/</file>
912
</ruleset>

templates/Error/error400.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@
2525
</p>
2626
<?php endif; ?>
2727
<?php if (!empty($error->params)) : ?>
28-
<strong>SQL Query Params: </strong>
29-
<?php Debugger::dump($error->params) ?>
28+
<strong>SQL Query Params: </strong>
29+
<?php Debugger::dump($error->params) ?>
3030
<?php endif; ?>
31-
<?= $this->element('auto_table_warning') ?>
31+
3232
<?php
33+
echo $this->element('auto_table_warning');
3334

34-
$this->end();
35+
$this->end();
3536
endif;
3637
?>
3738
<h2><?= h($message) ?></h2>

templates/Error/error500.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
<?php Debugger::dump($error->params) ?>
3030
<?php endif; ?>
3131
<?php if ($error instanceof Error) : ?>
32+
<?php $file = $error->getFile() ?>
33+
<?php $line = $error->getLine() ?>
3234
<strong>Error in: </strong>
33-
<?= sprintf('%s, line %s', str_replace(ROOT, 'ROOT', $error->getFile()), $error->getLine()) ?>
35+
<?= $this->Html->link(sprintf('%s, line %s', Debugger::trimPath($file), $line), Debugger::editorUrl($file, $line)); ?>
3436
<?php endif; ?>
3537
<?php
3638
echo $this->element('auto_table_warning');

0 commit comments

Comments
 (0)