Skip to content

Releases: gebn/Crackle

Crackle v2.6.0

24 Feb 23:24
Compare
Choose a tag to compare

This release includes two important bug fixes and several tweaks. It is largely compatible with previous releases of Crackle, however users of POSTFile or PUTFile will need to update these namespaces and use the renamed method (see below).

Improvements

  • Switched to semantic versioning.
  • \Crackle\Response::writeTo() can now be passed a single file path to write the response to. Additionally, if a permission error occurs, the relevant path is now included in the exception message.
  • Added Composer autoloader.

Changes

  • Moved POSTFile and PUTFile into a new \Crackle\Requests\Files namespace.
  • Renamed \Crackle\Requests\Files\File::factory() to fromPath() to be more descriptive.
  • Tweaked \Crackle\Requests\Files\PUTFile to always use memory for temporary files, regardless of size (previous limit was 1 MiB before being moved to sys_get_temp_dir()).
  • Increased the number of concurrent requests issued by the ChanThreadDownloader example from 10 to 20.

Bug fixes

  • Fixed class not found error if a dependency was unsatisfied.
  • Fixed \Crackle\Response::writeTo() failing if a filename was not passed and one couldn't be determined from the request. It will now throw \Crackle\Exceptions\IOException under these circumstances.
  • Fixed incorrect PHPDoc array notation.
  • Fixed various typos in documentation.

Crackle v2.5

04 Aug 15:41
Compare
Choose a tag to compare

This is a minor release of Crackle that includes a major breaking change.

Improvements

  • Added a string generator example using RANDOM.ORG's truly random generator.

Changes

  • The getContent() method in \Crackle\Response has been renamed to getBody(). Apart from this, it functions in exactly the same way.

Crackle v2.4

04 Jul 16:45
Compare
Choose a tag to compare

This is a general release that is fully compatible with Crackle v2.3.

Improvements

  • Is is now possible to set the raw POST data of a request using the new setContent() method. If both it and the fields mechanism are used, this takes priority.
  • Enhanced parsing of header values spanning multiple lines. To be more in line with the standard, each line of a value is now joined with a single space, with newline characters removed.
  • Added an import() convenience method to Crackle\Requests\Fields\Fields for specifying multiple fields at once from an array. Keys are interpreted as field names, and their corresponding values (which can be arrays) become the value sent under that name.
  • Various minor improvements to tidy up convoluted logic and remove unreachable code.

Changes

  • Crackle\Requests\GETRequest's getUrl() method now has public visibility. You can now build a request, and see what URL it will be sent to, including any GET parameters added.
  • Updated ChanThreadDownloader.php to accept the new 4Chan URL format. Also added memory statistics to output.

Crackle v2.3

15 Apr 02:56
Compare
Choose a tag to compare

This release introduces a breaking change: requests now throw a RequestException on failure. See the updated README for details on how to modify existing code.

Changes

  • fire() is now called implicitly when getResponse() is called for the first time on a request. Code like the following is now perfectly legal:
$request = new GETRequest('google.co.uk');
echo $request->getResponse()->getContent();
  • Changed fire() to throw \Crackle\Exceptions\RequestException if the request fails. Any registered callback will be executed prior to this. This only affects cases where fire() was being called manually - Requester usage is unchanged.

Crackle v2.2

15 Apr 02:21
Compare
Choose a tag to compare

This is a maintenance release incorporating several minor bug fixes. It is fully compatible with all 2.x releases of Crackle.

Improvements

  • Added and enhanced the clarity of documentation.
  • Made code formatting more consistent.

Changes

  • \Crackle\Requester: reduced the default parallelLimit from 40 to 20. This change can be overridden by manually specifying the parallel limit when creating a new Requester instance, e.g. new Requester(40).

Bug fixes

  • Fixed PHP notices being emitted from \Crackle\Requests\Fields\Parameters if Crackle was given a URL without a scheme or host. This happened in any of the following scenarios:
    • google.co.uk (no scheme)
    • http://192.168.1.1/file.txt (no host)
    • 192.168.1.1/file.txt (no scheme or host)
  • Fixed a bug in \Crackle\Requester where if the callback of the last request in the queue queued any more requests, they would not be executed due to the cURL multi-handle exiting prematurely.
  • Fixed old documentation in \Crackle\Exceptions\ValidationException.

Crackle v2.1

08 Apr 23:05
Compare
Choose a tag to compare

This release adds support for Composer. It does not contain any code changes.

Put the following in composer.json to add Crackle to a new project:

{
    "require": {
        "crackle/crackle": ">=v2.1"
    }
}

Crackle v2.0

08 Apr 03:06
Compare
Choose a tag to compare

This is easily the biggest release since v1.0, incorporating many improvements. As a result, it is unfortunately not backwards compatible with 1.x releases of Crackle.

Improvements

  • Major improvements to README.md. Examples are now more detailed with additional notes, and they progress in a more logical way.
  • Overhauled field management. There are now abstractions for dealing with GET parameters, POST variables and POST files. The mechanism for nesting arrays within these is also much more intuitive.
  • Refactored the exceptions hierarchy and improved quality of error messages. Check method documentation for specific details.

Changes

  • \Crackle\GETRequest: Renamed isError() to failed(), to be consistent with succeeded().
  • Crackle now checks the response headers for a file name before falling back to the URL.

Bug fixes

  • \Crackle\Requests\Files\PUTFile: Fixed a bug where the internal memory stream was not closed on destruct.
  • Fixed all cases where documentation contained erroneous namespaces.

Crackle v1.3

27 Feb 16:51
Compare
Choose a tag to compare

Improvements

  • Added validation to pick up basic errors (e.g. sending a PUT request without a file).
  • Added succeeded() convenience method to \Crackle\Request. Logic like if(!$request->isError()) { ... } can now be changed to the nicer if($request->succeeded()) { ... }.

Changes

  • \Crackle\Requester: Exception (rather than CurlException) is now thrown if the multi-handle goes into an error state.

Bug fixes

  • \Crackle\Request: Fixed isFired() returning false if the request was fired but failed.

Crackle v1.2

04 Jan 01:05
Compare
Choose a tag to compare

Improvements

  • Added PUT and DELETE verbs.

Changes

  • Renamed getResponseCode() to getStatusCode() in \Crackle\Response.
  • \Crackle\Requester: calling fireAll() no longer shrinks the parallel limit to the size of the queue.

Bug fixes

  • Fixed backslashes in include paths, which confused non-Windows environments.
  • Fixed a namespace typo which confused the autoloader.
  • Fixed warning if GET and HEAD request URLs were not supplied with a path.

Crackle v1.1

16 Dec 04:58
Compare
Choose a tag to compare

Improvements

  • An autoloader that plays more nicely with others.
  • Default port numbers for SOCKS5 and HTTP proxies.
  • Made credential username and password setters public - no longer have to be specified in the constructor.

Bug fixes

  • Call to parent method addTo() in SOCKS5Proxy