Skip to content

#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

Merged
merged 13 commits into from
Jun 4, 2018

Conversation

Ocramius
Copy link
Member

Fixes #66
Fixes #72
Fixes #73

bendavies and others added 8 commits May 27, 2018 12:37
…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.
… comparisons on no valid detected versions
@Ocramius Ocramius added the bug label May 28, 2018
@Ocramius Ocramius added this to the 1.0.3 milestone May 28, 2018
@Ocramius Ocramius self-assigned this May 28, 2018
@Ocramius Ocramius requested a review from asgrim May 28, 2018 09:53
@Ocramius
Copy link
Member Author

@bendavies I integrated your commits.

@ciaranmcnulty any suggestion for scenarios that I may not have covered yet?

],
$this->sourcesRepository
))->mustRun();
(new Process(
Copy link
Member Author

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
Copy link
Member Author

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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.

Copy link
Member

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();

$fromRevision = $input->hasParameterOption('from')
? $this->parseRevisionFromInput($input, $sourceRepo)
: $this->determineFromRevisionFromRepository($sourceRepo, $stdErr);

(new SymfonyConsoleTextFormatter($stdErr))->write($changes);

And then, markdown formatting if required:

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)

Copy link
Member Author

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

Copy link
Member Author

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'
Copy link
Member Author

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

@Ocramius
Copy link
Member Author

Ocramius commented Jun 4, 2018

🚢

@Ocramius Ocramius merged commit 95b5c0d into master Jun 4, 2018
@Ocramius Ocramius deleted the fix/#66-#72-#73-handle-missing-cli-options branch June 4, 2018 16:05
uzibhalepu added a commit to uzibhalepu/BackwardCompatibilityCheck that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants