Skip to content

Commit 2b5d521

Browse files
authored
Merge pull request #5 from niden-code/1.0.x
PHQL parser fixes
2 parents 84228f5 + be3df07 commit 2b5d521

11 files changed

Lines changed: 381 additions & 216 deletions

File tree

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,50 @@ concurrency:
1717
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
1818

1919
jobs:
20+
# PHP CodeSniffer inspection
21+
phpcs:
22+
name: "Validate code style"
23+
24+
permissions:
25+
contents: read
26+
27+
runs-on: ubuntu-latest
28+
29+
strategy:
30+
fail-fast: true
31+
matrix:
32+
php:
33+
- '8.1'
34+
- '8.2'
35+
- '8.3'
36+
- '8.4'
37+
- '8.5'
38+
39+
steps:
40+
- uses: actions/checkout@v6
41+
42+
- name: "Setup PHP"
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: ${{ matrix.php }}
46+
extensions: ${{ env.EXTENSIONS }}
47+
ini-values: apc.enable_cli=on, session.save_path=/tmp
48+
tools: pecl
49+
env:
50+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
PHALCON_PATH: ext
52+
53+
- name: "Install development dependencies with Composer"
54+
uses: "ramsey/composer-install@v3"
55+
with:
56+
composer-options: "--prefer-dist"
57+
58+
- name: "PHPCS"
59+
run: composer cs
60+
61+
# - name: "PHPStan"
62+
# run: composer analyze
63+
2064
tests:
2165
name: PHP ${{ matrix.php }}
2266
runs-on: ubuntu-latest

composer.json

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
11
{
22
"name": "phalcon/phql",
33
"description": "Phalcon Query Language (PHQL)",
4+
"type": "library",
45
"keywords": [
56
"php",
67
"framework",
8+
"phalcon",
79
"query",
8-
"sql"
10+
"sql",
11+
"phql"
912
],
13+
"homepage": "https://phalcon.io",
1014
"license": "MIT",
15+
"authors": [
16+
{
17+
"name": "Phalcon Team",
18+
"email": "team@phalcon.io",
19+
"homepage": "https://phalcon.io"
20+
}
21+
],
1122
"require": {
12-
"php": ">=8.1",
23+
"php": ">=8.1 <9.0",
1324
"ext-mbstring": "*"
1425
},
1526
"suggest": {
1627
"phalcon/phalcon": "The Phalcon framework this module integrates with"
1728
},
1829
"require-dev": {
1930
"phpstan/phpstan": "^2.0",
20-
"phpunit/phpunit": "^10.5"
31+
"phpunit/phpunit": "^10.5",
32+
"pds/skeleton": "^1.0",
33+
"pds/composer-script-names": "^1.0",
34+
"squizlabs/php_codesniffer": "^4.0"
2135
},
2236
"autoload": {
2337
"psr-4": {
@@ -29,12 +43,20 @@
2943
},
3044
"autoload-dev": {
3145
"psr-4": {
32-
"Phalcon\\Phql\\Tests\\": "tests/",
33-
"Phalcon\\Phql\\Tests\\Unit\\": "tests/unit/"
46+
"Phalcon\\Phql\\Tests\\": "tests/"
3447
}
3548
},
49+
"minimum-stability": "stable",
50+
"prefer-stable": true,
3651
"scripts": {
52+
"cs": "vendor/bin/phpcs --standard=phpcs.xml",
53+
"cs-fix": "vendor/bin/phpcbf --standard=phpcs.xml",
54+
"analyze": "vendor/bin/phpstan analyse -c phpstan.neon --memory-limit 1024M",
3755
"test": "vendor/bin/phpunit -c phpunit.xml --fail-on-all-issues",
3856
"test-coverage": "vendor/bin/phpunit -c phpunit.xml --coverage-html tests/_output/coverage/"
57+
},
58+
"support": {
59+
"issues": "https://github.com/phalcon/phql/issues",
60+
"source": "https://github.com/phalcon/phql"
3961
}
4062
}

composer.lock

Lines changed: 144 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Phalcon">
3+
<description>Phalcon Coding Standards</description>
4+
<arg value="-colors"/>
5+
<arg value="s"/>
6+
<arg value="p"/>
7+
<rule ref="PSR12">
8+
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
9+
</rule>
10+
<file>src</file>
11+
<file>tests/unit</file>
12+
</ruleset>

0 commit comments

Comments
 (0)