Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-master 不能用于laravel5.1 #952

Closed
stevieyu opened this issue Oct 12, 2017 · 6 comments
Closed

dev-master 不能用于laravel5.1 #952

stevieyu opened this issue Oct 12, 2017 · 6 comments

Comments

@stevieyu
Copy link

stevieyu commented Oct 12, 2017

我用的环境

PHP 版本:7.1
overtrue/wechat 版本:dev-master
是否使用了框架?框架名称:laravel 5.1

问题及现象

SteviedeMacBook-Pro:laravel5.1 stevie$ composer require "overtrue/wechat:dev-master"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for overtrue/wechat dev-master -> satisfiable by overtrue/wechat[dev-master].
    - Conclusion: remove symfony/var-dumper v2.7.35
    - Conclusion: don't install symfony/var-dumper v2.7.35
    - overtrue/wechat dev-master requires symfony/cache ^3.3 -> satisfiable by symfony/cache[v3.3.0, v3.3.1, v3.3.10, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9].
    - symfony/cache v3.3.0 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.1 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.10 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.2 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.3 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.4 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.5 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.6 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.7 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.8 conflicts with symfony/var-dumper[v2.7.35].
    - symfony/cache v3.3.9 conflicts with symfony/var-dumper[v2.7.35].
    - Installation request for symfony/var-dumper (locked at v2.7.35) -> satisfiable by symfony/var-dumper[v2.7.35].
@overtrue
Copy link
Collaborator

更新一下 symfony/var-dumper 版本

@stevieyu
Copy link
Author

require symfony/var-dumper 报错
update symfony/var-dumper 版本无变化

SteviedeMacBook-Pro:laravel5.1 stevie$ composer require symfony/var-dumper
Using version ^3.3 for symfony/var-dumper
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework v5.1.46 requires symfony/var-dumper 2.7.* -> satisfiable by symfony/var-dumper[2.7.x-dev, v2.7.0, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.3, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9] but these conflict with your requirements or minimum-stability.
    - laravel/framework v5.1.46 requires symfony/var-dumper 2.7.* -> satisfiable by symfony/var-dumper[2.7.x-dev, v2.7.0, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.3, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9] but these conflict with your requirements or minimum-stability.
    - laravel/framework v5.1.46 requires symfony/var-dumper 2.7.* -> satisfiable by symfony/var-dumper[2.7.x-dev, v2.7.0, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.3, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9] but these conflict with your requirements or minimum-stability.
    - Installation request for laravel/framework (locked at v5.1.46, required as 5.1.*) -> satisfiable by laravel/framework[v5.1.46].


Installation failed, reverting ./composer.json to its original content.
SteviedeMacBook-Pro:laravel5.1 stevie$ composer update symfony/var-dumper
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
Compiling common classes

@overtrue
Copy link
Collaborator

我来搞定

@overtrue
Copy link
Collaborator

@stevieyu 刚测了是可以装了,但是不晓得会不会有问题,如遇到问题请随时反馈,谢谢1

@stevieyu stevieyu reopened this Nov 7, 2017
@stevieyu
Copy link
Author

stevieyu commented Nov 7, 2017

@overtrue 代码版本最新,创建临时二维码报错
symfony/cache 3.2以下 没有 Symfony\Component\Cache\Simple\FilesystemCache 这个文件
image

上面报错后,找到这里https://github.com/overtrue/laravel-wechat/blob/master/src/ServiceProvider.php#L86自定义缓存的方法,用了类似的方法自定义了一下,

        $app = Factory::officialAccount($this->config);
        $app['cache'] = app('cache.store');
        $app['request'] = app('request');

结果下面位置的判断没过

     if (property_exists($this, 'app') && $this->app instanceof ServiceContainer
            && isset($this->app['cache']) && $this->app['cache'] instanceof CacheInterface) {
            return $this->cache = $this->app['cache'];
        }

@stevieyu stevieyu closed this as completed Dec 4, 2017
@overtrue
Copy link
Collaborator

overtrue commented Dec 4, 2017

@stevieyu 新版已经可以了,抱歉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants