Skip to content
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 dev command: extension dumper for SPC #338

Open
crazywhalecc opened this issue Feb 13, 2024 · 1 comment
Open

Add dev command: extension dumper for SPC #338

crazywhalecc opened this issue Feb 13, 2024 · 1 comment
Labels
enhancement New feature or request kind/framework Issues related to CLI app framework
Milestone

Comments

@crazywhalecc
Copy link
Owner

What is extension dumper

Print required extensions from your composer project.

  1. Read custom vendor/composer/installed.json or vendor/composer/installed.php file.
  2. Get all extensions from composer generated file (reading ext-* word).
  3. Print extensions.
@crazywhalecc crazywhalecc added enhancement New feature or request kind/framework Issues related to CLI app framework labels Feb 13, 2024
@crazywhalecc crazywhalecc added this to the 2.1 Release milestone Feb 13, 2024
@crazywhalecc crazywhalecc changed the title Add extension dumper command for SPC Add dev command: extension dumper for SPC Feb 13, 2024
@CyberLine
Copy link
Contributor

CyberLine commented Jan 31, 2025

As we already do this with bash and jq for composer.json maybe i can start implementing this if its more clear what the goal of this should be:

cat composer.json | jq -r '[.require | keys[] | select(startswith("ext-")) | split("ext-") | join("")] | join(" ")'
curl iconv imap json mbstring pcntl pcre pdo redis

or based on installed.json:

cat vendor/composer/installed.json | jq -r '[.packages[] | select(.require) | .require | keys[] | select(startswith("ext-")) | split("ext-") | join("")] | unique | join(" ")'
ctype curl dom filter iconv intl json libxml mbstring phar posix redis simplexml tokenizer xml xmlwriter

composer.lock in the same project! returns another set of extensions:

cat composer.lock | jq -r '[.packages[] | select(.require) | .require | keys[] | select(startswith("ext-")) | split("ext-") | join("")] | unique | join(" ")'
ctype curl dom filter iconv intl json mbstring posix redis tokenizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/framework Issues related to CLI app framework
Projects
None yet
Development

No branches or pull requests

2 participants