diff --git a/.ai/project-summary.md b/.ai/project-summary.md index e4ded1e..4f182bb 100644 --- a/.ai/project-summary.md +++ b/.ai/project-summary.md @@ -40,5 +40,5 @@ Neuron is a lightweight PHP framework by CatLab Interactive. It provides core ut ## Build & Dependencies - PHP >= 8.1 - Composer for dependency management -- Key dependencies: `nesbot/carbon`, `ext-gettext` +- Key dependencies: `ext-gettext` - Dev dependency: `phpunit/phpunit` diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 989f50a..ddb5ba2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - php-version: ['8.1', '8.2', '8.3'] + php-version: ['7.4', '8.0', '8.1', '8.2', '8.3'] name: PHP ${{ matrix.php-version }} diff --git a/composer.json b/composer.json index c2c4f85..b849047 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,12 @@ ], "require" : { - "php": ">=8.1.0", - "ext-gettext" : "*", - "nesbot/carbon": "^2.0||^3.0" + "php": ">=7.4", + "ext-gettext" : "*" }, "require-dev": { - "phpunit/phpunit": "^10.0||^11.0" + "phpunit/phpunit": "^9.5||^10.0||^11.0" }, "autoload": { diff --git a/phpunit.xml b/phpunit.xml index 216c033..45a41da 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,13 +1,6 @@ - - - - src/Neuron - - + colors="true"> diff --git a/src/Neuron/Core/Tools.php b/src/Neuron/Core/Tools.php index 740af75..8b7ce28 100755 --- a/src/Neuron/Core/Tools.php +++ b/src/Neuron/Core/Tools.php @@ -72,7 +72,7 @@ public static function checkInput ($value, $type) elseif ($type == 'bool') { - return $value == 1 || $value == 'true'; + return $value === 1 || $value === '1' || $value === 'true'; } elseif ($type == 'varchar' || $type == 'string' || $type == 'html') diff --git a/tests/DbQueryTest.php b/tests/DbQueryTest.php index 8a924ae..c5e0a34 100644 --- a/tests/DbQueryTest.php +++ b/tests/DbQueryTest.php @@ -3,14 +3,13 @@ namespace Neuron\Tests; use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Attributes\Group; use Neuron\DB\Query; /** * Class DbQueryTest * @package Neuron\Tests + * @group database */ -#[Group('database')] class DbQueryTest extends TestCase { /**