Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szepeviktor/package-path
Get full installation path of any Composer package
https://github.com/szepeviktor/package-path
composer install-path package path
Last synced: 18 days ago
JSON representation
Get full installation path of any Composer package
- Host: GitHub
- URL: https://github.com/szepeviktor/package-path
- Owner: szepeviktor
- Created: 2020-11-07T12:18:38.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-13T09:39:37.000Z (almost 3 years ago)
- Last Synced: 2024-10-09T10:13:31.026Z (28 days ago)
- Topics: composer, install-path, package, path
- Language: PHP
- Homepage: https://packagist.org/packages/szepeviktor/package-path
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Package Path finder
[![Build Status](https://travis-ci.com/szepeviktor/package-path.svg?branch=master)](https://travis-ci.com/github/szepeviktor/package-path)
[![Packagist Version](https://img.shields.io/packagist/v/szepeviktor/package-path)](https://packagist.org/packages/szepeviktor/package-path)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-239922)](https://phpstan.org/)Get full installation path of any Composer package.
### Installation
```bash
composer require szepeviktor/package-path
```### Usage
```php
/** @var string|null $packagePath */
$packagePath = \SzepeViktor\Composer\PackagePath::get('phpstan/phpstan');$vendorPath = \SzepeViktor\Composer\PackagePath::getVendorPath();
// returns "/full/path/to/vendor"
```### Credits
[David Vander Elst](https://github.com/david-vde) https://stackoverflow.com/a/43543482