Skip to content

Conversation

@yonran
Copy link
Contributor

@yonran yonran commented Sep 2, 2025

Description of the Change

Add PSR-4 mapping for php-jwt to fix error running composer dump-autoload --optimize --classmap-authoritative --strict-psr --strict-ambiguous. I wish to add --classmap-authoritative to my wordpress app for performance reasons (in particular, so I can also enable ClassFinder::disablePSR4Vendors(); in ClassFinder) but the headstartwp mu-plugin is preventing me from being able to use --classmap-authoritative safely.

Remove require_once for php-jwt which appeared to be a workaround for the missing PSR-4 mapping.

How to test the Change

Run this command and make sure it runs without error:

composer dump-autoload --optimize --classmap-authoritative --strict-psr --strict-ambiguous --working-dir=./

Changelog Entry

Developer - Make headless-wp PSR-4 compliant: add autoload.psr-4 mapping for php-jwt, remove require_once of php-jwt files

Credits

Checklist:

Fix error running composer dump-autoload --optimize --classmap-authoritative --strict-psr --strict-ambiguous. I wish to add --classmap-authoritative to my wordpress app  for performance reasons but headstartwp is preventing me from being able to do so.
@changeset-bot
Copy link

changeset-bot bot commented Sep 2, 2025

🦋 Changeset detected

Latest commit: da25fa8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@headstartwp/headstartwp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
headstartwp-app-router Ready Ready Preview Comment Sep 2, 2025 6:36pm

@vercel
Copy link

vercel bot commented Sep 2, 2025

@yonran is attempting to deploy a commit to the tenup-internal Team on Vercel.

A member of the Team first needs to authorize it.

@nicholasio
Copy link
Member

Thanks for the PR, I'll test it soon.

@nicholasio nicholasio merged commit 41506fc into 10up:develop Sep 22, 2025
15 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants