Skip to content

Commit

Permalink
Merge pull request #82 from NaokiTsuchiya/drop-php74
Browse files Browse the repository at this point in the history
Drop php74 and bump some dependencies
  • Loading branch information
koriym authored Apr 17, 2023
2 parents 836b91e + 403140b commit 12f0a4f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
}
],
"require": {
"php": "^7.4 || ^8.0"
"php": "^8.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"bamarni/composer-bin-plugin": "^1.8",
"composer/composer": "^2.0",
"phpunit/phpunit": "^9.5"
},
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<arg name="cache" value=".phpcs-cache"/>

<!-- PHP Compatibility -->
<config name="php_version" value="70400"/>
<config name="php_version" value="80000"/>

<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>
Expand Down
10 changes: 5 additions & 5 deletions src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use SplFileInfo;

use function copy;
use function date;
use function dirname;
Expand All @@ -24,6 +25,7 @@
use function passthru;
use function preg_match;
use function preg_replace;
use function rename;
use function shell_exec;
use function sprintf;
use function str_replace;
Expand Down Expand Up @@ -103,7 +105,7 @@ public static function postInstall(Event $event): void
$io->write('<info>Happy quality coding!</info>');
}

private static function ask(IOInterface $io, string $question, string $default, ?callable $validation = null): string
private static function ask(IOInterface $io, string $question, string $default, callable|null $validation = null): string
{
$ask = sprintf("\n<question>%s</question>\n(<comment>%s</comment>): ", $question, $default);
$answer = is_callable($validation) ? (string) $io->askAndValidate($ask, $validation, null, $default) : (string) $io->ask($ask, $default);
Expand All @@ -120,9 +122,7 @@ private static function recursiveJob(string $path, callable $job): void
}
}

/**
* @return array<string, string|array<string, string>>
*/
/** @return array<string, string|array<string, string>> */
private static function getDefinition(string $vendor, string $package, string $packageName, JsonFile $json): array
{
$composerDefinition = $json->read();
Expand All @@ -134,7 +134,7 @@ private static function getDefinition(string $vendor, string $package, string $p
$composerDefinition['scripts']['post-create-project-cmd'],
$composerDefinition['keywords'],
$composerDefinition['homepage'],
$composerDefinition['require-dev']['composer/composer']
$composerDefinition['require-dev']['composer/composer'],
);
$composerDefinition['name'] = $packageName;
$composerDefinition['authors'] = [
Expand Down
14 changes: 7 additions & 7 deletions vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"require-dev": {
"doctrine/coding-standard": "^9.0",
"phpmd/phpmd": "^2.9",
"phpmetrics/phpmetrics": "^2.7",
"phpstan/phpstan": "^1.1",
"psalm/plugin-phpunit": "^0.13",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.2"
"doctrine/coding-standard": "^11.0",
"phpmd/phpmd": "^2.13",
"phpmetrics/phpmetrics": "^2.8",
"phpstan/phpstan": "^1.9",
"psalm/plugin-phpunit": "^0.18.4",
"squizlabs/php_codesniffer": "^3.7",
"vimeo/psalm": "^5.4"
},
"config": {
"allow-plugins": {
Expand Down

0 comments on commit 12f0a4f

Please sign in to comment.