kisztof / swtp Goto Github PK
View Code? Open in Web Editor NEWA versatile CLI tool for effortlessly switching between different PHP versions on macOS.
A versatile CLI tool for effortlessly switching between different PHP versions on macOS.
When attempting to switch to an installed PHP version using the swtp script, the script incorrectly reports that the PHP version is "not installed" and prompts the user to install it.
❯ swtp 8.0
Currently linked PHP version: 7.4
Debug: Available versions in PHP_VERSIONS array:
PHP version 8.0 is not installed. Would you like to install it now? (y/n):
Implement an auto-update feature that checks for the latest version of the swtp tool each time it runs. If a newer version is available, prompt the user to update.
Details
Modify the existing swtp script to:
The swtp script currently lacks a help option (-h) to assist users in understanding its various functionalities and usage.
Upon successfully switching the PHP version, the swtp script currently provides php -v
output.
Output Specificity: The desired output format for displaying the current PHP version should be succinct and follow the specific format "You are now using PHP version: X.Y", where X is the major version number and Y is the minor version number. For example, if the new PHP version is 8.0, the output should explicitly read "You are now using PHP version: 8.0".
Implement an online installation feature to allow users to download and install the latest tagged version of the swtp tool directly from the GitHub repository.
Details
Modify the existing install.sh script to:
Hello,
Firstly, I want to express my gratitude for the development of the swtp tool. It's been incredibly useful in my workflow.
Just to create this issue, I have created an account on github :).
However, I've encountered an issue that I wanted to bring to your attention. Occasionally, when attempting to switch PHP versions using swtp, I receive an error message that says "Failed to switch to PHP version".
For instance, when I run swtp 8.2 to switch from PHP 7.4 to 8.2, I see the following output:
❯ swtp 8.2
Currently linked PHP version: 7.4
Unlinking the current PHP version...
Linking PHP version 8.2...
Failed to switch to PHP version 8.2.
This error doesn't always occur, but it happens frequently enough to disrupt my workflow. I would appreciate any guidance or fixes you might have for this issue.
Thank you once again for your work on this tool.
Currently, our bootstrap script assumes that Homebrew is installed on the system where it's executed. This assumption might not hold for all users, potentially leading to failures or manual setup steps. To improve the user experience, the script should check for Homebrew's presence and offer to install it if not found.
The current version of the swtp script allows switching between different PHP versions but lacks the ability to automatically detect which PHP versions are installed on the system.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.