I try to load own extensions via composer.json but when I run the application I always get this error:
#1411840171: The class "Bm\AhContentelements\Rendering\VideoTagRenderer" you are trying to
register is not available
I load my ah contentelements extension in json as:
{
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org/"
},
{
"type": "package",
"package": {
"name": "Bm/ah-content-api",
"version": "0.0.1",
"type": "typo3-cms-extension",
"source": {
"url": "https://user#bitbucket.org/u/ah_config_typo3.git",
"type": "git",
"reference": "master"
}
}
},
{
"type": "package",
"package": {
"name": "Bm/ah-contentelements",
"version": "0.0.1",
"type": "typo3-cms-extension",
"source": {
"url": "https://user#bitbucket.org/u/ah_contentelements_typo3.git",
"type": "git",
"reference": "master"
}
}
}
],
"name": "typo3/cms-base-distribution",
"description": "TYPO3 CMS Base Distribution",
"license": "GPL-2.0-or-later",
"require": {
"helhum/typo3-console": "^4.9.3 || ^5.2",
"typo3/cms-about": "^8.7.10",
"typo3/cms-belog": "^8.7.10",
"typo3/cms-beuser": "^8.7.10",
"typo3/cms-context-help": "^8.7.10",
"typo3/cms-documentation": "^8.7.10",
"typo3/cms-felogin": "^8.7.10",
"typo3/cms-fluid-styled-content": "^8.7.10",
"typo3/cms-form": "^8.7.10",
"typo3/cms-func": "^8.7.10",
"typo3/cms-impexp": "^8.7.10",
"typo3/cms-info": "^8.7.10",
"typo3/cms-info-pagetsconfig": "^8.7.10",
"typo3/cms-rte-ckeditor": "^8.7.10",
"typo3/cms-setup": "^8.7.10",
"typo3/cms-sys-note": "^8.7.10",
"typo3/cms-t3editor": "^8.7.10",
"typo3/cms-tstemplate": "^8.7.10",
"typo3/cms-viewpage": "^8.7.10",
"typo3/cms-wizard-crpages": "^8.7.10",
"typo3/cms-wizard-sortpages": "^8.7.10",
"typo3/cms": "^8.7",
"dmitryd/typo3-realurl": "2.*",
"GridElementsTeam/Gridelements": "8.2.*",
"clickstorm/cs_seo": "3.*",
"Bm/ah-content-api": "0.0.1",
"Bm/ah-contentelements": "0.0.1"
},
"scripts": {
"typo3-cms-scripts": [
"typo3cms install:fixfolderstructure",
"typo3cms install:generatepackagestates"
],
"post-autoload-dump": [
"#typo3-cms-scripts"
]
},
"extra": {
"typo3/cms": {
"web-dir": "public"
},
"helhum/typo3-console": {
"comment": "This option is not needed ay more for helhum/typo3-console 5.x",
"install-extension-dummy": false
}
},
"autoload": {
"psr-4": {
"Bm\\AhContentelements\\": "public/typo3conf/ext/ah-contentelements/Classes",
"Bm\\AhContentapi\\": "public/typo3conf/ext/ah-contentapi/Classes"
}
}
}
What do I wrong, I'm struggling with this for days now..
I never did it the way you did it. I always include a composer.json in each of my extensions. There the autoload part looks like this:
"autoload": {
"psr-4": {
"Bm\\AhContentelements\\": "Classes"
}
}
In the repositories section of my main composer.json I then have something like this:
{
"type": "path",
"url": "./packages/*"
},
I then require my extension with composer require Bm/ah-contentelements:"#dev". Composer then searches the packages directory for the specified extension.
I think the path is wrong: you have to use the root (the directory on the same level like your composer file and the vendor directory) like "web" or "html".
so instead of
"autoload": {
"psr-4": {
"Bm\\AhContentelements\\": "typo3conf/ext/ah-contentelements/Classes",
"Bm\\AhContentapi\\": "typo3conf/ext/ah-contentapi/Classes"
}
you should use something like
"autoload": {
"psr-4": {
"Bm\\AhContentelements\\": "web/typo3conf/ext/ah-contentelements/Classes",
"Bm\\AhContentapi\\": "web/typo3conf/ext/ah-contentapi/Classes"
}
After changing do not forget to composer dump-autoload
Related
I am trying to install Avalara for Magento 2 by following these documents- https://github.com/avadev/Avalara-AvaTax-for-Magento2/blob/master/docs/getting-started.md
Following what they have step by step for the composer install I end up with these errors-
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package avalara/avataxclient dev-integration/release-2.0.0 as 18.4.3.191 exists as avalara/avataxclient[17.12.0.147, 17.12.0.149, 17.5.0.67, 17.7.0.96, 17.8.1.120, 17.8.1.x-dev, 18.1.2.161, 18.1.2.x-dev, 18.1.x-dev, 18.10.5.260, 18.12.0, 18.2.0.167, 18.2.x-dev, 18.3.1.176, 18.4.3.191, 18.4.4.191, 18.5.1.208, 18.9.0.234, 19.1.1, 19.2.0, 19.3.0, 19.3.0.x-dev, 19.4.0, 19.4.0.x-dev, 2.17.1, 2.17.1.3, 2.17.2.43, 2.17.3.48, 2.17.4.58, dev-master, v19.1.1.x-dev, v19.2.0.x-dev] but these are rejected by your constraint.
Problem 2
- Installation request for classyllama/module-avatax 2.0.0-RC1 -> satisfiable by classyllama/module-avatax[2.0.0-RC1].
- classyllama/module-avatax 2.0.0-RC1 requires avalara/avataxclient ^18.4.3.191 -> satisfiable by avalara/avataxclient[18.10.5.260, 18.12.0, 18.4.3.191, 18.4.4.191, 18.5.1.208, 18.9.0.234] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
This is what my composer.json file looks like-
{
"name": "magento/project-enterprise-edition",
"description": "eCommerce Platform for Growth (Enterprise Edition)",
"type": "project",
"version": "2.3.1",
"license": [
"proprietary"
],
"require": {
"magento/product-enterprise-edition": "2.3.1",
"composer/composer": "#alpha",
"magento/extension-b2b": "^1.0",
"boldcommerce/magento2-ordercomments": "~1.5.0",
"amasty/orderattr": "^3.3",
"ebizmarts/mailchimp-lib": "^3.0",
"galacticlabs/customer-group-payment-filters": "^1.0",
"amasty/module-elastic-search": "^1.3",
"elasticsearch/elasticsearch": "~5.1",
"msp/devtools": "^1.2",
"zf1/zend-rest": "^1.12",
"avalara/avataxclient": "dev-integration/release-2.0.0 as 18.4.3.191"
},
"require-dev": {
"phpunit/phpunit": "~6.2.0",
"squizlabs/php_codesniffer": "3.2.2",
"phpmd/phpmd": "#stable",
"pdepend/pdepend": "2.5.2",
"friendsofphp/php-cs-fixer": "~2.10.1",
"lusitanian/oauth": "~0.8.10",
"sebastian/phpcpd": "~3.0.0"
},
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/",
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
},
"psr-0": {
"": [
"app/code/"
]
},
"files": [
"app/etc/NonComposerComponentRegistration.php"
],
"exclude-from-classmap": [
"**/dev/**",
"**/update/**",
"**/Test/**"
]
},
"autoload-dev": {
"psr-4": {
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/",
"Magento\\ToolkitFramework\\": "dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/"
}
},
"minimum-stability": "stable",
"repositories": {
"0": {
"type": "composer",
"url": "https://repo.magento.com/"
},
"amasty": {
"type": "composer",
"url": "https://composer.amasty.com/enterprise/"
},
"xtento": {
"type": "composer",
"url": "https://repo.xtento.com"
}
},
"extra": {
"magento-force": "override"
},
"classyllama-avatax": {
"type": "git",
"url": "git#github.com:classyllama/AvaTax-REST-V2-PHP-SDK.git"
}
}
How can I get this to install properly?
There's an issue with the syntax of your composer.json. Try the following and let me know if you're still having issues.
{
"name":"magento/project-enterprise-edition",
"description":"eCommerce Platform for Growth (Enterprise Edition)",
"type":"project",
"version":"2.3.1",
"license":[
"proprietary"
],
"require":{
"magento/product-enterprise-edition":"2.3.1",
"composer/composer":"#alpha",
"magento/extension-b2b":"^1.0",
"boldcommerce/magento2-ordercomments":"~1.5.0",
"amasty/orderattr":"^3.3",
"ebizmarts/mailchimp-lib":"^3.0",
"galacticlabs/customer-group-payment-filters":"^1.0",
"amasty/module-elastic-search":"^1.3",
"elasticsearch/elasticsearch":"~5.1",
"msp/devtools":"^1.2",
"zf1/zend-rest":"^1.12",
"avalara/avataxclient":"dev-integration/release-2.0.0 as 18.4.3.191"
},
"require-dev":{
"phpunit/phpunit":"~6.2.0",
"squizlabs/php_codesniffer":"3.2.2",
"phpmd/phpmd":"#stable",
"pdepend/pdepend":"2.5.2",
"friendsofphp/php-cs-fixer":"~2.10.1",
"lusitanian/oauth":"~0.8.10",
"sebastian/phpcpd":"~3.0.0"
},
"autoload":{
"psr-4":{
"Magento\\Framework\\":"lib/internal/Magento/Framework/",
"Magento\\Setup\\":"setup/src/Magento/Setup/",
"Magento\\":"app/code/Magento/",
"Zend\\Mvc\\Controller\\":"setup/src/Zend/Mvc/Controller/"
},
"psr-0":{
"":[
"app/code/"
]
},
"files":[
"app/etc/NonComposerComponentRegistration.php"
],
"exclude-from-classmap":[
"**/dev/**",
"**/update/**",
"**/Test/**"
]
},
"autoload-dev":{
"psr-4":{
"Magento\\Sniffs\\":"dev/tests/static/framework/Magento/Sniffs/",
"Magento\\Tools\\":"dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\":"dev/build/publication/sanity/Magento/Tools/Sanity/",
"Magento\\TestFramework\\Inspection\\":"dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\":"dev/tests/static/framework/Magento/TestFramework/Utility/",
"Magento\\ToolkitFramework\\":"dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/"
}
},
"minimum-stability":"stable",
"repositories":{
"0":{
"type":"composer",
"url":"https://repo.magento.com/"
},
"amasty":{
"type":"composer",
"url":"https://composer.amasty.com/enterprise/"
},
"xtento":{
"type":"composer",
"url":"https://repo.xtento.com"
},
"classyllama-avatax":{
"type":"git",
"url":"git#github.com:classyllama/AvaTax-REST-V2-PHP-SDK.git"
}
},
"extra":{
"magento-force":"override"
}
}
My first steps with TYPO3 CMSand composer... but I cannot install my own distribution package. Try to:
composer require stsa/hellotypo3
I've got this error:
[InvalidArgumentException]
Could not find a version of package stsa/hellotypo3 matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
I've install TYPO3 9.5.1 via composer and (for testing) install a 3rd party extension like mask with composer require mask/mask. It works perfectly.
Here's my composer.json of my distribution extension, which I've uploaded to packgist. The json-file is valid, but there must be sth. wrong ..
{
"name": "stsa/hellotypo3",
"type": "typo3-cms-extension",
"description": "FLUID Templates & TypoScript",
"homepage": "https://www.hello.de/",
"keywords": [
"TYPO3",
"CMS",
"extension"
],
"authors": [
{
"name": "Stsa",
"email": "contact#hello.de",
"role": "Developer",
"homepage": "https://www.hello.de/"
}
],
"license": [
"GPL-2.0-or-later"
],
"require": {
"typo3/cms-core": "^9.5"
},
"autoload": {
"psr-4": {
"Stsa\\Hellotypo3\\": "Classes/"
}
},
"replace": {
"hellotypo3": "self.version",
"typo3-ter/hellotypo3": "self.version"
}
}
No way .. it doesn't work with that. I also try to set "minimum-stability": "stable". But honestly, I have no idea what I can do ..?! Can someone help me? Thanks.
EDIT 1: Today I've update my own extension at packgist. It must be available now with this vendor/name.
EDIT 2: Now I've made a test extension via sitepackagebuilder, upload to git, sumbit to packgist. Try to install via composer require hellotypo3de/hellotest .. still the same Error warning: Could not find a version of package hellotypo3de/hellotest matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability. ..?! Where's my mistake?
I assume you want to use your extension only on one installation as local extension. So that's the way to go:
Create a directory, e.g. packages in your project's root directory.
Move your extension into this directory and name the folder stsa-hellotypo3. The part before the dash is your namespace, the part behind the package name.
Add to your composer.json of your extension the following entry:
"extra": {
"typo3/cms": {
"extension-key": "stsa_hellotypo3"
}
}
Now TYPO3 will use stsa_hellotypo3 as extension key.
Change into your composer.json file in your TYPO3 project root the repositories entry:
"repositories": [
{
"type": "path",
"url": "packages/*"
},
{
"type": "composer",
"url": "https://composer.typo3.org/"
}
],
composer will look now into the packages folder for packages to install.
Now you can add your extension to the project:
composer require stsa/hellotypo3:#dev
The extension is symlink'ed as stsa_hellotypo3 in typo3conf/ext/ directory. With the #dev the development version is installed (which you have). you can also add a version entry into your extension's composer.json file, then you can omit the #dev.
If you do it that way you don't have to add your extension's autoloading information to the root composer.json file.
It's possible to install your local distribution extension manually. You have to insert your extension at the "require-section" and add a new type of package at the "repositories-section" in your repsoitory root composer.json. See my example:
{
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org/"
},
{
"type":"package",
"package": {
"name": "stsa/hellotypo3",
"version":"master",
"source": {
"url": "https://github.com/name/hellotypo3-distribution.git",
"type": "git",
"reference":"dev-master"
}
}
}
],
"name": "typo3/cms-base-distribution",
"description" : "TYPO3 CMS Base Distribution",
"license": "GPL-2.0-or-later",
"config": {
"platform": {
"php": "7.2"
}
},
"require": {
"helhum/typo3-console": "^5.5.5",
"typo3/minimal": "^9.5",
"typo3/cms-about": "^9.5",
"typo3/cms-adminpanel": "^9.5",
"typo3/cms-belog": "^9.5",
"typo3/cms-beuser": "^9.5",
"typo3/cms-felogin": "^9.5",
"typo3/cms-fluid-styled-content": "^9.5",
"typo3/cms-form": "^9.5",
"typo3/cms-impexp": "^9.5",
"typo3/cms-info": "^9.5",
"typo3/cms-redirects": "^9.5",
"typo3/cms-reports": "^9.5",
"typo3/cms-rte-ckeditor": "^9.5",
"typo3/cms-setup": "^9.5",
"typo3/cms-seo": "^9.5",
"typo3/cms-sys-note": "^9.5",
"typo3/cms-t3editor": "^9.5",
"typo3/cms-tstemplate": "^9.5",
"typo3/cms-viewpage": "^9.5",
"stsa/hellotypo3": "dev-master"
},
"scripts":{
"typo3-cms-scripts": [
"typo3cms install:fixfolderstructure",
"typo3cms install:generatepackagestates"
],
"post-autoload-dump": [
"#typo3-cms-scripts"
]
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "public"
}
}
}
dev-master is here important!
The composer.jsonfrom your extension looks like this:
{
"name": "stsa/hellotypo3",
"type": "typo3-cms-extension",
"description": "FLUID Templates & TypoScript",
"homepage": "https://www.hellotypo3.de/",
"keywords": [
"TYPO3",
"CMS",
"extension"
],
"authors": [
{
"name": "StSa",
"email": "hello#hellotypo3.de",
"role": "Developer",
"homepage": "https://www.hellotypo3.de/"
}
],
"license": [
"GPL-2.0-or-later"
],
"require": {
"typo3/cms-core": "^9.5"
},
"autoload": {
"psr-4": {
"Stsa\\Hellotypo3\\": "Classes/"
}
},
"replace": {
"hellotypo3": "self.version",
"typo3-ter/hellotypo3": "self.version"
},
"extra": {
"typo3/cms": {
"extension-key": "hellotypo3"
}
}
}
Or you can install your extension from packgist, but don't forget:
composer require stsa/hellotypo3:master-dev#dev
or
composer req stsa/hellotypo3:#dev
"require": {
"typo3/cms-core:^9.5"
},
Does that work? If not sry, but hope it helps
I am trying to install a website from server to localhost. When I run the command composer update in git-bash then I get the following error. Please check the screenshot.enter image description here
All the other modules got installed properly only these three are causing issue.
I have checked several threads similar to this issue, found many answers but none worked in my case.
Here is my composer.json file
{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.11",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/product-community-edition": "2.1.12",
"composer/composer": "#alpha",
"magepal/magento2-customshippingrate": "^1.3",
"mestrona/magento-module-categoryredirect": "^2.1",
"amzn/amazon-pay-and-login-with-amazon-core-module": "1.2.5",
"amzn/login-with-amazon-module": "1.2.5",
"amzn/amazon-pay-module": "1.2.5"
},
"require-dev": {
"phpunit/phpunit": "4.1.0",
"squizlabs/php_codesniffer": "1.5.3",
"phpmd/phpmd": "#stable",
"pdepend/pdepend": "2.4.0",
"fabpot/php-cs-fixer": "~1.2",
"lusitanian/oauth": "~0.3 <=0.7.0",
"sebastian/phpcpd": "2.0.0"
},
"config": {
"use-include-path": true
},
"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/"
},
"psr-0": {
"": "app/code/"
},
"files": [
"app/etc/NonComposerComponentRegistration.php"
]
},
"autoload-dev": {
"psr-4": {
"Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
"Magento\\Tools\\": "dev/tools/Magento/Tools/",
"Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
"Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
"Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
}
},
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
}
],
"extra": {
"magento-force": "override"
}
}
If anyone have any idea then please guide me in the right direction. I am really stuck into it.
Please install amz-pay the latest extension which supports php latest version.Instead of, installing from composer please put through files.
I have a own TYPO3 extension hosted on bitbucket. Getting this via composer works (see here for input). The extension is downloaded into my vendor folder. Being there i cannot install the extension via extension-manager.
How can I getting my ext into typo3conf/ext (ensuring autoloading will work)?
The extensions coming via
{
"type": "composer",
"url": "http://composer.typo3.org/"
}
are going to (as expected):
web/typo3config/ext
here is my project composer.json:
{
"repositories": [
{
"type": "composer",
"url": "http://composer.typo3.org/"
},
{
"type": "package",
"package": {
"name": "metaxos/exaibbrplus",
"version": "dev-2016",
"source": {
"url": "https://metaxos#bitbucket.org/metaxos/exaibbrplus.git",
"type": "git",
"reference": "release/2016"
}
}
}
],
"name": "Metaxos/ibbrating2016",
"require": {
"typo3/cms": "7.6.2",
"bk2k/bootstrap-package" : "dev-master",
"typo3-ter/compatibility6" : "7.6.0",
"typo3-ter/extension-builder" : "7.6.0",
"metaxos/exaibbrplus": "dev-2016"
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "web"
}
}
}
here is my extension composer.json:
{
"name": "metaxos/exaibbrplus",
"description": "custom ext for typo3",
"type": "typo3-cms-extension",
"version": "0.0.1",
"require": {
"typo3/cms-core": ">=7.6.0,<8.0"
},
"replace": {
"extkey": "self.version",
"typo3-ter/extkey": "self.version"
},
"autoload": {
"psr-4": {
"Metaxos\\Exaibbrplus\\": "Classes/"
}
},
"keywords": ["custom", "ext"],
"homepage": "http://www.blah.ch"
}
For Composer to install the package in web/typo3conf/ext, the package needs to have the type typo3-cms-extension. In your extension's composer.json this type is actually declared, however Composer will not respect it because you explicitly declare the package configuration in your project-level composer.json:
"repositories": [
# ...
{
"type": "package",
"package": {
"name": "metaxos/exaibbrplus",
"version": "dev-2016",
"source": {
"url": "https://metaxos#bitbucket.org/metaxos/exaibbrplus.git",
"type": "git",
"reference": "release/2016"
}
}
}
]
As you're using "type": "package" for your own repository, I suspect that Composer ignores the composer.json from that package. As you already have a Git repository that contains a composer.json, I'd suggest adding the repository using the vcs type instead:
"repositories": [
{
"type": "vcs",
"url": "https://metaxos#bitbucket.org/metaxos/exaibbrplus.git"
}
]
When doing that, Composer should use the composer.json from that repository, recognize the correct package type (typo3-cms-extension) and install the package in the correct directory.
You need to add the type key with the value typo3-cms-extension to the root composer.json. This will place your extension in web/typo3conf/ext instead of vendor/$vendor/$package which in turn will make it available to the cms.
It is important, to know that if you redefine the package in the root composer.json as repository type package, nothing from the extensions' composer.json file will be taken into account and you need to define any concerns about that package in the root composer.json.
So-applying the rules I mentioned above, your root composer.json will look like that:
{
"repositories": [
{
"type": "composer",
"url": "http://composer.typo3.org/"
},
{
"type": "package",
"package": {
"name": "metaxos/exaibbrplus",
"version": "dev-2016",
"type": "typo3-cms-extension",
"source": {
"url": "https://metaxos#bitbucket.org/metaxos/exaibbrplus.git",
"type": "git",
"reference": "release/2016"
},
"autoload": {
"psr-4": {
"Metaxos\\Exaibbrplus\\": "Classes/"
}
},
}
}
],
"name": "Metaxos/ibbrating2016",
"require": {
"typo3/cms": "7.6.2",
"bk2k/bootstrap-package" : "dev-master",
"typo3-ter/compatibility6" : "7.6.0",
"typo3-ter/extension-builder" : "7.6.0",
"metaxos/exaibbrplus": "dev-2016"
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "web"
}
}
}
As mentioned above by #helmbert, you are either left with completely redefining the package or using another repository type. You may want to consider using satis or a URL repository.
try to add
"replace": {
"exaibbrplus": "self.version",
"typo3-ter/exaibbrplus": "self.version"
},
And use only "Metaxos\\Exaibbrplus\\": "Classes/" in the autoloader.
Actually I have tried this but it doesn't work. I'd like to preserve authors and descriptions. Of course I can do without. However I would like to know how to make this possible.
{
"name": "masterexploder/PHPThumb",
"type": "library",
"description": "A library for manipulating images in PHP.",
"homepage": "https://github.com/masterexploder/PHPThumb",
"keywords": ["image", "resize", "rotate"],
"require": {
"php": ">=5.3.0",
"symfony/filesystem": "2.2.*"
},
"authors": [
{
"name": "Ian Selby",
"email": "ian#gxdlabs.com"
}
],
"autoload": {
"psr-0": {
"PHPThumb": "src",
"PHPThumb\\Tests": "tests"
}
}
},
{
"name": "alexshelkov/simpleacl",
"type": "library",
"description": "Simple Access Control List (ACL) for PHP.",
"keywords": ["ACL", "authorization", "permission"],
"homepage": "https://github.com/alexshelkov/SimpleAcl",
"require": {
"php": ">=5.3.0"
},
"authors": [
{
"name": "Alex Shelkovskiy",
"email": "alexshelkov#gmail.com",
"role": "Developper"
}
],
"autoload": {
"psr-0": {
"SimpleAcl": "SimpleAcl/"
}
}
}
Composer encourages one library per package, so in your case you'd be better making two distinct packages for your two distinct libraries.
Also, see https://github.com/composer/composer/issues/1875
There is a workaround where you create a "master" package that "requires" your two sub-packages.