Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
.idea/
core-mcp
.DS_Store
# Composer had never been run here, so there was nothing to ignore and no rule
# for it. A package must not commit the tree it resolves.
/vendor/
.phpunit.cache/
.phpunit.result.cache
.lintdeps/
.scannerwork/
node_modules/
Expand Down
26 changes: 22 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
],
"license": "EUPL-1.2",
"require": {
"php": "^8.2",
"dappcore/php": "*"
"dappcore/php": "*",
"laravel/mcp": "^0.9",
"php": "^8.2"
},
"autoload": {
"psr-4": {
Expand All @@ -21,7 +22,8 @@
},
"autoload-dev": {
"psr-4": {
"Core\\Mcp\\Tests\\": "php/tests/"
"Core\\Mcp\\Tests\\": "php/tests/",
"Tests\\": "php/tests/"
}
},
"extra": {
Expand All @@ -32,12 +34,28 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"replace": {
"core/php-mcp": "self.version",
"lthn/php-mcp": "self.version"
},
"require-dev": {
"dappcore/php-tenant": "^0.1",
"dappcore/php-uptelligence": "*",
"laravel/pint": "^1.18",
"livewire/livewire": "^3.0",
"mockery/mockery": "^1.6",
"orchestra/testbench": "^9.0|^10.0",
"pestphp/pest": "^3.0"
Comment on lines +48 to +55

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'Files:\n'
git ls-files | sed -n '1,120p'

printf '\ncomposer.json relevant section:\n'
if [ -f composer.json ]; then
  nl -ba composer.json | sed -n '1,120p'
fi

printf '\nphpunit.xml relevant section:\n'
if [ -f phpunit.xml ]; then
  nl -ba phpunit.xml | sed -n '1,100p'
fi

printf '\nSearch for sqlite/pdo_sqlite requirements:\n'
rg -n 'ext-pdo_sqlite|PDO_SQLITE|DB_CONNECTION|DB_DATABASE|:memory:' composer.json phpunit.xml php | sed -n '1,160p'

Repository: dAppCore/mcp

Length of output: 3810


🏁 Script executed:

#!/usr/bin/env bash
set -u

printf 'composer.json relevant section:\n'
if [ -f composer.json ]; then
  sed -n '1,140p' composer.json
fi

printf '\nphpunit.xml relevant section:\n'
if [ -f phpunit.xml ]; then
  sed -n '1,100p' phpunit.xml
fi

printf '\nSearch for sqlite/pdo_sqlite references:\n'
rg -n 'ext-pdo_sqlite|PDO_SQLITE|DB_CONNECTION|DB_DATABASE|:memory:|sqlite' composer.json phpunit.xml composer.lock . 2>/dev/null | sed -n '1,220p'

Repository: dAppCore/mcp

Length of output: 8381


🌐 Web query:

Laravel SQLite driver requires PDO Sqlite composer ext-pdo_sqlite Laravel documentation

💡 Result:

Yes, the Laravel SQLite driver requires the PHP pdo_sqlite extension to be enabled [1][2]. This is a fundamental system-level dependency for PHP applications using SQLite, not a Composer dependency [1][2]. Key points regarding this requirement: 1. System Dependency: The pdo_sqlite extension is a PHP extension that must be installed and enabled in your system's php.ini configuration file [1][2]. It is not managed via composer.json because it is a requirement of the PHP environment itself [3][4]. 2. Verification: You can verify if the extension is enabled by running php -m | grep sqlite in your terminal [1]. If it is missing, you must install the appropriate PHP SQLite package for your operating system (e.g., php-sqlite3 on Ubuntu/Debian) and ensure the extension=pdo_sqlite line is uncommented in your php.ini file [1][2]. 3. Laravel Configuration: Once the PHP extension is enabled, you configure Laravel to use SQLite by updating your .env file [5][6]. For example: DB_CONNECTION=sqlite DB_DATABASE=/absolute/path/to/database.sqlite [5][7] 4. Error Troubleshooting: If you encounter an "SQLite driver not found" or "PDO exception" error, it confirms that your PHP installation lacks the pdo_sqlite extension [1][2]. Installing the extension and restarting your web server or PHP-FPM service will resolve this [1][2].

Citations:


🌐 Web query:

composer.json platforms.ext pdo_sqlite require extension platform package reference

💡 Result:

In Composer, ext-pdo_sqlite is a virtual platform package that allows you to specify a dependency on the PHP pdo_sqlite extension [1][2]. To require this extension in your project, add it to the require section of your composer.json file [3][4]: { "require": { "ext-pdo_sqlite": "*" } } Key details regarding platform packages and extensions: 1. Nature of Platform Packages: These are virtual packages representing the environment where Composer is running [1][2]. They do not install actual code [1]. 2. Version Constraints: Because PHP extension versions can be inconsistent or report as 0, it is standard practice to use * as the version constraint when requiring them [2][5]. 3. Importance: Explicitly listing required extensions in composer.json is recommended [4]. If you do not list them, Composer may install your dependencies without error, but your application will fail at runtime if the extension is missing from the production environment [4][6]. 4. Local Development vs. Deployment: If you need to run composer commands on a machine that lacks an extension you have declared as a requirement, you can bypass the check using the --ignore-platform-reqs flag [7][8]. However, this is discouraged for long-term development; it is better to ensure your local environment matches production [9][5]. 5. Platform Configuration: You can use the config field in composer.json to fake or ignore specific platform packages for the purpose of dependency resolution (e.g., {"ext-pdo_sqlite": false} to hide an extension, or specifying a version) [9]. You can view all PHP extensions currently available in your environment by running: composer show --platform

Citations:


🌐 Web query:

Laravel 12 composer.json sqlite tests require ext-pdo_sqlite Laravel documentation

💡 Result:

In Laravel 12, the ext-pdo_sqlite PHP extension is a system-level requirement for utilizing SQLite databases, including during testing if your application or test suite is configured to use the SQLite driver [1][2]. While composer.json files for individual packages often list ext-pdo_sqlite as a dependency [3][4][5], the core Laravel framework does not strictly require it in the global composer.json of a fresh project unless your application explicitly relies on SQLite for its database connection [1][2]. Key points regarding Laravel 12 and SQLite testing: 1. Requirement: If you intend to run tests using an SQLite database (such as the common in-memory :memory: setup used for fast testing), your server or local environment must have the pdo_sqlite PHP extension installed and enabled [6]. This is a requirement of the PHP environment rather than a package listed in the primary composer.json of the Laravel core framework [1][2]. 2. Configuration: Laravel defaults to SQLite in new installations [2]. If you are using SQLite, ensure your environment variables (e.g., DB_CONNECTION=sqlite) are set correctly [1]. When running tests, Laravel automatically sets the configuration environment to testing, and you can manage database behavior using traits like RefreshDatabase, which supports SQLite [7][8][9]. 3. Dependency Management: If you are developing a package that specifically requires SQLite functionality for its tests, it is standard practice to include ext-pdo_sqlite in the require or require-dev section of your package's composer.json to ensure the environment is correctly prepared [6][5]. In summary, ext-pdo_sqlite is a PHP extension requirement for the database driver itself; it is not a Composer package, so it is typically verified via system-level installation rather than being explicitly required in the core Laravel composer.json [1][2][6].

Citations:


Declare the SQLite driver required by the test configuration.

composer.json and phpunit.xml both configure SQLite, from in-memory database tests to the phpunit.xml connection. Add ext-pdo_sqlite to require-dev so Composer makes the PHP extension a package requirement before tests run.

📍 Affects 2 files
  • composer.json#L48-L55 (this comment)
  • phpunit.xml#L41-L42
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@composer.json` around lines 48 - 55, Add ext-pdo_sqlite to the require-dev
dependencies in composer.json so Composer enforces the SQLite PDO driver
required by the test configuration. The phpunit.xml SQLite configuration at
lines 41-42 requires no direct change.

},
"scripts": {
"lint": "pint",
"test": "pest"
}
}
Loading
Loading