Skip to content

Commit

Permalink
Drop support for php 8.1
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Jan 19, 2024
1 parent e4517eb commit 256005b
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 78 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PHP Linting (Pint)

on: [push, pull_request]
on: [ push, pull_request, workflow_dispatch ]

jobs:
phplint:
Expand All @@ -9,6 +9,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer:v2
coverage: none

- name: Composer Install
run: composer install --no-interaction

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Pest Tests

on: [push, pull_request]
on: [ push, pull_request, workflow_dispatch ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2]
os: [ ubuntu-latest ]
php: [ 8.2, 8.3 ]

name: PHP ${{ matrix.php }} - ${{ matrix.os }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: "Static Analysis"

on: [push, pull_request]
on: [ push, pull_request, workflow_dispatch ]

jobs:
types:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: ["8.1", "8.2"]
php: [ 8.2, 8.3 ]
name: PHP ${{ matrix.php }} - Static Analysis
steps:
- name: Checkout code
Expand Down
129 changes: 65 additions & 64 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,68 @@
{
"name": "tastyigniter/ti-ext-cart",
"type": "tastyigniter-package",
"description": "Easily add a shopping cart to your site. The most powerful way to sell your menu items.",
"license": "MIT",
"authors": [
{
"name": "Sam Poyigi",
"email": "[email protected]"
}
],
"keywords": [
"tastyigniter",
"cart",
"online-food-ordering",
"ordering"
],
"require": {
"tastyigniter/ti-ext-automation": "v4.x-dev as 4.0",
"tastyigniter/ti-ext-local": "v4.x-dev as 4.0",
"tastyigniter/ti-ext-payregister": "v4.x-dev as 4.0",
"tastyigniter/ti-ext-user": "v4.x-dev as 4.0"
},
"require-dev": {
"laravel/pint": "^1.2",
"nunomaduro/larastan": "^2.4.0",
"orchestra/testbench": "^8.5",
"pestphp/pest-plugin-laravel": "^2.0",
"igniterlabs/ti-ext-importexport": "v4.x-dev as 4.0",
"tastyigniter/core": "dev-master"
},
"autoload": {
"psr-4": {
"Igniter\\Cart\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Igniter\\Cart\\Tests\\": "tests/"
}
},
"extra": {
"tastyigniter-extension": {
"name": "Cart",
"icon": {
"class": "fa fa-shopping-cart",
"color": "#FFF",
"backgroundColor": "#ED561A"
},
"homepage": "https://tastyigniter.com/marketplace/item/igniter-cart"
}
},
"scripts": {
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/pint",
"static": "vendor/bin/phpstan analyse --ansi --memory-limit 1056M"
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true,
"composer/installers": true
},
"sort-packages": true
"name": "tastyigniter/ti-ext-cart",
"type": "tastyigniter-package",
"description": "Easily add a shopping cart to your site. The most powerful way to sell your menu items.",
"license": "MIT",
"authors": [
{
"name": "Sam Poyigi",
"email": "[email protected]"
}
],
"keywords": [
"tastyigniter",
"cart",
"online-food-ordering",
"ordering"
],
"require": {
"tastyigniter/ti-ext-automation": "v4.x-dev as 4.0",
"tastyigniter/ti-ext-local": "v4.x-dev as 4.0",
"tastyigniter/ti-ext-payregister": "v4.x-dev as 4.0",
"tastyigniter/ti-ext-user": "v4.x-dev as 4.0"
},
"require-dev": {
"laravel/pint": "^1.2",
"nunomaduro/larastan": "^2.4.0",
"orchestra/testbench": "^8.5",
"pestphp/pest-plugin-laravel": "^2.0",
"igniterlabs/ti-ext-importexport": "v4.x-dev as 4.0",
"tastyigniter/core": "dev-master"
},
"autoload": {
"psr-4": {
"Igniter\\Cart\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Igniter\\Cart\\Tests\\": "tests/"
}
},
"extra": {
"tastyigniter-extension": {
"name": "Cart",
"icon": {
"class": "fa fa-shopping-cart",
"color": "#FFF",
"backgroundColor": "#ED561A"
},
"homepage": "https://tastyigniter.com/marketplace/item/igniter-cart"
}
},
"scripts": {
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/pint",
"static": "vendor/bin/phpstan analyse --ansi --memory-limit 1056M"
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true,
"composer/installers": true
},
"sort-packages": true
},
"minimum-stability": "dev"
}
10 changes: 5 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ parameters:
path: src/FormWidgets/StockEditor.php

-
message: "#^Access to an undefined property Igniter\\\\Flame\\\\Database\\\\Model\\:\\:\\$stocks\\.$#"
message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$stocks\\.$#"
count: 1
path: src/FormWidgets/StockEditor.php

Expand All @@ -406,17 +406,17 @@ parameters:
path: src/FormWidgets/StockEditor.php

-
message: "#^Call to an undefined method Igniter\\\\Flame\\\\Database\\\\Model\\:\\:getStockByLocation\\(\\)\\.$#"
message: "#^Call to an undefined method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:getStockByLocation\\(\\)\\.$#"
count: 1
path: src/FormWidgets/StockEditor.php

-
message: "#^Call to an undefined method Igniter\\\\Flame\\\\Database\\\\Model\\:\\:getStockableLocations\\(\\)\\.$#"
message: "#^Call to an undefined method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:getStockableLocations\\(\\)\\.$#"
count: 1
path: src/FormWidgets/StockEditor.php

-
message: "#^Call to an undefined method Igniter\\\\Flame\\\\Database\\\\Model\\:\\:getStockableName\\(\\)\\.$#"
message: "#^Call to an undefined method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:getStockableName\\(\\)\\.$#"
count: 1
path: src/FormWidgets/StockEditor.php

Expand Down Expand Up @@ -727,7 +727,7 @@ parameters:

-
message: "#^Access to an undefined property Igniter\\\\Cart\\\\Models\\\\MenuItemOptionValue\\:\\:\\$override_price\\.$#"
count: 2
count: 1
path: src/Models/MenuItemOptionValue.php

-
Expand Down
2 changes: 1 addition & 1 deletion pint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"braces": false,
"self_accessor": false,
"phpdoc_separation": false,
"Laravel/laravel_phpdoc_alignment": false,
"phpdoc_align": false,
"no_trailing_comma_in_singleline": false,
"phpdoc_trim_consecutive_blank_line_separation": true,
"blank_line_before_statement": {
Expand Down
3 changes: 2 additions & 1 deletion src/Actions/OrderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

namespace Igniter\Cart\Actions;

use Igniter\Flame\Database\Model;
use Igniter\System\Actions\ModelAction;

class OrderAction extends ModelAction
{
protected $model;
protected Model $model;

public function __construct($model)
{
Expand Down

0 comments on commit 256005b

Please sign in to comment.