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: Uncaught Error: Class "Phalcon\Config" not found in C:\Users\....\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php:48 #1529

Open
an-nguyen2101 opened this issue Sep 27, 2022 · 9 comments
Assignees

Comments

@an-nguyen2101
Copy link

Hello there,

I ran a command to create a project by using Phalcon Devtoools (4.2.0) but it is always impossible and throw this error : PHP Fatal error: Uncaught Error: Class "Phalcon\Config" not found in C:\Users....\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php:48

Do you know how can fix this ?

Thanks,

Questions should go to https://forum.phalcon.io
Documentation issues should go to https://github.com/phalcon/docs/issues

Expected and Actual Behavior

Describe what you are trying to achieve and what goes wrong.

Provide output if related

// paste output here

Provide minimal script to reproduce the issue

// paste code

Details

  • System info and versions (if possible): (phalcon info)
  • Phalcon Framework version: (php --ri phalcon)
  • PHP Version: (php -v)
  • Operating System:
  • Server: Nginx | Apache | Other
  • Other related info (Database, table schema):
@furopi
Copy link

furopi commented Oct 6, 2022

Hello there,

I ran a command to create a project by using Phalcon Devtoools (4.2.0) but it is always impossible and throw this error : PHP Fatal error: Uncaught Error: Class "Phalcon\Config" not found in C:\Users....\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php:48

Do you know how can fix this ?

Thanks,

Questions should go to https://forum.phalcon.io
Documentation issues should go to https://github.com/phalcon/docs/issues

Expected and Actual Behavior

Describe what you are trying to achieve and what goes wrong.

Provide output if related

// paste output here

Provide minimal script to reproduce the issue

// paste code

Details

  • System info and versions (if possible): (phalcon info)
  • Phalcon Framework version: (php --ri phalcon)
  • PHP Version: (php -v)
  • Operating System:
  • Server: Nginx | Apache | Other
  • Other related info (Database, table schema):

Me too is facing the same issue. My "phalcon info" reads "Phalcon DevTools (4.2.0)", Docs read for info "Phalcon DevTools (5.0.0)". Where can I get DevTools 5.0.0? Thank you! ❤️

@an-nguyen2101
Copy link
Author

an-nguyen2101 commented Oct 7, 2022 via email

@Jeckerson Jeckerson self-assigned this Oct 7, 2022
@furopi
Copy link

furopi commented Nov 4, 2022

I heard some rumors about a devtools 5.0 release expected to drop end of October... Is there a rough estimate when we can expect to code in Phalcon 5.0 w/ working devtools? Just asking... Thank you for taking your time!

@dovantien2911
Copy link

me tooooo

@alejosv
Copy link

alejosv commented Dec 20, 2022

Same issue:

$ phalcon project --type=micro --name api-test

Phalcon DevTools (4.2.0)

PHP Fatal error:  Uncaught Error: Class "Phalcon\Config" not found in /home/ubuntu/.config/composer/vendor/phalcon/devtools/src/Builder/Component/AbstractComponent.php:48
Stack trace:
#0 /home/ubuntu/.config/composer/vendor/phalcon/devtools/src/Commands/Builtin/Project.php(74): Phalcon\DevTools\Builder\Component\AbstractComponent->__construct()
#1 /home/ubuntu/.config/composer/vendor/phalcon/devtools/src/Script.php(109): Phalcon\DevTools\Commands\Builtin\Project->run()
#2 /home/ubuntu/.config/composer/vendor/phalcon/devtools/src/Script.php(148): Phalcon\DevTools\Script->dispatch()
#3 /home/ubuntu/.config/composer/vendor/phalcon/devtools/phalcon(65): Phalcon\DevTools\Script->run()
#4 {main}
  thrown in /home/ubuntu/.config/composer/vendor/phalcon/devtools/src/Builder/Component/AbstractComponent.php on line 48

@SFFI
Copy link

SFFI commented Feb 27, 2023

Me too!

>phalcon create-project store

Phalcon DevTools (4.2.0)


Fatal error: Uncaught Error: Class 'Phalcon\Config' not found in C:\Users\1\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php on line 48

Error: Class 'Phalcon\Config' not found in C:\Users\1\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Builder\Component\AbstractComponent.php on line 48

