Skip to content

[AssetMapper] Allow adding integrity metadata to importmaps #60378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

MatTheCat
Copy link
Contributor

@MatTheCat MatTheCat commented May 7, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #60362
License MIT

Takes over #58722 because I missed it existed..!

@carsonbot carsonbot added this to the 7.3 milestone May 7, 2025
@MatTheCat MatTheCat force-pushed the ticket_60362 branch 2 times, most recently from 37d5d36 to 4648474 Compare May 13, 2025 12:22
@smnandre
Copy link
Member

If you want to check, started some work was done here #58722

(and was waiting for people to step in and help, so really glad you did here 👍 )

@MatTheCat MatTheCat force-pushed the ticket_60362 branch 3 times, most recently from 365d76d to f401b42 Compare May 22, 2025 16:47
@OskarStark

This comment has been minimized.

@smnandre

This comment has been minimized.

@fabpot fabpot modified the milestones: 7.3, 7.4 May 26, 2025
@MatTheCat MatTheCat force-pushed the ticket_60362 branch 3 times, most recently from 9fd9f8a to 4d298bf Compare May 30, 2025 10:02
@fabpot fabpot requested a review from chalasr as a code owner June 1, 2025 07:08
@MatTheCat MatTheCat force-pushed the ticket_60362 branch 2 times, most recently from f2d138f to 46efd35 Compare June 5, 2025 08:41
@@ -52,6 +52,7 @@ public function __construct(
private array $dependencies = [],
private array $fileDependencies = [],
private array $javaScriptImports = [],
public ?string $integrity = null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible i would make it readonly as the digest ere.. so not a ppp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it readonly, but why not a ppp?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep you're right, it's in fact the exact opposite situation that generated problems, when we after we added no porperties on one of the cached class... many people had problems during upgrade.

😶

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure to understand, but if old MappedAssets are serialized in a cache, accessing their new $integrity property would crash; is that what we must be guarding from?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that was that, proof i'm not clear in my head about this.

But yeah, should be attnetive that really was cause of frustrations for users.

@MatTheCat MatTheCat force-pushed the ticket_60362 branch 2 times, most recently from 9f28569 to 33b4561 Compare June 12, 2025 09:12
@MatTheCat MatTheCat changed the title [AssetMapper] Add integrity metadata to importmaps [AssetMapper] Allow adding integrity metadata to importmaps Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AssetMapper] Add integrity hashes to import maps
5 participants