drbmhd9583 2016-10-18 14:32
浏览 360
已采纳

Laravel 5.3项目供应商:发布给出了FileNotFoundException

In a new laravel installation i have included several custom build packages. these packages are writing their migration files when i execute

php artisan vendor:publish

however this now gives the following error

 [League\Flysystem\FileNotFoundException]  File not found at path: 016_01_29_094442_create_xxxxx_2_f_a_tokens_table.php

which is not strange since the actual filename is: 2016_01_29_094442_xxxxx_2_f_a_tokens_table.php

This is what my ServiceProvider looks like:

class TwoFAServiceProvider extends ServiceProvider {

    ---- SNIP -----

    public function boot() {
        ---- SNIP -----
        $this->publishMigrations();
    }

    public function publishMigrations() {
        $this->publishes([
            __DIR__ . '/../../migrations/' => base_path('/database/migrations'),
        ], 'migrations');
    }
}

Does anyone know why this is occuring while yesterday this worked perfectly?

--EDIT --

The problem was an update to League\Flysystem in a patch version where they made path checking more restrictive which was reverted in an update so noone should have this issue.

https://github.com/thephpleague/flysystem/issues/712

  • 写回答

1条回答 默认 最新

  • dphj737575 2016-10-18 14:39
    关注

    Had the same problem. You should probably use backslashes in your paths, depending on your file system. See if this works:

    public function publishMigrations() {
        $this->publishes([
            __DIR__ . '\..\..\migrations\\' => base_path('database\migrations'),
        ], 'migrations');
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!