Skip to content

T45 sharable stubs - #58

Merged
niden merged 4 commits into
masterfrom
T45-sharable-stubs
Oct 13, 2026
Merged

niden merged 4 commits into
masterfrom
T45-sharable-stubs

Conversation

@niden

@niden niden commented Oct 13, 2026

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • composer test, composer cs and composer analyze all pass
  • I have created a PR for the documentation about this change, if user facing

  • Added resources/stubs/shared/ (Crest\Generator\Stub::SHARED): the stubs that all flavors use. Crest looks for a stub in the project (resources/stubs/<flavor>/, then resources/stubs/shared/), then in the package (the same order).
  • Added Crest\Generator\Stub::packagedFolder() and packagedFolders(): the packaged folder of a stub, and of each stub of a flavor. The flavor folder wins on the same name.
  • Changed make:command: it runs in each flavor, and the command default path is in each flavor. command.stub and fragment-guidance-command.stub moved to resources/stubs/shared/.
  • Changed stub:publish: it also publishes the shared stubs, into resources/stubs/shared/. When the flavor folder of the project has a copy with the same name, that copy wins, and a note names it.
  • Removed the error no stubs are packaged for the '<flavor>' flavor of stub:publish: each flavor has the shared stubs.

Thanks

niden added 4 commits October 13, 2026 12:10
Assisted-by: Claude Code
Assisted-by: Claude Code
@niden
niden requested a review from Jeckerson October 13, 2026 17:14
@niden niden self-assigned this Oct 13, 2026
@niden niden added the enhancement New feature or request label Oct 13, 2026
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Code Metrics Report

master (58be8bd) #58 (1c56d2a) +/-
Coverage 99.5% 99.5% +0.0%
Test Execution Time 5s 7s +2s
Details
  |                     | master (58be8bd) | #58 (1c56d2a) |  +/-  |
  |---------------------|------------------|---------------|-------|
+ | Coverage            |            99.5% |         99.5% | +0.0% |
  |   Files             |               63 |            63 |     0 |
  |   Lines             |             1647 |          1667 |   +20 |
+ |   Covered           |             1640 |          1660 |   +20 |
- | Test Execution Time |               5s |            7s |   +2s |

Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)

Files Coverage +/- Patch Coverage Status
src/Command/Make/ActionCommand.php 100.0% 0.0% - modified
src/Command/Make/CommandCommand.php 100.0% 0.0% 100.0% modified
src/Command/Stub/PublishCommand.php 100.0% 0.0% 100.0% modified
src/Generator/Stub.php 100.0% 0.0% 100.0% modified
src/Project/Config.php 100.0% 0.0% 100.0% modified

Reported by octocov

@niden
niden merged commit 96342e0 into master Oct 13, 2026
24 checks passed
@niden
niden deleted the T45-sharable-stubs branch October 13, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant