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:
committed by
George Peter Banyard
parent
7f1659afcb
commit
af68d4aae6
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/** @generate-function-entries */
|
||||
class IMAPConnection {
|
||||
final class IMAPConnection {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user