npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@getevm/evm

v0.0.37

Published

An environment version manager.

Downloads

38

Readme

Environment Version Manager

A tool for developers using Windows that allows you to quickly switch between PHP versions.

If this package has helped you, and you're feeling particularly generous, you can tip me some ETH (or ETH based crypto): 0x6515654c8e931052ab17a63311411D475D503e59

About

What does this tool do?

  • Downloads & installs PHP releases for Windows
    • Automatically sets certs for cURL
    • Allows you to quickly select extensions you wish to enable
  • Seamlessly switch between PHP versions all from the command line

Prerequisites

This tool assumes a couple of things:

  1. You have Node.js installed
  2. You have access to a terminal with administrative privileges. This is required because evm modifies the PATH variable

Installation & Update

This package is installed as a global npm package:

npm i -g @getevm/evm@latest

Usage

The basic syntax for the command is:

$ evm <cmd> <version> [-ts] [-at <x86|x64>]
  • The -ts flag refers to thead safety. If omitted it will pull a non-thread safe release
  • The -at flag refers to the architecture type. It allows you to specify whether to pull a release targeting a specific architecture type. If omitted it will try and sniff the architecture of the machine requesting the release and use that

The available commands are:

$ evm install 8.1.0 # install v8.1.0 non-thread safe and sniff the arch type from OS

$ evm install 8.1.0 --ts --archType=x86 # install v8.1.0 thread safe 32bit

$ evm use 8.1.0 --ts --archType=x64 # use v8.1.0 thread safe 64bit

$ evm ls # see information about current evm installed releases

$ evm sync # synchronise the local version file with the remote version file; used to pull latest PHP releases

FAQs

Why do I need Node.js to download PHP?

Originally, evm was written in PHP and available via Composer, however, I noticed several issues:

  1. This method required the user to already have PHP and Composer installed and while it's probably fair to assume that most PHP devs do, this process seemed counterintuitive to me.
  2. When switching from lower versions of PHP to higher versions, Composer (and its dependencies) would throw errors as they expect a specific version. So it made sense to me to switch to a complete different language (Node) so that evm is no longer dependent on specific PHP versions or Composer packages.
  3. It's much easier to install Node.js than it is PHP. Node provides an executable file therefore you can run that, install evm, and then start installing PHP.

My PATH variable has been ruined after using evm!

Though rare - we've put in safety measures to prevent this - it's possible your PATH variable might get damaged during this process.

For this reason, we generate a log file each time we attempt to make changes to the PATH variable. This log file contains the value of the PATH variable before we modified. If evm can't create this file for some reason, it won't proceed.

The logs directory can be found in the evm directory.


Why is it called "Environment Version Manager" when it only manages PHP?

The alternative was to call it pvm (PHP Version Manager) and I preferred evm.

Secondly, my intention was to (is to?) make it work with other languages to (Python?) but this isn't confirmed yet.


Any other questions? Open an issue.

Support

  • If you find any bugs, open an issue
  • If you want to help in the development, fork and make PRs
  • If this package has helped you, and you're feeling particularly generous, you can tip me some ETH (or ETH based crypto): 0x6515654c8e931052ab17a63311411D475D503e59