-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
Removed AbstractResource.
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.
src/Connector/Connector.php
Outdated
@@ -12,10 +12,11 @@ | |||
* Fetches data from the specified source optionally augmented by the | |||
* specified options. | |||
* | |||
* @param ConnectionContext $context TODO. |
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 should be done now.
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 28 29 +1
Lines 423 355 -68
=====================================
- Hits 423 355 -68
Continue to review full report at Codecov.
|
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.
…nfigure connector.
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.
benefit from its performance optimizations.
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.
TODO: Compile change log.
Closes #35, #38, #39, #41, #42, #44 through inclusion.