This is a community-powered CDN for Maniaplanet gaming platform. Users authenticate via OAuth2 with Maniaplanet accounts to upload files to shared folders. Files are blocked by default and require admin review before becoming publicly available. The system includes file browsing, user management, email notifications, and administrative review workflows.
- Run tests:
vendor/bin/phpunit - Run single test:
vendor/bin/phpunit --filter TestName - Static analysis:
vendor/bin/phpstan analyse - Clear cache:
bin/console cache:clear - Database migrations:
bin/console doctrine:migrations:migrate
- No license headers in source files
- PSR-4 autoloading:
App\namespace maps tosrc/ - Tests in
tests/withApp\Tests\namespace
- Classes: PascalCase (e.g.,
FilesystemManager,ManiaplanetUser) - Methods: camelCase with descriptive names
- Variables: camelCase, avoid abbreviations in new code
- Properties: camelCase with appropriate visibility
- Use parameter type hints and return type declarations
- Entity properties use Doctrine ORM annotations
- Interface implementations for UserInterface, Serializable
- PHPDoc blocks for all classes and public methods
- Describe parameters, return values, and purpose
- Include usage examples for complex methods
- Constructor dependency injection
- Service autowiring enabled
- Use AbstractController for web controllers
- Flash messages for user feedback
- Use exceptions for system errors
- Flash messages for user-facing errors
- Proper validation and security checks
- Feature-based test organization in
tests/Integration/ - Base class:
IntegrationTestCasefor common setup - Test classes named by feature:
FileBrowsingTest,FileUploadTest, etc.
- To mock already uploaded files, use givenUploadedFiles()
- Internally uses
vfsStreamfor file system isolation
- SQLite persisted database via
.env.test - Schema applied through
IntegrationTestCase.initDatabase() - Clean up entities between tests
- Use Symfony's
loginUser()to bypass OAuth2 in tests - Create test users directly in database
- Arrange, act, assert structure