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
Drop dependency on zendframework/zend-loader #186
Open
acelaya
wants to merge
9
commits into
zendframework:develop
Choose a base branch
from
acelaya:feature/drop-zend-loader
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 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e6278ee
Fixes link to documentation in readme file
froschdesign 8fe0204
Replaced ussage of HeaderLoader in Headers class by a constant array map
acelaya 0e0218d
Dropped ussage of HeaderLoader inside Headers class
acelaya 935586e
Removed zend-loader as a required dependency
acelaya b6e8b67
Ensured header key is lowered before trying to find the corresponding…
acelaya 1ee4037
Renamed HEADERS_MAP to HEADERS_CLASS_MAP
acelaya dcb362c
Fixed invalid PHP 5.6 expression
acelaya a467860
Created new HeaderLoader that does not depend on zend-loader
acelaya c7076ec
Replaced hardcoded class map in Headers class by the use of a header …
acelaya 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,10 +99,7 @@ public function testHeadersFromStringFactoryCreatesMultipleObjects() | |
public function testHeadersFromStringMultiHeaderWillAggregateLazyLoadedHeaders() | ||
{ | ||
$headers = new Mail\Headers(); | ||
/* @var $pcl \Zend\Loader\PluginClassLoader */ | ||
$pcl = $headers->getPluginClassLoader(); | ||
$pcl->registerPlugin('foo', 'Zend\Mail\Header\GenericMultiHeader'); | ||
$headers->addHeaderLine('foo: bar1,bar2,bar3'); | ||
$headers->addHeaderLine('foo', ['[email protected]', '[email protected]', '[email protected]']); | ||
$headers->forceLoading(); | ||
$this->assertEquals(3, $headers->count()); | ||
} | ||
|
@@ -382,12 +379,9 @@ public static function expectedHeaders() | |
/** | ||
* @dataProvider expectedHeaders | ||
*/ | ||
public function testDefaultPluginLoaderIsSeededWithHeaders($plugin, $class) | ||
public function testHeadersMapResolvesProperHeader($plugin, $class) | ||
{ | ||
$headers = new Mail\Headers(); | ||
$loader = $headers->getPluginClassLoader(); | ||
$test = $loader->load($plugin); | ||
$this->assertEquals($class, $test); | ||
$this->assertEquals(Mail\Headers::HEADERS_CLASS_MAP[$plugin], $class); | ||
} | ||
|
||
public function testClone() | ||
|
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.
This is not configurable.
Please move this into a variable in separate class with methods
get($name)
,has($name)
,add($name, $class)
,remove($name)
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.
I didn't realize it had to be configurable. I'll fix it right away.
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.
If we move the logic to a class, should it be handled as the
HeaderLoader
used to?Do we want to keep exposing it via public getter?