手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2016年03月30日的文章

Composer的Illegal offset type in isset or empty

标题的内容也是手贱导致的,本来composer不self-update也不会出现这个问题,这不,一升到最新的composer就出问题了

1、由于我们为了追求速度,大部分都是用的国内的源,这些源往往都不是https的,这回好了,出错了。
XML/HTML代码
  1. Your configuration does not allow connection to http://packagist.phpcomposer.com. See https://getcomposer.org/doc/06-config.md#secure-http for details.  
  2. http://packagist.phpcomposer.com could not be fully loaded, package information was loaded from the local cache and may be out of date  
OK,打开https://getcomposer.org/doc/06-config.md#secure-http查看了一下,在composer.json和~/.composer/config.json中的config节点下,增加:"secure-http":false
 
2、composer update的时候报:
XML/HTML代码
  1. Installation failed, reverting ./composer.json to its original content.  
OK,现在可以用composer diag来检查 一下了,结果 发现:
XML/HTML代码
  1.  composer diag  
  2. Checking composer.json: FAIL  
  3. No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.  
  4. require.yiisoft/yii2 : unbound version constraints (*) should be avoided  
  5. Checking platform settings: OK  
  6. Checking git settings: OK  
  7. Checking http connectivity to packagist: OK  
  8. Checking https connectivity to packagist: OK  
  9. Checking github.com oauth access: OK  
  10. Checking disk free space: OK  
  11. Checking pubkeys:  
  12. Tags Public Key Fingerprint: ???? 已隐藏  
  13. Dev Public Key Fingerprint: ????? 已隐藏  
  14. OK  
  15. Checking composer version: FAIL  
  16. You are not running the latest stable version, run `composer self-update` to update (e8b1a5f35772e39ca21ab855a278bd84a0a534b2 => 1.0.0-beta2)  
居然显示 ,composer中一定要有license节点,require的也需要带 版本号了。于是一一加上,然后接着composer update
 
3、出现如标题一般的错误 
处理方法:一般出现这种错误 ,大部分情况下是fxp插件需要更新了,执行composer global require fxp/composer-asset-plugin --prefer-dist,
 
XML/HTML代码
  1. Changed current directory to /Users/gouki/.composer  
  2. Using version ^1.1 for fxp/composer-asset-plugin  
  3. ./composer.json has been updated  
  4. Loading composer repositories with package information  
  5. Updating dependencies (including require-dev)  
  6.   - Removing fxp/composer-asset-plugin (v1.1.1)  
  7.   - Installing fxp/composer-asset-plugin (v1.1.2)  
  8.     Downloading: 100%  
  9.   
  10. Writing lock file  
  11. Generating autoload files  
更新完后,再composer udpate就OK了!
当然如果还有问题,你应该查看官网的issue,比如:https://github.com/francoispluchino/composer-asset-plugin/issues/191,刚开始的时候确实是BUG,后面更新了就好了。哈哈
 

mini displayport to displayport

 以前为了偷懒和共用,所以我一直是有一根mini displayport to VGA的转换头(话说我曾经买了两个,然后严神送了我一个)。接在显示 器上的时候,总感觉糊糊的,色彩也有问题,但其他人都在说显示器不错啊,色彩还行啊。总感觉他们在忽悠 我

直到我用了minidP to DP。效果真心两样的。(可惜这玩意没法截图)

因此,如果你的显示器支持DVI,就用DVI,一个个的来吧,比如,能支持HDMI的尽量用HDMI,不能支持的看dP,DP没有的就DVI了。如果只有VGA接口的,那你也别报怨了。

显示器买了两年了,却因为一根39的线,焕发了比180的转接口更好的效果,人还是要换个角度想想问题的