| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,54 @@ |
| 1 |
+# Contao 4 skeleton bundle |
|
| 2 |
+ |
|
| 3 |
+Contao is an Open Source PHP Content Management System for people who want a |
|
| 4 |
+professional website that is easy to maintain. Visit the [project website][1] |
|
| 5 |
+for more information. |
|
| 6 |
+ |
|
| 7 |
+You can use the skeleton bundle as basis for your own Contao bundle. |
|
| 8 |
+ |
|
| 9 |
+## Install |
|
| 10 |
+ |
|
| 11 |
+Download the skeleton bundle: |
|
| 12 |
+ |
|
| 13 |
+```bash |
|
| 14 |
+wget https://github.com/contao/skeleton-bundle/archive/main.zip |
|
| 15 |
+unzip main.zip |
|
| 16 |
+mv skeleton-bundle-main [package name] |
|
| 17 |
+cd [package name] |
|
| 18 |
+``` |
|
| 19 |
+ |
|
| 20 |
+## Customize |
|
| 21 |
+ |
|
| 22 |
+First adjust the following files: |
|
| 23 |
+ |
|
| 24 |
+ * `composer.json` |
|
| 25 |
+ * `ecs.php` |
|
| 26 |
+ * `LICENSE` |
|
| 27 |
+ * `phpunit.xml.dist` |
|
| 28 |
+ * `README.md` |
|
| 29 |
+ |
|
| 30 |
+Then rename the following files and/or the references to `SkeletonBundle` in |
|
| 31 |
+the following files: |
|
| 32 |
+ |
|
| 33 |
+ * `src/ContaoManager/Plugin.php` |
|
| 34 |
+ * `src/DependencyInjection/ContaoSkeletonExtension.php` |
|
| 35 |
+ * `src/ContaoSkeletonBundle.php` |
|
| 36 |
+ * `tests/ContaoSkeletonBundleTest.php` |
|
| 37 |
+ |
|
| 38 |
+Finally, add your custom classes and resources. Make sure to register your services |
|
| 39 |
+within `src/Resources/config/services.yml`. Also make sure to |
|
| 40 |
+[adjust the Contao Manager Plugin][2] (and the dependencies within the `composer.json`) |
|
| 41 |
+accordingly, if your bundle makes adjustments to other bundles (e.g. adjustments |
|
| 42 |
+to a DCA of other bundles). |
|
| 43 |
+ |
|
| 44 |
+## Release |
|
| 45 |
+ |
|
| 46 |
+Run the PHP-CS-Fixer and the unit test before you release your bundle: |
|
| 47 |
+ |
|
| 48 |
+```bash |
|
| 49 |
+vendor/bin/ecs check src/ tests/ --fix |
|
| 50 |
+vendor/bin/phpunit |
|
| 51 |
+``` |
|
| 52 |
+ |
|
| 53 |
+[1]: https://contao.org |
|
| 54 |
+[2]: https://docs.contao.org/dev/framework/manager-plugin/#the-bundleplugininterface |