Skip to content

Commit e9e61f9

Browse files
authored
php8 (#10)
Support for php8 For actual production code only a regex has been updated. For tests phpunit has been upgraded and the CI has been moved to github actions.
1 parent ec94a6e commit e9e61f9

File tree

14 files changed

+1564
-658
lines changed

14 files changed

+1564
-658
lines changed

.github/workflows/php.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: yesql build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
services:
18+
mysql:
19+
image: mysql:5.7
20+
env:
21+
MYSQL_DATABASE: test_db
22+
MYSQL_USER: yesql
23+
MYSQL_PASSWORD: yesql
24+
MYSQL_ROOT_PASSWORD: rootpassword
25+
ports:
26+
- 3306:3306
27+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
28+
29+
steps:
30+
- uses: actions/checkout@v3
31+
32+
- name: Validate composer.json and composer.lock
33+
run: composer validate --strict
34+
35+
- name: Cache Composer packages
36+
id: composer-cache
37+
uses: actions/cache@v3
38+
with:
39+
path: vendor
40+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
41+
restore-keys: |
42+
${{ runner.os }}-php-
43+
44+
- name: Install dependencies
45+
run: composer install --prefer-dist --no-progress
46+
47+
- name: Prepare the test database
48+
run: mysql --host 127.0.0.1 --port 3306 -uroot -prootpassword < src/TestHelper/mysql-fixture.sql
49+
50+
- name: Run test suite
51+
run: vendor/bin/phpunit --verbose --coverage-text test/

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# yesql-php [![Build Status](https://travis-ci.org/nulpunkt/yesql-php.png?branch=master)](https://travis-ci.org/nulpunkt/yesql-php)
1+
# yesql-php
22

33
This is a clone of the wonderful [yesql library from clojure](https://github.com/krisajenkins/yesql).
44
The idea is to have a seperate sql file for queries, which you can then access

composer.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
"require": {
1212
},
1313
"require-dev": {
14-
"squizlabs/php_codesniffer": "~2.5",
15-
"phpunit/phpunit": "~5.2",
16-
"phpunit/dbunit": "~2.0"
17-
14+
"squizlabs/php_codesniffer": "3.*",
15+
"phpunit/phpunit": "^9.5"
1816
},
1917
"autoload": {
2018
"psr-0": {
21-
"": "src/"
19+
"Nulpunkt": "src/",
20+
"TestHelper": "src/"
2221
}
2322
}
2423
}

0 commit comments

Comments
 (0)