informatica:linux:php:symfony
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:linux:php:symfony [2009/10/09 13:21] – 192.168.1.30 | informatica:linux:php:symfony [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 251: | Line 251: | ||
| [[informatica: | [[informatica: | ||
| + | |||
| Line 269: | Line 270: | ||
| nano / | nano / | ||
| - | 2. Dejar la linea tal que así (siguiendo el ejemplo): | + | 2. Dejar el fichero |
| + | < | ||
| require_once dirname(__FILE__).'/ | require_once dirname(__FILE__).'/ | ||
| + | sfCoreAutoload:: | ||
| + | |||
| + | class ProjectConfiguration extends sfProjectConfiguration | ||
| + | { | ||
| + | public function setup() | ||
| + | { | ||
| + | // for compatibility / remove and enable only the plugins you want | ||
| + | $this-> | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| 3. Crear un enlace simbólico: | 3. Crear un enlace simbólico: | ||
| Line 279: | Line 292: | ||
| De esta forma hemos optado por la instalación individual de symfony: moviendo el directorio '/ | De esta forma hemos optado por la instalación individual de symfony: moviendo el directorio '/ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| ===== Configurar la bd ===== | ===== Configurar la bd ===== | ||
| Line 284: | Line 302: | ||
| En este ejemplo vamos a usar mysql. Desde dentro del proyecto: | En este ejemplo vamos a usar mysql. Desde dentro del proyecto: | ||
| - | | + | ^ ORM ^ SGBD ^ Comando ^ |
| + | | Propel | MySQL | < | ||
| + | | Propel | Sqlite | < | ||
| + | | Doctrine | MySQL | < | ||
| + | | Doctrine | Sqlite | < | ||
| + | |||
| Line 502: | Line 526: | ||
| | Slot | {{http:// | | Slot | {{http:// | ||
| | Component slot | http:// | | Component slot | http:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 517: | Line 551: | ||
| **NOTA** supongo que antes de lanzar cada comando, es conveniente limpiar la caché (teóricamente en entornos ' | **NOTA** supongo que antes de lanzar cada comando, es conveniente limpiar la caché (teóricamente en entornos ' | ||
| - | **Limpiar la caché** | + | |
| - | php symfony | + | php symfony |
| | | ||
| - | **Configurar la conexión a la base de datos** | + | |
| # Ejemplo MySQL | # Ejemplo MySQL | ||
| Line 533: | Line 567: | ||
| / | / | ||
| - | **Crear el modelo de objetos** | + | |
| php symfony propel: | php symfony propel: | ||
| - | **Crear el diagrama entidad-relación a partir del modelo .yml** | + | Luego hay que limpiar la caché: |
| + | |||
| + | php symfony cache: | ||
| + | |||
| + | | ||
| php symfony propel: | php symfony propel: | ||
| Line 544: | Line 582: | ||
| / | / | ||
| + | |||
| + | * Habilitar los activos (assets) asociados a un plugin que acaba de ser habilitado | ||
| + | |||
| + | php symfony plugin: | ||
| + | |||
| + | * Crear la bd a partir del archivo '/ | ||
| + | | ||
| + | php symfony propel: | ||
| + | |||
| + | **NOTA** Todo lo marcado con 'con PROPEL' | ||
| + | |||
| + | * Cargar los datos a partir de '/ | ||
| + | |||
| + | php symfony doctrine: | ||
| + | |||
| + | **TODOS los comandos anteriores para PROPEL** | ||
| + | |||
| + | php symfony doctrine: | ||
| + | php symfony cc | ||
| + | |||
| + | * Listar rutas de una aplicación | ||
| + | |||
| + | php symfony app:routes frontend | ||
| + | |||
| + | * Mostrar el detalle de una ruta | ||
| + | |||
| + | php symfony app:routes frontend job_edit | ||
| ===== Errores ===== | ===== Errores ===== | ||
| Line 578: | Line 643: | ||
| La primera linea tiene que ser parecida a: | La primera linea tiene que ser parecida a: | ||
| - | | + | This file contains an SQLite 2.1 database... |
| **Solución** | **Solución** | ||
| Line 594: | Line 659: | ||
| php symfony cache:clear | php symfony cache:clear | ||
| php symfony configure: | php symfony configure: | ||
| - | php symfony propel: | + | php symfony propel: |
| + | |||
| + | **Fatal error: Class ' | ||
| + | |||
| + | En el archivo '/ | ||
| + | |||
| + | * No se ha modificado la ruta para que incluya el archivo correctamente | ||
| + | * Se ha comentado por error la linea ' | ||
| + | |||
| + | **Fatal error: Class ' | ||
| + | |||
| + | Se está intentando crear las sentencias | ||
| + | |||
| + | php symfony doctrine: | ||
| + | |||
| + | Pero en el archivo de configuración: | ||
| + | |||
| + | / | ||
| + | |||
| + | Todavía quedan residuos de propel que hay que eliminar: | ||
| + | |||
| + | < | ||
| + | dev: | ||
| + | propel: | ||
| + | param: | ||
| + | classname: DebugPDO | ||
| + | test: | ||
| + | propel: | ||
| + | param: | ||
| + | classname: DebugPDO | ||
| + | all: | ||
| + | propel: | ||
| + | class: sfPropelDatabase | ||
| + | param: | ||
| + | classname: PropelPDO | ||
| + | dsn: ' | ||
| + | username: root | ||
| + | password: null | ||
| + | encoding: utf8 | ||
| + | persistent: true | ||
| + | pooling: true | ||
| + | doctrine: | ||
| + | class: sfDoctrineDatabase | ||
| + | param: | ||
| + | dsn: ' | ||
| + | username: root | ||
| + | password: null | ||
| + | </ | ||
| + | |||
| + | Debería quedar tal que así: | ||
| + | |||
| + | < | ||
| + | all: | ||
| + | doctrine: | ||
| + | class: sfDoctrineDatabase | ||
| + | param: | ||
| + | dsn: ' | ||
| + | username: root | ||
| + | password: null | ||
| + | </ | ||
informatica/linux/php/symfony.1255094518.txt.gz · Last modified: (external edit)
