Podczas pisania pewnego projektu ze znajomymi pojawił się dość nietypowy problem. Mam plik plugins/coUserPlugin/config/doctrine/schema.yml (sfGuardPlugin z kilku względów odpada) o mniej więcej takiej zawartości:
Kod
User:
tableName: user
columns:
id:
type: integer(2)
primary: true
autoincrement: true
login:
type: string(25)
notnull: true
password:
type: string(32)
notnull: true
mail:
type: string(150)
notnull: true
realname: string(100)
location: string(100)
sex:
type: enum
values: [male, female]
age: integer(1)
is_checked:
type: integer(1)
notnull: true
default: '0'
indexes:
user_login_unique:
fields: [login]
type: unique
user_mail_unique:
fields: [mail]
type: unique
...
tableName: user
columns:
id:
type: integer(2)
primary: true
autoincrement: true
login:
type: string(25)
notnull: true
password:
type: string(32)
notnull: true
mail:
type: string(150)
notnull: true
realname: string(100)
location: string(100)
sex:
type: enum
values: [male, female]
age: integer(1)
is_checked:
type: integer(1)
notnull: true
default: '0'
indexes:
user_login_unique:
fields: [login]
type: unique
user_mail_unique:
fields: [mail]
type: unique
...
Jak widać na pole login oraz email nałożony jest klucz unique.
Po wywołaniu symfony doctrine:build-all-reload w katalogu lib pojawiają się odpowiednie klasy. Najistotniejsze do opisania problemu wydają mi się
lib/model/doctrine/coUserPlugin/base/BaseUser.class.php a w niej:
<?php ?>
oraz lib/form/doctrine/coUserPlugin/base/BaseUserForm.class.php z fragmentem:
<?php $this->validatorSchema->setPostValidator( )) ); ?>
Jeszcze raz napisze, że oba te pliki są generowane na podstawie schema.yml i w takiej postaci to u mnie działa.
Problem natomiast pojawił się, gdy inni programiści zrobili checkouta projektu. Otóż w klasie bazowej formularza wywałanie metody setPostValidator... nie istnieje! Natomiast w modelu indeksy są wyznaczone.
Nie oczekuję od Was od razu rozwiązania, jedynie wskazówki co mogło zawinić (cache sprawdzone, wyczyszczone dogłębnie

Pozdrawiam i z góry dziękuję za wszelkie wskazówki.