Skip to content

Commit e638dc3

Browse files
authored
Bump dependencies (#74)
* chore: dev tools and dependencies updated * fix: phpstan errors in src * chore: updated readme * fix: php version for composer * chore: sonar action switched to sonarqube * chore: added missing test * fix: removed useless code
1 parent fc06eda commit e638dc3

31 files changed

+170
-175
lines changed

.github/workflows/sonar.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414

1515
services:
1616
mysql:
17-
image: mysql:latest
17+
image: mysql:9
1818
env:
1919
MYSQL_ROOT_PASSWORD: password
2020
ports:
2121
- 3306:3306
2222
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10
2323
postgres:
24-
image: postgres:12
24+
image: postgres:17
2525
env:
2626
POSTGRES_USER: postgres
2727
POSTGRES_PASSWORD: password
@@ -57,7 +57,7 @@ jobs:
5757
- name: Install PHP
5858
uses: shivammathur/setup-php@v2
5959
with:
60-
php-version: 8.1
60+
php-version: 8.3
6161
tools: composer:v2
6262
coverage: xdebug
6363
extensions: redis
@@ -78,7 +78,7 @@ jobs:
7878
# run: sed -i 's/\/home\/runner\/work\/framework\/framework\//\/github\/workspace\//g' coverage-report.clover
7979

8080
- name: SonarCloud Scan
81-
uses: SonarSource/sonarcloud-github-action@master
81+
uses: SonarSource/sonarqube-scan-action@master
8282
env:
8383
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8484
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010

1111
services:
1212
mysql:
13-
image: mysql:latest
13+
image: mysql:9
1414
env:
1515
MYSQL_ROOT_PASSWORD: password
1616
ports:
1717
- 3306:3306
1818
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10
1919
postgres:
20-
image: postgres:12
20+
image: postgres:17
2121
env:
2222
POSTGRES_USER: postgres
2323
POSTGRES_PASSWORD: password
@@ -44,8 +44,7 @@ jobs:
4444
strategy:
4545
fail-fast: true
4646
matrix:
47-
#php: [8.0, 8.1]
48-
php: [8.1, 8.2, 8.3]
47+
php: [8.3, 8.4]
4948
mapper: [mysql, pgsql]
5049

5150
name: Unit tests PHP ${{ matrix.php }} and ${{ matrix.mapper }}
@@ -91,7 +90,7 @@ jobs:
9190
strategy:
9291
fail-fast: true
9392
matrix:
94-
php: [8.1, 8.2, 8.3]
93+
php: [8.3, 8.4]
9594

9695
name: Code analysis with PHPStan PHP ${{ matrix.php }}
9796

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ At moment, code, isn't utilized in production environment, Hope in future.
4141

4242
# Require
4343

44-
- PHP >= 8.1
44+
- PHP >= 8.3
4545
- PDO extension (optional)
4646
- Memcached extension (optional)
4747
- Mongodb extension (optional)
@@ -77,7 +77,7 @@ Please see [CONTRIBUTING.md](https://github.com/linna/framework/blob/master/CONT
7777

7878
### High Priority
7979
- [ ] [IN PROGRESS] Reduce the technical debt
80-
- [ ] [IN PROGRESS] Complete the PHP 8.1 porting
80+
- [ ] [IN PROGRESS] Complete the PHP 8.3 porting
8181
- [X] Complete the updating and the review of the code comments
8282
- [ ] [IN PROGRESS] Create documentation for the site, api and articles about how to do things
8383
- [X] Unify database session handlers

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"psr/simple-cache": "^3.0"
2424
},
2525
"require-dev": {
26-
"infection/infection": ">=0.26",
27-
"phpstan/phpstan": "^1.9",
28-
"phpunit/phpunit": "^10",
26+
"infection/infection": "^0.30",
27+
"phpstan/phpstan": "^2.1",
28+
"phpunit/phpunit": "^12",
2929
"linna/auth-mapper-mysql": "dev-master",
3030
"linna/db-dumps": "dev-master",
31-
"mongodb/mongodb": "^1.5",
32-
"brianium/paratest": "^7.0"
31+
"mongodb/mongodb": "^2.1",
32+
"brianium/paratest": "^7"
3333
},
3434
"autoload": {
3535
"psr-4": {

composer.mysql.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"psr/simple-cache": "^3.0"
2424
},
2525
"require-dev": {
26-
"infection/infection": ">=0.26",
27-
"phpstan/phpstan": "^1.9",
28-
"phpunit/phpunit": "^10",
26+
"infection/infection": "^0.30",
27+
"phpstan/phpstan": "^2.1",
28+
"phpunit/phpunit": "^12",
2929
"linna/auth-mapper-mysql": "dev-master",
3030
"linna/db-dumps": "dev-master",
31-
"mongodb/mongodb": "^1.5",
32-
"brianium/paratest": "^7.0"
31+
"mongodb/mongodb": "^2.1",
32+
"brianium/paratest": "^7"
3333
},
3434
"autoload": {
3535
"psr-4": {

composer.pgsql.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"psr/simple-cache": "^3.0"
2424
},
2525
"require-dev": {
26-
"infection/infection": ">=0.26",
27-
"phpstan/phpstan": "^1.9",
28-
"phpunit/phpunit": "^10",
26+
"infection/infection": "^0.30",
27+
"phpstan/phpstan": "^2.1",
28+
"phpunit/phpunit": "^12",
2929
"linna/auth-mapper-pgsql": "dev-master",
3030
"linna/db-dumps": "dev-master",
31-
"mongodb/mongodb": "^1.5",
32-
"brianium/paratest": "^7.0"
31+
"mongodb/mongodb": "^2.1",
32+
"brianium/paratest": "^7"
3333
},
3434
"autoload": {
3535
"psr-4": {

phpunit.dist.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<logging/>
1414
<php>
1515
<var name="pdo_mysql_dsn" value="mysql:host=0.0.0.0;dbname=linna_db;charset=utf8mb4"/>
16+
<var name="pdo_mysql_host" value="0.0.0.0"/>
1617
<var name="pdo_mysql_user" value="root"/>
1718
<var name="pdo_mysql_password" value="password"/>
1819
<var name="pdo_pgsql_dsn" value="pgsql:dbname=linna_db;host=0.0.0.0"/>

src/Linna/Authentication/ProtectedControllerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* <p>This trait contains only private mothods.</p>
2424
*/
25-
trait ProtectedControllerTrait
25+
trait ProtectedControllerTrait // @phpstan-ignore trait.unused
2626
{
2727
/** @var bool Contain login status. */
2828
private bool $authentication = false;

src/Linna/Autoloader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public function register(): bool
8888
$callback = '\Linna\Autoloader::loadClass';
8989
$result = false;
9090

91+
/** @phpstan-ignore-next-line */
9192
if (\is_callable($callback)) {
9293
/** @phpstan-ignore-next-line */
9394
$result = $result || \spl_autoload_register($callback);

src/Linna/Cache/RedisCache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function __construct(array $options)
4040
$this->redis = new Redis();
4141
$callback = [$this->redis, 'connect'];
4242

43+
/** @phpstan-ignore-next-line */
4344
if (!isset($options['connect']['host']) || \is_callable($callback) && !\call_user_func_array($callback, $options['connect'])) {
4445
throw new InvalidArgumentException('Unable to connect to Redis server.');
4546
}

0 commit comments

Comments
 (0)