add api-platform for a more complete API
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 488
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 32
Description
I submitted a PR to fix #1488 , but it feels clunky. We can get pagination, filtering and sorting with a consistent and well-loved API by configuring API platform.
Since /api is already used, we could use /api2 or /apip for the route. Then with very little work we can search by multiple vendors or types, paginate, etc.

I'm happy to make a PR with this, maybe mark it as experimental during development?
I just submitted a PR to fix an api platform issue (https://github.com/symfony/symfony/issues/58928#issuecomment-2487887190) but with that fix, I still can't get it to work because of a nelmio_security.yaml setting, without commenting this out.
```yaml
# script-src:
# - 'unsafe-eval' # TODO get rid of this, but it requires getting rid of hogan (part of instantsearch, maybe upgrade to v4 will fix this)
# - 'https://www.gstatic.com/recaptcha/' # TODO could be replaced by simply 'https:' for simplicity's sake once strict-dynamic support is more broadly available 75% in early 2022 per https://caniuse.com/?search=csp%20strict-dynamic
# - 'strict-dynamic'
```
I also had to tweak the stateless setting. Both of these are small.
Is the packagist data available as a dump for testing?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing /api route and the nelmio_security.yaml settings that currently block API Platform, then compare the proposed /api2 or /apip routes. Done should provide consistent vendor/type filtering, sorting, and pagination while retaining the required security configuration; test it with Packagist data or determine whether a suitable dump is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony, yaml
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100