mjkruszewski/plumbok-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony Plumbok Bundle

1.0.1 2018-07-13 17:09 UTC

This package is auto-updated.

Last update: 2023-01-29 02:55:43 UTC


README

This library is implementation of Plumbok (PHP version of lombok) as Symfony bundle

Library allows to use java like annotations which will allow user to provide more readable and cleaner code.

Requirements:

  • PHP 7.1
  • Symfony 4.0 <

Installation

composer require mjkruszewski/plumbok-bundle

Create config in Symfony:

%Symfony.Project.Path%/config/packages/plumbok.yaml

Add entries to it as:

plumbok:
    dir: '%kernel.cache_dir%/plumbok'
    namespaces: [
      'App\Entity',
      'App\Exceptions',
      'App\Controller\Dto'
      ]

Change configuration for doctrine entries:

doctrine:
    orm:
        auto_generate_proxy_classes: true
        naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_mapping: true
        mappings:
            App:
                is_bundle: false
                type: annotation
                #CHANGE BELOW PATH TO CACHE DIR
                dir: '%kernel.cache_dir%/plumbok'
                #########
                prefix: 'App\Entity'
                alias: App
  • Dir field is not required
  • Namespaces from src/* catalogue under symfony project

Project Maintainers

  • Maciej Kruszewski

Related Libraries

Annotations

  • Property Annotations

    • @ToString
    • @Getter
    • @Setter
  • Class Annotations

    • @AllArgsConstructor
    • @RequiredArgsConstructor
    • @NoArgsConstructor
    • @Data
    • @Value
    • @EqualTo