Opened 7 weeks ago
Closed 5 days ago
#66215 closed defect (bug) (fixed)
Build/Test Tools: Use `config.policy` instead of deprecated `config.audit` in composer.json
| Reported by: | mukesh27 | Owned by: | lancewillett |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Recent Composer versions deprecate the config.audit.* keys in favor of config.policy. Editors that validate composer.json against the current Composer schema (such as VS Code) now show this warning on the audit block:
DEPRECATED: use 'config.policy' instead. All 'audit.*' keys still work as a fallback for now. See https://getcomposer.org/doc/06-config.md#policy
The current configuration:
"audit": { "ignore": [ "GHSA-hmqg-cxww-wqhq", "PKSA-rdkp-vv9z-mjkg" ] },
The equivalent using config.policy:
"policy": {
"advisories": {
"ignore-id": [ "GHSA-hmqg-cxww-wqhq", "PKSA-rdkp-vv9z-mjkg" ]
}
},
The legacy audit.* keys still work as a fallback, so nothing is broken today. Migrating now removes the warning and avoids breakage when Composer drops the fallback.
Attachments (1)
Change History (9)
This ticket was mentioned in PR #13831 on WordPress/wordpress-develop by @mukesh27.
7 weeks ago
#2
- Keywords has-patch added; needs-patch removed
#3
@
7 weeks ago
- Milestone Future Release → 7.2
- Owner changed from to
- Priority low → normal
- Status assigned → accepted
@lancewillett commented on PR #13831:
6 weeks ago
#5
PR #13831 landed in https://core.trac.wordpress.org/changeset/64101
This ticket was mentioned in Slack in #core by im3dabasia1. View the logs.
5 days ago
#7
@
5 days ago
As per the pre-RC1 7.2 bug scrub:
The main change landed. @lancewillett, is anything left for 7.2, or can this be closed?
#8
@
5 days ago
- Resolution → fixed
- Status accepted → closed
Closing as fixed for the 7.2 work delivered in [64101]: the advisory ignore list is now available under config.policy, while config.audit.ignore remains for older Composer versions. The two lists must stay in sync while both are needed.
This does not resolve the original editor deprecation warning completely: Composer's schema still marks the retained audit configuration deprecated.
For 7.3 or later, a separate follow-up should:
- Establish the supported minimum Composer version and check CI and contributor tooling compatibility.
- Remove the legacy
config.auditconfiguration only when it is safe to rely onconfig.policyalone. - Verify dependency resolution and advisory handling on the supported Composer versions, and confirm the editor warning is gone.
That compatibility decision and cleanup are deferred, not a requirement for closing the completed 7.2 change. Thanks @mukesh27 for the patch and compatibility testing.
VS code error