Permalink
Browse files

Externalized fixtures.

This enables the use of SyliusCoreBundle without the default fixtures
  • Loading branch information...
1 parent 599247c commit 419502f32600bd2e1450e8be3b1386fbf31ab4cd @csarrazi csarrazi committed with Charles Sarrazin Feb 28, 2014
Showing with 184 additions and 23 deletions.
  1. +1 −0 app/AppKernel.php
  2. +2 −1 src/Sylius/Bundle/CoreBundle/composer.json
  3. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/DataFixture.php
  4. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadCountriesData.php
  5. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadExchangeRatesData.php
  6. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadGroupsData.php
  7. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadImagesData.php
  8. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadOptionsData.php
  9. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadOrdersData.php
  10. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadPaymentMethodsData.php
  11. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadProductsData.php
  12. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadPromotionsData.php
  13. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadPropertiesData.php
  14. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadPrototypesData.php
  15. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadShippingData.php
  16. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadTaxationData.php
  17. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadTaxonomiesData.php
  18. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadUsersData.php
  19. +1 −1 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/ORM/LoadZonesData.php
  20. +2 −2 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/PHPCR/LoadBlocksData.php
  21. +3 −3 src/Sylius/Bundle/{CoreBundle → FixturesBundle}/DataFixtures/PHPCR/LoadPagesData.php
  22. +74 −0 src/Sylius/Bundle/FixturesBundle/README.md
  23. BIN src/Sylius/Bundle/{CoreBundle → FixturesBundle}/Resources/fixtures/book.jpg
  24. BIN src/Sylius/Bundle/{CoreBundle → FixturesBundle}/Resources/fixtures/mug.jpg
  25. BIN src/Sylius/Bundle/{CoreBundle → FixturesBundle}/Resources/fixtures/sticker.jpg
  26. BIN src/Sylius/Bundle/{CoreBundle → FixturesBundle}/Resources/fixtures/t-shirt.jpg
  27. +19 −0 src/Sylius/Bundle/FixturesBundle/Resources/meta/LICENSE
  28. +23 −0 src/Sylius/Bundle/FixturesBundle/SyliusFixturesBundle.php
  29. +43 −0 src/Sylius/Bundle/FixturesBundle/composer.json
