PHPackages                             jalis/service-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. jalis/service-generator

ActiveSymfony-bundle[CLI &amp; Console](/categories/cli)

jalis/service-generator
=======================

Symfony2 Bundle for create services by command line

1309PHP

Since Feb 28Pushed 13y ago2 watchersCompare

[ Source](https://github.com/javijalis/JalisServiceGeneratorBundle)[ Packagist](https://packagist.org/packages/jalis/service-generator)[ RSS](/packages/jalis-service-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Services Generator bundle for Symfony2
======================================

[](#services-generator-bundle-for-symfony2)

This package contains a bundle to easily create basic services efficiently and without effort from command line.

The package add a new command line **app/console generate:service** that create all the config and code for a basic service:

- Modify the services.xml (only works for xml language only)
- Create a Lib Class
- Inject dependencies (Entity Manager)

Installation
------------

[](#installation)

### Step 1: Install vendors

[](#step-1-install-vendors)

Installation depends on your version of Symfony:

#### Symfony 2.1.x: Composer

[](#symfony-21x-composer)

[Composer](http://packagist.org/about-composer) is a project dependency manager for PHP. You have to list your dependencies in a `composer.json` file:

```
{
    "require-dev": {
        "jalis/service-generator": "dev-master"
    }
}
```

To actually install Service Generator in your project, download the composer binary and run it:

```
wget http://getcomposer.org/composer.phar
# or
curl -O http://getcomposer.org/composer.phar

php composer.phar install
```

#### Symfony 2.0.x: `bin/vendors.php` method

[](#symfony-20x-binvendorsphp-method)

If you're using the `bin/vendors.php` method to manage your vendor libraries, add the following entries to the `deps` in the root of your project file:

```
[JalisServiceGeneratorBundle]
    git=https://github.com/javijalis/JalisServiceGeneratorBundle.git
    target=/bundles/Jalis/Bundle/ServiceGeneratorBundle

```

Next, update your vendors by running:

```
$ ./bin/vendors
```

Finally, add the following entries to your autoloader:

```
