Skip to content

Enhance Docker container management with new commands and cleanup features.#18

Merged
gustavofreze merged 1 commit intomainfrom
feature/develop
Apr 13, 2026
Merged

Enhance Docker container management with new commands and cleanup features.#18
gustavofreze merged 1 commit intomainfrom
feature/develop

Conversation

@gustavofreze
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 13, 2026 21:47
@gustavofreze gustavofreze merged commit f6bc5d0 into main Apr 13, 2026
8 checks passed
@gustavofreze gustavofreze deleted the feature/develop branch April 13, 2026 21:50
Copy link
Copy Markdown

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 expands the library’s Docker container lifecycle support by introducing a dedicated Flyway container API and adding managed-resource cleanup (container removal + labeled network pruning), along with documentation and test updates.

Changes:

  • Added FlywayDockerContainer / FlywayContainer for configuring and running Flyway commands against a MySQL source.
  • Introduced managed-resource cleanup via ContainerStarted::remove() and ContainerStarted::stopOnShutdown(), plus labeled network creation and pruning.
  • Updated unit/integration tests, README, and Makefile to reflect parallel image pulls, Flyway usage, and managed network labeling.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/bootstrap.php Enables strict typing for the test bootstrap.
tests/Unit/MySQLDockerContainerTest.php Adds unit coverage for new MySQL container API usage and cleanup delegation.
tests/Unit/Mocks/TestableFlywayDockerContainer.php Test-only subclass to build Flyway containers with an injected mock client.
tests/Unit/Mocks/ClientMock.php Extends the client mock to touch timeout-aware commands during execution.
tests/Unit/Internal/Commands/DockerCommandsTest.php Adds unit tests asserting command-line generation for new/internal Docker commands.
tests/Unit/GenericDockerContainerTest.php Updates network-create expectations and adds tests for remove/shutdown behaviors.
tests/Unit/FlywayDockerContainerTest.php Adds comprehensive unit tests for Flyway container configuration and commands.
tests/Integration/DockerContainerTest.php Migrates integration coverage to the new Flyway container API and shutdown cleanup.
src/MySQLDockerContainer.php Refactors constructor to property promotion and preserves setup command behavior.
src/Internal/Containers/Started.php Implements remove() and stopOnShutdown() for started containers.
src/Internal/Containers/Models/ContainerId.php Reorders constants (no functional change).
src/Internal/Containers/Drivers/MySQL/MySQLStarted.php Exposes remove() / stopOnShutdown() via the MySQL started wrapper.
src/Internal/Containers/Drivers/MySQL/MySQLCommands.php Reorders constants (no functional change).
src/Internal/Commands/DockerRun.php Adds a managed label and injects it into docker run invocations.
src/Internal/Commands/DockerRemove.php Adds a docker rm --force --volumes command abstraction.
src/Internal/Commands/DockerNetworkPrune.php Adds a labeled docker network prune command abstraction.
src/Internal/Commands/DockerNetworkCreate.php Ensures auto-created networks are labeled for safe cleanup.
src/GenericDockerContainer.php Refactors constructor to property promotion.
src/FlywayDockerContainer.php New implementation providing Flyway-focused API over GenericDockerContainer.
src/FlywayContainer.php New public contract defining the Flyway container API.
src/Contracts/ContainerStarted.php Extends the public started-container contract with remove/shutdown cleanup methods.
README.md Documents Flyway container usage, shutdown cleanup, and parallel image pulls; updates examples/wording.
Makefile Labels the test network and removes unnecessary volume setup.
.claude/rules/code-style.md Updates/clarifies code-style guidance around empty-string checks.

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