Skip to content

Commit e533f09

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

File tree

7 files changed

+16
-19
lines changed

7 files changed

+16
-19
lines changed

.github/CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ When running the integration tests, you will need to specify the database name
100100
and access credentials on the command line (in the same line):
101101

102102
```bash
103-
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml tests/Integration/
103+
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c config/PHPUnit/phpunit.xml tests/Integration/
104104
```
105105

106106

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

118118
```bash
119-
vendor/bin/phpcs --standard=vendor/phplist/core/Configuration/PhpCodeSniffer/ src/ tests/
119+
vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/
120120
```
121121

122122
Please also check the code structure using PHPMD:
123123

124124
```bash
125-
vendor/bin/phpmd src/ text vendor/phplist/core/Configuration/PHPMD/rules.xml
125+
vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml
126126
```
127127

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

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

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

.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
/.webprj
66
/bin/
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
/public/
1414
/var/

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ script:
8181
- >
8282
echo;
8383
echo "Running PHPMD";
84-
vendor/bin/phpmd src/ text vendor/phplist/core/Configuration/PHPMD/rules.xml;
84+
vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml;
8585
8686
- >
8787
echo;
8888
echo "Running PHP_CodeSniffer";
89-
vendor/bin/phpcs --standard=vendor/phplist/core/Configuration/PhpCodeSniffer/ src/ tests/;
89+
vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/;

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1616
### Changed
1717
- Move the PHPUnit configuration file (#99)
1818
- Use the renamed phplist/core package (#97)
19-
- Adopt more of the default Symfony project structure (#92, #93, #94, #95, #102)
19+
- Adopt more of the default Symfony project structure (#92, #93, #94, #95, #102, #106)
2020

2121
### Deprecated
2222

File renamed without changes.

src/DependencyInjection/PhpListRestExtension.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ public function load(array $configs, ContainerBuilder $containerBuilder)
3030
// This parameter is unused, but not optional. This line will avoid a static analysis warning this.
3131
$configs;
3232

33-
$loader = new YamlFileLoader(
34-
$containerBuilder,
35-
new FileLocator(__DIR__ . '/../../Configuration')
36-
);
33+
$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__ . '/../../config'));
3734
$loader->load('services.yml');
3835
}
3936
}

tests/Integration/Composer/ScriptsTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function binariesExist(string $fileName)
9292
*/
9393
private function getBundleConfigurationFilePath(): string
9494
{
95-
return dirname(__DIR__, 3) . '/Configuration/bundles.yml';
95+
return dirname(__DIR__, 3) . '/config/bundles.yml';
9696
}
9797

9898
/**
@@ -131,7 +131,7 @@ public function bundleConfigurationFileContainsModuleBundles(string $bundleClass
131131
*/
132132
private function getModuleRoutesConfigurationFilePath(): string
133133
{
134-
return dirname(__DIR__, 3) . '/Configuration/routing_modules.yml';
134+
return dirname(__DIR__, 3) . '/config/routing_modules.yml';
135135
}
136136

137137
/**
@@ -171,14 +171,14 @@ public function moduleRoutesConfigurationFileContainsModuleRoutes(string $routeS
171171
*/
172172
public function parametersConfigurationFileExists()
173173
{
174-
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/parameters.yml');
174+
static::assertFileExists(dirname(__DIR__, 3) . '/config/parameters.yml');
175175
}
176176

177177
/**
178178
* @test
179179
*/
180180
public function modulesConfigurationFileExists()
181181
{
182-
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/config_modules.yml');
182+
static::assertFileExists(dirname(__DIR__, 3) . '/config/config_modules.yml');
183183
}
184184
}

0 commit comments

Comments
 (0)