Skip to content
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

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

Merged
merged 1 commit into from
Feb 8, 2018

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Feb 7, 2018

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

}

// 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
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
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
Member Author

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
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
Member Author

Choose a reason for hiding this comment

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

Fixed

@codecov
Copy link

codecov bot commented Feb 7, 2018

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 Files Coverage Δ Complexity Δ
index.php 0% <0%> (ø) 0 <0> (ø) ⬇️
cron.php 0% <0%> (ø) 0 <0> (ø) ⬇️
ocs/v1.php 0% <0%> (ø) 0 <0> (ø) ⬇️
remote.php 0% <0%> (ø) 0 <0> (ø) ⬇️
console.php 0% <0%> (ø) 0 <0> (ø) ⬇️
status.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/versioncheck.php 0% <0%> (ø) 0 <0> (?)
ocs/providers.php 0% <0%> (ø) 0 <0> (ø) ⬇️
public.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/private/Server.php 84.68% <0%> (-0.13%) 121% <0%> (ø)
... and 5 more

@rullzer rullzer force-pushed the 6830_12 branch 2 times, most recently from f3cb069 to 0d6c11a Compare February 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 stable12 Feb 8, 2018
@MorrisJobke MorrisJobke deleted the 6830_12 branch February 8, 2018 08:18
@MorrisJobke MorrisJobke mentioned this pull request Mar 9, 2018
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants