ihor-drevetskyi/component-bundle

This package is abandoned and no longer maintained. The author suggests using the ihor-drevetskyi/component package instead.

Resource component [Symfony]

v1.0.11 2021-09-07 22:26 UTC

This package is auto-updated.

Last update: 2021-09-08 21:15:54 UTC


README

This is a Flex pack designed to easily create new projects without compromising extensibility and flexibility.

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

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:

######################################################################################################################## If your symfony version is 5, copy the files from folders:

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.

Two main directories of Traits:

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 …

Contact information

LinkedIn | Telegram | Facebook | EMAIL