Skip to content

Commit e5c3c94

Browse files
#6 Update services and directories according to Symfony best practices. Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly. Services must be prefixed with the bundle alias instead of using fully qualified class names => cleverage_flysystem_process
1 parent 4c151fa commit e5c3c94

File tree

5 files changed

+29
-19
lines changed

5 files changed

+29
-19
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ v2.0
55

66
* [#5](https://github.com/cleverage/flysystem-process-bundle/issues/5) Replace "oneup/flysystem-bundle": ">1.0,<4.0" by "league/flysystem-bundle": "^3.0"
77
* [#5](https://github.com/cleverage/flysystem-process-bundle/issues/5) Update Tasks for "league/flysystem-bundle": "^3.0"
8+
* [#6](https://github.com/cleverage/flysystem-process-bundle/issues/6) Update services according to Symfony best practices. Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
9+
Services must be prefixed with the bundle alias instead of using fully qualified class names => `cleverage_flysystem_process`
810

911
### Changes
1012

config/services/task.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
_defaults:
3+
public: false
4+
tags:
5+
- { name: monolog.logger, channel: cleverage_process_task }
6+
7+
cleverage_flysystem_process.task.file_fetch:
8+
class: CleverAge\FlysystemProcessBundle\Task\FileFetch
9+
10+
cleverage_flysystem_process.task.list_content:
11+
class: CleverAge\FlysystemProcessBundle\Task\ListContentTask
12+
13+
cleverage_flysystem_process.task.remove_file:
14+
class: CleverAge\FlysystemProcessBundle\Task\RemoveFileTask
15+
arguments:
16+
- '@monolog.logger'
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<?php declare(strict_types=1);
2-
/**
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
36
* This file is part of the CleverAge/FlysystemProcessBundle package.
47
*
5-
* Copyright (C) 2017-2019 Clever-Age
8+
* Copyright (c) Clever-Age
69
*
710
* For the full copyright and license information, please view the LICENSE
811
* file that was distributed with this source code.
@@ -12,13 +15,10 @@
1215

1316
use Symfony\Component\HttpKernel\Bundle\Bundle;
1417

15-
/**
16-
* Class CleverAgeFlysystemProcessBundle
17-
*
18-
* @author Valentin Clavreul <[email protected]>
19-
* @author Vincent Chalnot <[email protected]>
20-
* @author Madeline Veyrenc <[email protected]>
21-
*/
2218
class CleverAgeFlysystemProcessBundle extends Bundle
2319
{
20+
public function getPath(): string
21+
{
22+
return \dirname(__DIR__);
23+
}
2424
}

src/DependencyInjection/CleverAgeFlysystemProcessExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CleverAgeFlysystemProcessExtension extends Extension
2828
{
2929
public function load(array $configs, ContainerBuilder $container): void
3030
{
31-
$this->findServices($container, __DIR__.'/../Resources/config/services');
31+
$this->findServices($container, __DIR__.'/../../config/services');
3232
}
3333

3434
/**

src/Resources/config/services/task.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)