Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11.x Compatibility #48

Open
wants to merge 3 commits into
base: v3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 66 additions & 46 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: "Run tests"
on: [push, pull_request]
name: Run tests

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [8.2, 8.1, 8.0, 7.4, 7.3, 7.2, 7.1]
laravel: [10.0, 9.0, 8.0, 7.0, 6.0, 5.8]
laravel: [5.8, 6.0, 7.0, 8.0, 9.0, 10.0, '11.0']
dependency-version: [lowest, stable]
include:
- laravel: 10.0
Expand All @@ -17,54 +22,68 @@ jobs:
- laravel: 8.0
testbench: 6.23
- laravel: 7.0
testbench: 5.20
testbench: 5.2
- laravel: 6.0
testbench: 4.18
- laravel: 5.8
testbench: 3.8
- laravel: '11.0'
testbench: '9.0'
exclude:
- laravel: 10.0
php: 8.0
- laravel: 10.0
php: 7.4
- laravel: 10.0
php: 7.3
- laravel: 10.0
php: 7.2
- laravel: 10.0
php: 7.1
- laravel: 9.0
php: 7.4
- laravel: 9.0
php: 7.3
- laravel: 9.0
php: 7.2
- laravel: 9.0
php: 7.1
- laravel: 8.0
php: 8.2
- laravel: 8.0
php: 7.2
- laravel: 8.0
php: 7.1
- laravel: 7.0
php: 8.2
- laravel: 7.0
php: 8.1
- laravel: 7.0
php: 7.1
- laravel: 6.0
php: 8.2
- laravel: 6.0
php: 8.1
- laravel: 6.0
php: 7.1
- laravel: 5.8
php: 8.2
- laravel: 5.8
php: 8.1
- laravel: 5.8
php: 8.0
- laravel: 10.0
php: 8.0
- laravel: 10.0
php: 7.4
- laravel: 10.0
php: 7.3
- laravel: 10.0
php: 7.2
- laravel: 10.0
php: 7.1
- laravel: 9.0
php: 7.4
- laravel: 9.0
php: 7.3
- laravel: 9.0
php: 7.2
- laravel: 9.0
php: 7.1
- laravel: 8.0
php: 8.2
- laravel: 8.0
php: 7.2
- laravel: 8.0
php: 7.1
- laravel: 7.0
php: 8.2
- laravel: 7.0
php: 8.1
- laravel: 7.0
php: 7.1
- laravel: 6.0
php: 8.2
- laravel: 6.0
php: 8.1
- laravel: 6.0
php: 7.1
- laravel: 5.8
php: 8.2
- laravel: 5.8
php: 8.1
- laravel: 5.8
php: 8.0
- laravel: '11.0'
php: 8.1
- laravel: '11.0'
php: 8.0
- laravel: '11.0'
php: 7.4
- laravel: '11.0'
php: 7.3
- laravel: '11.0'
php: 7.2
- laravel: '11.0'
php: 7.1

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

Expand All @@ -83,5 +102,6 @@ jobs:
run: |
composer require "laravel/framework:^${{ matrix.laravel }}" "orchestra/testbench:^${{ matrix.testbench }}" "mockery/mockery:^1.3.2" --no-interaction --no-update
composer update --prefer-${{ matrix.dependency-version }} --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit --testdox
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"name": "jackiedo/cart",
"description": "A package used to create and manage carts (such as shopping, recently viewed, compared items...) in Laravel application.",
"keywords": ["cart", "shoppingcart", "shopping", "laravel"],
"keywords": [
"cart",
"shoppingcart",
"shopping",
"laravel"
],
"license": "MIT",
"authors": [
{
Expand All @@ -11,12 +16,12 @@
],
"require": {
"php": ">=5.6.0",
"laravel/framework": "^10.0|^9.0|^8.0|^7.0|^6.0|^5.0"
"laravel/framework": "^10.0|^9.0|^8.0|^7.0|^6.0|^5.0|^11.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0|^8.0|^7.0|^6.0|^5.0|^4.0",
"phpunit/phpunit": "^9.0|^8.0|^7.0|^6.0|^5.0|^4.0|^10.5",
"mockery/mockery": "^1.0|^0.9",
"orchestra/testbench": "^8.0|^7.0|^6.0|^5.0|^4.0|^3.0"
"orchestra/testbench": "^8.0|^7.0|^6.0|^5.0|^4.0|^3.0|^9.0"
},
"autoload": {
"files": [
Expand Down
8 changes: 4 additions & 4 deletions src/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function update(array $attributes = [], $withEvent = true)
/**
* Get details of the action as a collection.
*
* @return \Jackiedo\Cart\Details
* @return Details
*/
public function getDetails()
{
Expand Down Expand Up @@ -320,7 +320,7 @@ public function isEnabled()
/**
* Determines if this action takes place before a specific action.
*
* @param \Jackiedo\Cart\Action $action The specific action
* @param Action $action The specific action
*
* @return bool
*/
Expand All @@ -332,7 +332,7 @@ public function isPreviousOf(Action $action)
/**
* Determines if this action takes place after a specific action.
*
* @param \Jackiedo\Cart\Action $action The specific action
* @param Action $action The specific action
*
* @return bool
*/
Expand All @@ -344,7 +344,7 @@ public function isBehindOf(Action $action)
/**
* Determines if this action is in the same group as the specific action.
*
* @param \Jackiedo\Cart\Action $action The specific action
* @param Action $action The specific action
*
* @return bool
*/
Expand Down
6 changes: 3 additions & 3 deletions src/ActionsContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ActionsContainer extends Container
* @param array $attributes The action attributes
* @param bool $withEvent Enable firing the event
*
* @return null|\Jackiedo\Cart\Action
* @return null|Action
*/
public function addAction(array $attributes = [], $withEvent = true)
{
Expand Down Expand Up @@ -69,7 +69,7 @@ public function addAction(array $attributes = [], $withEvent = true)
* @param array $attributes The new attributes
* @param bool $withEvent Enable firing the event
*
* @return null|\Jackiedo\Cart\Action
* @return null|Action
*/
public function updateAction($actionHash, array $attributes = [], $withEvent = true)
{
Expand Down Expand Up @@ -110,7 +110,7 @@ public function updateAction($actionHash, array $attributes = [], $withEvent = t
*
* @param string $actionHash The unique identifier of action
*
* @return \Jackiedo\Cart\Action
* @return Action
*/
public function getAction($actionHash)
{
Expand Down
Loading