Skip to content

Commit 548787f

Browse files
authored
Merge pull request #1 from ingenerator/php7.2-compatibility
Drop support for php5 and test on php7.2
2 parents ca6563b + d72074d commit 548787f

File tree

8 files changed

+14
-9
lines changed

8 files changed

+14
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/bin
44
/koharness_bootstrap.php
55
composer.lock
6+
/.idea

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
language: php
22

33
php:
4-
- 5.5
5-
- 5.6
4+
- 7.2
65

76
before_script:
87
- composer install --prefer-dist
98
- bin/koharness
109

1110
script:
1211
- bin/phpspec run
12+
13+
notifications:
14+
email: false

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## Unreleased
66

7+
## 1.0.0 / 2019-04-03
78
* Drop support for PHP <=5.5
9+
* Ensure support on php7.2
810

911
## 0.1.1 / 2017-03-02
1012

classes/Ingenerator/Pigeonhole/Message/KohanaMessage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ protected function lookup_message($message_file, $path, $params)
5959
$message = \Kohana::message($message_file, $path);
6060

6161
if ($message) {
62-
return strtr($message, $params);
62+
return \strtr($message, $params);
6363
} else {
6464
$full_path = $message_file.":".$path;
6565
\Kohana::$log->add(\Log::WARNING, "Unknown message - ".$full_path);
66-
return $full_path.' '.json_encode($params);
66+
return $full_path.' '.\json_encode($params);
6767
}
6868
}
6969
}

classes/Ingenerator/Pigeonhole/Message/ValidationMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ValidationMessage extends Message {
3030
public function __construct(\Validation $validation, $message_file, $title = 'Sorry, your request could not be processed', $class = Message::DANGER) {
3131
$this->title = $title;
3232
$this->class = $class;
33-
$this->message = implode(PHP_EOL, $validation->errors($message_file));
33+
$this->message = \implode(PHP_EOL, $validation->errors($message_file));
3434
}
3535

3636
}

classes/Ingenerator/Pigeonhole/Pigeonhole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function add(Message $message)
5555
*/
5656
public function has_messages()
5757
{
58-
return (count($this->peek()) > 0);
58+
return (\count($this->peek()) > 0);
5959
}
6060

6161
/**

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.5",
16+
"php": "^7.2",
1717
"kohana/core": "3.3.*"
1818
},
1919
"require-dev": {

spec/Ingenerator/Pigeonhole/View/Pigeonhole/MessagesSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ protected function given_messages($pigeonhole, $msg)
7171
{
7272
$pigeonhole->has_messages()->willReturn(TRUE);
7373

74-
$messages = func_get_args();
75-
array_shift($messages);
74+
$messages = \func_get_args();
75+
\array_shift($messages);
7676
$pigeonhole->clear()->willReturn($messages);
7777
}
7878
}

0 commit comments

Comments
 (0)