Skip to content

Commit

Permalink
Updated dependencies (#18)
Browse files Browse the repository at this point in the history
* Updated dependencies
  • Loading branch information
stereomon authored Aug 3, 2023
1 parent 430bcde commit f2e46d0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 73 deletions.
52 changes: 2 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
php-version: [
'7.4',
'8.0',
'8.1'
]
steps:
Expand Down Expand Up @@ -55,14 +55,11 @@ jobs:
- name: Run PHPStan
run: composer stan

- name: Run Rector checks
run: composer rector-diff

- name: Run CodeStyle checks
run: composer cs-check

- name: Codecept tests
if: ${{ matrix.php-version == '7.4' }}
if: ${{ matrix.php-version == '8.0' }}
run: composer test

- name: Codecept tests with coverage
Expand All @@ -74,48 +71,3 @@ jobs:
uses: codecov/codecov-action@v3
with:
file: ./tests/_output/coverage.xml

prefer-lowest:
name: "Prefer lowest checks"
runs-on: "ubuntu-latest"
env:
APPLICATION_ENV: testing
strategy:
fail-fast: false
matrix:
php-version: [
'7.4'
]
steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, pdo_mysql, redis
tools: composer:v2

- name: Composer get cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Composer cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Composer validate
run: composer validate

- name: Composer version
run: composer --version

- name: "Install lowest dependencies"
run: composer update --prefer-lowest

- name: Codecept tests
run: composer test
6 changes: 2 additions & 4 deletions architector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector;
use Rector\Config\RectorConfig;
use Rector\Core\Configuration\Option;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
Expand All @@ -15,8 +14,8 @@
use Rector\EarlyReturn\Rector\If_\ChangeOrIfReturnToEarlyReturnRector;
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryAndToEarlyReturnRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php74\Rector\Property\TypedPropertyRector;
use Rector\Set\ValueObject\SetList;
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;

defined('APPLICATION_ROOT_DIR') || define('APPLICATION_ROOT_DIR', __DIR__);

Expand All @@ -32,8 +31,7 @@
RemoveUselessParamTagRector::class,
RemoveUnusedPromotedPropertyRector::class,
RemoveUselessReturnTagRector::class,
RemoveUselessVarTagRector::class,
ReturnBinaryAndToEarlyReturnRector::class,
SimplifyUselessVariableRector::class,
TypedPropertyRector::class,
]);
};
2 changes: 1 addition & 1 deletion codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ coverage:
suites:
AsyncApi:
path: SprykerSdkTest/SyncApi
class_name: SyncApiTester
actor: SyncApiTester
modules:
enabled:
- \SprykerSdkTest\Helper\SyncApiHelper
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"description": "SDK for SyncAPI.",
"license": "proprietary",
"require": {
"php": ">=7.4",
"php": ">=8.0",
"cebe/php-openapi": "^1.6",
"doctrine/inflector": "^1.4.0 || ^2.0",
"spryker-sdk/spryk": "^0.4.0",
"spryker-sdk/spryk": "^0.4.0 || ^0.5.0",
"symfony/console": "^4.0.0 || ^5.3 || ^6.0",
"symfony/finder": "^4.0.0 || ^5.3 || ^6.0",
"symfony/process": "^4.0.0 || ^5.4"
"symfony/process": "^4.0.0 || ^5.4 || ^6"
},
"require-dev": {
"codeception/codeception": "*",
"codeception/stub": "^4.1.0",
"codeception/module-asserts": "*",
"mikey179/vfsstream": "^1.6",
"sllh/composer-versions-check": "^2.0",
"spryker-sdk/architector": "0.1.x-dev",
"spryker/code-sniffer": "dev-master",
"symfony/filesystem": "^4.0 || ^5.3",
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"config": {
"platform": {
"php": "7.4.15"
"php": "8.0.19"
},
"sort-packages": true,
"allow-plugins": {
Expand Down
2 changes: 1 addition & 1 deletion src/SprykerSdk/SyncApi/Message/SyncApiMessageFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SyncApiMessageFormatter
public static function format(string $message): string
{
if (PHP_SAPI === 'cli' && getenv('TERM') === 'xterm-color' || getenv('TERM') === 'xterm-256color' || strtolower(substr(PHP_OS, 0, 3)) !== 'win') {
$message = "\033[32m" . preg_replace_callback('/"(.+?)"/', function (array $matches) {
return "\033[32m" . preg_replace_callback('/"(.+?)"/', function (array $matches) {
return sprintf("\033[0m\033[33m%s\033[0m\033[32m", $matches[1]);
}, $message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,10 @@ public function getConsoleCommandArguments(): array
$arguments[] = '--name';
$arguments[] = $this->transferName;
}

if ($this->properties !== null) {
$arguments[] = '--propertyName';
$arguments[] = implode(',', $this->properties);
}

if ($this->sprykMode !== null) {
$arguments[] = '--mode';
$arguments[] = $this->sprykMode;
}
$arguments[] = '--propertyName';
$arguments[] = implode(',', $this->properties);
$arguments[] = '--mode';
$arguments[] = $this->sprykMode;

return $arguments;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

use cebe\openapi\spec\Operation;
use cebe\openapi\spec\PathItem;
use Codeception\Stub;
use Codeception\Test\Unit;
use Codeception\Util\Stub;
use SprykerSdk\SyncApi\OpenApi\Builder\ConsoleCommand\Arguments\ArgumentResolver\ModuleNameArgumentResolver;

/**
Expand Down
4 changes: 3 additions & 1 deletion tests/_support/Helper/SyncApiHelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace SprykerSdkTest\Helper;

use Codeception\Module;

trait SyncApiHelperTrait
{
/**
Expand All @@ -25,5 +27,5 @@ protected function getSyncApiHelper(): SyncApiHelper
*
* @return \Codeception\Module
*/
abstract protected function getModule($name);
abstract protected function getModule(string $name): Module;
}

0 comments on commit f2e46d0

Please sign in to comment.