ajiho/namespaceify

Used to solve global function conflicts

Installs: 21

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/ajiho/namespaceify

v1.0.1 2024-05-13 19:51 UTC

This package is auto-updated.

Last update: 2025-09-13 23:17:36 UTC


README

Add a namespace to the file and replace the function call in the specified directory with a function call in the specified namespace

Installation

composer require ajiho/namespaceify

Usage

Use special use cases to demonstrate usage

$filename = dirname(__DIR__) . '/vendor/cakephp/core/functions.php';
$pkgDir = dirname(__DIR__) . '/vendor/cakephp';
$parser = new \ajiho\namespaceify\Parser($pkgDir, $filename, 'Cake\Core');
$parser->run();
$filename = dirname(__DIR__) . '/vendor/illuminate/support/helpers.php';
$pkgDir = dirname(__DIR__) . '/vendor/illuminate';
$parser = new \ajiho\namespaceify\Parser($pkgDir, $filename, 'Illuminate\Support');
$parser->run();