PHPackages                             liip/code-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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. liip/code-bundle

AbandonedArchivedSymfony-bundle[Debugging &amp; Profiling](/categories/debugging)

liip/code-bundle
================

Liip Code Bundle

0.4.0(12y ago)2610.9k1[9 issues](https://github.com/liip/LiipCodeBundle/issues)MITPHPPHP &gt;=5.3.3

Since Feb 24Pushed 8y ago61 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

UNMAINTAINED
============

[](#unmaintained)

This bundle is no longer maintained. Feel free to fork it if needed.

Introduction
============

[](#introduction)

A set of Symfony2 console commands to help developers deal with the various ways of identifying classes, templates, bundles, services, etc. Provides console commands to find their file path or class, as well as editor shortcuts.

- `code:path` outputs the symfony path corresponding to a class, service, template, etc.
- `code:locate` finds the file corresponding to a class, service, template, etc.
- `code:class` outputs the class of a service.
- `code:edit` edits the file corresponding to a class, service, template, etc.
- `code:view` displays the file corresponding to a class, service, template, etc.

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

[](#installation)

Add the following code to your `composer.json` file:

```
"require": {
    ..
    "liip/code-bundle": "dev-master"
},

```

And then run the Composer update command:

```
$ php composer.phar update liip/code-bundle

```

Then register the bundle in the `AppKernel.php` file:

```
public function registerBundles()
{
    $bundles = array(
        ...
        new Liip\CodeBundle\LiipCodeBundle(),
        ...
    );

    return $bundles;
}

```

Configure the `code:edit` and `code:view` console command to work with your favorite editor:

```
liip_code:
    edit_command: "vim -f"
    view_command: "vim -f"
```

In this example, the `app/console code:edit some_resource_name` command will indeed lookup the resource and execute `vim -f /path/to/the/corresponding/file`.

Type `app/console` and check that new console commands are available of the form `code:*`

This bundle currently defines no routes, nor does it require configuration.

Usage
=====

[](#usage)

Common options
--------------

[](#common-options)

The option `--type=(class|service|template)` can be used in case of ambiguous lookup:

```
# templating engine service name is ambiguous, the following triggers an AmbiguousLookupException
app/console code:locate templating

# add type option to resolve ambiguity
app/console code:locate templating --type=service

```

code:path
---------

[](#codepath)

Returns the "symfony path" of something based on its "name".

Symfony path for a template:

```
app/console code:path AcmeDemoBundle:Demo:hello.html.twig
=> @AcmeDemoBundle/Resources/views/Demo/hello.html.twig

```

Note that, in the case of a template, it does not need to exist:

```
app/console code:path AcmeDemoBundle:Dummy:dummy.html.twig
=> @AcmeDemoBundle/Resources/views/Dummy/dummy.html.twig

```

... useful when you need to create a template and don't remember where to put it.

For resources other than templates, `code:path` is synonymous to code:locate.

code:locate
-----------

[](#codelocate)

Returns the "absolute filepath" of something.

### Locate by name:

[](#locate-by-name)

Locate a twig template by name:

```
app/console code:locate AcmeDemoBundle:Demo:hello.html.twig
=> /path/to/symfony2-root/src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig

```

Locate a class by name:

```
app/console code:locate "Acme\DemoBundle\ControllerListener"
=> /path/to/symfony2-root/src/Acme/DemoBundle/ControllerListener.php

```

Note that the class name must be wrapped in quotes. Currently only classes managed by the Symfony2 autoloader will be picked.

Locate a service by id:

```
app/console code:locate acme.demo.listener
=> /path/to/symfony2-root/src/Acme/DemoBundle/ControllerListener.php

```

You may also want to have a look at the `container:debug` console command, which allows you to inspect services in a deeper manner.

### Locate by "symfony path"

[](#locate-by-symfony-path)

Locate a bundle:

```
app/console code:locate @AcmeDemoBundle
=> /path/to/symfony2-root/src/Acme/DemoBundle

```

Locate a directory:

```
app/console code:locate @AcmeDemoBundle/Resources/views
=> /path/to/symfony2-root/src/Acme/DemoBundle/Resources/views

```

Locate a file:

```
app/console code:locate @AcmeDemoBundle/Resources/views/Demo/hello.html.twig
=> /path/to/symfony2-root/src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig

```

code:class
----------

[](#codeclass)

Obtain the class of a service:

```
app/console code:class acme.demo.listener
=> Acme\DemoBundle\ControllerListener

```

code:edit
---------

[](#codeedit)

Locates and edits the file corresponding to a class, template, etc. Don't forget to configure CodeBundle to work with your favorite editor (see installation instructions).

Edit a twig template:

```
app/console code:edit AcmeDemoBundle:Demo:hello.html.twig
=> locates and opens the template source file in editor

```

See code:locate instructions above for more infos.

code:view
---------

[](#codeview)

Locates and displays the file corresponding to a class, template, etc. Works exactly the same as the `code:edit` console command, still handy if you want to make sure you don't mess around while browsing code.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.3% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4722d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20873?v=4)[Luke Smith](/maintainers/lsmith)[@lsmith](https://github.com/lsmith)

---

Top Contributors

[![benoitpointet](https://avatars.githubusercontent.com/u/104787?v=4)](https://github.com/benoitpointet "benoitpointet (36 commits)")[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (9 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (1 commits)")

---

Tags

bundlephpsymfonysymfony-bundledebugdevelopment

### Embed Badge

![Health badge](/badges/liip-code-bundle/health.svg)

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

###  Alternatives

[spatie/laravel-web-tinker

Artisan Tinker in your browser

1.2k3.8M6](/packages/spatie-laravel-web-tinker)[kktsvetkov/krumo

Krumo is a debugging tool, which displays structured information about any PHP variable. It is a nice replacement for print\_r() or var\_dump() which are used by a lot of PHP developers.

8260.7k](/packages/kktsvetkov-krumo)[adrianbj/tracy-debugger

The ultimate debugging and development tool for ProcessWire.

925.2k](/packages/adrianbj-tracy-debugger)[kendrick/symfony-debug-toolbar-git

Git information into Symfony Debug Toolbar

3060.2k1](/packages/kendrick-symfony-debug-toolbar-git)[symfony/ai-mate

AI development assistant MCP server for Symfony projects

1624.9k11](/packages/symfony-ai-mate)

PHPackages © 2026

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