IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> PHP知识库 -> composer更新yii报错 yiisoft/yii2 2.0.29 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 - -> 正文阅读

[PHP知识库]composer更新yii报错 yiisoft/yii2 2.0.29 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -

报错信息

composer 升级yii2到最新版本,报错信息

yiisoft/yii2 2.0.29 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.

解决办法

"repositories": {
    "bower-asset/jquery.inputmask": {
        "type": "bower-github",
        "url": "https://github.com/petrabarus/jquery.inputmask"
    }
}
composer self-update 1.9.0
composer global require "fxp/composer-asset-plugin:1.4.3"
composer clear-cache
composer update -vvv

国内镜像

# 全局阿里云镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

# 取消全局配置
composer config -g --unset repos.packagist

新版更新

Reading /htdocs/website/basic/vendor/composer/installed.json
Writing lock file
Generating autoload files

  Seems you have upgraded Yii Framework from version 2.0.29 to 2.0.42.1.

  Please check the upgrade notes for possible incompatible changes
  and adjust your application code accordingly.

  Upgrade from Yii 2.0.41
  -----------------------
  
  * `NumberValidator` (`number`, `double`, `integer`) does not allow values with leading or terminating (non-trimmed) 
    white spaces anymore. If your application expects non-trimmed values provided to this validator make sure to trim 
    them first (i.e. by using `trim` / `filter` "validators").
  
  Upgrade from Yii 2.0.40
  -----------------------
  
  * The methods `getAuthKey()` and `validateAuthKey()` of `yii\web\IdentityInterface` are now also used to validate active
    sessions (previously these methods were only used for cookie-based login). If your identity class does not properly
    implement these methods yet, you should update it accordingly (an example can be found in the guide under
    `Security` -> `Authentication`). Alternatively, you can simply return `null` in the `getAuthKey()` method to keep
    the old behavior (that is, no validation of active sessions). Applications that change the underlying `authKey` of
    an authenticated identity, should now call `yii\web\User::switchIdentity()`, `yii\web\User::login()`
    or `yii\web\User::logout()` to recreate the active session with the new `authKey`.
  
  Upgrade from Yii 2.0.39.3
  -------------------------
  
  * Priority of processing `yii\base\Arrayable`, and `JsonSerializable` data has been reversed (`Arrayable` data is checked
    first now) in `yii\base\Model`, and `yii\rest\Serializer`. If your application relies on the previous priority you need 
    to fix it manually based on the complexity of desired (de)serialization result.
  
  Upgrade from Yii 2.0.38
  -----------------------
  
  * The storage structure of the file cache has been changed when you use `\yii\caching\FileCache::$keyPrefix`.
  It is worth warming up the cache again if there is a logical dependency when working with the file cache.
  
  * `yii\web\Session` now respects the 'session.use_strict_mode' ini directive.
    In case you use a custom `Session` class and have overwritten the `Session::openSession()` and/or 
    `Session::writeSession()` functions changes might be required:
    * When in strict mode the `openSession()` function should check if the requested session id exists
      (and mark it for forced regeneration if not).
      For example, the `DbSession` does this at the beginning of the function as follows:
      ```php
      if ($this->getUseStrictMode()) {
          $id = $this->getId();
          if (!$this->getReadQuery($id)->exists()) {
              //This session id does not exist, mark it for forced regeneration
              $this->_forceRegenerateId = $id;
          }
      }
      // ... normal function continues ...
      ```
    * When in strict mode the `writeSession()` function should ignore writing the session under the old id.
      For example, the `DbSession` does this at the beginning of the function as follows:
      ```php
      if ($this->getUseStrictMode() && $id === $this->_forceRegenerateId) {
          //Ignore write when forceRegenerate is active for this id
          return true;
      }
      // ... normal function continues ...
      ```
    > Note: The sample code above is specific for the `yii\web\DbSession` class.
      Make sure you use the correct implementation based on your parent class,
      e.g. `yii\web\CacheSession`, `yii\redis\Session`, `yii\mongodb\Session`, etc.
    
    > Note: In case your custom functions call their `parent` functions, there are probably no changes needed to your 
      code if those parents implement the `useStrictMode` checks.
  
    > Warning: in case `openSession()` and/or `writeSession()` functions do not implement the `useStrictMode` code
      the session could be stored under a malicious id without warning even if `useStrictMode` is enabled.
  
  Upgrade from Yii 2.0.37
  -----------------------
  
  * Resolving DI references inside of arrays in dependencies was made optional and turned off by default. In order
    to turn it on, set `resolveArrays` of container instance to `true`.
  
  Upgrade from Yii 2.0.36
  -----------------------
  
  * `yii\db\Exception::getCode()` now returns full PDO code that is SQLSTATE string. If you have relied on comparing code
    with an integer value, adjust your code.
  
  Upgrade from Yii 2.0.35
  -----------------------
  
  * Inline validator signature has been updated with 4th parameter `current`:
  
    ```php
    /**
     * @param mixed $current the currently validated value of attribute
     */
    function ($attribute, $params, $validator, $current)
    ```
  
  * Behavior of inline validator used as a rule of `EachValidator` has been changed - `$attribute` now refers to original
    model's attribute and not its temporary counterpart:
    
    ```php
    public $array_attribute = ['first', 'second'];
  
    public function rules()
    {
        return [
            ['array_attribute', 'each', 'rule' => ['customValidatingMethod']],
        ];
    }
    
    public function customValidatingMethod($attribute, $params, $validator, $current)
    {
        // $attribute === 'array_attribute' (as before)
    
        // now: $this->$attribute === ['first', 'second'] (on every iteration)
        // previously:
        // $this->$attribute === 'first' (on first iteration)
        // $this->$attribute === 'second' (on second iteration)
    
        // use now $current instead
        // $current === 'first' (on first iteration)
        // $current === 'second' (on second iteration)
    }
    ```
    
  * `$this` in an inline validator defined as closure now refers to model instance. If you need to access the object registering
    the validator, pass its instance through use statement:
    
    ```php
    $registrar = $this;
    $validator = function($attribute, $params, $validator, $current) use ($registrar) {
        // ...
    }
    ```
    
  * Validator closure callbacks should not be declared as static.
  
  * If you have any controllers that override the `init()` method, make sure they are calling `parent::init()` at
    the beginning, as demonstrated in the [component guide](https://www.yiiframework.com/doc/guide/2.0/en/concept-components).
  
  Upgrade from Yii 2.0.34
  -----------------------
  
  * `ExistValidator` used as a rule of `EachValidator` now requires providing `targetClass` explicitely and it's not possible to use it with `targetRelation` in
    that configuration.
    
    ```php
    public function rules()
    {
        return [
            ['attribute', 'each', 'rule' => ['exist', 'targetClass' => static::className(), 'targetAttribute' => 'id']],
        ];
    }
    ```
  
  Upgrade from Yii 2.0.32
  -----------------------
  
  * `yii\helpers\ArrayHelper::filter` now correctly filters data when passing a filter with more than 2 "levels",
    e.g. `ArrayHelper::filter($myArray, ['A.B.C']`. Until Yii 2.0.32 all data after the 2nd level was returned,
    please see the following example:
    
    ```php
    $myArray = [
        'A' => 1,
        'B' => [
            'C' => 1,
            'D' => [
                'E' => 1,
                'F' => 2,
            ]
        ],
    ];
    ArrayHelper::filter($myArray, ['B.D.E']);
    ```
    
    Before Yii 2.0.33 this would return
    
    ```php
    [
        'B' => [
            'D' => [
                'E' => 1,
                'F' => 2, //Please note the unexpected inclusion of other elements
            ],
        ],
    ]
    ```
  
    Since Yii 2.0.33 this returns
  
    ```php
    [
        'B' => [
            'D' => [
                'E' => 1,
            ],
        ],
    ]
    ```
    
    Note: If you are only using up to 2 "levels" (e.g. `ArrayHelper::filter($myArray, ['A.B']`), this change has no impact.
    
  * `UploadedFile` class `deleteTempFile()` and `isUploadedFile()` methods introduced in 2.0.32 were removed.
  
  * Exception will be thrown if `UrlManager::$cache` configuration is incorrect (previously misconfiguration was silently 
    ignored and `UrlManager` continue to work without cache). Make sure that `UrlManager::$cache` is correctly configured 
    or set it to `null` to explicitly disable cache.
  
  Upgrade from Yii 2.0.31
  -----------------------
  
  * `yii\filters\ContentNegotiator` now generates 406 'Not Acceptable' instead of 415 'Unsupported Media Type' on
    content-type negotiation fail.
  
  Upgrade from Yii 2.0.30
  -----------------------
  * `yii\helpers\BaseInflector::slug()` now ensures there is no repeating $replacement string occurrences.
    In case you rely on Yii 2.0.16 - 2.0.30 behavior, consider replacing `Inflector` with your own implementation.

  You can find the upgrade notes for all versions online at:
  https://github.com/yiisoft/yii2/blob/2.0.42.1/framework/UPGRADE.md

  PHP知识库 最新文章
Laravel 下实现 Google 2fa 验证
UUCTF WP
DASCTF10月 web
XAMPP任意命令执行提升权限漏洞(CVE-2020-
[GYCTF2020]Easyphp
iwebsec靶场 代码执行关卡通关笔记
多个线程同步执行,多个线程依次执行,多个
php 没事记录下常用方法 (TP5.1)
php之jwt
2021-09-18
上一篇文章      下一篇文章      查看所有文章
加:2021-07-14 10:41:11  更:2021-07-14 10:42:16 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年4日历 -2024/4/27 23:47:13-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码