Comments (4)
it seems that it works if you use Symfony serialiser
# config/packages/messenger
framework:
messenger:
serializer:
symfony_serializer:
format: json
transports:
async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
serializer: messenger.transport.symfony_serializer
from api-platform.
I've had this problem, take a look at symfony/symfony-docs#17636 (comment)
from api-platform.
Hi,
I'm having the same problem here. It happens when your framework.yaml contains the following:
framework:
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.native
If you comment these lines (and correctly configure your api-platform routes as stateless), the issue is fixed.
However, this is not possible every time as you might need this specific configuration in framework.yaml if your app also have some routes that are not stateless.
I've discussed a bit the point on Symfony's support channel on Slack and the original problem is that Symfony does not guarantee that the Request object is serializable. So passing it into an envelope seems problematic in itself. I guess a fix should be made Api-Platform side to ensure the envelope's content is serializable. Removing the Request from the $context before passing it to the envelope seems to be the good way to achieve but this might be a breaking change...
from api-platform.
Removing the Request from the $context before passing it to the envelope seems to be the good way to achieve but this might be a breaking change...
I totally agree...
from api-platform.
Related Issues (20)
- Redundant @context field in OpenAPI for embedded JSON+LD resources
- denormalizationContext imbrique
- New Format : RSS feed
- Open up Paginator::$documents for read
- 502 status code in "Check PWA reachability" ci step
- Specific order of operations in #ApiResource annotation causes incorrect API schema (using wrong serialization group)
- Impossible to use vite/vue3 with supplied Caddyfile HOT 3
- The event_listeners_backward_compatibility_layer: true is broken in version 3.3.0 HOT 1
- Building 3.3.2 for production throws: Error: <Html> should not be imported outside of pages/_document. HOT 3
- "Invalid identifier value or configuration." HOT 1
- ProcessorInterface multiple ProcessorInterfaces (persist & remove) && Security within State Providers
- Asset mapper warnings HOT 1
- Potential conflict between API Platform and Gedmo\Translatable
- Strange Api-platform activity. It looks like ApiProperty Attribute doesn't work with json format. Looks like a security issue. HOT 5
- Support indexes in query collection/array parameters
- Handling File Upload Error
- Why i am not able to deploy second time like first time i can in second i see this error
- Why i am not able to deploy second time like first time i can in second i see this error
- How to handle Custom Filter Queries in Symfony - compatible with api platform HOT 1
- Custom messenger bus & custom dto cannot be used at the same site
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-platform.