Skip to content

Commit 6b740c2

Browse files
authored
Merge pull request #716 from cakephp/dereuromark-patch-1
php74 stable
2 parents 6bf3ac5 + 9dbd3d0 commit 6b740c2

File tree

9 files changed

+17
-24
lines changed

9 files changed

+17
-24
lines changed

.travis.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ language: php
33
php:
44
- 5.6
55
- 7.0
6-
- 7.3
7-
- 7.4snapshot
6+
- 7.4
87

98
services:
109
- postgresql
@@ -21,18 +20,15 @@ env:
2120
matrix:
2221
fast_finish: true
2322
include:
24-
- php: 7.1
23+
- php: 7.3
2524
env: PHPCS=1
2625

27-
- php: 7.1
26+
- php: 7.3
2827
env: CODECOVERAGE=1 DEFAULT=0
2928

3029
- php: 5.6
3130
env: PREFER_LOWEST=1
3231

33-
allow_failures:
34-
- php: 7.4snapshot
35-
3632
install:
3733
- sh -c "if [ '$PREFER_LOWEST' != '1' ]; then composer install --prefer-dist --no-interaction; fi"
3834
- sh -c "if [ '$PREFER_LOWEST' = '1' ]; then composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi"
@@ -43,9 +39,9 @@ before_script:
4339

4440
script:
4541
- sh -c "if [ '$DEFAULT' = '1' ]; then [ "$(find . \( -path './vendor' \) -prune -o -type f \( -name '*.ctp' -o -name '*.php' \) -print0 | xargs -0 --no-run-if-empty -L1 -i'{}' php -l '{}' | grep -vc 'No syntax errors')" -eq 0 ]; fi"
46-
- sh -c "if [ '$DEFAULT' = '1' ]; then ./vendor/bin/phpunit; fi"
42+
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; fi"
4743

48-
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
44+
- sh -c "if [ '$PHPCS' = '1' ]; then composer cs-check; fi"
4945

5046
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml || true; fi"
5147
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"

src/Model/Entity/Panel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class Panel extends Entity
3838
* Over certain sizes PDO will return file handles.
3939
* For backwards compatibility and consistency we smooth over that difference here.
4040
*
41+
* @param mixed $content Content
4142
* @return string
4243
*/
4344
protected function _getContent($content)

src/Routing/Filter/DebugBarFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function beforeDispatch(Event $event)
128128
* Save the toolbar data.
129129
*
130130
* @param \Cake\Event\Event $event The afterDispatch event.
131-
* @return \Cake\Http\Response|null Modifed response or null
131+
* @return \Psr\Http\Message\ResponseInterface|void Modified response or null
132132
*/
133133
public function afterDispatch(Event $event)
134134
{

src/Shell/BenchmarkShell.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
* functionally similar to Apache AB
2424
*
2525
* @since DebugKit 1.0
26-
* @todo Print/export time detail information
27-
* @todo Export/graphing of data to .dot format for graphviz visualization
28-
* @todo Make calculated results round to leading significant digit position of std dev.
2926
*/
3027
class BenchmarkShell extends Shell
3128
{

src/View/Helper/TidyHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public function process($html = '', &$out = '')
7373
if (isset($markup[$line - 1])) {
7474
$string .= h($markup[$line - 1]);
7575
}
76+
// phpcs:ignore
7677
$string .= '<strong>' . h(@$markup[$line]) . '</strong>';
7778
if (isset($markup[$line + 1])) {
7879
$string .= h($markup[$line + 1]);

src/View/Helper/ToolbarHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class ToolbarHelper extends Helper
4747
* set sorting of values
4848
*
4949
* @param bool $sort Whether or not sort values by key
50+
* @return void
5051
*/
5152
public function setSort($sort)
5253
{

tests/TestCase/Panel/VariablesPanelTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,13 @@ public function testShutdown()
107107
});
108108
$this->assertRegExp('/^\[stream\] Resource id #\d+$/', $output['content']['resource']);
109109
$this->assertInternalType('array', $output['content']['unserializableDebugInfo']);
110+
if (version_compare(PHP_VERSION, '7.4.0', '>=')) {
111+
$expectedErrorMessage = "Unserializable object - stdClass. Error: Serialization of 'PDO' is not allowed";
112+
} else {
113+
$expectedErrorMessage = 'Unserializable object - stdClass. Error: You cannot serialize or unserialize PDO instances';
114+
}
110115
$this->assertStringStartsWith(
111-
'Unserializable object - stdClass. Error: You cannot serialize or unserialize PDO instances',
116+
$expectedErrorMessage,
112117
$output['content']['unserializableDebugInfo']['unserializable']
113118
);
114119
$this->assertStringStartsWith(

tests/TestCase/Routing/Filter/DebugBarFilterTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,7 @@ public function testAfterDispatchIgnoreStreamBodies()
135135
$bar = new DebugBarFilter($this->events, []);
136136
$event = new Event('Dispatcher.afterDispatch', $bar, compact('request', 'response'));
137137
$bar->afterDispatch($event);
138-
if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
139-
$this->assertEquals('I am a teapot!', $response->getBody());
140-
} else {
141-
$this->assertInstanceOf('Closure', $response->getBody());
142-
}
138+
$this->assertEquals('I am a teapot!', $response->getBody());
143139
}
144140

145141
/**

tests/TestCase/ToolbarServiceTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,7 @@ public function testInjectScriptsStreamBodies()
306306

307307
$result = $bar->injectScripts($row, $response);
308308
$this->assertInstanceOf('Cake\Http\Response', $result);
309-
if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
310-
$this->assertEquals('I am a teapot!', $response->getBody());
311-
} else {
312-
$this->assertInstanceOf('Closure', $response->getBody());
313-
}
309+
$this->assertEquals('I am a teapot!', $response->getBody());
314310
}
315311

316312
/**

0 commit comments

Comments
 (0)