Merge branch '2.2' into main
commit
ae68ada127
|
@ -33,7 +33,6 @@ return $config->setRules([
|
|||
'no_blank_lines_after_phpdoc' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_extra_blank_lines' => true,
|
||||
'no_leading_import_slash' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_trailing_comma_in_singleline_array' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
|
@ -57,7 +56,6 @@ return $config->setRules([
|
|||
'no_unused_imports' => true,
|
||||
'fully_qualified_strict_types' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'fully_qualified_strict_types' => true,
|
||||
//'global_namespace_import' => ['import_classes' => true],
|
||||
'no_leading_import_slash' => true,
|
||||
'single_import_per_statement' => true,
|
||||
|
|
|
@ -111,10 +111,10 @@ interface InstallerInterface
|
|||
public function cleanup($type, PackageInterface $package, PackageInterface $prevPackage = null);
|
||||
|
||||
/**
|
||||
* Returns the installation path of a package
|
||||
* Returns the absolute installation path of a package.
|
||||
*
|
||||
* @param PackageInterface $package
|
||||
* @return string path to install to, which MUST not end with a slash
|
||||
* @return string absolute path to install to, which MUST not end with a slash
|
||||
*/
|
||||
public function getInstallPath(PackageInterface $package);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
namespace Composer\Test;
|
||||
|
||||
use Composer\Config;
|
||||
use Composer\Util\Platform;
|
||||
|
||||
class ConfigTest extends TestCase
|
||||
{
|
||||
|
@ -325,22 +326,24 @@ class ConfigTest extends TestCase
|
|||
|
||||
public function testProcessTimeout()
|
||||
{
|
||||
putenv('COMPOSER_PROCESS_TIMEOUT=0');
|
||||
Platform::putEnv('COMPOSER_PROCESS_TIMEOUT', '0');
|
||||
$config = new Config(true);
|
||||
$this->assertEquals(0, $config->get('process-timeout'));
|
||||
putenv('COMPOSER_PROCESS_TIMEOUT');
|
||||
Platform::clearEnv('COMPOSER_PROCESS_TIMEOUT');
|
||||
}
|
||||
|
||||
public function testHtaccessProtect()
|
||||
{
|
||||
putenv('COMPOSER_HTACCESS_PROTECT=0');
|
||||
Platform::putEnv('COMPOSER_HTACCESS_PROTECT', '0');
|
||||
$config = new Config(true);
|
||||
$this->assertEquals(0, $config->get('htaccess-protect'));
|
||||
putenv('COMPOSER_HTACCESS_PROTECT');
|
||||
Platform::clearEnv('COMPOSER_HTACCESS_PROTECT');
|
||||
}
|
||||
|
||||
public function testGetSourceOfValue()
|
||||
{
|
||||
Platform::clearEnv('COMPOSER_PROCESS_TIMEOUT');
|
||||
|
||||
$config = new Config;
|
||||
|
||||
$this->assertSame(Config::SOURCE_DEFAULT, $config->getSourceOfValue('process-timeout'));
|
||||
|
@ -355,9 +358,9 @@ class ConfigTest extends TestCase
|
|||
|
||||
public function testGetSourceOfValueEnvVariables()
|
||||
{
|
||||
putenv('COMPOSER_HTACCESS_PROTECT=0');
|
||||
Platform::putEnv('COMPOSER_HTACCESS_PROTECT', '0');
|
||||
$config = new Config;
|
||||
$this->assertEquals('COMPOSER_HTACCESS_PROTECT', $config->getSourceOfValue('htaccess-protect'));
|
||||
putenv('COMPOSER_HTACCESS_PROTECT');
|
||||
Platform::clearEnv('COMPOSER_HTACCESS_PROTECT');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue