Skip to content
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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
NGINX_IMAGE=nginx:stable-alpine3.23

# Backend
APP_IMAGE=split-fairly-dev:0.1.4
APP_IMAGE=split-fairly-dev:0.1.5
APP_NAME=split-fairly
APP_VERSION=0.1.4
APP_VERSION=0.1.5
APP_ENV=dev
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=secret
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_NAME = split-fairly
VERSION = 0.1.4
VERSION = 0.1.5

.DEFAULT_GOAL := help

Expand All @@ -18,10 +18,13 @@ help:
@echo " make show-composer-updates - Show outdated composer packages"
@echo " make update-composer-dependencies - Update composer packages"
@echo " make update-npm-dependencies - Update npm packages"
@echo " make npm-install - Install npm packages and regenerate lock file (if it is outdated)"
@echo "\n🧪 Testing & Quality:"
@echo " make test - Run backend and frontend tests"
@echo " make quality - Run quality checks"
@echo " make phpstan - Run static code analysis"
@echo " make rector - Run rector code modernizer (dry-run)"
@echo " make rector-apply - Apply rector transformations"
@echo " make style - Fix code style"
@echo " make arch - Test architecture"
@echo " make coverage - Generate coverage report"
Expand Down Expand Up @@ -116,6 +119,14 @@ phpstan:
@echo "🔍 Running static code analysis..."
docker compose exec -it app vendor/bin/phpstan analyse --memory-limit=1G

rector:
@echo "♻️ Running rector (dry-run)..."
docker compose exec -it app /root/.composer/vendor/bin/rector process --dry-run

rector-apply:
@echo "♻️ Applying rector transformations..."
docker compose exec -it app /root/.composer/vendor/bin/rector process

cs: style
style: codestyle
codestyle: code-style
Expand Down Expand Up @@ -144,7 +155,7 @@ clear:
docker compose exec -it app composer clear

maintenance: maintain
maintain: show-composer-updates update-composer-dependencies update-npm-dependencies
maintain: show-composer-updates update-composer-dependencies update-npm-dependencies npm-install

show-composer-updates:
@echo "📊 Checking for outdated composer packages..."
Expand All @@ -158,6 +169,10 @@ update-npm-dependencies:
@echo "📦 Updating npm dependencies..."
docker compose exec -it npm-dev npm update --save

npm-install:
@echo "📦 Installing npm dependencies and regenerating lock file..."
docker compose exec -it npm-dev npm install

coverage:
@echo "📈 Generating coverage report..."
docker compose exec -it app bin/phpunit -c phpunit.xml.dist --coverage-html ./coverage
Expand Down
4 changes: 2 additions & 2 deletions backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
"require-dev": {
"deptrac/deptrac": "^4.6",
"friendsofphp/php-cs-fixer": "^3.94.2",
"phpstan/phpstan": "^2.1.42",
"phpunit/phpunit": "^13.0.5",
"phpstan/phpstan": "^2.1.45",
"phpunit/phpunit": "^13.0.6",
"symfony/maker-bundle": "^1.67.0",
"symfony/stopwatch": "8.0.*",
"symfony/web-profiler-bundle": "8.0.*"
Expand Down
74 changes: 29 additions & 45 deletions backend/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions backend/migrations/Version20260128102345.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* This migration was previously executed but removed from version control.
* It is restored here to maintain database migration history integrity.
* No changes are applied as the database has already been migrated.
*/
final class Version20260128102345 extends AbstractMigration
{
public function getDescription(): string
{
return 'Legacy migration - already executed in database';
}

public function up(Schema $schema): void
{
// Migration was already executed - no changes needed
}

public function down(Schema $schema): void
{
// Not reversible
}
}
33 changes: 33 additions & 0 deletions backend/migrations/Version20260331095509.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260331095509 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE report DROP PRIMARY KEY, MODIFY id INT NOT NULL');
$this->addSql('ALTER TABLE report DROP uuid, DROP compensation_id, DROP checksum, DROP id');
$this->addSql('ALTER TABLE report ADD id VARCHAR(64) NOT NULL PRIMARY KEY');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE report ADD uuid BINARY(16) NOT NULL, ADD compensation_id VARCHAR(255) NOT NULL, ADD checksum VARCHAR(64) NOT NULL, CHANGE id id INT AUTO_INCREMENT NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C42F7784D17F50A6 ON report (uuid)');
}
}
6 changes: 0 additions & 6 deletions backend/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ parameters:
count: 1
path: public/index.php

-
message: '#^Property App\\Entity\\Report\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: src/Entity/Report.php

-
message: '#^Property App\\Entity\\User\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
identifier: property.unusedType
Expand Down
24 changes: 24 additions & 0 deletions backend/rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonySetList;

return RectorConfig::configure()
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
// Parallel processing (faster)
->withParallel()
// Target PHP 8.5
->withPhpSets(php85: true)
->withSets([
// Symfony 8.0 rules
SymfonySetList::SYMFONY_80,
// Code quality
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
]);
Loading
Loading