My development process involves using doctrine and svn. Documenting my development steps to make sure I can put this is some sort of build script in future.
Creating svn directories
svn mkdir -m "create default directories" http://svn.clients.rajatpandit.com/project-name/trunk http://svn.clients.rajatpandit.com/project-name/tags http://svn.clients.rajatpandit.com/project-name/branches
Checkout these directories locally:
svn co http://svn.clients.rajatpandit.com/project-name/ .
Move to the trunk directory
cd trunk
Creating a new project
$ symfony generate:project brp $ php symfony generate:app --escaping-strategy=on --csrf-secret=s3cr3t fe
Clear cache and log and add that to svn
rm -rf cache/* log/* chmod 777 cache/ log/ svn add *
svn propedit svn:ignore cache svn propedit svn:ignore log
Enter * in both the cases so that no files in cache and log get commited to svn
Add the new files to svn
svn ci -m 'adding the initial set of files'
Update the database settings, add the doctrine plugin and disable the propel plugin instead, edit the file config/ProjectConfiguration.class.php
and update the line with the following line:
$this->enableAllPluginsExcept(array('sfPropelPlugin', 'sfCompat10Plugin'));
Publish the plug-in assets
rp@devbox:~/websites/project-name/trunk$ php symfony plugin:publish-assets
plugin Configuring plugin - sfProtoculousPlugin
plugin Configuring plugin - sfDoctrinePlugin
Delete the files for the propel plugin:
svn delete web/sfPropelPlugin svn delete config/propel.ini svn delete config/schema.yml svn mkdir config/doctrine
Create new schema file and remove the default schema file.
rp@devbox:~/websites/project-name/trunk$ cd config/doctrine/ rp@devbox:~/websites/project-name/trunk/config/doctrine$ touch schema.yml rp@devbox:~/websites/project-name/trunk/config/doctrine$ svn add schema.yml A schema.yml rp@devbox:~/websites/project-name/trunk/config/doctrine$ svn ci -m 'adding schema for app' svn delete config/databases.yml svn ci -m 'removed the default databases.yml file'
Add database configuration settings:
php symfony configure:database --name=doctrine --class=sfDoctrineDatabase "mysql:host=127.0.0.1;dbname=project1" root password
Link to externals so that the latest version of the plugins and symfony gets checked out:
cd lib/ svn mkdir vendor svn propedit svn:externals lib/vendor svn ci -m 'updating symfony to version 1.2.7' svn update lib/vendor/
That pulls out the most updated tagged version of symfony.
Update the configuration file config/ProjectConfiguration.class.php to use the local symfony version instead of the site-wide settings.
require_once dirname(__FILE__) . '/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';


Recent Comments