I install DoctrineMongoDBBundle in symfony 3.3. I follow the symfony document
http://symfony.com/doc/master/bundles/DoctrineMongoDBBundle/index.html
I create a document then I run this command bin/console doctrine:mongodb:generate:documents but I got an error
"Bundle AppBundle does not contain any mapped documents.Did you maybe forget to define a mapping configuration". I check my namespace and It was correct and my configuration file is like symfony document page
Related
I have a table in the database which has a large number of columns. I know that EasyAdminBundle is out there and I used it in the past to create forms based on database tables. How can create this based on Entity? So that I can generate the forms automatically and no populate them manually.
You can use the Symfony Maker Bundle. With this bundle, you can generate code if you are using a version of Symfony later than 3.4. For older versions you can use Sensio Generator Bundle.
In your case, install the Maker Bundle with composer:
composer require symfony/maker-bundle --dev
Then run this command (and follow the steps) to create your form:
php bin/console make:form
To see all make commands you can use, run php bin/console list make
As symfony 4.4 you can do :
./bin/console make:entity YourFormType \\Your\\Path\\To\\Entity
From the command help :
Description:
Creates a new form class
Usage:
make:form [ <name> [<bound-class>]]
I am using Meteor 1.3 and am unable to get my fixtures to appear on the client.
For testing purposes, I created a new Meteor project and followed the tutorial steps up to this point.
I created a file fixtures.js in /imports/api/
I import this in /server/main.js
When I start the server, I see the console log line indicating that the file was imported and if I query the collection using the mongo shell, I see the fixtures.
If I query the collection from the client, I see nothing.
Am I missing something to get the flixtures to appear on the client? I have not modifed the installed packages, so autopublish is still present.
If you just use chrome console to query your collection, this will not work anymore in 1.3. If you want so, then you should put it into global namespace:
global.CollectionName = CollectionName
Zend 1.9.1
so I get this error
Blockquote
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. If you are running this without Zendframework in your include-path, you can alternatively set one of two enviroment variables to for this tool to work
ZEND_TOOL_INCLUDE_PATH="/path/to/ZendFramework\library" or alternatively
ZEND_TOOL_INCLUDE_PATH_PREPEND="/path/to/ZendFramework\library"
attempted include_path: c:\php\includes;.
script location: c:\php\bin\zf.php
looking at the attempted include path it shows that my include path is set to 'c:\php\includes', done so via php.ini
inside include folder is 'library/' folder which contains 'zend/'
and my zend bin folder is at c:php/bin
yet I still get this error when trying to use zf in command line?
Ive had a look at other questions to no avail
I ended up using Zend Framework 1 final release - version 1.12.11 to get around this headache and it worked perfectlt as it should have. Had to be a bug in the 1.9 version!
I created a new Zend framework 1 project (I need to learn ZF1 for a old app I'll be working on) using the following command: zf create project zf-tutorial
... but I get an error telling me: PHPUnit was not found in your include_path, therefore no testing actions will be created.
However, I have phpunit installed and I can confirm this by going to the terminal and running phpunit
I installed PHPUnit from their homepage - http://phpunit.de/manual/4.1/en/installation.html
I suspect that zf create * will generate my test files/folders similar to Rails? I really like this feature and would like to enable it for ZF too (if possible)
Any reason why zend tool isn't picking up phpunit?
Maybe put the path where the phpunit is located into your include_path in your php.ini file? phpunit may be in your shell PATH but might not be in the include_path...
Iam trying to set up the GuestBook Application which comes with zend framework tutorial , Iam following the steps one by one,
However when I enter this command - zf create db-table Guestbook guestbook
Iam getting an error, I have pasted the error here -
C:\xampp\htdocs\quickstart>zf create db-table Guestbook guestbook
An Error Has Occurred Provider 'db-table' is not a valid provider.
I tried googling and searching on zend forums, but seems no one got this sort of issue so far. Can anyone suggest me whats wrong here?
PS: I have set php in my system path and zf tool works for me, its only this specific command thats giving error.
After Lots of digging in and breaking my head with the ZF tool I found that it is using copy of Zend framework which comes with Xampp for Windows.
When I installed Xampp, Zend Framework(Version 1.9.7) got installed inside the
C:\Xampp\Php\Pear\Zend
directory and since C:\Xampp\Php is in my system path this Zend framework got picked up everytime by Zend Tool.
I copied the latest version of stable Zend Framework(1.10.2) to the Zend folder inside Php\Pear and now its works like cake for me :)
Thanks for all your suggestions!
Download latest version of framework files from this link http://www.zend.com/community/downloads & then extract zip file where you will get folder structure like ZendFramework-1.11.12/library/Zend, So from this folder copy Zend folder to Xampp/php/PEAR/zend folder. Then Go to command mode type Zf --help. Now it shows all the commands.
Now also check version of zend-framework in command mode by typing as
zf show version
it should show as version as zend Framework Version: 1.11.12
Check your version, maybe db-table is newer than your version. I just tried the same command you used (zf create db-table Guestbook guestbook) and it worked.
When i write zf show version it responds 1.11.0dev. What does your version say? If it's low, consider updating after following the changelog and testing the rest of your application with the new version of zf.