For https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/build/release/build_tarballs.sh, it will pull in SMW dependencies needing [insert new PHP version] if the build machine supports it, thus breaking all consumers that don't have this new version.
I believe you can use https://getcomposer.org/doc/06-config.md#platform to set your lowest supported PHP version, and then it'll pull in dependencies that match that platform requirement.
This script needs to be modified to insert the platform information into the composer.json file and then do a composer update https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/build/release/build_tarballs.sh
I knew the file but did on think of
This script needs to be modified to insert the platform information into the composer.json file
So something like
PHPVERSION="$3"
if [ "$PHPVERSION" == "" ]; then
sed -e '"support": {\[.*\]},/a "platform": { "php": "${PHPVERSION}" },/n' composer.json'
fi
or perhaps better
PHPVERSION="$3"
if [ "$PHPVERSION" == "" ]; then
sed -e '"support": \[.*\],/a /n"platform": { "php": "${PHPVERSION}" },/n' composer.json'
fi
/n should be a new line
Might be easier to just manipulate the JSON file with PHP instead of trying to do it in sed? :)
Might be easier to just manipulate the JSON file with PHP instead of trying to do it in sed? :)
So my suggestion does not work which also does not come as a surprise. Just tried to get painkillers moving. ;) I guess I should rather leave this to Jeroen.
I actually tried the sed approach but this bash magic really is no my thing
Might be easier to just manipulate the JSON file with PHP instead of trying to do it in sed? :)
This requires changing the bash script into a PHP script, so perhaps not
Is using PHP a deal breaker? You could also use php -r ... or I suspect you could probably use jq if you really want to use bash.
Thought it will have been nice I do not see this as a hold up for SMW 2.4.4 since I can add the platform magic prior to creating the release tarballs.
Why is bash so bad? Is is just quaint or so? I think it might just be a matter of figuring out the regex fu for sed.
I'm fine with the script being PHP. PR welcome.
Using a regex is kind hacky, using PHPs json_decode and json_encode is nicer. Same with the jq thing.
I agree to not block a release on this, like you say you can just do it manually.
I have the feeling that this issue will most likely degenerate into issue rot.
Perhaps you did something wrong in the workflow. I will give this a try and see what happens. Next week, once I am no longer doing two jobs at the same time...
I will give this a try and see what happens. Next week, once I am no longer doing two jobs at the same time...
No worries, time will tell. :)
Perhaps you did something wrong in the workflow.
I will be curious to lean the workflow. What I did was to install SMW, manipulate "composer.json", manipulate "build.sh" and then run "build_tarballs.sh". Appeared to be a logical sequence of action to me.
This just comes to my mind: Probably the platform parameter has to be added to Valiator and to ParamProcessor too. Supporting this idea is the fact that the original issue reported does not longer show but a ParamProcessor related one shows up instead.
@JeroenDeDauw What about fluffing this one? I know that I am being cruel here. :)
Serious question, do we expect some actionable task here? If not, close it.
Serious question, do we expect some actionable task here? If not, close it.
@JeroenDeDauw It will be cool if you could add in some lines of code to overcome this issue. As soon as I upgraded the server serving the sandbox wiki, we will again run into this issue.
Another solution I also can think of is to set up an virtual box which uses the minimum requirements.
Another solution I also can think of is to set up an virtual box which uses the minimum requirements.
@JeroenDeDauw @mwjames Probably this is the easier way. Should I open an actionable issue at this place?
The problem and acceptance criteria should be clear from the title and description. That no one is poking at this does not make the task any less important or valid.
I added this with status "open" to the "Enhancements and features" board, meaning that even if I closed it may be picked up to improve SMW.
Marking this as done, @kghbln provided https://github.com/SemanticMediaWiki/IndividualFileRelease and the project no longer maintains tarballs (#3382, #3347).
Most helpful comment
I believe you can use https://getcomposer.org/doc/06-config.md#platform to set your lowest supported PHP version, and then it'll pull in dependencies that match that platform requirement.