Welcome to the PHPKG installation guide! This repository provides a convenient script for installing phpkg, a package manager for PHP, along with some essential packages. Follow the instructions below to set up phpkg and its associated packages on your system.
PHPKG simplifies the management of PHP packages and dependencies, making it easier for PHP developers to work with various libraries and tools. With this installation guide, you'll have phpkg up and running in no time.
Before you begin, ensure that the following prerequisites are met:
- PHP 8.0 or higher: PHP must be installed on your system. To check your PHP version, run
php --version
. You should see "PHP 8" or a higher version. - Unzip: The
unzip
utility should be installed on your operating system. You can check ifunzip
is installed by runningunzip --version
. If it's not installed, you can typically install it using your system's package manager (e.g.,apt
,yum
,pacman
, orbrew
).
To install phpkg and its associated packages, you can run the following command in your terminal:
bash -c "$(curl -fsSL https://raw.github.com/php-repos/phpkg-installation/master/install.sh)"
Here's what happens when you run the installation command:
- The command downloads the installation script from the
php-repos/phpkg-installation
repository. - The installation script performs the following actions:
- Checks if your system meets the prerequisites, including having PHP 8.0 or higher and the
unzip
utility installed. - Downloads and sets up phpkg, along with the following packages:
- Creates a
credentials.json
file in the phpkg root directory, which you may need to configure with your credentials later. - Updates your shell configuration (.bashrc or .zshrc) to include phpkg in your PATH.
- Checks if your system meets the prerequisites, including having PHP 8.0 or higher and the
After the installation is complete, you can start using phpkg by opening a new terminal window or running the following command:
phpkg
You can now use phpkg to manage PHP packages. Refer to the phpkg documentation for more information on how to use phpkg and its packages.
To update phpkg and its associated packages, you can follow these steps:
- Delete the Existing Installation:
First, remove the current phpkg installation and its associated packages. You can do this by running the following
command in your terminal:
This command will remove the phpkg directory and its contents from your system.
rm -fR ~/.phpkg
- Re-run the Installation Script:
After removing the existing installation, you can re-run the installation script to get the latest version of phpkg
and its packages. Use the following command in your terminal:
This command will download and set up the latest version of phpkg, along with the associated packages. It will also configure your system as outlined in the installation instructions.
bash -c "$(curl -fsSL https://raw.github.com/php-repos/phpkg-installation/master/install.sh)"
- Verify the Update:
To ensure that the update was successful, you can run the following command to check the installed phpkg version:
You should see the latest phpkg version displayed in your terminal.
phpkg --version
To uninstall phpkg and its associated packages, you can run the following command:
rm -fR ~/.phpkg
This command will remove the phpkg directory and all its contents from your system.
Thank you for using phpkg! We hope it enhances your PHP development experience.