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/13 09:55] – 192.168.1.30 | informatica:linux:php:symfony [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 292: | 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 297: | 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 515: | Line 526: | ||
| | Slot | {{http:// | | Slot | {{http:// | ||
| | Component slot | http:// | | Component slot | http:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 531: | 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 547: | Line 567: | ||
| / | / | ||
| - | **Crear el modelo de objetos** | + | |
| php symfony propel: | php symfony propel: | ||
| Line 555: | Line 575: | ||
| php symfony cache:clear | php symfony cache:clear | ||
| - | **Crear el diagrama entidad-relación a partir del modelo .yml** | + | |
| php symfony propel: | php symfony propel: | ||
| Line 563: | Line 583: | ||
| / | / | ||
| + | * 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 598: | 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 622: | Line 667: | ||
| * No se ha modificado la ruta para que incluya el archivo correctamente | * No se ha modificado la ruta para que incluya el archivo correctamente | ||
| * Se ha comentado por error la linea ' | * Se ha comentado por error la linea ' | ||
| + | |||
| + | **Fatal error: Class ' | ||
| + | |||
| + | Se está intentando crear las sentencias sql con doctrine: | ||
| + | |||
| + | 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.1255427752.txt.gz · Last modified: (external edit)
