Skip to content

The fallback for undefined constants is removed as of PHP 8 #795

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 2 commits into from
Aug 6, 2021

Conversation

kamil-tekiela
Copy link
Member

No description provided.

Comment on lines 620 to 622
The fallback to treat an undefined constant as bare string is removed
as of PHP 8.0.0 and throws <classname>Error</classname> exception.
It has been deprecated as of PHP 7.2.0, and issues an error of level <constant>E_WARNING</constant>.
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Follow chronological order
  • Past tense for both versions
Suggested change
The fallback to treat an undefined constant as bare string is removed
as of PHP 8.0.0 and throws <classname>Error</classname> exception.
It has been deprecated as of PHP 7.2.0, and issues an error of level <constant>E_WARNING</constant>.
The fallback to treat an undefined constant as bare string has been deprecated
as of PHP 7.2.0, and issues an error of level <constant>E_WARNING</constant>.
As of PHP 8.0.0, it has been removed and throws an <classname>Error</classname> exception.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. This is a good catch. I did it in this order because that is how it was written before (see the last line about E_NOTICE). I think I have to rewrite the whole paragraph now, so it makes sense.

@kamil-tekiela
Copy link
Member Author

@afilina I followed your suggestion. Does it look better now?

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.

2 participants