I'm sure that I'm missing something, but I've spent all day and I still can't get this skeleton doctrine integration project by Jason Gilmour to work:
github link
It's quite a simple project, but (after configuring in application.ini) I run into difficulty trying to generate the schema:
./scripts/doctrine orm:schema-tool:create
GIVES
PHP Fatal error: Cannot redeclare class Entities\Account in /var/www/z2d2/application/models/Entities/Account.php on line 12
I think it has something to do with namespaces.
I am using php 5.3.6.
Thanks,
Demian.
I downloaded the source from github here and it seems that the author has made a mistake in the file /application/model/entities/Rank.php. This file is just a duplicate of Account.php - hence the error...
Just delete Rank.php and create your own (or even don't)
Apart from this issue, it looks like a great skeleton to implement zend framework with doctrine.
Thanks for the comments those who responded.
D.
Related
Let me disclaim first, that I'm a total CakePHP newbie. I am pretty proficient in PHP and MySQL however, having developed my own frameworks, etc., until I saw that other frameworks have already done the work for you :/ I'm trying to get into CakePHP cuz it has great documentation, good organization and the powerful console.
I've gone through the basics now and am trying to look into plugins - I have decided to start with the comments plugin, found at: http://cakedc.com/eng/downloads/view/cakephp_comments_plugin
I followed the first few lines of instructions to where I'm supposed to see the thing work, but it gave me errors about missing tables (e.g. Database table comments for model Comment was not found.). Certain I'll find a file, I've found this: /app/plugins/comments/config/schema/schema.php. The $comments array looks like it's formatted to be automated, instead of creating tables manually. But googling has failed to produce a good guide.
What line of instruction am I missing? Is there a way to use the console to convert this array (and other schema the plugin may require) into the DB scheme? Is there a script I should run every time I install a plugin?
Thanks in advance for your help.
You load the schema via the cake shell. More info here: h
http://book.cakephp.org/view/1524/Generating-and-using-Schema-files
Ok so Im running 1.7.2 and I installed the codeigniter-modular-seperation library (the newest version which is maintained by Phil Sturgeon , as the wiki said to install that version if Im using 1.7 or above)
-- anyways, the documentation is super light, just says put MY_Router and MY_Loader in the libraries folder which Ive done, and everything is working as far as the module urls go, but when I try and make the modules talk to each other as per both of the following articles:
http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/
http://codeigniter.com/wiki/Modular_Extensions_-_HMVC
but I get
Fatal error: Call to undefined method Modules::run() in siteurl on line 4
I also tried loading the module like this
[code]load->module('ratings/ratings'); ?> [/code]
which yields an error Call to undefined method MY_Loader::module()
So ya, anyone have any idea how to fix this? Any help much appreciated.
soooooooo, correct me if Im wrong, but, it appears that the newer version of HMVC (the one you are advised to download if you use 1.7+), does not support cross loading of controllers. I switched to the old version and its working perfect, although I have to say Im not sure I understand the purpose of making it modular, if you aren’t able to cross load from other controllers (unless you are just using the modules to create completely separate unique webpages by using each directory as its own mini codeigniter installation.
I replaced the new with the old version and its working perfect.
Phil, if you read this, do you have any plans to implement cross controller/resource loading in a future version? Because (and I mean no disrespect you know a hell of a ton more about php than me), it seems like the whole power behind the Zend framework is its modularity. The problem I have with Zend is its honestly the most confusing shit I have ever attempted to understand (I have an ecommerce store running on magento), but even though its confusing and frustrating as all hell, its absolutely brilliant because of how extendable it is. I feel like if CI were more modular (without hacking it up all over), it would have 2000x the power as it does now.
I am getting stuck with this Symfony command after following the Jobeet tutorial on their site. After running the build model command, here's what I get:
$ php symfony doctrine:build --model
doctrine generating model classes
file+ /private/var/folders/yX/yXtbVXwPHcCUpfC-n06OAU+++TI/-Tmp-/doctrine_schema_56533.yml
No yml schema found in /private/var/folders/yX/yXtbVXwPHcCUpfC-n06OAU+++TI/-Tmp-/doctrine_schema_56533.yml
Any ideas?
What's then full path to your schema.yml? Looks like it might be in the wrong place.
I encountered a couple of issues in the jobeet tutorial and found it helpful to compare my file contents/paths to the tag for the relevant day at http://svn.jobeet.org/doctrine/tags/
Did you make sure that all your schema code is YAML compliant?
Maybe you can share the content of your current schema.yml with us.
I got this error when following this tutorial.
Warning: require_once(...\sf_sandbox\apps\frontend\config\config.php) [function.require-once]: failed to open stream: No such file or directory in ...\sf_sandbox\web\index.php on line 8
Why ?
not sure quite why you get the error, but from my (slightly limited) knowledge of french, I think thats quite an old guide. Would suggest you try the jobeet tutorial instead:
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/
Chapter one will leave you with a working symfony install thats good for any project (i generally follow this approach whenever i start a project) - not just the jobeet one. If you are new to symfony, the tutorial is a really good way to get a solid overview of the framework and leaves you ready to do your first project without falling down at every hurdle.
check that the config.php file is actually there ...
I'm having issues with Zend_Gdata_YouTube.
It seems unable to locate the file VideoQuery.php despite the fact it is one of the directories mentioned in the warning messages.
Also I created a standalone version of the example just including 'Zend/Gdata/YouTube.php'. This works fine.
I've dropped the error messages then the class followed by the working example into a paste bin.
Paste Bin
I got the same error after I upgraded from ZF 1.8.0 to 1.8.4, after searching for a solution with no luck I posted my error on the ZF Gdata mail list and Trevor Johns was nice enough to get back to me with this response:
"This looks like this issue:
http://framework.zend.com/issues/browse/ZF-7013
This will be fixed in the next release of Zend Framework. If you don't
want to wait that long, you can either:
Download a development snapshot from here:
hxxp://framework.zend.com/code/browse/~tarball=zip/Zend_Framework/standard/trunk/trunk.zip
Use version 1.8.3:
hxxp://framework.zend.com/releases/ZendFramework-1.8.3/ZendFramework-1.8.3.tar.gz
Don't use Zend_Loader's autoloader functionality. (This bug only
seems to show up if you're trying to autoload the classes.)"
I'll be rolling back my ZF version until the next release.
p.s. had to substitute http with hxxp because "new users can only post a maximum of one hyperlink" apparently.
The files Zend\Gdata\Media\Extension\VideoQuery.php and Zend\Gdata\YouTube\Extension\VideoQuery.php do not exist in the framework. I think the file you want is Zend\Gdata\YouTube\VideoQuery.php
Does this help? What code is using these classes, your code or the framework code?