Prints the rendered notes body for a released changelog version.
'changelog:show'
'Prints the notes body for a released changelog version.'
'This command renders the body of one released changelog section so it can be reused for GitHub release notes.'
Interfaces
Defines the logger contract consumed by reusable command result helpers.
Properties
Methods
Adds the standard JSON output options to the current command.
Configures the show command arguments and options.
Prints the rendered release notes body.
Determines whether JSON output was requested.
Determines whether pretty JSON output was requested.
Logs a failed command result and returns the failure exit code.
Logs an informational command message at notice level.
Logs a successful command result and returns the success exit code.
private
ChangelogManagerInterface
$changelogManager
private
FilesystemInterface
$filesystem
private
LoggerInterface
$logger
public
__construct(FilesystemInterface
$filesystem, ChangelogManagerInterface
$changelogManager, LoggerInterface
$logger) : mixed
Parameters
$logger
:
LoggerInterface
Adds the standard JSON output options to the current command.
protected
addJsonOption() : static
Return values
Configures the show command arguments and options.
protected
configure() : void
Prints the rendered release notes body.
protected
execute(InputInterface
$input, OutputInterface
$output) : int
Parameters
$input
:
InputInterface
$output
:
OutputInterface
Return values
Determines whether JSON output was requested.
protected
isJsonOutput(InputInterface
$input) : bool
Description
The pretty-json flag SHALL imply JSON output.
Parameters
$input
:
InputInterface
Return values
Determines whether pretty JSON output was requested.
protected
isPrettyJsonOutput(InputInterface
$input) : bool
Parameters
$input
:
InputInterface
Return values
Logs a failed command result and returns the failure exit code.
private
failure(
string
$message, InputInterface
$input[,
array<string, mixed>
$context = []][,
string|null
$file = null][,
int|null
$line = null]) : int
Parameters
$message
:
string
Description
the failure message
$input
:
InputInterface
Description
the originating command input
$context
:
array<string, mixed>
=
[]
Description
optional extra log context
$file
:
string|null
=
null
Description
the related file path when known
$line
:
int|null
=
null
Description
the related line when known
Return values
Logs an informational command message at notice level.
private
notice(
string
$message, InputInterface
$input[,
array<string, mixed>
$context = []]) : void
Parameters
$message
:
string
Description
the notice message
$input
:
InputInterface
Description
the originating command input
$context
:
array<string, mixed>
=
[]
Description
optional extra log context
Logs a successful command result and returns the success exit code.
private
success(
string
$message, InputInterface
$input[,
array<string, mixed>
$context = []][,
string
$logLevel = LogLevel::INFO]) : int
Parameters
$message
:
string
Description
the success message
$input
:
InputInterface
Description
the originating command input
$context
:
array<string, mixed>
=
[]
Description
optional extra log context
$logLevel
:
string
=
LogLevel::INFO
Description
the PSR-3 log level used for the successful result