Skip to content

Instantly share code, notes, and snippets.

@pniederlag
Last active August 29, 2015 14:24
Show Gist options
  • Save pniederlag/d367c9cda88b97944cc6 to your computer and use it in GitHub Desktop.
Save pniederlag/d367c9cda88b97944cc6 to your computer and use it in GitHub Desktop.
Problems with composer on TYPO3 7.x

Composer install on Windows

Use the composer.json example on windows. In Addition to the composer manifest we provide a LocalConfiguration.php and AdditionalConfiguration with our provisioning. So the bootstrap is not in FIRST_INSTALL mode, maybe that's something that does have an influence? When we hit typo3/install to run DB compare to seed the database we do get:

Fatal error: Uncaught exception 'LogicException' with message 'No class loading information found for TYPO3 CMS. Please make sure you installed TYPO3 with composer or the typo3/contrib/vendor folder is present.' in ....

Note to self:

  • check wether dropping provisionde typo3conf/* items and adding FIRST_INSTALL does make a change
  • check wether targeting dev-master does make a change
  • check wether the autoload is created, where it is created and check the content

Create Project from scratch

see http://composer.typo3.org/

composer create-project typo3/cms-base-distribution CmsBaseDistribution dev-master

executed under Linux

[RuntimeException]  
Could not scan for classes inside "/tmp/foo/CmsBaseDistribution/typo3_src/typo3/sysext/core/Resources/PHP/" which does not appear to be a file nor a folder

Set vendor-dir to typo3/contrib/vendor

Downloading a .zip/.tgz release package we can see composer.json with vendor-dir set to typo3/contrib/vendor (in order to package the vendor packages into the release).

Ok, so now let's try to set the vendor-dir to typo3/contrib/vendor ourselves, see composer-vendor-dir-contrib.json

"vendor-dir": "typo3/contrib/vendor",

[InvalidArgumentException]
The symlink target "typo3" already exists
{
"name": "test/composervendor",
"description": "Dummy project to demonstrate TYPO3 composer usage",
"version": "0.1.0",
"minimum-stability": "dev",
"license": "proprietary",
"config": {
"vendor-dir": "typo3/contrib/vendor",
"bin-dir": "bin"
},
"authors": [
{
"name": "Peter Niederlag",
"email": "peter.niederlag@datenbetrieb.de"
}
],
"repositories": [
{
"type": "composer",
"url": "http://composer.typo3.org/"
}
],
"require": {
"typo3/cms": ">=7.3.0,<7.3.99",
"typo3-ter/news": ">=3.2.0,<3.2.99"
},
"scripts": {
"post-install-cmd": [
]
}
}
{
"name": "test/composer1",
"description": "dummy to demonstret composer usage for TYPO3",
"version": "0.1.0",
"minimum-stability": "dev",
"license": "proprietary",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"authors": [
{
"name": "Peter Niederlag",
"email": "peter.niederlag@datenbetrieb.de"
}
],
"repositories": [
{
"type": "composer",
"url": "http://composer.typo3.org/"
}
],
"require": {
"typo3/cms": ">=7.3.0,<7.3.99",
"typo3-ter/news": ">=3.2.0,<3.2.99"
},
"scripts": {
"post-install-cmd": [
]
}
}
@helhum
Copy link

helhum commented Jul 8, 2015

On OSX the command you post here works perfektly. I have no idea how this can happen. maybe wrong file permissions or something?

@pniederlag
Copy link
Author

I have checked for permissions and everything else.... Linux plus Mac are tested and working fine... I updated the gist to be more precise and contain example composer manifests. Note we are currently targeting 7.3.1. Will test dev-master tomorrow, also the example with the create-project command should target master anyway....and is failing as well on (my) linux

@pniederlag
Copy link
Author

How To Reproduce

fetch this composer manifest: https://gist.github.com/t3dev/d367c9cda88b97944cc6#file-composer-json. composer install does work on Linux and Mac, fails on Windows.

Fatal error: Uncaught exception 'LogicException' with message 'No class loading information found for TYPO3 CMS. Please make sure you installed TYPO3 with composer or the typo3/contrib/vendor folder is present.' in ....

@pniederlag
Copy link
Author

Workaround

copy typo3/contrib/vendor from distribution package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment