Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ mysql -u phplist_test --password=batterystaple phplist_test < resources/Database
```

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

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

Expand All @@ -118,13 +118,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=Configuration/PhpCodeSniffer/ bin/ src/ tests/ public/
vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/
```

Please also check the code structure using PHPMD:

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

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

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

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 @@
/.web-server-pid
/.webprj
/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
/var/
/vendor/
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ script:
- >
echo;
echo "Running PHPMD";
vendor/bin/phpmd src/ text Configuration/PHPMD/rules.xml;
vendor/bin/phpmd src/ text config/PHPMD/rules.xml;

- >
echo;
echo "Running PHP_CodeSniffer";
vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ bin/ src/ tests/ public/;
vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/;
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Move the PHPUnit configuration file (#283)
- Rename the Composer package to "phplist/core" (#275)
- Remove the obsolete core classes (#267)
- Adopt more of the default Symfony project structure (#265, #268, #269, #270, #285)
- Adopt more of the default Symfony project structure (#265, #268, #269, #270, #285, #291)

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ this code.
The phpList application is configured so that the built-in PHP web server can
run in development and testing mode, while Apache can run in production mode.

Please first set the database credentials in `Configuration/parameters.yml`.
Please first set the database credentials in `config/parameters.yml`.

### Development

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Configuration/config.yml → config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ framework:
#translator: { fallbacks: ['%locale%'] }
secret: '%secret%'
router:
resource: '%kernel.project_dir%/Configuration/routing.yml'
resource: '%kernel.project_dir%/config/routing.yml'
strict_requirements: ~
form: ~
csrf_protection: ~
Expand Down
2 changes: 1 addition & 1 deletion Configuration/config_dev.yml → config/config_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ imports:

framework:
router:
resource: '%kernel.project_dir%/Configuration/routing_dev.yml'
resource: '%kernel.project_dir%/config/routing_dev.yml'
strict_requirements: true
profiler: { only_exceptions: false }

Expand Down
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.
6 changes: 3 additions & 3 deletions src/Composer/ModuleFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private function validatePhpListSectionInExtra(array $extra)
/**
* Builds the YAML configuration file contents for the registered bundles in all modules.
*
* The returned string is intended to be written to Configuration/bundles.yml.
* The returned string is intended to be written to config/bundles.yml.
*
* @return string
*/
Expand Down Expand Up @@ -202,7 +202,7 @@ private function validateRoutesSectionInExtra(array $extra)
/**
* Builds the YAML configuration file contents for the registered routes in all modules.
*
* The returned string is intended to be written to Configuration/routing_modules.yml.
* The returned string is intended to be written to config/routing_modules.yml.
*
* @return string
*/
Expand Down Expand Up @@ -267,7 +267,7 @@ private function validateGeneralConfigurationSectionInExtra(array $extra)
/**
* Builds the YAML configuration file contents all modules.
*
* The returned string is intended to be written to Configuration/config_modules.yml.
* The returned string is intended to be written to config/config_modules.yml.
*
* @return string
*/
Expand Down
18 changes: 9 additions & 9 deletions src/Composer/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ class ScriptHandler extends SensioScriptHandler
/**
* @var string
*/
const BUNDLE_CONFIGURATION_FILE = '/Configuration/bundles.yml';
const BUNDLE_CONFIGURATION_FILE = '/config/bundles.yml';

/**
* @var string
*/
const ROUTES_CONFIGURATION_FILE = '/Configuration/routing_modules.yml';
const ROUTES_CONFIGURATION_FILE = '/config/routing_modules.yml';

/**
* @var string
*/
const PARAMETERS_CONFIGURATION_FILE = '/Configuration/parameters.yml';
const PARAMETERS_CONFIGURATION_FILE = '/config/parameters.yml';

/**
* @var string
*/
const GENERAL_CONFIGURATION_FILE = '/Configuration/config_modules.yml';
const GENERAL_CONFIGURATION_FILE = '/config/config_modules.yml';

/**
* @var string
*/
const PARAMETERS_TEMPLATE_FILE = '/Configuration/parameters.yml.dist';
const PARAMETERS_TEMPLATE_FILE = '/config/parameters.yml.dist';

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

/**
* Creates Configuration/bundles.yml
* Creates config/bundles.yml
* (the configuration file for the Symfony bundles provided by the modules).
*
* @param Event $event
Expand Down Expand Up @@ -220,7 +220,7 @@ private static function createAndWriteFile(string $path, string $contents)
}

/**
* Creates Configuration/routing_modules.yml
* Creates config/routing_modules.yml
* (the routes file for the Symfony bundles provided by the modules).
*
* @param Event $event
Expand Down Expand Up @@ -280,7 +280,7 @@ public static function warmProductionCache(Event $event)
}

/**
* Creates Configuration/parameters.yml (the parameters configuration file).
* Creates config/parameters.yml (the parameters configuration file).
*
* @return void
*/
Expand All @@ -301,7 +301,7 @@ public static function createParametersConfiguration()
}

/**
* Creates Configuration/config_modules.yml (the general configuration provided by the modules).
* Creates config/config_modules.yml (the general configuration provided by the modules).
*
* @param Event $event
*
Expand Down
8 changes: 4 additions & 4 deletions src/Core/ApplicationKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ protected function build(ContainerBuilder $container)
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getApplicationDir() . '/Configuration/parameters.yml');
$loader->load($this->getRootDir() . '/Configuration/config_' . $this->getEnvironment() . '.yml');
$loader->load($this->getApplicationDir() . '/Configuration/config_modules.yml');
$loader->load($this->getApplicationDir() . '/config/parameters.yml');
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
$loader->load($this->getApplicationDir() . '/config/config_modules.yml');
}

/**
Expand Down Expand Up @@ -166,7 +166,7 @@ private function bundlesFromConfiguration(): array
*/
private function readBundleConfiguration(): array
{
$configurationFilePath = $this->getApplicationDir() . '/Configuration/bundles.yml';
$configurationFilePath = $this->getApplicationDir() . '/config/bundles.yml';
if (!is_readable($configurationFilePath)) {
throw new \RuntimeException('The file "' . $configurationFilePath . '" could not be read.', 1504272377);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/ExtraLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ExtraLoader extends Loader
/**
* @var string
*/
const MODULE_ROUTING_CONFIGURATION_FILE = '/Configuration/routing_modules.yml';
const MODULE_ROUTING_CONFIGURATION_FILE = '/config/routing_modules.yml';

/**
* @var bool
Expand Down
8 changes: 4 additions & 4 deletions tests/Integration/Composer/ScriptsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ScriptsTest extends TestCase
*/
private function getBundleConfigurationFilePath(): string
{
return dirname(__DIR__, 3) . '/Configuration/bundles.yml';
return dirname(__DIR__, 3) . '/config/bundles.yml';
}

/**
Expand Down Expand Up @@ -58,7 +58,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 @@ -98,14 +98,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');
}
}