8000 Deprecations by nicolas-grekas · Pull Request #12968 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Deprecations #12968

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 7 commits into from
Dec 20, 2014
Merged

Deprecations #12968

merged 7 commits into from
Dec 20, 2014

Conversation

nicolas-grekas
Copy link
Member
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #12625, #12605, #12628, #12622, #12642, #12609, #12651, #12604, #12607, #12667, #12648
License MIT
Doc PR -

Cherry-picking some pending PRs to make them move forward

if (__CLASS__ !== $defClass) {
trigger_error(sprintf('Calling %s::init() was deprecated in Symfony 2.3 and will be removed in 3.0. Move your logic to the constructor instead.', $defClass), E_USER_DEPRECATED);
$this->init();
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm not convinced this is worth the overhead.

Copy link
Member Author

Choose a reason for hiding this comment

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

I should benchmark with https://blackfire.io/ :)
As this is executed only once, I'm not sure this is relevant.
Is there any better way?

@@ -85,7 +87,7 @@
*
* @Event
*/
const BIND = 'form.bind';
const BIND = Deprecated::BIND;
Copy link
Contributor

Choose a reason for hiding this comment

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

this will autoload the referenced class or not? and thus trigger the deprecation even when the constant is no used at all?!

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 the trick: PHP lazy loads values of constants, so this won't be triggered unless used.

Copy link
Member

Choose a reason for hiding this comment

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

is it true for HHVM too ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like so: http://3v4l.org/vETtp

@fabpot
Copy link
Member
fabpot commented Dec 20, 2014

Thank you @nicolas-grekas.

@fabpot fabpot merged commit badf8fc into symfony:2.7 Dec 20, 2014
fabpot added a commit that referenced this pull request Dec 20, 2014
…cmorales)

This PR was merged into the 2.7 branch.

Discussion
----------

Deprecations

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12625, #12605, #12628, #12622, #12642, #12609, #12651, #12604,  #12607, #12667, #12648
| License       | MIT
| Doc PR        | -

Cherry-picking some pending PRs to make them move forward

Commits
-------

badf8fc [Form] Log deprecation of constants, fixes #12607 #12667
1d58df4 Fix deprecation notice on VirtualFormAwareIterator
e2a19ee Add a deprecation note about VirtualFormAwareIterator
ab4d9b8 Add a deprecation note about CsrfProviderInterface
cb70632 [HttpKernel] fix deprecation notice for Kernel::init()
b5a315d [HttpKernel] Added deprecated error to init()
70012c1 [Hackday] [2.7] Add a deprecation note about TypeTestCase
@nicolas-grekas nicolas-grekas deleted the deprecations branch December 31, 2014 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0