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

Helmut Hummel helmut.hummel at typo3.org
Wed Jul 1 21:10:04 CEST 2015


Hi!

Philipp Wrann wrote:

> I added my dev-packages like this (in require section):
> "vendor/package" : "dev-master at dev",
>
> in repositories i added the git repository,

OK.

> Cloning works fine.

You mean "composer update" works fine?

> Now i started developing the new Package and - of course - wrote some Classes.
>
> Now, when using those Classes php throws:
> Fatal error: Class 'Vendor\Package\Utility\TcaUtility' not found in /var/www/project/Packages/Libraries/vendor/package/Configuration/TCA/tx_package_domain_model_foo.php on line 24

Too bad. ^^

> within the package - there is a composer.json file located, its content is:
>
> 	"autoload": {
> 		"psr-4": {
> 			"Vendor\\Package\\": "Classes/"
> 		}
> 	}
> }

This is crutial to have this configuration and a composer.json and 
really needs some documentation. Did you include this section from the 
very beginning? If not, deactivate and then activate the extension in 
the EM.

> The Class is of course located in the correct place.
>
> Really: What the .... is wrong again?

First of all, I recommend that you use the current master of TYPO3 as an 
important patch was merged, which makes it easier to work with composer.

Secondly I recommend to *NOT* disable the composer installers like you 
were told to do so by Hannes in this thread. The installer package is 
required and if you do not use it, you will be out of support and have 
to figure out how to do things on your own.

Lastly:

If you want help, please post complete code, especially your current 
root composer.json somewhere (e.g. gits.github.com) so we can better 
identify potential issues.

Thanks.

Kind regards,
Helmut

-- 
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 CMS Active Contributor, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org



More information about the TYPO3-dev mailing list