Download the PHP package sensiolabs-de/storyblok-bundle without Composer

On this page you can find all versions of the php package sensiolabs-de/storyblok-bundle. 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 storyblok-bundle

Storyblok Bundle

Branch PHP Code Coverage
master PHP codecov

A Symfony bundle to integrate the Storyblok headless CMS with your Symfony application.

This bundle leverages the sensiolabs-de/storyblok-api, a type-safe PHP SDK for Storyblok. It configures the Storyblok client and provides a Symfony Profiler extension for easier debugging and monitoring of Storyblok API interactions.

Installation

To install the bundle run:

Configuration

Symfony Flex

If you are using symfony/flex, the bundle will be automatically enabled and the configuration files will be added to your project.

Manual Configuration

If symfony/flex is not available, or you prefer manual setup, follow these steps:

  1. Add the Configuration Add the following configuration to your config/packages/storyblok.yaml:

    If you want to use the AssetsApi, you can also add the following configuration:

  2. Set Environment Variables Define the necessary environment variables in your .env file:

Usage

API Usage

After setting up the bundle, you can use the Storyblok client within your Symfony application to interact with the Storyblok CMS API.

For detailed usage and examples, please refer to the Storyblok API SDK documentation.

Versions (draft and published)

Storyblok allows you to work with two versions of your content: draft and published. By default, the bundle uses the published version. If you want to use the draft version, you can set the version parameter in the configuration:

Webhooks

Storyblok Webhooks allow your Symfony application to react to events like content changes. This bundle provides easy setup for handling these Webhooks.

Configuration

To enable Webhooks, add the following route to your application:

This will make a route available at /storyblok/webhook to receive Webhook requests. For more details on how Webhooks work, check the Storyblok Webhooks Documentation.

Verifying Webhook Signatures (Security)

For security, you can enable the verification of Webhook signatures to ensure that the requests come from Storyblok. This is done by configuring a webhook_secret:

You'll need to set this secret in your .env file:

Once enabled, the bundle will automatically validate each Webhook request against this secret.

Handling Webhook Events

To process Webhooks, implement the WebhookHandlerInterface. The bundle automatically registers any classes implementing this interface as Webhook handlers, no additional service configuration is required.

Example Webhook Handler

Here's an example of a Webhook handler that purges a Varnish cache whenever certain events occur (e.g., content published or deleted):

Best Practices

This approach provides a streamlined and secure way to handle Webhooks from Storyblok, allowing your Symfony application to react to changes effectively. For more details and use cases, you can always refer to the Storyblok API SDK documentation.


All versions of storyblok-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
oskarstark/enum-helper Version ^1.5
psr/log Version ^3.0
sensiolabs-de/storyblok-api Version ^3.4.0
symfony/config Version ^6.0 || ^7.0
symfony/dependency-injection Version ^6.0 || ^7.0
symfony/framework-bundle Version ^6.0 || ^7.0
symfony/http-client Version ^6.0 || ^7.0
symfony/http-kernel Version ^6.0 || ^7.0
symfony/monolog-bundle Version ^3.10
thecodingmachine/safe Version ^2.0
webmozart/assert Version ^1.11
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 sensiolabs-de/storyblok-bundle contains the following files

Loading the files please wait ....