Skip to content

Commit 90dbfad

Browse files
committed
setup
0 parents  commit 90dbfad

File tree

14 files changed

+859
-0
lines changed

14 files changed

+859
-0
lines changed

.github/workflow/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ubuntu-latest]
12+
php: [7.3, 7.4, 8.0, 8.1]
13+
dependency-version: [prefer-lowest, prefer-stable]
14+
exclude:
15+
- php: 8.1
16+
dependency-version: prefer-lowest
17+
18+
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
29+
coverage: none
30+
31+
- name: Setup Problem Matches
32+
run: |
33+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
34+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
35+
36+
- name: Install dependencies
37+
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
38+
39+
- name: Execute tests
40+
run: vendor/bin/phpunit

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Not commiting composer.lock as this is a package
2+
composer.lock
3+
4+
# Dependencies
5+
vendor/
6+
7+
# Laravel 4 specific
8+
bootstrap/compiled.php
9+
app/storage/
10+
11+
# Laravel 5 & Lumen specific
12+
public/storage
13+
public/hot
14+
storage/*.key
15+
.env.*.php
16+
.env.php
17+
.env
18+
Homestead.yaml
19+
Homestead.json
20+
21+
# PHPUnit
22+
.phpunit.result.cache
23+
24+
# IDE stuff
25+
.vscode/

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased](https://github.com/BenSampo/laravel-enum/compare/v4.1.0...master)
9+
10+
11+
## [1.0.0](https://example.com) - 2022-01-09
12+
13+
### Initial Release
14+
15+
- initial release
16+
- Changelog started.

PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
- [ ] Added or updated tests
2+
- [ ] Added or updated the [README.md](../README.md)
3+
- [ ] Detailed changes in the [CHANGELOG.md](../CHANGELOG.md) unreleased section
4+
5+
**Related Issue/Intent**
6+
7+
<!-- Link to related issues this PR resolves, e.g. "Resolves #236",
8+
or a description of what this PR is trying to achieve. -->
9+
10+
**Changes**
11+
12+
<!-- Detail the changes in behaviour this PR introduces. -->
13+
14+
**Breaking changes**
15+
16+
<!-- If there are any breaking changes, list them here. -->

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# How to contribute to laravel-makeclass
2+
3+
Hey, thank you for contributing. Here are some tips to make it easy for you.
4+
5+
## Committing code
6+
7+
1. Fork the project
8+
1. `git clone` it and `composer install` the dependencies
9+
1. Create a new branch
10+
1. Think about how the changes you are about to make can be tested, optionally write tests before coding
11+
1. Run tests, make sure they fail
12+
1. Write the actual code to make the tests pass
13+
1. Open a pull request detailing your changes. Make sure to follow the [template](.github/PULL_REQUEST_TEMPLATE.md)
14+
15+
## Testing
16+
17+
I use **PHPUnit** for testing.
18+
19+
Have a new feature? You can start off by writing some tests that detail
20+
the behaviour you want to achieve and go from there.
21+
22+
Fixing a bug? The best way to ensure it is fixed for good and never comes
23+
back is to write a failing test for it and then make it pass. If you can
24+
not figure out how to fix it yourself, feel free to submit a PR with a
25+
failing test.
26+
27+
Run the testsuite
28+
29+
```bash
30+
composer test
31+
```
32+
33+
## Codestyle
34+
35+
Formatting is automated through [php_codesniffer](https://github.com/squizlabs/PHP_CodeSniffer).
36+
37+
Check the codestyle
38+
39+
```bash
40+
composer check-style
41+
```
42+
43+
Apply automated fixes
44+
45+
```bash
46+
composer fix-style
47+
```

composer.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "opheus2/laravel-makeclass",
3+
"description": "A laravel package that makes the creating of php classes faster",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Ominiabohs David Orpheus",
9+
"email": "ominiabohsdavid@gmail.com"
10+
}
11+
],
12+
"autoload": {
13+
"psr-4": {
14+
"Orpheus\\LaravelMakeClass\\": "src"
15+
}
16+
},
17+
"autoload-dev": {
18+
"psr-4": {
19+
"Orpheus\\LaravelMakeClass\\Tests\\": "tests"
20+
}
21+
},
22+
"scripts": {
23+
"test": "phpunit",
24+
"check-style": "phpcs -p --standard=PSR12 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
25+
"fix-style": "phpcbf -p --standard=PSR12 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
26+
},
27+
"extra": {
28+
"laravel": {
29+
"providers": [
30+
"Orpheus\\LaravelMakeClass\\LaravelMakeClassServiceProvider"
31+
],
32+
"aliases": {
33+
"Calculator": "Orpheus\\LaravelMakeClass\\Facades\\Calculator"
34+
}
35+
}
36+
},
37+
"require-dev": {
38+
"orchestra/testbench": "6.0",
39+
"phpunit/phpunit": "^9.5",
40+
"squizlabs/php_codesniffer": "^3.0"
41+
}
42+
}

license.txt

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) 2022 Ominiabohs David
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
13+
all 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
21+
THE SOFTWARE.

phpunit.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
bootstrap="vendor/autoload.php"
5+
backupGlobals="false"
6+
backupStaticAttributes="false"
7+
colors="true"
8+
verbose="true"
9+
convertErrorsToExceptions="true"
10+
convertNoticesToExceptions="true"
11+
convertWarningsToExceptions="true"
12+
processIsolation="false"
13+
stopOnFailure="false"
14+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
15+
>
16+
<coverage>
17+
<include>
18+
<directory suffix=".php">src/</directory>
19+
</include>
20+
</coverage>
21+
<testsuites>
22+
<testsuite name="Unit">
23+
<directory suffix="Test.php">./tests/Unit</directory>
24+
</testsuite>
25+
<testsuite name="Feature">
26+
<directory suffix="Test.php">./tests/Feature</directory>
27+
</testsuite>
28+
</testsuites>
29+
<php>
30+
<env name="DB_CONNECTION" value="testing"/>
31+
<env name="APP_KEY" value="base64:2fl+Ktvkfl+Fuz4Qp/A75G2RTiWVA/ZoKZvp6fiiM10="/>
32+
</php>
33+
</phpunit>

0 commit comments

Comments
 (0)