From 32534621a7e9db298770d7a7f5d14951d9bbeb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=82=D0=BE=D0=BB=D0=B8=D0=B9=20=D0=9D?= =?UTF-8?q?=D0=B5=D1=85=D0=B0=D0=B9?= Date: Sat, 31 Dec 2022 03:03:24 +0100 Subject: [PATCH 1/2] update README.md --- README.md | 97 +------------------------------------------------------ 1 file changed, 1 insertion(+), 96 deletions(-) diff --git a/README.md b/README.md index 697fda4..78e609a 100644 --- a/README.md +++ b/README.md @@ -1,96 +1 @@ -## URI wrapper for PHP 7.1+ based on RFC-3986, PSR-7 and PSR-17 - -[![Gitter](https://badges.gitter.im/sunrise-php/support.png)](https://gitter.im/sunrise-php/support) -[![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) -[![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) -[![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) -[![Latest Stable Version](https://poser.pugx.org/sunrise/uri/v/stable?format=flat)](https://packagist.org/packages/sunrise/uri) -[![Total Downloads](https://poser.pugx.org/sunrise/uri/downloads?format=flat)](https://packagist.org/packages/sunrise/uri) -[![License](https://poser.pugx.org/sunrise/uri/license?format=flat)](https://packagist.org/packages/sunrise/uri) - ---- - -## Installation - -```bash -composer require sunrise/uri -``` - -## How to use? - -```php -use Sunrise\Uri\Uri; -use Sunrise\Uri\UriFactory; - -// creates a new URI -$uri = new Uri('http://user:pass@localhost:3000/path?query#fragment'); - -// creates a new URI with a factory (is equivalent to new Uri(string)) -$uri = (new UriFactory)->createUri('http://user:pass@localhost:3000/path?query#fragment'); - -// list of withers -$uri->withScheme(); -$uri->withUserInfo(); -$uri->withHost(); -$uri->withPort(); -$uri->withPath(); -$uri->withQuery(); -$uri->withFragment(); - -// list of getters -$uri->getScheme(); -$uri->getUserInfo(); -$uri->getHost(); -$uri->getPort(); -$uri->getPath(); -$uri->getQuery(); -$uri->getFragment(); -$uri->getAuthority(); - -// converts the URI to a string -(string) $uri; -``` - -### Another schemes - -```php -$uri = new Uri('mailto:test@example.com'); - -$uri->getScheme(); // mailto -$uri->getPath(); // test@example.com -``` - -```php -$uri = new Uri('maps:?q=112+E+Chapman+Ave+Orange,+CA+92866'); - -$uri->getScheme(); // maps -$uri->getQuery(); // q=112+E+Chapman+Ave+Orange,+CA+92866 -``` - -```php -$uri = new Uri('tel:+1-816-555-1212'); - -$uri->getScheme(); // tel -$uri->getPath(); // +1-816-555-1212 -``` - -```php -$uri = new Uri('urn:oasis:names:specification:docbook:dtd:xml:4.1.2'); - -$uri->getScheme(); // urn -$uri->getPath(); // oasis:names:specification:docbook:dtd:xml:4.1.2 -``` - ---- - -## Test run - -```bash -php vendor/bin/phpunit -``` - -## Useful links - -* https://tools.ietf.org/html/rfc3986 -* https://www.php-fig.org/psr/psr-7/ -* https://www.php-fig.org/psr/psr-17/ +⚠️ This package was **moved** to the [http-message](https://github.com/sunrise-php/http-message) package and is abandoned. From 173364e9ab051a240375936bbd89f3527c3fde4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=82=D0=BE=D0=BB=D0=B8=D0=B9=20=D0=9D?= =?UTF-8?q?=D0=B5=D1=85=D0=B0=D0=B9?= Date: Sat, 31 Dec 2022 03:03:30 +0100 Subject: [PATCH 2/2] update composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a4c5e05..7bb5474 100644 --- a/composer.json +++ b/composer.json @@ -54,5 +54,6 @@ "phpdoc -d src/ -t phpdoc/", "XDEBUG_MODE=coverage phpunit --coverage-html coverage/" ] - } + }, + "abandoned": "sunrise/http-message" }