1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00

IMAP: Declare IMAPConnection class as final (stub+test)

Updates the `IMAPConnection` class stub to make sure it has the `final` flag, and adds a test to verify it.
This commit is contained in:
Ayesh Karunaratne
2020-12-23 17:12:34 +07:00
committed by George Peter Banyard
parent 7f1659afcb
commit af68d4aae6
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
/** @generate-function-entries */
class IMAPConnection {
final class IMAPConnection {
}
+11
View File
@@ -0,0 +1,11 @@
--TEST--
Check that IMAPConnection is declared final
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
--FILE--
<?php
class T extends IMAPConnection {}
--EXPECTF--
Fatal error: Class T may not inherit from final class (IMAPConnection) in %s on line %d