You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-33Lines changed: 37 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,12 @@ You need:
38
38
39
39
-**PHP >= 7.4** but the latest stable version of PHP is recommended
40
40
- the `intl` extension
41
+
- a copy of the [Public Suffix List](https://publicsuffix.org/) data and/or a copy of the [IANA Top Level Domain List](https://www.iana.org/domains/root/files). Please refer to the [Managing external data source section](#managing-the-package-external-resources) for more information when using this package in production.
41
42
42
43
## Usage
43
44
44
-
**If you are upgrading from version 5 please check the [upgrading guide](UPGRADING.md) for known issues.**
45
+
> [!WARNING]
46
+
> If you are upgrading from version 5 please check the [upgrading guide](UPGRADING.md) for known issues.
45
47
46
48
### Resolving Domains
47
49
@@ -115,9 +117,10 @@ These methods resolve the domain against their respective data source using
115
117
the same rules as the `resolve` method but will instead throw an exception
116
118
if no valid effective TLD is found or if the submitted domain is invalid.
117
119
118
-
**All these methods expect as their sole argument a `Pdp\Host` implementing
120
+
> [!CAUTION]
121
+
> All these methods expect as their sole argument a `Pdp\Host` implementing
119
122
object, but other types (ie: `string`, `null` and stringable objects) are
120
-
supported with predefined conditions as explained in the remaining document.**
123
+
supported with predefined conditions as explained in the remaining document.
121
124
122
125
~~~php
123
126
<?php
@@ -157,23 +160,18 @@ To instantiate each domain resolver you can use the following named constructor:
157
160
158
161
**If the instantiation does not work an exception will be thrown.**
159
162
160
-
**WARNING:**
161
-
162
-
**You should never resolve domain name this way in production, without, at
163
-
least, a caching mechanism to reduce PSL downloads.**
164
-
165
-
**Using the Public Suffix List to determine what is a valid domain name and what
166
-
isn't is dangerous, particularly in these days when new gTLDs are arriving at a
167
-
rapid pace.**
168
-
169
-
**If you are looking to know the validity of a Top Level Domain, the
170
-
IANA Top Level Domain List is the proper source for this information or
171
-
alternatively consider using directly the DNS.**
172
-
173
-
**If you must use this library for any of the above purposes, please consider
174
-
integrating an updating mechanism into your software.**
175
-
176
-
**For more information go to the [Managing external data source section](#managing-the-package-external-resources)**
163
+
> [!WARNING]
164
+
> You SHOULD never resolve domain name this way in production, without, at
165
+
least, a caching mechanism to reduce external resource downloads.
166
+
> Using the Public Suffix List to determine what is a valid domain name and what
167
+
isn't is dangerous, and MAY lead to errors because of new gTLDs being registered
168
+
on a regular basis.
169
+
> If you are looking to know the validity of a Top Level Domain, you MUST use
170
+
the IANA Top Level Domain List as the proper source for this information or
171
+
alternatively the DNS.
172
+
> If you MUST use this library for any of the above purposes, you SHOULD consider
173
+
integrating an updating mechanism into your software.
174
+
> For more information go to the [Managing external data source section](#managing-the-package-external-resources)**
0 commit comments