static-php-cli icon indicating copy to clipboard operation
static-php-cli copied to clipboard

[RFC] 3.0 Updates - Vendor Mode Support

Open crazywhalecc opened this issue 2 months ago • 0 comments

[RFC] 3.0 Updates - Vendor Mode Support

For long time, the SPC can only be used as a standalone tool or complete CLI project for PHP, and there are almost no scalable ways and integration with existing PHP projects is not very good. Every project depends on SPC needs to fork, or clone, or download spc binary and call it using shell command.

In 3.0, we will support vendor mode for most PHP projects. That is, you can use composer require crazywhalecc/static-php-cli, and call SPC functions using PHP, or expand the usage of SPC, e.g. adding private extension support, re-use static lib packages for building other open-source apps, or even publishing your own rpm/deb packages, etc.

Regarding this part, there is no way to implement it yet, but in general, it is based on the following parts:

  • Skeleton command: allows you to create your own package with ease.
  • Custom command registry: expand the spc command ability.
  • Expose calling helper function: integrate build, install, patch process in your workflows or projects.

If you have any question or have better suggestions, please leave comment here with quote.

crazywhalecc avatar Nov 05 '25 05:11 crazywhalecc