sgc-fireball / tinyframework
The TinyFramework PHP framework
Requires
- php: ^8.2||^8.3
- ext-calendar: *
- ext-fileinfo: *
- ext-iconv: *
- ext-intl: *
- ext-json: *
- ext-mbstring: *
- ext-openssl: *
- ext-pcntl: *
- ext-posix: *
- ext-readline: *
- ext-simplexml: *
- roave/security-advisories: dev-latest
Requires (Dev)
- cyclonedx/cyclonedx-php-composer: ^4.2
- php-parallel-lint/php-parallel-lint: ^1.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/php-code-coverage: ^9.2
- phpunit/php-file-iterator: ^3.0
- phpunit/php-text-template: ^2.0
- phpunit/php-timer: ^5.0
- phpunit/php-token-stream: ^4.0
- phpunit/phpcov: ^8.2
- phpunit/phpunit: ^9.6
- symplify/easy-coding-standard: ^11.5
Suggests
- ext-amqp: To use AMQP (RabbitMQ) Queues instanceof Sync or Redis Queues.
- ext-apcu: To store UUID Node id, otherwise we are using filesystem fallback.
- ext-ftp: To use FTP protocol helper.
- ext-gd: To use image helper wrapper.
- ext-http: To use HTTP protocol helper.
- ext-imagick: To use PDF helper.
- ext-imap: To use IMAP protocol helper.
- ext-mysqli: To use mysqli database engine.
- ext-phar: To build the hole application as a phar, if desired.
- ext-redis: To use Redis for Caching, Queues instanceof database or file systems.
- ext-sodium: To use curve encryption, for example jwt(EdDSA).
- ext-sqlite3: To use sqlite3 database engine.
- ext-ssh2: To use sftp filesystem.
- ext-swoole: To use swoole http server to speed up your application.
- ext-yaml: To use openapi validation.
- swagger-api/swagger-ui: To generate a dynamically and beautiful documentation from a openapi.yaml.
This package is auto-updated.
Last update: 2024-11-09 12:29:40 UTC
README
Introduction
TinyFramework started as a small teaching project and continues to grow into a mature "full-vendor" PHP framework. The goal of the exercise was to build a framework that resides exclusively in the vendor directory and has no dependencies to other dependencies.
The implementations of all PSR standards were already removed after the first few classes. The reason for this was that all subareas would have to be implemented differently and inconsistently.
How to start
composer create-project --stability=dev --remove-vcs sgc-fireball/tinyframework-skeleton my-project master cd my-project; php console
Folders
- app
- Commands
- Http
- Controllers
- Api
- Middleware
- Controllers
- Providers
- config
- database
- migrations
- public
- resources
- lang
- en
- views
- lang
- storage
- cache
- logs
- psych
- sessions
Debugging
Open PHPStorm Settings PHP
/ Servers
:
- Name:
tinyframework
- Host:
127.0.0.1
- Port:
9000
- Debugger:
xdebug
- Use Path Mapping
Yes
- Map it to
/app
Use our preconfigurated alias phpx
.
phpx console
Performance
-
Enable composer classmap authoritative.
composer dump-autoload --optimize-autoloader --classmap-authoritative
-
Uninstall!!!! xdebug
-
Use PHP OpCache. But be case, and disable caching files under /storage/. Watch here TinyFramework Opcache
Todos
- Implement DateTime wrapper
- Implement Input::choise, Input::question, Input::confirm
- Implement Casts into Models
- Implement Auth Service / Interface
- URL Signer
- https://github.com/opis/closure/
- Implement ServiceProviders::provides to implement lazy loading services
- Paginator with url link support
Ideas
- foreach $loop and $loop->parent
- Markdown interpreter for Str.
Git Hooks
Please run:
git config --local core.hooksPath .githooks/
Author
Richard Hülsberg rh+github@hrdns.de