athena-framework / athena

An ecosystem of reusable, independent components
https://athenaframework.org
MIT License
211 stars 17 forks source link

Provide utility method to run a console application #413

Closed Blacksmoke16 closed 4 months ago

Blacksmoke16 commented 4 months ago

Context

When using the framework's Athena::Console integration, you needed to access and run a specific service from the container via ADI.container.athena_console_application.run. This isn't the most user friendly, so this PR adds ATH.run_console, similar to ATH.run, but for the console context.

This also provides a level of abstraction in case something changes in the future, the user won't have to update their code.