Skip to content

Commit 5d48096

Browse files
author
Aleksandar Markovski
committed
Initial commit
0 parents  commit 5d48096

21 files changed

+1179
-0
lines changed

.editorconfig

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
# Change these settings to your own preference
9+
indent_style = space
10+
indent_size = 4
11+
12+
# We recommend you to keep these unchanged
13+
end_of_line = lf
14+
charset = utf-8
15+
trim_trailing_whitespace = true
16+
insert_final_newline = true
17+
18+
[*.json]
19+
indent_style = space
20+
indent_size = 2
21+
22+
[*.md]
23+
indent_style = space
24+
indent_size = 4
25+
trim_trailing_whitespace = false
26+
27+
[*.php]
28+
indent_style = space
29+
indent_size = 4
30+
31+
[*.sh]
32+
indent_style = tab
33+
indent_size = 4
34+
35+
[*.{yaml,yml}]
36+
indent_style = space
37+
indent_size = 2
38+
trim_trailing_whitespace = false
39+
40+
[.gitmodules]
41+
indent_style = tab
42+
indent_size = 4
43+
44+
[.php_cs{,.dist}]
45+
indent_style = space
46+
indent_size = 4
47+
48+
[composer.json]
49+
indent_style = space
50+
indent_size = 4
51+
52+
[phpspec.yml{,.dist}]
53+
indent_style = space
54+
indent_size = 4
55+
56+
[phpunit.xml{,.dist}]
57+
indent_style = space
58+
indent_size = 4

.github/CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# How to contribute
2+
3+
We are really glad you're reading this.
4+
5+
## Testing
6+
7+
We have a handful of PHPUnit tests. Please write PHPUnit tests for new code you create.
8+
9+
## Submitting changes
10+
11+
Please send a [GitHub Pull Request to](https://github.com/Bakome/laravel-validation-attributes/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). When you send a pull request, we will love you forever if you include PHPUnit tests. We can always use more test coverage. Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit).
12+
13+
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
14+
15+
$ git commit -m "[Validation (Component)] A brief summary of the commit
16+
>
17+
> A paragraph describing what changed and its impact."
18+
19+
## Coding conventions
20+
21+
Start reading our code and you'll get the hang of it. We optimize for readability:
22+
23+
* We indent using four spaces (tabs)
24+
* We ALWAYS put spaces after list items and method parameters (`[1, 2, 3]`, not `[1,2,3]`).
25+
* This is open source software. Consider the people who will read your code, and make it look nice for them.
26+
* Refactor often.
27+
* Program for maintainer.
28+
* Respect project structure.
29+
* Avoid more then 3 parameters in methods (except in constructors).
30+
31+
Thanks

.github/workflows/psalm.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Psalm
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'psalm.xml.dist'
8+
9+
jobs:
10+
psalm:
11+
name: psalm
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.0'
20+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
21+
coverage: none
22+
23+
- name: Cache composer dependencies
24+
uses: actions/cache@v2
25+
with:
26+
path: vendor
27+
key: composer-${{ hashFiles('composer.lock') }}
28+
29+
- name: Run composer install
30+
run: composer install -n --prefer-dist
31+
32+
- name: Run psalm
33+
run: ./vendor/bin/psalm --shepherd --stats

.github/workflows/tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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: [8.0]
13+
laravel: [8.*]
14+
dependency-version: [prefer-lowest, prefer-stable]
15+
include:
16+
- laravel: 8.*
17+
testbench: 6.*
18+
19+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.composer/cache/files
29+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
36+
coverage: none
37+
38+
- name: Install dependencies
39+
run: |
40+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --ignore-platform-reqs
41+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --ignore-platform-reqs
42+
- name: Execute tests
43+
run: vendor/bin/phpunit

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
###> phpstorm ###
2+
.idea
3+
###< phpstorm ###
4+
5+
###> phpunit ###
6+
.phpunit.result.cache
7+
phpunit.xml
8+
###< phpunit ###
9+
10+
composer.lock
11+
vendor
12+
13+
###> php-cs-fixer ###
14+
.php_cs
15+
.php_cs.cache
16+
###< php-cs-fixer ###
17+
18+
###> psalm ###
19+
psalm.xml
20+
###< psalm ###

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All significant changes to `laravel-validation-attributes` will be documented here
4+
5+
## 1.0.0 - 2021-02-25
6+
7+
- Initial release

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Aleksandar Bako Markovski <aleksandar.markovski_bako@yahoo.com>
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.

0 commit comments

Comments
 (0)