-
Notifications
You must be signed in to change notification settings - Fork 61
#66 #72 #73 fixed missing --from
handling, minor version detection and scenario with no detected versions at all
#76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…OR* is picked Previously, only the *MINOR* version was being compared, leading to previous major versions being considered in the lookup for the lowest available stable release.
…itories The reasoning behind this is that `symfony/console` has a very squishy API, and that can lead to a lot of headaches in upgrades or implicit API changes. Having an E2E test will ensure that the implementation details of `symfony/console` are also considered, since the interfaces really just lie.
…se from empty `git tag` list
… comparisons on no valid detected versions
…d in the selected stable minor releases
@bendavies I integrated your commits. @ciaranmcnulty any suggestion for scenarios that I may not have covered yet? |
], | ||
$this->sourcesRepository | ||
))->mustRun(); | ||
(new Process( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These operations should likely be isolated in a private
method
|
||
EXPECTED | ||
, | ||
$errorOutput // @TODO this looks like a symfony bug - we shouldn't check STDERR, but STDOUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a problem. For some reason, everything is going to STDERR in my tests (tried manually via bash
, so the bug is with symfony/console
or with how we use it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked it up as well - unsure if that's the actual bug. I'll probably need to dump the streams and see if both point to STDERR by accident, because the output sure only is on STDERR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, we are manually splitting output between stderr/stdout ourselves.
If you specify --format=markdown
, stdout
is formatted markdown: stderr
contains the human-readable output, so this is the expectation. Not a symfony bug.
See these for stderr
being used:
$stdErr = $output->getErrorOutput(); |
BackwardCompatibilityCheck/src/Command/AssertBackwardsCompatible.php
Lines 151 to 153 in 9e95a60
$fromRevision = $input->hasParameterOption('from') | |
? $this->parseRevisionFromInput($input, $sourceRepo) | |
: $this->determineFromRevisionFromRepository($sourceRepo, $stdErr); |
(new SymfonyConsoleTextFormatter($stdErr))->write($changes); |
And then, markdown formatting if required:
BackwardCompatibilityCheck/src/Command/AssertBackwardsCompatible.php
Lines 190 to 192 in 9e95a60
if (ArrayHelpers::stringArrayContainsString('markdown', $outputFormats)) { | |
(new MarkdownPipedToSymfonyConsoleFormatter($output))->write($changes); | |
} |
This was done specifically so you can pipe output to a file - see PR #35 , specifically #35 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but in the test (also manual ones), redirecting output doesn't seem to have any effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to #79
|
||
JSON; | ||
|
||
private const CLASS_V1 = <<<'PHP' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These constants should be moved to an array
🚢 |
Fixes #66
Fixes #72
Fixes #73