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: on:
push: push:

View file

@ -1,28 +1,33 @@
name: Qodana name: Qodana
on: on:
workflow_dispatch: workflow_dispatch:
pull_request: pull_request:
push: push:
branches: # Specify your branches here branches:
- main # The 'main' branch - main
- 'releases/*' # The release branches - dexter
jobs: jobs:
qodana: qodana:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
pull-requests: write pull-requests: write
checks: write checks: write
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
uses: actions/checkout@v4
with: 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 fetch-depth: 0 # a full history is required for pull request analysis
- name: 'Qodana Scan'
- name: Qodana Scan
uses: JetBrains/qodana-action@v2025.1 uses: JetBrains/qodana-action@v2025.1
with: with:
pr-mode: false pr-mode: false
env: env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_326072973 }} QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
QODANA_ENDPOINT: 'https://qodana.cloud' QODANA_ENDPOINT: 'https://qodana.cloud'

View file

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

View file

@ -1,13 +1,10 @@
--- ---
sidebar_position: 1 sidebar_position: 1
title: Overview
--- ---
# Architecture 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. TorrentPier follows a modern, scalable architecture built on Laravel's proven patterns and best practices.
## Tech Stack ## 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. 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 sidebar_position: 1
title: Development Setup
--- ---
# 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. This guide will help you set up a local development environment for TorrentPier.
## Prerequisites ## Prerequisites
@ -26,7 +23,7 @@ This guide will help you set up a local development environment for TorrentPier.
```bash ```bash
# Clone the repository # Clone the repository
git clone https://github.com/torrentpier/torrentpier.git git clone https://github.com/torrentpier/torrentpier.git
cd dexter cd torrentpier
# Install dependencies # Install dependencies
composer install composer install
@ -122,13 +119,11 @@ Recommended extensions:
### Always Use Artisan Commands ### Always Use Artisan Commands
```bash ```bash
# Generate model with all resources # Generate model with all resources and API controller
php artisan make:model Post --all php artisan make:model Post --all --api
# Create controller # Create controller
php artisan make:controller PostController --resource php artisan make:controller PostController --resource
# Create React page component manually in resources/js/pages/
``` ```
### Useful Commands ### Useful Commands
@ -233,59 +228,27 @@ php artisan make:model Post -mfsc
// - Controller: app/Http/Controllers/PostController.php // - 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 ## Troubleshooting
### Common Issues ### Common Issues
1. **npm install fails** 1. **npm install fails**
```bash ```bash
rm -rf node_modules package-lock.json rm -rf node_modules package-lock.json
npm install npm install
``` ```
2. **Composer memory limit** 2. **Composer memory limit**
```bash ```bash
COMPOSER_MEMORY_LIMIT=-1 composer install COMPOSER_MEMORY_LIMIT=-1 composer install
``` ```
3. **Permission errors** 3. **Permission errors**
```bash ```bash
chmod -R 775 storage bootstrap/cache chmod -R 775 storage bootstrap/cache
``` ```
4. **Cache issues** 4. **Cache issues**
```bash ```bash
php artisan optimize:clear 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 # 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. This guide will help you install and set up TorrentPier on your server.
## Requirements ## Requirements
@ -190,9 +186,3 @@ If you encounter issues, try clearing all caches:
```bash ```bash
php artisan optimize:clear 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 # 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. 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 ## Key Features

View file

@ -1,5 +1,6 @@
--- ---
sidebar_position: 1 sidebar_position: 1
title: TorrentPier v2.x
--- ---
# Migrating from 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: Map old settings to new:
| Old Setting | New Setting | Notes | | Old Setting | New Setting | Notes |
|------------|-------------|-------| |------------------------------|-------------------------|--------------|
| `$bb_cfg['bt_announce_url']` | `TRACKER_ANNOUNCE_URL` | In .env file | | `$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 | | `$bb_cfg['ratio_enabled']` | `TRACKER_RATIO_ENABLED` | Boolean |
### Step 6: Test Migration ### Step 6: Test Migration
@ -108,25 +108,6 @@ php artisan migrate:status
php artisan torrentpier:verify 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 ## Post-Migration
### 1. Verify Data Integrity ### 1. Verify Data Integrity
@ -163,17 +144,6 @@ php artisan cache:clear
php artisan optimize 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 ## Common Issues
### Password Reset Required ### Password Reset Required
@ -202,18 +172,3 @@ If you had custom mods in v2.x:
2. Evaluate if still needed 2. Evaluate if still needed
3. Reimplement using Laravel patterns 3. Reimplement using Laravel patterns
4. Submit as pull requests 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" version: "1.0"
linter: jetbrains/qodana-php:2025.1
profile: profile:
name: qodana.recommended name: qodana.recommended
php:
version: "8.4"
linter: jetbrains/qodana-php:2025.1
include: include:
- name: CheckDependencyLicenses - 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