Skip to content

Commit 3d98ef6

Browse files
committed
namespace refactoring
1 parent 3d3422c commit 3d98ef6

9 files changed

+23
-63
lines changed

FixturesGeneratorBundle/Command/FixtureGenerateCommand.php Command/FixtureGenerateCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Gamma\FixturesGenerator\FixturesGeneratorBundle\Command;
3+
namespace Gamma\FixturesGeneratorBundle\Command;
44

55
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
66
use Symfony\Component\Console\Input\InputInterface;

FixturesGeneratorBundle/DependencyInjection/Configuration.php DependencyInjection/Configuration.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Gamma\FixturesGenerator\FixturesGeneratorBundle\DependencyInjection;
3+
namespace Gamma\FixturesGeneratorBundle\DependencyInjection;
44

55
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
66
use Symfony\Component\Config\Definition\ConfigurationInterface;

FixturesGeneratorBundle/DependencyInjection/GammaFixturesGeneratorExtension.php DependencyInjection/GammaFixturesGeneratorExtension.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Gamma\FixturesGenerator\FixturesGeneratorBundle\DependencyInjection;
3+
namespace Gamma\FixturesGeneratorBundle\DependencyInjection;
44

55
use Symfony\Component\DependencyInjection\ContainerBuilder;
66
use Symfony\Component\Config\FileLocator;
@@ -23,8 +23,5 @@ public function load(array $configs, ContainerBuilder $container)
2323
$config = $this->processConfiguration($configuration, $configs);
2424

2525
$container->setParameter('gamma_fixtures_generator.fixture_references_file_name', $config['fixture_references_file_name']);
26-
27-
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
28-
$loader->load('services.yml');
2926
}
3027
}

FixturesGeneratorBundle/README.md

-22
This file was deleted.

FixturesGeneratorBundle/Resources/config/services.yml

-9
This file was deleted.

FixturesGeneratorBundle/composer.json

-19
This file was deleted.

FixturesGeneratorBundle/GammaFixturesGeneratorBundle.php GammaFixturesGeneratorBundle.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Gamma\FixturesGenerator\FixturesGeneratorBundle;
3+
namespace Gamma\FixturesGeneratorBundle;
44

55
use Symfony\Component\HttpKernel\Bundle\Bundle;
66

README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1-
Fixtures generator usage:
1+
#Smart Gamma Fixtures generator
22

3+
Allow speed up fixtures creation by generating fixtures classes from project's database
4+
5+
##Configuration:
6+
7+
add to app/config.yml
8+
9+
gamma_fixtures_generator:
10+
fixture_references_file_name: /src/Prefix/SiteBundle/Resources/config/fixtureReferences.txt
11+
12+
##Fixtures generator usage:
13+
14+
```
315
app/console gamma:fixtures:generate "\Gamma\Bundle\Entity\Item" - generate all entities from table
416
app/console gamma:fixtures:generate "\Gamma\Bundle\Entity\Item" --id="1,2,3" - generate entities with ids 1,2,3 from table
517
app/console gamma:fixtures:generate "\Gamma\Bundle\Entity\Item" --id="1,2,3" --force-add-reference - generate entities with ids 1,2,3 from table and add txt reference
18+
```
619

7-
8-
20+
Note: Relations ManyToMany should be created additionally manually

composer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"type": "bundle",
55
"version": "master",
66
"require": {
7-
"php": ">=5.3"
7+
"php": ">=5.3",
8+
"symfony/framework-bundle": "~2.3|~3.0"
89
},
910
"authors": [
1011
{
@@ -13,7 +14,7 @@
1314
}
1415
],
1516
"autoload": {
16-
"psr-0": { "Gamma\\FixturesGenerator": "" }
17+
"psr-0": { "Gamma\\FixturesGeneratorBundle": "" }
1718
},
18-
"target-dir": "Gamma/FixturesGenerator"
19+
"target-dir": "Gamma/FixturesGeneratorBundle"
1920
}

0 commit comments

Comments
 (0)