-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add support for os-families-exclude
in extensions composer.json
#116
base: main
Are you sure you want to change the base?
Conversation
93521d0
to
16b8734
Compare
os-families
in extensions composer.json
os-families-exclude
in extensions composer.json
a303ebf
to
71003c8
Compare
src/Command/CommandHelper.php
Outdated
return; | ||
} | ||
|
||
if (in_array(PHP_OS_FAMILY, $package->excludedOsFamilies, true)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must use the TargetPlatform
; since users of PIE can install a package for a different version of PHP than the one running PIE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I thought first. Does it mean that user can even build and install extensions for a different OS than the one running Pie with a cross compilation system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In practice, at the moment, no. Theoretically, it would be possible to change various command invocations and file operations to run against a remote PHP install. But, that hasn't been discussed though as whether it's something we even want to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right thanks, I'll do the update 👍
src/DependencyResolver/Package.php
Outdated
/** @param list<ConfigureOption> $configureOptions */ | ||
/** | ||
* @param list<ConfigureOption> $configureOptions | ||
* @param list<string> $excludedOsFamilies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be a list<OsFamily>
and create a new enum
for this with the allowed values:
- Windows
- BSD
- Darwin
- Solaris
- Linux
- Unknown
ref: https://www.php.net/manual/en/reserved.constants.php#constant.php-os-family
51387f8
to
0c2998a
Compare
Revamped the whole PR to address your comments.
|
0c2998a
to
69bed8b
Compare
69bed8b
to
cc4cdf8
Compare
This is great, love to exclude windows. |
cc4cdf8
to
2926ac4
Compare
… `composer.json`
2926ac4
to
f934832
Compare
Fix #106
Allows to specify OS families which the extension is incompatible with:
When the syntax is validated, I'll create a PR in Composer to allow the new key in the
Package::$phpExt
property.Related to ThePHPF/pie-design#29