Skip to content

Commit

Permalink
Adding newer packages versions for PHP 8+ (#31)
Browse files Browse the repository at this point in the history
Updating Dependencies for PHP 8+
  • Loading branch information
JimTools committed Mar 9, 2024
1 parent 8e5546b commit 79ff0d6
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 26 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"php": ">=7.1.3",
"ext-json": "*",
"ext-dom": "*",
"nikic/php-parser": "^4.0",
"phpunit/php-text-template": "^1.2.1|^2.0",
"nikic/php-parser": "^4.0|^5.0",
"phpunit/php-text-template": "^1.2.1|^2.0|^3.0",
"psr/log": "^1.0|^2.0|^3.0",
"symfony/finder": "^4.1|^5.0",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/console": "^3.4|^4.0|^5.0",
"symfony/yaml": "^3.4|^4.0|^5.0"
"symfony/finder": "^4.1|^5.0|^6.0",
"symfony/config": "^3.4|^4.0|^5.0|^6.0",
"symfony/console": "^3.4|^4.0|^5.0|^6.0",
"symfony/yaml": "^3.4|^4.0|^5.0|^6.0"
},
"require-dev": {
"escapestudios/symfony2-coding-standard": "^3.9",
Expand Down
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="false"
phpVersion="8.3"
>
<projectFiles>
<directory name="src/" />
Expand Down
16 changes: 2 additions & 14 deletions src/analyzer/Cli/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,17 @@ class Application extends AbstractApplication
public function __construct()
{
parent::__construct('cli', '');
parent::setDefaultCommand('analyze');
}

protected function getCommandName(InputInterface $input)
{
return 'analyze';
}

protected function getDefaultCommands()
protected function getDefaultCommands(): array
{
$defaultCommands = AbstractApplication::getDefaultCommands();
$defaultCommands[] = new AnalyzeCommand();

return $defaultCommands;
}

public function getDefinition()
{
$inputDefinition = AbstractApplication::getDefinition();
$inputDefinition->setArguments();

return $inputDefinition;
}

public function doRun(InputInterface $input, OutputInterface $output): int
{
$output->writeln('Tombstone Analyzer');
Expand Down
8 changes: 8 additions & 0 deletions src/analyzer/Config/YamlConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
use Scheb\Tombstone\Core\PathNormalizer;
use Symfony\Component\Yaml\Yaml;

/**
* @psalm-type SourceConfig array{root_directory: string}
* @psalm-type LogConfig array{directory: string, custom: array{file: string}}
* @psalm-type ReportConfig array{php: string, checkstyle: string, html: string}
*/
class YamlConfigProvider implements ConfigProviderInterface
{
/**
Expand All @@ -30,6 +35,9 @@ public function __construct(string $configFile)

public function readConfiguration(): array
{
/**
* @var array{source_code: SourceConfig, logs: LogConfig, report: ReportConfig} $config
*/
$config = Yaml::parseFile($this->configFile);

if (isset($config['source_code']['root_directory'])) {
Expand Down
12 changes: 6 additions & 6 deletions src/analyzer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"require": {
"php": ">=7.1.3",
"ext-dom": "*",
"nikic/php-parser": "^4.0",
"phpunit/php-text-template": "^1.2.1|^2.0",
"nikic/php-parser": "^4.0|^5.0",
"phpunit/php-text-template": "^1.2.1|^2.0|^3.0",
"scheb/tombstone-core": "self.version",
"symfony/finder": "^4.1|^5.0",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/console": "^3.4|^4.0|^5.0",
"symfony/yaml": "^3.4|^4.0|^5.0"
"symfony/finder": "^4.1|^5.0|^6.0",
"symfony/config": "^3.4|^4.0|^5.0|^6.0",
"symfony/console": "^3.4|^4.0|^5.0|^6.0",
"symfony/yaml": "^3.4|^4.0|^5.0|^6.0"
},
"bin": [
"tombstone-analyzer"
Expand Down

0 comments on commit 79ff0d6

Please sign in to comment.