mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 04:28:44 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -85,7 +85,7 @@ EOT
|
||||
$dotenvPath = $this->projectDirectory;
|
||||
|
||||
if (is_file($composerFile = $this->projectDirectory.'/composer.json')) {
|
||||
$runtimeConfig = (json_decode(file_get_contents($composerFile), true))['extra']['runtime'] ?? [];
|
||||
$runtimeConfig = json_decode(file_get_contents($composerFile), true)['extra']['runtime'] ?? [];
|
||||
|
||||
if (isset($runtimeConfig['dotenv_path'])) {
|
||||
$dotenvPath = $this->projectDirectory.'/'.$runtimeConfig['dotenv_path'];
|
||||
@@ -98,18 +98,18 @@ EOT
|
||||
$envFiles = $this->getEnvFiles($filePath);
|
||||
$availableFiles = array_filter($envFiles, 'is_file');
|
||||
|
||||
if (\in_array(sprintf('%s.local.php', $filePath), $availableFiles, true)) {
|
||||
$io->warning(sprintf('Due to existing dump file (%s.local.php) all other dotenv files are skipped.', $this->getRelativeName($filePath)));
|
||||
if (\in_array(\sprintf('%s.local.php', $filePath), $availableFiles, true)) {
|
||||
$io->warning(\sprintf('Due to existing dump file (%s.local.php) all other dotenv files are skipped.', $this->getRelativeName($filePath)));
|
||||
}
|
||||
|
||||
if (is_file($filePath) && is_file(sprintf('%s.dist', $filePath))) {
|
||||
$io->warning(sprintf('The file %s.dist gets skipped due to the existence of %1$s.', $this->getRelativeName($filePath)));
|
||||
if (is_file($filePath) && is_file(\sprintf('%s.dist', $filePath))) {
|
||||
$io->warning(\sprintf('The file %s.dist gets skipped due to the existence of %1$s.', $this->getRelativeName($filePath)));
|
||||
}
|
||||
|
||||
$io->section('Scanned Files (in descending priority)');
|
||||
$io->listing(array_map(fn (string $envFile) => \in_array($envFile, $availableFiles, true)
|
||||
? sprintf('<fg=green>✓</> %s', $this->getRelativeName($envFile))
|
||||
: sprintf('<fg=red>⨯</> %s', $this->getRelativeName($envFile)), $envFiles));
|
||||
? \sprintf('<fg=green>✓</> %s', $this->getRelativeName($envFile))
|
||||
: \sprintf('<fg=red>⨯</> %s', $this->getRelativeName($envFile)), $envFiles));
|
||||
|
||||
$nameFilter = $input->getArgument('filter');
|
||||
$variables = $this->getVariables($availableFiles, $nameFilter);
|
||||
@@ -124,7 +124,7 @@ EOT
|
||||
|
||||
$io->comment('Note that values might be different between web and CLI.');
|
||||
} else {
|
||||
$io->warning(sprintf('No variables match the given filter "%s".', $nameFilter));
|
||||
$io->warning(\sprintf('No variables match the given filter "%s".', $nameFilter));
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -188,17 +188,17 @@ EOT
|
||||
private function getEnvFiles(string $filePath): array
|
||||
{
|
||||
$files = [
|
||||
sprintf('%s.local.php', $filePath),
|
||||
sprintf('%s.%s.local', $filePath, $this->kernelEnvironment),
|
||||
sprintf('%s.%s', $filePath, $this->kernelEnvironment),
|
||||
\sprintf('%s.local.php', $filePath),
|
||||
\sprintf('%s.%s.local', $filePath, $this->kernelEnvironment),
|
||||
\sprintf('%s.%s', $filePath, $this->kernelEnvironment),
|
||||
];
|
||||
|
||||
if ('test' !== $this->kernelEnvironment) {
|
||||
$files[] = sprintf('%s.local', $filePath);
|
||||
$files[] = \sprintf('%s.local', $filePath);
|
||||
}
|
||||
|
||||
if (!is_file($filePath) && is_file(sprintf('%s.dist', $filePath))) {
|
||||
$files[] = sprintf('%s.dist', $filePath);
|
||||
if (!is_file($filePath) && is_file(\sprintf('%s.dist', $filePath))) {
|
||||
$files[] = \sprintf('%s.dist', $filePath);
|
||||
} else {
|
||||
$files[] = $filePath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user