pantheon-systems / solr-power

A WordPress plugin to connect to Pantheon's Apache Solr search infrastructure, or your own!
https://wordpress.org/plugins/solr-power/
GNU General Public License v2.0
126 stars 61 forks source link

Update Composer dependencies to latest #379

Closed danielbachhuber closed 6 years ago

danielbachhuber commented 6 years ago

Solarium is now at 4.1.0

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 16 updates, 2 removals
  - Removing symfony/debug (v3.4.12)
  - Removing psr/log (1.0.2)
  - Updating symfony/event-dispatcher (v3.4.12 => v4.1.4):  Checking out bfb30c2ad3
  - Updating solarium/solarium (3.8.1 => 4.1.0): Downloading (100%)
  - Updating symfony/polyfill-ctype (v1.8.0 => v1.9.0): Loading from cache
  - Updating symfony/yaml (v3.4.12 => v4.1.4): Loading from cache
  - Updating symfony/polyfill-mbstring (v1.8.0 => v1.9.0): Loading from cache
  - Updating symfony/translation (v3.4.12 => v4.1.4): Loading from cache
  - Updating symfony/dependency-injection (v3.4.12 => v4.1.4): Loading from cache
  - Updating symfony/console (v3.4.12 => v4.1.4): Loading from cache
  - Updating symfony/filesystem (v3.4.12 => v4.1.4): Loading from cache
  - Updating symfony/config (v3.4.12 => v4.1.4): Loading from cache
  - Updating symfony/class-loader (v3.4.12 => v3.4.15): Loading from cache
  - Updating behat/behat (v3.4.3 => v3.5.0): Loading from cache
  - Updating symfony/dom-crawler (v3.4.12 => v4.1.4): Loading from cache
  - Updating symfony/css-selector (v3.4.12 => v3.4.15): Loading from cache
  - Updating symfony/browser-kit (v3.4.12 => v4.1.4): Loading from cache
  - Updating fabpot/goutte (v3.2.2 => v3.2.3): Loading from cache
Writing lock file
Generating autoload files

Fixes #370

danielbachhuber commented 6 years ago

@ataylorme I don't know that updating the minimum tested PHP version necessarily means we need to update the minimum supported PHP version. The plugin currently deactivates itself for < PHP 5.4:

image
ataylorme commented 6 years ago

@danielbachhuber I will make time to test this manually on PHP 5.6. Even if Solarium works at PHP 5.6 I am in still in favor of bumping the minimum required version to 7.1 as PHP 5.6 and 7.0 will be at end of life and lose security support in December.

danielbachhuber commented 6 years ago

@ataylorme Ok. Should I update the minimum to 5.6 then?

ataylorme commented 6 years ago

I'll test on 5.6 but even if it works I would like to require 7.1 for security reasons. As the version bump to 2.0.0 is a good time to introduce such a change rather than going to version 3.0.0 in December when PHP 5.6 hits its end of life.

danielbachhuber commented 6 years ago

I'll test on 5.6 but even if it works I would like to require 7.1 for security reasons.

Why/how are you going to test on 5.6 if we block plugin activation for less than 7.1?

ataylorme commented 6 years ago

Why/how are you going to test on 5.6 if we block plugin activation for less than 7.1?

It is more to satisfy my curiosity than out of necessity - I would like to know if Solarium works with 5.6 even though it requires 7.1 through Composer. They may be requiring 7.1 for security reasons, not compatibility reasons.

I'll manually remove the disable check and test on a multidev with PHP version 5.6. Even if 5.6 is not officially supported in Solr Power it would be nice to know if it works. We could document as much in the readme but reccomend people to use 7.1.

ataylorme commented 6 years ago

If it does work with PHP 5.6 we can decrease the activation block to anything less than 5.6.

ataylorme commented 6 years ago

If it does work with PHP 5.6 we can decrease the activation block to anything less than 5.6.

I tested and confirmed that

  1. there is a fatal error in PHP 5.6: Fatal error: Default value for parameters with a class type hint can only be NULL in wp-content/plugins/solr-power/vendor/solarium/solarium/src/Component/RequestBuilder/RequestParamsTrait.php on line 149
  2. PHP 7.0, 7.1 and 7.2 have no errors
  3. The functionality works as expected in PHP versions 7.0, 7.1 and 7.2

Please move forward with PHP 7.1 as the minimum/required version

danielbachhuber commented 6 years ago

👍 Sounds good. Updated in 7e9d67a

ataylorme commented 6 years ago

Well, the PHP version check works. CircleCI failed because the multidev created had PHP 7.0. Upgrading to PHP 7.2 and trying again.