Skip to content

[Contributing] Add more information on deprecations #12075

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
Aug 8, 2019

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Aug 1, 2019

The goal is to add information I gathered from @nicolas-grekas and others in reviews about what the core team expect when you deprecate / remove code.

I will add a section for "Features" later.

A feature is marked as deprecated by adding a ``@deprecated`` phpdoc to
relevant classes, methods, properties, ...::

/**
* @deprecated since vendor-name/package-name 2.8, to be removed in 3.0. Use XXX instead.
* @deprecated since Symfony 2.8.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the rewording here?

cc @greg0ire

Copy link
Contributor

@greg0ire greg0ire Aug 1, 2019

Choose a reason for hiding this comment

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

I added this after talking with @nicolas-grekas, what's the deal?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes you added the vendor/... thingy which now gets removed, that’s my point

Copy link
Contributor

Choose a reason for hiding this comment

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

I know, I was more asking @fancyweb or @nicolas-grekas to explain the sudden change of heart

Copy link
Member

Choose a reason for hiding this comment

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

I think the misunderstanding is because this is the "Contribute to Symfony" doc ... so it's not a generic-purpose doc and we don't need things like "vendor-name/package-name" because "vendor" is always "Symfony" and the "package-name" is not usually included in the Symfony deprecation messages.

Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding the package name, there is not always a way to guess it from a class name, for instance here:

https://github.com/symfony/var-exporter/blob/8539c2cec7202d244058075351c61aa852ffa344/Internal/Exporter.php#L120

Also, why remove the Use XXX instead. part? If there is a replacement, it should absolutely be mentioned IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The "use XXX instead" is not removed. This example is just below.

Copy link
Member

Choose a reason for hiding this comment

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

@greg0ire this link points to a notice, not to a deprecation :)

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

Choose a reason for hiding this comment

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

bad one indeed :)

@fancyweb
Copy link
Contributor Author

fancyweb commented Aug 2, 2019 via email

@fancyweb fancyweb force-pushed the more-contribution-precisions branch from b9efa28 to 5fabd5d Compare August 2, 2019 06:39
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

Thanks @fancyweb.

A feature is marked as deprecated by adding a ``@deprecated`` phpdoc to
relevant classes, methods, properties, ...::

/**
* @deprecated since vendor-name/package-name 2.8, to be removed in 3.0. Use XXX instead.
* @deprecated since Symfony 2.8.
Copy link
Member

Choose a reason for hiding this comment

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

I think the misunderstanding is because this is the "Contribute to Symfony" doc ... so it's not a generic-purpose doc and we don't need things like "vendor-name/package-name" because "vendor" is always "Symfony" and the "package-name" is not usually included in the Symfony deprecation messages.

@fancyweb fancyweb force-pushed the more-contribution-precisions branch from 5fabd5d to 71560da Compare August 6, 2019 09:24
@xabbuh xabbuh added this to the 3.4 milestone Aug 8, 2019
@xabbuh
Copy link
Member

xabbuh commented Aug 8, 2019

Thank you @fancyweb.

@xabbuh xabbuh merged commit 71560da into symfony:3.4 Aug 8, 2019
xabbuh added a commit that referenced this pull request Aug 8, 2019
…cyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[Contributing] Add more information on deprecations

The goal is to add information I gathered from @nicolas-grekas and others in reviews about what the core team expect when you deprecate / remove code.

I will add a section for "Features" later.

Commits
-------

71560da [Contributing] Add more information on deprecations
xabbuh added a commit that referenced this pull request Aug 8, 2019
@fancyweb fancyweb deleted the more-contribution-precisions branch August 8, 2019 14:14
OskarStark added a commit that referenced this pull request Aug 9, 2019
* 3.4:
  Add in the DOW crawler documentation code sample to show how to tick checkboxes
  Adds the most basic informations about loaders
  [#12075] fix some casing
  [Contributing] Add more information on deprecations
OskarStark added a commit that referenced this pull request Aug 9, 2019
* 4.3:
  Add in the DOW crawler documentation code sample to show how to tick checkboxes
  Adds the most basic informations about loaders
  [#12075] fix some casing
  [Contributing] Add more information on deprecations
OskarStark added a commit that referenced this pull request Aug 9, 2019
* 4.4:
  Add in the DOW crawler documentation code sample to show how to tick checkboxes
  Adds the most basic informations about loaders
  [#12075] fix some casing
  [Contributing] Add more information on deprecations
javiereguiluz added a commit that referenced this pull request Apr 10, 2020
…ted class (fsoedjede)

This PR was merged into the 3.4 branch.

Discussion
----------

[Contributing] Fix `trigger_error()` position in deprecated class

The code was added in commit: a2c04e7

The change introducing the issue was added in the PR: #12075

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

0dc5efc [Contributing] Fix `trigger_error()` position in deprecated class
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.

8 participants