Closed mikkeschiren closed 1 month ago
Also - I can see that the core update file was named 5.1.2-rc1.php in 5.1.2, and that it has been renamed to 5.2.0-b2.php. I am not sure why this has been done.
the issue itself could be eeasily solved by setting the config in before updating, and keeping the write protection, but would like to know the need to have it writeable in the first place.
Also see #22634.
Also - I can see that the core update file was named 5.1.2-rc1.php in 5.1.2, and that it has been renamed to 5.2.0-b2.php. I am not sure why this has been done.
Those are two different update files for two different minor version streams. They may have the same content, but are for different versions.
Yes that I do understand, but why this practice? Wouldn't it be better to keep both, as they contain the same thing, the impact would be none. I am not really keen on that it is named rc1 in a tagged release either :)
We had to add/rename the update script to ensure it's executed on every install. Those on the stable channel might update to 5.1.2, but those on beta channel might already update to directly 5.2.0-b2. We could also have kept both files, but it's actually useless to perform the same update twice.
This is btw. not the first update script that tries to change the config and it might not be the last. In some cases it's necessary to write certain values to the config during in an update.
I would suggest you to give at least the user running console core:update
write permission to the config.
But we could also improve our process so updating the config is only performed if the config does not yet have the correct value. This would at least allow to manually set the config in order to be able to update without a failure.
Just a FYI: In our environment we do not allow any writing to the config file, as we see it as a potential security risk. But that is for us to handle.
But we could also improve our process so updating the config is only performed if the config does not yet have the correct value. This would at least allow to manually set the config in order to be able to update without a failure.
I've just checked the update script again. It will only try to set a config value if none is present yet. So performing the updating after manually setting the config should not result in an error. So guess there is nothing left to do.
What happened?
What should happen?
It should be possible to run core update, without writing to config.ini.php
How can this be reproduced?
Make config.ini.php not writeable. Make sure you are running 5.1.1. Update to 5.1.2
Matomo version
5.1.2
PHP version
8.1.30
Server operating system
No response
What browsers are you seeing the problem on?
No response
Computer operating system
No response
Relevant log output
No response
Validations