Skip to content

Commit

Permalink
Imported r1030 library split
Browse files Browse the repository at this point in the history
  • Loading branch information
AnrDaemon committed Oct 21, 2019
0 parents commit 4ce6341
Show file tree
Hide file tree
Showing 10 changed files with 2,676 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/bin
/vendor
.*
2 changes: 2 additions & 0 deletions .notes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md#35-psrhttpmessageuriinterface
https://github.com/guzzle/psr7/blob/master/src/Uri.php
1 change: 1 addition & 0 deletions .todo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Net:Url - decode Forwarded: header.
230 changes: 230 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
------------------------------------------------------------------------
r991 | anrdaemon | 2019-02-26 22:36:13 +0300 (Tue, 26 Feb 2019) | 2 lines

+ Improved documentation for Net\Url tests.

------------------------------------------------------------------------
r909 | anrdaemon | 2018-10-17 16:21:08 +0300 (Wed, 17 Oct 2018) | 2 lines

* Fixed minor typo in the docblock comment.

------------------------------------------------------------------------
r874 | anrdaemon | 2018-08-31 20:02:00 +0300 (Fri, 31 Aug 2018) | 2 lines

* Repaired initial docblock, removing legacy behavior references.

------------------------------------------------------------------------
r873 | anrdaemon | 2018-08-31 18:44:46 +0300 (Fri, 31 Aug 2018) | 2 lines

* Used assertEquals where applicable for better failure representation.

------------------------------------------------------------------------
r872 | anrdaemon | 2018-08-31 18:42:04 +0300 (Fri, 31 Aug 2018) | 3 lines

* Reordered methods.
* Added PHPUnit v7 compatible exception trap.

------------------------------------------------------------------------
r871 | anrdaemon | 2018-08-31 16:20:04 +0300 (Fri, 31 Aug 2018) | 2 lines

* Use static $url in tests.

------------------------------------------------------------------------
r857 | anrdaemon | 2018-08-28 03:26:18 +0300 (Tue, 28 Aug 2018) | 3 lines

+ Net\Url - added separate constructor to create Url from environment.
+ Added more test coverage.

------------------------------------------------------------------------
r856 | anrdaemon | 2018-08-28 03:23:50 +0300 (Tue, 28 Aug 2018) | 3 lines

* Clarified Url::_parse_url error message for incorrect argument.
* Tightened parameter validation for Url::_parse_str.

------------------------------------------------------------------------
r855 | anrdaemon | 2018-08-27 23:53:37 +0300 (Mon, 27 Aug 2018) | 2 lines

* Fix UrlTest for PHP5 compatibility.

------------------------------------------------------------------------
r854 | anrdaemon | 2018-08-27 21:06:49 +0300 (Mon, 27 Aug 2018) | 2 lines

* Reverted accidental parts ordering break from r852

------------------------------------------------------------------------
r852 | anrdaemon | 2018-08-26 04:03:37 +0300 (Sun, 26 Aug 2018) | 2 lines

* Improve Url::setParts to better handle the case where query string or fragment equals to "0".

------------------------------------------------------------------------
r851 | anrdaemon | 2018-08-26 03:49:50 +0300 (Sun, 26 Aug 2018) | 2 lines

* Use external iterator. I mean, really. Why reinvent wheels?

------------------------------------------------------------------------
r806 | anrdaemon | 2018-06-19 17:23:06 +0300 (Tue, 19 Jun 2018) | 2 lines

+ Correctly parse "+" in URL path component.

------------------------------------------------------------------------
r767 | anrdaemon | 2018-03-19 23:49:28 +0300 (Mon, 19 Mar 2018) | 2 lines

* Only confirm skipped tests for known mangled characters.

------------------------------------------------------------------------
r765 | anrdaemon | 2018-03-14 01:25:26 +0300 (Wed, 14 Mar 2018) | 2 lines

* Implement mangled characters test.

------------------------------------------------------------------------
r764 | anrdaemon | 2018-03-14 01:24:28 +0300 (Wed, 14 Mar 2018) | 2 lines

* Use more common host names.

------------------------------------------------------------------------
r763 | anrdaemon | 2018-03-14 00:50:47 +0300 (Wed, 14 Mar 2018) | 2 lines

+ Use dedicated normalization of parts array.

------------------------------------------------------------------------
r762 | anrdaemon | 2018-03-14 00:19:16 +0300 (Wed, 14 Mar 2018) | 4 lines

* Split autoload.
* Tweak tests semantics.
* Put a note about parameter names mangling for Net\Url.

------------------------------------------------------------------------
r738 | anrdaemon | 2018-03-03 22:03:36 +0300 (Sat, 03 Mar 2018) | 3 lines

= Move code to subdirectory.
+ Add some functional tests.

------------------------------------------------------------------------
r737 | anrdaemon | 2018-03-03 21:50:26 +0300 (Sat, 03 Mar 2018) | 3 lines

+ Explicitly create empty object from empty string URL.
* Lighten up creation process overall.

------------------------------------------------------------------------
r736 | anrdaemon | 2018-03-03 21:14:52 +0300 (Sat, 03 Mar 2018) | 2 lines

* Lighten up Url::setParts() logic.

