2017 © Pedro Peláez
 

symfony-bundle vendor-locator-bundle

This bundle allows to locate vendor packages inside a Symfony project.

image

hylianshield/vendor-locator-bundle

This bundle allows to locate vendor packages inside a Symfony project.

  • Sunday, January 29, 2017
  • by johmanx10
  • Repository
  • 3 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Introduction

This bundle allows to locate composer vendor packages inside a Symfony project. It interprets the composer.json in your project root to find the correct vendor base directory., (*1)

The vendor location is configured with a compiler pass, so the path lookup is stored in DI definition cache., (*2)

Installation

composer require hylianshield/vendor-locator-bundle:^1.0

Add the following bundle to the app kernel., (*3)

<?php
use HylianShield\VendorLocatorBundle\HylianShieldVendorLocatorBundle;

//...
class AppKernel extends Kernel
{
    // ...
    public function registerBundles()
    {
        $bundles = [
            // ...
            new HylianShieldVendorLocatorBundle()
        ];
        // ...
    }
    // ...
}

Make sure to flush the cache, to activate the compiler pass., (*4)

Usage

The file locator service is available as service hylianshield.file_locator.vendor., (*5)

With this service, one can find files relative to the vendor directory:, (*6)

<?php
/** @var \Symfony\Component\Config\FileLocatorInterface $locator */
$locator = $this->get('hylianshield.file_locator.vendor');

echo $locator->locate('hylianshield/vendor-locator-bundle');

Outputs:, (*7)

/path/to/symfony/vendor/hylianshield/vendor-locator-bundle

The Versions

29/01 2017

dev-master

9999999-dev

This bundle allows to locate vendor packages inside a Symfony project.

  Sources   Download

Apache-2.0

The Requires

 

29/01 2017

1.0.1

1.0.1.0

This bundle allows to locate vendor packages inside a Symfony project.

  Sources   Download

Apache-2.0

The Requires

 

29/01 2017

1.0.0

1.0.0.0

This bundle allows to locate vendor packages inside a Symfony project.

  Sources   Download

Apache-2.0

The Requires