Skip to content

Issue/606 Make install:openapi create the folders it needs - #608

Merged
armanist merged 1 commit into
quantum-php:masterfrom
armanist:issue/606-openapi-install-folders
Oct 23, 2026
Merged

armanist merged 1 commit into
quantum-php:masterfrom
armanist:issue/606-openapi-install-folders

Conversation

@armanist

@armanist armanist commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #606. Part of #595. The changelog entry is written in a final pull request, after the sub-issues.

What changed

  • install:openapi creates modules/<Name>/resources before resources/openapi when the module has no resources folder, for example one generated from the DefaultApi template.
  • copyResources() creates the public/assets/OpenApiUi folder before copying the Swagger UI files into it.
  • testGenerateOpenapiSpecificationCreatesSpecFile used an @OA docblock fixture and only checked that spec.json was not empty, so it passed with an empty specification now that doctrine/annotations is gone. Its fixture is an attribute and it checks the title.

Why

Both folders were assumed to exist. Without them the command failed with mkdir(): No such file or directory and copy(...): Failed to open stream.

LocalFileSystemAdapter::makeDirectory() is not made recursive, because other callers depend on it.

Breaking changes

  • None.

Testing

  • New: testCopyResourcesCreatesTheTargetFolderWhenItIsMissing and testExecCreatesTheResourcesFoldersOfAModuleWithoutThem (runs the whole command on a module without resources). Both fail without the fix.
  • Changed: testGenerateOpenapiSpecificationCreatesSpecFile now asserts the specification title.
  • Known gap: the fix was not re-run end to end in a skeleton project; the two new tests cover each missing folder.

@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@quantum-php quantum-php deleted a comment from coderabbitai Bot Oct 23, 2026
@armanist
armanist merged commit 883b5c7 into quantum-php:master Oct 23, 2026
7 checks passed
@armanist
armanist deleted the issue/606-openapi-install-folders branch October 23, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make install:openapi create the folders it needs

1 participant