Skip to content

Require php-64bit to install phinx #2169

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
Jan 7, 2023
Merged

Require php-64bit to install phinx #2169

merged 1 commit into from
Jan 7, 2023

Conversation

MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Jan 7, 2023

PR modifies the composer.json such that now installing phinx will only work on php-64bit, which should hopefully avoid errors as shown in #2111 going forward. I think that the number of people using 32-bit PHP is probably low enough to not worry much about having them be stuck on an old version of phinx not realizing it'll break for them, where it's just people using PHP on windows and wherever they're getting PHP is pulling the modern x64 builds.

An alternative approach would be to rewrite phinx such that $version could be a string throughout and that we use an alternative data structure than an associative array for sorting migrations keyed by the version (due to how PHP implicitly cast integer looking keys to integers), but I'd say that's a lot of work to benefit a very small number of people.

Signed-off-by: Matthew Peveler <[email protected]>
your first database migration. Phinx is just about migrations without all the
bloat of a database ORM system or application framework.

Phinx requires a 64-bit version of PHP to function.
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 only real change here is the addition of this line. I only added line breaks to the above paragraph.

@@ -36,7 +36,7 @@
}
],
"require": {
"php": ">=7.2",
"php-64bit": ">=7.2",
Copy link
Member

Choose a reason for hiding this comment

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

Didnt know this exists

Copy link
Member Author

Choose a reason for hiding this comment

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

Neither did I until working on this ticket, but https://getcomposer.org/doc/01-basic-usage.md#platform-packages makes it sound like it'll work how we'd want.

@dereuromark dereuromark merged commit 9378544 into 0.x Jan 7, 2023
@dereuromark dereuromark deleted the chore-php-64bit branch January 7, 2023 03:26
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