Skip to content

Commit 4d9f6f6

Browse files
committed
Complete first lexer iteration
1 parent a2147b9 commit 4d9f6f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+450
-1978
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml,neon}]
15+
indent_size = 2

.gitattributes

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
* text=auto eol=lf
2+
*.pp eol=lf linguist-language=EBNF
3+
*.pp2 eol=lf linguist-language=EBNF
4+
5+
# GIT
6+
.editorconfig export-ignore
17
.gitattributes export-ignore
28
.gitignore export-ignore
3-
tests/ export-ignore
49

5-
phpunit.xml
6-
psalm.xml
10+
# Tools
11+
.php-cs-fixer.php export-ignore
12+
phpstan.neon export-ignore
13+
14+
# Tests + CI
15+
phpunit.xml export-ignore
16+
17+
/.github export-ignore
18+
/tests export-ignore
19+
20+
# Common
21+
/docs export-ignore
22+
monorepo-builder.yml export-ignore
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
name: build
1+
name: Tests
22

33
on:
44
push:
55
pull_request:
66

7-
concurrency:
8-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9-
cancel-in-progress: true
10-
117
jobs:
12-
test:
13-
name: PHP ${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }}
8+
tests:
9+
name: Tests (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }})
1410
runs-on: ${{ matrix.os }}
15-
if: "!contains(github.event.head_commit.message, '[ci skip]')"
1611
strategy:
1712
fail-fast: false
1813
matrix:
19-
php: [ '8.1', '8.2', '8.3', '8.4' ]
14+
php: [ '8.4', '8.5' ]
2015
os: [ ubuntu-latest, macos-latest, windows-latest ]
2116
stability: [ prefer-lowest, prefer-stable ]
2217
steps:
@@ -30,23 +25,25 @@ jobs:
3025
uses: shivammathur/setup-php@v2
3126
with:
3227
php-version: ${{ matrix.php }}
33-
tools: composer:v2
34-
extensions: mbstring
28+
extensions: ffi
29+
tools: pecl
3530
ini-values: "memory_limit=-1"
31+
- name: Validate Composer
32+
run: composer validate
3633
- name: Get Composer Cache Directory
3734
id: composer-cache
3835
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
3936
- name: Restore Composer Cache
40-
uses: actions/cache@v4
37+
uses: actions/cache@v3
4138
with:
4239
path: ${{ steps.composer-cache.outputs.dir }}
4340
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
4441
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
45-
- name: Install Dependencies (PHP Stable)
46-
uses: nick-invision/retry@v3
42+
- name: Install Dependencies
43+
uses: nick-invision/retry@v2
4744
with:
4845
timeout_minutes: 5
4946
max_attempts: 5
50-
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
47+
command: composer update --${{ matrix.stability }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress
5148
- name: Execute Tests
52-
run: vendor/bin/phpunit --colors=always
49+
run: php vendor/bin/phpunit

composer.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,17 @@
2020
"ext-spl": "*",
2121
"ext-pcre": "*",
2222
"ext-json": "*",
23-
"ext-mbstring": "*",
2423
"phplrt/source": "^4.0",
25-
"phplrt/lexer-contracts": "^4.0",
26-
"phplrt/exception": "^4.0",
27-
"symfony/deprecation-contracts": "^2.5|^3.0"
24+
"phplrt/lexer-contracts": "^4.0"
2825
},
2926
"autoload": {
3027
"psr-4": {
3128
"Phplrt\\Lexer\\": "src"
32-
},
33-
"files": [
34-
"src/polyfill.php"
35-
]
29+
}
3630
},
3731
"require-dev": {
38-
"phpunit/phpunit": "^12.5",
39-
"phpstan/phpstan": "^2.1.33",
32+
"phpunit/phpunit": "^12.5|^13.0",
33+
"phpstan/phpstan": "^2.1.38",
4034
"phpstan/phpstan-strict-rules": "^2.0"
4135
},
4236
"autoload-dev": {
@@ -54,10 +48,7 @@
5448
}
5549
},
5650
"config": {
57-
"sort-packages": true,
58-
"allow-plugins": {
59-
"phpstan/extension-installer": true
60-
}
51+
"sort-packages": true
6152
},
6253
"minimum-stability": "dev",
6354
"prefer-stable": true

phpstan.neon

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
includes:
2-
- phar://phpstan.phar/conf/bleedingEdge.neon
31
parameters:
4-
level: 1
2+
level: max
53
strictRules:
64
allRules: true
75
fileExtensions:
86
- php
97
paths:
108
- src
119
tmpDir: vendor/.cache.phpstan
12-
reportUnmatchedIgnoredErrors: false

phpunit.xml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
colors="true"
45
backupGlobals="true"
5-
backupStaticAttributes="false"
66
bootstrap="vendor/autoload.php"
7-
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
processIsolation="false"
12-
stopOnFailure="false"
7+
cacheDirectory="vendor/.cache.phpunit"
138
>
149
<php>
1510
<ini name="error_reporting" value="-1"/>
1611
<ini name="memory_limit" value="-1"/>
1712
</php>
1813

1914
<testsuites>
20-
<testsuite name="unit">
21-
<directory>tests/Unit</directory>
22-
</testsuite>
23-
<testsuite name="functional">
24-
<directory>tests/Functional</directory>
15+
<testsuite name="library">
16+
<directory>tests</directory>
2517
</testsuite>
2618
</testsuites>
2719

28-
<coverage>
20+
<coverage/>
21+
22+
<source>
2923
<include>
3024
<directory suffix=".php">src</directory>
3125
</include>
32-
</coverage>
26+
</source>
3327
</phpunit>

resources/.deprecations.php

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

src/Compiler/CompilerInterface.php

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

src/Compiler/Markers.php

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

0 commit comments

Comments
 (0)