? Pending

User tests: Successful: Unsuccessful:

avatar frankmayer
frankmayer
5 Nov 2017

Summary of Changes

Use PHP_* CONSTANTS instead of functions to get such values, in order to save a few cycles and for better readability.

I have changed most (except one) php_uname() calls with PHP_OS.
Note that PHP_OS essentially holds only the OS name that php_uname('s') would also return.
php_uname() or php_uname('a') would return some more detail, but on a quick search I didn't find anything that would use that extra info, except the one that I reverted in my appended commit.
see http://php.net/manual/en/function.php-uname.php

Testing Instructions

Automatic tests only, should suffice. Release managers please check.

avatar frankmayer frankmayer - open - 5 Nov 2017
avatar frankmayer frankmayer - change - 5 Nov 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Nov 2017
Category Unit Tests Administration com_admin com_joomlaupdate Modules Repository Libraries Front End Plugins
avatar frankmayer frankmayer - change - 5 Nov 2017
The description was changed
avatar frankmayer frankmayer - edited - 5 Nov 2017
avatar frankmayer frankmayer - change - 5 Nov 2017
Title
Constant usage
[4.0] Constant usage
avatar frankmayer frankmayer - edited - 5 Nov 2017
avatar frankmayer frankmayer - change - 8 Nov 2017
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Nov 2017
Category Unit Tests Administration com_admin com_joomlaupdate Modules Repository Libraries Front End Plugins Unit Tests Administration com_admin Modules Repository Libraries Front End Plugins
avatar frankmayer
frankmayer - comment - 7 Aug 2018

So, do we want these optimizations? If yes, I'll resolve those conflicts and we can get this merged. Otherwise, I'll close this.

avatar wilsonge
wilsonge - comment - 8 Aug 2018

I'm happy to merge the PHP_VERSION and PHP_SAPI stuff. But not comfortable with PHP_OS if i'm honest. It's probably fine - but I don't particuarly want to find out the hard way (especially as you say it's only the sake of a couple of CPU cycles)

avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2018
Category Unit Tests Administration com_admin Modules Repository Libraries Front End Plugins Administration com_admin Modules Libraries Front End
avatar frankmayer
frankmayer - comment - 8 Aug 2018

@wilsonge ok, I fixed conflicts and removed the PHP_OS replacements. Ready to merge.

avatar wilsonge wilsonge - change - 8 Aug 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-08-08 21:36:03
Closed_By wilsonge
Labels Removed: ?
avatar wilsonge wilsonge - close - 8 Aug 2018
avatar wilsonge wilsonge - merge - 8 Aug 2018
avatar wilsonge
wilsonge - comment - 8 Aug 2018

Thanks!

Add a Comment

Login with GitHub to post a comment