|
| 1 | +# This file is the entry point to configure your own services. |
| 2 | +# Files in the packages/ subdirectory configure your dependencies. |
| 3 | + |
| 4 | +# Put parameters here that don't need to change on each machine where the app is deployed |
| 5 | +# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration |
| 6 | +parameters: |
| 7 | + |
| 8 | +services: |
| 9 | + _defaults: |
| 10 | + public: false |
| 11 | + # autowire: true # Automatically injects dependencies in your services. |
| 12 | + # autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. |
| 13 | + |
| 14 | + # Aliases |
| 15 | + Shivas\VersioningBundle\Service\VersionManagerInterface: '@shivas_versioning.manager' |
| 16 | + Shivas\VersioningBundle\Formatter\FormatterInterface: '@shivas_versioning.formatter.git' |
| 17 | + Shivas\VersioningBundle\Writer\WriterInterface: '@shivas_versioning.writer.version' |
| 18 | + |
| 19 | + # Services |
| 20 | + shivas_versioning.manager: |
| 21 | + class: Shivas\VersioningBundle\Service\VersionManager |
| 22 | + arguments: |
| 23 | + - '@shivas_versioning.cache.version' |
| 24 | + - '@Shivas\VersioningBundle\Writer\WriterInterface' |
| 25 | + - '@Shivas\VersioningBundle\Formatter\FormatterInterface' |
| 26 | + |
| 27 | + shivas_versioning.formatter.git: |
| 28 | + class: Shivas\VersioningBundle\Formatter\GitDescribeFormatter |
| 29 | + |
| 30 | + shivas_versioning.writer.version: |
| 31 | + class: Shivas\VersioningBundle\Writer\VersionWriter |
| 32 | + arguments: ['%kernel.project_dir%'] |
| 33 | + |
| 34 | + # Providers |
| 35 | + shivas_versioning.provider.version: |
| 36 | + class: Shivas\VersioningBundle\Provider\VersionProvider |
| 37 | + arguments: ['%kernel.project_dir%'] |
| 38 | + tags: |
| 39 | + - { name: shivas_versioning.provider, alias: version, priority: 100 } |
| 40 | + |
| 41 | + shivas_versioning.provider.git: |
| 42 | + class: Shivas\VersioningBundle\Provider\GitRepositoryProvider |
| 43 | + arguments: ['%kernel.project_dir%'] |
| 44 | + tags: |
| 45 | + - { name: shivas_versioning.provider, alias: git, priority: -25 } |
| 46 | + |
| 47 | + shivas_versioning.provider.revision: |
| 48 | + class: Shivas\VersioningBundle\Provider\RevisionProvider |
| 49 | + arguments: ['%kernel.project_dir%'] |
| 50 | + tags: |
| 51 | + - { name: shivas_versioning.provider, alias: revision, priority: -50 } |
| 52 | + |
| 53 | + shivas_versioning.provider.init: |
| 54 | + class: Shivas\VersioningBundle\Provider\InitialVersionProvider |
| 55 | + tags: |
| 56 | + - { name: shivas_versioning.provider, alias: init, priority: -75 } |
| 57 | + |
| 58 | + # Cache |
| 59 | + shivas_versioning.cache.version: |
| 60 | + parent: cache.system |
| 61 | + tags: |
| 62 | + - { name: cache.pool } |
| 63 | + |
| 64 | + # Commands |
| 65 | + shivas_versioning.command.status: |
| 66 | + class: Shivas\VersioningBundle\Command\StatusCommand |
| 67 | + arguments: ['@Shivas\VersioningBundle\Service\VersionManagerInterface'] |
| 68 | + tags: |
| 69 | + - { name: console.command } |
| 70 | + |
| 71 | + shivas_versioning.command.list_providers: |
| 72 | + class: Shivas\VersioningBundle\Command\ListProvidersCommand |
| 73 | + arguments: ['@Shivas\VersioningBundle\Service\VersionManagerInterface'] |
| 74 | + tags: |
| 75 | + - { name: console.command } |
| 76 | + |
| 77 | + shivas_versioning.command.version_bump: |
| 78 | + class: Shivas\VersioningBundle\Command\VersionBumpCommand |
| 79 | + arguments: ['@Shivas\VersioningBundle\Service\VersionManagerInterface'] |
| 80 | + tags: |
| 81 | + - { name: console.command } |
| 82 | + |
| 83 | + # Twig Extensions |
| 84 | + shivas_versioning.twig.version: |
| 85 | + class: Shivas\VersioningBundle\Twig\VersionExtension |
| 86 | + arguments: ['@Shivas\VersioningBundle\Service\VersionManagerInterface'] |
| 87 | + tags: |
| 88 | + - { name: twig.extension } |
0 commit comments