Skip to content

Commit

Permalink
[TASK] Add PHP 7.2 compatability
Browse files Browse the repository at this point in the history
The lint task not ignores files in
"Resources/Private/CodeTemplates/"
  • Loading branch information
ochorocho committed Apr 29, 2022
1 parent 1a70405 commit ce30c46
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Build/testing-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ services:
set -x
fi
php -v | grep '^PHP';
find . -name \\*.php ! -path "./.Build/\\*" -print0 | xargs -0 -n1 -P4 php -dxdebug.mode=off -l >/dev/null
find . -name \\*.php ! -path "./.Build/\\*" ! -path "./Resources/Private/CodeTemplates/\\*" -print0 | xargs -0 -n1 -P4 php -dxdebug.mode=off -l >/dev/null
"
phpstan:
Expand Down
19 changes: 15 additions & 4 deletions Classes/Command/AcceptanceTestsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,20 @@
*/
class AcceptanceTestsCommand extends AbstractCommand
{
protected Filesystem $filesystem;
protected SymfonyStyle $io;
protected PackageInterface $package;
/**
* @var Filesystem $filesystem
*/
protected $filesystem;

/**
* @var SymfonyStyle $io
*/
protected $io;

/**
* @var PackageInterface $package
*/
protected $package;

protected function configure(): void
{
Expand Down Expand Up @@ -117,7 +128,7 @@ protected function updateComposerFile(string $packagePath): bool
{
$composerFile = $packagePath . '/composer.json';
$composerJson = file_get_contents($composerFile);
$composer = json_decode($composerJson, true, 512, JSON_THROW_ON_ERROR);
$composer = json_decode($composerJson, true);
$namespace = rtrim($this->getNamespace(), '\\');

// @todo: if a value already exists ask for permission to change it?!
Expand Down

0 comments on commit ce30c46

Please sign in to comment.