Skip to content

[Notifier] Add exception for deprecated slack dsn #39310

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 1 commit into from
Dec 8, 2020
Merged

[Notifier] Add exception for deprecated slack dsn #39310

merged 1 commit into from
Dec 8, 2020

Conversation

malteschlueter
Copy link
Contributor

@malteschlueter malteschlueter commented Dec 4, 2020

Q A
Branch? 5.2
Bug fix? no
New feature? no
Deprecations? yes
Tickets Fix #39204
License MIT
Doc PR -

The DSN for the Slack integration changed again from 5.1 to 5.2. There was the idea to output an exception for that.

@derrabus
Copy link
Member

derrabus commented Dec 4, 2020

Thank you for working on this issue!

}

if ('/' !== $dsn->getPath()) {
throw new InvalidArgumentException(sprintf('Invalid "%s" notifier DSN: Using a dsn for slack webhooks has been removed (maybe you haven\'t update the DSN when upgrading from 5.1).', $dsn->getOriginalDsn()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better to use throw new IncompleteDsnException('Support for slack webhook dsn has been dropped since 5.2 (maybe you haven\'t updated the DSN when upgrading from 5.1).');?

Copy link
Member

Choose a reason for hiding this comment

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

I agree.

Please, change "webhook dsn" to "webhook DSN".

Copy link
Contributor

Choose a reason for hiding this comment

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

But Incomplete... is missleading, it's a wrong DSN... 🧐

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@OskarStark That was also my first thought but i wasn't sure if it is okay if i a add a new exception.

Copy link
Member

@jderusse jderusse left a comment

Choose a reason for hiding this comment

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

LGTM. Just the small wording suggested by @evertharmeling

Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

Could you also add the format DSN information in the README? We are doing this for almost all other providers and we forgot to do it here.

}

if ('/' !== $dsn->getPath()) {
throw new InvalidArgumentException(sprintf('Invalid "%s" notifier DSN: Using a dsn for slack webhooks has been removed (maybe you haven\'t update the DSN when upgrading from 5.1).', $dsn->getOriginalDsn()));
Copy link
Member

Choose a reason for hiding this comment

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

I agree.

Please, change "webhook dsn" to "webhook DSN".

@fabpot
Copy link
Member

fabpot commented Dec 8, 2020

Thank you @malteschlueter.

@fabpot fabpot merged commit 619d543 into symfony:5.2 Dec 8, 2020
@malteschlueter malteschlueter deleted the improvement/add-exception-for-deprecated-slack-dsn branch December 8, 2020 08:23
@fabpot fabpot mentioned this pull request Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants