? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
27 Apr 2017

first part of fixing #15587 is to not allow new installations of Joomla that dont meet the minimum requirements (E.g. parse_ini_file is required for Joomla, therefore cannot be disabled

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Expected result

Actual result

Documentation Changes Required

avatar PhilETaylor PhilETaylor - open - 27 Apr 2017
avatar PhilETaylor PhilETaylor - change - 27 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Apr 2017
Category Installation
avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

@mbabker approved this pull request.

What? without any comment :-) my FIRST approved PR without someone asking for changes hahahaha

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

However, as we are about to revert the change, Joomla no longer needs parse_ini_file :-)

avatar Bakual
Bakual - comment - 27 Apr 2017

Imho we can't make it a requirement in J3, but we should in J4.

However we can show it as a recommend setting for J3

avatar infograf768
infograf768 - comment - 27 Apr 2017

I have tested this item successfully on 4d99cda


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15619.

avatar infograf768 infograf768 - test_item - 27 Apr 2017 - Tested successfully
avatar infograf768 infograf768 - change - 27 Apr 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 27 Apr 2017

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15619.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

RTC? are you sure?

avatar infograf768 infograf768 - alter_testresult - 27 Apr 2017 - infograf768: Tested unsuccessfully
avatar infograf768 infograf768 - change - 27 Apr 2017
Status Ready to Commit Pending
avatar infograf768
infograf768 - comment - 27 Apr 2017

changed to pending


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15619.

avatar infograf768
infograf768 - comment - 27 Apr 2017

I am the one who pointed to this issue and the solution in the maintainers chat.

I take off RTC indeed ( was too fast) as you used && instead of ||

The case we have is with people who do have parse_ini_string but not parse_ini_file, therefore please upgrade this PR to fit.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

I am the one who pointed to this issue and the solution in the maintainers chat.

A chat I dont have party to and though know nothing about !

I take off RTC indeed ( was too fast) as you used && instead of ||

Proves that at least 2 people who reviewed this PR both missed the test I set (ok the brain fart I did) ... Joomla has to improve code quality somehow, if we cant trust two senior people then who can we trust :) :) :) :)

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

The case we have is with people who do have parse_ini_string but not parse_ini_file, therefore please upgrade this PR to fit.

However Joomla 3.7.0 REQUIRES people to have parse_ini_file therefore the PR with && was correct !

However Joomla 3.7.1 will NOT require parse_ini_file (if PR #15620 is accepted) and therefore this PR doesnt need to be made anyway and can be discarded.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

semver says we cannot change the minimum technical requirements, and so hard requiring something that was not hard required before is naughty really.

avatar infograf768
infograf768 - comment - 27 Apr 2017

However Joomla 3.7.1 will NOT require parse_ini_file (if PR #15620 is accepted) and therefore this PR doesnt need to be made anyway and can be discarded.

Wrong imho, we still need to inform people at Installation time that something is wrong concerning their parse_ini whether it is file OR string.

avatar mbabker
mbabker - comment - 27 Apr 2017

If you change https://github.com/PhilETaylor/joomla-cms/blob/4d99cdaa107ac8242d87809646697322ea53b722/installation/model/setup.php#L291 to have a non-null value then when getPhpOptionsSufficient runs for "hard" requirements the INI parser availability won't cause it to fail over. Basically the same way we deal with it for ext/mcrypt.

avatar brianteeman
brianteeman - comment - 27 Apr 2017

Don't forget that a large percentage of new installation are not created with the installer

avatar mbabker
mbabker - comment - 27 Apr 2017

Ya well we can only cater for what we can control.

Even if we revert the "hard" requirement, having the check raise a notice if one of the two are missing would be good. That said, it should probably hard fail if both are missing unless we're willing to accept the dependency to the FOF code, which it seems some aren't willing to use a library we ship within core.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

which it seems some aren't willing to use a library we ship within core.

That is shipped with the core and NEVER EVER used .... /facepalm

avatar brianteeman
brianteeman - comment - 27 Apr 2017

Crazy to ship AND Use a library but prevent it's use

avatar brianteeman
brianteeman - comment - 27 Apr 2017

It is used

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

FOF is used, the FOF ini parser class is not used :)

avatar infograf768
infograf768 - comment - 27 Apr 2017

I tested in real world and && works We get a "No" while || does not (after disabling parse_ini_file in php.ini)
Therefore this PR works here.

Any other debate concerns #15620
I change again my test to OK

avatar infograf768
infograf768 - comment - 27 Apr 2017

I have tested this item successfully on 4d99cda


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15619.

avatar infograf768 infograf768 - test_item - 27 Apr 2017 - Tested successfully
avatar Bakual
Bakual - comment - 27 Apr 2017

To my knowledge we required the parse_ini_string always in J3. So if that isn't allowed, Joomla wouldn't have worked properly already in J3.
The FOF class isn't really needed at all as we safely can use that native PHP method in J3.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2017

I dont understand the thinking behind going from the old way (string) to the new way (file) was - I was not involved with that. There must have been a reason someone thought it was a "better" way.

avatar Bakual
Bakual - comment - 27 Apr 2017

The reason was likely that you can use one function call instead of several and you don't need to do the QQ string replacing as parse_ini_file can handle that itself.
Plus on a sidenote it had better handling of "bad" files.
All in all a minor performance thing, nothing ground breaking.

avatar infograf768
infograf768 - comment - 3 May 2017

No need to merge this as #15620 has been merged.

Let's consider it for 4.0 with some changes including new lang string AND default to hardcoded English phrase as otherwise user may only get the constant:
If we do, I suggest to separate the check for parse_ini_string from the one for parse_ini_file to make it clear at that time that it is the lack of this specific method which prevents installing.

Concerning update, we may also need to do something generally speaking, for example displaying after update a hardcoded error specifying the issue.

avatar mbabker
mbabker - comment - 3 May 2017

Even with #15620 merged this should still go into 3.x in some form. Right now our install checks are only looking for parse_ini_string() support. In theory if one put that method into the disabled functions list but left parse_ini_file() out of it (I could see it happening, people do dumb stuff), our install checks would fail even though they are probably in a usable configuration.

avatar infograf768
infograf768 - comment - 3 May 2017

@mbabker
I have no problem implementing this in a different way. Separating both parse_ini methods and default to harcoded message in case of.

avatar brianteeman brianteeman - change - 8 Jun 2017
Milestone Added:
avatar brianteeman brianteeman - change - 8 Jun 2017
Milestone Added:
avatar joomla-cms-bot joomla-cms-bot - change - 26 Oct 2017
Title
Check for existence of parse_ini_file at installation time
[4.0] Check for existence of parse_ini_file at installation time
avatar joomla-cms-bot joomla-cms-bot - edited - 26 Oct 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Jan 2018
Build staging 4.0-dev
avatar PhilETaylor PhilETaylor - change - 10 Feb 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-02-10 21:36:26
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 10 Feb 2019

Add a Comment

Login with GitHub to post a comment