ihor-drevetskyi / component-bundle
Resource component [Symfony]
Installs: 128
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.4|^8.0
- ext-ctype: *
- ext-exif: *
- ext-iconv: *
- ext-json: *
- ext-simplexml: *
- babdev/pagerfanta-bundle: ^v2.11
- beberlei/doctrineextensions: ^v1.3
- cocur/slugify: ^4.0
- gedmo/doctrine-extensions: ^3.1
- jms/i18n-routing-bundle: ^3.1
- knplabs/doctrine-behaviors: ^2.2
- knplabs/knp-paginator-bundle: ^5.5
- sensio/framework-extra-bundle: ^6.1
- stof/doctrine-extensions-bundle: ^1.6
- suncat/mobile-detect-bundle: @dev
- symfony/asset: 4.4.*|5.3.*
- symfony/console: 4.4.*|5.3.*
- symfony/dotenv: 4.4.*|5.3.*
- symfony/flex: ^1.13.4
- symfony/framework-bundle: 4.4.*|5.3.*
- symfony/intl: 4.4.*|5.3.*
- symfony/orm-pack: ^2.1
- symfony/security-bundle: 4.4.*|5.3.*
- symfony/serializer-pack: ^1.0
- symfony/translation: 4.4.*|5.3.*
- symfony/twig-pack: ^1.0
- symfony/validator: 4.4.*|5.3.*
- symfony/yaml: 4.4.*|5.3.*
- twig/intl-extra: ^3.3
- vich/uploader-bundle: ^1.18
Requires (Dev)
README
This is a Flex pack designed to easily create new projects without compromising extensibility and flexibility.
This package contains basic settings for Symfony project.
It can be integrated with the Symfony framework using the bundle distributed with the library.
Leverage the awesome features of the tool to develop complex and high performance projects. Extend or override everything you want.
Documentation
Installation instructions and configuration:
Configuration before install
- add lines into the top of "services.yaml" file in the "config" folder of your project:
YAML:
imports: - { resource: '@ComponentBundle/Resources/config/default/parameters.yaml' }
- replace the contents of the "framework.yaml" file in the "config" folder of your project:
YAML:
imports: - { resource: '@ComponentBundle/Resources/config/packages/framework.yaml' }
- add parameters to the ".env" file at the root of the project:
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=8.0
DATABASE_SERVER_VERSION=8.0
PROJECT_SYSTEM_NAME='project'
The easiest way to install is by using Composer, run
composer require ihor-drevetskyi/component
Add ComponentBundle to your application kernel
If you don't use flex (you should), you need to manually enable bundle:
PHP:
// config/bundles.php return [ // ... ComponentBundle\ComponentBundle::class => ['all' => true], // ... ];
Configuration example
You can configure default query parameter names and base config of vendors by copying the files from folders:
-
packages (src/Resources/config/default/config/packages) into the "config/packages" folder of your project:
-
routes (src/Resources/config/default/routes) into the "config/routes" folder of your project:
######################################################################################################################## If your symfony version is 5, copy the files from folders:
-
packages5 (src/Resources/config/default/config/packages5) into the "config/packages" folder of your project:
- framework.yaml ########################################################################################################################
-
add lines into the top of "services.yaml" file in the "config" folder of your project:
YAML:
imports: - { resource: '@ComponentBundle/Resources/config/default/parameters.yaml' }
Basic description
This package contains useful Traits for Doctrine ORM and Dto objects.
Your attention is also presented some abstract entity classes, which will be useful when designing new entities.
Translatable entity:
Translation entity
When forming a URL, a situation is possible when specific logic is needed. In order not to duplicate logic every time you need to display a particular route, a class was implemented in which all routes are formed.
Look at useful classes for Doctrine ORM repository.
- AbstractRepository
- AbstractRepositoryInterface
- AbstractElementRepository
- AbstractElementRepositoryInterface
Two main directories of Traits:
- Dto/Traits - use for Dto objects
- Model/Traits - use for Entity
Examples of using
Latest updates
For notes about latest changes please
read CHANGELOG
, for required changes in your
code please read UPGRADE
chapter of documentation.
Requirements:
- Compatible with PHP
>=7.4
versions. - Compatible with Symfony
>=5.3
versions.
License
This package is available under the MIT License (MIT). Please see License File for more information.
Authors
The component was originally created by Ihor Drevetskyi.
I am engaged in the development of packages in my free time. I would be grateful for a little financial assistance (sponsorship) to my bank account:
UAH: 4441114452235219 | https://send.monobank.ua/EipFYXFSC
USD:
Beneficiary
IBAN UA933220010000026205312221935
Account No 5375418805868072
Receiver DREVETSKYI IHOR
Account with Institution
Bank: JSC UNIVERSAL BANK
City: KYIV, UKRAINE
Swift code: UNJSUAUKXXX
Intermediary
Bank: DEUTSCHE BANK TRUST CO. AMERICAS
City: NEW YORK, USA
Account number: 4452477
Swift code: BKTRUS33XXX
Details of payment:
- private transfer |
- transfer to own account |
- help to relative |
- honorarium |
- compensation for …