This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
Add option novalidatecert to connect() #247
Open
abulhol
wants to merge
8
commits into
zendframework:develop
Choose a base branch
from
abulhol:master
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ece418b
Bumped version
weierophinney ad8ba1a
Add option novalidatecert to connect()
abulhol 36d133b
New implementation of novalidatecert
abulhol cbc3e4f
Added setter method for new variable; removed @ for socket_connect
abulhol 767e170
Added new param to docs
abulhol c2eae3c
Fix empty lines and line lengths
abulhol 76aa3e0
Fix formatting multi line function call
abulhol 48e9ee1
Final indentation fix
abulhol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we do not have typed properties, we can not use public here. You can use the constructor to set a value for this property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I'd add either:
$validateCert = true
array $options
, and document a "validate_cert" or "validateCert" option.The latter makes it easier to expand options, but leads to more validation once we add typehints. The former is self-documenting, but means if we add more options down the line, the constructor signature gets really large.
I'm fine with either approach, but agree with @froschdesign here that a public property is not a great idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi guys, thank you for the feedback!
I have added the variable to the constructor, but this does not really fix the issue. The thing is that the way you create a POP3 or IMAP connection is by creating an instance of
Zend\Mail\Storage\Pop3
orZend\Mail\Storage\Imap3
.The constructor then calls the Zend\Mail\Protocol constructor without arguments, followed by calling
connect()
.But because I cannot add a new parameter to
connect()
(see previous PR), and I have to leave the constructor call without arguments as it is, I have now added a setter method fornovalidatecert
.Please see my latest commit.