diff --git a/README.md b/README.md index 4cb40c2..51f9ea4 100755 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ With Karaka you have one partner who can provide many tools and software solutio ## Requirements -* PHP 8.1 -* PHP extension: php8.1-dev php8.1-cli php8.1-common php8.1-mysql php8.1-pgsql php8.1-xdebug php8.1-opcache php8.1-pdo php8.1-sqlite php8.1-mbstring php8.1-curl php8.1-imap php8.1-bcmath php8.1-zip php8.1-dom php8.1-xml php8.1-phar php8.1-gd php-pear +* PHP 8.2 +* PHP extension: php8.2-dev php8.2-cli php8.2-common php8.2-intl php8.2-mysql php8.2-pgsql php8.2-xdebug php8.2-opcache php8.2-pdo php8.2-sqlite php8.2-mbstring php8.2-curl php8.2-imap php8.2-bcmath php8.2-zip php8.2-dom php8.2-xml php8.2-phar php8.2-gd php-pear * apache2 (recommended) or nginx * mysql-server (recommended) or postgresql postgresql-contrib * Tools: tesseract-ocr, pdftotext, pdftoppm diff --git a/composer.json b/composer.json index 2e47a08..7bd5508 100755 --- a/composer.json +++ b/composer.json @@ -8,15 +8,15 @@ } ], "require-dev": { - "phpunit/phpunit": ">=9.4", - "friendsofphp/php-cs-fixer": ">=3.8", - "squizlabs/php_codesniffer": ">=3.6", + "phpunit/phpunit": ">=11.0", + "friendsofphp/php-cs-fixer": ">=3.51", + "squizlabs/php_codesniffer": ">=3.7", "phpmd/phpmd": ">=2.9", - "phpstan/phpstan": ">=1.8.6", + "phpstan/phpstan": ">=1.10.62", "phan/phan": ">=3.2.6", "phploc/phploc": ">=7.0", "phpmetrics/phpmetrics": ">=2.8", - "rector/rector": ">=0.18.0" + "rector/rector": ">=1.0.3" }, "minimum-stability": "dev", "prefer-stable": true diff --git a/tests/Models/NullStockLocationTest.php b/tests/Models/NullStockLocationTest.php index cb2ca90..fc30313 100644 --- a/tests/Models/NullStockLocationTest.php +++ b/tests/Models/NullStockLocationTest.php @@ -19,31 +19,23 @@ use Modules\WarehouseManagement\Models\NullStockLocation; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\WarehouseManagement\Models\NullStockLocation::class)] final class NullStockLocationTest extends \PHPUnit\Framework\TestCase { - /** - * @covers Modules\WarehouseManagement\Models\NullStockLocation - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNull() : void { self::assertInstanceOf('\Modules\WarehouseManagement\Models\StockLocation', new NullStockLocation()); } - /** - * @covers Modules\WarehouseManagement\Models\NullStockLocation - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testId() : void { $null = new NullStockLocation(2); self::assertEquals(2, $null->id); } - /** - * @covers Modules\WarehouseManagement\Models\NullStockLocation - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testJsonSerialize() : void { $null = new NullStockLocation(2); diff --git a/tests/Models/NullStockShelfTest.php b/tests/Models/NullStockShelfTest.php index 19cf483..a768017 100644 --- a/tests/Models/NullStockShelfTest.php +++ b/tests/Models/NullStockShelfTest.php @@ -19,31 +19,23 @@ use Modules\WarehouseManagement\Models\NullStockShelf; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\WarehouseManagement\Models\NullStockShelf::class)] final class NullStockShelfTest extends \PHPUnit\Framework\TestCase { - /** - * @covers Modules\WarehouseManagement\Models\NullStockShelf - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNull() : void { self::assertInstanceOf('\Modules\WarehouseManagement\Models\StockShelf', new NullStockShelf()); } - /** - * @covers Modules\WarehouseManagement\Models\NullStockShelf - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testId() : void { $null = new NullStockShelf(2); self::assertEquals(2, $null->id); } - /** - * @covers Modules\WarehouseManagement\Models\NullStockShelf - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testJsonSerialize() : void { $null = new NullStockShelf(2); diff --git a/tests/Models/NullStockTest.php b/tests/Models/NullStockTest.php index 17dac74..82e90d8 100644 --- a/tests/Models/NullStockTest.php +++ b/tests/Models/NullStockTest.php @@ -19,31 +19,23 @@ use Modules\WarehouseManagement\Models\NullStock; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\WarehouseManagement\Models\NullStock::class)] final class NullStockTest extends \PHPUnit\Framework\TestCase { - /** - * @covers Modules\WarehouseManagement\Models\NullStock - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNull() : void { self::assertInstanceOf('\Modules\WarehouseManagement\Models\Stock', new NullStock()); } - /** - * @covers Modules\WarehouseManagement\Models\NullStock - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testId() : void { $null = new NullStock(2); self::assertEquals(2, $null->id); } - /** - * @covers Modules\WarehouseManagement\Models\NullStock - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testJsonSerialize() : void { $null = new NullStock(2); diff --git a/tests/Models/StockLocationTest.php b/tests/Models/StockLocationTest.php index e63d87a..0c1fea1 100755 --- a/tests/Models/StockLocationTest.php +++ b/tests/Models/StockLocationTest.php @@ -19,6 +19,7 @@ use Modules\WarehouseManagement\Models\StockLocation; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\WarehouseManagement\Models\StockLocation::class)] final class StockLocationTest extends \PHPUnit\Framework\TestCase { private StockLocation $stock; @@ -31,10 +32,7 @@ final class StockLocationTest extends \PHPUnit\Framework\TestCase $this->stock = new StockLocation(); } - /** - * @covers Modules\WarehouseManagement\Models\StockLocation - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->stock->id); diff --git a/tests/Models/StockMovementTest.php b/tests/Models/StockMovementTest.php index ae166e7..accc44f 100755 --- a/tests/Models/StockMovementTest.php +++ b/tests/Models/StockMovementTest.php @@ -19,7 +19,8 @@ use Modules\WarehouseManagement\Models\StockTransaction; /** * @internal */ -final class StockTransactionTest extends \PHPUnit\Framework\TestCase +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\WarehouseManagement\Models\StockTransaction::class)] +final class StockMovementTest extends \PHPUnit\Framework\TestCase { private StockTransaction $movement; @@ -31,10 +32,7 @@ final class StockTransactionTest extends \PHPUnit\Framework\TestCase $this->movement = new StockTransaction(); } - /** - * @covers Modules\WarehouseManagement\Models\StockTransaction - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->movement->id); diff --git a/tests/Models/StockShelfTest.php b/tests/Models/StockShelfTest.php index dc1d9f0..3b9a20d 100755 --- a/tests/Models/StockShelfTest.php +++ b/tests/Models/StockShelfTest.php @@ -19,6 +19,7 @@ use Modules\WarehouseManagement\Models\StockShelf; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\WarehouseManagement\Models\StockShelf::class)] final class StockShelfTest extends \PHPUnit\Framework\TestCase { private StockShelf $stock; @@ -31,10 +32,7 @@ final class StockShelfTest extends \PHPUnit\Framework\TestCase $this->stock = new StockShelf(); } - /** - * @covers Modules\WarehouseManagement\Models\StockShelf - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->stock->id); diff --git a/tests/Models/StockTest.php b/tests/Models/StockTest.php index b2a8ab9..1f8396b 100755 --- a/tests/Models/StockTest.php +++ b/tests/Models/StockTest.php @@ -19,6 +19,7 @@ use Modules\WarehouseManagement\Models\Stock; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\WarehouseManagement\Models\Stock::class)] final class StockTest extends \PHPUnit\Framework\TestCase { private Stock $stock; @@ -31,10 +32,7 @@ final class StockTest extends \PHPUnit\Framework\TestCase $this->stock = new Stock(); } - /** - * @covers Modules\WarehouseManagement\Models\Stock - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->stock->id); diff --git a/tests/phpunit_default.xml b/tests/phpunit_default.xml index d350430..e4a5639 100755 --- a/tests/phpunit_default.xml +++ b/tests/phpunit_default.xml @@ -1,31 +1,6 @@ - - - - ../ - - - ../vendor* - ../MainRepository* - ../Karaka* - ../Admin/Install/Application* - ../phpOMS* - ../tests* - ../*/tests* - ../**/tests* - */tests* - ../* - ../* - ../* - ../* - ../* - ../**/test* - ../**/Theme* - ../**/Admin/Routes* - ../**/Admin/Hooks* - ../**/Admin/Install* - ../Media/Files* - + + @@ -56,4 +31,31 @@ + + + ../ + + + ../vendor* + ../MainRepository* + ../Karaka* + ../Admin/Install/Application* + ../phpOMS* + ../tests* + ../*/tests* + ../**/tests* + */tests* + ../* + ../* + ../* + ../* + ../* + ../**/test* + ../**/Theme* + ../**/Admin/Routes* + ../**/Admin/Hooks* + ../**/Admin/Install* + ../Media/Files* + +