Make sure there is a loader supporting the "api_platform" type
See original GitHub issueHi.
I have installed API Platform in my Symfony 4 project and I have this exception when I go to /api :
An exception occurred in driver: could not find driver in . (which is being imported from "/var/www/html/sf4proj/config/routes/api_platform.yaml"). Make sure there is a loader supporting the "api_platform" type.
Here is a part of my composer.json :
...
"require": {
"php": "^7.1.3",
"ext-iconv": "*",
"api-platform/api-pack": "^1.1",
"doctrine/orm": "^2.6",
"jms/serializer-bundle": "^2.3",
"sensio/framework-extra-bundle": "^5.1",
"symfony/console": "^4.0",
"symfony/flex": "^1.0",
"symfony/framework-bundle": "^4.0",
"symfony/lts": "^4@dev",
"symfony/maker-bundle": "^1.4",
"symfony/monolog-bundle": "^3.2",
"symfony/orm-pack": "^1.0",
"symfony/translation": "^4.0",
"symfony/yaml": "^4.0"
},
...
And my /config/routes/api_platform.yaml file :
api_platform:
resource: .
type: api_platform
prefix: /api
I use 3 containers : PHP-FPM 7.2.5, NginX 1.14 and Postgres 10.4.
I did not find anything on this error…
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Make sure there is a loader supporting the "api_platform" type.
Today I started to switch from Annotation-based ORM definitions to the YML ones. Current situation: ./api/config/package/doctrine.yaml: ...
Read more >Api platform, What to enter in the route_name parameter?
config / routes / api_platform.yaml). Make sure there is a loader supporting the api_platform type. here's the code: @ApiResource(itemOperations ...
Read more >Configuration - API Platform
Here's the complete configuration of the Symfony bundle including default values: # api/config/packages/api_platform. yaml api_platform: # The title of the API.
Read more >Symfony - Webpage drops error after installing API-Platfrom
Make sure there is a loader supporting the "api_platform" type. In ApiLoader.php line 177: There is no builtin action for the collection GET ......
Read more >How to Create a custom Route Loader (Symfony Docs)
Just be sure that it's unique per file so no other lines override it. ... The sample loader below supports loading routing resources...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

What is
driver? 🤣Ok, I have restarted the Docker service and now, it works…