tirenweb
tirenweb

Reputation: 31739

symfony: "clean-model-files" for Propel?

when i try build-all-load i'm getting errors about models that doesn't exist any more in my schema. I know in doctrine i can use clean-model-files but in propel?

This is the error:

PHP Warning:  require(lib/model/om/BaseSedii18n.php): failed to open stream: No such file or directory in /home/javier/Aptana_Studio_Workspace/cashgold/lib/model/Sedii18n.php on line 3

Javier

Upvotes: 1

Views: 413

Answers (1)

Jakub Zalas
Jakub Zalas

Reputation: 36231

I guess there's no similar task in propel.

You could try a bash script below. Backup your code first. I assume you're some kind of version control system.

This should list files causing your problems:

./symfony s 2>&1 | grep "failed to open stream" | sed -e 's/.*directory in \([^ ]\+\/lib\/model\/[^ ]\+\).*/\1/' | sort -u

Remove all those files with (you'll be asked before deleting each file):

rm -i $(./symfony s 2>&1 | grep "failed to open stream" | sed -e 's/.*directory in \([^ ]\+\/lib\/model\/[^ ]\+\).*/\1/' | sort -u)

Upvotes: 1

Related Questions