Skip to content

Infer base64_decode for constant strings#5868

Closed
VincentLanglet wants to merge 1 commit into
phpstan:2.2.xfrom
VincentLanglet:base64
Closed

Infer base64_decode for constant strings#5868
VincentLanglet wants to merge 1 commit into
phpstan:2.2.xfrom
VincentLanglet:base64

Conversation

@VincentLanglet

Copy link
Copy Markdown
Contributor

No description provided.

@VincentLanglet VincentLanglet self-assigned this Jun 14, 2026
@VincentLanglet

VincentLanglet commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Do you know the shipmonk dead code detector lib @staabm ?
Any clue why it triggers new errors about unrelated files on such PR ?

Edit: Maybe @janedbal you'll know ?

@staabm

staabm commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

IIRC there is a open issue in which ondrej comments that we don't want base64 decoding because its a waste of resources

@VincentLanglet

Copy link
Copy Markdown
Contributor Author

IIRC there is a open issue in which ondrej comments that we don't want base64 decoding because its a waste of resources

This was implemented by the bot in #5866 because of the Static Analysis failures to ensure those call are not false

$enumAdapter = base64_decode('UEhQU3RhblxCZXR0ZXJSZWZsZWN0aW9uXFJlZmxlY3Rpb25cQWRhcHRlclxSZWZsZWN0aW9uRW51bQ==', true);

But I think the workaround with base64 can be removed #5869

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