Skip to content

Commit

Permalink
PHP 8.1+ Laravel 9+ Laravel 6/7- PHP 7.4-
Browse files Browse the repository at this point in the history
- Changed CI to Github Actions
- Updated Code Style Def to PSR-12
  • Loading branch information
fulopattila122 committed Jan 27, 2022
1 parent 981cf73 commit e28e460
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 106 deletions.
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Please go through this checklist, it is mandatory to accept your PR

- [ ] Include the summary of your change.
- [ ] Make sure all the tests are passing
- [ ] Make sure StyleCI is passing
- [ ] In case you add new functionality, it must be covered by tests
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: tests

on: [push]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
php: ['8.0', '8.1']
laravel: ['8.22', '8.81', '9.0']
enum: ['2', '3']
exclude:
- php: '8.1'
laravel: '8.22'
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Installing PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: mbstring, json, sqlite3
tools: composer:v2
- name: Lock Laravel Version
run: |
composer require "konekt/enum:${{ matrix.enum }}.*" --no-update -v
composer require "laravel/framework:${{ matrix.laravel }}.*" --no-update -v
- name: Composer Install
run: composer install --prefer-dist --no-progress --no-interaction
- name: Create Database
run: mkdir -p database && touch database/database.sqlite
- name: Run Tests
run: php vendor/bin/phpunit --testdox
69 changes: 31 additions & 38 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
preset: psr2

preset: psr12
risky: true
enabled:
- align_phpdoc
- align_double_arrow
- blank_line_before_return
- cast_spaces
- concat_with_spaces
- lowercase_static_reference
- method_separation
- new_with_braces
- no_blank_lines_after_class_opening
- no_blank_lines_after_phpdoc
- no_blank_lines_after_return
- no_blank_lines_between_imports
- no_blank_lines_between_traits
- no_empty_statement
- no_extra_consecutive_blank_lines
- no_leading_namespace_whitespace
- no_null_property_initialization
- no_unused_imports
- no_useless_else
- no_useless_return
- no_whitespace_before_comma_in_array
- no_whitespace_in_blank_line
- object_operator_without_whitespace
- ordered_class_elements
- phpdoc_link_to_see
- phpdoc_no_package
- phpdoc_order
- property_separation
- return_type_declaration
- short_array_syntax
- short_scalar_cast
- single_blank_line_before_namespace
- space_after_semicolon
- ternary_operator_spaces
- ternary_to_null_coalescing
- yoda_style
- align_phpdoc
- alpha_ordered_imports
- cast_spaces
- clean_namespace
- declare_strict_types
- fully_qualified_strict_types
- implode_call
- no_extra_block_blank_lines
- no_extra_consecutive_blank_lines
- no_spaces_inside_offset
- no_spaces_outside_offset
- no_whitespace_before_comma_in_array
- no_unneeded_curly_braces
- no_unneeded_control_parentheses
- no_unneeded_final_method
- no_unused_imports
- no_unused_lambda_imports
- no_useless_sprintf
- normalize_index_brace
- object_operator_without_whitespace
- ordered_class_elements
- print_to_echo
- property_separation
- short_array_syntax
- short_list_syntax
- standardize_not_equals
- unalign_equals
- unalign_double_arrow
- yoda_style
63 changes: 0 additions & 63 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog
### Konekt Enum Eloquent

## Unreleased
##### 2022-01-XX

- Added PHP 8.1 support
- Added Laravel 9 support
- Dropped PHP 7.3 and PHP 7.4 support
- Dropped Laravel 6 and Laravel 7 support
- Changed CI from Travis to Github Actions

## 1.7.0
##### 2020-11-28

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

This package provides support for auto casting [konekt enum](https://konekt.dev/enum) fields in [Eloquent models](https://laravel.com/docs/8.x/eloquent-mutators).

> Supported Konekt Enum versions are 2.0+ or 3.0+ and Eloquent 6.0+
> Supported Konekt Enum versions are 2.0+ or 3.0+ and Eloquent 8.0+
[Changelog](Changelog.md)

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
}
],
"require": {
"php": "^7.3 | ^8.0",
"php": "^8.0",
"konekt/enum": "^2.0.2 || ^3.0.0",
"illuminate/database": "6.*|7.*|8.*"
"illuminate/database": "8.*|9.*"
},
"require-dev": {
"phpunit/phpunit": "8 - 9",
"illuminate/events": "6.*|7.*|8.*"
"phpunit/phpunit": "8 - 10",
"illuminate/events": "8.*|9.*"
},
"autoload": {
"psr-4": { "Konekt\\Enum\\Eloquent\\": "src/" }
Expand Down

0 comments on commit e28e460

Please sign in to comment.