Skip to content

Commit c29c64e

Browse files
committed
Issue 139: Add stub 'ock/class-files-iterator' package.
0 parents  commit c29c64e

File tree

7 files changed

+128
-0
lines changed

7 files changed

+128
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
tests:
8+
name: Tests
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
php: [8.3]
15+
composer-flags: ['--prefer-lowest', '']
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php }}
22+
extensions: json
23+
coverage: none
24+
- run: composer install --prefer-dist --no-interaction --no-progress
25+
- run: composer update --no-progress ${{ matrix.composer-flags }}
26+
- run: vendor/bin/phpunit

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.idea/
2+
/vendor/
3+
/.phpunit.cache/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Andreas Hennings
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Class files iterator
2+
3+
This package provides IteratorAggregate implementations to iterate through class files.

composer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "ock/class-files-iterator",
3+
"license": "MIT",
4+
"authors": [
5+
{
6+
"name": "Andreas Hennings",
7+
"email": "[email protected]"
8+
}
9+
],
10+
"minimum-stability": "dev",
11+
"autoload": {
12+
"psr-4": {
13+
"Ock\\ClassFilesIterator\\": "src"
14+
}
15+
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Ock\\ClassFilesIterator\\Tests\\": "tests/src"
19+
}
20+
},
21+
"require": {
22+
"php": ">=8.3",
23+
"ock/helpers": "self.version",
24+
"ext-json": "*"
25+
},
26+
"require-dev": {
27+
"phpunit/phpunit": "^10.5.38"
28+
}
29+
}

phpstan.neon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
parameters:
2+
level: 9
3+
treatPhpDocTypesAsCertain: false
4+
paths:
5+
- .
6+
excludePaths:
7+
- vendor
8+
- .github
9+
ignoreErrors:
10+
# Assume that generic type is 'mixed' if not further specified.
11+
- identifier: missingType.generics

phpunit.xml.dist

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
colors="true"
5+
bootstrap="vendor/autoload.php"
6+
displayDetailsOnIncompleteTests="true"
7+
displayDetailsOnSkippedTests="true"
8+
displayDetailsOnPhpunitDeprecations="true"
9+
displayDetailsOnTestsThatTriggerDeprecations="true"
10+
displayDetailsOnTestsThatTriggerErrors="true"
11+
displayDetailsOnTestsThatTriggerNotices="true"
12+
displayDetailsOnTestsThatTriggerWarnings="true"
13+
failOnEmptyTestSuite="true"
14+
failOnIncomplete="true"
15+
failOnNotice="true"
16+
failOnSkipped="true"
17+
failOnPhpunitDeprecation="true"
18+
failOnDeprecation="true"
19+
failOnRisky="true"
20+
failOnWarning="true"
21+
>
22+
<php>
23+
<ini name="error_reporting" value="32767"/>
24+
</php>
25+
<testsuites>
26+
<testsuite name="default">
27+
<directory>./tests/src</directory>
28+
</testsuite>
29+
</testsuites>
30+
<source>
31+
<include>
32+
<directory>./src/</directory>
33+
</include>
34+
</source>
35+
</phpunit>

0 commit comments

Comments
 (0)