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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/.webprj
/bin/
/composer.lock
/Configuration/bundles.yml
/nbproject
/var/
/vendor/
Expand Down
6 changes: 0 additions & 6 deletions Configuration/bundles.yml

This file was deleted.

39 changes: 39 additions & 0 deletions Tests/Integration/Composer/ScriptsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,43 @@ public function binariesExist(string $fileName)
{
self::assertFileExists($this->getAbsoluteBinariesDirectoryPath() . $fileName);
}

/**
* @return string
*/
private function getBundleConfigurationFilePath(): string
{
return dirname(__DIR__, 3) . '/Configuration/bundles.yml';
}

/**
* @test
*/
public function bundleConfigurationFileExists()
{
self::assertFileExists($this->getBundleConfigurationFilePath());
}

/**
* @return string[][]
*/
public function bundleClassNameDataProvider(): array
{
return [
'framework bundle' => ['Symfony\\\\Bundle\\\\FrameworkBundle\\\\FrameworkBundle'],
'rest bundle' => ['PhpList\\\\RestBundle\\\\PhpListRestBundle'],
];
}

/**
* @test
* @param string $bundleClassName
* @dataProvider bundleClassNameDataProvider
*/
public function bundleConfigurationFileContainsModuleBundles(string $bundleClassName)
{
$fileContents = file_get_contents($this->getBundleConfigurationFilePath());

self::assertContains($bundleClassName, $fileContents);
}
}
14 changes: 12 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,28 @@
"list-modules": [
"PhpList\\PhpList4\\Composer\\ScriptHandler::listModules"
],
"bundle-configuration": [
"PhpList\\PhpList4\\Composer\\ScriptHandler::createBundleConfiguration"
],
"post-install-cmd": [
"@binaries",
"@document-root"
"@document-root",
"@bundle-configuration"
],
"post-update-cmd": [
"@binaries",
"@document-root"
"@document-root",
"@bundle-configuration"
]
},
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
},
"phplist/phplist4-core": {
"bundles": [
"PhpList\\RestBundle\\PhpListRestBundle"
]
}
}
}