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

PHP Fatal error: create controller, module, model, scaffold #1459

Closed
Bounderx opened this issue May 3, 2020 · 2 comments
Closed

PHP Fatal error: create controller, module, model, scaffold #1459

Bounderx opened this issue May 3, 2020 · 2 comments

Comments

@Bounderx
Copy link

Bounderx commented May 3, 2020

Expected and Actual Behavior

An attempt is made to create a controller, model or module using the phalcon-devtools command line.

tom@project-x:/var/www/html/projectx$ phalcon model ZipCodes

Phalcon DevTools (4.0.3)

PHP Fatal error:  Uncaught TypeError: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /var/www/html/projectx/src/Helpers.php:22
Stack trace:
#0 /var/www/html/projectx/src/Helpers.php(22): call_user_func_array(Array, Array)
#1 /var/www/html/projectx/src/Helpers.php(35): Vokuro\container('bootstrap')
#2 /var/www/html/projectx/config/config.php(29): Vokuro\root_path('themes/vokuro/')
#3 /var/www/html/projectx/vendor/phalcon/devtools/src/Builder/Path.php(50): include('/var/www/html/p...')
#4 /var/www/html/projectx/vendor/phalcon/devtools/src/Commands/Builtin/Model.php(144): Phalcon\DevTools\Builder\Path->getConfig()
#5 /var/www/html/projectx/vendor/phalcon/devtools/src/Commands/Builtin/Model.php(74): Phalcon\DevTools\Commands\Builtin\Model->getConfigObject()
#6 /var/www/html/projectx/vendor/phalcon/devtools/src/Script.php(109): Phalcon\DevTools\Commands\Builtin\Model->run(Array)
#7 /var/www/html/projectx/vendor/phalcon/devtools/src/Script.php(148): Phalco in /var/www/html/projectx/src/Helpers.php on line 22

my web base is phalcon / vokuro and runs without problems.

Details

  • System info and versions (if possible): (phalcon info)
    Phalcon DevTools (4.0.3)
    Environment:
    OS: Linux project-x 5.3.0-46-generic [NFR] multiple databases support #38-Ubuntu SMP Fri Mar 27 17:37:05 UTC 2020 x86_64
    PHP Version: 7.3.11-0ubuntu0.19.10.4
    PHP SAPI: cli
    PHP Bin: /usr/bin/php7.3
    PHP Extension Dir: /usr/lib/php/20180731
    PHP Bin Dir: /usr/bin
    Loaded PHP config: /etc/php/7.3/cli/php.ini
    Versions:
    Phalcon DevTools Version: 4.0.3
    Phalcon Version: 4.0.5
    AdminLTE Version: 2.3.6

  • Phalcon Framework version: (php --ri phalcon)
    phalcon
    Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance.
    phalcon => enabled
    Author => Phalcon Team and contributors
    Version => 4.0.5
    Build Date => Apr 25 2020 08:42:01
    Powered by Zephir => Version 0.12.17-6724dbf

Directive => Local Value => Master Value
phalcon.db.escape_identifiers => On => On
phalcon.db.force_casting => Off => Off
phalcon.orm.case_insensitive_column_map => Off => Off
phalcon.orm.cast_last_insert_id_to_int => Off => Off
phalcon.orm.cast_on_hydrate => Off => Off
phalcon.orm.column_renaming => On => On
phalcon.orm.disable_assign_setters => Off => Off
phalcon.orm.enable_implicit_joins => On => On
phalcon.orm.enable_literals => On => On
phalcon.orm.events => On => On
phalcon.orm.exception_on_failed_save => Off => Off
phalcon.orm.exception_on_failed_metadata_save => On => On
phalcon.orm.ignore_unknown_columns => Off => Off
phalcon.orm.late_state_binding => Off => Off
phalcon.orm.not_null_validations => On => On
phalcon.orm.update_snapshot_on_save => On => On
phalcon.orm.virtual_foreign_keys => On => On
phalcon.warning.enable => On => On

  • PHP Version: (php -v)
    PHP 7.3.11-0ubuntu0.19.10.4 (cli) (built: Apr 8 2020 18:58:29) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.11-0ubuntu0.19.10.4, Copyright (c) 1999-2018, by Zend Technologies

  • Operating System:

  • Server: Nginx

  • Other related info (MySQL, InnoDB):

@BeMySlaveDarlin
Copy link
Contributor

BeMySlaveDarlin commented Mar 14, 2021

This is Vokuro related issue.
As we see in https://github.com/phalcon/vokuro/blob/master/src/Helpers.php ::22, there is return callback call_user_func_array([$default, 'get'], $args); usage, where $default = Di::getDefault(); .
I suppose there was some error on getting bootstrap container, which could had broken service declaration.

@Jeckerson
Copy link
Member

Closing this one in favor of phalcon/vokuro#162

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

No branches or pull requests

3 participants