Skip to content
Merged
23 changes: 23 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
branches: '*'
schedule:
- cron: '30 12 1,15 * *'

jobs:
analyze:
strategy:
matrix:
php-versions: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
name: Analyze PHP ${{ matrix.php-versions }}
uses: tithely/php-workflows/.github/workflows/codeql.yml@main
with:
github-event-name: ${{ github.event_name }}
php-version: ${{ matrix.php-versions }}
php-extensions: pdo_mysql, pdo_pgsql, pdo_sqlite, sqlsrv, pdo_sqlsrv
secrets:
actions-access-token: ${{ secrets.ACTIONS_ACCESS_TOKEN }}
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Features
- Requires only PDO
- Use prepared statements
- Handle schema migrations
- Fully unit tested on PHP 7+
- Fully unit tested on PHP 8+
- License: MIT

Requirements
------------

- PHP >= 7.0
- PHP >= 8.0
- PDO extension
- Sqlite, Mssql, Mysql or Postgresql

Expand Down Expand Up @@ -91,7 +91,6 @@ Optional attributes:
- port
- ssl_key
- ssl_cert
- ssl_key
- persistent
- timeout
- verify_server_cert
Expand Down Expand Up @@ -604,7 +603,7 @@ Add/Replace some values:
$db->hashtable('mytable')
->columnKey('column1')
->columnValue('column2')
->put(['option1' => 'new value', 'option2' => 'value2']));
->put(['option1' => 'new value', 'option2' => 'value2']);
```

Get all values:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"psr-0": {"PicoDb": "lib/"}
},
"require-dev": {
"phpunit/phpunit": "^9.6"
"phpunit/phpunit": "^9.6",
"vimeo/psalm": "^0.3.14"
},
"scripts": {
"docker:start": "docker compose up --build -d",
Expand Down
60 changes: 56 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<psalm
errorLevel="3"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="app" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>