Skip to content

Commit 6f361d0

Browse files
oliverkleeSam Tuke
authored and
Sam Tuke
committed
[TASK] Rename the configuration directory to config/ (#291)
This brings the project more in line with the default Symfony project structure.
1 parent 01ee312 commit 6f361d0

21 files changed

+35
-35
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ mysql -u phplist_test --password=batterystaple phplist_test < resources/Database
9797
```
9898

9999
For running the integration tests, please first enter the database name
100-
and access credentials in `Configuration/parameters.yml`.
100+
and access credentials in `config/parameters.yml`.
101101

102102
After that has been done, you can run the integration tests:
103103

@@ -118,13 +118,13 @@ We will only merge pull requests that follow the project's coding style.
118118
Please check your code with the provided PHP_CodeSniffer standard:
119119

120120
```bash
121-
vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ bin/ src/ tests/ public/
121+
vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/
122122
```
123123

124124
Please also check the code structure using PHPMD:
125125

126126
```bash
127-
vendor/bin/phpmd src/ text Configuration/PHPMD/rules.xml
127+
vendor/bin/phpmd src/ text config/PHPMD/rules.xml
128128
```
129129

130130
And also please run the static code analysis:
@@ -136,7 +136,7 @@ vendor/bin/phpstan analyse -l 5 bin/ src/ tests/ public/
136136
You can also run all code style checks using one long line from a bash shell:
137137

138138
```bash
139-
find src/ tests/ public/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && php -l bin/* && vendor/bin/phpstan analyse -l 5 bin/ src/ tests/ public/ && vendor/bin/phpmd src/ text Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ bin/ src/ tests/ public/
139+
find src/ tests/ public/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && php -l bin/* && vendor/bin/phpstan analyse -l 5 bin/ src/ tests/ public/ && vendor/bin/phpmd src/ text config/PHPMD/rules.xml && vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/
140140
```
141141

142142
This will execute all tests except for the unit tests and the integration

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
/.web-server-pid
66
/.webprj
77
/composer.lock
8-
/Configuration/bundles.yml
9-
/Configuration/config_modules.yml
10-
/Configuration/parameters.yml
11-
/Configuration/routing_modules.yml
8+
/config/bundles.yml
9+
/config/config_modules.yml
10+
/config/parameters.yml
11+
/config/routing_modules.yml
1212
/nbproject
1313
/var/
1414
/vendor/

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ script:
8484
- >
8585
echo;
8686
echo "Running PHPMD";
87-
vendor/bin/phpmd src/ text Configuration/PHPMD/rules.xml;
87+
vendor/bin/phpmd src/ text config/PHPMD/rules.xml;
8888
8989
- >
9090
echo;
9191
echo "Running PHP_CodeSniffer";
92-
vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ bin/ src/ tests/ public/;
92+
vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/;

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2020
- Move the PHPUnit configuration file (#283)
2121
- Rename the Composer package to "phplist/core" (#275)
2222
- Remove the obsolete core classes (#267)
23-
- Adopt more of the default Symfony project structure (#265, #268, #269, #270, #285)
23+
- Adopt more of the default Symfony project structure (#265, #268, #269, #270, #285, #291)
2424

2525
### Deprecated
2626

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ this code.
6464
The phpList application is configured so that the built-in PHP web server can
6565
run in development and testing mode, while Apache can run in production mode.
6666

67-
Please first set the database credentials in `Configuration/parameters.yml`.
67+
Please first set the database credentials in `config/parameters.yml`.
6868

6969
### Development
7070

File renamed without changes.

Configuration/config.yml renamed to config/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ framework:
1212
#translator: { fallbacks: ['%locale%'] }
1313
secret: '%secret%'
1414
router:
15-
resource: '%kernel.project_dir%/Configuration/routing.yml'
15+
resource: '%kernel.project_dir%/config/routing.yml'
1616
strict_requirements: ~
1717
form: ~
1818
csrf_protection: ~

Configuration/config_dev.yml renamed to config/config_dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ imports:
33

44
framework:
55
router:
6-
resource: '%kernel.project_dir%/Configuration/routing_dev.yml'
6+
resource: '%kernel.project_dir%/config/routing_dev.yml'
77
strict_requirements: true
88
profiler: { only_exceptions: false }
99

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/Composer/ModuleFinder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private function validatePhpListSectionInExtra(array $extra)
119119
/**
120120
* Builds the YAML configuration file contents for the registered bundles in all modules.
121121
*
122-
* The returned string is intended to be written to Configuration/bundles.yml.
122+
* The returned string is intended to be written to config/bundles.yml.
123123
*
124124
* @return string
125125
*/
@@ -202,7 +202,7 @@ private function validateRoutesSectionInExtra(array $extra)
202202
/**
203203
* Builds the YAML configuration file contents for the registered routes in all modules.
204204
*
205-
* The returned string is intended to be written to Configuration/routing_modules.yml.
205+
* The returned string is intended to be written to config/routing_modules.yml.
206206
*
207207
* @return string
208208
*/
@@ -267,7 +267,7 @@ private function validateGeneralConfigurationSectionInExtra(array $extra)
267267
/**
268268
* Builds the YAML configuration file contents all modules.
269269
*
270-
* The returned string is intended to be written to Configuration/config_modules.yml.
270+
* The returned string is intended to be written to config/config_modules.yml.
271271
*
272272
* @return string
273273
*/

src/Composer/ScriptHandler.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ class ScriptHandler extends SensioScriptHandler
2424
/**
2525
* @var string
2626
*/
27-
const BUNDLE_CONFIGURATION_FILE = '/Configuration/bundles.yml';
27+
const BUNDLE_CONFIGURATION_FILE = '/config/bundles.yml';
2828

2929
/**
3030
* @var string
3131
*/
32-
const ROUTES_CONFIGURATION_FILE = '/Configuration/routing_modules.yml';
32+
const ROUTES_CONFIGURATION_FILE = '/config/routing_modules.yml';
3333

3434
/**
3535
* @var string
3636
*/
37-
const PARAMETERS_CONFIGURATION_FILE = '/Configuration/parameters.yml';
37+
const PARAMETERS_CONFIGURATION_FILE = '/config/parameters.yml';
3838

3939
/**
4040
* @var string
4141
*/
42-
const GENERAL_CONFIGURATION_FILE = '/Configuration/config_modules.yml';
42+
const GENERAL_CONFIGURATION_FILE = '/config/config_modules.yml';
4343

4444
/**
4545
* @var string
4646
*/
47-
const PARAMETERS_TEMPLATE_FILE = '/Configuration/parameters.yml.dist';
47+
const PARAMETERS_TEMPLATE_FILE = '/config/parameters.yml.dist';
4848

4949
/**
5050
* @return string absolute application root directory without the trailing slash
@@ -179,7 +179,7 @@ private static function calculateMaximumPackageNameLength(array $modules): int
179179
}
180180

181181
/**
182-
* Creates Configuration/bundles.yml
182+
* Creates config/bundles.yml
183183
* (the configuration file for the Symfony bundles provided by the modules).
184184
*
185185
* @param Event $event
@@ -220,7 +220,7 @@ private static function createAndWriteFile(string $path, string $contents)
220220
}
221221

222222
/**
223-
* Creates Configuration/routing_modules.yml
223+
* Creates config/routing_modules.yml
224224
* (the routes file for the Symfony bundles provided by the modules).
225225
*
226226
* @param Event $event
@@ -280,7 +280,7 @@ public static function warmProductionCache(Event $event)
280280
}
281281

282282
/**
283-
* Creates Configuration/parameters.yml (the parameters configuration file).
283+
* Creates config/parameters.yml (the parameters configuration file).
284284
*
285285
* @return void
286286
*/
@@ -301,7 +301,7 @@ public static function createParametersConfiguration()
301301
}
302302

