Skip to content

Nextcloud 12 is not compatible with newer than php 7.1 - #8216

Merged
MorrisJobke merged 1 commit into
stable12from
6830_12
Feb 8, 2018
Merged

Nextcloud 12 is not compatible with newer than php 7.1#8216
MorrisJobke merged 1 commit into
stable12from
6830_12

Conversation

@rullzer

@rullzerrullzer commented Feb 7, 2018

Copy link
Copy Markdown
Member

Backport of #6830

Fixes#7415

Just to avoid users from trying this with a to new (untested) php version

  • Moved the check logic to 1 place
  • All directly callable scripts just require this on top
  • exit hard (-1) so we know scripts won't continue
  • Return status 500 so no sync clients will try fancy stuff

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

Comment threadlib/versioncheck.php Outdated
}

// Show warning if > PHP 7.1 is used as Nextcloud 12 is not compatible with > PHP 7.1
if (version_compare(PHP_VERSION, '7.2.0') !== -1) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you meant '7.1.0' here 😉

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this will run with 7.2.0 just fine, but error out with 7.2.1+. 🤔

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the version has to be lower than 7.2.0. So all 7.1.x are allowed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use , '<' instead of comparing !== -1

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@codecov

codecovBot commented Feb 7, 2018

Copy link
Copy Markdown

Codecov Report

Merging #8216 into stable12 will increase coverage by <.01%.
The diff coverage is 0%.

@@ Coverage Diff @@## stable12 #8216 +/- ##
==============================================
+ Coverage 53.84% 53.84% +<.01% 
Complexity 22762 22762 ==============================================
Files 1385 1386 +1 Lines 87152 87155 +3 Branches 1331 1331 ==============================================
+ Hits 46926 46928 +2 - Misses 40226 40227 +1
Impacted FilesCoverage ΔComplexity Δ
index.php0% <0%> (ø)0 <0> (ø)⬇️
cron.php0% <0%> (ø)0 <0> (ø)⬇️
ocs/v1.php0% <0%> (ø)0 <0> (ø)⬇️
remote.php0% <0%> (ø)0 <0> (ø)⬇️
console.php0% <0%> (ø)0 <0> (ø)⬇️
status.php0% <0%> (ø)0 <0> (ø)⬇️
lib/versioncheck.php0% <0%> (ø)0 <0> (?)
ocs/providers.php0% <0%> (ø)0 <0> (ø)⬇️
public.php0% <0%> (ø)0 <0> (ø)⬇️
lib/private/Server.php84.68% <0%> (-0.13%)121% <0%> (ø)
... and 5 more

@rullzer
rullzerforce-pushed the 6830_12 branch 2 times, most recently from f3cb069 to 0d6c11aCompareFebruary 7, 2018 12:38
Just to avoid users from trying this with a to new (untested) php version
* Moved the check logic to 1 place
* All directly callable scripts just require this on top
* exit hard (-1) so we know scripts won't continue
* Return status 500 so no sync clients will try fancy stuff
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@MorrisJobke
MorrisJobke merged commit 2be70b1 into stable12Feb 8, 2018
@MorrisJobke
MorrisJobke deleted the 6830_12 branch February 8, 2018 08:18
@MorrisJobkeMorrisJobke mentioned this pull request Mar 9, 2018
2 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rullzer@nickvergessen@MorrisJobke