{"id":19299120,"url":"https://github.com/its-satyajit/phpv","last_synced_at":"2025-04-22T09:32:55.517Z","repository":{"id":248428147,"uuid":"828602726","full_name":"Its-Satyajit/phpv","owner":"Its-Satyajit","description":"PHPV simplifies PHP version management on Arch Linux-based systems like Manjaro, EndeavourOS, Garuda Linux, and ArcoLinux. Install, update, or switch PHP versions effortlessly with PHPV's intuitive commands. Designed for developers who value simplicity and efficiency, PHPV ensures smooth PHP development environments without the hassle.","archived":false,"fork":false,"pushed_at":"2024-07-30T10:52:55.000Z","size":1494,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-30T14:03:27.303Z","etag":null,"topics":["arch-linux","arcolinux","command-line-tools","developer-tools","endeavouros","enhancing-developer-productivity-with-phpv","garuda-linux","installing-and-updating-php-versions","linux-command-line-utilities-for-developers","manjaro","php-development-tools","php-environment-setup-on-arch-linux-distributions","php-version-control-on-arch-linux","php-version-management","pre-built-binaries-for-php-development","simplified-php-management-with-phpv","software-installation","switching-php-versions-effortlessly","troubleshooting-php-compilation-issues","using-phpv-for-seamless-php-development"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Its-Satyajit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-14T16:33:44.000Z","updated_at":"2024-07-30T10:52:59.000Z","dependencies_parsed_at":"2024-07-30T13:47:36.890Z","dependency_job_id":"fea17143-a507-4080-8f06-c60f50a1dc2f","html_url":"https://github.com/Its-Satyajit/phpv","commit_stats":null,"previous_names":["its-satyajit/phpenv","its-satyajit/phpv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Satyajit%2Fphpv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Satyajit%2Fphpv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Satyajit%2Fphpv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Satyajit%2Fphpv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Its-Satyajit","download_url":"https://codeload.github.com/Its-Satyajit/phpv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223893096,"owners_count":17220834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arch-linux","arcolinux","command-line-tools","developer-tools","endeavouros","enhancing-developer-productivity-with-phpv","garuda-linux","installing-and-updating-php-versions","linux-command-line-utilities-for-developers","manjaro","php-development-tools","php-environment-setup-on-arch-linux-distributions","php-version-control-on-arch-linux","php-version-management","pre-built-binaries-for-php-development","simplified-php-management-with-phpv","software-installation","switching-php-versions-effortlessly","troubleshooting-php-compilation-issues","using-phpv-for-seamless-php-development"],"created_at":"2024-11-09T23:10:08.067Z","updated_at":"2024-11-09T23:10:08.614Z","avatar_url":"https://github.com/Its-Satyajit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PHP Version Management Using PHPV on Arch Linux\n\n### Introduction\n\nManaging PHP versions on Arch Linux systems (including Manjaro, EndeavourOS, Garuda Linux, and ArcoLinux) can be challenging. This comprehensive tutorial introduces PHPV, a tool designed to simplify the process of installing, updating, and switching PHP versions efficiently. Follow these steps to streamline your PHP version management on Arch Linux.\n\n### Installation Guide\n\n#### Downloading PHPV\n\nFor a quick and efficient installation, use the following command:\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/Its-Satyajit/phpv/main/install.sh | bash\n```\n\n**Tip:** Ensure you have `curl` installed on your system. If not, install it using `sudo pacman -S curl`.\n\n#### Manual Installation (Optional)\n\nFollow these steps for manual installation:\n\n1. **Clone the Repository:**\n\n    ```bash\n    git clone https://github.com/Its-Satyajit/phpv.git\n    ```\n\n    **Suggestion:** Verify that `git` is installed. If not, install it with `sudo pacman -S git`.\n\n2. **Navigate and Grant Permissions:**\n\n    ```bash\n    cd phpv\n    chmod +x phpv\n    ```\n\n    **Tip:** Always check the permissions of the script before executing it to ensure it’s safe to run.\n\n3. **Install PHPV:**\n\n    ```bash\n    mv phpv $HOME/bin/phpv\n    ```\n\n    **Suggestion:** If `$HOME/bin` does not exist, create it using `mkdir -p $HOME/bin`.\n\n4. **Update Shell Configuration:**\n\n    Add the following line to your shell configuration file (e.g., ~/.bashrc, ~/.bash_profile):\n\n    ```bash\n    export PATH=\"$HOME/bin:$PATH\"\n    ```\n\n    **Tip:** Use a text editor like `nano` or `vim` to edit your shell configuration file. For example, `nano ~/.bashrc`.\n\n5. **Refresh Terminal:**\n\n    ```bash\n    source ~/.bashrc  # Replace with your appropriate shell command\n    ```\n\n    **Suggestion:** If you use a different shell, update the corresponding configuration file (e.g., `~/.zshrc` for Zsh).\n\n### Usage\n\n#### Installing/Updating/Reinstalling PHP Versions\n\nTo install, update, or reinstall PHP versions, use the following command:\n\n```bash\nphpv -i \u003cversion\u003e\n```\n\nReplace `\u003cversion\u003e` with the desired shorthand (e.g., 80 for 8.0, 74 for 7.4).\n\n**Tip:** Always check for the latest PHP versions and their shorthand notations to keep your environment up to date.\n\n**Install**\n\n![](assets/20240716_210055_install_10.png)\n\n**Update/Reinstall**\n\n![](assets/20240716_210224_update_10.png)\n\n#### Switching PHP Versions\n\nTo switch PHP versions, use the following command:\n\n```bash\nphpv \u003cversion\u003e\n```\n\nReplace `\u003cversion\u003e` with the desired shorthand.\n\n**Suggestion:** After switching versions, verify the PHP version with `php -v` to ensure the correct version is active.\n\n**Switch**\n\n![](assets/20240716_210340_switch_10.png)\n\n### Troubleshooting\n\nIf you encounter issues with the c-client dependency, follow the steps outlined below for manual installation.\n\n#### Pre-built Binary for Easy Resolution\n\nDownload the pre-built c-client binary from PHPV:\n\n-   [c-client-2007f-20-x86_64.pkg.tar.zst](https://github.com/Its-Satyajit/phpv/blob/main/c-client/c-client-2007f-20-x86_64.pkg.tar.zst)\n\n**Verification (Optional):**\n\nVerify the binary's integrity using the following hash values:\n\n-   MD5: 96d92a8b98afd78d2f2c80f8b0d76473\n-   SHA1: 4451582984bf02b1b78425b75100ca20018c8557\n-   SHA256: c6c9a0a411f476be1357f5aad8db897ce4d47f3f78757acd2aade3e477e2fe4d\n-   SHA512: 9628031b0f0efe4024c515f0a882418d7665b3267644f3bf0f12adbc5f200a9cca3049ab218be176ae8562673edca46190ca44de1154a32e0bf828028470ef1e\n\nFor additional verification, use VirusTotal.\n\n#### Manual Compilation (Advanced Users Only)\n\n**Disclaimer:** Manual compilation can introduce conflicts with existing system packages. It is recommended to use the pre-built binary or your system's package manager (e.g., pacman) for a safer installation.\n\n**Manual Compilation Steps:**\n\n1. **Gather Your Tools:**\n\n    Ensure you have the necessary development tools installed:\n\n    - `make`\n    - A C compiler (e.g., `gcc`)\n    - Development headers for system libraries (`pacman -S base-devel`)\n\n    **Suggestion:** Use `sudo pacman -S base-devel` to install essential development tools.\n\n2. **Download the Source Code:**\n\n    Access the official c-client source code repository: [https://gitweb.gentoo.org/repo/gentoo.git/tree/](https://gitweb.gentoo.org/repo/gentoo.git/tree/)\n\n    **Tip:** Always download the latest stable version to ensure compatibility and security.\n\n3. **Unpack the Source:**\n\n    Extract the source code archive:\n\n    ```bash\n    tar -zxvf c-client-X.Y.Z.tar.gz\n    ```\n\n    Replace `X.Y.Z` with the specific version number.\n\n    **Suggestion:** Use the `ls` command to verify the contents of the extracted directory.\n\n4. **Configure and Build:**\n\n    Navigate into the extracted directory:\n\n    ```bash\n    cd c-client-X.Y.Z\n    ```\n\n    Configure and build with specific flags:\n\n    ```bash\n    CFLAGS=\"-Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types\" ./configure\n    ```\n\n    **Warning:** Suppressing warnings can mask underlying issues. It is recommended to investigate the cause of these warnings and fix them if possible.\n\n    **Tip:** Use `./configure --help` to see all available configuration options.\n\n5. **Dependency Management:**\n\n    Ensure all necessary dependencies are installed. Use `pacman` to check for missing packages.\n\n    **Suggestion:** Before starting the compilation, use `sudo pacman -Syu` to update your system and installed packages.\n\n6. **Installation:**\n\n    If you choose to proceed with manual installation, use `sudo make install`:\n\n    ```bash\n    sudo make install\n    ```\n\n    **Tip:** Always review the `Makefile` before running `make install` to understand the installation process.\n\nBy following these steps, you can manually compile the c-client library for PHPV. However, for most users, the pre-built binary or using the system's package manager is the recommended approach.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-satyajit%2Fphpv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fits-satyajit%2Fphpv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-satyajit%2Fphpv/lists"}