Make WordPress Core

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)

Screenshot 2026-09-29 at 4.58.10 PM.png​ (235.8 KB ) - added by mukesh27 7 weeks ago.
VS code error

Download all attachments as: .zip

Change History (9)

#1 @mukesh27
7 weeks ago

  • Owner set to mukesh27
  • Status new → assigned

This ticket was mentioned in ​PR #13831 on ​WordPress/wordpress-develop by ​@mukesh27.


7 weeks ago
#2

  • Keywords has-patch added; needs-patch removed

Trac ticket: https://core.trac.wordpress.org/ticket/66215

Use of AI Tools

N/A

#3 @lancewillett
7 weeks ago

  • Milestone Future Release → 7.2
  • Owner changed from mukesh27 to lancewillett
  • Priority low → normal
  • Status assigned → accepted

#4 @lancewillett
6 weeks ago

In 64101:

Build/Test Tools: Add Composer advisory policy configuration.

Add the existing advisory ignore list under config.policy.advisories.ignore-id for newer Composer versions. Retain config.audit.ignore for compatibility with older versions, including Composer 2.9.0.

Both lists contain the same advisory IDs and must remain in sync while the legacy configuration is needed.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13831

Props mukesh27.
See #66215.

This ticket was mentioned in ​Slack in #core by im3dabasia1. ​View the logs.


5 days ago

#7 @im3dabasia1
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 @lancewillett
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.audit configuration only when it is safe to rely on config.policy alone.
  • 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.

Note: See TracTickets for help on using tickets.