Symfony is a nice PHP framework, when it works. Sometimes when you run symfony you get a cryptic error and you have no clue on how to fix the problem. The article shows one of them and how to solve it.
Symfony cryptic error: Error importing plugins/sfPropelPlugin/lib/propel/builder/SfPeerBuilder.php
By Stephane Carrez2009-05-17 20:59:02 2 comments
After the migration to Symfony 1.2, when I wanted to use the command symfony propel:build-model
, I was getting the following cryptic error:
>> propel Running "om" phing task
[phingcall] Error importing plugins/sfPropelPlugin/lib/propel/builder/SfPeerBuilder.php
Execution of target "om" failed for the following reason: /usr/share/php/symfony/plugins/sfPropelPlugin/lib/vendor/propel-generator/build- propel.xml:465:22: Execution of the target buildfile failed. Aborting.
[phing] /usr/share/php/symfony/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:465:22: Execution of the target buildfile failed. Aborting.
Some problems occurred when executing the task:
build-propel.xml:465:22: Execution of the target buildfile failed. Aborting.
Read the logs to fix them
After searching for some time, I've found that this error comes from a bad definition in my 'config/propel.ini
' file. The propel.ini file contained definitions like:
propel.builder.peer.class = \
plugins.sfPropelPlugin.lib.propel.builder.SfPeerBuilder
propel.builder.object.class = \
plugins.sfPropelPlugin.lib.propel.builder.SfObjectBuilder
And they should be defined as follows:
propel.builder.peer.class = \
plugins.sfPropelPlugin.lib.builder.SfPeerBuilder
propel.builder.object.class = \
plugins.sfPropelPlugin.lib.builder.SfObjectBuilder
Once the propel configuration was fixed, the symfony command was working again.
If you have this kind of problem, I suggest the following:
- Create an empty blank application with Symfony (
symfony init-app test
) - Make a diff of the '
config
' directory between your application and the blank application - Report any suspicious change to fix your configuration
Tags
- Facelet
- NetBSD
- framework
- Mysql
- generator
- firefox
- application
- interview
- ReadyNAS
- Security
- binutils
- ELF
- JSF
- Java
- bacula
- Tutorial
- Apache
- COFF
- collaboration
- planning
- project
- upgrade
- AWA
- C
- EL
- J2EE
- UML
- php
- symfony
- Ethernet
- Ada
- FreeBSD
- Go
- KVM
- MDE
- Proxy
- STM32
- Servlet
- backup
- lvm
- multiprocessing
- web
- Bean
- Jenkins
- release
- OAuth
- ProjectBar
- REST
- Rewrite
- Sqlite
- Storage
- USB
- Ubuntu
- bison
- cache
- crash
- Linux
- gcc
- performance
- lex
Add a comment
To add a comment, you must be connected. Login2 comments
Hi, thx for the Tipp. I had the same problem and now i can solve it.
This error can be cryptic, but symfony documentation is very verbose on what to do to avoid this problem:
http://www.symfony-project.org/inst...
You just need to run:
$ php symfony project:upgrade1.2
That's all, it'll changes You described, as well as some others.