webfactory / WebfactoryPolyglotBundle

Symfony bundle simplifying translations in Doctrine.
MIT License
3 stars 2 forks source link

Demo Repo (from README) #64

Closed tacman closed 3 months ago

tacman commented 3 months ago

I've created a demo repo from the README instructions. Basically

symfony new ...
require the bundle
create the entity classes from the readme
create a fixtures file to load entities

I've added the classes (Document and DocumentTranslations) from README almost exactly (I tweaked the classes so they'd compile). And create a fixtures file.

This uses sqlite, so these 4 lines should show the error. It's using dev-master of the polyglot-bundle

git clone git@github.com:survos-sites/polyglot-readme.git && cd polyglot-readme composer install bin/console doctrine:schema:update --force bin/console doctrine:fixtures:load -n

purging database loading App\DataFixtures\App loading App\DataFixtures\AppFixtures

In CacheItem.php line 139:

Cache key "App\Entity\Document$WebfactoryPolyglot" contains reserved characters "{}()/\@:".

doctrine:fixtures:load [--append] [--group GROUP] [--em EM] [--purger PURGER] [--purge-exclusions PURGE-EXCLUSIONS] [--purge-with-truncate]

Any chance somebody could take a look at it? When it works, it'll be a nice example for someone who wants to see it in action.

mpdude commented 3 months ago

I have made some suggestions and extensions in https://github.com/survos-sites/polyglot-readme/pull/1

tacman commented 3 months ago

The demo repo works now, thanks!