Skip to content

Commit c088da4

Browse files
committed
Merge pull request #51 from Flowpack/php55
[TASK] Use PHP 5.5 as minimum requirement
2 parents 28ca43d + 430c7c3 commit c088da4

2 files changed

Lines changed: 2 additions & 20 deletions

File tree

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer/NodeIndexer.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,6 @@
2121
use TYPO3\TYPO3CR\Domain\Service\NodeTypeManager;
2222
use TYPO3\TYPO3CR\Search\Indexer\AbstractNodeIndexer;
2323

24-
/*
25-
* Yes, dirty as hell. But the function is just too helpful...
26-
* json_last_error_msg() has been added in PHP 5.5
27-
*/
28-
if (!function_exists('json_last_error_msg')) {
29-
function json_last_error_msg() {
30-
static $errors = array(
31-
JSON_ERROR_NONE => NULL,
32-
JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
33-
JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch',
34-
JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
35-
JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON',
36-
JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded'
37-
);
38-
$error = json_last_error();
39-
40-
return array_key_exists($error, $errors) ? $errors[$error] : "Unknown error ({$error})";
41-
}
42-
}
43-
4424
/**
4525
* Indexer for Content Repository Nodes. Triggered from the NodeIndexingManager.
4626
*

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"homepage": "http://flowpack.org/",
66
"license": ["LGPL-3.0+"],
77
"require": {
8+
"php": ">=5.5.0",
9+
810
"flowpack/elasticsearch": "*",
911
"typo3/eel": "*",
1012
"typo3/typo3cr-search": "*"

0 commit comments

Comments
 (0)