Download the PHP package liip/code-bundle without Composer

On this page you can find all versions of the php package liip/code-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package code-bundle

UNMAINTAINED

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

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.

Installation

Add the following code to your 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:

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

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

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

Returns the "absolute filepath" of something.

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 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

Obtain the class of a service:

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

code:edit

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

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.


All versions of code-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/framework-bundle Version ~2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package liip/code-bundle contains the following files

Loading the files please wait ....