TYPO3 11 LTS with composer.
I tried:
composer require typo3/cms-introduction
the introduction package and bootstrap package are loaded.
Then i tried:
vendor/bin/typo3 extension:setup
but nothing happens. In the extensions manager i can see both extensions but no page in the page tree, nothing in the backend.
There are different descriptions out in the world:
composer exec typo3 extension:setup
results in this error message:
Script typo3 handling the __exec_command event returned with error code 255
It seems impossible to install the introduction package in TYPO3 11 with composer.
Any hints?
Thanks
Peter
I use always
vendor/bin/typo3cms install:setup
vendor/bin/typo3cms install:extensionsetupifpossible
and never had any problems, it requires this though:
"helhum/typo3-console": "^7.0.2"
I tested it with the introduction package too and the pages are created. The frontend is directly shown correctly after this.
My setup was completely based on composer, so there is no general problem to install the introduction package by composer.
If you want to repair the installation, keep care about the hint in the installation instruction:
If you want to re-install ext:introduction on an instance that had ext:introduction
loaded before, the data import is only performed if you (manually) remove the keys
marked with extensionDataImport in column entry_namespace from database table
sys_registry that are related to the introduction paths.
Note it is often easier to just install TYPO3 from scratch if you just want to play around.
TYPO3 and composer
Documentation related to composer is included in several documents:
TYPO3 installation
There exist two distributions that can be installed:
minmal is a very slim collection of system extensions.
base-distribution is a collection with most of the common system extensions.
naturally it's also possible to start with an individual composer.json file that is defining an own set of system extensions, so the packages above wouldn't be used.
It's also possible to install just an extension by composer without having installed TYPO3 before, then TYPO3 gets automatically installed as dependency if the extension defines at least one system extension as dependency.
Minor TYPO3 upgrade
Major TYPO3 upgrade
Explanation of composer.json for TYPO3
Furthermore there is an online helper for composer that makes it easier to collect all the desired packages for commandline:
https://get.typo3.org/misc/composer/helper
Note that it's not always better to install more packages and that not every package is available for every TYPO3 version.
typo3-console
The manual for the typo3-console can be found here:
https://docs.typo3.org/p/helhum/typo3-console/7.1/en-us/
You can switch the version in the top left corner of the manual.
The typo3-console can be used for non-composer installations too, it can be downloaded here:
https://extensions.typo3.org/extension/typo3_console
https://github.com/TYPO3-Console/TYPO3-Console/tags
TYPO3 v12
For TYPO3 v12 the typo3-console is not compatible yet (Oct. 7, 2022), so some steps in the install-process have to be done manually and are not available yet by command line.
All composer commands can be used and are not concerned by the missing console. Just in composer.json files usually this block is used and has to be removed until typo3-console is compatibel to v12:
"scripts":{
"typo3-cms-scripts": [
"typo3cms install:fixfolderstructure"
],
"post-autoload-dump": [
"#typo3-cms-scripts"
]
},
Related
I have an existing (and working) Symfony 2.8 project with Sonata Admin. It used to be installed on a server with PHP 5.6, but I have to move it to a server running PHP 7.2.
For some reason my composer.json was not in sync with its composer.lock so I'm trying to fix that but I'm lost in a dependency hell. Hoping someone here has a working setup similar to mine :)
I have a bunch of dependencies, but here are the ones that seem to be the culprits:
sonata-project/admin-bundle
sonata-project/block-bundle
sonata-project/core-bundle
sonata-project/datagrid-bundle
sonata-project/doctrine-orm-admin-bundle
sonata-project/intl-bundle
sonata-project/user-bundle
I used to have them in 2.2.*#dev, 2.3.*#dev or 2.4.*#dev but I now get conflicts when I require them this way. I eventually got a valid composer.lock with this config (notice I removed block-bundle because it is required by one of these):
"sonata-project/admin-bundle" : "2.3.10",
"sonata-project/datagrid-bundle" : "^2.2.1",
"sonata-project/doctrine-orm-admin-bundle": "^2.2.8",
"sonata-project/intl-bundle" : "^2.2.4",
"sonata-project/user-bundle" : "^2.2.5",
But the admin part of the site is broken with the following error:
Variable "sonata_admin" does not exist
I also got Block "preview" on template "SonataAdminBundle::standard_layout.html.twig" does not exist at some point, but can't remember when/how.
I know Sonata has a long history of making Composer dependency a complicated thing (because of its multiple packages and versions), and I've read numerous questions/issues on Stack Overflow and GitHub but couldn't find the one for me.
Has anyone found the perfect combination of requirements?
Would love to know!
How can I enable the common image select dialog in ckeditor? The extension rte_ckeditor_image isn't available for TYPO3 10.
I didn't found anything. Isn't there no one needing this?
Normal images have no place in the CKEditor, as these can then no longer be processed by the TYPO3 system and optimized for responsive design.
Small images are often only pictograms and can be integrated as icon fonts using CSS classes.
Therefore the need is small.
But there is a branch on GitHub supporting TYPO3 v10. You can download the dev-TYPO3_10.x branch as a zip file and place it in your typo3conf/ext in a folder named rte_ckeditor_image.
If you are using composer, you can try to use composer req netresearch/rte-ckeditor-image:dev-TYPO3_10.x.
If you have a composer installation and composer req fails (as it did in my case) you can try the following.
Download extension as mentioned above.
Add the autoload line(s) to your
composer.json
{
"autoload": {
"psr-4": {
"Netresearch\\RteCKEditorImage\\": "public/typo3conf/ext/rte_ckeditor_image/Classes/"
}
}
}
Run composer install
Activate the extension in Extension Manager
Follow the installation instruction of rte_ckedit_image
Clear TYPO3 Cache in Maintenance
There are currently waiting 2 pull requests that might have some updates.
WIP: Dev TYPO3 10.x what will bring the v10 version to production
Dev typo3 10.x what simply resolves the conflicts in WIP: Dev TYPO3 10.x
The question says it all. I'd like to install https://github.com/lochmueller/staticfilecache in a non-composerified TYPO3 instance. What is the recommended procedure?
I thought I could download the source, cd into it and then do composer install on the command line and then I would get the complete extension. But I didn't see that worked.
You could ask the author to add support for the TYPO3 Classic Mode which basically means embedding dependencies for extension packages uploaded to the TER. There is no other way to achieve this in Classic Mode, thus obviously I strongly recommend switching to Composer Mode.
Is it possible to include Nunjucks in a project with Composer?
Or do I have to download it manually?
No, you cannot install it via Composer, as it is a PHP dependency manager, used almost exclusively for PHP packages (which Nunjucks is obviously not). It's not impossible for non-PHP packages to be installable via Composer, but that's a rare occasion.
As a general rule of thumb, to check Composer availability - look at the source code repository and see if a file named composer.json exists.
But that doesn't mean you have to download it by hand, as there's an equivalent solution for JavaScript packages - NPM; and Mozilla have made it available there.
A couple of years of go i used to program using PHP, but without frameworks. With these recent developments I've decided to get in the to the game and try using one. I've decided to use yii 2.0 .
I've read some of the documentation and in my opinion there is some lack of information (at least for who is getting started), so i´m having some problems installing yii 2.0 on my computer using Xampp. The PHP version is 5.5.9.
From what i could understand i downloaded the yii 2.0 framework, extracted the content and copied to c:\xampp\htdocs\yii2
I've already installed the composer, so the the next thing to do i think would be, using the cmd, do these two lines of code:
composer global require "fxp/composer-asset-plugin:1.0.0"
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
The problem is when i do the last one it asks for username and password i think of GitHub. Can you tell me if I'm obligated to have an account on github to install yii 2.0 framework.
Is there a way to get around this?
Yii2 is integrated with composer asset plugin. It allows download Bower and NodeJs packages through Composer.
Github account is required to overcome API rate limit. Here is the explanation from the main contributor of this extension:
It's a rate limit of Github API. In anonymous access, Github at a
greatly reduced limit (60/hr it seems to me), and we must be logged
with a token for have a much higher limit.
See composer/composer#1569 and composer/composer#1877
The problem also exists using Nodejs and Bower.
You can find it in this issue, it's 9th from the top.
I think workaround with installing Bower and the same packages is not an option, because initially and with each framework update you must manually synchronize packages with their versions and override some configuration. Also some extensions require javascript plugins and using composer asset plugin too. So you have to do the same with each of them too. It simply not worth it. And having account on Github for web developer nowadays is kind of de facto standard.
Just create Github account if you are still don't have one and everything should be fine. Earlier updating process was pretty slow, now it's faster and I found this approach pretty interesting and flexible.