composer- return from cache

Hi, i would like upgrade one module, but composer all time return him from cache? What i have to do, if I wanna download afresh whole module?

You need to run composer clear-cache.

To prevent composer from caching, you need to install a dev version of that package because composer puts dist packages in the cache.

I tried, by now gets error if I manually set version 9.5

in other case he donload 9.3 version.

my composer file


    "name": "yiisoft/yii2-app-advanced",

    "description": "Yii 2 Advanced Project Template",

    "keywords": ["yii2", "framework", "advanced", "project template"],

    "homepage": "",

    "type": "project",

    "license": "BSD-3-Clause",

    "support": {

        "issues": "",

        "forum": "",

        "wiki": "",

        "irc": "irc://",

        "source": ""


    "minimum-stability": "stable",

    "require": {

        "php": ">=5.4.0",

        "yiisoft/yii2": ">=2.0.6",

        "yiisoft/yii2-bootstrap": "*",

        "yiisoft/yii2-swiftmailer": "*",

        "c006/yii2-migration-utility": "dev-master",

        "kartik-v/yii2-tree-manager": "@dev",

        "dmstr/yii2-adminlte-asset": "2.*",

        "kartik-v/yii2-widget-switchinput": "*",

        "kartik-v/yii2-grid": "@dev",

        "dektrium/yii2-rbac": "dev-master"




    "require-dev": {

        "yiisoft/yii2-codeception": "*",

        "yiisoft/yii2-debug": "*",

        "yiisoft/yii2-gii": "*",

        "yiisoft/yii2-faker": "*",

        "jamband/yii2-schemadump": "*",



    "config": {

        "process-timeout": 1800


    "extra": {

        "asset-installer-paths": {

            "npm-asset-library": "vendor/npm",

            "bower-asset-library": "vendor/bower"




You misunderstood what I said Pabloss :)

Remove yii2-user from your application’s dev dependencies and require it with the --prefer-source flag

composer require dektrium/yii2-user--prefer-source

Or, alternatively, set the version to ‘dev-master’ like yii2-rbac.

Thanks, it working!

but i have one more question. What I can do, if I want that only admin could login and enter backend site, in other case system will throw exception 404 e.g

I haven’t seen such option in user2- dektrium

The advanced application already has that turned on - it is impossible to even view the backend without logging in.

I know, but i would like, that only ‘Admin’ can view backend site, but not user witchout permission.

Now user can login and change frontend to backend and he see backend site :)

And one more problem. Why gets this error, if I want enter module/user/admin/index?

Setting unknown property: yii\jui\DatePicker::dateFormat

in Composer:

"minimum-stability": "dev",

"require": {

"yiisoft/yii2-jui": "^2.0"

You simply need to read the docs for yii2-user.

In particular, this:

And, on configuration doc page in yii2-user docs:

… ‘modules’ => [ … ‘user’ => [ ‘class’ => ‘dektrium\user\Module’, ‘enableUnconfirmedLogin’ => true, ‘confirmWithin’ => 21600, ‘cost’ => 12, ‘admins’ => [‘admin’] ], … ], …

sorry about the formatting - I hate the forum editor

I readed it


 'modules' => [

        'user' => [

            'class' => 'dektrium\user\Module',

            'modelMap' => [

                'User' => 'common\models\User',




            'enableUnconfirmedLogin' => false,


            'confirmWithin' => 21600,

            'cost' => 12,

            'admins' => ['admin']...

Backend module

  'user' => [

            // following line will restrict access to profile, recovery, registration and settings controllers from backend

            'as backend' => 'dektrium\user\filters\BackendFilter',


frontend module

and user e.g test can login to backend site… and should only admin.