Methods |
public
static
|
hasDevPackages(): bool
Check if require-dev packages are installed
Check if require-dev packages are installed
|
#
|
public
static
|
name(): string
Get the name of the root package
Get the name of the root package
|
#
|
public
static
|
ref(bool $short = true): ?string
Get the commit reference of the root package, if known
Get the commit reference of the root package, if known
|
#
|
public
static
|
version(bool $pretty = true, ?bool $withRef = null): string
Get the version of the root package
Get the version of the root package
If Composer returns a version like dev-* or v1.x-dev and $withRef
is not false , @<reference> is added. Otherwise, if $withRef is
true and a commit reference is available, -<reference> is added.
Parameters
$pretty |
If true , return the original version number, e.g.
v1.2.3 instead of 1.2.3.0 .
|
|
#
|
public
static
|
path(): string
Get the canonical path of the root package
Get the canonical path of the root package
|
#
|
public
static
|
getPackageRef(string $package, bool $short = true): ?string
Get the commit reference of an installed package, if known
Get the commit reference of an installed package, if known
|
#
|
public
static
|
getPackageVersion(string $package, bool $pretty = true, ?bool $withRef = null): ?string
Get the version of an installed package, or null if it is not installed
Get the version of an installed package, or null if it is not installed
If Composer returns a version like dev-* or v1.x-dev and $withRef
is not false , @<reference> is added. Otherwise, if $withRef is
true and a commit reference is available, -<reference> is added.
Parameters
$pretty |
If true , return the original version number, e.g.
v1.2.3 instead of 1.2.3.0 .
|
|
#
|
public
static
|
getPackagePath(string $package): ?string
Get the canonical path of an installed package, or null if it is not
installed
Get the canonical path of an installed package, or null if it is not
installed
|
#
|
public
static
|
getClassPath(class-string $class): ?string
Use ClassLoader to get the file where a class is defined, or null if it
doesn't exist
Use ClassLoader to get the file where a class is defined, or null if it
doesn't exist
|
#
|
public
static
|
getNamespacePath(string $namespace): ?string
Use ClassLoader to get a directory for a namespace, or null if the
namespace doesn't match a registered PSR-4 prefix
Use ClassLoader to get a directory for a namespace, or null if the
namespace doesn't match a registered PSR-4 prefix
Preference is given to the longest prefix where a directory for the
namespace already exists. If no such prefix exists, preference is given
to the longest prefix.
|
#
|