New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

addvilz/what_loaded

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

addvilz/what_loaded

Determine What packages, classes and vendors were loaded during execution

Source
Packagist
Version
dev-master
Version published
Total downloads
10
Maintainers
1
Created
Source

WhatLoaded?!

WhatLoaded is essentially a autoloader hook that listens for autoload calls and registers all classes that is loaded via autoloader. It is later possible to analyze this data to get insight on dependencies and whatever other metrics you could extract from this.

Installation

composer require addvilz/what_loaded

Usage

IMPORTANT: WhatLoaded::start must be invoked AFTER any other autoload handlers are registered. For example, if you are using composer, you must invoke WhatLoaded::start after require '/vendor/autoload.php'.

Rendering stats manually

    \Addvilz\WhatLoaded\WhatLoaded::start();
    // ... code
    \Addvilz\WhatLoaded\WhatLoaded::render();

Retrieving collected data

    \Addvilz\WhatLoaded\WhatLoaded::start();
    // ... code
    $data = \Addvilz\WhatLoaded\WhatLoaded::collect();

Rendering stats on shutdown

    \Addvilz\WhatLoaded\WhatLoaded::start();
    \Addvilz\WhatLoaded\WhatLoaded::renderOnShutdown();
    // ... code

License

Licensed under terms and conditions of Apache 2.0 license.

FAQs

Package last updated on 03 Aug 2015

Related posts