nations-original / php-simple-framework-template
Package info
github.com/Ondottr/PHP_SF_Template
Type:project
pkg:composer/nations-original/php-simple-framework-template
Requires
- php: 8.3.*
- ext-amqp: *
- ext-apcu: *
- ext-ctype: *
- ext-curl: *
- ext-gd: *
- ext-http: *
- ext-iconv: *
- ext-intl: *
- ext-json: *
- ext-memcached: *
- ext-posix: *
- ext-redis: *
- ext-yaml: *
- ext-zend-opcache: *
- ext-zlib: *
- composer/package-versions-deprecated: 1.11.99.4
- nations-original/php-simple-framework: ~1.1.0
- nelmio/api-doc-bundle: ^4.16
- php-amqplib/php-amqplib: ^3.6
- phpdocumentor/reflection-docblock: ^5.3
- phpstan/phpdoc-parser: ^1.24
- predis/predis: ^2.0
- psr/simple-cache: ^3.0
- symfony/amqp-messenger: ^7.4
- symfony/asset: ^7.4
- symfony/console: ^7.4
- symfony/dotenv: ^7.4
- symfony/expression-language: ^7.4
- symfony/flex: ^1.17|^2
- symfony/framework-bundle: ^7.4
- symfony/http-client: ^7.4
- symfony/intl: ^7.4
- symfony/messenger: ^7.4
- symfony/mime: ^7.4
- symfony/process: ^7.4
- symfony/property-access: ^7.4
- symfony/property-info: ^7.4
- symfony/proxy-manager-bridge: *
- symfony/runtime: ^7.4
- symfony/serializer: ^7.4
- symfony/string: ^7.4
- symfony/twig-bundle: ^7.4
- symfony/web-link: ^7.4
- symfony/yaml: ^7.4
- twig/extra-bundle: ^2.12|^3.0
- twig/twig: ^3.20
Requires (Dev)
- codeception/codeception: ^5.3
- codeception/module-asserts: ^3.3
- codeception/module-symfony: ^3.8
- codeception/module-webdriver: ^4.0
- doctrine/doctrine-fixtures-bundle: ^3.4
- phpunit/php-code-coverage: ^12
- phpunit/phpunit: ^12
- roave/security-advisories: dev-latest
- symfony/browser-kit: ^7.4
- symfony/css-selector: ^7.4
- symfony/debug-bundle: ^7.4
- symfony/maker-bundle: ^1.43
- symfony/phpunit-bridge: ^6.2
- symfony/stopwatch: ^7.4
- symfony/thanks: ^1.2
- symfony/web-profiler-bundle: ^7.4
Conflicts
Replaces
- dev-master
- v1.0.0
- dev-dependabot/composer/doctrine/doctrine-fixtures-bundle-4.3.1
- dev-dependabot/composer/nelmio/api-doc-bundle-5.9.5
- dev-dependabot/composer/predis/predis-3.4.2
- dev-dependabot/composer/phpstan/phpdoc-parser-2.3.2
- dev-dependabot/composer/symfony-fab2e32e6b
- dev-dependabot/composer/composer/package-versions-deprecated-1.11.99.5
- dev-dependabot/github_actions/actions/checkout-6
- dev-dependabot/github_actions/docker/login-action-4
- dev-dependabot/github_actions/docker/setup-buildx-action-4
- dev-dependabot/github_actions/actions/github-script-8
- dev-dependabot/github_actions/docker/build-push-action-7
- dev-chore/github-stuff
- dev-chore/licensing
This package is auto-updated.
Last update: 2026-03-31 08:50:34 UTC
README
The official project template for PHP Simple Framework. Bootstrap a full working application in one command.
Package: nations-original/php-simple-framework-template
License: ISC
Author: Dmytro Dyvulskyi — CEO & Lead Developer, Nations Original
Documentation
Full documentation is available at wiki.nations-original.com/framework.
| Section | Topics |
|---|---|
| Getting Started | Installation, constants, creating your first page |
| Core | Lifecycle, controllers, routing, middleware, views, sessions, redirects |
| Dual Kernel | PHP_SF kernel + Symfony kernel coexistence, bootstrap order |
| Data & Persistence | Entities, repositories, validation, cache, fixtures, enums |
| Infrastructure | Docker, Redis, RabbitMQ, template cache, kernel config |
| Supporting Features | Helper functions, translation, events, CRUD controller |
| Development & Testing | PHPUnit, Codeception, dev mode |
| Frontend | Asset building with Webpack |
Requirements
Required:
- PHP 8.3+ with extensions:
apcu,curl,gd,intl,redis,yaml,opcache - Composer 2.x
- Node.js 18+ with yarn
- Redis (routing cache and application cache)
- At least one database: PostgreSQL 15+ / MySQL / MariaDB
Optional:
ext-amqp+ RabbitMQ — only if you use message queuesext-memcached— only if you use Memcached as a cache backend- Docker —
docker-compose.ymlprovided for all services - Symfony CLI — used by
run.shfor HTTPS local dev
Installation
composer create-project nations-original/php-simple-framework-template my-app
cd my-app
./init.sh
init.sh runs once per project — it configures database connections, generates .env and config/constants.php, creates entity/repository directories, and builds frontend assets.
For subsequent machines cloning an already-configured project:
./install.sh
Full setup details: Installation guide.
Project Structure
App/
├── Http/
│ ├── Controller/ # PHP_SF attribute-routed controllers
│ ├── SymfonyControllers/ # Native Symfony controllers (fallback)
│ └── Middleware/ # Custom middleware
├── Entity/ # Doctrine entities, created by init.sh per connection
├── Repository/ # Entity repositories, created by init.sh per connection
├── DataFixtures/ # Doctrine fixtures (per connection)
├── Enums/ # Application enums
├── DoctrineLifecycleCallbacks/
└── Kernel.php # App kernel (extends Symfony Kernel)
config/
├── constants.php # App-level constants (not committed — copy from .example)
├── packages/ # Symfony bundle config (doctrine, messenger, cache, …)
└── routes.yaml # Symfony controller route import
templates/ # PHP view classes (App\View\ namespace)
lang/ # Translation files
public/ # Web root
Database Setup
The template ships with only a dummy (default) entity manager that fails fast to prevent accidental cross-DB access. init.sh adds your real connections interactively — you can configure one or more, with any supported engine.
Once configured, the standard Doctrine commands work per-connection using --em=<name>:
bin/console doctrine:database:create --if-not-exists --em=<name> bin/console doctrine:schema:create --em=<name> bin/console doctrine:fixtures:load --no-interaction --em=<name>
At minimum you need one connection and one User entity (also generated by init.sh) — the framework requires it for authentication and session handling.
Development
./run.sh # Start dev server on port 7000 (uses Symfony CLI if available) bin/console # Symfony console npm run dev # Frontend dev build with watch npm run build # Frontend production build docker-compose up -d # Start all infrastructure services
Infrastructure services (Docker)
| Service | Port |
|---|---|
| PostgreSQL | 7003 |
| MySQL | 7005 |
| MariaDB | 7006 |
| Redis | 7002 |
| Memcached | 7001 |
| RabbitMQ | 7004 |
| Selenium | 4444 |
Full reference: Docker & Local Environment.
Testing
Tests are written with Codeception (Unit, Functional, Acceptance suites).
vendor/bin/codecept run # Run all suites vendor/bin/codecept run Functional # Run specific suite
Full reference: Codeception.
License
ISC — see LICENSE.MD.