@dieschittigs/c3t4
v1.1.3
Published
Converts Contao 3.5 Modules to Contao 4.4 Bundles
Downloads
8
Readme
C3t4 – Contao 3 to 4
This is a command line application that helps you automatically convert your Contao 3-compatible modules to Symfony-based Contao 4 bundles.
Installation and Usage
C3t4 requires node.js 7.6 or newer.
The recommended way of installing this application is via Yarn or npm.
$ yarn global add @dieschittigs/c3t4
$ npm install --global @dieschittigs/c3t4
Then, simply run c3t4
in your Contao 3 instance and follow the on-screen instructions.
Roadmap
- Rename any occurences of
system/modules/.../assets
withbundles/...
in order for bundle assets to be adjusted automatically
Other steps for migrating from Contao 3 to 4
In our experience, the following steps are sufficient to migrate an application from Contao 3 to 4:
- Export your Contao 3 database
- Import the database into your new Contao 4 database
- Install Contao 4 on your target system using the Contao Manager
- Run the install tool and update the database to Contao 4
(make sure none of theDROP COLUMN
orDROP TABLE
fields are selected) - Copy the content of your
templates
directory from Contao 3 to Contao 4 - Copy the content of your
files
directory from Contao 3 to Contao 4 - Upload your converted Contao 4 bundles
- Add your local Contao 4 bundles to your
composer.json
(in therepositories
andrequire
fields, see below) - Run
composer update
, or update your dependencies from the Contao Manager
Expectedly, Contao 4 is not fully backwards-compatible with Contao 3. For us, this was most apparent in some template rendering changes. This tool can't fix those changes for you, so you will obviously need to make sure that everything still works in your Contao 4 installation and make some minor adjustments where needed.
Example composer.json
entries
{
...
"require": {
...
"mynamespace/mybundle": "@dev"
},
"repositories": [
{ "type": "path", "url": "./bundles/mybundle" }
]
}