symfony1

Porting a website from Symfony 1.4 to 2.0

故事扮演 提交于 2019-11-27 12:32:37
问题 I've got a huge site that has been written (in a very bad way) in symfony 1.4 now, I've been asked to make some substantial changes to the navigation flow, add some features and so on.. considering the effort, I was wondering if it would be better to take the radical decision to port the entire website to symfony 2.0, but I'm not sure how hard that it could be. Has anybody ever done this before? Do you have any suggestion to make for patterns to follow, or tutorials or doc or whatever? 回答1:

Using Raw SQL with Doctrine

依然范特西╮ 提交于 2019-11-27 11:07:00
I have some extremely complex queries that I need to use to generate a report in my application. I'm using symfony as my framework and doctrine as my ORM. My question is this: What is the best way to pass in highly-complex sql queries directly to Doctrine without converting them to the Doctrine Query Language? I've been reading about the Raw_SQL extension but it appears that you still need to pass the query in sections (like from() ). Is there anything for just dumping in a bunch of raw sql commands? $q = Doctrine_Manager::getInstance()->getCurrentConnection(); $result = $q->execute(" -- RAW

PHP ORMs: Doctrine vs. Propel

给你一囗甜甜゛ 提交于 2019-11-27 10:21:47
I'm starting a new project with symfony which is readily integrated with Doctrine and Propel , but I of course need to make a choice.... I was wondering if more experienced people out there have general pros and/or cons for going with either of these two? Thanks a lot. EDIT: Thanks for the all the responses, useful stuff. There's no truly correct answer to this question so I'll just mark as approved the one that got the most popular up-votes. I'd go with Doctrine. It seems to me that it is a much more active project and being the default ORM for symfony it is better supported (even though

Using multiple php frameworks on one website

限于喜欢 提交于 2019-11-27 08:05:16
问题 Our main website uses symfony 1, and by the time I started working on the code it seems impossible to upgrade (too much custom code from previous developer). Now we are adding a large addition to what the company offers. Instead of using a really old framework I wanted to use CodeIgniter, also since I'm very familiar with it. My real question: What is a proper way of setting up a website to use multiple frameworks. The new features will be separate from the original website, but it will still

How to Maintain Foreign Key Constraint Across Different Databases?

安稳与你 提交于 2019-11-27 07:02:36
问题 I know, I know , putting two related tables on different databases isn't exactly the best design practice. But for whatever's sake, suppose that I have to do it absolutely. And I have to break up two foreign-key-related tables that were previously located in a database into two databases, that are located on two different servers , but I still want to maintain the database(s) integrity. What is the best way to do this? Edit: I am using MySQL and Symfony 回答1: I can't think of any way to do

php/symfony/doctrine memory leak?

两盒软妹~` 提交于 2019-11-27 03:25:50
I'm having problems with a batch insertion of objects into a database using symfony 1.4 and doctrine 1.2. My model has a certain kind of object called "Sector", each of which has several objects of type "Cupo" (usually ranging from 50 up to 200000). These objects are pretty small; just a short identifier string and one or two integers. Whenever a group of Sectors are created by the user, I need to automatically add all these instances of "Cupo" to the database. In case anything goes wrong, I'm using a doctrine transaction to roll back everything. The problem is that I can only create around

Sharing php Session ($_SESSION) across multiple domain

怎甘沉沦 提交于 2019-11-26 21:26:05
问题 I have 2 different domain, let's call them www.foo.com and bar.foo.com. The first one is built with CI, and the second one is built with Symfony. I want to share my session, so if I login in one of them, I can access the other one. I set my session data with $_SESSION["session_name"] = "value"; . How to make a session data readable from the other domain? Thanks for your help. 回答1: Considering your original question and your answers to Logan and myself in the comments of the original question

PHP ORMs: Doctrine vs. Propel

两盒软妹~` 提交于 2019-11-26 17:57:12
问题 I'm starting a new project with symfony which is readily integrated with Doctrine and Propel, but I of course need to make a choice.... I was wondering if more experienced people out there have general pros and/or cons for going with either of these two? Thanks a lot. EDIT: Thanks for the all the responses, useful stuff. There's no truly correct answer to this question so I'll just mark as approved the one that got the most popular up-votes. 回答1: I'd go with Doctrine. It seems to me that it

php/symfony/doctrine memory leak?

允我心安 提交于 2019-11-26 10:32:06
问题 I\'m having problems with a batch insertion of objects into a database using symfony 1.4 and doctrine 1.2. My model has a certain kind of object called \"Sector\", each of which has several objects of type \"Cupo\" (usually ranging from 50 up to 200000). These objects are pretty small; just a short identifier string and one or two integers. Whenever a group of Sectors are created by the user, I need to automatically add all these instances of \"Cupo\" to the database. In case anything goes

How to specify Composer install path?

谁说我不能喝 提交于 2019-11-26 10:16:28
问题 I have this definition: { \"repositories\": [ { \"type\": \"package\", \"package\": { \"name\": \"symfony/sfGuardPlugin\", \"version\": \"4.0.2\", \"dist\": { \"url\": \"http://plugins.symfony-project.org/get/sfGuardPlugin/sfGuardPlugin-4.0.2.tgz\", \"type\": \"tar\" } } } ], \"require\": { \"symfony/sfGuardPlugin\": \"4.0.*\" } } I am using Symfony 1, and I\'d like to install them on plugins/sfGuardPlugin/ . How do I specify this? 回答1: It seems that you can define the vendor dir to be