parameters:
    picture_directory: '%kernel.project_dir%/public/uploads'
services:
    # Default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
        public: false       # Defines the service as private, change to true if needed

    # Makes classes in src/ available to be used as services
    # This creates a service per class whose id is the fully-qualified class name
    App\:
        resource: '../src/*'
        exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'

    # Controllers are imported separately to make sure services can be injected
    # as action arguments even if you don't extend any base controller class
    App\Controller\:
        resource: '../src/Controller'
        tags: ['controller.service_arguments']

    # Define the FileUploader service
    App\Service\FileUploader:
        arguments:
            $targetDirectory: '%picture_directory%'  # Ensure this parameter is defined in your parameters.yaml or .env file
