Closed (fixed)
Project:
Drupal core
Version:
9.5.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2022 at 16:04 UTC
Updated:
1 Dec 2022 at 14:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
antiorario 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 commented#3284706: Error in Edge browser - Error with Permission-policy header: origin trial controlled feature not enabled 'interest cohort'
Comment #4
mcdruid commentedVisiting 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
mcdruid commentedPatch 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
mcdruid commentederm, 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
mcdruid commentedHad 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 commentedI wasn't able to apply this patch to 9.4.8 release using composer-patch. Still in my headers though.
Comment #13
miedward commentedComment #14
miedward commentedMisunderstood bot change.
Comment #15
idebr commented\Drupal\Core\Site\Settings::$deprecatedSettingsinstructing developers to remove theblock_interest_cohortDrupal setting.\Drupal\Tests\Core\Site\SettingsTest::providerTestRealDeprecatedSettingsComment #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 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
coreandcomposertop 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 commentedPublished the change record at https://www.drupal.org/node/3320787