Please refer to the jeremykendall/php-domain-parser upgrading guide for a complete overview of all internal changes.
In order to stay compatible with the base package, this package dropped all support for PHP versions before and including 7.3. The minimum supported PHP version is now PHP 7.4 and the minimum supported Laravel version is 8.x.
The following changes might directly impact you installation.
- The
Adapter
class has been replaced with theDomainParser
class and is now registered in the Laravel IOC container:
<?php
- \Bakame\Laravel\Pdp\Adapter::class
+ \Bakame\Laravel\Pdp\DomainParser::class
-
The
Adapter::getTLDs()
method has been replaced withDomainParser::getTopLevelDomains()
. -
The
Adapter::refreshRules()
andAdapter::refreshTLDs()
methods have been removed. Please use thedomain-parser:refresh
artisan command to refresh the cache instead. -
Facade classes are now in their own namespace:
<?php
+ \Bakame\Laravel\Pdp\Facades\DomainParser::class
<?php
- \Bakame\Laravel\Pdp\RulesFacade::class
+ \Bakame\Laravel\Pdp\Facades\Rules::class
<?php
- \Bakame\Laravel\Pdp\TopLevelDomainsFacade::class
+ \Bakame\Laravel\Pdp\Facades\TopLevelDomains::class
- The refresh cache command is now in its own namespace:
<?php
- \Bakame\Laravel\Pdp\RefreshCacheCommand::class
+ \Bakame\Laravel\Pdp\Commands\RefreshCacheCommand::class
Previously you could choose a HTTP client implementing \Pdp\HttpClient
. This has been removed from the base package without a replacement.
Since Laravel comes with guzzle/guzzle by default we now only support guzzle and removed the http_client
config option.
-
The
http_client
option has been removed. -
The
cache_client
option has been renamed tocache_driver
.
This option refers to a cache driver configured in config/cache.php
. When set to null
the default application cache driver is used.
-
The
cache_ttl
option now only supports int|null and expects a number in minutes instead of seconds. -
The
http_client_options
option hasn't changed, but now only applies to guzzle client options. -
The
url_psl
option has been renamed touri_public_suffix_list
. -
The
url_rzd
option has been renamed touri_top_level_domain_list
.