Call Stack:
    0.0002     415808   1. {main}() C:\Users\1\AppData\Roaming\Composer\vendor\bin\phalcon:0
    0.0008     429592   2. include('C:\Users\1\AppData\Roaming\Composer\vendor\phalcon\devtools\phalcon') C:\Users\1\AppData\Roaming\Composer\vendor\bin\phalcon:115
    0.0111    1155608   3. Phalcon\DevTools\Script->run() C:\Users\1\AppData\Roaming\Composer\vendor\phalcon\devtools\phalcon:64
    0.0112    1155608   4. Phalcon\DevTools\Script->dispatch($command = class Phalcon\DevTools\Commands\Builtin\Project { protected $script = class Phalcon\DevTools\Script { protected $eventsManager = class Phalcon\Events\Manager { ... }; protected $commands = [...] }; protected $eventsManager = class Phalcon\Events\Manager { protected $collect = FALSE; protected $enablePriorities = FALSE; protected $events = [...]; protected $responses = [...] }; protected $encoding = 'UTF-8'; protected $parameters = [0 => 'create-project', 1 => 'store']; protected $preparedArguments = ['name' => TRUE, 'enable-webtools' => TRUE, 'directory' => TRUE, 'type' => TRUE, 'template-path' => TRUE, 'template-engine' => TRUE, 'use-config-ini' => TRUE, 'trace' => TRUE, 'force' => TRUE, 'help' => TRUE]; protected $path = class Phalcon\DevTools\Builder\Path { protected $rootPath = 'E:\\项
目文件\\phalcon\\' } }) C:\Users\1\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Script.php:148
    0.0114    1156928   5. Phalcon\DevTools\Commands\Builtin\Project->run($parameters = [0 => 'create-project', 1 => 'store']) C:\Users\1\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Script.php:109
    0.0119    1189232   6. Phalcon\DevTools\Builder\Component\AbstractComponent->__construct($options = ['name' => 'store', 'type' => 'simple', 'directory' => '.', 'enableWebTools' => FALSE, 'force' => FALSE, 'templatePath' => 'C:\\Users\\1\\AppData\\Roaming\\Composer\\vendor\\phalcon\\devtools\\templates', 'templateEngine' => 'phtml', 'useConfigIni' => NULL]) C:\Users\1\AppData\Roaming\Composer\vendor\phalcon\devtools\src\Commands\Builtin\Project.php:74
>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 => 5.2.0
Build Date => Feb 27 2023 01:33:03
Powered by Zephir => Version 0.17.0-$Id$

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.resultset_prefetch_records => 0 => 0
phalcon.orm.update_snapshot_on_save => On => On
phalcon.orm.virtual_foreign_keys => On => On
phalcon.warning.enable => On => On
>phalcon info

Phalcon DevTools (4.2.0)

Environment:
  OS: Windows NT DESKTOP-PUGO6P5 10.0 build 19044 (Windows 10) AMD64
  PHP Version: 7.4.33
  PHP SAPI: cli
  PHP Bin: E:\wamp64\bin\php\php7.4.33\php.exe
  PHP Extension Dir: C:\php\ext
  PHP Bin Dir: C:\php
  Loaded PHP config: E:\wamp64\bin\php\php7.4.33\php.ini
Versions:
  Phalcon DevTools Version: 4.2.0
  Phalcon Version: 5.2.0
  AdminLTE Version: 3.0.1

@daleffe
Copy link

daleffe commented Jun 24, 2023

Hello everyone, I made the necessary corrections to work with Phalcon 5.x, you can check this repository.

I hope it helps.

@furopi
Copy link

furopi commented Jun 25, 2023

Hello everyone, I made the necessary corrections to work with Phalcon 5.x, you can check this repository.

I hope it helps.

Awesome work!!! Can this run on windows? Will it work with PHP 8.2? Ty!!

@daleffe
Copy link

daleffe commented Jul 5, 2023

Hello everyone, I made the necessary corrections to work with Phalcon 5.x, you can check this repository.
I hope it helps.

Awesome work!!! Can this run on windows? Will it work with PHP 8.2? Ty!!

I believe so, only modified PHP files.

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

7 participants