From b1675d4df12fc342548282cde870a8a36d3418c5 Mon Sep 17 00:00:00 2001 From: GuySartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Wed, 26 Jan 2022 15:37:07 +1300 Subject: [PATCH 1/3] FIX Separate out all command components so Solr_Reindex works in dev mode. --- .../Reindex/Handlers/SolrReindexImmediateHandler.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php b/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php index ca610cd..c0ba343 100644 --- a/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php +++ b/src/Solr/Reindex/Handlers/SolrReindexImmediateHandler.php @@ -77,15 +77,12 @@ class SolrReindexImmediateHandler extends SolrReindexBase $indexClass = get_class($indexInstance); // Build script parameters - $indexClassEscaped = $indexClass; $statevar = json_encode($state); if (strpos(PHP_OS, "WIN") !== false) { $statevar = '"' . str_replace('"', '\\"', $statevar) . '"'; } else { $statevar = "'" . $statevar . "'"; - $class = addslashes($class); - $indexClassEscaped = addslashes($indexClass); } $php = Environment::getEnv('SS_PHP_BIN') ?: Config::inst()->get(static::class, 'php_bin'); @@ -93,11 +90,12 @@ class SolrReindexImmediateHandler extends SolrReindexBase // Build script line $frameworkPath = ModuleLoader::getModule('silverstripe/framework')->getPath(); $scriptPath = sprintf("%s%scli-script.php", $frameworkPath, DIRECTORY_SEPARATOR); - $scriptTask = "{$php} {$scriptPath} dev/tasks/{$taskName}"; $cmd = [ - $scriptTask, - "index={$indexClassEscaped}", + $php, + $scriptPath, + "dev/tasks/{$taskName}", + "index={$indexClass}", "class={$class}", "group={$group}", "groups={$groups}", From 767fa29bab829a0ad3903620b88b53b1d409f447 Mon Sep 17 00:00:00 2001 From: GuySartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Wed, 2 Feb 2022 10:15:16 +1300 Subject: [PATCH 2/3] DOC Change "SilverStripe" to "Silverstripe" in readme (#307) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bab5c3e..7ae6499 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![codecov](https://codecov.io/gh/silverstripe/silverstripe-fulltextsearch/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-fulltextsearch) [![SilverStripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/) -Adds support for fulltext search engines like Sphinx and Solr to SilverStripe CMS. +Adds support for fulltext search engines like Sphinx and Solr to Silverstripe CMS. Compatible with PHP 7.2 ## Important notes when upgrading to fulltextsearch 3.7.0+ @@ -86,9 +86,9 @@ it's recommended you update your implementation to call `SearchableService::isVi ## Requirements -* SilverStripe 4.0+ +* Silverstripe 4.0+ -**Note:** For SilverStripe 3.x, please use the [2.x release line](https://github.com/silverstripe/silverstripe-fulltextsearch/tree/2). +**Note:** For Silverstripe 3.x, please use the [2.x release line](https://github.com/silverstripe/silverstripe-fulltextsearch/tree/2). ## Documentation From eac962d103e7b7ccd3cd4653129b7526d9cc8a90 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 10 Feb 2022 16:44:14 +1300 Subject: [PATCH 3/3] DEP Set PHP 7.4 as the minimum version --- .travis.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e947f47..d6f6bfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ env: jobs: include: - - php: 7.3 + - php: 7.4 env: - DB=MYSQL - REQUIRE_INSTALLER=4.x-dev diff --git a/composer.json b/composer.json index 58c46b3..7bf37ff 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "silverstripe/framework": "^4.10", "monolog/monolog": "~1.15", "ptcinc/solr-php-client": "^1.0",