I have a problem with Symfony 4, I want generate entities from an existing database with the command :
php bin/console doctrine:mapping:import --force AppBundle xml
But an error appears :
Bundle "AppBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your App\Kernel.php file?
I try to import in the file kernel.php in registerBundles() :
new AppBundle/AppBundle();
but undefined class and when I create it in src/AppBundle/AppBundle.php :
<?php
namespace AppBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AppBundle extends Bundle
{
}
nothing change and when I retry the command :
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "AppBundle" from namespace "App".
Did you forget a "use" statement for another namespace? in /var/www/html/symfony/Mission3/src/Kernel.php:30
I would like to know if it's possible to create a bundle like that or if it exists an other command to generate entities from an existing database.
in SF4, The main application component is named 'App' by default and is not a bundle.
You have to manually create a dummy bundle under src\ directory in order to use old doctrine:command related to bundle.
see how to manually create a bundle here
After that, you can import/generate mappings/entities using doctrine:commands and use them in the App main module space, or in those bundles.
The SF4 maker tool don't provide bundle creation yet ... But I suppose the SF4 developers consider it's not an urge must have requirement, because they want us to focus on putting most code in the bundle less App main module.
In symfony 4 'AppBundle' is doesn't exist anymore. Try use 'App' instead 'AppBundle'
Related
I created a hello world Ionic 6 Angular Project.
In the root folder I use
ng generate module customers --route customers --module app.module
This command I know from angular to create a lazy loaded feauter Module.
But I got this Error Message.
File customers/customers.module.ts does not exist.
If I create a module with this name first, I got the Error Message something like "there is already a customer.module.ts, merge conflict".
How to generate a lazy loaded feature module, using the cli command?
I solved it with the ionic command
ionic generate
than I choosed "Page". This create everything with module and lazy loading support.
how do I disable the compiler in magento 2.0?
I have installed Magento 2.0 and then installed a theme "Porto" from theme-forest. But after installing the theme, when compiling, I got an error.
magento_user:/var/www/html/magento2$ sudo php bin/magento setup:di:compile
Compilation was started.
Interception cache generation... 6/7 [========================>---] 85% 2 mins 418.2 MiBErrors during compilation:
Smartwave\Filterproducts\Helper\Data
Extra parameters passed to parent construct: $data. File: /var/www/html/magento2/app/code/Smartwave/Filterproducts/Helper/Data.php
Smartwave\Filterproducts\Block\FeaturedList
Incorrect dependency in class Smartwave\Filterproducts\Block\FeaturedList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/FeaturedList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Smartwave\Filterproducts\Block\Home\FeaturedList
Incorrect dependency in class Smartwave\Filterproducts\Block\Home\FeaturedList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/Home/FeaturedList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Smartwave\Filterproducts\Block\Home\LatestList
Incorrect dependency in class Smartwave\Filterproducts\Block\Home\LatestList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/Home/LatestList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Smartwave\Filterproducts\Block\LatestList
Incorrect dependency in class Smartwave\Filterproducts\Block\LatestList in /var/www/html/magento2/app/code/Smartwave/Filterproducts/Block/LatestList.php
\Magento\Framework\App\Config\ScopeConfigInterface already exists in context object
\Magento\Catalog\Helper\Image already exists in context object
Total Errors Count: 5
The theme vendor says I need to disable compilation. How do I do that in Magento 2.0?
I have looked for this in magento2 documents, and couldnt find any answers. i can disable modules using this command below, but which one is the compiler module
sudo php bin/magento module:disable Magento_xxxx
Any help/pointers will be highly appreciated. My site is down now, and need to bring it up soon as possbile
You cannot disable the compiler. Why did the theme developer say to do that? Sounds strange.
In default and developer modes, the compiler is always enabled; generally, it's a good thing. In production mode, the compiler is disabled. But there is no way to disable the compiler in either default or developer mode.
I'm trying to use the "Itext" applications. I've downloaded the "jar" file from http://sourceforge.net/projects/itext/ and trying to launch the file: itextpdf-5.5.5.jar but get an error:
"no main manifest attribute, in itextpdf-5.5.5.jar"
Could you please help me and explain how can I launch it? It seems that there is no declared main class in the manifest.
I'm trying to get ArcMenu for my application.
The code runs great by itself, but I don't know how to make it work with another project.
It doesn't look like an Android Library project...
When trying to use this project with my own, this is what I get in Eclipse's console:
res/layout/arc_menu.xml:4: error: No resource identifier found for attribute 'fromDegrees' in package 'com.capricorn'
res/layout/arc_menu.xml:4: error: No resource identifier found for attribute 'toDegrees' in package 'com.capricorn'
res/layout/ray_menu.xml:4: error: No resource identifier found for attribute 'childSize' in package 'com.capricorn'
res/layout/ray_menu.xml:4: error: No resource identifier found for attribute 'leftHolderWidth' in package 'com.capricorn'
EDIT
I forked ArcMenu and published it on Github.
Now a better recode of it appeared: https://github.com/siyamed/android-satellite-menu
I recommend you use that one.
it seems that on your XML you didn't properly define the namespace.
for example for all the android framework stuff is:
xmlns:android="http://schemas.android.com/apk/res/android"
I suggest checking on your examples what would be for the ArcLibrary.
I try to move my module which generated by the Admin Genrator to a plugin.
Error:
Fatal error: Class 'BaseFooGeneratorConfiguration' not found in ...
The action.class.php includes to files:
fooGeneratorConfiguration.class.php
fooGeneratorHelper.class.php
Both classes extends of an base class (BaseFooGeneratorConfiguration,BaseFooGeneratorHelper).
The problem is that those classes only exist in the cache.
Do i need to copy the class from cache into my plugin ?!
Have you tried clearing your cache after moving the module to your plugin?
./symfony cc