Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Tech press is covering this as "google retires FLoC":
https://blog.google/products/chrome/get-know-new-topics-api-privacy-sand...
In #3209628: Add Permissions-Policy header to block Google FLoC (and #3209976: Add Permissions-Policy header to block Google FLoC (D7)) Drupal added headers to block FLoC.
Are these (about to become) no longer necessary?
Should they be removed?
Steps to reproduce
Verify if the headers are now redundant.
Proposed resolution
...and remove them if so.
Remaining tasks
Remove FLoC headers from D9/10 and D7 (separate issue for D7).
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Release notes snippet
tbc
Comment | File | Size | Author |
---|---|---|---|
#32 | 3260401-d10.x-36.patch | 8.21 KB | Spokje |
| |||
#32 | interdiff.18-35.txt | 867 bytes | Spokje |
#23 | 3260401-d95-21.patch | 7.44 KB | Spokje |
Comments
Comment #2
antiorario CreditAttribution: antiorario at Pegasystems commentedOr maybe replace it with the header to block the Topics API, because in the end it’s more of the same.
Comment #3
cilefen CreditAttribution: cilefen commented#3284706: Error in Edge browser - Error with Permission-policy header: origin trial controlled feature not enabled 'interest cohort'
Comment #4
mcdruidVisiting a Drupal site with the FLoC-blocking header in Chrome now emits a message in the console:
Seems FLoC has defintely been replaced by Topics API (although that's still a "trial" as far as I can see):
https://blog.google/products/chrome/get-know-new-topics-api-privacy-sand...
I think we should remove the FLoC header, but would suggest that adding a replacement should be a separate issue.
Comment #5
mcdruidPatch removing everything that was committed in #3209628: Add Permissions-Policy header to block Google FLoC from 9.5.x
Have I missed anything?
Comment #6
mcdruiderm, not sure why that test was against 10.0.x when I changed version. Does this comment kick it back to 9.5.x?
Comment #7
mcdruidHad to queue a 9.5.x test manually...
Comment #8
SpokjeLGTM
Comment #9
longwaveJust to note that the Topics API doc at https://github.com/patcg-individual-drafts/topics states:
Unsure if we want to switch to this instead, or whether Topics API is less controversial so it should be up to individual sites via e.g. https://www.drupal.org/project/permissionspolicy
Comment #10
alexpottWe need to deprecate the setting then and tell users to clear it up. This will make @catch happy because we left the settings deprecation stuff in D10.
Comment #12
miedward CreditAttribution: miedward as a volunteer commentedI wasn't able to apply this patch to 9.4.8 release using composer-patch. Still in my headers though.
Comment #13
miedward CreditAttribution: miedward as a volunteer commentedComment #14
miedward CreditAttribution: miedward as a volunteer commentedMisunderstood bot change.
Comment #15
idebr CreditAttribution: idebr at iO commented\Drupal\Core\Site\Settings::$deprecatedSettings
instructing developers to remove theblock_interest_cohort
Drupal setting.\Drupal\Tests\Core\Site\SettingsTest::providerTestRealDeprecatedSettings
Comment #16
longwaveCan we word this a bit differently? It's confusing to repeat the same version, although I know that is our standard format; we don't generally expect to deprecate and remove at the same time - though it makes sense here.
Comment #18
idebr CreditAttribution: idebr at iO commented#16 Reworded to:
The "block_interest_cohort" setting is deprecated in drupal:9.5.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3320787.
Comment #19
longwaveThis looks great to me for 10.x - but it doesn't apply to 9.5.x. Can you also roll a version for that, and we can hopefully get this in to the 9.5.0 release?
Comment #20
Akram Khantrying to fix in 9.5.x address #19
Comment #21
SpokjeComment #22
Akram Khanfixing CCF Needs review
Comment #23
SpokjeComment #24
SpokjeComment #25
longwaveThanks, this all looks good now.
#23 is for 9.5.x.
#18 is for 10.0.x/10.1.x.
Comment #26
longwaveComment #27
catchI went to try and commit this, and run into what I think is a completely unrelated phpstan issue:
Could probably commit it without running phpstan, but we will need an issue to sort that out either way. Might need a phpstan-ignore maybe.
Comment #28
SpokjeHmm, when PHPStan is running on all files, per usual on Drupal CI, nothing is detected:
Since DrupalCI can't replicate the problem, I can random add phpstan-ignore-next-line, but that seems a bit weird.
Maybe a core committer has to fix this themself?
And why are the differences between checking all and only changed files with PHPStan?
Comment #29
longwaveSo these are in the baseline for the scaffold source version:
but not for the copy in sites/default/default.settings.php - but I can't immediately see why this is.
Comment #30
longwaveWe already ignore settings.php, maybe we need to extend this to default.settings.php, given that it's an include and testing it standalone doesn't make sense?
Comment #31
longwaveOh, I see:
phpstan.neon.dist tells PHPStan to only analyse the
core
andcomposer
top level directories by default, but notsites
- however the precommit script doesn't take this into account, so if you explicitly specify a file outside of the listed paths, it will analyse it anyway; locally I get the same errors if I do this:Will open a followup to extend excludePaths to include default.settings.php.
Comment #32
SpokjeOk, so do we add the errors to the baseline, or ignore the default.settings.php?
I like the latter more.
Added a patch to see if that would work.
Comment #33
longwaveRe #32 I think that is technically out of scope here so opened #3322182: Ignore sites directory in PHPStan
Comment #35
catchSince the phpstan issue is unrelated, I've gone ahead and committed this to 10.1.x/10.0.x/9.5.x with --no-verify to skip the phpstan check on commit.
Comment #36
idebr CreditAttribution: idebr at iO commentedPublished the change record at https://www.drupal.org/node/3320787