New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to 1.5-beta (complete package) does not work on PHP < 7.1 #7975
Comments
@thomascube Probably some mistake in the release process. |
The problem is with Guzzle dependencies:
We might just use composer's |
@alecpl I'm not sure that |
If I run |
Indeed, that does the trick. I just hope that Guzzle dependencies that would not run on PHP5 are not used by our code. |
I got an error when I tried that. Am I doing something wrong? https://www.roundcubeforum.net/index.php/topic,29361.msg74761.html#msg74761 |
Reopening. The solution might not be working according to the above forum thread. |
All symfony/polyfill-* packages in the version it is included in the vendor folder require PHP 7.1. And their code is executed always, not when needed. Maybe we can fix that by requiring symfony/polyfill-intl-idn:1.19.0 (which is the last version with PHP5 support). |
Nah, this sucks. Maybe we should just run Maybe we need just some extra INSTALL instructions when installing/updating on PHP < 7.1. @thomascube what do you think? |
An unsolicited opinion from a kind stranger: Supporting both installation options seems like the ideal approach for this release in order to offer backward compatibility as well as support for those who can or prefer to use more up to date software. While supporting both is not great long term, a deprecation plan would give users on older versions of PHP time to plan their migration while allowing you to drop support after the window closes. |
@thomascube I was thinking about something like this: --- a/INSTALL
+++ b/INSTALL
@@ -40,6 +40,11 @@ INSTALLATION
tar command `--no-same-owner` option might be helpful.
2. In case you don't use the so-called "complete" release package,
you have to install PHP and javascript dependencies.
+ --------------------------------------------------------------------
+ IMPORTANT: For PHP < 7.1 you have to always run `composer update` or
+ `composer install` as described below, even when you use
+ the complete package.
+ --------------------------------------------------------------------
2.1. Install PHP dependencies using composer:
- get composer from https://getcomposer.org/download/
- rename the composer.json-dist file into composer.json
diff --git a/UPGRADING b/UPGRADING
index 4719dbbe7..aeab03452 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -22,6 +22,8 @@ removed again.
WARNING: Make sure files have proper owner/group for your setup. If you use
tar to extract the package, `--no-same-owner` option might be helpful.
+WARNING: When you're using the complete package on PHP < 7.1 you have to run
+ `composer update --no-dev` before executing the installto.sh script.
WARNING: See Post-Upgrade Activities section below.
WARNING: If you use MySQL < 5.7.7 or MariaDB < 10.2.2 make sure to configure it with:
innodb_large_prefix=true
diff --git a/program/include/iniset.php b/program/include/iniset.php
index 9e279953e..00f1530d2 100644
--- a/program/include/iniset.php
+++ b/program/include/iniset.php
@@ -57,6 +58,12 @@ if (set_include_path($include_path) === false) {
// include composer autoloader (if available)
if (@file_exists(INSTALL_PATH . 'vendor/autoload.php')) {
+ if (PHP_VERSION_ID < 70100) {
+ if (@file_exists(INSTALL_PATH . 'vendor/symfony/polyfill-php72')) {
+ die("Found dependencies incompatible with PHP < 7.1. Run `composer update` first.");
+ }
+ }
+
require INSTALL_PATH . 'vendor/autoload.php';
}
|
The complete package is also meant for those who cannot execute any scripts on their host so this might only be half of a solution. I guess we‘ll end up with two flavors of complete packages to provide. |
@alecpl does this mean that the fix from commit beb4008 does not work? |
@thomascube, the fix didn't work, so it's reverted. It looks that |
I also successfully tested this with a php8 docker image but when looking at the package, the vendor/symfony/polyfill-php72 folder still is there which makes me believe that it still includes a polyfill which will not run on php5. |
Building the package with |
1.19.0 is the version that does not have the issue, as it supports php 5.3, higher versions dropped support for php5. From the two commands you mentioned we need only the former. Let's do it. I think we can close this ticket. |
https://www.roundcubeforum.net/index.php/topic,29361.msg74738.html
The text was updated successfully, but these errors were encountered: