Skip to content

Conversation

@hans-thomas
Copy link
Contributor

Hello, everyone. The FinishedSubscriber will be called after every test, but the ExecutionFinishedSubscriber will be called after all tests are executed.
Also, by adding this extension to the phpunit.xml file, this process can be done automatically, which would be great for devs who don't need to concern themselves with calling this command after every test run.

<phpunit>
    // ...
    <extensions>
        <bootstrap class="Tests\Extensions\Swagger\SwaggerExtension"/>
    </extensions>
</phpunit>

Also, I updated the README file to make more complete the information described.

@sonarqubecloud
Copy link

@hans-thomas hans-thomas force-pushed the new-phpunit-extention branch 3 times, most recently from 1c0fdb9 to 69a7503 Compare April 18, 2025 19:31
@hans-thomas hans-thomas requested a review from DenTray April 18, 2025 19:33
@hans-thomas hans-thomas force-pushed the new-phpunit-extention branch 2 times, most recently from daff349 to e926dc5 Compare April 18, 2025 19:48
@sonarqubecloud
Copy link

@hans-thomas
Copy link
Contributor Author

Hi @DenTray, what should I do to get this PR done?

@astorozhevsky astorozhevsky requested a review from Copilot August 28, 2025 09:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new PHPUnit event subscriber to automatically save Swagger documentation after all tests are executed and updates the README with improved documentation. The changes simplify the integration by removing Laravel application bootstrapping logic and providing better setup instructions for developers.

  • Removes manual Laravel application bootstrapping from the PHPUnit subscriber
  • Updates README with clearer installation steps and configuration examples
  • Improves documentation formatting and clarity throughout

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Support/PHPUnit/EventSubscribers/SwaggerSaveDocumentationSubscriber.php Simplifies the subscriber by removing Laravel bootstrap logic and unused imports
README.md Enhances documentation with better formatting, clearer instructions, and improved language

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

# Conflicts:
#	src/Support/PHPUnit/EventSubscribers/SwaggerSaveDocumentationSubscriber.php
@hans-thomas hans-thomas force-pushed the new-phpunit-extention branch from e926dc5 to 76b77de Compare August 31, 2025 12:43
@sonarqubecloud
Copy link

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.

2 participants