Download the PHP package xdg/base-directory without Composer

On this page you can find all versions of the php package xdg/base-directory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package base-directory

xdg/base-directory

codecov

PHP implementation of the XDG Base Directory Specification, with sensible default fallbacks for non-linux platforms.

Installation

Usage

See the PlatformInterface for all available platform methods.

Fallback values for Windows and macOS platforms

While on most Unix platforms, the XDG environment variables are usually defined, this is typically not the case on Windows and macOS.

This library choses to deviate from the spec and provide sensible defaults on those platforms.

Windows

On windows, when an XDG environment variable is not set, we first try to find a matching Known Folder:

XDG env Known Folder(s)
HOME Profile
XDG_CONFIG_HOME LocalAppData
XDG_DATA_HOME LocalAppData
XDG_STATE_HOME LocalAppData
XDG_CACHE_HOME LocalAppData/cache
XDG_RUNTIME_DIR LocalAppData
XDG_CONFIG_DIRS ProgramData, RoamingAppData
XDG_DATA_DIRS RoamingAppData, ProgramData

If the known folder is not defined, we then try to fall back to a windows-specific environment variable, then fall back to a static default:

KnownFolder Windows env default
Profile USERPROFILE, HOMEDRIVE + HOMEPATH 🚨 Error 🚨
LocalAppData LOCALAPPDATA $HOME/AppData/Local
RoamingAppData APPDATA $HOME/AppData/Roaming
ProgramData ProgramData %SystemDrive%/ProgramData, C:/ProgramData

MacOS

XDG env Fallback
XDG_CONFIG_HOME $HOME/Library/Application Support
XDG_DATA_HOME $HOME/Library/Application Support
XDG_STATE_HOME $HOME/Library/Application Support
XDG_CACHE_HOME $HOME/Library/caches
XDG_RUNTIME_DIR $HOME/Library/Application Support
XDG_CONFIG_DIRS $HOME/Library/Preferences, /Library/Application Support, /Library/Preferences
XDG_DATA_DIRS /Library/Application Support

All versions of base-directory with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/filesystem Version ^5.4||^6.0
xdg/environment Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xdg/base-directory contains the following files

Loading the files please wait ...