question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make sure there is a loader supporting the "api_platform" type

See original GitHub issue

Hi.

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:closed
  • Created 5 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
teohhanhuicommented, Jul 20, 2018

What is driver? 🤣

2reactions
kevinimbrechtscommented, Jul 23, 2018

Ok, I have restarted the Docker service and now, it works…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found