Skip to content

Feature Laravel 12 #10

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

Merged
merged 5 commits into from
Feb 26, 2025
Merged
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

Expand Down
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/art export-ignore
/docs export-ignore
/tests export-ignore
/workbench export-ignore
/.editorconfig export-ignore
/.php_cs.dist.php export-ignore
/psalm.xml export-ignore
Expand Down
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
21 changes: 10 additions & 11 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
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 @@ -41,16 +41,15 @@ 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

- 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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.idea
.phpunit.result.cache
.phpunit.cache
build
composer.lock
coverage
docs
phpunit.xml
phpstan.neon
testbench.yaml
vendor
node_modules
.phpactor.json
build
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<img src="https://banners.beyondco.de/Filament%20Json%20Field.png?theme=light&packageManager=composer+require&packageName=codebar-ag%2Ffilament-json-field&pattern=circuitBoard&style=style_2&description=A+Laravel+Filament+Json+Field+integration.&md=1&showWatermark=1&fontSize=150px&images=home&widths=500&heights=500">
<img src="https://banners.beyondco.de/Laravel%20Filament%20Json%20Field.png?theme=light&packageManager=composer+require&packageName=codebar-ag%2Flaravel-filament-json-field&pattern=circuitBoard&style=style_1&description=A+Laravel+Filament+Json+Field+integration.&md=1&showWatermark=1&fontSize=100px&images=light-bulb">

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

[![Latest Version on Packagist](https://img.shields.io/packagist/v/codebar-ag/filament-json-field.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/filament-json-field)
[![Total Downloads](https://img.shields.io/packagist/dt/codebar-ag/filament-json-field.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/filament-json-field)
[![run-tests](https://github.com/codebar-ag/filament-json-field/actions/workflows/run-tests.yml/badge.svg)](https://github.com/codebar-ag/filament-json-field/actions/workflows/run-tests.yml)
[![PHPStan](https://github.com/codebar-ag/filament-json-field/actions/workflows/phpstan.yml/badge.svg)](https://github.com/codebar-ag/filament-json-field/actions/workflows/phpstan.yml)

## 💡 What is Filament Json Field?

Filament Json Field is a Filament wrapper for Codemirror.

## 🛠 Requirements

| Package | PHP | Laravel | Filament Infolists | Filament Support | Filament Tables |
|-----------|-------|---------------|--------------------|------------------|-----------------|
| v1.0 | ^8.1 | ^10.45, ^11.0 | ^3.2 | ^3.2 | ^3.2 |
| Package | PHP | Laravel | Filament Infolists | Filament Support | Filament Tables |
|-----------|------------------|---------------|--------------------|------------------|-----------------|
| v12.0 | ^8.2, ^8.3, ^8.4 | ^12.0 | ^3.3 | ^3.3 | ^3.3 |
| v11.0 | ^8.1 | ^10.45, ^11.0 | ^3.2 | ^3.2 | ^3.2 |
| v1.0 | ^8.1 | ^10.45, ^11.0 | ^3.2 | ^3.2 | ^3.2 |


## ⚙️ Installation
Expand Down
55 changes: 21 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,34 @@
"license": "MIT",
"authors": [
{
"name": "Sebastian Bürgin",
"email": "sebastian.fix@buergin.ch",
"name": "Sebastian Bürgin-Fix",
"email": "sebastian.buergin@buergin.ch",
"homepage": "https://www.codebar.ch",
"role": "Sofware-Engineer"
},
{
"name": "Rhys Lees",
"role": "Software-Developer"
"role": "Software-Engineer"
}
],
"require": {
"php": "^8.2",
"filament/infolists": "^3.2",
"filament/support": "^3.2",
"filament/tables": "^3.2",
"illuminate/contracts": "^10.0||^11.0",
"livewire/livewire": "^3.4",
"spatie/laravel-package-tools": "^1.16"
"php": "8.2.*|8.3.*|8.4.*",
"filament/infolists": "^3.3",
"filament/support": "^3.3",
"filament/tables": "^3.3",
"illuminate/contracts": "^12.0",
"livewire/livewire": "^3.6",
"spatie/laravel-package-tools": "^1.19"
},
"require-dev": {
"laravel/pint": "^1.14",
"nunomaduro/collision": "^8.1.1||^7.10.0",
"larastan/larastan": "^2.9",
"orchestra/testbench": "^9.0.0||^8.22.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-laravel": "^2.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"spatie/laravel-ray": "^1.35"
"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 All @@ -50,27 +47,17 @@
},
"autoload-dev": {
"psr-4": {
"CodebarAg\\FilamentJsonField\\Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/"
"CodebarAg\\FilamentJsonField\\Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"clear": "@php vendor/bin/testbench package:purge-laravel-filament-json-field --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
"@php vendor/bin/testbench workbench:build --ansi"
],
"start": [
"Composer\\Config::disableProcessTimeout",
"@composer run build",
"@php vendor/bin/testbench serve"
],
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/pint"
"format": "vendor/bin/pint",
"clear": "@php vendor/bin/testbench package:purge-laravel-filament-revealable-field --ansi"
},
"config": {
"sort-packages": true,
Expand Down
Loading