Code Monkey home page Code Monkey logo

swtp's Introduction

swtp's People

Contributors

kisztof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

swtp's Issues

Implement Online Installation

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:

  • Fetch the latest tagged version from the GitHub repository.
  • Download the corresponding binary or script.
  • Make it executable and place it in the appropriate directory.

Display Current PHP Version After Successfully Switching

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".

Script Incorrectly Reports Installed PHP Versions as "Not Installed"

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 Homebrew Installation Check in Bootstrap Script

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.

Implement Auto-Update Feature

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:

  • Check the latest tagged version from the GitHub repository at the start of the script.
  • Compare it with the currently installed version.
  • If a newer version is available, prompt the user to update.

Occasional "Failed to switch to PHP version" Error

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.