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
Add undocumented (ie, unsupported) config option (DI config only) to disable forcing range archiving on browser request. #7113
Conversation
@diosmosis I'm curious how PRO would change this config value when not adding to INI? By using a plugin? A change to this file would be overwritten on an update. BTW: Is there maybe a
Maybe also have a look at #7095 (comment) we need to clean up this mess. Don't have to do it in this PR though. Just FYI |
If they add the setting to a config/config.php file it should override the global config, see: That said, it would be simpler to just not put a default value in global.ini.php and handle the case where
I don't think archiving ranges via core:archive is supported? I remember this is something that is being worked on but I don't think it's merged yet (haven't checked). That said, it shouldn't be needed. |
Sweet, didn't know that
I thought that's why one wants to disable it via browser? If it isn't pre-archived via |
Ok, from the slack chat, @mgazdzik is working on a command for pre-processing ranges. I'll add a test for archiving ranges via CLI. |
if (StaticContainer::get('archiving.range.force_on_browser_request') !== false) { | ||
return false; | ||
} else { | ||
Log::verbose("Not forcing archiving for range period."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way in PSR-3 the log level "verbose" doesn't exist, I aliased it to "debug". So using verbose is the same as using debug.
@tsteur Added some tests, mind taking another look? |
As long as it works I'm happy with it :) Just out of curiosity, is there a reason why you know longer use DI but config? I presume PRO will set a value then in config and they can maybe set it per instance / hostname this way? |
Using DI config was an experiment. It might be a good idea, but since there was a simpler and more standard way to accomplish the same thing I went w/ that. Principle of least surprise and all that. |
sweet :) |
…disable forcing range archiving on browser request.
…fig w/o adding documented default in global.ini.php and just handle case where config option is not defined.
…ion that makes sure range archiving is correctly enabled/disabled.
…:debug since Log::verbose is meaningless w/ monolog).
e18e070
to
98cf703
Compare
Add undocumented (ie, unsupported) INI config option to disable forcing range archiving on browser request.
The new setting looks good! Feedback
|
…fig option in global.ini.php.
As title. From pro request on slack.
If in the future we decide there's a better way to do this, we can remove the option w/o any issue. If we decide it's a good thing, we can add an INI config option.