-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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 php extension packages #11795
Conversation
Also, should the ValidatingArrayLoader enforce that an extension package only defines links (requirements and conflicts) on platform packages ? It would not make any sense for an extension to depend on a userland package AFAICT. |
res/composer-schema.json
Outdated
@@ -6,7 +6,7 @@ | |||
"name": { | |||
"type": "string", | |||
"description": "Package name, including 'vendor-name/' prefix.", | |||
"pattern": "^[a-z0-9]([_.-]?[a-z0-9]+)*\/[a-z0-9](([_.]|-{1,2})?[a-z0-9]+)*$" | |||
"pattern": "^([a-z0-9]([_.-]?[a-z0-9]+)*\/[a-z0-9](([_.]|-{1,2})?[a-z0-9]+)*|ext-[a-z0-9]([_.-]?[a-z0-9]+)*)$" |
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.
Questions have been raised about the naming here; so we should agree first on the best approach on ThePHPF/pie-design#8 before merging this IMO
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.
I have rolled back the ext- package naming changes for now, so IMO this would be mergeable as is as a first step. What do you think?
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.
IMO this would be mergeable as is as a first step. What do you think?
Question: if someone adds a package which has a type php-ext
/php-ext-zend
to their project's composer.json
, for example say we have xdebug/xdebug
eventually, what will Composer do? will it download the source code into their vendor
directory?
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.
Yes.. Not sure if we should prevent this or leave it as an exercise to the reader. I think I could pretty easily just ignore these packages in the solver and make them invisible to Composer.
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.
Ok done
NOTE: the composer validate won't work until Composer 2.8 is released see: composer/composer#11795
Basic infrastructure to let pie reuse Composer code for PHP extension packages.