brightlogic-tech / project-template
Package with common classes used across multiple projects.
v1.0.1
2023-06-02 14:12 UTC
Requires
- php: ^8.2
- ext-imagick: *
- ext-pdo: *
- ext-pdo_mysql: *
- ext-redis: *
- aws/aws-sdk-php: ^3.222
- bref/bref: ^1.7
- bref/extra-php-extensions: ^0.12.2
- contributte/console: ^0.9
- contributte/guzzlette: ^3.0
- firebase/php-jwt: ^6.0
- infinityloop-dev/coolbeans: ^0.11.2
- infinityloop-dev/graphpinator: ^1.4
- infinityloop-dev/graphpinator-constraint-directives: ^1.3
- infinityloop-dev/graphpinator-extra-types: ^1.6
- infinityloop-dev/graphpinator-nette: ^1.2
- infinityloop-dev/graphpinator-persisted-queries: ^1.2
- infinityloop-dev/graphpinator-query-cost: ^1.1
- infinityloop-dev/graphpinator-where-directives: ^1.0
- kdyby/redis: ^6.1
- latte/latte: ^3.0
- nette/application: ^3.1
- nette/bootstrap: ^3.1
- nette/caching: ^3.1.2
- nette/database: ^3.1.5
- nette/di: ^3.0
- nette/mail: ^3.1
- nette/robot-loader: ^3.3
- nette/security: ^3.1
- nette/utils: ^3.2
- ramsey/uuid: ^4.7
- tracy/tracy: ^2.9
Requires (Dev)
- infection/infection: ^0.26
- infinityloop-dev/coding-standard: ^0.2.3
- mhor/php-mediainfo: ^5.5.0
- phpstan/extension-installer: ^1.1.0
- phpstan/phpstan: ^1.10
- phpstan/phpstan-nette: ^1.2
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-strict-rules: ^1.4
- phpunit/phpunit: ^9.0
- roave/security-advisories: dev-latest
Suggests
- mhor/php-mediainfo: To anylze uploaded videos.
This package is not auto-updated.
Last update: 2024-11-16 17:02:50 UTC
README
Commonly used patterns & services for PHP projects hosted on AWS using Bref, Nette and GraPHPinator.
Bootstrap
TBA
Preloading
Simple preloader class to recursively walk directory and preload *.php files.
Create simple PHP file and initializer preloader.
<?php declare(strict_types = 1); \chdir(__DIR__); include __DIR__ . '/../vendor/autoload.php'; $paths = [ \BrightLogic\Template\Bootstrap::PROJECT_ROOT, ]; $preloader = new \BrightLogic\Template\Bootstrap(...$paths); $preloader->load();
StorageFile (S3)
TBA
Mailer (SES)
TBA
Messaging/Queue of tasks (SQS)
TBA
Logging
Redirects logs to database instead of filesystem.
Register services in configuration neon file.
services: - BrightLogic\Template\Logging\LogTable tracy.logger: BrightLogic\Template\Logging\DbLogger
log
table needs to be created. You may use provided bean to generate this table.
CREATE TABLE `log` ( `id` int(11) unsigned auto_increment primary key, `time` datetime default current_timestamp() not null, `level` varchar(20) not null, `head` varchar(255) not null, `message` longtext null ) CHARSET = utf8mb4; CREATE INDEX `log_level_index` ON `log` (level);
Commands
Commonly used commands which ease deploying and development.
Register services in configuration neon file.
services: - BrightLogic\Template\Command\ClearCacheCommand - BrightLogic\Template\Command\CompareDbCommand(%projectName%) - CoolBeans\Command\SqlGeneratorCommand