afrihost/base-command-bundle
Symfony bundle providing an opinionated base class for console commands to reduce boilerplate. Adds built-in initialization for common needs like logging and locking, with global defaults via config and per-command or runtime overrides for flexible behavior.
Patch release to enforce dropping of support for PHP 7.0
Symfony 4 support!
This release introduced support for Symfony 4 while still maintaining support for Symfony 3. In the process we have dropped support for PHP 7.0 and HHVM but added Travis CI test coverage for PHP 7.3 and 7.4
Symfony 3 support!
With this major version bump, we now support Symfony 3. In the process, we have have removed support for PHP 5 and Symfony 2 on the latest version. If you still require these, you can continue to use the Zero Version (~0.6) which will get important bug and security fixes but will not have features backported
Stable release supporting Symfony 2 and PHP 5.
Note: Support for Symfony 2 and PHP 5 is still available under version zero (~0.6). We will continue to publish any important bug and security fixes as point releases on this version, however, new features will not be backported. The current version supports Symfony ~3.0 and PHP ~7.0
This point release removes test files from the distributed version of the library.
If composer is run with the --prefer-dist parameter, our Tests directory will not be included in the vendors directory of your project. This should help with some IDEs that are confused by the bundled test Symfony Application.
This point release changes the name of lock files from being based on the name of the implementing class to being based on the name of the log file.
The premise is that if a command is logging to a separate file, it likely has its own purpose and thus needs its own lock. An example might be is a command spawns copies of itself to do processing in parallel.
The functionality will be made more configurable in a minor release
This release adds functionality configure whether line breaks are stripped from log entries
allow_line_breaks configuration option for each hander strategyThis release is the result of a refactoring of the locking functionality and some nice community contributions.
parent::configure() when providing your own configure() function. This was achieved via moving the logic in to an onConsoleCommand event. This fixes a range of errors resulting from inconsistent configurationThis release contains a bunch of features that were a result of a refactor of the logging functionality to achieve configuration consistency.
BaseCommandExceptionBaseCommandException is now thrown if the same command object is executed twice. This is a protection mechanism as the configuration and class variables are not reset in between executions and thus unintentionally running the same object twice will likely have unintended results.setAllowMultipleExecution() functionconfigure() function is called in overridden versions of the functioninitialize() function in BaseCommand is also called to help the user in debugging why the bundle's functionality is not workingsetLogFilename()) have all had their visibility updated to protected to make the public interface of your command cleanergetLogFilename() now takes an optional boolean parameter to return just the filename. Previously it also included the full path to the file which meant that is was to symmetric with setLogFilename()setDefaultLogFileExtension()setLogToFile()setFileLogLineFormat() and setConsoleLogLineFormat(). NULL is a valid value for both functions if you would like to revert of Monolog's default formatfile_extention configuration option has been fixed to be file_extensiondefault to file_stream--log-filename parameterThis minor release contains a large number or changes focused around new functionality. The highlights include
setDefaultLocking() and getDefaultLocking() have been replaced by setLocking() and isLocking() for consistency with the rest of the interfaceLocking gives you the ability to avoid two things running the same command at the same time. It uses the Symfony LockHandler
Main feature addition is configurability via config.yml
How can I help you explore Laravel packages today?