• Stars
    star
    318
  • Rank 127,005 (Top 3 %)
  • Language
    PHP
  • License
    GNU Lesser Genera...
  • Created over 5 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Contao Open Source CMS

About

Contao is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the project website for more information.

Purpose

The purpose of this package is to develop the Contao bundles. Use it if you e.g. want to create a pull request or if you want to report an issue.

The monorepo is automatically split into separate packages:

Please do not use contao/contao in production! Use the split packages instead.

Development

To create a pull request and to test your changes within a running Contao application, it is the easiest to use the Contao Managed Edition. Start by installing it in your current directory:

composer create-project --no-install contao/managed-edition <directory> <branch>

Replace <directory> with the directory you want to install the Managed Edition in (use . for the current one). Replace <branch> with 5.x-dev if you want to add a new feature or with <lts-version>.x-dev (currently 4.13.x-dev) if you want to fix a bug.

Then adjust the require section in your composer.json file, so Composer loads the monorepo instead of the individual bundles:

"require": {
    "php": "^8.0",
    "contao/contao": "5.x-dev"
},

Again, use 5.x-dev if you want to add a new feature or <lts-version>.x-dev if you want to fix a bug.

Next, install the dependencies:

composer update

Composer will automatically clone the Git repo into the vendor/contao/contao folder. You can finish the setup by running vendor/bin/contao-setup on the command line.

All the changes you make in vendor/contao/contao are tracked via Git, so you can submit your pull request directly from within your application.

Running scripts

First install the code quality tools:

composer bin all install

Then run the code quality scripts via Composer:

composer run all

You can also run the scripts separately:

composer run rector
composer run cs-fixer
composer run service-linter
composer run monorepo-tools
composer run unit-tests
composer run functional-tests
composer run phpstan
composer run require-checker

If you want to pass additional flags to the underlying commands, you can use the -- argument:

composer run unit-tests -- --filter CoreBundle
composer run cs-fixer -- --clear-cache

Functional tests

To set up the functional tests, create a database named contao_test:

mysql -e "CREATE DATABASE contao_test"

If your database uses credentials, copy the file core-bundle/phpunit.xml.dist to core-bundle/phpunit.xml and adjust the following line:

<php>
    <env name="DATABASE_URL" value="mysql://root@localhost:3306/contao_test" />
</php>

Then run the functional tests via the run command:

composer run functional-tests

Yarn 4

To build the assets and to run the end-to-end tests (see below), you need to enable Corepack, a package manager that allows you to manage different Yarn package versions across multiple projects:

corepack enable

If Corepack is not bundled with your Node.js installation, you might have to install it as a separate package, e.g. using npm install -g corepack or brew install corepack.

End-to-end tests

Before you can run the end-to-end tests, you have to install the Symfony Local Web Server with TLS support. Then install the required Node packages and run the end-to-end tests:

yarn install
yarn run e2e-tests

License

Contao is licensed under the terms of the LGPLv3.

Getting support

Visit the support page to learn about the available support options.

More Repositories

1

core

Contao 3 β†’ see contao/contao for Contao 4
PHP
497
star
2

core-bundle

[READ-ONLY] Contao Core Bundle
PHP
121
star
3

contao-manager

Contao Manager
PHP
82
star
4

imagine-svg

Contao Imagine SVG Library
PHP
74
star
5

check

Contao Check
PHP
48
star
6

docs-archive

Contao Documentation
Makefile
43
star
7

standard-edition

[DEPRECATED] Do not use anymore!
PHP
33
star
8

docs

Contao Documentation
HTML
30
star
9

skeleton-bundle

Skeleton bundle for custom Contao 4 bundles
PHP
27
star
10

package-metadata

Contao Package Metadata
PHP
20
star
11

manager-bundle

[READ-ONLY] Contao Manager Bundle
PHP
17
star
12

official-demo

Contao Official Demo
SCSS
17
star
13

managed-edition

Contao Managed Edition
17
star
14

image

Contao Image Library
PHP
12
star
15

easy-coding-standard

EasyCodingStandard configurations for Contao
PHP
11
star
16

maker-bundle

[READ-ONLY] Contao Maker Bundle
PHP
10
star
17

news-bundle

[READ-ONLY] Contao News Bundle
PHP
9
star
18

installation-bundle

[READ-ONLY] Contao Installation Bundle
PHP
8
star
19

deployer-edition

Contao 4 deployer edition
PHP
7
star
20

test-case

[READ-ONLY] Contao Test Case
PHP
6
star
21

phpstan

[DEPRECATED] Do not use anymore!
PHP
5
star
22

calendar-bundle

[READ-ONLY] Contao Calendar Bundle
PHP
5
star
23

mobile-page-layout-bundle

Mobile page layout bundle for Contao 4
PHP
4
star
24

newsletter-bundle

[READ-ONLY] Contao Newsletter Bundle
PHP
4
star
25

to.contao.org

Contao Short Link Service (https://to.contao.org)
PHP
4
star
26

manager-plugin

Contao Manager Plugin
PHP
4
star
27

contao-demo

This is an example website for Contao, a powerful open source CMS that allows you to create professional websites and scalable web applications.
SCSS
3
star
28

conflicts

Contao Conflicting Packages
3
star
29

faq-bundle

[READ-ONLY] Contao FAQ Bundle
PHP
3
star
30

comments-bundle

[READ-ONLY] Contao Comments Bundle
PHP
2
star
31

listing-bundle

[READ-ONLY] Contao Listing Bundle
PHP
2
star
32

website

Issue tracker for contao.org
2
star
33

contao-rector

Rector rules for Contao
PHP
2
star
34

project

1
star
35

tcpdf-bundle

Article to PDF bundle for Contao 4
PHP
1
star
36

music-academy

[DEPRECATED] Do not use anymore!
CSS
1
star
37

monorepo-tools

Build and split a monorepo (see contao/contao)
PHP
1
star
38

package-indexer

See https://github.com/contao/package-metadata
PHP
1
star