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
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
fail-fast: false
matrix:
php-version: [
'8.1',
'8.2',
'8.3',
]
Expand All @@ -26,7 +25,7 @@ jobs:
uses: shivammathur/setup-php@2.27.0
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, pdo_mysql
extensions: mbstring, intl, pdo_mysql, xdebug

- name: Validate composer.json and composer.lock
run: composer validate
Expand All @@ -37,7 +36,7 @@ jobs:
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Composer cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -61,7 +60,6 @@ jobs:
fail-fast: false
matrix:
php-version: [
'8.1',
'8.2',
'8.3',
]
Expand Down Expand Up @@ -91,8 +89,7 @@ jobs:
run: composer install --prefer-dist --no-interaction --optimize-autoloader

- name: Run tests
run: |
composer test
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --only-summary-for-coverage-text tests

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://github.com/spryker-sdk/utils/workflows/CI/badge.svg?branch=master)](https://github.com/spryker-sdk/utils/actions?query=workflow%3ACI+branch%3Amaster)
[![codecov](https://codecov.io/gh/spryker-sdk/utils/branch/master/graph/badge.svg?token=AVljwSGALQ)](https://codecov.io/gh/spryker-sdk/utils)
[![Latest Stable Version](https://poser.pugx.org/spryker-sdk/utils/v/stable.svg)](https://packagist.org/packages/spryker-sdk/utils)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.2-8892BF.svg)](https://php.net/)
[![PHPStan](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat)](https://phpstan.org/)

## Installation
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"license": "proprietary",
"require": {
"php": ">=8.1",
"php": ">=8.2",
"ext-mbstring": "*",
"composer/semver": "^3.4",
"symfony/filesystem": "^6.0.0",
Expand All @@ -15,7 +15,7 @@
"require-dev": {
"ext-zip": "*",
"phpstan/phpstan": "^1.0.0",
"phpunit/phpunit": "^9.5.0",
"phpunit/phpunit": "^11.4.0",
"spryker/code-sniffer": "^0.17.20"
},
"autoload": {
Expand Down
23 changes: 19 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
cacheDirectory=".phpunit.result.cache"
executionOrder="depends,defects"
shortenArraysForExportThreshold="10"
beStrictAboutOutputDuringTests="true"
displayDetailsOnPhpunitDeprecations="true"
failOnRisky="true"
failOnWarning="true">
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="KERNEL_CLASS" value="CoreTest\App\Kernel\TestKernel" />
</php>
<coverage>

<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>

<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
<include>
<directory suffix=".php">src/</directory>
<directory>src</directory>
</include>
</coverage>
</source>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testGetMajorVersion($value, ?int $expectedResult): void
/**
* @return array
*/
public function getMajorVersionProvider(): array
public static function getMajorVersionProvider(): array
{
$validSemanticVersions = [
['1.0.0', 1],
Expand Down
4 changes: 2 additions & 2 deletions tests/Utils/Infrastructure/Helper/StrHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StrHelperTest extends TestCase
/**
* @return array
*/
public function camelCaseToDashDataProvider(): array
public static function camelCaseToDashDataProvider(): array
{
return [
['test-foo-bar', 'testFooBar', true],
Expand Down Expand Up @@ -48,7 +48,7 @@ public function testCamelCaseToDash(string $expResult, string $value, bool $sepa
/**
* @return array
*/
public function dashToCamelCaseDataProvider(): array
public static function dashToCamelCaseDataProvider(): array
{
return [
['TestFooBar', 'test-foo-bar', true],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function testRunReturnsProcessObject(array $command): void
/**
* @return array<int, array>
*/
public function commandDataProvider(): array
public static function commandDataProvider(): array
{
return [
[['ls']],
Expand Down
Loading