Skip to content

refactor: reorganize commands into Console namespace with dependency injection#42

Merged
coisa merged 14 commits intomainfrom
feature/refactor-command-structure
Apr 13, 2026
Merged

refactor: reorganize commands into Console namespace with dependency injection#42
coisa merged 14 commits intomainfrom
feature/refactor-command-structure

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 13, 2026

Summary

  • Move all commands from src/Command/ to src/Console/Command/
  • Add ComposerJson dependency to commands that need it
  • Add new Console application structure (DevTools, CommandLoader)
  • Add PSR implementations (Container, Clock)
  • Add container configuration file
  • Update documentation to reflect new structure
  • Fix test mocks to work with new command constructors

Changes

Namespace Changes

  • Commands: FastForward\DevTools\Command\*FastForward\DevTools\Console\Command\*
  • New classes in FastForward\DevTools\Console\*
  • New PSR implementations in FastForward\DevTools\Psr\*

New Dependencies

  • ComposerJson added to commands that need to read composer.json

Documentation Updates

  • Update docs to reflect new namespace structure
  • Update command references

Note

Some tests need additional updates to match new command constructors. Tests that need updating will fail until adapted.

Closes #41

coisa added 13 commits April 13, 2026 14:49
- Simplified command instantiation in CopyLicenseCommandTest and DocsCommandTest.
- Improved test structure and readability in GitAttributesCommandTest and PhpDocCommandTest.
- Updated ReportsCommandTest to remove unnecessary command mocks.
- Enhanced TestsCommandTest and WikiCommandTest with ComposerJson mocking.
- Introduced ComposerJsonTest to validate ComposerJson accessors and behavior.
- Added DevToolsCommandLoaderTest to ensure only instantiable commands are registered.
- Refactored DevToolsTest to utilize CommandLoaderInterface for command management.
- Enhanced PlaceholderResolverTest and ReaderTest with ClockInterface for date handling.
- Added JoliNotifExecutionFinishedSubscriberTest to validate notification behavior on test execution.
- Introduced SystemClockTest to verify current date-time retrieval.
- Added ContainerTest to validate static container behavior and configuration loading.

Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
… for dependency injection

Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
…ServiceProvider documentation

Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
…er, SystemClock, and DevToolsServiceProvider classes

Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
…ibutesCommand constructor

Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
…nizer constructor

Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
…lass

Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
@coisa coisa merged commit 3c0490b into main Apr 13, 2026
8 checks passed
@coisa coisa deleted the feature/refactor-command-structure branch April 13, 2026 21:17
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.

[feature] Integrate PHP-DI for dependency injection control

1 participant