phinx icon indicating copy to clipboard operation
phinx copied to clipboard

Call to undefined method Phinx\Util\Util::globAll()

Open suunnn opened this issue 8 years ago • 4 comments

Running php vendor/bin/phinx create MyNewMigration then: Phinx by CakePHP - https://phinx.org. 0.10.5

using config file ./phinx.yml using config parser yaml using migration paths PHP Fatal error: Call to undefined method Phinx\Util\Util::globAll() in /data/www/ex_h5_chat/vendor/robmorgan/phinx/src/Phinx/Console/Command/AbstractCommand.php on line 103 PHP Stack trace: PHP 1. {main}() /data/www/ex_h5_chat/vendor/robmorgan/phinx/bin/phinx:0 PHP 2. Symfony\Component\Console\Application->run() /data/www/ex_h5_chat/vendor/robmorgan/phinx/bin/phinx:28 PHP 3. Phinx\Console\PhinxApplication->doRun() /data/www/ex_h5_chat/vendor/symfony/console/Application.php:148 PHP 4. Symfony\Component\Console\Application->doRun() /data/www/ex_h5_chat/vendor/robmorgan/phinx/src/Phinx/Console/PhinxApplication.php:88 PHP 5. Symfony\Component\Console\Application->doRunCommand() /data/www/ex_h5_chat/vendor/symfony/console/Application.php:248 PHP 6. Symfony\Component\Console\Command\Command->run() /data/www/ex_h5_chat/vendor/symfony/console/Application.php:946 PHP 7. Phinx\Console\Command\Create->execute() /data/www/ex_h5_chat/vendor/symfony/console/Command/Command.php:251 PHP 8. Phinx\Console\Command\AbstractCommand->bootstrap() /data/www/ex_h5_chat/vendor/robmorgan/phinx/src/Phinx/Console/Command/Create.php:153

phinx version: 0.10.5 operate system: centos 6.5 php version: PHP 5.6.35 php framework: thinkphp 5.0.14

Thanks!

suunnn avatar Aug 01 '18 08:08 suunnn

You don't use php vendor/bin/phinx .... Use vendor/bin/phinx .... The documentation has recently been updated, but may not have been released yet.

rquadling avatar Aug 01 '18 17:08 rquadling

I used vendor/bin/phinx create MyNewMigration have same problem.Originally used vendor/bin/phinx create ... have problem, so used php vendor/bin/phinx create .... But used vendor/bin/phinx and vendor/bin/phinx init normal, other operations will have problems. image image

suunnn avatar Aug 02 '18 04:08 suunnn

Already solved! Because there is a topthink/think-migration in the project.It is a phinx-based project.It has a Phinx\Util class, but no static method for globAll,so... It is normal after remove the topthink/think-migration Thanks!

suunnn avatar Aug 02 '18 08:08 suunnn

Think-migration is embedding a version of the Phinx source into its own project. Absolutely unsupportable.

Glad you sorted it out.

rquadling avatar Aug 02 '18 09:08 rquadling