llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
371 stars 21 forks source link

pdo_sqlite requirement #368

Closed staabm closed 8 months ago

staabm commented 8 months ago

Bug report category

Diagnose

Output of `diagnose` command ``` $ phpcompatinfo diagnose Requirements Checker ==================== > Running PHP CompatInfo with PHP 8.2.12 on Windows NT 10.0 > PHP is using the following php.ini file: C:\tools\php82\php.ini > Checking PHP CompatInfo requirements: [x] PHP version must be at least 8.1.0 [ ] pdo_sqlite extension must be available [ ] Check if source "C:\Users\mstaab\.cache\bartlett/compatinfo-db.sqlite" can be reached [ ] Check if tables exists in database [ ] Check if database contains at least one distribution platform ? Environment ? Parameters > [kernel.environment] prod > [kernel.debug] > [kernel.home_dir] C:\Users\mstaab > [kernel.project_dir] C:\Users\mstaab\AppData\Roaming\Composer\vendor\bartlett\php-compatinfo > [kernel.cache_dir] C:\Users\mstaab\.cache\bartlett > [kernel.build_dir] C:\Users\mstaab\.cache\bartlett > [kernel.logs_dir] C:\Users\mstaab\AppData\Local\Temp > [kernel.vendor_dir] C:\Users\mstaab\AppData\Roaming\Composer\vendor\bartlett\php-compatinfo\vendor > [kernel.container_class] Bartlett_CompatInfo_Application_Kernel_ConsoleKernelProdContainer > [compat_info_db.version] 6.1.1@b687d48 > [compat_info_db.proxy_dir] C:\Users\mstaab\.cache\bartlett/php-compatinfo-db/6.1.1@b687d48/proxies [ERROR] Your system is not ready to run the application. Fix the following mandatory requirements (in sequential order): --------------------------------------------------------------- * Install the pdo_sqlite extension * DB file C:\Users\mstaab\.cache\bartlett/compatinfo-db.sqlite is not a regular file or have wrong permissions. * Create the schema with "db:create" command. * At least one distribution platform should exist. None available. Run "db:init" command to build one. ! [NOTE] phpCompatInfo version 7.1.0@26b0219 DB version 6.1.1@b687d48 ```

Summary

running phpcompatinfo analyser:run tells me that pdo_sqlite is a required dependency, but it is neither mentioned in the composer.json of the project nor the "Requirements" section of the docs

Expected behaviour

clear dependency list

Actual behaviour

Installation issue.

llaville commented 8 months ago

Reason is ext-pdo is required by CompatInfoDB that handle the database. As default database is a SQLite version, you see that pdo_sqlite must be available.

We can of course fix the documentation !

llaville commented 8 months ago

Documentation fix is now online https://llaville.github.io/php-compatinfo/7.1/installation/#requirements and branch 7.1 was updated accordingly