1000 search results

…there is a bug in it with API Platform. Or, to be more fair to them, API Platform needed to make an update to fully support the new security system ... and they HAVE - https://github.com/api-platform/core/pull/3899 - but it has not…
weaverryan
weaverryan
Read Full Comment
api-platform/core/blob/1607fc70c59caec7118949cc3425fbd0cf64eb90/src/Security/ResourceAccessChecker.php#L51 I've created an issue about this - https://github.com/api-platform/core/issues/3922. Unfortunately, until that's fixed, I don't think you'll be able to use the new system with API
weaverryan
weaverryan
Read Full Comment
Hello. I have 2 groups to read: * @ApiResource( * normalizationContext={"groups"={"group:read","group_clear:read"}} * ) By default works "group:read" context. How can I make a request to the api platform to get data in context "group_clear:read"?
…5", "api-platform/core": "^2.5", "symfony/framework-bundle": "5.1.*", ... ` NOT working Entity/CheeseListing.php ` /** * @ApiResources( * ... * itemOperations={ * ... * "put"={"security"=>"is_granted('ROLE_USER') and previous_object.getOwner() == user"} * ...} * ... * ) */ ` Working Entity/CheeseListing.php, due to https://api-platform.com/docs/core/security…
…2021, I am using Symfony's native testing tools (also, if you use API Platform, they have some nice add-ons onto the testing tools). Behat is really interesting, but I think, for most people, it's probably a bit overkill for API's. So…
weaverryan
weaverryan
Read Full Comment
Hey Ryan, Oh yeah, now I see my mistake, I'm still using the `AutoGroupResourceMetadataFactory::getDefaultGroups` from https://symfonycasts.com/screencast/api-platform-security/resource-metadata-factory While it has been deleted for the 3rd tutorial :) Just disabled - everything works!
…work Symfony 5.2 - the `^5.1` in API Platform's composer.json allows 5.2. I would be curious if the bug lies in using Symfony 5.2 or API Platform 2.6 (my "instinct" is that it is in API Platform 2.6…
weaverryan
weaverryan
Read Full Comment
…the problem. And, I don't think there is any "magic" fix... and I'm debating a few approaches in my mind. I would try this approach: https://symfonycasts.com/screencast/api-platform-extending/data-provider Basically, create a new, non-persisted, `filteredCards` property on…
weaverryan
weaverryan
Read Full Comment
…step 3, which means at step 4 (in our transform() method) it's the perfect place to validate. As I mentioned, the flow is complex because API Platform does a few things in the background, and we do a few things throughout that process. Hopefully…
weaverryan
weaverryan
Read Full Comment
Hi sridharpandu! It sounds like you've done some excellent research! I am not personally responsible for API Platform and its docs, but I know the team that is, and I'm sure they would love any updates or improvements that you could make to…
weaverryan
weaverryan
Read Full Comment
Hello weaverryan ! I described the problem with more details in Stackoverflow question https://stackoverflow.com/questions/65236214/api-platform-com-unsuported-media-type.
… Hmm. You *will* need to add some config for API Platform - but it's pretty basic - https://github.com/symfony/recipes/blob/master/api-platform/core/2.5/config/packages/api_platform.yaml - and it doesn't include any "formats" config... you should get several…
weaverryan
weaverryan
Read Full Comment
…Joel L. First, you will have to create a custom filter and hook it into the ApiPlatform system https://api-platform.com/docs/core/filters/#creating-custom-filters Then, you'll have to code the right query to perform the filtering you require. I believe…
MolloKhan
MolloKhan
Read Full Comment
…goes away". I still can't think of why this would happen, but this seems like the likely cause. There *is* a security difference between API Platform 2.4 and 2.5... but it's just a new feature. What I mean is, in 2…
weaverryan
weaverryan
Read Full Comment
…To explain: With this setup : Docker + Traefik + Api Platform with Twig Everything is on the same nginx container at this url api.mysite.localhost login endpoint : api.mysite.localhost/login (symfony controller) I followed your tutorial and first i implemented json_login and then switch…
laferte_tech
laferte_tech
Read Full Comment
…exceptions, and I can tell you that the access denied IS coming from API Platform. So, specifically, API Platform is looking at the "security" option of the current "operation" inside of the @ApiResource annotation (this can be specified at the root level of the resource…
weaverryan
weaverryan
Read Full Comment
…to me), but there is absolutely nothing wrong with it. Could you describe your use-case a bit so I can recommend an approach? The example in API Platform - which uses a custom controller - is a bit ugly, but it works well. And it can…
weaverryan
weaverryan
Read Full Comment
Hey Victor, Great tutorial - BTW :) I'm using version 2.5.7. When you follow methods path you'll end up here: https://github.com/api-platform/core/blob/37b5edf50cc05299b12cb8982be3efa035d726ce/src/DataProvider/Pagination.php#L249 - so page number is actually taken from the context.
Rafał Greg
Rafał Greg
Read Full Comment
…this tutorial? Because I have been reading the API Platform documentation and I have seen that it is quite different, I have also been watching this tutorial and I have not found a way to use it correctly in the context of API Platform, also…
…of these classes. I believe you *are* using API Platform 2.5, which is why you're having the issue. So, you can make your life simpler by not copying any of those files and extending the ApiTestCase directly from ApiPlatform :). But, to your specific…
weaverryan
weaverryan
Read Full Comment