Skip to content

Demonstrates using PHP allow_url_include for dependency management .

Notifications You must be signed in to change notification settings

bishopb/php-http-dependencies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dependencies from URL

Based on an article about Deno dependencies, this repo demonstrates that PHP may use URL, versioned or not, as dependency endpoints.

$v4 = require 'https://raw.githubusercontent.com/bishopb/php-http-dependencies/1.0.0/src/Uuid/v4.php';
echo $v4(); // Outputs: 8b787dba-d019-43d3-9fd7-2419591e5307

One could build, from this, an entire dependency management system. For it to be robust, it'd need:

  • A wrapper that checked signatures and cached contents
  • A means to scan a code base and produce a dependency list
    • A means to generate a dependency graph, in such a way as to not crawl the Internet
  • A collection of registries to facilitate package discovery

About

Demonstrates using PHP allow_url_include for dependency management .

Topics

Resources

Stars

Watchers

Forks

Languages