All Projects → Wilkins → composer-file-loader

Wilkins / composer-file-loader

Licence: other
Tool to load namespaces and classes from composer.json file without composer

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to composer-file-loader

autoload
Aplus Framework Autoload Library
Stars: ✭ 18 (-71.87%)
Mutual labels:  composer, loader
composer-normalize-action
+ 🎵 Provides a GitHub action for running ergebnis/composer-normalize.
Stars: ✭ 25 (-60.94%)
Mutual labels:  composer
gdoo
Gdoo是基于PHP Laravel框架的开源OA/协同办公平台,包含销售管理、日程安排,进销存、数据分析,强大的自定义能力。改进销售管理模式,提升企业执行效率
Stars: ✭ 111 (+73.44%)
Mutual labels:  composer
phpchartjs
A PHP library that makes it easy to generate data for ChartJS.
Stars: ✭ 24 (-62.5%)
Mutual labels:  composer
proc-that
proc(ess)-that - easy extendable ETL tool for Node.js. Written in TypeScript.
Stars: ✭ 25 (-60.94%)
Mutual labels:  loader
php-abraflexi
PHP Based Library for easy interaction with czech accounting system FlexiBee.
Stars: ✭ 15 (-76.56%)
Mutual labels:  composer
vue-skeleton-loader
A simple and easily customizable skeleton loader plugin for you Vue application.
Stars: ✭ 74 (+15.63%)
Mutual labels:  loader
license-checker-php
CLI tool to verify used licenses in composer dependencies
Stars: ✭ 28 (-56.25%)
Mutual labels:  composer
selene
A opinionated Wordpress base theme based on Sage.
Stars: ✭ 31 (-51.56%)
Mutual labels:  composer
yaf-example
A example of yaf
Stars: ✭ 53 (-17.19%)
Mutual labels:  composer
SSSwiftUISpinnerButton
SSSwiftUISpinnerButton is a collection of various spinning animations for buttons in SwiftUI.
Stars: ✭ 37 (-42.19%)
Mutual labels:  loader
sql-repository
[PHP 7] SQL Repository implementation
Stars: ✭ 37 (-42.19%)
Mutual labels:  composer
Centrifuge
Cross-platform runtime mod loader and API for any Unity-based game. Supports Unity 5 and up!
Stars: ✭ 27 (-57.81%)
Mutual labels:  loader
wordpress-bundle
Use Wordpress and Symfony together using a Symfony bundle
Stars: ✭ 30 (-53.12%)
Mutual labels:  composer
pagination
Aplus Framework Pagination Library
Stars: ✭ 167 (+160.94%)
Mutual labels:  composer
idomizer
An HTML template parser compiling an incremental-dom render factory.
Stars: ✭ 15 (-76.56%)
Mutual labels:  loader
bigflow
A Python framework for data processing on GCP.
Stars: ✭ 96 (+50%)
Mutual labels:  composer
session
Aplus Framework Session Library
Stars: ✭ 170 (+165.63%)
Mutual labels:  composer
guzzle-log-middleware
A Guzzle middleware to log request and responses automatically
Stars: ✭ 61 (-4.69%)
Mutual labels:  composer
HandlebarsCookbook
A cookbook of handlebars and mustache, focus on handlebars.js , mustache.js and lightncandy usage
Stars: ✭ 20 (-68.75%)
Mutual labels:  composer

Composer File Loader

Allows you to load a composer.json file just as composer would do it.

This allows you to load composer.json file without composer (so, theoretically, PHP 5.2 is enough).

Support

  • PSR-4 : YES
  • PSR-0 : YES
  • Classmap : NO
  • Files : YES

Usage

You have a composer.json file looking like this :

{
    "name": "wilkins/composer-file-loader",
    "type": "function",
    "description": "Load composer file",
    "autoload": {
        "psr-4": {
            "": "src2/",
            "RoutePlanner\\": "src/",
            "CompanyName\\PackageName\\": [
                "packages/package-folder/src/",
                "packages/package-folder1/src/"
            ]
        }
    }
}
// You load the PackageLoader
include __DIR__.'/PackageLoader.php';

// You load your packages
$loader = new PackageLoader\PackageLoader();
$loader->load(__DIR__."/vendor/project");

// You call the package classes
new CompanyName\PackageName\Machin();
new CompanyName\PackageName\Bidule();
new RoutePlanner\Truc();
new TestNoNamespace();

Testing

Just go into the root directory and run:

php test.php

If no error appears, you're good!

Contribution

Created by Thibault Taillandier from this stackoverflow question.

Please fork it to add more support

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].