Skip to content

Hide the already safe pack() function #664

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

cedric-anne
Copy link
Contributor

The pack() function is already safe since PHP 8.0, but its documentation has only been fixed in PHP 8.4.

With the current state of the generated code, PHPStan results differs depending on the PHP version. In PHP < 8.4, it considers the usage of pack as unsafe while it does not consider it is an issue in PHP 8.4. This requires to create a specific PHPStan baseline for PHP < 8.4 when the target project PHPStan checks are expected to pass on every supported PHP version.

Copy link
Collaborator

@silasjoisten silasjoisten left a comment

Choose a reason for hiding this comment

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

Thank you!

@silasjoisten silasjoisten merged commit ced9bc7 into thecodingmachine:master May 13, 2025
1 check passed
@cedric-anne cedric-anne deleted the fix/pack branch May 13, 2025 11:40
@silasjoisten
Copy link
Collaborator

released in v3.2.0

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