Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Debug] simplify error_reporting levels given php version > 5.3#16916

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:3.0fromTobion:error-reporting-e-all
Dec 18, 2015

Conversation

@Tobion
Copy link
Contributor

QA
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Since PHP 5.4E_ALL containsE_STRICT. This allows us to simplify and clean up some code.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I will add a deprecation for thenull case in 3.1 as it is useless now.

Copy link
Member

Choose a reason for hiding this comment

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

This might become an issue in the future when new constants are introduced in future PHP versions (similar to the introduction of theE_STRICT constant).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The E_ALL is supposed to include everything which is why it was changed in 5.4

@Tobion
Copy link
ContributorAuthor

@nicolas-grekas this is for you to review :)

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedDec 9, 2015 via email

Ack, I should be able to do it tomorrow

@xabbuh
Copy link
Member

What about defining theE_STRICT constant in the PHP 5.4 polyfill (or do we already do that?)? Then we could already simplify the code in previous versions.

@Tobion
Copy link
ContributorAuthor

E_ALL has a different meaning in PHP 5.3 and >= 5.4. That is problem. So we cannot do anything in Polyfill.

@xabbuh
Copy link
Member

@Tobion I see, but then treating-1 now likeE_ALL could become tricky in the future (see my inline comment), couldn't it?

@nicolas-grekas
Copy link
Member

Since PHP 7 introduced exceptions in the core, I seriously doubt that any newE_* will ever be introduced.
👍 for me

@fabpot
Copy link
Member

Thank you@Tobion.

@fabpotfabpot merged commitb1c774f intosymfony:3.0Dec 18, 2015
fabpot added a commit that referenced this pull requestDec 18, 2015
…n > 5.3 (Tobion)This PR was merged into the 3.0 branch.Discussion----------[Debug] simplify error_reporting levels given php version > 5.3| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Since PHP 5.4 `E_ALL` contains `E_STRICT`. This allows us to simplify and clean up some code.Commits-------b1c774f simplify debug error_reporting levels given php version > 5.3
@TobionTobion deleted the error-reporting-e-all branchDecember 18, 2015 16:26
@GrahamCampbell
Copy link
Contributor

I thought symfony always usednull for default values out of principle, like PHP does, so people can skip them by passing null. This breaks that principle. ;(

@Tobion
Copy link
ContributorAuthor

Neither symfony nor php itself uses null by default when it doesn't make sense. E.g.http://php.net/manual/en/function.trigger-error.php

@GrahamCampbell
Copy link
Contributor

PHP does in other cases, where the param might end up being an int though.

@GrahamCampbell
Copy link
Contributor

Meh. I'm inclined to agree with you I guess.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@Tobion@nicolas-grekas@xabbuh@fabpot@GrahamCampbell@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp