A
A
alex5e2018-11-04 15:40:15
symfony
alex5e, 2018-11-04 15:40:15

How to properly add a third party bundle in Symfony 4.1?

Added a bundle to Symfony 4.1 using composer

composer require "gesdinet/jwt-refresh-token-bundle"

Symfony Flex added a line to the bundle
Gesdinet\JWTRefreshTokenBundle\GesdinetJWTRefreshTokenBundle::class => ['all' => true],

Added config file:
# /config/packages/gesdinet_jwt_refresh_token.yaml
gesdinet_jwt_refresh_token:
    ttl: 2592000
    ttl_update: true
    user_identity_field: email
    # refresh_token_class: App\Entity\JwtRefreshToken

But I get an error:
There is no extension able to load the configuration for "gesdinet_jwt_refresh_token" (in /srv/www/project/config/packages/gesdinet_jwt_refresh_token.yaml).
Tell me where I could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
voronkovich, 2018-11-04
@alex5e

I repeated your steps on a clean install. Everything works fine.
1. Try clearing the cache: rm -rf var/cache.
2. Symfony has several commands for debugging such errors:

$ bin/console debug:config

$ bin/console debug:config gesdinet_jwt_refresh_token

See what they bring out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question