symfony

unit testing with symfony + doctrine + PHPUnit

I'm working with Symfony + Doctrine + PHPUnit, with NetBeans IDE. Here' my current approach to unit testing. setUp() function loads the test fixtures from .yml files tearDown() function delete all data from models. this is done by looping through an array of all my models' names to something like Doctrine_Query::delete($modelName)->exe...

propel:build schema driver fails

I'm doing jobeet day 3 and I copied the schema.yml into the config directory and so I'm trying to create a database schema and I ran: $sudo php symfony propel:build-schema propel Running "reverse" phing task [propel-schema-reverse] There was an error building XML from metadata: could not find driver Some problems o...

Symfony - Override sf_format when calling get_partial.

I'm making an AJAX call in my symfony project, so it has an sf_format of 'js'. In the actionSuccess.js.php view, I call get_partial to update the content on the page. By default it looks for the partial in 'js' format since the sf_format is still set as 'js'. Is it possible to override the sf_format so that it uses the regular 'html' par...

How do you preserve the updated_at date field when saving the the database in Symfony?

This has to be simple... I'm trying to preserve the current date that is already stored in an updated_at field in the DB. I'm updating a single field value in the same row and then saving but I don't want it to update the updated_at field. I want to preserve the existing updated_at value. I only want to do this in one, maybe two situa...

Symfony 1.1 Custom 500 Exception Access

In symfony 1.0 you can access the uncaught exception causing your custom 500 error page to appear through $this in your error500.php. How can this be accomplished in 1.1? ...

How to perform SQL query using Popel ORM in Symfony

Here is my problem, i'm trying to do tag cloud in symfony, what i want to perform is such a sql query select tag, count(tag) from tagi group by tag order by count(tag) desc limit 10 anyone can help? ...

Symfony (PHP framework) and MongoDB ( or any json-based database)

I was wondering if its possible to use a json-based schema-free, document-based database like Mongodb or Couchdb on a symfony project like its used for ruby-on-rails websites? And if yes, how can it be done? ...

Symfony plugins not installing?

I am having some issues trying to install plugins from symfony into my project: OS X 10.6 Snow Leopard MAMP 1.8.2 (PHP 5.2.10) Symfony 1.2 (standalone symfony framework + project as recommended by the Symfony Getting Started tutorial. e.g. I save the symfony framework in a lib/vendor folder inside my project). I run the following com...

How do i detach a behavior in Symfony/Doctrine?

Hi, I have doctrine's softdelete behavior attached to all of my models. Is there a way I can hard delete a particular record? In cakephp I remember detaching the behavior... deleting the record and then re attaching the behavior. Is there something similar in symfony/doctrine ? If so then how do I detach a behavior? Cheers ...

Upload File Size Limit: Symfony Admin Generator Module

I have form created by the admin generator in the backend of a website. It allows the upload of a video to the site. It works fine but strangely, the upload fails for files of 10mb or over. However, I have not set any file limits in my form. Are there Symfony/PHP/Apache/web browser settings regarding this type of behaviour that I can l...

In symfony/doctrine's schema.yml, where should I put onDelete: CASCADE for a many-to-many relationship?

I have a many-to-many relationship defined in my Symfony (using doctrine) project between Orders and Upgrades (an Order can be associated with zero or more Upgrades, and an Upgrade can apply to zero or more Orders). # schema.yml Order: columns: order_id: {...} relations: Upgrades: class: Upgrade local: order_id ...

Symfony: adding new action/view error. (Newb question)

I'm getting a 404 when trying to add a new module page. I'm apparently missing something fundamental here, being a newbie to Symfony. Can anyone point out what it is I'm missing? Many thanks. modules/admin/actions/actions.class.php /* following executeIndex() */ public function executeSchedule() { if ($this->getRequest()->getet...

symfony redirect with 2 parameters

how can i redirect to another action passing 2 or more parameters? this code: $this->redirect('input/new?year=' . $year . '&month=' . $month); results in URL: http://.../input?year=2009&month=9 ...

Help integrating Wordpress with Symfony

I have a site built with Symfony 1.2. I'm trying to integrate Wordpress 2.8.4 into it to power my blog. I followed the instructions at http://www.theodo.fr/blog/2009/03/integrate-wordpress-into-symfony/, including the 2 steps in the comments at h ttp://www.theodo.fr/blog/2009/03/integrate-wordpress-into-symfony/comment-page-1/#comment-57...

Cleanup Symfonys View Templates

I'm evaluating the PHP webframework: Symfony for a project. Everything is quite well organized so far, except for the view templates which suffer from an unreadable/error prone mix of html and php (I was trying to adapt the views to use clean urls and that just turned out to be an exercise in "spot the delimiters"). Is there any methods...

retaining POST parameters after login page in symfony

how can i make symfony retain the POST data after login page? for example, the cookie was expired while user was filling the form. after submitting the form user gets a redirect to a login page. and after successful login he gets a redirect back to form's "action" url without any POST data from the initial form. is there any mechani...

Trees in Symfony

Does someone know a stable tree adminstration plugin (nested set etc.) for the symfony framework, which is able to operate on separated database tables? ...

PHP Framwork that does Named URLs? (other than Zend Framework)

I really like the named URLs in the Django Framework, and was wondering which of the PHP Frameworks supported such a thing. (I believe Zend Framework does, but please exclude that from your answers, without explanation). For instance, in Django I can name a path like "/items/###" as "item-detail-page", which would point to a View 'func...

What framework(s) would you suggest for a strong, extensible dev platform?

First, let me apologize for Yet Another Framework Question. But I think this is different enough from the usual "What framework should I choose?" to warrant it. Here's my situation: For the past year I've been using a custom framework. It's been used on everything from small CMS's to larger sites and even a mid sized social network. It'...

doctrine orm: bypass lazy loading and prefetch related records in a getter

Working with Doctrine ORM, is it possible to enable auto eager loading of related records when using in a getter ? (without explicit leftJoins()) I know I can use a leftJoin() to obtain the object with related records, but I want to avoid creating a DQL query for every object and simply have some kind of automatic "prefetching" of rela...