Skip to content

Commit

Permalink
[TASK] Rename the configuration directory to config/ (#106)
Browse files Browse the repository at this point in the history
This brings the project more in line with the default Symfony
project structure.
  • Loading branch information
oliverklee authored and Sam Tuke committed Mar 9, 2018
1 parent 6feaf79 commit e533f09
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ When running the integration tests, you will need to specify the database name
and access credentials on the command line (in the same line):

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


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

```bash
vendor/bin/phpcs --standard=vendor/phplist/core/Configuration/PhpCodeSniffer/ src/ tests/
vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/
```

Please also check the code structure using PHPMD:

```bash
vendor/bin/phpmd src/ text vendor/phplist/core/Configuration/PHPMD/rules.xml
vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml
```

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

```bash
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/
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/
```

This will execute all tests except for the unit tests and the integration
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
/.webprj
/bin/
/composer.lock
/Configuration/bundles.yml
/Configuration/config_modules.yml
/Configuration/parameters.yml
/Configuration/routing_modules.yml
/config/bundles.yml
/config/config_modules.yml
/config/parameters.yml
/config/routing_modules.yml
/nbproject
/public/
/var/
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ script:
- >
echo;
echo "Running PHPMD";
vendor/bin/phpmd src/ text vendor/phplist/core/Configuration/PHPMD/rules.xml;
vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml;
- >
echo;
echo "Running PHP_CodeSniffer";
vendor/bin/phpcs --standard=vendor/phplist/core/Configuration/PhpCodeSniffer/ src/ tests/;
vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/;
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Changed
- Move the PHPUnit configuration file (#99)
- Use the renamed phplist/core package (#97)
- Adopt more of the default Symfony project structure (#92, #93, #94, #95, #102)
- Adopt more of the default Symfony project structure (#92, #93, #94, #95, #102, #106)

### Deprecated

Expand Down
File renamed without changes.
5 changes: 1 addition & 4 deletions src/DependencyInjection/PhpListRestExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ public function load(array $configs, ContainerBuilder $containerBuilder)
// This parameter is unused, but not optional. This line will avoid a static analysis warning this.
$configs;

$loader = new YamlFileLoader(
$containerBuilder,
new FileLocator(__DIR__ . '/../../Configuration')
);
$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__ . '/../../config'));
$loader->load('services.yml');
}
}
8 changes: 4 additions & 4 deletions tests/Integration/Composer/ScriptsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function binariesExist(string $fileName)
*/
private function getBundleConfigurationFilePath(): string
{
return dirname(__DIR__, 3) . '/Configuration/bundles.yml';
return dirname(__DIR__, 3) . '/config/bundles.yml';
}

/**
Expand Down Expand Up @@ -131,7 +131,7 @@ public function bundleConfigurationFileContainsModuleBundles(string $bundleClass
*/
private function getModuleRoutesConfigurationFilePath(): string
{
return dirname(__DIR__, 3) . '/Configuration/routing_modules.yml';
return dirname(__DIR__, 3) . '/config/routing_modules.yml';
}

/**
Expand Down Expand Up @@ -171,14 +171,14 @@ public function moduleRoutesConfigurationFileContainsModuleRoutes(string $routeS
*/
public function parametersConfigurationFileExists()
{
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/parameters.yml');
static::assertFileExists(dirname(__DIR__, 3) . '/config/parameters.yml');
}

/**
* @test
*/
public function modulesConfigurationFileExists()
{
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/config_modules.yml');
static::assertFileExists(dirname(__DIR__, 3) . '/config/config_modules.yml');
}
}

0 comments on commit e533f09

Please sign in to comment.