https://github.com/contao/skeleton-bundle
Skeleton bundle for custom Contao 4 bundles
https://github.com/contao/skeleton-bundle
contao contao-bundle php symfony
Last synced: 5 months ago
JSON representation
Skeleton bundle for custom Contao 4 bundles
- Host: GitHub
- URL: https://github.com/contao/skeleton-bundle
- Owner: contao
- License: lgpl-3.0
- Created: 2018-06-07T14:38:24.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-03-07T14:21:45.000Z (about 2 years ago)
- Last Synced: 2024-03-25T21:13:30.864Z (about 2 years ago)
- Topics: contao, contao-bundle, php, symfony
- Language: PHP
- Homepage:
- Size: 22.5 KB
- Stars: 27
- Watchers: 11
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Contao 4 skeleton bundle
Contao is an Open Source PHP Content Management System for people who want a
professional website that is easy to maintain. Visit the [project website][1]
for more information.
You can use the skeleton bundle as basis for your own Contao bundle.
## Install
Download the skeleton bundle:
```bash
wget https://github.com/contao/skeleton-bundle/archive/main.zip
unzip main.zip
mv skeleton-bundle-main [package name]
cd [package name]
```
## Customize
First adjust the following files:
* `composer.json`
* `ecs.php`
* `LICENSE`
* `phpunit.xml.dist`
* `README.md`
Then rename the following files and/or the references to `SkeletonBundle` in
the following files:
* `src/ContaoManager/Plugin.php`
* `src/DependencyInjection/ContaoSkeletonExtension.php`
* `src/ContaoSkeletonBundle.php`
* `tests/ContaoSkeletonBundleTest.php`
Finally, add your custom classes and resources. Make sure to register your services
within `src/Resources/config/services.yml`. Also make sure to
[adjust the Contao Manager Plugin][2] (and the dependencies within the `composer.json`)
accordingly, if your bundle makes adjustments to other bundles (e.g. adjustments
to a DCA of other bundles).
## Release
First make sure the tools are installed and up to date by running
`composer bin all update` in your bundle's root. Then run the PHP-CS-Fixer and
the unit test before you release your bundle:
```bash
vendor/bin/ecs check src/ tests/ --fix
vendor/bin/phpunit
```
[1]: https://contao.org
[2]: https://docs.contao.org/dev/framework/manager-plugin/#the-bundleplugininterface