-
Notifications
You must be signed in to change notification settings - Fork 11
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
v2.0 #157
Conversation
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
The `HttpLoader::retryCachedErrorResponses()` method now returns an instance of the new `RetryManager` class, providing the methods `only()` and `except()` that can be used to restrict retries to certain HTTP response status codes.
Start v2.0 block and improve the note for the retry cached error responses change.
Remove the methods addToResult(), addLaterToResult() and everything connected to that. Also, it is no longer possible to provide multiple loaders via the crawler. Instead you can now manually provide customized loaders directly to steps via the new withLoader() method. Further, also remove the Microseconds util class, which is now part of the crwlr/utils package.
Removes the `PaginatorInterface` and the old version of the `AbstractPaginator`. Also remove an unnecessary argument from the `processLoaded` method and the default implementation of the `getNextRequest()` method (child classes have to implement it themselves.
Remove 4 deprecated methods interacting with the headless browser helper. Users can directly call the methods on the browser helper. Also remove deprecated method `RespondedRequest::cacheKeyFromRequest()`.
Add new methods `FileCache::prolong()` and `FileCache::prolongAll()` to allow prolonging the time to live for cached responses.
Move most functionality from `Step` to `BaseStep` and make it work with `Group` steps.
Add info about changed `Crawler::addStep()` signature and removal of the `UnknownLoaderKeyException`.
When no Exception is thrown, the user could think it was a successful crawler run, without looking at the log messages, so re-throw it to the user.
Add phpdoc template tags for a generic loader type in the `LoadingStep` trait. So wherever it is used, the user can narrow down the loader type that will be used, to improve static analysis and IDE autocompletion.
Therefor also fix set_error_handler() / restore_error_handler() occurences, because the old version lead to phpunit warnings with the new version. And also add a rule to phpstan config.
PEST 3 requires PHP 8.2. As the package still supports 8.1 and tests also need to run on 8.1, allow either PEST 2 or 3.
As the new error "call to protected method..." only happens when PEST 3 is used, phpstan gives an error when running with PEST 2 on PHP 8.1. So, just don't report unmatched ignored error messages.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
HttpLoader::retryCachedErrorResponses()
method now returns an instance of the newRetryManager
class, providing the methodsonly()
andexcept()
that can be used to restrict retries to certain HTTP response status codes.Step::addToResult()
,Step::addLaterToResult()
and everything connected to them.Step::withLoader()
method.PaginatorInterface
and the old version of theAbstractPaginator
. Also remove an unnecessary argument from theprocessLoaded
method and the default implementation of thegetNextRequest()
method (child classes have to implement it themselves.Microseconds
util class, which is now part of the crwlr/utils package.