Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Add support for Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMuller committed Mar 25, 2024
1 parent b0ad0df commit cb4df87
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 27 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: run-tests

on: [push, pull_request]
on:
- push
- pull_request

jobs:
test:
Expand All @@ -10,26 +12,26 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.0, 8.1, 8.2]
laravel: [9.*, 10.*]
php: [8.1, 8.2, 8.3]
laravel: [10.*, 11.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.1

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand All @@ -46,5 +48,6 @@ jobs:
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Laravel Encryptable Trait
=========================

[![Build Status](https://github.com/hihaho/laravel-encryptable-trait/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/hihaho/laravel-encryptable-trait)
[![StyleCI](https://styleci.io/repos/103246398/shield?branch=master&style=flat)](https://styleci.io/repos/103246398)
[![Latest Stable Version](https://poser.pugx.org/hihaho/laravel-encryptable-trait/v/stable)](https://packagist.org/packages/hihaho/laravel-encryptable-trait)
[![Total Downloads](https://poser.pugx.org/hihaho/laravel-encryptable-trait/downloads)](https://packagist.org/packages/hihaho/laravel-encryptable-trait)
[![Latest Unstable Version](https://poser.pugx.org/hihaho/laravel-encryptable-trait/v/unstable)](https://packagist.org/packages/hihaho/laravel-encryptable-trait)
Expand All @@ -23,16 +22,16 @@ Our email address is [photoware@hihaho.com](mailto:photoware@hihaho.com)

Simply add the following line to your ```composer.json``` and run ```composer update```
```
"hihaho/laravel-encryptable-trait": "^v3.0"
"hihaho/laravel-encryptable-trait": "^v4.0"
```
Or use composer to add it with the following command
```bash
composer require hihaho/laravel-encryptable-trait
```

## Requirements
- illuminate/encryption ^9.0 or ^10.0
- PHP 8.0 or 8.1 or 8.2
- illuminate/encryption ^10.0 or ^11.0
- PHP 8.1, 8.2 or 8.3

# Usage
Simply add the trait to your models and set the ```$encryptable``` to an array of values that need to be encrypted.
Expand Down
20 changes: 6 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,22 @@
"homepage": "https://github.com/hihaho/laravel-encryptable-trait",
"license": "MIT",
"type": "library",
"version": "v3.0.0",
"version": "v4.0.0",
"authors": [
{
"name": "Robert Boes",
"email": "robert@boes.io"
},
{
"name": "Mart de Graaf",
"email": "mart@martdegraaf.nl"
}
],
"require": {
"php": "^8.0",
"illuminate/encryption": "^9.34|^10.0"
"php": "^8.1",
"illuminate/encryption": "^10.0|^11.0"
},
"require-dev": {
"mockery/mockery": "^1.5.1",
"orchestra/testbench": "^7.9|^8.0",
"phpunit/phpunit": "^9.2|^10.0"
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^10.0",
"roave/security-advisories": "dev-latest"
},
"autoload": {
"psr-4": {
Expand All @@ -46,10 +43,5 @@
"config": {
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "v1.4.x-dev"
}
},
"minimum-stability": "stable"
}

0 comments on commit cb4df87

Please sign in to comment.