elcodi / bamboo

Meet Bamboo, an e-commerce project built on top of Elcodi and Symfony. Give us a star to support our project :)
http://bamboo.elcodi.com
MIT License
198 stars 43 forks source link

Updated code for new purchasable implementation #670

Closed mmoreram closed 8 years ago

mmoreram commented 8 years ago

In order to test this feature, please, be sure that your vendor/elcodi/elcodi repository is changed to feature/updated-purchasable-schema branch, otherwise it will not work.

  • Using the new repository for purchasable instead of all single ones
  • Adapted store and templates for this change

    Fixes

  • Class ProductHasOnlyOneCategoryEventListener fixed. Doctrine was crashing because of bad practice of collection setters. More information in https://github.com/doctrine/doctrine2/issues/5601
  • Fixtures restarted. No one resultant fixtures cannot be applied when there is some data.

    Code

  • Code has changed in order to establish a new relation between the project and elcodi updates.
  • All admin pages, twig templates and forms have been created
  • Store have changed in order to work with new implementation
  • Some names were explicitely refering to product instead of purchasable. This has changed.
  • Using purchasable_name and valid_image twig extensions in store template

    Tests

  • Some tests have been redone. All of them were testing behavior, and because some urls have been changed, for example, these scenarios have been changed.
  • Added some entries in Visithor and fixed old ones

    Missing things

  • [x] Blocked by https://github.com/doctrine/doctrine2/issues/5601 and cover this case with some Behat tests
  • [x] Fix Behat tests
  • [x] Cover all new functionalities with Behat features
  • [x] Check all translation elements
EmanueleMinotto commented 8 years ago

Migrations shouldn't be restarted, the best thing to do here is to create a diff from current mappings and schema including old migrations.

mmoreram commented 8 years ago

@EmanueleMinotto Fixtures must be restarted here for a reason. People with data in database (existing projects) will not be able to adapt their sites into new features because of schema. Adding a new migration will not work at all, so going to 2.0 will just abandon old versions. In that case, resetting migrations is a good practice here :)

mmoreram commented 8 years ago

Tests are not passing because first of all we should close new elcodi/elcodi version... Test locally.