- How do I install pierotto/tokenizer-bundle?
- Install it with Composer by running composer require pierotto/tokenizer-bundle. In a Symfony app, register the bundle in config/bundles.php if Symfony Flex does not do it automatically. Then configure the tokenizer service according to the bundle README and clear your cache.
- Does pierotto/tokenizer-bundle work with Laravel?
- No, it is documented as a Symfony bundle rather than a Laravel package. It does not ship a Laravel service provider, facade, or config file in the provided overview. Laravel teams should either build a custom integration or choose a Laravel-native JWT package.
- What is pierotto/tokenizer-bundle used for?
- The package is intended for secure data exchange between two parties using a JWT token. It also describes tokenizer functionality for configuring and injecting a tokenizer service to split, parse, and process strings or templates. Treat the README and source as the source of truth for the exact API.
- How do I configure the tokenizer service in Symfony?
- Enable the bundle in your Symfony kernel or bundles.php, then add the bundle configuration required for your JWT setup. The README should list the available configuration keys and any required secret or key material. After changing config, clear the Symfony cache and verify the service is available in the container.
- How do I inject the tokenizer service into my application code?
- In Symfony, use constructor autowiring or fetch the service from the container using its service ID. The bundle's main purpose is to let you configure and inject a tokenizer service rather than instantiate it manually. Check the README for the exact service class or alias to type-hint.
- Can pierotto/tokenizer-bundle split and parse strings or templates?
- The package blurb says it provides a tokenizer service for splitting, parsing, and processing strings or templates. The overview separately emphasizes JWT-based secure data exchange, so confirm which features exist in your installed version. Review the bundle source and tests before relying on template parsing behavior.
- How does the JWT token secure data exchange between two parties?
- A JWT carries claims between the sender and receiver, and the receiver validates the token before trusting its contents. The bundle's job is to integrate tokenizer functionality into a Symfony app so that exchange can be configured and injected. You still need to manage signing keys, expiration, and audience checks according to your security requirements.
- Is pierotto/tokenizer-bundle compatible with PHP 8 and modern Symfony versions?
- Compatibility depends on the package's composer.json constraints, so check the GitHub repository or Packagist page for the supported PHP and Symfony versions. Symfony bundles often support a range of versions, but older bundles may not support Symfony 6 or 7. Do not assume PHP 8 support without verifying the published requirements.
- How do I test a Symfony bundle like tokenizer-bundle in my application?
- Use Symfony's KernelTestCase to boot the kernel and fetch the tokenizer service from the test container. Write unit tests around token creation and parsing with known inputs and expected outputs. If you wrap the bundle for Laravel, test the wrapper through Laravel's container and feature tests instead.
- What are alternatives to pierotto/tokenizer-bundle for JWT handling in Laravel?
- Laravel developers commonly use tymon/jwt-auth for JWT-based APIs or laravel/sanctum for first-party API tokens. For lower-level JWT encoding and validation, firebase/php-jwt is a widely used library. If you need Symfony bundle behavior, use it in a Symfony service and expose it to Laravel through a custom package.