Zend Framework 1.8 Autoloading Zend_Gdata_YouTube VideoQuery.php - php

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?

Related

How to configure Eclipse Project for Joomla Component Development

I like to develop a fresh Joomla Component for Joomla 3.x in Eclipse and created therefore a simple PHP project.
The problem I have is now how to setup the correct "include path", so that the basic Joomla PHP classes get found like "JFactory" , "JAccess", "JObject" ...
If I just include a Joomla installation in my include path, this will not work. I assume the paths to the classes are more sophisticated than that.
Any Idea or suggestion how the "include path" for my project should look like?
regards
Mark
It depends a little on what you mean by "found".
If you mean "as I start typing a basic class name every matching basic class gets offered as an option", yes, there is a way to do that.
See the conversation, and solution, on this gitHub page.
I have the stub file referred to and it works in the way I've said above, tho' I'm using NetBeans not Eclipse (but the reference to phpStorm makes me think it should/could work for you too), although I haven't been able to run the build script. I just haven't got the time to single step through it to find out where it stops.

phpunit test for latest dependencies

BACKGROUND
I am working on a PHP project with unit testing and Travis CI. (It is Source Speak.)
This project "depends" on Twitter Bootstrap. In other words it includes the line:
//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css
I can find out the latest release of bootstrap by querying:
https://api.github.com/repos/twbs/bootstrap/releases
QUESTION
How do I add a unit test that confirms that all URLs in the project like //netdna.bootstrapcdn.com/bootstrap/*/css/bootstrap.min.css are using the latest version of Bootstrap?
-and-
Is there any documented best practice that says I shouldn't be doing this?
Edit: Yes, bower is a good solution as well and is probably preferable if you are already using bower for something else.
I would write a shell script that curl's the version from the url and then downloads it from the version specified in the original curl call. There is no documented best practice that says you shouldn't be doing this, but I would probably add the bootstrap css file to version control so that you can track when you updated bootstrap and easily downgrade if a new version breaks anything.
If you need any help with the shell script let me know with a comment and I can show you one.

codeigniter modular seperation problem php mvc

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.

Eclipse Auto-Complete for Included PHP Source

I've installed Eclipse 3.5.1 (PDE), which I believe I got from Zend's download site (it was a while ago on my travel laptop). I can't get auto-complete to work for any of my included libraries. I've tried both adding the libraries to the 'include path' and just linking the files to a subdirectory of the project. Neither gets me auto-complete of the library classes.
My normal development system has an older version of Eclipse which I don't update, because it currently works well, and I fear an update will change that. I find configuring eclipse more work that actual coding, and more voodoo that mod_rewrite. I doubt I'm alone.
Any secret to getting auto-complete working?
No you're definitely not alone! I have experienced this problem in many installations of Eclipse (after updates and such etc etc). Try running Build Project. I know that solution has worked in some instances for me. My last installation I was running Eclipse Galileo and once I finally got the intellisense to at least work it was extremely slow. I tried lowering the time delay for the intellisense which helped in php files (still had a 1.5 second delay at least) but made it way over-sensative in my view scripts for example.
I finally bit the bullet and switched to Zend Studio 8. (At least they've knocked the price down $100 haha).
Eclipse has a quirky auto-complete but the Zend one is excellent! :)
You can add a PHP library to the project in Project properties/PHP Include Path/Libraries. After that, autocomplete will index all php files in that directory.
Maybe it's not the best solution for you, because it doesn't care about whether the file is included or not in the given script. If I include /usr/share/pear, and now I see all PEAR libs' functions everywhere.

CodeIgniter with Eclipse PDT, is clean integration possible?

I am attempting to setup codeigniter with eclipse but am getting project errors. From what I understand this should be as simple as creating a new project in eclipse and pointing to the root directory of codeigniter. This properly loads up the codeigniter files but eclipse reports several errors. Looking into the files, it seems like the errors are coming from html files and/or files that print html. For instance, footer.php is showing up as having an error because there is a closing tag but no opening tag. Any suggestions on how to overcome this? At this point would code completion / debugging be too much to ask for as well?
UPDATE: so from what I am gathering from the response below (and searching around on the web) is that when using codeigniter with eclipse one can only take advantage of the code completion / editing features? I also noticed that I am getting NoClassDefFoundError when attempting to open some of the .php files in the eclipse project tree for editing. Surely I must be missing something and there is a way to achieve tighter integration with codeigniter and eclipse? (i would strongly prefer to stick with eclipse as opposed to switching ides) Or maybe this is an issue with my eclipse/pdt setup?
UPDATE 2: I just downloaded the latest eclipse version (galileo) and it seemed to fix all of these issues! except for debugging of course ...
you can achieve tighter integration by initializing the Ci core classes in CI_Base constructor which will also allow you to get auto complete for core classes check out these links:
http://www.gostomski.co.uk/codeigniter/getting-full-auto-complete-with-codeigniter-in-eclipse
http://hetal.wordpress.com/2009/09/04/working-with-eclipse-and-code-igniter/
you will get lots of html errors because the html has been broken into chunks
and is not a complete document
just ignore them thats what i do (there are settings somewhere that control what errors are validated against in eclipse)
i still use the php/html/js code completion and it works fine even with the errors
if you are using svn version control, add subclipse plugin, so you can do that from within eclipse too
Try Aptana.
The last time I checked I was able to do a step by step debug on it and did not see any errors in my project. It is also built on eclipse, so there is nothing new to learn.
For what it's worth, I have been able to get debugging to work using XDebug and the Netbeans IDE. If you cannot get debugging to work in Eclipse you might give Netbeans a try - if for no other reason, to have the ability to debug should you ever need to step through your application's code...

Categories