From 0553ce57293530377ac8453e3d51e08468ce57c0 Mon Sep 17 00:00:00 2001 From: Magnus Bengtsson Date: Mon, 15 Apr 2019 08:31:29 +1200 Subject: [PATCH 1/4] Added php 7.2 support --- README.md | 1 + _config.php | 4 ++++ code/search/SearchIndex.php | 2 +- code/search/SearchUpdater.php | 2 +- code/solr/Solr.php | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a5389d3..4739d40 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-fulltextsearch.png?branch=master)](http://travis-ci.org/silverstripe/silverstripe-fulltextsearch) Adds support for fulltext search engines like Sphinx and Solr to SilverStripe CMS. +Compatible with PHP 7.2 ## Maintainer Contact diff --git a/_config.php b/_config.php index c9e422a..01508fb 100644 --- a/_config.php +++ b/_config.php @@ -1,5 +1,9 @@ addFulltextField($field); } diff --git a/code/search/SearchUpdater.php b/code/search/SearchUpdater.php index 12e0740..2e5f6f6 100644 --- a/code/search/SearchUpdater.php +++ b/code/search/SearchUpdater.php @@ -12,7 +12,7 @@ * * TODO: The way we bind in is awful hacky. */ -class SearchUpdater extends Object +class SearchUpdater extends SS_Object { /** * Replace the database object with a subclass that captures all manipulations and passes them to us diff --git a/code/solr/Solr.php b/code/solr/Solr.php index b93d044..ec8e12b 100644 --- a/code/solr/Solr.php +++ b/code/solr/Solr.php @@ -117,7 +117,7 @@ class Solr $options = self::solr_options(); if (!self::$service_singleton) { - self::$service_singleton = Object::create( + self::$service_singleton = SS_Object::create( $options['service'], $options['host'], $options['port'], $options['path'] ); } From ab8e316f5bea087a451131b5d01d7aeb673e3be8 Mon Sep 17 00:00:00 2001 From: Magnus Bengtsson Date: Mon, 15 Apr 2019 08:31:29 +1200 Subject: [PATCH 2/4] Added php 7.2 support --- README.md | 1 + _config.php | 4 ++++ code/search/SearchIndex.php | 2 +- code/search/SearchUpdater.php | 2 +- code/solr/Solr.php | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a5389d3..4739d40 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-fulltextsearch.png?branch=master)](http://travis-ci.org/silverstripe/silverstripe-fulltextsearch) Adds support for fulltext search engines like Sphinx and Solr to SilverStripe CMS. +Compatible with PHP 7.2 ## Maintainer Contact diff --git a/_config.php b/_config.php index c9e422a..01508fb 100644 --- a/_config.php +++ b/_config.php @@ -1,5 +1,9 @@ addFulltextField($field); } diff --git a/code/search/SearchUpdater.php b/code/search/SearchUpdater.php index 12e0740..2e5f6f6 100644 --- a/code/search/SearchUpdater.php +++ b/code/search/SearchUpdater.php @@ -12,7 +12,7 @@ * * TODO: The way we bind in is awful hacky. */ -class SearchUpdater extends Object +class SearchUpdater extends SS_Object { /** * Replace the database object with a subclass that captures all manipulations and passes them to us diff --git a/code/solr/Solr.php b/code/solr/Solr.php index b93d044..ec8e12b 100644 --- a/code/solr/Solr.php +++ b/code/solr/Solr.php @@ -117,7 +117,7 @@ class Solr $options = self::solr_options(); if (!self::$service_singleton) { - self::$service_singleton = Object::create( + self::$service_singleton = SS_Object::create( $options['service'], $options['host'], $options['port'], $options['path'] ); } From f2e3db6586daae035f7371be00fe63b85e7f7a35 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 23 Jul 2019 12:31:10 +0200 Subject: [PATCH 3/4] NEW Bump minimum PHP to 7.1, SilverStripe to 3.7, replace PHP 7.2 incompatible code --- .travis.yml | 26 ++++++++++++-------------- README.md | 2 +- _config.php | 4 ---- code/search/SearchIndex.php | 6 ++++-- composer.json | 11 ++++------- 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26029fb..b6751d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,22 +2,20 @@ language: php -sudo: false +dist: trusty matrix: include: - - php: 5.4 - env: DB=PGSQL CORE_RELEASE=3.1 - - php: 5.5 - env: DB=MYSQL CORE_RELEASE=3.2 - - php: 5.6 - env: DB=MYSQL CORE_RELEASE=3.3 SUBSITES=1 - - php: 5.6 - env: DB=MYSQL CORE_RELEASE=3.3 QUEUEDJOBS=1 - - php: 7.1 - env: DB=MYSQL CORE_RELEASE=3.6 - - php: 7.1 - env: DB=MYSQL CORE_RELEASE=3 + - php: '7.1' + env: DB=PGSQL CORE_RELEASE=3.7 + - php: '7.1' + env: DB=MYSQL CORE_RELEASE=3.7 + - php: '7.2' + env: DB=MYSQL CORE_RELEASE=3.7 SUBSITES=1 + - php: '7.2' + env: DB=MYSQL CORE_RELEASE=3.7 QUEUEDJOBS=1 + - php: '7.3' + env: DB=MYSQL CORE_RELEASE=3.7 before_script: - composer self-update || true @@ -28,4 +26,4 @@ before_script: - cd ~/builds/ss script: - - vendor/bin/phpunit fulltextsearch/tests/ + - vendor/bin/phpunit fulltextsearch/tests diff --git a/README.md b/README.md index 4739d40..e8d3f0b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Compatible with PHP 7.2 ## Requirements -* SilverStripe 3.1+ +* SilverStripe 3.7+ (see previous 2.x releases for earlier SilverStripe 3 support, and 3.x for SilverStripe 4) * (optional) [silverstripe-phockito](https://github.com/hafriedlander/silverstripe-phockito) (for testing) ## Documentation diff --git a/_config.php b/_config.php index 01508fb..c9e422a 100644 --- a/_config.php +++ b/_config.php @@ -1,9 +1,5 @@ Date: Mon, 12 Aug 2019 16:47:30 +1200 Subject: [PATCH 4/4] FIX Restore PHP 5.6 support --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 9f30587..8031856 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,6 @@ } ], "require": { - "php": "^7.1", "silverstripe/framework": "~3.7", "monolog/monolog": "~1.15" },