Skip to content

Commit

Permalink
[TASK] Rename the configuration directory to config/ (#82)
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 8baf595 commit c7d09f0
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,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 @@ -125,7 +125,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 @@ -4,10 +4,10 @@
/.project
/.webprj
/bin/
/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 @@ -73,9 +73,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 @@ -12,7 +12,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Changed
- Move the PHPUnit configuration file (#78)
- Use the renamed phplist/core package (#77)
- Adopt more of the default Symfony project structure (#73, #74, #75, #79)
- Adopt more of the default Symfony project structure (#73, #74, #75, #79, #82)

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ run in development and testing mode, while Apache can run in production mode.
Then reload or restart Apache to activate the configuration changes.

If you cannot set any environment variables in your Apache configuration, you
can also set the database credentials in `Configuration/parameters.yml`.
can also set the database credentials in `config/parameters.yml`.
However, this should only be used as a last resort as this reduces security (as an
attacker with read access to the files on the web server then could read that
file, whereas they then still would not be able to access the environment
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
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 @@ -130,7 +130,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 All @@ -146,14 +146,14 @@ public function moduleRoutesConfigurationFileExists()
*/
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 c7d09f0

Please sign in to comment.