Skip to content
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

Porter 4.0 release candidate #46

Merged
merged 36 commits into from
Apr 9, 2018
Merged

Porter 4.0 release candidate #46

merged 36 commits into from
Apr 9, 2018

Conversation

Bilge
Copy link
Member

@Bilge Bilge commented Oct 25, 2017

TODO: Compile change log.


Closes #35, #38, #39, #41, #42, #44 through inclusion.

Bilge added 18 commits March 17, 2017 23:10
Added Porter constructor that receives a container of providers.
Removed provider tags.
Changed Provider interface to require getConnector method instead of fetch.
…urability issues in Porter v3.

Added SuperConnector to supervise delivery of ConnectionContext to connectors and validate cache availability.
Removed CacheAdvice (simplified to boolean).
Removed obsolete Cache interface.
Renamed SuperConnector -> ImportConnector and added class comment.
Removed dependency on eloquent/enumeration.
Added test for ImportSpecification::disableCache() to complete code coverage.
@Bilge Bilge added this to the 4.0.0 milestone Oct 25, 2017
@@ -12,10 +12,11 @@
* Fetches data from the specified source optionally augmented by the
* specified options.
*
* @param ConnectionContext $context TODO.
Copy link
Member Author

Choose a reason for hiding this comment

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

This should be done now.

@codecov-io
Copy link

codecov-io commented Oct 25, 2017

Codecov Report

Merging #46 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #46   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          28     29    +1     
  Lines         423    355   -68     
=====================================
- Hits          423    355   -68
Impacted Files Coverage Δ
src/Specification/ImportSpecification.php 100% <100%> (ø) ⬆️
src/Provider/Resource/StaticResource.php 100% <100%> (ø) ⬆️
src/Porter.php 100% <100%> (ø) ⬆️
src/Cache/CacheUnavailableException.php 100% <100%> (ø) ⬆️
src/Collection/RecordCollection.php 100% <100%> (ø) ⬆️
src/Connector/CachingConnector.php 100% <100%> (ø) ⬆️
src/Connector/ImportConnector.php 100% <100%> (ø)
...nHandler/ExponentialSleepFetchExceptionHandler.php 100% <100%> (ø)
src/Provider/StaticDataProvider.php 100% <100%> (ø) ⬆️
src/Cache/JsonCacheKeyGenerator.php 100% <100%> (ø) ⬆️
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02706f0...40c2815. Read the comment docs.

Removed ProviderOptions.
Added ConnectorOptions interface and accompanying trait.
Forced ConnectorOptions to implement __clone in Porter.

These changes stop passing EncapsulatedOptions around in method calls,
instead tieing them to their Connector implementation. This makes sense
because connectors have a 1:1 relationship with their options. That is,
different options cannot be used with different connectors.

To make connectors and their options immutable during import, connectors
are now cloned in Porter::fetch() and connectors exporting options must
implement __clone() to deep clone their options.
Added Stateless- and ExponentialSleep FetchExceptionHandler implementations.
Changed FEH defacto type from callable to FetchExceptionHandler.
Changed "provider" FEH name to "resource" fetch exception handler.
Changed resource FEH type from callable to FetchExceptionHandler.
…onContext.

Fixed type hints in ImportConnector from callable -> FetchExceptionHandler.
…nstead of silently converting invalid values.
Added missing CachingConnector::__clone() method.
Added ImportConnector::findBaseConnector().
Changed CachingConnector to implement ConnectorWrapper.
Changed ImportConnector to clone its connector instead of relying on caller.
Fixed some ImportSpecification docblocks.
Added test for CachingConnector::__clone().
Added accompanying RecordCollectionTest::testNonArrayYield test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants