Skip to content

Commit

Permalink
Merge pull request #15 from codebar-ag/feature-laravel-12
Browse files Browse the repository at this point in the history
Feature Laravel 12
  • Loading branch information
StanBarrows authored Feb 28, 2025
2 parents 3789a6e + 0c8299c commit d6b95d3
Show file tree
Hide file tree
Showing 23 changed files with 156 additions and 108 deletions.
2 changes: 0 additions & 2 deletions .github/FUNDING.yml

This file was deleted.

17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
name: Bug Report
description: Report an Issue or Bug with the Package
title: "[Bug]: "
labels: ["bug"]
labels: [ "bug" ]
body:
- type: markdown
attributes:
value: |
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
value: "|
We're sorry to hear you have a problem. Can you help us solve it by providing the following details."
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you expect to happen?
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
placeholder: "I cannot currently do X thing because when I do, it breaks X thing."
validations:
required: true
- type: input
id: package-version
attributes:
label: Package Version
description: What version of our Package are you running? Please be as specific as possible
placeholder: 1.0.0
placeholder: "12.0"
value: "12.0"
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you running? Please be as specific as possible
placeholder: 8.3.0
placeholder: "8.4.0"
value: "8.4.0"
validations:
required: true
- type: input
id: laravel-version
attributes:
label: Laravel Version
description: What version of Laravel are you running? Please be as specific as possible
placeholder: 11.0.0
placeholder: "12.0.0"
value: "12.0.0"
validations:
required: true
- type: dropdown
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
8 changes: 4 additions & 4 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.3
uses: dependabot/fetch-metadata@v2.3.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
21 changes: 21 additions & 0 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Fix PHP code style issues

on: [push]

jobs:
php-code-styling:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/[email protected]

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
26 changes: 0 additions & 26 deletions .github/workflows/php-cs-fixer.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ name: PHPStan

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths:
- '**.php'
- 'phpstan.neon.dist'

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.4'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Run PHPStan
run: ./vendor/bin/phpstan analyse src --error-format=github
run: ./vendor/bin/phpstan --error-format=github
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: release

on:
pull_request:
types:
- closed
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
WITH_V: true
RELEASE_BRANCHES: main
DEFAULT_BUMP: minor
22 changes: 11 additions & 11 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
max-parallel: 1
matrix:
os: [ ubuntu-latest, windows-latest ]
php: [ 8.2, 8.3 ]
laravel: [ 11.* ]
os: [ ubuntu-latest ]
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 12.* ]
stability: [ prefer-lowest, prefer-stable ]

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -40,18 +41,17 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Set phpunit.xml
- name: Execute tests
run: cp phpunit.xml.dist phpunit.xml

- name: Execute tests
run: vendor/bin/pest
env:
FLATFOX_TOKEN: ${{ secrets.FLATFOX_TOKEN }}

- name: Store test reports
uses: actions/upload-artifact@v2
- name: Store Log Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: Store report
retention-days: 1
path: |
./reports
name: Store report artifacts
path: ./vendor/orchestra/testbench-core/laravel/storage/logs
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
.idea
.php_cs
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
.DS_STORE
build
.phpunit.cache
composer.lock
coverage
docs
phpunit.xml
psalm.xml
phpstan.neon
testbench.yaml
vendor
node_modules
phpstan.neon
.phpactor.json
build
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<img src="https://banners.beyondco.de/Laravel%20Flatfox.png?theme=light&packageManager=composer+require&packageName=codebar-ag%2Flaravel-flatfox&pattern=circuitBoard&style=style_2&description=A+Laravel+Flatfox+integration+to+receive+public+listings.&md=1&showWatermark=1&fontSize=150px&images=home&widths=500&heights=500">

[![Latest Version on Packagist](https://img.shields.io/packagist/v/codebar-ag/laravel-flatfox.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-flatfox)
[![GitHub-Tests](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/run-tests.yml)
[![GitHub Code Style](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/fix-php-code-style-issues.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/fix-php-code-style-issues.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/codebar-ag/laravel-flatfox.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-flatfox)
[![run-tests](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/run-tests.yml/badge.svg)](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/run-tests.yml)
[![PHPStan](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/phpstan.yml/badge.svg)](https://github.com/codebar-ag/laravel-flatfox/actions/workflows/phpstan.yml)

This package was developed to give you a quick start to receive public listings from the Flatfox API.

Expand All @@ -13,9 +13,11 @@ Flatfox is a web-based portal where you can Search & advertise apartments for fr

## 🛠 Requirements

| Package | PHP | Laravel | Flatfox |
|-----------|-------|----------------|-----------|
| >v1.0 | >8.2 | > Laravel 10.0 ||
| Package | PHP | Laravel | Flatfox |
|-----------|-------------|-----------|-----------|
| v12.0.0 | ^8.2 - ^8.4 | 12.x ||
| v11.0.0 | ^8.2 | 11.x ||
| v1.0.0 | ^8.2 | 10.x ||

## ⚙️ Installation

Expand Down
39 changes: 20 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,34 @@
"license": "MIT",
"authors": [
{
"name": "Sebastian Fix",
"email": "sebastian.fix@codebar.ch",
"name": "Sebastian Bürgin-Fix",
"email": "sebastian.buergin@buergin.ch",
"homepage": "https://www.codebar.ch",
"role": "Developer"
"role": "Sofware-Engineer"
},
{
"name": "Rhys Lees",
"role": "Software-Engineer"
}
],
"require": {
"php": ">=8.2",
"php": "8.2.*|8.3.*|8.4.*",
"guzzlehttp/guzzle": "^7.8",
"illuminate/contracts": "^11.0",
"saloonphp/laravel-plugin": "^3.2",
"saloonphp/saloon": "^3.4",
"illuminate/contracts": "^12.0",
"saloonphp/cache-plugin": "^3.0",
"spatie/laravel-package-tools": "^1.16"
"saloonphp/laravel-plugin": "^3.5",
"saloonphp/saloon": "^3.10.1",
"spatie/laravel-package-tools": "^1.19"
},
"require-dev": {
"laravel/pint": "^1.13",
"nunomaduro/collision": "^8.1",
"larastan/larastan": "^2.8",
"pestphp/pest": "^2.31",
"orchestra/testbench": "^9.0",
"pestphp/pest-plugin-laravel": "^2.2",
"pestphp/pest-plugin-arch": "^2.6",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"spatie/laravel-ray": "^1.33"
"laravel/pint": "^1.21",
"larastan/larastan": "^v3.1",
"orchestra/testbench": "^10.0",
"pestphp/pest": "^3.7",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"spatie/laravel-ray": "^1.39"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 2 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ includes:
- phpstan-baseline.neon

parameters:
level: 4
level: 5
paths:
- src
- config
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false

noEnvCallsOutsideOfConfig: false
Loading

0 comments on commit d6b95d3

Please sign in to comment.