[wp-trac] [WordPress Trac] #63201: FTPext Stub

WordPress Trac noreply at wordpress.org
Mon Mar 31 12:33:37 UTC 2025


#63201: FTPext Stub
------------------------------------+------------------------------
 Reporter:  SirLouen                |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Filesystem API          |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |     Focuses:  docs
------------------------------------+------------------------------

Comment (by SirLouen):

 @audrasjb as It's just a stubs issue
 This file was updated some months ago, according to the new PHP 8.1
 standard, to use FTP/Connection, instead of resource.
 But someone forgot to update the docs $link type when they introduce the
 update.
 So when you use any type of code parser with anything over PHP 8.1, you
 will see the code plagued with typing errors like: `$this->link` is not a
 resource but a FTP/Connection
 I've kept `resource` for anything below PHP 8.1 compatibility (and because
 the current `$link` instantiation is still using the resource mode).

 You can check the errors with any parser that use the [https://github.com
 /php-stubs/wordpress-stubs wordpress stubs], intellisense, phpstan...

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63201#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list