ManagedWorkspace
Provides canonical repository-local paths for generated DevTools artifacts.
Constants
Methods
Returns a repository-local managed cache directory.
Returns a repository-local managed output directory.
Returns the workspace root as a project-relative directory when tooling should skip generated artifacts during source scans.
Returns the configured workspace root.
public
string
COVERAGE
=
'coverage'
Description
the output segment used for coverage artifacts
public
string
ENV_WORKSPACE_DIR
=
'FAST_FORWARD_WORKSPACE_DIR'
Description
the environment variable used to override the generated artifact workspace
public
string
METRICS
=
'metrics'
Description
the output segment used for metrics artifacts
public
string
PHP_CS_FIXER
=
'php-cs-fixer'
Description
the cache segment used for PHP-CS-Fixer
public
string
PHPDOC
=
'phpdoc'
Description
the cache segment used for phpDocumentor
public
string
PHPUNIT
=
'phpunit'
Description
the cache segment used for PHPUnit
public
string
RECTOR
=
'rector'
Description
the cache segment used for Rector
public
string
WORKSPACE_ROOT
=
'.dev-tools'
Description
the repository-local root directory for generated artifacts
private
string
CACHE_ROOT
=
'cache'
Description
the repository-local root directory for generated tool caches
Returns a repository-local managed cache directory.
public
static
getCacheDirectory([
string
$path = ''][,
string
$baseDir = '']) : string
Description
The optional $path MUST be a relative cache segment, while $baseDir MAY
resolve the managed workspace root before the cache directory is
appended.
Parameters
$path
:
string
=
''
Description
the optional relative cache segment to append under the managed cache root
$baseDir
:
string
=
''
Description
the optional repository root used to resolve the managed cache path
Return values
Returns a repository-local managed output directory.
public
static
getOutputDirectory([
string
$path = ''][,
string
$baseDir = '']) : string
Description
The optional $path MUST be a relative segment within the managed
workspace, while $baseDir MAY provide the repository root used to
materialize the same .dev-tools structure under a different base path.
Parameters
$path
:
string
=
''
Description
the optional relative segment to append under the managed output root
$baseDir
:
string
=
''
Description
the optional repository root used to resolve the managed workspace path
Return values
Returns the workspace root as a project-relative directory when tooling should skip generated artifacts during source scans.
public
static
getProjectRelativeWorkspaceRoot([
string
$baseDir = '']) : string|null
Parameters
$baseDir
:
string
=
''
Description
the optional repository root used to relativize absolute workspace paths
Return values
Returns the configured workspace root.
public
static
getWorkspaceRoot([
string
$baseDir = '']) : string
Description
Relative workspace paths stay relative when no base directory is provided. When a base directory is provided, relative workspaces are materialized under that base directory while absolute workspaces are used as-is.
Parameters
$baseDir
:
string
=
''
Description
the optional repository root used to resolve a relative workspace