Skip to content
This repository was archived by the owner on Dec 31, 2022. It is now read-only.

Commit cf636bb

Browse files
authored
Merge pull request #57 from sunrise-php/release/v1.2.5
v1.2.5
2 parents 2ea4d97 + 173364e commit cf636bb

File tree

2 files changed

+3
-97
lines changed

2 files changed

+3
-97
lines changed

README.md

Lines changed: 1 addition & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1 @@
1-
## URI wrapper for PHP 7.1+ based on RFC-3986, PSR-7 and PSR-17
2-
3-
[![Gitter](https://badges.gitter.im/sunrise-php/support.png)](https://gitter.im/sunrise-php/support)
4-
[![Build Status](https://scrutinizer-ci.com/g/sunrise-php/uri/badges/build.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/uri/build-status/master)
5-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sunrise-php/uri/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/uri/?branch=master)
6-
[![Code Coverage](https://scrutinizer-ci.com/g/sunrise-php/uri/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/uri/?branch=master)
7-
[![Latest Stable Version](https://poser.pugx.org/sunrise/uri/v/stable?format=flat)](https://packagist.org/packages/sunrise/uri)
8-
[![Total Downloads](https://poser.pugx.org/sunrise/uri/downloads?format=flat)](https://packagist.org/packages/sunrise/uri)
9-
[![License](https://poser.pugx.org/sunrise/uri/license?format=flat)](https://packagist.org/packages/sunrise/uri)
10-
11-
---
12-
13-
## Installation
14-
15-
```bash
16-
composer require sunrise/uri
17-
```
18-
19-
## How to use?
20-
21-
```php
22-
use Sunrise\Uri\Uri;
23-
use Sunrise\Uri\UriFactory;
24-
25-
// creates a new URI
26-
$uri = new Uri('http://user:pass@localhost:3000/path?query#fragment');
27-
28-
// creates a new URI with a factory (is equivalent to new Uri(string))
29-
$uri = (new UriFactory)->createUri('http://user:pass@localhost:3000/path?query#fragment');
30-
31-
// list of withers
32-
$uri->withScheme();
33-
$uri->withUserInfo();
34-
$uri->withHost();
35-
$uri->withPort();
36-
$uri->withPath();
37-
$uri->withQuery();
38-
$uri->withFragment();
39-
40-
// list of getters
41-
$uri->getScheme();
42-
$uri->getUserInfo();
43-
$uri->getHost();
44-
$uri->getPort();
45-
$uri->getPath();
46-
$uri->getQuery();
47-
$uri->getFragment();
48-
$uri->getAuthority();
49-
50-
// converts the URI to a string
51-
(string) $uri;
52-
```
53-
54-
### Another schemes
55-
56-
```php
57-
$uri = new Uri('mailto:test@example.com');
58-
59-
$uri->getScheme(); // mailto
60-
$uri->getPath(); // test@example.com
61-
```
62-
63-
```php
64-
$uri = new Uri('maps:?q=112+E+Chapman+Ave+Orange,+CA+92866');
65-
66-
$uri->getScheme(); // maps
67-
$uri->getQuery(); // q=112+E+Chapman+Ave+Orange,+CA+92866
68-
```
69-
70-
```php
71-
$uri = new Uri('tel:+1-816-555-1212');
72-
73-
$uri->getScheme(); // tel
74-
$uri->getPath(); // +1-816-555-1212
75-
```
76-
77-
```php
78-
$uri = new Uri('urn:oasis:names:specification:docbook:dtd:xml:4.1.2');
79-
80-
$uri->getScheme(); // urn
81-
$uri->getPath(); // oasis:names:specification:docbook:dtd:xml:4.1.2
82-
```
83-
84-
---
85-
86-
## Test run
87-
88-
```bash
89-
php vendor/bin/phpunit
90-
```
91-
92-
## Useful links
93-
94-
* https://tools.ietf.org/html/rfc3986
95-
* https://www.php-fig.org/psr/psr-7/
96-
* https://www.php-fig.org/psr/psr-17/
1+
⚠️ This package was **moved** to the [http-message](https://github.com/sunrise-php/http-message) package and is abandoned.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@
5454
"phpdoc -d src/ -t phpdoc/",
5555
"XDEBUG_MODE=coverage phpunit --coverage-html coverage/"
5656
]
57-
}
57+
},
58+
"abandoned": "sunrise/http-message"
5859
}

0 commit comments

Comments
 (0)