Skip to content

FTP: Disallow direct FTPConnection construction #6533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Ayesh
Copy link
Member

@Ayesh Ayesh commented Dec 22, 2020

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.

@Ayesh Ayesh force-pushed the ftpconnection-ctor branch from ee0ef78 to a10f80e Compare December 22, 2020 20:32
Similar to other resource to object migrations, `FTPConnection` class is not allowed to be constructed with `new FTPConnection`.
Related to b4503fb.
@Ayesh Ayesh force-pushed the ftpconnection-ctor branch from a10f80e to 5726daf Compare December 22, 2020 21:08
Copy link
Member

@cmb69 cmb69 left a comment

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.

@php-pulls php-pulls closed this in 012439b Dec 23, 2020
@Ayesh Ayesh deleted the ftpconnection-ctor branch December 23, 2020 09:55
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