Skip to content

FTP: Disallow direct FTPConnection construction - #6533

Closed
Ayesh wants to merge 1 commit into
php:masterfrom
Ayesh:ftpconnection-ctor
Closed

FTP: Disallow direct FTPConnection construction#6533
Ayesh wants to merge 1 commit into
php:masterfrom
Ayesh:ftpconnection-ctor

Conversation

@Ayesh

Copy link
Copy Markdown
Member

Similar to other resource to object migrations, FTPConnection class is not allowed to be constructed with new FTPConnection.
Related to b4503fb.

As of now, it is possible to construct an FTPConnection object with new FTPConnection. @sgolemon did an amazing work with the resource to object migration, but I think this was overlooked? I put together this PR that basically throws an exception similar to other resource-class objects when using new FTPConnection, forcing users to continue to use ftp_connect and ftp_ssl_connect.

Thank you.

Similar to other resource to object migrations, `FTPConnection` class is not allowed to be constructed with `new FTPConnection`.
Related to b4503fb.

@cmb69cmb69 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! Looks good to me.

@Ayesh
Ayesh deleted the ftpconnection-ctor branch December 23, 2020 09:55
Sign up for freeto 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

@Ayesh@cmb69