------------------------------------------------------------------------
r735 | anrdaemon | 2018-03-03 21:01:46 +0300 (Sat, 03 Mar 2018) | 2 lines

* Wrap parse_str and parse_url into usable methods.

------------------------------------------------------------------------
r734 | anrdaemon | 2018-03-03 20:30:12 +0300 (Sat, 03 Mar 2018) | 3 lines

- Remove port type conversion from Url::parse()
Url::setParts() already handles it.

------------------------------------------------------------------------
r733 | anrdaemon | 2018-03-03 20:25:24 +0300 (Sat, 03 Mar 2018) | 2 lines

* Normalize internal wrappers naming.

------------------------------------------------------------------------
r731 | anrdaemon | 2018-03-01 05:08:09 +0300 (Thu, 01 Mar 2018) | 2 lines

* Swap magic and interface implementations around.

------------------------------------------------------------------------
r709 | anrdaemon | 2017-11-28 22:10:42 +0300 (Tue, 28 Nov 2017) | 2 lines

+ Cache Url::__toString() representation.

------------------------------------------------------------------------
r708 | anrdaemon | 2017-11-28 22:09:53 +0300 (Tue, 28 Nov 2017) | 2 lines

* Explicitly declare methods visibility.

------------------------------------------------------------------------
r707 | anrdaemon | 2017-11-26 23:55:15 +0300 (Sun, 26 Nov 2017) | 2 lines

* Tweak docblocks.

------------------------------------------------------------------------
r705 | anrdaemon | 2017-11-03 04:26:01 +0300 (Fri, 03 Nov 2017) | 2 lines

* Fixed ports dictionary reference.

------------------------------------------------------------------------
r701 | anrdaemon | 2017-11-03 03:12:58 +0300 (Fri, 03 Nov 2017) | 5 lines

* Add more default ports.
* Move port omission to render.
* Declare virtual class properties.
* Much more documentation.

------------------------------------------------------------------------
r697 | anrdaemon | 2017-11-01 20:05:47 +0300 (Wed, 01 Nov 2017) | 4 lines

- Less dumb Url::__toString() conversion.
Omit parts that make no sense without other parts.
Check if path is absolute when host is present.

------------------------------------------------------------------------
r696 | anrdaemon | 2017-11-01 20:00:29 +0300 (Wed, 01 Nov 2017) | 3 lines

* Decode user/pass/host/fragment
* Force port to int.

------------------------------------------------------------------------
r695 | anrdaemon | 2017-10-30 04:37:23 +0300 (Mon, 30 Oct 2017) | 3 lines

+ Much documentation.
* Rewrite constructor to make more sense.

------------------------------------------------------------------------
r694 | anrdaemon | 2017-10-29 19:44:16 +0300 (Sun, 29 Oct 2017) | 2 lines

+ Url: ArrayAccess,Iterator,Countable for query parameters.

------------------------------------------------------------------------
r693 | anrdaemon | 2017-10-29 04:29:58 +0300 (Sun, 29 Oct 2017) | 2 lines

* Normalize query array.

------------------------------------------------------------------------
r690 | anrdaemon | 2017-10-22 22:56:42 +0300 (Sun, 22 Oct 2017) | 4 lines

* Handle initial values more gracefully.
* Always decode query string.
* Remove unused class properties.

------------------------------------------------------------------------
r689 | anrdaemon | 2017-10-20 01:06:24 +0300 (Fri, 20 Oct 2017) | 2 lines

* Fix key merging.

------------------------------------------------------------------------
r688 | anrdaemon | 2017-10-20 00:48:42 +0300 (Fri, 20 Oct 2017) | 2 lines

* Improve rendering of all parts.

------------------------------------------------------------------------
r687 | anrdaemon | 2017-10-20 00:32:39 +0300 (Fri, 20 Oct 2017) | 3 lines

* Improve query part rendering.
* Improve fragment part rendering.

------------------------------------------------------------------------
r686 | anrdaemon | 2017-10-16 02:15:13 +0300 (Mon, 16 Oct 2017) | 2 lines

+ Allow isset() on Url parts.

------------------------------------------------------------------------
r685 | anrdaemon | 2017-10-15 21:50:02 +0300 (Sun, 15 Oct 2017) | 3 lines

* Decode path when parsing URL.
Leaving %2F encoded.

------------------------------------------------------------------------
r680 | anrdaemon | 2017-09-05 17:05:40 +0300 (Tue, 05 Sep 2017) | 2 lines

+ Misc\Url

------------------------------------------------------------------------
14 changes: 14 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

36 changes: 36 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "anrdaemon/net-url",
"description": "A class to simplify handling of the various URL's (and some URI's)",
"license": "WTFPL",
"authors": [
{
"name": "Andrey Repin",
"email": "[email protected]"
}
],
"require": {
"php": "^5.3.6 || ^7.0"
},
"extra": {
"branch-alias": {
"dev-trunk": "0.x-dev",
"dev-master": "0.x-dev"
}
},
"autoload": {
"psr-4": {
"AnrDaemon\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"AnrDaemon\\Tests\\": "test/"
}
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"config": {
"bin-dir": "bin"
}
}
Loading

0 comments on commit 4ce6341

Please sign in to comment.