gentle-force-bundle icon indicating copy to clipboard operation
gentle-force-bundle copied to clipboard

Installing gives The child node "redis" at path "maba_gentle_force" must be configured.

Open mehdibo opened this issue 4 years ago • 7 comments

When I run

composer require maba/gentle-force-bundle

I get:

Executing script cache:clear
Executed script cache:clear  [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 216:
!!                                                                            
!!    The child node "redis" at path "maba_gentle_force" must be configured.  
!!                                                                            
!!  
!!  
Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json to its original content.

mehdibo avatar Apr 08 '20 21:04 mehdibo

I have the same problem... It's been 12 days !! It's really a shame that there was no response or even that you posted your own solution ... I give you mine when I find ....

pingou2712 avatar Apr 21 '20 08:04 pingou2712

@pingou2712 Just create the file config/packages/maba_gentle_force.yaml manually and paste this in it:

maba_gentle_force:
  redis:
    host: '%env(REDIS_HOST)%'
  limits:
    global:
      - max_usages: 100
        period: 5m
  listeners:
    - path: ^/
      limits_key: global
      identifiers: [ip]
    - path: ^/
      limits_key: global
      identifiers: [username]

mehdibo avatar Apr 21 '20 08:04 mehdibo

=)))) thank you!!! I test that =)

pingou2712 avatar Apr 21 '20 08:04 pingou2712

Thank you a lot. For just fix the composer install: create before the file config/packages/maba_gentle_force.yaml And paste:

maba_gentle_force:
  redis:
    host: '%env(REDIS_HOST)%'

The rest is for your own configuration =)

pingou2712 avatar Apr 21 '20 09:04 pingou2712

I get Environment variable not found: "REDIS_HOST". after that. I believe the fix for this bundle would be to not make redis mandatory on the configuration file as not everyone uses redis.

murilozilli avatar Apr 27 '21 03:04 murilozilli

@murilozilli just add

REDIS_HOST=YOUR_REDIS_HOST

to your .env file

mehdibo avatar Apr 27 '21 13:04 mehdibo

@mehdibo thanks but i know the solution what I meant is that redis is a requirement for this project and I didnt know that beforehand, its not very explicit in the documentation, I thought I could use alternatives like database or sessions. Sorry for not being clearer haha

murilozilli avatar Apr 27 '21 22:04 murilozilli