303303
/**
304-
* Creates Configuration/config_modules.yml (the general configuration provided by the modules).
304+
* Creates config/config_modules.yml (the general configuration provided by the modules).
305305
*
306306
* @param Event $event
307307
*

src/Core/ApplicationKernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ protected function build(ContainerBuilder $container)
121121
*/
122122
public function registerContainerConfiguration(LoaderInterface $loader)
123123
{
124-
$loader->load($this->getApplicationDir() . '/Configuration/parameters.yml');
125-
$loader->load($this->getRootDir() . '/Configuration/config_' . $this->getEnvironment() . '.yml');
126-
$loader->load($this->getApplicationDir() . '/Configuration/config_modules.yml');
124+
$loader->load($this->getApplicationDir() . '/config/parameters.yml');
125+
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
126+
$loader->load($this->getApplicationDir() . '/config/config_modules.yml');
127127
}
128128

129129
/**
@@ -166,7 +166,7 @@ private function bundlesFromConfiguration(): array
166166
*/
167167
private function readBundleConfiguration(): array
168168
{
169-
$configurationFilePath = $this->getApplicationDir() . '/Configuration/bundles.yml';
169+
$configurationFilePath = $this->getApplicationDir() . '/config/bundles.yml';
170170
if (!is_readable($configurationFilePath)) {
171171
throw new \RuntimeException('The file "' . $configurationFilePath . '" could not be read.', 1504272377);
172172
}

src/Routing/ExtraLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ExtraLoader extends Loader
1717
/**
1818
* @var string
1919
*/
20-
const MODULE_ROUTING_CONFIGURATION_FILE = '/Configuration/routing_modules.yml';
20+
const MODULE_ROUTING_CONFIGURATION_FILE = '/config/routing_modules.yml';
2121

2222
/**
2323
* @var bool

tests/Integration/Composer/ScriptsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ScriptsTest extends TestCase
1717
*/
1818
private function getBundleConfigurationFilePath(): string
1919
{
20-
return dirname(__DIR__, 3) . '/Configuration/bundles.yml';
20+
return dirname(__DIR__, 3) . '/config/bundles.yml';
2121
}
2222

2323
/**
@@ -58,7 +58,7 @@ public function bundleConfigurationFileContainsModuleBundles(string $bundleClass
5858
*/
5959
private function getModuleRoutesConfigurationFilePath(): string
6060
{
61-
return dirname(__DIR__, 3) . '/Configuration/routing_modules.yml';
61+
return dirname(__DIR__, 3) . '/config/routing_modules.yml';
6262
}
6363

6464
/**
@@ -98,14 +98,14 @@ public function moduleRoutesConfigurationFileContainsModuleRoutes(string $routeS
9898
*/
9999
public function parametersConfigurationFileExists()
100100
{
101-
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/parameters.yml');
101+
static::assertFileExists(dirname(__DIR__, 3) . '/config/parameters.yml');
102102
}
103103

104104
/**
105105
* @test
106106
*/
107107
public function modulesConfigurationFileExists()
108108
{
109-
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/config_modules.yml');
109+
static::assertFileExists(dirname(__DIR__, 3) . '/config/config_modules.yml');
110110
}
111111
}

0 commit comments

Comments
 (0)