View
@@ -144,6 +144,7 @@ private function addFixturesBundle(array $bundles, array $environments = array('
{
if (in_array($this->environment, $environments) && class_exists('Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle')) {
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
+ $bundles[] = new Sylius\Bundle\FixturesBundle\SyliusFixturesBundle();
}
return $bundles;
@@ -53,7 +53,8 @@
"symfony/form": "~2.3"
},
"suggest": {
- "sylius/web-bundle": "Provides default web interface"
+ "sylius/web-bundle": "Provides default web interface",
+ "sylius/fixtures-bundle": "Provides default Sylius fixtures"
},
"config": {
"bin-dir": "bin"
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Bundle\AddressingBundle\Model\CountryInterface;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Bundle\CoreBundle\Model\VariantImage;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Bundle\AddressingBundle\Model\AddressInterface;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Bundle\PromotionsBundle\Model\RuleInterface;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Bundle\ShippingBundle\Calculator\DefaultCalculators;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Bundle\TaxationBundle\Model\TaxCategoryInterface;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\ORM;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Sylius\Bundle\AddressingBundle\Model\ZoneInterface;
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\PHPCR;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\PHPCR;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
@@ -30,7 +30,7 @@ public function load(ObjectManager $manager)
$faker = FakerFactory::create();
$session = $manager->getPhpcrSession();
- $basepath = $this->container->getParameter('cmf_block.persistence.phpcr.block_basepath');;
+ $basepath = $this->container->getParameter('cmf_block.persistence.phpcr.block_basepath');
NodeHelper::createPath($session, $basepath);
$parent = $manager->find(null, $basepath);
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\CoreBundle\DataFixtures\PHPCR;
+namespace Sylius\Bundle\FixturesBundle\DataFixtures\PHPCR;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
@@ -30,12 +30,12 @@ public function load(ObjectManager $manager)
$faker = FakerFactory::create();
$session = $manager->getPhpcrSession();
- $basepath = $this->container->getParameter('cmf_routing.dynamic.persistence.phpcr.route_basepath');;
+ $basepath = $this->container->getParameter('cmf_routing.dynamic.persistence.phpcr.route_basepath');
NodeHelper::createPath($session, $basepath);
$routeRoot = $manager->find(null, $basepath);
- $basepath = $this->container->getParameter('cmf_content.persistence.phpcr.content_basepath');;
+ $basepath = $this->container->getParameter('cmf_content.persistence.phpcr.content_basepath');
NodeHelper::createPath($session, $basepath);
$parent = $manager->find(null, $basepath);
@@ -0,0 +1,74 @@
+SyliusFixturesBundle [![Build status...](https://secure.travis-ci.org/Sylius/SyliusFixturesBundle.png?branch=master)](http://travis-ci.org/Sylius/SyliusFixturesBundle)
+================
+
+Sylius fixtures bundle. It contains the fixtures from the core bundle so a user can install the core without the fixtures.
+
+Sylius
+------
+
+**Sylius** - Modern ecommerce for Symfony2. Visit [Sylius.org](http://sylius.org).
+
+[phpspec](http://phpspec.net) examples
+--------------------------------------
+
+```bash
+$ composer install
+$ bin/phpspec run -f pretty
+```
+
+Documentation
+-------------
+
+Documentation is available on [**docs.sylius.org**](http://docs.sylius.org).
+
+Contributing
+------------
+
+All informations about contributing to Sylius can be found on [this page](http://docs.sylius.org/en/latest/contributing/index.html).
+
+Mailing lists
+-------------
+
+### Users
+
+Questions? Feel free to ask on [users mailing list](http://groups.google.com/group/sylius).
+
+### Developers
+
+To contribute and develop this bundle, use the [developers mailing list](http://groups.google.com/group/sylius-dev).
+
+Sylius twitter account
+----------------------
+
+If you want to keep up with updates, [follow the official Sylius account on twitter](http://twitter.com/Sylius).
+
+Bug tracking
+------------
+
+This bundle uses [GitHub issues](https://github.com/Sylius/SyliusFixturesBundle/issues).
+If you have found bug, please create an issue.
+
+Versioning
+----------
+
+Releases will be numbered with the format `major.minor.patch`.
+
+And constructed with the following guidelines.
+
+* Breaking backwards compatibility bumps the major.
+* New additions without breaking backwards compatibility bumps the minor.
+* Bug fixes and misc changes bump the patch.
+
+For more information on SemVer, please visit [semver.org website](http://semver.org/).
+This versioning method is same for all **Sylius** bundles and applications.
+
+MIT License
+-----------
+
+License can be found [here](https://github.com/Sylius/SyliusFixturesBundle/blob/master/Resources/meta/LICENSE).
+
+Authors
+-------
+
+The bundle was originally created by [Charles Sarrazin](https://twitter.com/csarrazi).
+See the list of [contributors](https://github.com/Sylius/SyliusFixturesBundle/contributors).
@@ -0,0 +1,19 @@
+Copyright (c) 2011-2014 Paweł Jędrzejewski
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ * This file is part of the Sylius package.
+ *
+ * (c) Paweł Jędrzejewski
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Sylius\Bundle\FixturesBundle;
+
+use Symfony\Component\HttpKernel\Bundle\Bundle;
+
+/**
+ * Sylius fixtures bundle.
+ *
+ * @author Charles Sarrazin <charles@sarraz.in>
+ */
+class SyliusFixturesBundle extends Bundle
+{
+}
@@ -0,0 +1,43 @@
+{
+ "name": "sylius/fixtures-bundle",
+ "type": "symfony-bundle",
+ "description": "Sylius fixtures bundle. It contains the fixtures from the core bundle so a user can install the core without the fixtures.",
+ "keywords": ["shop", "ecommerce", "store", "webshop", "sylius"],
+ "homepage": "http://sylius.org",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Paweł Jędrzejewski",
+ "homepage": "http://pjedrzejewski.com"
+ },
+ {
+ "name": "Sylius project",
+ "homepage": "http://sylius.org"
+ },
+ {
+ "name": "Community contributions",
+ "homepage": "http://github.com/Sylius/Sylius/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.3",
+
+ "sylius/core-bundle": "1.0.*@dev"
+ },
+ "require-dev": {
+ "fzaninotto/faker": "1.2.*",
+ "doctrine/doctrine-fixtures-bundle": "2.2.*"
+ },
+ "config": {
+ "bin-dir": "bin"
+ },
+ "autoload": {
+ "psr-0": { "Sylius\\Bundle\\FixturesBundle\\": "" }
+ },
+ "target-dir": "Sylius/Bundle/FixturesBundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ }
+}

0 comments on commit 419502f

Please sign in to comment.