From 6ca27b868c702d68928ee77f0cd94cd654c405f0 Mon Sep 17 00:00:00 2001 From: Holger Schmermbeck Date: Sun, 26 Oct 2025 16:58:14 +0100 Subject: [PATCH 1/6] docs: fix README.md markdown formatting - Fix multiple H1 heading errors - Use proper heading hierarchy (H2, H3, H4) - Fix bare URLs with angle brackets - Remove duplicate content sections - Ensure single H1 (title only) --- .gitattributes | 4 + .gitignore | 4 + .markdownlint.json.license | 3 + .prettierrc.json.license | 3 + .yamllint.yml | 30 ++ README.md | 143 +++------ app/Http/Controllers/Controller.php | 4 + app/Models/User.php | 4 + app/Providers/AppServiceProvider.php | 4 + artisan | 5 + bootstrap/app.php | 4 + bootstrap/cache/.gitignore | 4 + bootstrap/providers.php | 4 + composer.json | 179 +++++------ composer.json.license | 3 + composer.lock.license | 3 + config/app.php | 4 + config/auth.php | 4 + config/cache.php | 4 + config/database.php | 4 + config/filesystems.php | 4 + config/logging.php | 4 + config/mail.php | 4 + config/queue.php | 4 + config/services.php | 4 + config/session.php | 4 + database/.gitignore | 4 + database/factories/UserFactory.php | 4 + .../0001_01_01_000000_create_users_table.php | 4 + .../0001_01_01_000001_create_cache_table.php | 4 + .../0001_01_01_000002_create_jobs_table.php | 4 + database/seeders/DatabaseSeeder.php | 4 + package.json | 17 -- phpunit.xml | 7 + pint.json | 2 +- pint.json.license | 3 + public/.htaccess | 4 + public/favicon.ico | 0 public/index.php | 4 + public/robots.txt.license | 3 + resources/css/app.css | 11 - resources/js/app.js | 1 - resources/js/bootstrap.js | 4 - resources/views/welcome.blade.php | 277 ------------------ routes/api.php | 38 +++ routes/console.php | 4 + routes/web.php | 7 - storage/app/.gitignore | 4 + storage/app/private/.gitignore | 4 + storage/app/public/.gitignore | 4 + storage/framework/.gitignore | 4 + storage/framework/cache/.gitignore | 4 + storage/framework/cache/data/.gitignore | 4 + storage/framework/sessions/.gitignore | 4 + storage/framework/testing/.gitignore | 4 + storage/framework/views/.gitignore | 4 + storage/logs/.gitignore | 4 + tests/Feature/ExampleTest.php | 4 + tests/Pest.php | 4 + tests/TestCase.php | 4 + tests/Unit/ExampleTest.php | 4 + vite.config.js | 13 - 62 files changed, 394 insertions(+), 522 deletions(-) create mode 100644 .markdownlint.json.license create mode 100644 .prettierrc.json.license create mode 100644 .yamllint.yml create mode 100644 composer.json.license create mode 100644 composer.lock.license delete mode 100644 package.json create mode 100644 pint.json.license delete mode 100644 public/favicon.ico create mode 100644 public/robots.txt.license delete mode 100644 resources/css/app.css delete mode 100644 resources/js/app.js delete mode 100644 resources/js/bootstrap.js delete mode 100644 resources/views/welcome.blade.php create mode 100644 routes/api.php delete mode 100644 routes/web.php delete mode 100644 vite.config.js diff --git a/.gitattributes b/.gitattributes index fcb21d3..2080654 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 SecPal Contributors +# +# SPDX-License-Identifier: CC0-1.0 + * text=auto eol=lf *.blade.php diff=html diff --git a/.gitignore b/.gitignore index b71b1ea..d7a1e80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 SecPal Contributors +# +# SPDX-License-Identifier: CC0-1.0 + *.log .DS_Store .env diff --git a/.markdownlint.json.license b/.markdownlint.json.license new file mode 100644 index 0000000..2c435df --- /dev/null +++ b/.markdownlint.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 SecPal Contributors + +SPDX-License-Identifier: CC0-1.0 diff --git a/.prettierrc.json.license b/.prettierrc.json.license new file mode 100644 index 0000000..2c435df --- /dev/null +++ b/.prettierrc.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 SecPal Contributors + +SPDX-License-Identifier: CC0-1.0 diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..0c316dd --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: 2025 SecPal +# SPDX-License-Identifier: AGPL-3.0-or-later + +extends: default + +rules: + # Allow longer lines (default is 80) + line-length: + max: 120 + level: warning + + # GitHub Actions workflows often have long keys + key-ordering: disable + + # Allow multiple spaces for alignment + colons: + max-spaces-after: -1 + + # Allow comments to be indented differently + comments-indentation: disable + + # Allow empty values in workflows + empty-values: + forbid-in-block-mappings: false + forbid-in-flow-mappings: false + + # Truthy values are common in GitHub Actions + truthy: + allowed-values: ["true", "false", "on", "off"] + check-keys: false diff --git a/README.md b/README.md index 2a6caee..88583e3 100644 --- a/README.md +++ b/README.md @@ -1,122 +1,67 @@ - -SPDX-License-Identifier: CC0-1.0

- --->Build Status - -Total Downloads - -# SecPal APILatest Stable Version +# SecPal API -License - -> Laravel backend API for SecPal - Digital guard book and security service management

- -[![REUSE Compliance](https://img.shields.io/badge/REUSE-compliant-green)](https://reuse.software/)## About Laravel +> Laravel backend API for SecPal - Digital guard book and security service management +[![REUSE Compliance](https://img.shields.io/badge/REUSE-compliant-green)](https://reuse.software/) [![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL%203.0+-blue.svg)](LICENSE) -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: - ## About -- [Simple, fast routing engine](https://laravel.com/docs/routing). +SecPal API is the backend service for the SecPal platform, built with Laravel 12 and PostgreSQL. It provides a RESTful API for managing security service operations, guard books, and related functionality. -SecPal API is the backend service for the SecPal platform, built with Laravel 12 and PostgreSQL. It provides a RESTful API for managing security service operations, guard books, and related functionality.- [Powerful dependency injection container](https://laravel.com/docs/container). - -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. - -## Tech Stack- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). - -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). - -- **Framework:** Laravel 12- [Robust background job processing](https://laravel.com/docs/queues). - -- **Database:** PostgreSQL- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). +## Tech Stack +- **Framework:** Laravel 12 +- **Database:** PostgreSQL - **Testing:** PEST - -- **Code Style:** Laravel Pint (PSR-12)Laravel is accessible, powerful, and provides tools required for large, robust applications. - +- **Code Style:** Laravel Pint (PSR-12) - **Static Analysis:** PHPStan (Level Max) with Larastan +- **PHP Version:** 8.4+ -- **PHP Version:** 8.4+## Learning Laravel - -## RequirementsLaravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. - -- PHP 8.4 or higherYou may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. +## Requirements +- PHP 8.4 or higher - Composer 2.x - -- PostgreSQL 15+ or 16+If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. - +- PostgreSQL 15+ or 16+ - Extensions: `mbstring`, `xml`, `ctype`, `iconv`, `intl`, `pdo_pgsql` -## Laravel Sponsors - ## Installation -We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com). - ### 1. Clone the repository -### Premium Partners - -````bash - -git clone https://github.com/SecPal/api.git- **[Vehikl](https://vehikl.com)** - -cd api- **[Tighten Co.](https://tighten.co)** - -```- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** - -- **[64 Robots](https://64robots.com)** - -### 2. Install dependencies- **[Curotec](https://www.curotec.com/services/technologies/laravel)** - -- **[DevSquad](https://devsquad.com/hire-laravel-developers)** - -```bash- **[Redberry](https://redberry.international/laravel-development)** - -composer install- **[Active Logic](https://activelogic.com)** +```bash +git clone https://github.com/SecPal/api.git +cd api +``` -```` +### 2. Install dependencies -## Contributing +```bash +composer install +``` ### 3. Configure environment -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). - -````bash - -cp .env.example .env## Code of Conduct - +```bash +cp .env.example .env php artisan key:generate +``` -```In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). - - - -Edit `.env` and configure your database:## Security Vulnerabilities - - - -```envIf you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. +Edit `.env` and configure your database: +```env DB_CONNECTION=pgsql - -DB_HOST=127.0.0.1## License - +DB_HOST=127.0.0.1 DB_PORT=5432 - -DB_DATABASE=secpalThe Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). - +DB_DATABASE=secpal DB_USERNAME=your_username DB_PASSWORD=your_password -```` +``` ### 4. Run migrations @@ -142,11 +87,11 @@ php artisan migrate php artisan serve ``` -The API will be available at `http://localhost:8000`. +The API will be available at . ### Code Quality -#### Code Style (Laravel Pint) +**Code Style (Laravel Pint):** ```bash # Check code style @@ -156,13 +101,13 @@ The API will be available at `http://localhost:8000`. ./vendor/bin/pint ``` -#### Static Analysis (PHPStan) +**Static Analysis (PHPStan):** ```bash ./vendor/bin/phpstan analyse ``` -#### Testing (PEST) +**Testing (PEST):** ```bash # Run all tests @@ -210,13 +155,12 @@ git push --no-verify ## Project Structure -``` +```text api/ ├── app/ # Application code │ ├── Http/ # Controllers, Middleware, Requests, Resources │ ├── Models/ # Eloquent models -│ ├── Services/ # Business logic -│ └── Repositories/ # Data access layer +│ └── Providers/ # Service providers ├── config/ # Configuration files ├── database/ # Migrations, factories, seeders ├── routes/ # API routes @@ -224,7 +168,7 @@ api/ │ ├── Unit/ # Unit tests │ └── Feature/ # Feature/Integration tests ├── scripts/ # Development scripts -└── docs/ # Additional documentation +└── storage/ # Logs, cache, uploads ``` ## API Documentation @@ -239,15 +183,8 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc The `main` branch is protected with the following rules: -- Required status checks must pass: - - REUSE Compliance - - License Compatibility - - Laravel Pint - - PHPStan - - PEST Tests - - Formatting Check - - CodeQL Analysis -- Pull request reviews (0 required for single maintainer, will increase) +- Required status checks must pass +- Pull request reviews required - Conversations must be resolved - Force pushes are disabled - Deletions are disabled diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 8677cd5..ed65ffc 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -1,5 +1,9 @@ + + + Options -MultiViews -Indexes diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/public/index.php b/public/index.php index ee8f07e..413bd8a 100644 --- a/public/index.php +++ b/public/index.php @@ -1,5 +1,9 @@ - - - - - - {{ config('app.name', 'Laravel') }} - - - - - - - @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) - @vite(['resources/css/app.css', 'resources/js/app.js']) - @else - - @endif - - -
- @if (Route::has('login')) - - @endif -
-
-
-
-

Let's get started

-

Laravel has an incredibly rich ecosystem.
We suggest starting with the following.

- - -
-
- {{-- Laravel Logo --}} - - - - - - - - - - - {{-- Light Mode 12 SVG --}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{-- Dark Mode 12 SVG --}} - -
-
-
-
- - @if (Route::has('login')) - - @endif - - diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 0000000..2e2e068 --- /dev/null +++ b/routes/api.php @@ -0,0 +1,38 @@ +json([ + 'status' => 'ok', + 'timestamp' => now()->toIso8601String(), + 'service' => 'SecPal API', + 'version' => config('app.version', '1.0.0'), + ]); +}); + +// API v1 routes +Route::prefix('v1')->group(function () { + // Authentication routes + // Route::post('/login', [AuthController::class, 'login']); + // Route::post('/register', [AuthController::class, 'register']); + + // Protected routes + // Route::middleware('auth:sanctum')->group(function () { + // Route::apiResource('users', UserController::class); + // }); +}); diff --git a/routes/console.php b/routes/console.php index 3c9adf1..c30fc66 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,5 +1,9 @@ Date: Sun, 26 Oct 2025 17:17:44 +0100 Subject: [PATCH 2/6] fix: correct API-only setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Configure bootstrap/app.php to load API routes - Simplify PHPStan config (remove invalid parameters) - Update test to check /api/health endpoint - Remove web.php (API-only application) All quality checks passing: ✅ PEST (2/2 tests) ✅ PHPStan (level max) ✅ Laravel Pint ✅ Pre-commit hooks ✅ Pre-push hooks --- .gitignore | 1 + .markdownlint-cli2.yaml | 11 +++++++++++ .pre-commit-config.yaml | 10 +++++----- .preflight-allow-large-pr | 10 ++++++++++ bootstrap/app.php | 2 +- phpstan.neon | 20 ++++++-------------- tests/Feature/ExampleTest.php | 11 +++++++---- tests/Pest.php | 9 --------- tests/Unit/ExampleTest.php | 8 ++++---- 9 files changed, 45 insertions(+), 37 deletions(-) create mode 100644 .markdownlint-cli2.yaml create mode 100644 .preflight-allow-large-pr diff --git a/.gitignore b/.gitignore index d7a1e80..299a2f3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ Homestead.json Homestead.yaml Thumbs.db +build/ diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 0000000..dd7fd0d --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: 2025 SecPal Contributors +# SPDX-License-Identifier: CC0-1.0 + +# markdownlint-cli2 configuration +# https://github.com/DavidAnson/markdownlint-cli2 + +# Ignore vendor directory and node_modules +ignores: + - vendor/** + - node_modules/** + - .git/** diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea496c2..1405eb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: # REUSE compliance - repo: https://github.com/fsfe/reuse-tool - rev: v5.0.2 + rev: v6.1.2 hooks: - id: reuse @@ -29,26 +29,26 @@ repos: # YAML linting - repo: https://github.com/adrienverge/yamllint - rev: v1.35.1 + rev: v1.37.1 hooks: - id: yamllint args: ["-c", ".yamllint.yml"] # GitHub Actions workflow linting - repo: https://github.com/rhysd/actionlint - rev: v1.7.4 + rev: v1.7.8 hooks: - id: actionlint # Shell script linting - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 + rev: v0.11.0.1 hooks: - id: shellcheck # Git hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files args: ["--maxkb=1000"] diff --git a/.preflight-allow-large-pr b/.preflight-allow-large-pr new file mode 100644 index 0000000..25a2056 --- /dev/null +++ b/.preflight-allow-large-pr @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2025 SecPal Contributors +# SPDX-License-Identifier: CC0-1.0 + +# This file allows large PRs to bypass the 600-line size check. +# Only use this for exceptional cases like: +# - Initial repository setup +# - Major refactoring with unavoidable scope +# - Vendor library updates + +# Reason: Initial API-only setup with Laravel 12, PEST, PHPStan, REUSE compliance diff --git a/bootstrap/app.php b/bootstrap/app.php index 02a140f..8ed9a22 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -10,7 +10,7 @@ return Application::configure(basePath: dirname(__DIR__)) ->withRouting( - web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) diff --git a/phpstan.neon b/phpstan.neon index 2d9b597..5a7aaff 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -13,26 +13,18 @@ parameters: - routes - tests + # Memory limit for PHPStan + tmpDir: build/phpstan + parallel: + maximumNumberOfProcesses: 4 + processTimeout: 300.0 + # Ignore errors in generated files excludePaths: - bootstrap/cache/* - storage/* - vendor/* - # Type coverage - checkMissingIterableValueType: true - checkGenericClassInNonGenericObjectType: true - - # Strict rules - checkAlwaysTrueCheckTypeFunctionCall: true - checkAlwaysTrueInstanceof: true - checkAlwaysTrueStrictComparison: true - checkExplicitMixedMissingReturn: true - checkFunctionNameCase: true - checkInternalClassCaseSensitivity: true - reportMaybesInMethodSignatures: true - reportStaticMethodSignatures: true - # Laravel specific noUnnecessaryCollectionCall: true noUnnecessaryCollectionCallOnly: [] diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 842a3c2..40dbea2 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -12,12 +12,15 @@ class ExampleTest extends TestCase { /** - * A basic test example. + * A basic API health check test. */ - public function test_the_application_returns_a_successful_response(): void + public function test_health_endpoint_returns_ok(): void { - $response = $this->get('/'); + $response = $this->get('/api/health'); - $response->assertStatus(200); + $response->assertStatus(200) + ->assertJson([ + 'status' => 'ok', + ]); } } diff --git a/tests/Pest.php b/tests/Pest.php index b0f8a26..25b3d6b 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -30,10 +30,6 @@ | */ -expect()->extend('toBeOne', function () { - return $this->toBe(1); -}); - /* |-------------------------------------------------------------------------- | Functions @@ -44,8 +40,3 @@ | global functions to help you to reduce the number of lines of code in your test files. | */ - -function something() -{ - // .. -} diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index a22a800..cafbb53 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -6,15 +6,15 @@ namespace Tests\Unit; -use PHPUnit\Framework\TestCase; +use Tests\TestCase; class ExampleTest extends TestCase { /** - * A basic test example. + * Test that application environment is set correctly. */ - public function test_that_true_is_true(): void + public function test_environment_is_testing(): void { - $this->assertTrue(true); + $this->assertEquals('testing', config('app.env')); } } From 987617031f83717b3e49aa8a6e071144978af659 Mon Sep 17 00:00:00 2001 From: Holger Schmermbeck Date: Sun, 26 Oct 2025 17:39:53 +0100 Subject: [PATCH 3/6] fix: make SPDX headers consistent (remove blank line) - Remove blank comment line between FileCopyrightText and License-Identifier - Matches frontend repository format (no blank line) - Fix README.md escaped backslash in URL - Update phpstan.neon comment to be more accurate - Addresses Copilot review feedback --- README.md | 2 +- app/Http/Controllers/Controller.php | 1 - app/Models/User.php | 1 - app/Providers/AppServiceProvider.php | 1 - bootstrap/app.php | 1 - bootstrap/providers.php | 1 - config/app.php | 1 - config/auth.php | 1 - config/cache.php | 1 - config/database.php | 1 - config/filesystems.php | 1 - config/logging.php | 1 - config/mail.php | 1 - config/queue.php | 1 - config/services.php | 1 - config/session.php | 1 - database/factories/UserFactory.php | 1 - database/migrations/0001_01_01_000000_create_users_table.php | 1 - database/migrations/0001_01_01_000001_create_cache_table.php | 1 - database/migrations/0001_01_01_000002_create_jobs_table.php | 1 - database/seeders/DatabaseSeeder.php | 1 - phpstan.neon | 2 +- public/index.php | 1 - routes/console.php | 1 - tests/Feature/ExampleTest.php | 1 - tests/Pest.php | 1 - tests/TestCase.php | 1 - tests/Unit/ExampleTest.php | 1 - 28 files changed, 2 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 88583e3..8e5ac0b 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ php artisan migrate php artisan serve ``` -The API will be available at . +The API will be available at . ### Code Quality diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index ed65ffc..02fa486 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -1,7 +1,6 @@ Date: Sun, 26 Oct 2025 17:41:46 +0100 Subject: [PATCH 4/6] fix: increase PHPStan memory limit in preflight script - Add php -d memory_limit=512M to PHPStan commands - Prevents memory exhaustion during static analysis - Matches memory config in phpstan.neon (tmpDir, parallel config) --- scripts/preflight.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/preflight.sh b/scripts/preflight.sh index e80d87f..2914358 100755 --- a/scripts/preflight.sh +++ b/scripts/preflight.sh @@ -56,9 +56,9 @@ if [ -f composer.json ]; then # Run PHPStan (use configured level from phpstan.neon if exists, else max) if [ -x ./vendor/bin/phpstan ]; then if [ -f phpstan.neon ] || [ -f phpstan.neon.dist ]; then - ./vendor/bin/phpstan analyse + php -d memory_limit=512M ./vendor/bin/phpstan analyse else - ./vendor/bin/phpstan analyse --level=max + php -d memory_limit=512M ./vendor/bin/phpstan analyse --level=max fi fi # Run tests (Laravel Artisan → Pest → PHPUnit) From 01826e401f0a8c3be96f5a0cb100a32b351db72b Mon Sep 17 00:00:00 2001 From: Holger Schmermbeck Date: Sun, 26 Oct 2025 17:51:05 +0100 Subject: [PATCH 5/6] fix: Remove CodeQL workflow (PHP unsupported) and fix remaining SPDX headers - Remove .github/workflows/codeql.yml (CodeQL 2.23.3 doesn't support PHP) - Fix SPDX headers in .gitignore files (remove blank comment lines) - Ensures consistent SPDX format across all file types --- .github/workflows/codeql.yml | 46 ------------------------------------ .gitignore | 1 - bootstrap/cache/.gitignore | 1 - database/.gitignore | 1 - 4 files changed, 49 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index d5d1147..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-FileCopyrightText: 2025 SecPal -# SPDX-License-Identifier: CC0-1.0 - -name: CodeQL - -on: - push: - branches: [main] - pull_request: - branches: [main] - schedule: - # Run at 00:00 UTC every Monday - - cron: "0 0 * * 1" - -permissions: - actions: read - contents: read - security-events: write - -jobs: - analyze: - name: Analyze with CodeQL - runs-on: ubuntu-latest - timeout-minutes: 360 - strategy: - fail-fast: false - matrix: - language: ["php"] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - queries: +security-extended,security-and-quality - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{ matrix.language }}" diff --git a/.gitignore b/.gitignore index 299a2f3..88ba806 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ # SPDX-FileCopyrightText: 2025 SecPal Contributors -# # SPDX-License-Identifier: CC0-1.0 *.log diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore index 8465492..21a2ce2 100644 --- a/bootstrap/cache/.gitignore +++ b/bootstrap/cache/.gitignore @@ -1,5 +1,4 @@ # SPDX-FileCopyrightText: 2025 SecPal Contributors -# # SPDX-License-Identifier: CC0-1.0 * diff --git a/database/.gitignore b/database/.gitignore index 27078ce..143a451 100644 --- a/database/.gitignore +++ b/database/.gitignore @@ -1,5 +1,4 @@ # SPDX-FileCopyrightText: 2025 SecPal Contributors -# # SPDX-License-Identifier: CC0-1.0 *.sqlite* From bea6b13c3eb0f732585b79f33088e9b362afb097 Mon Sep 17 00:00:00 2001 From: Holger Schmermbeck Date: Sun, 26 Oct 2025 18:00:40 +0100 Subject: [PATCH 6/6] fix: Remove duplicate workflow files - Removed license-compatibility.yml (already in quality.yml) - Removed reuse.yml (already in quality.yml) - Updated branch protection to use correct check names from quality.yml - Removed CodeQL (php) from required checks (unsupported language) --- .github/workflows/license-compatibility.yml | 18 ------------------ .github/workflows/reuse.yml | 18 ------------------ 2 files changed, 36 deletions(-) delete mode 100644 .github/workflows/license-compatibility.yml delete mode 100644 .github/workflows/reuse.yml diff --git a/.github/workflows/license-compatibility.yml b/.github/workflows/license-compatibility.yml deleted file mode 100644 index 3d1e741..0000000 --- a/.github/workflows/license-compatibility.yml +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-FileCopyrightText: 2025 SecPal -# SPDX-License-Identifier: CC0-1.0 - -name: License Compatibility - -on: - push: - branches: [main] - pull_request: - branches: [main] - -permissions: - contents: read - -jobs: - license-compatibility: - name: Check License Compatibility - uses: SecPal/.github/.github/workflows/reusable-license-compatibility.yml@main diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml deleted file mode 100644 index 0bc940e..0000000 --- a/.github/workflows/reuse.yml +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-FileCopyrightText: 2025 SecPal -# SPDX-License-Identifier: CC0-1.0 - -name: REUSE Compliance - -on: - push: - branches: [main] - pull_request: - branches: [main] - -permissions: - contents: read - -jobs: - reuse: - name: Check REUSE Compliance - uses: SecPal/.github/.github/workflows/reusable-reuse.yml@main