[TYPO3-dev] Re: Set up new TYPO3 project with composer

Viktor Livakivskyi invisible.kinder at gmail.com
Mon Jun 22 14:43:36 CEST 2015


Hi, Philipp 

I can share my experience with TYPO3 and composer here.
You can check my old message in TYPO3-English newsgroup to get initial idea about the structure: https://forum.typo3.org/index.php?t=tree&goto=729980&
You can ignore my answers in that thread - they were all about bug, which is already solved.

Our composer.json, composer.lock and vendor dir (Packages/Libraries) are located in the project's root - this makes it easy to work with phpStorm and keep all in one place.

Also we have a 'web'  folder, located in project root, which contains symlinks back to fileadmin, typo3, typo3conf, typo3temp, uploads, index.php. Document_root is configured to this 'web' folder.

All the project dependencies, including extensions from TER and some libraries, like 'phpexcel' are defined in "require" section. Our custom extensions are defined only in "autoload":{"psr-4": ...} (and unit tests in "autoload-dev") in format: "Vendor\\MyExtension\\": "typo3conf/ext/my_extension/Classes/",

json and lock files are part of our git repository. Whenever some developer wants to update dependencies, he does it with changing composer.json and running "composer update". During deploy we always run "composer install --no-dev --optimize-autoloader", which updates the dependencies to the latest versions from the lock-file and speeds-up class autoloading by pre-generation of class-maps.

I've never used TYPO3.Surf, so can't say something here, but would be nice to know, if it works out for you :)



More information about the TYPO3-dev mailing list