PHP Fatal error: Uncaught Error: Class 'Phalcon\\Db' not found. for Phalcon 4 - php-7

I am currently upgrading version PHP 5 to PHP 7. And Phalcon 1 to Phalcon 4.
my all existing API gives error.
Fatal error: Uncaught Error: Class 'Phalcon\Db' not found.
I have found that use Phalcon\Db\Enum instead of Phalcon\Db.
but I want to use Phalcon\Db. Is there any way to use?
Please help me as because of this I have made many changes in my project.

As per phalcon's docs for phalcon4.0 you will have to use ENUM
https://docs.phalcon.io/4.0/en/api/phalcon_db
You can use phalcon3.4 in case if you want to use Phalcon/Db
https://docs.phalcon.io/3.4/en/api/phalcon_db

Related

BigCommerce Stencil Start Uncaught Error: Module parse failed

I'm getting the following error after running stencil start and accessing the localhost url in my browser:
Uncaught Error: Module parse failed: Unexpected token (10:9)
You may need an appropriate loader to handle this file type.
|
| var getAccount = function getAccount() {
> return import('./theme/account');
| };
|
at Object../assets/js/app.js (bootstrap:83)
at __webpack_require__ (bootstrap:19)
at bootstrap:83
at bootstrap:83
(index):1064 Uncaught TypeError: window.stencilBootstrap is not a function
at (index):1064
This just started happening this morning, I was able to run stencil yesterday without any problems.
I've followed the steps here exactly:
https://developer.bigcommerce.com/stencil-docs/getting-started/installing-stencil
I've tried uninstalling stencil and reinstalling multiple times. I've also tried using a fresh clone of cornerstone multiple times in multiple different directories. I can't get rid of this error and have tried all of the troubleshooting suggestions from the docs. There are no errors in the terminal.
I'm on macOS High Sierra 10.13.6
Node Version: v.6.4.0
Any ideas on why I'm getting this error?
This is an issue on our end with the Cornerstone 3.1 release, which can be downloaded through GitHub but hasn't rolled out to production yet. We've got an engineering ticket in to address it, but in the meantime, you can roll back to the Cornerstone 3.0 release to bypass the error. Sorry for the trouble!

Twig_Environment::addExtension() error after Symfony / Sylius Update

after update from sylius 1.0.1 to 1.2.9 and composer update i get the following error:
FatalThrowableError
HTTP 500 Internal Server Error
Type error: Argument 1 passed to Twig_Environment::addExtension() must implement interface Twig_ExtensionInterface, boolean given, called in /Users/xxx/var/cache/dev/ContainerXxfh21q/appDevDebugProjectContainer.php on line 4293
Is there any idea?
Thanks
TELLO
Its a bug introduced with symfony 3.4.16
https://github.com/symfony/symfony/issues/28657
They are looking in to it.

Prestashop 1.6.1.4 - Undefined constant for custom module

We have upgraded from Prestashop 1.6.0.9 to 1.6.1.4. After updating to new version one of our custom module started throwing Fatal Error like :
PHP ERROR
We have defined this constant in the classes/pdf/PDF.php file.
I am not able to trace the error as it was working previously. Any help or reference will be appreciated.
Try to define this constant in your custom module like that:
if (!defined('TEMPLATE_PRODUCT_RETURN'))
{
define('TEMPLATE_PRODUCT_RETURN', '...');
}

Fatal error: Class 'UserForm' not found in lib/vendor/symfony/lib/generator/sfModelGenerator.class.php on 331

I have run
symfony doctrine:build-model
symfony doctrine:build-form
symfony doctrine:build-module frontend user User
But I got
Fatal error: Class 'UserForm' not found in lib/vendor/symfony/lib/generator/sfModelGenerator.class.php on 331
Is there any solution?
It seems you have the same problem as explained in this question symfony doctrine:build --all
Have you tried to regenerate all classes using this?
php symfony doctrine:build --all-classes

LuaXML error: "undefined symbol: luaL_prepbuffer"

I'm using the lua interpreter and I'm trying to load LuaXML but when I require('LuaXML'), I get this error.
lua: error loading module 'LuaXML' from file './LuaXML_lib.so':
./LuaXML_lib.so: undefined symbol: luaL_prepbuffer
I have no clue how to fix this. I tried compiling the module myself but it still throws the error.
This is because you are trying to use LuaXML under Lua 5.2.
LuaXML was designed for Lua 5.1.
The problem can be solved by installing Lua 5.1.x or LuaJIT.