-
Notifications
You must be signed in to change notification settings - Fork 179
Prepare release 2.0 #90
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
I'm trying to upgrade my project to SF v4.0.0-RC1 but it fails because this bundle is ready for SF 4. It would be great if we could tag the 2.0-alpha1 release or something. That way, I can use this to test if the SF 4 stuff actually works :) It will greatly help people that are already testing SF 4 and are preparing for when it's officially released. |
@ruudk maybe you can [EDIT] Also, it would be great if you could post your feedback here, I don't have an upgradable, real app to use as a test... So a π from a real app with SF 4 would be greatly appreciated! π |
@Jean85 Yeah, silly, I was just trying that :) Tx! |
@ruudk have you encountered any issues with Symfony 4? Is error reporting working well? |
Well, I didn't upgrade to SF 4 yet because many deps are blocking it :( Had to wait for a couple of packages (behat for example( |
19bf1bd
to
0e5fd35
Compare
Finally cleaned this up! |
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.
i didnt actually QA the changes, but the majority of it looks super straight forward
(sorry for the delay!)
I'm guess this looks good but I do wonder if we really can no longer support |
{ | ||
return PrettyVersions::getVersion('sentry/sentry-symfony') | ||
->getPrettyVersion(); | ||
} |
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.
Not really a fan that this now requires jean85/pretty-package-versions
that in turn requires ocramius/package-versions
.
Is this really that important? Can't we just automate this with a tag-and-release script?
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 it's really helpful. In the past we made mistakes with some releases, because it's pretty easy to forget to change that constant, and it's even easier to mess with that during merges.
ocramius/package-versions
+ PrettyVersions
is 4 classes tops, and it's perfectly lightweight, since it operates during composer install: it pre-populates an array with all the versions, so at runtime it is very fast.
I'm currently using it twice, because I use the PrettyVersions
to append the application version to Sentry's reports; I think I'll append a tutorial about that in the readme.
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.
Obviously the previous answer is for @stayallive too, since it raised the same concern.
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.
I would like to veto this change. Also because it breaks the VERSION
constant which people might already use. Can we instead just have a release script?
@jan-auer can hook up our release bot with this so it's automated when tags are pushed.
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.
Where does this get released? Just composer or something else, too?
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.
@mitsuhiko this is obviously to be released as a new major version, so BC should be allowed (if we want to follow semver, and IMHO we should).
@jan-auer yes this bundle is be released on Packagist/Composer only.
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.
I'm not sure how the bot should help there. As far as I know, packagist just requires you to check in a composer.json in the root folder and does the rest automatically, no?
@Jean85 so we recently made this small GitHub bot that triggers releases based on tags. It requires all status checks (e.g. Travis, AppVeyor, CodeCov, ...) to succeed before that. Essentially enables the following workflow: tag, push, wait, done. This is especially useful for releases that would otherwise require us to do multiple manual steps.
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.
@jan-auer the issue here is that if you tag, you have basically already released it. Packagist picks up tags as releases, so it's already too late, especially if you made a mistake.
That's a big issue here because the dispute is about the VERSION
constant, which is used to send that info to Sentry as an info on each event, and forgetting to update it so has some real consequences.
As an example, tt already happened in 1.0.1 and 0.8.4 up to 0.8..6, so I'm not talking hypotetically.
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.
Looks good, missing some return type (for consistency sake) but very clean overall.
I would like to add a +1 for not removing the VERSION
constant since it's so simple and fast and remove a few dependencies. IMHO error tracking should be lean and mean.
*/ | ||
public function onConsoleException(ConsoleExceptionEvent $event) | ||
public function onConsoleException(ConsoleErrorEvent $event) |
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.
You are missing the void
return type here (saying since you added it everywhere).
@@ -142,7 +143,7 @@ public function onConsoleException(ConsoleExceptionEvent $event) | |||
$this->client->captureException($exception, $data); | |||
} | |||
|
|||
protected function shouldExceptionCaptureBeSkipped(\Exception $exception) | |||
protected function shouldExceptionCaptureBeSkipped(\Throwable $exception) |
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.
Missing return type bool
.
*/ | ||
public function onConsoleException(ConsoleExceptionEvent $event); | ||
public function onConsoleException(ConsoleErrorEvent $event); |
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.
Missing void
return type.
I've fixed the missing return types reported by @stayallive; for the drop of the
I'll wait to next week before merging this, so we can continue the discussion if needed. |
@Jean85 I don't care about it being a static or non static method but that it's no longer a constant. The entire point of that constant is that you can compare it. This means that from one version to another we changed the way to check for the version. That's less than ideal for users. |
@mitsuhiko on the end-user side, it's the same: // before
$expectedVersion = '1.0';
SentryBundle::VERSION === $expectedVersion;
// after
SentryBundle::getVersion() === $expectedVersion;
This IMHO will mean more precise info on the user side, and a reduced effort on the maintaner (our) side. |
@Jean85 This requires the present of a |
@ruudk the presence of the [EDIT] Also, the Sentry client/bundle versions are highly relevant when reporting bugs to us, otherwise it's really hard to track those down! I would like also to add that |
Ok, that is clever :) |
Hello, I'm not really sure whether the error comes from my setup or not but here is what I got on a sf4 app recently upgraded from beta : Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to Sentry\SentryBundle\EventListener\ExceptionListener::onConsoleException() must be an instance of Symfony\Component\Console\Event\ConsoleErrorEvent, instance of Symfony\Component\Console\Event\ConsoleExceptionEvent given |
Umh that's pretty strange, @kermorgant are you sure you were using symfony/console 4.0? |
...sorry for that, it was indeed version 3.3. now upgraded to 4.0.1 |
that means that we should require |
@ruudk if you require I will try to fix that. |
I was confused by @kermorgant because he said he got the error while using 3.3 and this PR required |
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.
No Symfony man, but eyeballing (read: did not test on my machine) this looks good π
You should fix Travis though before merging π
3dd9eb5
to
3aaa5af
Compare
Thanks @stayallive, now I've fixed it! I'll merge this now, and open a new PR to add some more testing. |
Congrats on this release π Great work everybody π |
DO NOT MERGE BEFORE #87!! Also wait for Symfony 4.0 release, so it will be tested in Travis CI.
This follows #89: