Update Qodana configuration and GitHub workflows

- Enhanced qodana.yaml to include additional PHP inspections and set PHP version to 8.4.
- Updated lint.yml and tests.yml workflow names for consistency.
- Modified qodana_code_quality.yml to improve job steps and update checkout action to v4.
- Removed work-in-progress warnings from several documentation files to reflect completed sections.
This commit is contained in:
Yury Pikhtarev 2025-07-11 23:05:45 +02:00
commit e89820b8a4
No known key found for this signature in database
10 changed files with 67 additions and 131 deletions

View file

@ -1,4 +1,4 @@
name: linter
name: Linter
on:
push:

View file

@ -1,28 +1,33 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches: # Specify your branches here
- main # The 'main' branch
- 'releases/*' # The release branches
branches:
- main
- dexter
jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit
fetch-depth: 0 # a full history is required for pull request analysis
- name: 'Qodana Scan'
- name: Qodana Scan
uses: JetBrains/qodana-action@v2025.1
with:
pr-mode: false
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_326072973 }}
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
QODANA_ENDPOINT: 'https://qodana.cloud'

View file

@ -1,4 +1,4 @@
name: tests
name: Tests
on:
push:

View file

@ -1,13 +1,10 @@
---
sidebar_position: 1
title: Overview
---
# Architecture Overview
:::warning Work in Progress
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
:::
TorrentPier follows a modern, scalable architecture built on Laravel's proven patterns and best practices.
## Tech Stack

View file

@ -1,8 +1,9 @@
---
sidebar_position: 3
sidebar_position: 2
title: Docker Development
---
# Laravel Sail Development
# Docker Development
Laravel Sail provides a Docker-powered local development environment for TorrentPier. This guide covers everything you need to know about using Sail for development.

View file

@ -1,13 +1,10 @@
---
sidebar_position: 1
title: Development Setup
---
# Development Setup
:::warning Work in Progress
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
:::
This guide will help you set up a local development environment for TorrentPier.
## Prerequisites
@ -26,7 +23,7 @@ This guide will help you set up a local development environment for TorrentPier.
```bash
# Clone the repository
git clone https://github.com/torrentpier/torrentpier.git
cd dexter
cd torrentpier
# Install dependencies
composer install
@ -122,13 +119,11 @@ Recommended extensions:
### Always Use Artisan Commands
```bash
# Generate model with all resources
php artisan make:model Post --all
# Generate model with all resources and API controller
php artisan make:model Post --all --api
# Create controller
php artisan make:controller PostController --resource
# Create React page component manually in resources/js/pages/
```
### Useful Commands
@ -233,32 +228,6 @@ php artisan make:model Post -mfsc
// - Controller: app/Http/Controllers/PostController.php
```
## Git Workflow
### Branching Strategy
```bash
# Create feature branch
git checkout -b feature/user-profile
# Create bugfix branch
git checkout -b bugfix/login-issue
# Push branch
git push -u origin feature/user-profile
```
### Commit Messages
Follow conventional commits:
- `feat:` New feature
- `fix:` Bug fix
- `docs:` Documentation
- `style:` Code style
- `refactor:` Code refactoring
- `test:` Tests
- `chore:` Maintenance
## Troubleshooting
### Common Issues
@ -283,9 +252,3 @@ Follow conventional commits:
```bash
php artisan optimize:clear
```
## Next Steps
- Review Coding Standards
- Learn about Testing
- Understand API Development

View file

@ -4,10 +4,6 @@ sidebar_position: 1
# Installation
:::warning Work in Progress
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
:::
This guide will help you install and set up TorrentPier on your server.
## Requirements
@ -190,9 +186,3 @@ If you encounter issues, try clearing all caches:
```bash
php artisan optimize:clear
```
## Next Steps
- Configure Application Settings
- Set up Email Configuration
- Review Security Best Practices

View file

@ -4,10 +4,6 @@ sidebar_position: 1
# Welcome to TorrentPier
:::warning Work in Progress
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
:::
TorrentPier is a modern, Laravel-based BitTorrent tracker and open-source software that allows you to run your own private or public torrent community. This is a complete rewrite of the original TorrentPier v2.x, built from the ground up using modern web technologies and best practices. This documentation will guide you through the architecture, features, and development process of the new TorrentPier.
## Key Features

View file

@ -1,5 +1,6 @@
---
sidebar_position: 1
title: TorrentPier v2.x
---
# Migrating from TorrentPier v2.x
@ -95,9 +96,8 @@ cp -r /path/to/old/data/attachments /path/to/new/storage/app/attachments
Map old settings to new:
| Old Setting | New Setting | Notes |
|------------|-------------|-------|
|------------------------------|-------------------------|--------------|
| `$bb_cfg['bt_announce_url']` | `TRACKER_ANNOUNCE_URL` | In .env file |
| `$bb_cfg['torrent_pass']` | Auto-generated | More secure |
| `$bb_cfg['ratio_enabled']` | `TRACKER_RATIO_ENABLED` | Boolean |
### Step 6: Test Migration
@ -108,25 +108,6 @@ php artisan migrate:status
php artisan torrentpier:verify
```
## Data Mapping
### Users Table
| v2.x Column | New Column | Changes |
|-------------|------------|---------|
| `user_id` | `id` | Same data |
| `username` | `username` | Validated |
| `user_password` | `password` | Re-hashed |
| `user_email` | `email` | Verified |
### Torrents Table
| v2.x Column | New Column | Changes |
|-------------|------------|---------|
| `topic_id` | `id` | New IDs |
| `info_hash` | `info_hash` | Same |
| `size` | `size` | Bigint |
## Post-Migration
### 1. Verify Data Integrity
@ -163,17 +144,6 @@ php artisan cache:clear
php artisan optimize
```
## Rollback Plan
If issues occur:
1. Stop new installation
2. Restore DNS to old server
3. Investigate issues
4. Fix and retry
Keep old installation running until confident.
## Common Issues
### Password Reset Required
@ -202,18 +172,3 @@ If you had custom mods in v2.x:
2. Evaluate if still needed
3. Reimplement using Laravel patterns
4. Submit as pull requests
## Getting Help
- GitHub Issues
- Community Forum
- Documentation
- Discord Channel
## Next Steps
After successful migration:
- Configure new features
- Train moderators
- Update user guides
- Monitor feedback

View file

@ -1,6 +1,35 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"
linter: jetbrains/qodana-php:2025.1
profile:
name: qodana.recommended
php:
version: "8.4"
linter: jetbrains/qodana-php:2025.1
include:
- name: CheckDependencyLicenses
- name: PhpComposerExtensionStubsInspection
- name: PhpIncludeInspection
- name: PhpUnhandledExceptionInspection
- name: PhpCastIsUnnecessaryInspection
- name: PhpRedundantOptionalArgumentInspection
- name: PhpRangesInClassCanBeMergedInspection
- name: PhpMissingReturnTypeInspection
- name: PhpMissingFieldTypeInspection
- name: PhpDocMissingThrowsInspection
- name: PhpLoopCanBeConvertedToArrayMapInspection
- name: PhpInconsistentReturnPointsInspection
- name: PhpFullyQualifiedNameUsageInspection
- name: PhpDefineCanBeReplacedWithConstInspection
- name: PhpConditionAlreadyCheckedInspection
- name: PhpConcatenationWithEmptyStringCanBeInlinedInspection
- name: PhpSwitchCanBeReplacedWithMatchExpressionInspection
- name: PhpPluralMixedCanBeReplacedWithArrayInspection
- name: PhpMixedReturnTypeCanBeReducedInspection
- name: PhpIfWithCommonPartsInspection
exclude:
- name: All
paths:
- legacy