Skip to content

Commit 8a1171d

Browse files
author
roadiz-ci
committed
chore: Bumped
1 parent 857fbb0 commit 8a1171d

44 files changed

Lines changed: 1701 additions & 2297 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/run-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
php-version: ['8.0', '8.1', '8.2', '8.3']
22+
php-version: ['8.1', '8.2', '8.3']
2323
steps:
2424
- uses: shivammathur/setup-php@v2
2525
with:
@@ -35,8 +35,8 @@ jobs:
3535
${{ runner.os }}-php-${{ matrix.php-version }}-
3636
- name: Install Dependencies
3737
run: composer install --no-scripts --no-ansi --no-interaction --no-progress
38-
- name: Run atoum unit tests
39-
run: vendor/bin/atoum -d tests
38+
- name: Run Unit tests
39+
run: vendor/bin/phpunit -v --whitelist ./src tests
4040
- name: Run PHP Code Sniffer
4141
run: vendor/bin/phpcs -p ./src
4242
- name: Run PHPStan

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#
2-
# Roadiz
3-
#
4-
/pimple.json
51

62
# Ignore Google webmaster tool verification
73
/google*.html

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright © 2023 Ambroise Maupate
3+
Copyright © 2024 Ambroise Maupate
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

Makefile

Lines changed: 0 additions & 13 deletions
This file was deleted.

composer.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,34 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=8.0",
21+
"php": ">=8.1",
2222
"ext-json": "*",
2323
"ext-gd": "*",
2424
"ext-dom": "*",
2525
"ext-zip": "*",
2626
"ext-simplexml": "*",
2727
"ext-fileinfo": "*",
28-
"doctrine/orm": "<2.17",
28+
"doctrine/orm": "~2.19.0",
2929
"enshrined/svg-sanitize": "^0.15",
3030
"guzzlehttp/guzzle": "^7.2.0",
3131
"guzzlehttp/psr7": "^2.0",
3232
"intervention/image": "^2.5",
3333
"league/flysystem": "^3.0",
3434
"monolog/monolog": "^1.24.0 || ^2.1.1",
35-
"symfony/asset": "5.4.*",
36-
"symfony/console": "5.4.*",
37-
"symfony/event-dispatcher": "5.4.*",
38-
"symfony/filesystem": "5.4.*",
39-
"symfony/finder": "5.4.*",
40-
"symfony/http-foundation": "5.4.*",
41-
"symfony/options-resolver": "5.4.*",
42-
"symfony/serializer": "5.4.*",
35+
"symfony/asset": "6.4.*",
36+
"symfony/console": "6.4.*",
37+
"symfony/event-dispatcher": "6.4.*",
38+
"symfony/filesystem": "6.4.*",
39+
"symfony/finder": "6.4.*",
40+
"symfony/http-foundation": "6.4.*",
41+
"symfony/options-resolver": "6.4.*",
42+
"symfony/serializer": "6.4.*",
4343
"twig/twig": "^3.1"
4444
},
4545
"require-dev": {
4646
"php-coveralls/php-coveralls": "^2.4",
47-
"atoum/atoum": "^4.0.0",
47+
"phpunit/phpunit": "^9.5",
48+
"api-platform/metadata": "^3.2.12",
4849
"squizlabs/php_codesniffer": "^3.5",
4950
"phpstan/phpstan": "^1.5.3",
5051
"phpstan/phpstan-doctrine": "^1.3"
@@ -54,6 +55,11 @@
5455
"RZ\\Roadiz\\Documents\\": "src/"
5556
}
5657
},
58+
"autoload-dev": {
59+
"psr-4": {
60+
"RZ\\Roadiz\\Documents\\Tests\\": "tests/"
61+
}
62+
},
5763
"config": {
5864
"allow-plugins": {
5965
"composer/package-versions-deprecated": true,
@@ -62,8 +68,8 @@
6268
},
6369
"extra": {
6470
"branch-alias": {
65-
"dev-master": "2.1.x-dev",
66-
"dev-develop": "2.2.x-dev"
71+
"dev-master": "2.3.x-dev",
72+
"dev-develop": "2.4.x-dev"
6773
}
6874
}
6975
}

docker-compose.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

phpstan.neon

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
parameters:
2-
level: max
2+
level: 7
33
paths:
44
- src
55
excludePaths:
66
- */node_modules/*
77
- */bower_components/*
88
- */static/*
99
ignoreErrors:
10+
- identifier: missingType.iterableValue
11+
- identifier: missingType.generics
1012
- '#Call to an undefined method Doctrine\\Persistence\\ObjectRepository#'
1113
- '#Call to an undefined method Doctrine\\Persistence\\ObjectManager#'
1214
- '#Call to an undefined method Doctrine\\ORM\\EntityRepository#'
@@ -17,9 +19,9 @@ parameters:
1719
- '#Doctrine\\ORM\\Mapping\\GeneratedValue constructor expects#'
1820
- '#type mapping mismatch: property can contain Doctrine\\Common\\Collections\\Collection<int, [^\>]+> but database expects Doctrine\\Common\\Collections\\Collection&iterable<[^\>]+>#'
1921
- '#should return Doctrine\\Common\\Collections\\Collection<int, [^\>]+Interface> but returns Doctrine\\Common\\Collections\\Collection<int, [^\>]+>#'
22+
- '#but returns Doctrine\\Common\\Collections\\ReadableCollection<int, [^\>]+>#'
23+
- '#does not accept Doctrine\\Common\\Collections\\ReadableCollection<int, [^\>]+>#'
2024
reportUnmatchedIgnoredErrors: false
21-
checkMissingIterableValueType: false
22-
checkGenericClassInNonGenericObjectType: false
2325

2426
includes:
2527
- vendor/phpstan/phpstan-doctrine/extension.neon

src/AbstractDocumentFinder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public function findPicturesWithFilename(string $fileName): iterable
5353
{
5454
$pathInfo = pathinfo($fileName);
5555
$basename = $pathInfo['filename'];
56-
$currentExtension = $pathInfo['extension'];
56+
$currentExtension = $pathInfo['extension'] ?? null;
57+
if (null === $currentExtension) {
58+
return [];
59+
}
5760
$extensionsList = [
5861
'jpg',
5962
'gif',

src/Console/DocumentClearFolderCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ protected function getDocumentQueryBuilder(FolderInterface $folder): QueryBuilde
3636
protected function execute(InputInterface $input, OutputInterface $output): int
3737
{
3838
$this->io = new SymfonyStyle($input, $output);
39+
$folderId = $input->getArgument('folderId');
3940

40-
$folderId = intval($input->getArgument('folderId'));
41-
if ($folderId <= 0) {
41+
if (!\is_numeric($folderId) || $folderId <= 0) {
4242
throw new \InvalidArgumentException('Folder ID must be a valid ID');
4343
}
4444
$em = $this->getManager();

0 commit comments

Comments
 (0)