Skip to content
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

added upgrade note for deprecated container property #1089

Merged
merged 1 commit into from
Sep 21, 2016

Conversation

codebach
Copy link
Contributor

@codebach codebach commented Jul 29, 2016

I am targetting this branch, because it is upgrade not of this branch.

refs #1035

@greg0ire
Copy link
Contributor

it is upgrade not of this brunch.

Makes me hungry ;)

@core23
Copy link
Member

core23 commented Jul 29, 2016

We don't need this, because the property is already marked as @deprecated.

@core23 core23 closed this Jul 29, 2016
@greg0ire
Copy link
Contributor

We don't need this, because the property is allready marked as @deprecated.

Is this enough? We are providing deprecation messages, but for each of them, we also have an upgrade note, right?

@core23
Copy link
Member

core23 commented Jul 29, 2016

IMO, we have enough information for developers. It is marked as @deprecated and we throw a trigger_error for this. The Upgrade note for the next major release also have short note.

@codebach
Copy link
Contributor Author

codebach commented Jul 29, 2016

Was requested by @soullivaneuh FYI
#1035 (comment)

And it is also written here under the Deprecated title : https://github.com/sonata-project/SonataMediaBundle/releases/tag/3.1.0

@greg0ire
Copy link
Contributor

Let's reopen and assign this to @soullivaneuh , ok?

@core23
Copy link
Member

core23 commented Aug 19, 2016

@soullivaneuh should we add this note to the UPGRADE-3.x.MD file?

@soullivaneuh
Copy link
Member

@soullivaneuh should we add this note to the UPGRADE-3.x.MD file?

It was always like this. All deprecation must be documented.

BTW, this should not be just be a line with which is deprecated, but a full description with example of before/after implements.

Because if we just write a line, indeed the @deprecated line would be enough. 😉

Just see the Symfony upgrades guide for inspiration, it's quite well formatted.


### Deprecated

`$container` property in `Security/SessionDownloadStrategy` is deprecated. Use `SessionInterface` `$session` instead.
Copy link
Member

Choose a reason for hiding this comment

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

Please add example of before/after implementation. Looks symfony upgrade guides for inspirations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is it ok like this @soullivaneuh ?

Copy link
Member

Choose a reason for hiding this comment

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

Looks ok but I'm not an expert of media-bundle so I don't know if the example is enough.

cc @sonata-project/contributors for review.

Before:

```php
$downloadStrategy = new SessionDownloadStrategy($translator, $container, $times);
Copy link
Member

Choose a reason for hiding this comment

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

hmm, I am missing the typehint here, maybe its better so show the __construct() method with their typehints here to see the difference? @greg0ire

Copy link
Contributor

Choose a reason for hiding this comment

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

I think people know what $container and $session probably refer to ;)

Copy link
Member

Choose a reason for hiding this comment

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

ok, then lets merge as it is! 👍

@OskarStark OskarStark merged commit 869a7b7 into sonata-project:3.x Sep 21, 2016
@OskarStark
Copy link
Member

Thank you @ahmetakbn 👍

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.

6 participants