Skip to content

Commit d82e3fa

Browse files
committed
Updates README
1 parent f1755ea commit d82e3fa

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,28 @@
1-
PHP Domain Parser
1+
PHP Domain Parser
22
=================
33

4-
**PHP Domain Parser** is a [Public Suffix List](http://publicsuffix.org/) based
4+
**PHP Domain Parser** is a [Public Suffix List](http://publicsuffix.org/) based
55
domain parser implemented in PHP.
66

77
[![Build Status](https://travis-ci.org/jeremykendall/php-domain-parser.png?branch=master)](https://travis-ci.org/jeremykendall/php-domain-parser)
88
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/13310245-48b5-43a2-ac30-269e059305e1/mini.png)](https://insight.sensiolabs.com/projects/13310245-48b5-43a2-ac30-269e059305e1)
99
[![Total Downloads](https://poser.pugx.org/jeremykendall/php-domain-parser/downloads.png)](https://packagist.org/packages/jeremykendall/php-domain-parser)
1010
[![Latest Stable Version](https://poser.pugx.org/jeremykendall/php-domain-parser/v/stable.png)](https://packagist.org/packages/jeremykendall/php-domain-parser)
1111

12-
## WARNING: BC BREAK IN ALL 1.4 VERSIONS
13-
14-
The 1.4 series introduced a backwards incompatible change by adding PHP's `ext-mbstring`
15-
and `ext-intl` as dependencies. This should have resulted in a major version
16-
bump. Instead I bumped the minor version from 1.3.1 to 1.4.
17-
18-
I highly recommend reverting to 1.3.1 if you're running into extension issues and
19-
do not want to or cannot install `ext-mbstring` and `ext-intl`. You will lose
20-
IDNA and IPv6 support, however. Those are only available in versions >= 1.4.
21-
22-
Version 2 is currently in the works. Please keep an eye out. I apologize for any
23-
issues you may have encountered due my [semver](http://semver.org/) error.
24-
2512
Motivation
2613
----------
2714

2815
While there are plenty of excellent URL parsers and builders available, there
29-
are very few projects that can accurately parse a url into its component
30-
subdomain, registerable domain, and public suffix parts.
16+
are very few projects that can accurately parse a url into its component
17+
subdomain, registerable domain, and public suffix parts.
3118

3219
Consider the domain www.pref.okinawa.jp. In this domain, the
3320
*public suffix* portion is **okinawa.jp**, the *registerable domain* is
3421
**pref.okinawa.jp**, and the *subdomain* is **www**. You can't regex that.
3522

36-
Other similar libraries focus primarily on URL building, parsing, and manipulation and
37-
additionally include public suffix domain parsing. PHP Domain Parser was built around
38-
accurate Public Suffix List based parsing from the very beginning, adding a URL
23+
Other similar libraries focus primarily on URL building, parsing, and manipulation and
24+
additionally include public suffix domain parsing. PHP Domain Parser was built around
25+
accurate Public Suffix List based parsing from the very beginning, adding a URL
3926
object simply for the sake of completeness.
4027

4128
Installation
@@ -132,11 +119,11 @@ $publicSuffix = $url->host->publicSuffix;
132119

133120
### IDNA Support
134121

135-
[IDN (Internationalized Domain Name)](http://en.wikipedia.org/wiki/Internationalized_domain_name)
122+
[IDN (Internationalized Domain Name)](http://en.wikipedia.org/wiki/Internationalized_domain_name)
136123
support was added in version `1.4.0`. Both unicode domains and their ASCII equivalents
137124
are supported.
138125

139-
**IMPORTANT**:
126+
**IMPORTANT**:
140127

141128
* PHP's [intl](http://php.net/manual/en/book.intl.php) extension is
142129
required for the [IDN functions](http://php.net/manual/en/ref.intl.idn.php).
@@ -252,12 +239,12 @@ class Pdp\Uri\Url#6 (8) {
252239
**IMPORTANT**: IPv6 url host names *must* be enclosed in square brackets. They
253240
will not be parsed properly otherwise.
254241

255-
> Hat tip to [@geekwright](https://github.com/geekwright) for adding IPv6 support in a
242+
> Hat tip to [@geekwright](https://github.com/geekwright) for adding IPv6 support in a
256243
> [bugfix pull request](https://github.com/jeremykendall/php-domain-parser/pull/35).
257244
258245
### Parsing Domains ###
259246

260-
If you'd like to parse the domain (or host) portion only, you can use
247+
If you'd like to parse the domain (or host) portion only, you can use
261248
`Parser::parseHost()`.
262249

263250
```php
@@ -294,9 +281,9 @@ var_dump($parser->isSuffixValid('www.example.com.au');
294281

295282
A suffix is considered invalid if it is not contained in the [Public Suffix List](http://publicsuffix.org/).
296283

297-
> Huge thanks to [@SmellyFish](https://github.com/SmellyFish) for submitting
298-
> [Add a way to validate TLDs](https://github.com/jeremykendall/php-domain-parser/pull/36)
299-
> to add public suffix validation to the project.
284+
> Huge thanks to [@SmellyFish](https://github.com/SmellyFish) for submitting
285+
> [Add a way to validate TLDs](https://github.com/jeremykendall/php-domain-parser/pull/36)
286+
> to add public suffix validation to the project.
300287
301288
### Retrieving Domain Components Only ###
302289

@@ -321,15 +308,15 @@ string(5) "co.uk"
321308

322309
### Sanity Check ###
323310

324-
You can quickly parse a url from the command line with the provided `parse`
311+
You can quickly parse a url from the command line with the provided `parse`
325312
vendor binary. From the root of your project, simply call:
326313

327314
``` bash
328315
$ ./vendor/bin/parse <url>
329316
```
330317

331318
If you pass a url to `parse`, that url will be parsed and the output printed
332-
to screen.
319+
to screen.
333320

334321
If you do not pass a url, `http://user:[email protected]:8080/path/to/page.html?query=string#fragment` will be parsed and the output printed to screen.
335322

@@ -386,6 +373,19 @@ Contributing
386373
Pull requests are *always* welcome! Please review the CONTRIBUTING.md document before
387374
submitting pull requests.
388375

376+
#### Heads up: BC Break In All 1.4 Versions
377+
378+
The 1.4 series introduced a backwards incompatible change by adding PHP's `ext-mbstring`
379+
and `ext-intl` as dependencies. This should have resulted in a major version
380+
bump. Instead I bumped the minor version from 1.3.1 to 1.4.
381+
382+
I highly recommend reverting to 1.3.1 if you're running into extension issues and
383+
do not want to or cannot install `ext-mbstring` and `ext-intl`. You will lose
384+
IDNA and IPv6 support, however. Those are only available in versions >= 1.4.
385+
386+
Version 2 is currently in the works. Please keep an eye out. I apologize for any
387+
issues you may have encountered due my [semver](http://semver.org/) error.
388+
389389
Attribution
390390
-----------
391391

0 commit comments

Comments
 (0)