- Issue created by @kim.pepper
- Assigned to kim.pepper
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Working on this
- last update
over 1 year ago Unable to generate test groups - @kimpepper opened merge request.
- Status changed to Needs review
over 1 year ago 1:23am 5 May 2023 56:29 56:14 Running54:44 54:16 Running- last update
over 1 year ago 29,379 pass - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
QueryString
seems a bit generic. How aboutAssetQueryString
? - last update
over 1 year ago 29,379 pass - last update
over 1 year ago 29,380 pass - last update
over 1 year ago 29,380 pass - Status changed to Needs work
over 1 year ago 10:21am 5 May 2023 - π«π·France andypost
Added few comments, overall looks great
- strict types - needs removal
- BC for removed state property may fire in child classes, could needDeprecatedServicePropertyTrait
- default value from state is now '0' so extra processing of NULL is gone and I think it's fine - First commit to issue fork.
- last update
over 1 year ago 29,380 pass - last update
over 1 year ago 29,380 pass - Status changed to Needs review
over 1 year ago 11:11pm 5 May 2023 - Status changed to RTBC
over 1 year ago 11:20pm 5 May 2023 - π«π·France andypost
I find it ready but not sure allowed in current state https://www.drupal.org/about/core/policies/core-change-policies/allowed-... β
- π«π·France andypost
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Usage in contrib http://codcontrib.hank.vps-private.net/search?text=_drupal_flush_css_js%...
Funny to see that what we consider a private function (because of the leading underscore) gets used like a public function anyway. π
- last update
over 1 year ago 29,381 pass - last update
over 1 year ago 29,382 pass 2:28 58:56 Running- last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,397 pass - last update
over 1 year ago 29,398 pass - last update
over 1 year ago 29,401 pass - Status changed to Needs review
over 1 year ago 9:44am 29 May 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
larowlan β credited Wim Leers β .
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Wim's comment appears unresolved
- last update
over 1 year ago 29,403 pass - last update
over 1 year ago 29,403 pass - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Resolved thread.
- last update
over 1 year ago 29,403 pass - last update
over 1 year ago 29,403 pass - Status changed to Needs work
over 1 year ago 5:53pm 1 June 2023 - πΊπΈUnited States smustgrave
Seems all threads have been resolved but change record still needs work.
Example of before/after is always useful.
- last update
over 1 year ago 29,404 pass - Status changed to Needs review
over 1 year ago 11:44pm 1 June 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Updated the CR and added before and after. This is meant to be an internal method, so doubtful anyone would be calling this directly.
- Status changed to RTBC
over 1 year ago 2:42pm 2 June 2023 - last update
over 1 year ago 29,413 pass 2:28 58:35 Running- last update
over 1 year ago 29,438 pass - last update
over 1 year ago 29,439 pass - last update
over 1 year ago 29,439 pass - last update
over 1 year ago 29,447 pass - last update
over 1 year ago 29,475 pass - last update
over 1 year ago 29,501 pass - last update
over 1 year ago 29,501 pass - last update
over 1 year ago 29,510 pass - last update
over 1 year ago 29,555 pass - last update
over 1 year ago 29,556 pass - last update
over 1 year ago 29,561 pass - last update
over 1 year ago 29,568 pass - last update
over 1 year ago 29,573 pass - last update
over 1 year ago 29,803 pass - Status changed to Needs work
over 1 year ago 10:16pm 5 July 2023 - π¬π§United Kingdom longwave UK
claro_page_attachments_alter()
still calls state directly, this needs converting to use the service:function claro_page_attachments_alter(array &$attachments) { $theme_path = \Drupal::request()->getBasePath() . '/' . \Drupal::service('extension.list.theme')->getPath('claro'); $query_string = \Drupal::state()->get('system.css_js_query_string') ?: '0';
- last update
over 1 year ago 29,803 pass - last update
over 1 year ago 29,803 pass - Status changed to Needs review
over 1 year ago 10:38pm 5 July 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Fixed
claro_page_attachments_alter()
.Do we have a way of deprecating state variables?
We could check the state key when setting and getting, but that would be triggered by AssetQueryString which is using the same state key.
However, people shouldn't be bypassing
_drupal_flush_css_js()
and accessing state directly. It's like querying the database directly. - π¬π§United Kingdom longwave UK
The issue isn't with
_drupal_flush_css_js()
, modules mostly want to read the value - we never provided an API for that, reading state directly was the only way. - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Ok. An alternative approach is we switch the state key to something new in
AssetQueryString
, then check for the old one in\Drupal\Core\State\State::get()/::set()
and throw a deprecation message? - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Capturing the slack conversation with @catch and @ongwave. We will:
- Create a new key for AsssetQueryString
- Add deprecation trigger in State::set/get() for the old value and use the new value
- Add a test for that
- Use Settings::$deprecatedSettings for inspiration
- last update
over 1 year ago 29,804 pass - Status changed to Needs work
over 1 year ago 7:47pm 6 July 2023 - π¬π§United Kingdom longwave UK
I think we only need to get/set the new key; the deprecation handling should take care of that transparently to the caller.
- last update
over 1 year ago 29,805 pass - last update
over 1 year ago 29,805 pass - Status changed to Needs review
over 1 year ago 11:03pm 6 July 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Makes more sense. I've used the 'replacement' to swap out the deprecated key in get/set methods.
- last update
over 1 year ago 29,805 pass - last update
over 1 year ago 29,805 pass - π«π·France andypost
Added suggestion for test docs, otherwise RTBC++
- last update
over 1 year ago 29,805 pass - Status changed to RTBC
over 1 year ago 11:19pm 11 July 2023 - πΊπΈUnited States smustgrave
All threads appear to be resolved and CR has before/after examples.
- last update
over 1 year ago 29,811 pass - last update
over 1 year ago 29,815 pass - Status changed to Needs review
over 1 year ago 10:54am 14 July 2023 - π¬π§United Kingdom catch
Overall this looks great, but I think we need a post update to remove the old state entry?
- last update
over 1 year ago 29,818 pass - last update
over 1 year ago 29,818 pass - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Added post-update hook.
- Status changed to RTBC
over 1 year ago 1:06am 15 July 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Just a post update hook, so I think it's safe for me to put this back to RTBC.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
LGTM if extra eyes are required.
- last update
over 1 year ago 29,818 pass - last update
over 1 year ago 29,818 pass -
longwave β
committed b3e943e9 on 11.x
Issue #3358336 by kim.pepper, rpayanm, andypost, longwave, smustgrave,...
-
longwave β
committed b3e943e9 on 11.x
- Status changed to Fixed
over 1 year ago 3:54pm 18 July 2023 - π¬π§United Kingdom longwave UK
Committed and pushed b3e943e926 to 11.x (10.2.x). Thanks!
Also published the change record.
- π¬π§United Kingdom longwave UK
I realised we forgot to add BC for the new argument here:
+ public function __construct($root, KeyValueExpirableFactoryInterface $key_value_expirable_factory, CacheBackendInterface $cache, StateInterface $state, ModuleHandlerInterface $module_handler, AccountInterface $account, BareHtmlPageRendererInterface $bare_html_page_renderer, UpdateRegistry $post_update_registry, protected AssetQueryStringInterface $assetQueryString) {
Will open a followup.
- π¬π§United Kingdom longwave UK
Automatically closed - issue fixed for 2 weeks with no activity.