Skip to content

PHP 8.3: legacy assertion have been deprecated#2840

Merged
Girgias merged 3 commits into
php:masterfrom
Girgias:assert-8.3-doc
Oct 8, 2023
Merged

PHP 8.3: legacy assertion have been deprecated#2840
Girgias merged 3 commits into
php:masterfrom
Girgias:assert-8.3-doc

Conversation

@Girgias
Copy link
Copy Markdown
Member

@Girgias Girgias commented Oct 5, 2023

Yanked the table markup for the constants just for assert and shoved it in a <section> tag.

This requires it moving it to the end to comply with the DTD.

@Girgias Girgias added this to the PHP 8.3 milestone Oct 5, 2023
@Girgias Girgias requested a review from TimWolla October 5, 2023 12:15
@TimWolla
Copy link
Copy Markdown
Member

TimWolla commented Oct 5, 2023

Yanked the table markup for the constants just for assert and shoved it in a <section> tag.

Why? Can't you slap &warn.deprecated.feature-8-3-0; onto the beginnning of the section?

@Girgias
Copy link
Copy Markdown
Member Author

Girgias commented Oct 6, 2023

Yanked the table markup for the constants just for assert and shoved it in a <section> tag.

Why? Can't you slap &warn.deprecated.feature-8-3-0; onto the beginnning of the section?

I suppose that's an option I just worry people might not understand this is for all assert constants

@TimWolla
Copy link
Copy Markdown
Member

TimWolla commented Oct 7, 2023

I suppose that's an option I just worry people might not understand this is for all assert constants

Including the warning into the “Descrption” column doesn't look too bad to me:

image

Source code is:

   <tbody>
    <row xml:id="constant.assert-active">
     <entry><constant>ASSERT_ACTIVE</constant></entry>
     <entry><link linkend="ini.assert.active">assert.active</link></entry>
     <entry>
      Enable <function>assert</function> evaluation.
      &warn.deprecated.feature-8-3-0;
     </entry>
    </row>
    <row xml:id="constant.assert-callback">
     <entry><constant>ASSERT_CALLBACK</constant></entry>
     <entry><link linkend="ini.assert.callback">assert.callback</link></entry>
     <entry>
      Callback to call on failed assertions.
      &warn.deprecated.feature-8-3-0;
     </entry>
    </row>
    <row xml:id="constant.assert-bail">
     <entry><constant>ASSERT_BAIL</constant></entry>
     <entry><link linkend="ini.assert.bail">assert.bail</link></entry>
     <entry>
      Terminate execution on failed assertions.
      &warn.deprecated.feature-8-3-0;
     </entry>
    </row>
    <row xml:id="constant.assert-exception">
     <entry><constant>ASSERT_EXCEPTION</constant></entry>
     <entry><link linkend="ini.assert.exception">assert.exception</link></entry>
     <entry>
      Issues a PHP warning for each failed assertion
      &warn.deprecated.feature-8-3-0;
     </entry>
    </row>
    <row xml:id="constant.assert-warning">
     <entry><constant>ASSERT_WARNING</constant></entry>
     <entry><link linkend="ini.assert.warning">assert.warning</link></entry>
     <entry>
      Issues a PHP warning for each failed assertion
      &warn.deprecated.feature-8-3-0;
     </entry>
    </row>
    <row xml:id="constant.assert-quiet-eval">
     <entry><constant>ASSERT_QUIET_EVAL</constant></entry>
     <entry><link linkend="ini.assert.quiet-eval">assert.quiet_eval</link></entry>
     <entry>
      Disable <literal>error_reporting</literal> during assertion expression evaluation.
      &warn.feature.removed-8-0-0;
     </entry>
    </row>
   </tbody>

Copy link
Copy Markdown
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

LGTM. I'll likely send a follow-up to clean the page for assert() from all the legacy cruft.

@Girgias Girgias merged commit ada1d79 into php:master Oct 8, 2023
@Girgias Girgias deleted the assert-8.3-doc branch October 8, 2023 16:57
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