Download the PHP package rollerworks/pdb-symfony-bridge without Composer

On this page you can find all versions of the php package rollerworks/pdb-symfony-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pdb-symfony-bridge

PHP Domain Parser Symfony-bridge

This package provides a Symfony specific bridge for the PHP domain-parser by Jeremy Kendall and Ignace Nyamagana Butera.

Providing a Cache adapter, HTTP Client adapter, and optional FrameworkBundle integration at Rollerworks\Component\PdbSfBridge\Bundle\RollerworksPdbBundle.

Installation

To install this package, add rollerworks/pdb-symfony-bridge to your composer.json:

Now, Composer will automatically download all required files, and install them for you.

Symfony Flex (with contrib) is assumed to enable the Bundle and add required configuration. https://symfony.com/doc/current/bundles.html

Otherwise add the following configuration:

Requirements

You need at least PHP 8.1, and internet access is recommended but not required.

The public-suffix and top-level domain needs to manually updated from time to time. When internet access is available the PdbManager will automatically download the list and store it in the cache.

If no internet access is available, the local cache needs to refreshed manually. (Current not supported yet).

Basic Usage

Use the HttpUpdatedPdpManager to get a PdbManager which automatically updates the local cache using the HttpClient.

When internet access is not possible use the StaticPdpManager instead.

For resolving domain names see the official documentation of [PHP domain-parser].

Testing

For using the manager in tests use \Rollerworks\Component\PdbSfBridge\PdpMockProvider::getPdpManager().

Bundle Usage

First add set a suitable cache adapter (the Flex recipe uses ArrayCache to allow booting-up the Kernel, but for production usage it's required to use a persistent cache adapter, as otherwise whenever the Manager is initialized the rules need to be downloaded, parsed and cached).

Offline usage

When the HttpClient component is installed and enabled the HttpUpdatedPdpManager is automatically used. When the HttpClient is not available the StaticPdpManager is used instead.

_To force usage of the static adapter set configuration rollerworks_pdb.manager to static._

When the static adapter is enabled you must run rollerworks-pdb:update with the lists provided as files names.

And disable expiration of the cache, as otherwise the pre-bundled version will be used instead.

First download the lists from https://publicsuffix.org/list/public_suffix_list.dat and https://data.iana.org/TLD/tlds-alpha-by-domain.txt respectively.

And load them into the cache.

The files path can be either absolute or relative to the current working directory.

Cache expiration disable: Symfony cache-warming is designed as such that once the cache is warmed-up no future file writing is expected (for security reasons).

Which is why the cache should be easily updatable, with preferable no filesystem writing.

The rollerworks-pdb:update updates the cache without writing the provided files to the application var/cache directory. So when the cache does expire, there would be no files to read from, to prevent this the pre-bundled lists (used for the MockManager) are used instead, but these are only updated from time to time, and thus outdated.

Versioning

For transparency and insight into the release cycle, and for striving to maintain backward compatibility, this package is maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

For more information on SemVer, please visit http://semver.org/.

License

This library is released under the MIT license.

Contributing

This is an open source project. If you'd like to contribute, please read the Contributing Guidelines. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.


All versions of pdb-symfony-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
jeremykendall/php-domain-parser Version ^6.3
psr/simple-cache Version ^1.0 || ^3.0
symfony/cache Version ^6.3 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rollerworks/pdb-symfony-bridge contains the following files

Loading the files please wait ....