1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,17 @@ |
1 |
+# EditorConfig is awesome: http://EditorConfig.org |
|
2 |
+ |
|
3 |
+# top-most EditorConfig file |
|
4 |
+root = true |
|
5 |
+ |
|
6 |
+# Unix-style newlines with a newline ending every file |
|
7 |
+[*] |
|
8 |
+end_of_line = lf |
|
9 |
+insert_final_newline = true |
|
10 |
+trim_trailing_whitespace = true |
|
11 |
+ |
|
12 |
+[*.{php,twig,yml}] |
|
13 |
+indent_style = space |
|
14 |
+indent_size = 4 |
|
15 |
+ |
|
16 |
+[*.{html5,svg,min.css,min.js}] |
|
17 |
+insert_final_newline = false |
0 | 11 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,58 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+$header = <<<EOF |
|
4 |
+This file is part of eSales Media SinglereisenBundle. |
|
5 |
+ |
|
6 |
+(c) Benjamin Roth |
|
7 |
+ |
|
8 |
+@license proprietary |
|
9 |
+EOF; |
|
10 |
+ |
|
11 |
+$finder = PhpCsFixer\Finder::create() |
|
12 |
+ ->exclude('Resources') |
|
13 |
+ ->in([__DIR__.'/src', __DIR__.'/tests']) |
|
14 |
+; |
|
15 |
+ |
|
16 |
+return PhpCsFixer\Config::create() |
|
17 |
+ ->setRules([ |
|
18 |
+ '@Symfony' => true, |
|
19 |
+ '@Symfony:risky' => true, |
|
20 |
+ '@PHPUnit60Migration:risky' => true, |
|
21 |
+ 'align_multiline_comment' => true, |
|
22 |
+ 'array_syntax' => ['syntax' => 'short'], |
|
23 |
+ 'combine_consecutive_issets' => true, |
|
24 |
+ 'combine_consecutive_unsets' => true, |
|
25 |
+ 'compact_nullable_typehint' => true, |
|
26 |
+ 'general_phpdoc_annotation_remove' => [ |
|
27 |
+ 'expectedException', |
|
28 |
+ 'expectedExceptionMessage', |
|
29 |
+ ], |
|
30 |
+ 'header_comment' => ['header' => $header], |
|
31 |
+ 'heredoc_to_nowdoc' => true, |
|
32 |
+ 'linebreak_after_opening_tag' => true, |
|
33 |
+ 'no_null_property_initialization' => true, |
|
34 |
+ 'no_superfluous_elseif' => true, |
|
35 |
+ 'no_unreachable_default_argument_value' => true, |
|
36 |
+ 'no_useless_else' => true, |
|
37 |
+ 'no_useless_return' => true, |
|
38 |
+ 'ordered_class_elements' => true, |
|
39 |
+ 'ordered_imports' => true, |
|
40 |
+ 'php_unit_strict' => true, |
|
41 |
+ 'phpdoc_add_missing_param_annotation' => true, |
|
42 |
+ 'phpdoc_order' => true, |
|
43 |
+ 'phpdoc_types_order' => [ |
|
44 |
+ 'null_adjustment' => 'always_last', |
|
45 |
+ 'sort_algorithm' => 'none', |
|
46 |
+ ], |
|
47 |
+ 'strict_comparison' => true, |
|
48 |
+ 'strict_param' => true, |
|
49 |
+ // Remove when https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3222 has been merged |
|
50 |
+ 'LeoFeyer/optimize_native_functions' => true, |
|
51 |
+ ]) |
|
52 |
+ ->registerCustomFixers([ |
|
53 |
+ new LeoFeyer\PhpCsFixer\OptimizeNativeFunctionsFixer() |
|
54 |
+ ]) |
|
55 |
+ ->setFinder($finder) |
|
56 |
+ ->setRiskyAllowed(true) |
|
57 |
+ ->setUsingCache(false) |
|
58 |
+; |
0 | 7 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,41 @@ |
1 |
+{ |
|
2 |
+ "name": "esalesmedia/contao-singlereisen", |
|
3 |
+ "type": "contao-bundle", |
|
4 |
+ "description": "Adds the singlereisen business logig to Contao", |
|
5 |
+ "license": "proprietary", |
|
6 |
+ "authors": [ |
|
7 |
+ { |
|
8 |
+ "name": "Benjamin Roth", |
|
9 |
+ "homepage": "https://www.esales-media.de" |
|
10 |
+ } |
|
11 |
+ ], |
|
12 |
+ "require": { |
|
13 |
+ "php": ">=7.1", |
|
14 |
+ "contao/core-bundle": "^4.6" |
|
15 |
+ }, |
|
16 |
+ "conflict": { |
|
17 |
+ "contao/core": "*", |
|
18 |
+ "contao/manager-plugin": "<2.0 || >=3.0" |
|
19 |
+ }, |
|
20 |
+ "require-dev": { |
|
21 |
+ "contao/manager-plugin": "^2.0", |
|
22 |
+ "friendsofphp/php-cs-fixer": "^2.6", |
|
23 |
+ "php-http/guzzle6-adapter": "^1.1" |
|
24 |
+ }, |
|
25 |
+ "extra": { |
|
26 |
+ "contao-manager-plugin": "EsalesMedia\\SinglereisenBundle\\ContaoManager\\Plugin" |
|
27 |
+ }, |
|
28 |
+ "autoload": { |
|
29 |
+ "psr-4": { |
|
30 |
+ "EsalesMedia\\SinglereisenBundle\\": "src/" |
|
31 |
+ } |
|
32 |
+ }, |
|
33 |
+ "autoload-dev": { |
|
34 |
+ "psr-4": { |
|
35 |
+ "EsalesMedia\\SinglereisenBundle\\Tests\\": "tests/" |
|
36 |
+ } |
|
37 |
+ }, |
|
38 |
+ "support": { |
|
39 |
+ "issues": "https://www.esales-media.de" |
|
40 |
+ } |
|
41 |
+} |
0 | 42 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,26 @@ |
1 |
+<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
+ |
|
3 |
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
+ xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.0/phpunit.xsd" |
|
5 |
+ backupGlobals="false" |
|
6 |
+ colors="true" |
|
7 |
+> |
|
8 |
+ <php> |
|
9 |
+ <ini name="error_reporting" value="-1" /> |
|
10 |
+ </php> |
|
11 |
+ |
|
12 |
+ <testsuites> |
|
13 |
+ <testsuite name="Singlereisen Bundle"> |
|
14 |
+ <directory>./tests</directory> |
|
15 |
+ </testsuite> |
|
16 |
+ </testsuites> |
|
17 |
+ |
|
18 |
+ <filter> |
|
19 |
+ <whitelist> |
|
20 |
+ <directory>./src</directory> |
|
21 |
+ <exclude> |
|
22 |
+ <directory>./src/Resources</directory> |
|
23 |
+ </exclude> |
|
24 |
+ </whitelist> |
|
25 |
+ </filter> |
|
26 |
+</phpunit> |
0 | 27 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,33 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+ * This file is part of eSales Media SinglereisenBundle |
|
5 |
+ * |
|
6 |
+ * (c) John Doe |
|
7 |
+ * |
|
8 |
+ * @license LGPL-3.0-or-later |
|
9 |
+ */ |
|
10 |
+ |
|
11 |
+namespace EsalesMedia\SinglereisenBundle\ContaoManager; |
|
12 |
+ |
|
13 |
+use EsalesMedia\SinglereisenBundle\EsalesMediaSinglereisenBundle; |
|
14 |
+use Contao\CoreBundle\ContaoCoreBundle; |
|
15 |
+use Contao\ManagerPlugin\Bundle\BundlePluginInterface; |
|
16 |
+use Contao\ManagerPlugin\Bundle\Config\BundleConfig; |
|
17 |
+use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; |
|
18 |
+ |
|
19 |
+class Plugin implements BundlePluginInterface |
|
20 |
+{ |
|
21 |
+ /** |
|
22 |
+ * {@inheritdoc} |
|
23 |
+ */ |
|
24 |
+ public function getBundles(ParserInterface $parser) |
|
25 |
+ { |
|
26 |
+ $arrLoadAfter = [ContaoCoreBundle::class]; |
|
27 |
+ |
|
28 |
+ return [ |
|
29 |
+ BundleConfig::create(EsalesMediaSinglereisenBundle::class) |
|
30 |
+ ->setLoadAfter($arrLoadAfter) |
|
31 |
+ ]; |
|
32 |
+ } |
|
33 |
+} |
0 | 34 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,33 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+ * This file is part of eSales Media SinglereisenBundle |
|
5 |
+ * |
|
6 |
+ * (c) Benjamin Roth |
|
7 |
+ * |
|
8 |
+ * @license proprietary |
|
9 |
+ */ |
|
10 |
+ |
|
11 |
+namespace EsalesMedia\SinglereisenBundle\DependencyInjection; |
|
12 |
+ |
|
13 |
+use Symfony\Component\Config\FileLocator; |
|
14 |
+use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
15 |
+use Symfony\Component\DependencyInjection\Extension\Extension; |
|
16 |
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; |
|
17 |
+ |
|
18 |
+class EsalesMediaSinglereisenExtension extends Extension |
|
19 |
+{ |
|
20 |
+ /** |
|
21 |
+ * {@inheritdoc} |
|
22 |
+ */ |
|
23 |
+ public function load(array $mergedConfig, ContainerBuilder $container) |
|
24 |
+ { |
|
25 |
+ $loader = new YamlFileLoader( |
|
26 |
+ $container, |
|
27 |
+ new FileLocator(__DIR__.'/../Resources/config') |
|
28 |
+ ); |
|
29 |
+ |
|
30 |
+ $loader->load('listener.yml'); |
|
31 |
+ $loader->load('services.yml'); |
|
32 |
+ } |
|
33 |
+} |
0 | 34 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,17 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+ * This file is part of eSales Media SinglereisenBundle |
|
5 |
+ * |
|
6 |
+ * (c) John Doe |
|
7 |
+ * |
|
8 |
+ * @license LGPL-3.0-or-later |
|
9 |
+ */ |
|
10 |
+ |
|
11 |
+namespace EsalesMedia\SinglereisenBundle; |
|
12 |
+ |
|
13 |
+use Symfony\Component\HttpKernel\Bundle\Bundle; |
|
14 |
+ |
|
15 |
+class EsalesMediaSinglereisenBundle extends Bundle |
|
16 |
+{ |
|
17 |
+} |
0 | 9 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,9 @@ |
1 |
+services: |
|
2 |
+ _instanceof: |
|
3 |
+ Contao\CoreBundle\Framework\FrameworkAwareInterface: |
|
4 |
+ calls: |
|
5 |
+ - ["setFramework", ["@contao.framework"]] |
|
6 |
+ |
|
7 |
+ Symfony\Component\DependencyInjection\ContainerAwareInterface: |
|
8 |
+ calls: |
|
9 |
+ - ["setContainer", ["@service_container"]] |
0 | 15 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+ * This file is part of [package name]. |
|
5 |
+ * |
|
6 |
+ * (c) John Doe |
|
7 |
+ * |
|
8 |
+ * @license LGPL-3.0-or-later |
|
9 |
+ */ |
|
10 |
+ |
|
11 |
+namespace EsalesMedia\SinglereisenBundle\Tests; |
|
12 |
+ |
|
13 |
+use EsalesMedia\SinglereisenBundle\EsalesMediaSinglereisenBundle; |
|
14 |
+use PHPUnit\Framework\TestCase; |
|
15 |
+ |
|
16 |
+class EsalesMediaSinglereisenBundleTest extends TestCase |
|
17 |
+{ |
|
18 |
+ public function testCanBeInstantiated() |
|
19 |
+ { |
|
20 |
+ $bundle = new EsalesMediaSinglereisenBundle(); |
|
21 |
+ |
|
22 |
+ $this->assertInstanceOf('EsalesMedia\SinglereisenBundle\EsalesMediaSinglereisenBundle', $bundle); |
|
23 |
+ } |
|
24 |
+} |