Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/architectural-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: PHPArkitect
uses: docker://phparkitect/arkitect-github-actions:latest
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-versions: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
coverage-driver: [ 'pcov' ]

steps:
Expand All @@ -32,7 +32,7 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
Expand All @@ -52,7 +52,7 @@ jobs:
run: ./bin/phpunit -d memory_limit=-1 --coverage-clover clover.xml

- name: Upload coverage to Codecov
if: ${{ matrix.php-versions == '7.1' }}
if: ${{ matrix.php-versions == '7.2' }}
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
php-version: 7.2
tools: composer:v2.2
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
Expand All @@ -84,7 +84,7 @@ jobs:
run: mv ./phparkitect.phar phparkitect-${{ github.sha }}.phar

- name: "Upload phar file artifact"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: phar-artifact
path: ./phparkitect-${{ github.sha }}.phar
Expand All @@ -95,7 +95,7 @@ jobs:
runs-on: "ubuntu-20.04"
strategy:
matrix:
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
php-versions: [ '7.2', '7.3', '7.4', '8.0', '8.1' ]
coverage-driver: [ 'pcov' ]

steps:
Expand All @@ -107,7 +107,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}

- name: "Download phar ./phparkitect-${{ github.sha }}.phar"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
# will download phar in project root
name: phar-artifact
Expand All @@ -121,7 +121,7 @@ jobs:
if: github.event_name == 'release'
steps:
- name: "Download phar ./phparkitect-${{ github.sha }}.phar"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
# will download phar in project root
name: phar-artifact
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=7.1
ARG PHP_VERSION=7.2

FROM php:${PHP_VERSION}-cli-alpine AS php_build

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ You can add parameters when you launch the tool. At the moment you can add these
phparkitect check --config=/project/yourConfigFile.php
```
* `--target-php-version`: With this parameter, you can specify which PHP version should use the parser. This can be useful to debug problems and to understand if there are problems with a different PHP version.
Supported PHP versions are: 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2
Supported PHP versions are: 7.2, 7.3, 7.4, 8.0, 8.1, 8.2
* `--stop-on-failure`: With this option the process will end immediately after the first violation.

## Run only a specific rule
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Enforce architectural constraints in your PHP applications",
"type": "library",
"license": "MIT",
"version": "0.3.33",
"version": "0.4.0",
"authors": [
{
"name": "Pietro Campagnano",
Expand All @@ -23,7 +23,7 @@
}
],
"require": {
"php": "^7.1|^8",
"php": "^7.2|^8",
"symfony/finder": "^3.0|^4.0|^5.0|^6.0|^7.0",
"symfony/event-dispatcher": "^3.0|^4.0|^5.0|^6.0|^7.0",
"symfony/console": "^3.0|^4.0|^5.0|^6.0|^7.0",
Expand All @@ -38,10 +38,10 @@
"roave/security-advisories": "dev-master",
"symfony/var-dumper": "^3.0|^4.0|^5.0|^6.0|^7.0",
"vimeo/psalm": "^4.6",
"friendsofphp/php-cs-fixer": "^3.0",
"phpunit/phpunit": "^7.5|^9.0|^10.0",
"mikey179/vfsstream": "^1.6",
"phpspec/prophecy": "^1.10"
"phpspec/prophecy": "^1.10",
"friendsofphp/php-cs-fixer": "3.4.0"
},
"autoload": {
"psr-4": {
Expand All @@ -59,4 +59,4 @@
"bin": [
"bin-stub/phparkitect"
]
}
}
Binary file modified composer.phar
Binary file not shown.
1 change: 0 additions & 1 deletion src/CLI/TargetPhpVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
class TargetPhpVersion
{
public const VALID_PHP_VERSIONS = [
'7.1',
'7.2',
'7.3',
'7.4',
Expand Down
35 changes: 18 additions & 17 deletions tests/Unit/Analyzer/FileVisitorTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace Arkitect\Tests\Unit\Analyzer;
Expand Down Expand Up @@ -39,7 +40,7 @@ class Cat implements AnInterface
EOF;

/** @var FileParser $fp */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -84,7 +85,7 @@ class Cat implements AnInterface
EOF;

/** @var FileParser $fp */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -120,7 +121,7 @@ class Cat extends Animal
EOF;

/** @var FileParser $fp */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');

$cd = $fp->getClassDescriptions()[1];
Expand Down Expand Up @@ -149,7 +150,7 @@ public function methodWithAnonymous(): void
EOF;

/** @var FileParser $fp */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');

$cd = $fp->getClassDescriptions()[1];
Expand Down Expand Up @@ -177,7 +178,7 @@ public function __construct(Request $request)
EOF;

/** @var FileParser $fp */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -212,7 +213,7 @@ public function __construct(Request $request, ?Nullable $nullable)
EOF;

/** @var FileParser $fp */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -847,7 +848,7 @@ public function getRequest(): Request //the violations is reported here
EOF;

/** @var FileParser $fp */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -935,7 +936,7 @@ class MyClass
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -965,7 +966,7 @@ class MyClass
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -995,7 +996,7 @@ class MyClass
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -1027,7 +1028,7 @@ public function __construct(array $dtoList)
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -1059,7 +1060,7 @@ public function __construct(array $dtoList)
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -1091,7 +1092,7 @@ public function __construct(array $dtoList)
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -1126,7 +1127,7 @@ public function __construct(string $var1, array $dtoList, $var2, array $voList)
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -1159,7 +1160,7 @@ public function getList(): array
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -1192,7 +1193,7 @@ public function getList(): array
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down Expand Up @@ -1225,7 +1226,7 @@ public function getList(): array
EOF;

/** @noinspection PhpUnhandledExceptionInspection */
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.1'));
$fp = FileParserFactory::createFileParser(TargetPhpVersion::create('7.2'));
$fp->parse($code, 'relativePathName');
$cd = $fp->getClassDescriptions();

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/CLI/VersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class VersionTest extends TestCase
{
public function test_it_should_return_version(): void
{
$this->assertEquals('0.3.33', Version::get());
$this->assertEquals('0.4.0', Version::get());
}
}