Download the PHP package storyblok/richtext-resolver without Composer
On this page you can find all versions of the php package storyblok/richtext-resolver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package richtext-resolver
Storyblok PHP Richtext Renderer
This package allows you to get an HTML string from the richtext field of Storyblok.
Installing the Storyblok PHP Richtext Renderer
You can install the Storyblok PHP Richtext Renderer via composer. Storyblok PHP Richtext Renderer requires PHP version 7.3 to 8.2. The suggestion is to use an actively supported version of PHP (8.1 and 8.2).
If you want to install the stable release of Storyblok PHP Richtext Renderer you can launch:
If you want to install the current development release, you can add the version dev-master
:
For executing the command above, you need to have composer installed on your development environment. If you need to install Composer, you can follow the official Composer documentation:
- Install Composer on GNU Linux / Unix / macOS
- Install Composer on Windows
We suggest using the latest version of PHP.
Usage:
Instantiate the Resolver
class:
Use the function render()
to get the html string from your richtext field.
How to define a custom schema for resolver?
Make a copy of the default schema storyblok-php-richtext-renderer/src/Schema.php and add your own schema as parameter to the Richtext class.
Testing
We use PHPUnit for tests. You can execute the following composer task to run the tests:
If you want to generate the coverage report you can launch:
You will find the HTML reports in the coverage/
directory.
Code Style guide
For consistency, we are using PHP Coding Standards Fixer tool, for checking and fixing the code to follow standards.
For checking the code you can execute:
If you want to automatically fix the code to follow standards:
If you want to execute fix and test coverage:
Contribution
Fork me on Github