简体   繁体   中英

Phinx seeds won't run after upgrade to php7.0

I have a bunch of Phinx seeds which used to run fine

php vendor/bin/phinx seed:run

My seeds are located in var/www/html/db/seeds folder

I recently upgraded my VM to php 7.0 (Also upgraded to 16.04 LTS box), now I get the following output & error when I try to run phinx seeds:

ubuntu@ubuntu-xenial:/var/www/html$ sudo vendor/bin/phinx seed:run
Phinx by Rob Morgan - https://phinx.org. version 0.5.4

using config file ./phinx.yml
using config parser yaml
using migration path /var/www/html/db/migrations
using seed path /var/www/html/db/seeds
warning no environment specified, defaulting to: development
using adapter mysql
using database closecall

[InvalidArgumentException]        
The seed class "" does not exist 

To reiterate, seeds were running fine, upgraded to php 7.0 and now they're not.

Migrations still run completely fine, however.

I've removed all seeds bar one:

<?php

use Phinx\Seed\AbstractSeed;

class CategorySeeder extends AbstractSeed
{
    public function run()
    {
        $data = array(
            array(
                'name' => 'Confined Spaces'
            )
        );
    }
}

To debug with, still gives the same error.

尝试:

php vendor/bin/phinx seed:run -s CategorySeeder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM