This happens with both Symfony 1.1 (old site), and Symfony 1.4
(upgrade).

With Symfony 1.4 the problem is worse, because the generated Base
class extends the fake plugin.

On Apr 12, 3:27 pm, Jo Carter <goo...@jocarter.co.uk> wrote:
> I have a bizarre problem with a YAML file creating two copies of a
> Plugin class (one in the Plugin, and one in the project).  It's only
> some tables in the YAML file, not all.
>
> The YAML file is as follows: (all line endings are UNIX)
>
> assetImage:  # This one works fine
>   columns:
>     id:                            { type: integer, primary: true,
> autoincrement: true }
>     filename:                      { type: string(30) }
>     alt:                           { type: string(255) }
>     title:                         { type: string(255) }
>     width:                         { type: integer }
>     height:                        { type: integer }
>
>   actAs:
>     I18n:
>       fields: [alt, title]
>       # length 5 because the symfony cultures are 5 chars long
>       length: 5
>
> assetDocument:  # This one has problems
>   columns:
>     id:                            { type: integer, primary: true,
> autoincrement: true }
>     filename:                      { type: string(30) }
>     original_filename:             { type: string(255) }
>     title:                         { type: string(255) }
>     size:                          { type: integer(2) }
>     filetype:                      { type: string(5) }
>
>   actAs:
>     I18n:
>       fields: [title]
>       # length 5 because the symfony cultures are 5 chars long
>       length: 5
>
> When I run ./doctrine:build-forms frontend in 1.1 and ./doctrine build
> --forms in 1.4 I get extra classes generated in my lib/forms folder.
>
> ?       lib/form/doctrine/base/BasePluginassetDocumentForm.class.php
> ?       lib/form/doctrine/base/
> BasePluginassetDocumentTranslationForm.class.php
> M       lib/form/doctrine/epifonyAssetPlugin/base/
> BaseassetDocumentTranslationForm.class.php
> M       lib/form/doctrine/assetPlugin/base/
> BaseassetDocumentForm.class.php
> M       lib/form/doctrine/epifonyAssetPlugin/base/
> BaseassetImageTranslationForm.class.php
> M       lib/form/doctrine/assetPlugin/base/
> BaseassetImageForm.class.php
>
> And the same with the models, and filter forms (1.4 only).
>
> The classes in the Plugin are set up correctly.
>
> Additionally, when I run the new migration task in 1.4, it adds the
> asset_document table to the list of things to be removed.
>
> I'm out of ideas.  Has anyone ever come across something like this
> before?
>
> Jo

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to