PHPackages                             softfly/generator-bundle - 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. [API Development](/categories/api)
4. /
5. softfly/generator-bundle

AbandonedArchivedSymfony-bundle[API Development](/categories/api)

softfly/generator-bundle
========================

Generator auxiliary codes: REST from Doctrine

010PHP

Since Feb 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/softfly/GeneratorBundle)[ Packagist](https://packagist.org/packages/softfly/generator-bundle)[ RSS](/packages/softfly-generator-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Softfly Generator for Symfony
=============================

[](#softfly-generator-for-symfony)

Install
-------

[](#install)

composer require softfly/generator-bundle

Functionalities
---------------

[](#functionalities)

1. Doctrine to REST

Generate REST on FOSRestBundle based on Doctrine entity.

1. Method get all entities \* Generate mapping entitly to response object. \* Generate recursive mappings for relation entity. \* Protection for "A circular reference"

Example
-------

[](#example)

```
namespace AppBundle\Controller\Rest\Properties;

use FOS\RestBundle\Controller\Annotations\RouteResource;
use FOS\RestBundle\Controller\FOSRestController;

class PropertyRest extends FOSRestController
{
    public function getPropertiesAction()
    {
        $data = array();
        /* @var $propertiesRepo \Doctrine\ORM\EntityRepository */
        $propertiesRepo = $this->getDoctrine()->getRepository('\\AppBundle\\Entity\\Properties\\Property');
        $properties = $propertiesRepo->findAll();
        /* @var $property \AppBundle\Entity\Properties\Property*/
        foreach ($properties as $property) {
            $row = array();
            $row['id'] = $property->getId();
            $row['name'] = $property->getName();
            $row['slug'] = $property->getSlug();
            $row['location'] = $property->getLocation();
            $row['short_description'] = $property->getShortDescription();
            $row['long_description'] = $property->getLongDescription();
            /* @var $price \AppBundle\Entity\Offers\Price*/
            foreach ($property->getPrices() as $price) {
                $row1 = array();
                $row1['id'] = $price->getId();
                $row1['price'] = $price->getPrice();
                $row['price'][] = $row1;
                /* @var $timeUnit \AppBundle\Entity\Offers\TimeUnit*/
                $timeUnit = $price->getTimeUnit();
                if ($timeUnit) {
                    $row2 = array();
                    $row2['id'] = $timeUnit->getId();
                    $row2['noun'] = $timeUnit->getNoun();
                    $row2['adverb'] = $timeUnit->getAdverb();
                    $row['timeUnit'] = $row2;
                }
            }
            $data[] = $row;
        }
        $view = $this->view($data, 200);
        return $this->handleView($view);
    }
}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2241544?v=4)[Grzegorz Ziemski](/maintainers/softfly)[@softfly](https://github.com/softfly)

---

Top Contributors

[![softfly](https://avatars.githubusercontent.com/u/2241544?v=4)](https://github.com/softfly "softfly (3 commits)")

### Embed Badge

![Health badge](/badges/softfly-generator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/softfly-generator-bundle/health.svg)](https://phpackages.com/packages/softfly-generator-bundle)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
