Skip to content

Releases: AnrDaemon/library-php

Release 1.14: Fixed Net\Browser initialization

16 Aug 14:46
Compare
Choose a tag to compare

Fixed Net\Browser initialization with empty values from openssl.cafile and openssl.capath.

Release 1.13.0.1: Typos are evil

22 May 22:47
Compare
Choose a tag to compare
  • Fixed a typo in the docblock

Release 1.13: Added Simple PHP Template class.

11 Mar 01:03
Compare
Choose a tag to compare

The class is an implementation of an idea by Chad Minick.
Class interface inspired by Smarty.

Release 1.12: Net\Browser API stabilization

10 Mar 23:21
Compare
Choose a tag to compare

Release highlights

  • Net\Browser basic API is stable and unlikely to change in the future;
  • Improved CurlException message construction;
  • Net\Url documentation improvements.

Net\Browser

Turned out, CURLOPT_HTTPGET/CURLOPT_POST/CURLOPT_PUT is a request TYPE.
Yes, it implies default method name, but you can change it with CURLOPT_CUSTOMREQUEST
(a method NAME, which does not affect request TYPE).

  • CURLOPT_HTTPGET performs a body-less request;
  • CURLOPT_PUT performs a request with body taken from stream resource;
  • CURLOPT_POST performs a request with body provided as value of a variable,
    if the variable given as an array of values, it is further formatted
    to conform to the [RFC 7578].

CurlException

After catching empty curl_error() return on an obvious cURL error, it came to the realization, that curl_error() returning an error message text, while curl_strerror(curl_errno()) returning textual equivalent of error code.

Net\Url

Improved documentation of some more obscure test cases and fixed typo(s).

Added Utility\Path wrapper class.

07 Sep 00:13
Compare
Choose a tag to compare

Utility\Path::info($path) - enhanced pathinfo() function.

  • always returns all components;
  • correctly report absence of extension for dot-files;
  • adds missing dot to exceptions.

Utility\Path::normalize($path, …) - provides path normalization.

  • handles both *NIX and Windows (X:...) style paths;
  • handles leaking relative paths if explicitly allowed;
  • tripping an exception if relative path is trying to escape itself;
  • allows customizable output directory separator.

Major Net\Browser improvements

04 Sep 16:21
Compare
Choose a tag to compare

Net\Browser

  • Added a (b)lo(a)t of docblocks to Net\Browser.
  • Added __clone and __destruct handlers.
  • Added HTTP PUT and custom request method implementations.
    Sad but I can't make it any better than that.
  • Implemented ability to return basic request status as a single array.
  • Fixed Net\Browser::setOpt to behave and report.
  • Moved common request steps into a helper method.

Net\CurlOptions

  • Added CurlOptions helper to better report errors.

Net\Url

  • Repaired initial docblock, removing legacy behavior references.
  • Used static $url in tests.
  • Used assertEquals where applicable for better failure representation.
  • Added PHPUnit v7 compatible exception trap.

Net\Url: Separated environment reconstructor.

28 Aug 03:19
Compare
Choose a tag to compare

Yes, this is a BC break. You gotta deal with it.

Some example replacement mappings are as follows:

new Net\Url; => Net\Url::fromHttp(["path" => null, "query" => null]);
(new Net\Url)->parse($_SERVER["REQUEST_URI"]); => Net\Url::fromHttp();

New Math namespace

02 Jun 00:08
Compare
Choose a tag to compare

Added Math\Point class - ascended from Misc\Coordinate3D class used to manipulate geometry points.
Added Math\GSeq geometric sequence generator.

Welcome Net\Browser!

03 Apr 16:23
Compare
Choose a tag to compare

Added Net\Browser - a thin (very thin!) wrapper over cURL extension.

Net\Browser

The aim of a class is to be a very, very, very lightweight OO wrapper on top of cURL extension, adding as little overhead, as practically possible, while maintaining usage consistency.

Currently implemented functionality:

Not yet implemented/waiting for implementation/potentially impossible to implement in a sane way

  • PUT request method.
  • Custom request methods.
  • Safe cloning and disposing of cURL handle.

Not going to be implemented within this class

  • curl_multi_* features.
  • curl_share_* features.

Other changes in this release

  • Split dev autoload.
  • Code-unrelated tweaks.
  • More Net\Url tests to cover known issues in PHP.

Release 1.6.5

03 Nov 01:29
Compare
Choose a tag to compare
Release 1.6.5 Pre-release
Pre-release
  • Net\Url: Fixed well-known ports dictionary reference.