Skip to content

PHP 7.3 polyfill is not necessary because PHP 7.4 is required #1167

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
Sep 21, 2023

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Sep 20, 2023

I think it has been forgotten in #1128

  • PHP 7.4 don't need PHP.3 polyfill
  • the function get_debug_type from PHP 8.0 polyfill is used
  • the function array_is_list from PHP 8.1 polyfill is used

The benchmark sub-project requires PHP 8.1, I disable the installation of this polyfills.

@GromNaN GromNaN requested review from jmikola and alcaeus September 20, 2023 20:13
"type": "path",
"url": "../",
"symlink": true
"name": "mongodb/mongodb-benchmark",
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix indentation.

Comment on lines +11 to +14
"replace": {
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
Copy link
Member Author

Choose a reason for hiding this comment

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

The benchmark sub-project requires PHP 8.1, I disable the installation of this polyfills.

Copy link
Member

Choose a reason for hiding this comment

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

Is this the preferred method to avoid installing polyfills that are indirect dependencies? I suppose in an ideal world the polyfill packages would have some way to note that they're redundant for newer PHP versions (an inverse of requires), but there's no composer.json syntax for that.

Copy link
Member

Choose a reason for hiding this comment

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

Strictly speaking, it's not necessary to prevent installing the polyfills. The polyfill itself checks if the function exists and doesn't register itself if it does.

That said, I'm fine including these directives here until we can use PHP 8.1.

Comment on lines +11 to +14
"replace": {
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
Copy link
Member

Choose a reason for hiding this comment

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

Is this the preferred method to avoid installing polyfills that are indirect dependencies? I suppose in an ideal world the polyfill packages would have some way to note that they're redundant for newer PHP versions (an inverse of requires), but there's no composer.json syntax for that.

@GromNaN GromNaN merged commit ffc2d69 into mongodb:master Sep 21, 2023
@GromNaN GromNaN deleted the php73-polyfill branch September 29, 2023 12:39
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.

3 participants