Packages
Also called the Composer Web Installer, and introduced in Tiki18, this feature is for the installation and management of external software packages using Composer.
Overview
Note that there are two kinds of packages
- "Normal" php packages, as you'd find on https://packagist.org/
- Tiki Extensions https://doc.tiki.org/Packages-that-extend-Tiki
Composer is used in the Tiki code development process to import and manage external software such as jQuery and Bootstrap. But some software cannot be packaged with Tiki due to an incompatible license, or shouldn't necessarily be packaged with Tiki by default because of the software's specialized nature or niche application. So it is a natural step for Tiki site administrators to be able to use Composer to install and manage external software specifically for their site after the site is installed.
Package list
Use
The interface for Packages is located at the site's tiki-admin.php?page=packages page. The Packages admin page has four sections, displayed in tabs — Packages Installed, Install Other Packages, Packages Bundled, and Diagnose. These sections are described below:
Packages Installed
This list shows packages that have been installed via this feature. The details for each package include package name, version required, status, and version installed, plus a remove button for each. The version required is the minimum version required by Tiki, so the version installed must be that version or a newer one. If the Packages feature hasn't been used yet, then of course the list will be empty.
The status column shows a success icon () if the package is installed, or a warning icon () if it is missing. If the package is missing, you can click the "Fix Missing Packages" button that is displayed and Tiki will try to install the package again.
Manual install (FTP)
If for some reason, the web-based package installer is not working for you, you can use the FTP alternative explained at: https://packages.tiki.org/
Install Other Packages
This section shows packages that are available to be selected and installed.
Some examples include:
Install Other Packages
Note: It may happen that mxGraph is not available on this list, so to add it to your Tiki installation, follow this link, it contains all the information you will need to add a package if it is not available for installation through the graphical interface.
Install Other Packages section feedback[+]
(This is the text from the above screenshot, added for search purposes, etc.)
There appear to be some optional packages that can be installed
In the list above, there are optional packages that may be installed in order to use the Tiki features that require the package.
Install packages from the administrator interface
Composer was not detected. Please follow the manual instructions.
Install packages manually
Make sure composer is installed.
Composer can be installed manually, in the host machine, by following the instructions from the Composer website.
The script setup.sh that is included in the Tiki distribution can be run to make sure Composer is installed. In this case, Composer will be installed as temp/composer.phar . Below is an example of how to do this in a Linux-like operating system:
bash ./setup.sh composer
Make sure there is a composer.json file in the root of the website.
If there is not already a composer.json file, then create one. The sample composer.json.dist that comes with Tiki can be used as a starting point. Below is an example of how to do this in a Linux-like operating system:
cp composer.json.dist composer.json
Install the package.
After all the steps above (that only need to be performed once), packages can be installed by issuing a command composer require package:version for each package that is to be installed. Below is an example of how to do this in a Linux-like operating system:
php temp/composer.phar require --update-no-dev --prefer-dist psr/log:^1.0
Other information
Currently those that are available are listed in the local composer.json file and fetched from https://packagist.org.
Packages Bundled
This section lists the external software packages that are bundled with the core Tiki files, so are available for use in a fresh Tiki site. This list is for information purposes only and there's no interface here to make changes.
Packages Bundled
Diagnose
The "Diagnose Composer" button can be clicked to run Composer and test the output. If Composer isn't found for some reason, there will be a message to that effect.
Diagnose Composer - Composer Not Found
Normally, Composer will be found and run, and so some information will be shown here.
Diagnose Composer - OK
Troubleshooting
Your requirements could not be resolved to an installable set of packages
If you run into errors such as the following, try uninstalling and re-installing the packages
Copy to clipboard = Composer execution output:
Errors:
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install mpdf/mpdf v8.0.5
- Conclusion: don't install mpdf/mpdf v8.0.4
- Conclusion: don't install mpdf/mpdf v8.0.3
- Conclusion: don't install mpdf/mpdf v8.0.2
- Conclusion: don't install mpdf/mpdf v8.0.1
- Conclusion: don't install mpdf/mpdf v8.0.0
- Conclusion: don't install mpdf/mpdf v8.0.5
- Conclusion: don't install mpdf/mpdf v8.0.4
- Conclusion: don't install mpdf/mpdf v8.0.3
- Conclusion: don't install mpdf/mpdf v8.0.2
- Conclusion: don't install mpdf/mpdf v8.0.1
- Conclusion: remove setasign/fpdi 1.6.2
- Installation request for mpdf/mpdf ^8.0.0 -> satisfiable by mpdf/mpdf[v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.0.5].
- Conclusion: don't install setasign/fpdi 1.6.2
- mpdf/mpdf v8.0.0 requires setasign/fpdi ^2.1 -> satisfiable by setasign/fpdi[v2.1.0, v2.2.0, v2.3.0, v2.1.1].
- Can only install one of: setasign/fpdi[v2.1.0, 1.6.2].
- Can only install one of: setasign/fpdi[v2.1.1, 1.6.2].
- Can only install one of: setasign/fpdi[v2.2.0, 1.6.2].
- Can only install one of: setasign/fpdi[v2.3.0, 1.6.2].
- Can only install one of: setasign/fpdi[1.6.2, v2.1.0].
- Can only install one of: setasign/fpdi[1.6.2, v2.2.0].
- Can only install one of: setasign/fpdi[1.6.2, v2.3.0].
- Installation request for setasign/fpdi (locked at 1.6.2) -> satisfiable by setasign/fpdi[1.6.2].
Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
Installation failed, reverting ./composer.json to its original content.
Future development
Initially, the focus will be files at https://packagist.org/, but later this feature is intended to be expanded to include importing themes, libraries formerly hosted at mods.tiki.org, language files, and more.
Related
Page alias
|