-
-
Notifications
You must be signed in to change notification settings - Fork 269
Vendor mode in a custom project, with custom extensions #691
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
base: main
Are you sure you want to change the base?
Vendor mode in a custom project, with custom extensions #691
Conversation
I have a hard time understanding how this will lead to less maintenance than a fork. But if you'd like it for modularity reasons, I'll give it a shot locally over the next days. But since you've mentioned snowflake.so, using the glibc build and loading shared extendions is the absolutely easiest approach with zero maintenance on your part. |
I mainly aim these changes to use for extensions like snowflake and a extension we created ourself(compilation is similar to Snowflake). In case other people want to have their extensions available for the project without forking, this would be the easiest solution in stead of having a fork that can conflict on every commit pulling from upstream. So |
@DubbleClick I think the changes are ready, only to make it work in "vendor-mode" in the CI pipeline requires binary paths changes. Instead of |
I'll leave both of your PR's up to @crazywhalecc, he's the owner of the project and I don't see myself in a position to make decisions crucial to the project structure or workflow on my own. He'll be back from vacation soon! I really like the workflow PR though! |
@DubbleClick I don't have the need for the customize builder provider(yet). So I removed it for now. I wait for him to be back :) Hopefully he is refreshed after his holiday! Please feel free to point anything out of the ordinary, if you find any |
Unfortunately I ended my vacation a long time ago, but at the same time I was extremely busy at my day job.🥲 Don't worry though, I should have time to resolve remaining issues this week. |
Ah welcome back, I hope you had a good time. I'm really excited for the shared extensions, once it goes live we'll have full package support for frankenphp + frankenphp-xdebug and frankenphp-ffi in around a week. |
I'm not sure how much customization people will have for private extensions, but I think we should add skeleton commands once vendor mode is officially available. vendor/bin/spc dev:ext-skel myext
# And it will generate config, builder, add composer autoload if not exists, etc...
# BTW I also want it works in project mode, it will also save my time adding new extension. At the same time, for |
If private extensions are supported, perhaps an extension source of type=local is required? |
What does this PR do?
Minor changes for allowing to use the library in a custom project instead of forking and adjusting code within the "project base".
Thread of the question can be found in #687.
Added the following options to adjust:
BuilderProvider
after initializing.➜ poc-vendored-php-static-cli git:(main) tree --gitignore . ├── bin │ └── spc ├── composer.json ├── composer.lock ├── config │ ├── ext.json │ ├── lib.json │ └── source.json └── src ├── ConsoleApplication.php ├── MyCommand.php └── builder ├── extension │ └── snowflake.php ├── linux │ └── library │ └── snowflake.php ├── macos │ └── library │ └── snowflake.php └── unix └── library └── snowflake.php
Project example can be found here. In the example I have added
pdo_snowflake
extension, because I need it, and it gives a good example.Compling works, only the testing part fails at the moment due to PHP not using the
pdo_snowflake.so
file.Checklist before merging
*.php
, runcomposer cs-fix
at local machine.src/global/test-extensions.php
../docs/
.config/xxx.json
content, runbin/spc dev:sort-config xxx
.