rekalogika / temporary-url-bundle
Symfony bundle for creating temporary URLs to your resources. You provide the resource in a plain PHP object, and a service to turn it into a HTTP response. The framework handles the rest.
Fund package maintenance!
priyadi
Installs: 3 026
Dependents: 3
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 4
Type:symfony-bundle
Requires
- php: ^8.2
- psr/simple-cache: ^3.0
- rekalogika/psr-16-simple-cache-bundle: ^1.0
- symfony/config: ^6.3 || ^7.0
- symfony/dependency-injection: ^6.3 || ^7.0
- symfony/http-foundation: ^6.3 || ^7.0
- symfony/http-kernel: ^6.3 || ^7.0
- symfony/routing: ^6.3 || ^7.0
Requires (Dev)
- mockery/mockery: ^1.6
- phpstan/phpstan: ^1.12
- phpstan/phpstan-mockery: ^1.1
- phpunit/phpunit: ^10.5
- psalm/plugin-mockery: ^1.1
- psalm/plugin-phpunit: ^0.19.0
- rector/rector: ^1.2
- symfony/asset-mapper: ^6.3 || ^7.0
- symfony/event-dispatcher: ^6.3 || ^7.0
- symfony/phpunit-bridge: ^6.3 || ^7.0
- twig/twig: ^2.12|^3.0
- vimeo/psalm: ^5.26
Suggests
- twig/twig: Use the 'temporary_url' filter to generate temporary URLs in Twig templates
- dev-main
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- 0.1.0
- dev-dependabot/npm_and_yarn/assets/babel/core-7.26.0
- dev-dependabot/npm_and_yarn/assets/babel/plugin-transform-class-properties-7.25.9
- dev-dependabot/npm_and_yarn/assets/babel/preset-env-7.26.0
- dev-dependabot/npm_and_yarn/assets/babel/cli-7.25.9
- dev-dependabot/npm_and_yarn/assets/babel/preset-env-7.25.8
- dev-dependabot/npm_and_yarn/assets/babel/core-7.25.8
- dev-dependabot/npm_and_yarn/assets/babel/plugin-transform-class-properties-7.25.7
- dev-dependabot/npm_and_yarn/assets/babel/cli-7.25.7
This package is auto-updated.
Last update: 2024-10-28 13:31:40 UTC
README
Symfony bundle for creating temporary URLs to your resources. You provide the resource in a plain PHP object, and a service to turn it into a HTTP response. The framework handles the rest.
Synopsis
use Rekalogika\TemporaryUrl\Attribute\AsTemporaryUrlServer; use Rekalogika\TemporaryUrl\TemporaryUrlGeneratorInterface; use Symfony\Component\HttpFoundation\Response; class MyData { public string $name = 'John Doe'; } class MyDataServer { #[AsTemporaryUrlServer] public function respond(MyData $data): Response { return new Response('My name is ' . $data->name); } } /** @var TemporaryUrlGeneratorInterface $temporaryUrlGenerator */ $myData = new MyData; $myData->name = 'Jane Doe'; $url = $temporaryUrlGenerator->generateUrl($myData);
Documentation
rekalogika.dev/temporary-url-bundle
License
MIT
Contributing
Issues and pull requests should be filed in the GitHub repository rekalogika/temporary-url-bundle.