Skip to content

Commit

Permalink
Update PHP version requirement to 8.1 and update dependencies
Browse files Browse the repository at this point in the history
- Update PHP version requirement to 8.1 in composer.json
- Update endroid/qr-code dependency to version 5.0.0
- Update symfony/console dependency to version 7.1.0
- Update pestphp/pest dependency to version 2.0
  • Loading branch information
parsilver committed Jul 1, 2024
1 parent 27ddfa3 commit 1dd6991
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
php: [8.3, 8.2, 8.1]
stability: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.php_cs
.php_cs.cache
.phpunit.result.cache
.phpunit.cache
build
composer.lock
coverage
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
],
"require": {
"php": "^8.1",
"ext-json": "*",
"endroid/qr-code": "^4.8",
"symfony/console": "^6.2.10"
"endroid/qr-code": "^5.0.0",
"symfony/console": "^7.1.0"
},
"require-dev": {
"pestphp/pest": "^1.20",
"pestphp/pest": "^2.0",
"laravel/pint": "^1.2",
"spatie/ray": "^1.28",
"farzai/transport": "^1.3",
Expand Down
58 changes: 21 additions & 37 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
<testsuite name="Farzai Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Farzai Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
5 changes: 2 additions & 3 deletions src/Commands/CreateQrCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

class CreateQrCode extends Command
{
protected static $defaultName = 'create-qr-code';

protected function configure()
{
$this
->setName('create-qr-code')
->setDescription('Create QR Code PromptPay for receive')
->addArgument('target', InputArgument::OPTIONAL, 'Target (phone number, citizen id, e-wallet id)')
->addArgument('amount', InputArgument::OPTIONAL, 'Amount to receive');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$target = $input->getArgument('target');
$amount = $input->getArgument('amount') ?? null;
Expand Down

0 comments on commit 1dd6991

Please sign in to comment.