anyx / LoginGateBundle

59 stars 23 forks source link

Script cache:clear returned with error code 1 #16

Closed eclimov closed 4 years ago

eclimov commented 6 years ago

The following output is produced by composer require anyx/login-gate-bundle instruction:

Do not run Composer as root/super user! See https://getcomposer.org/root for details Using version ^0.7.0 for anyx/login-gate-bundle ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 1 install, 0 updates, 0 removals As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension. This may cause invalid reports of corrupted archives. Installing 'unzip' may remediate them. Installing anyx/login-gate-bundle (0.7): Loading from cache Writing lock file Generating autoload files ocramius/package-versions: Generating version class... ocramius/package-versions: ...done generating version class Symfony operations: 1 recipe (039a33fe1403737cc882d10cacf30ccc) Configuring anyx/login-gate-bundle (>=0.7): From auto-generated recipe Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In LoginGateExtension.php line 40: !! !! Notice: Undefined index: options !! !! !! Script @auto-scripts was called via post-update-cmd

Then this error appears on any composer install/update command until the bundle is removed via composer remove anyx/login-gate-bundle command.

Symfony 4.1.4 PHP 7.2.9

Is there a way I can solve this problem?

anyx commented 6 years ago

@ksardedik yes, check bundle configuration. Looks like options parameter is missing. You can see examples in readme or tests

login_gate:
    storages: ['orm'] # Attempts storages. Available storages: ['orm', 'session', 'mongodb']
    options:
        max_count_attempts: 3
        timeout: 600 #Ban period
        watch_period: 3600 #Only for databases storage. Period of actuality attempts

Later I'll try to do bundle di configuration more strict

eclimov commented 6 years ago

@anyx I had to set up the configuration before installing the bundle itself. Now works well. Thanks a lot!

anyx commented 4 years ago

I added recipe for this bundle https://github.com/symfony/recipes-contrib/pull/872. Now this error will not happen