Download the PHP package perkamo/symfony-bundle without Composer

On this page you can find all versions of the php package perkamo/symfony-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 symfony-bundle

perkamo/symfony-bundle

Perkamo integration bundle for Symfony applications.

It provides:

Compatibility

Symfony 7.0 through 7.3 are intentionally not supported.

Install

Register The Bundle

Symfony Flex can enable the bundle from the package metadata. Without Flex, add it to config/bundles.php:

Configure

Backend event calls use the configured server API key to identify the Space. The bundle defaults to the hosted Perkamo API. Configure base_url only for a custom, staging or private endpoint.

Browser token routes are optional. Create a signing key in the Perkamo console (Settings → Security → Signing keys). It gives you a KID (shown in the creation dialog and then listed in the table) and a one-time secret (shown once, backend-only). Enable perkamo.browser and wire both — the %env(...)% names are your own choice:

Key What it is
kid KID of your signing key; goes in the token header. Safe to expose.
secret The signing key's one-time secret that signs the token. Keep it backend-only.

When enabled, the bundle verifies the Symfony user session and self-signs a short-lived client token for @perkamo/browser. The token scope and event list are clamped to the signing key policy by Perkamo during client route verification; only the secret is sensitive — the kid is public.

The bundle registers Perkamo\Client, so backend services can use constructor injection:

The same autowired Perkamo\Client can read trusted admin metadata:

Use identify() for trusted customer traits and eventCatalog() for backend admin screens that need configured event keys and labels. Non-2xx API responses throw Perkamo\Exception\PerkamoApiException, including request id, retry-after and rate-limit metadata when available.

Browser SDK Endpoints

After importing the routes, the bundle exposes:

Import the bundle routes only when you enable those browser endpoints:

The bundle ships route definitions as PHP config so symfony/yaml is not a runtime dependency of this package. Importing the PHP route file from your application YAML route config is supported by Symfony; type: php makes the loader explicit.

The token endpoints use the current Symfony security user identifier by default. For custom customer IDs, implement Perkamo\SymfonyBundle\Security\UserIdResolverInterface and configure:

The resolver may also set a request attribute named perkamo_user_id before the controller runs.

Twig Frontend Helper

In a Twig layout:

The helper loads the browser bundle from jsDelivr by default and defines window.PerkamoSymfony.createClient(). The generated config includes browser bundle metadata, local token endpoints and a custom API endpoint only when base_url is configured. Frontend code can then create the preview browser client without handling token routes manually:

The generated frontend config never includes the server API key, signing secret or Space ID.

The generated client uses Perkamo /v1/client/* routes after it receives a client token. Until those routes are enabled for an integration, use the bundle for backend event emission and token issuing, and return customer state through your own backend controllers.

By default, the Twig helper loads the exact browser package version bundled with this Symfony bundle:

Override perkamo.browser.bundle.version only when intentionally using a different compatible browser package. To use a self-hosted bundle globally, configure a custom path:

For a one-off template override, pass your own path expression:

perkamo_browser_sdk_script() remains available as a backward-compatible alias, but new integrations should use perkamo_browser_bundle_script().

Security Notes

Use this package only from trusted Symfony backend code. The token routes require an authenticated Symfony user before they self-sign a short-lived client token. Never expose the server API key or signing secret to templates, JSON config endpoints, browser bundles, mobile apps or embedded widgets.

Client tokens are short-lived credentials signed locally by the Symfony application with a Perkamo signing key secret.

License

MIT


All versions of symfony-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-hash Version *
ext-json Version *
perkamo/sdk Version ^0.9
symfony/config Version ^6.4 || ^7.4 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.4 || ^8.0
symfony/http-foundation Version ^6.4 || ^7.4 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.4 || ^8.0
symfony/routing Version ^6.4 || ^7.4 || ^8.0
symfony/security-core Version ^6.4 || ^7.4 || ^8.0
twig/twig Version ^3.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 perkamo/symfony-bundle contains the following files

Loading the files please wait ...