F
FilamentMatthew

Help with github actions

I copied the workflow file from filament:
name: phpstan

on:
push:
pull_request:

jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2, 8.1]
laravel: [10.*]
dependency-version: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
exclude:
- laravel: 11.*
php: 8.1
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pdo, pdo_sqlite
coverage: none
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "filament/support" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Run PHPStan
run: ./vendor/bin/phpstan
name: phpstan

on:
push:
pull_request:

jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2, 8.1]
laravel: [10.*]
dependency-version: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
exclude:
- laravel: 11.*
php: 8.1
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pdo, pdo_sqlite
coverage: none
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "filament/support" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Run PHPStan
run: ./vendor/bin/phpstan
Any help?
LZ
Lara Zeus13d ago
what is wrong? any error msg?
M
Matthew13d ago
Ah yes, oops Run ./vendor/bin/phpstan At least one path must be specified to analyse. Error: Process completed with exit code 1.
LZ
Lara Zeus13d ago
I think you dont have a config file for phpstan phpstan.neon or phpstan.neon.dist
M
Matthew13d ago
I added ./vendor/bin/phpstan analyze app, and now it seems to be working
LZ
Lara Zeus13d ago
that is another solution 👍 you can pass the folder/files name or set them in the config
M
Matthew13d ago
No description
M
Matthew13d ago
one more thing Im trying to use pint, and I cant exclude the migration files
{
"preset": "laravel",
"exclude": [
"database/migrations/*"
],
"rules": {
"blank_line_before_statement": true,
"concat_space": {
"spacing": "one"
},
"method_argument_space": true,
"single_trait_insert_per_statement": true,
"types_spaces": {
"space": "single"
}
}
}
{
"preset": "laravel",
"exclude": [
"database/migrations/*"
],
"rules": {
"blank_line_before_statement": true,
"concat_space": {
"spacing": "one"
},
"method_argument_space": true,
"single_trait_insert_per_statement": true,
"types_spaces": {
"space": "single"
}
}
}
I also tried
"exclude": [
"database/migrations"
],
"exclude": [
"database/migrations"
],
and
"exclude": [
"migrations"
],
"exclude": [
"migrations"
],
FYI pint works and the config is loaded, I just cant exclude directories
LZ
Lara Zeus13d ago
sometimes it can be cache?! not sure database/migrations should work try notName and notPath
M
Matthew13d ago
I cleared cache Still. they get formatted even with not path nvm im stupid. I called the wrong config 💀 Its fixed now :)
Want results from more Discord servers?
Add your server
More Posts
File upload preview green gradientHow do I remove the green gradient so that I can see the whole logo while uploading it ? ```<?php Close Modal Custom Page Livewire Not Working CorrectlyI make Custom Component Livewire, i have action with modal, but i close modal with button close is cExport to Excel - sub folder does not get url correctly.My app referer to the sub directy as : domain.com/demo/meterbill -> link to public folder in LaravelHow I can create Form or Table in another classF.E I want to create another class with form or tableUpdate each repeater field 2 fields outside the repeaterI'm playing around with creating a invoice in Filament and I've created a form that has multiple fieCan't access User profile "isSimple:false" on Team tenantHi. Trying to get to User's profile (http://app.test/dashboard/profile) This works public functHow to handle API error response?I have a resource, once you have create/update/delete action, it will call an API endpoint. How can Select Filter List TruncatedHi Guys, I have a select filter which has more then 50 options, however the list has been truncated Column relationships problemHey ! In a relation manager resource, i have this code : ```public function table(Table $table): custom themeHello, when I create a custom theme (php artisan make:filament-theme) and configure my vite.js fToggle-columnIs there any way to make toggle-column from scratch on a custom page ?$getAction() and visibilityWhen using ->registerActions() on a Form or Infolist component, it seems that visible() and hidden()Modal action or table inside formMy use case is a CRM application where each resource only has an edit screen. A list of related resoCustomizing Data Insertion with Filament's Import ActionHello, Regarding the import: https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import Is iCount SaleItems sold by Product IDHello, I have a Sales Resource with (hasMany) SaleItems Resource which selects a product to sell froMissing required parameter for View routeI have just found out the wonder of Repeaters, and after adding one to a form, the first time I submDownloadable() and Openable() gives me 404 errorhello! I am currently creating our system and the downloadable() and openable() syntax in my filamenhow to add external url in navigationi want to add external url in my navigation sidebar. but i find a way for a specific resource. whatcustom themeHas anyone used Multi-Tenancy with diferent DB Sqlite???Livewire View Not foundI have a brand new install of Laravel 11, Filament 3 and Livewire 3. I have been configuring the ad