
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
00f100/fcphp-autoload
Advanced tools
Package to autoload providers and routes into another composer packages
Composer:
$ composer require 00f100/fcphp-autoload
or add in composer.json
{
"require": {
"00f100/fcphp-autoload": "*"
}
}
providers.php<?php
return [
\path\to\SomeClass::class,
\path\to\package\Cool::class
];
routes.php<?php
return [
'path/to/route' => [
'post' => 'SiteController@method'
]
];
<?php
use FcPhp\Autoload\Autoload;
/**
* Method to load path and find match's
*
* @param string $pathExpression Directory to find file(s)
* @param array $fileNameMatch List of filename
* @param array $extensionMatch List of enable extensions
* @return void
*/
$autoload = Autoload::getInstance();
$autoload->path(string $pathExpression, array $fileNameMatch, array $extensionMatch);
/*
Example to find inside composer directory
============================================
Example directory:
============================================
vendor/
00f100/
fcphp-di/
autoload/
providers.php
prividers.txt
fcphp-i18n/
fcphp-provider/
autoload/
routes.php
doctrine/
doctrine/
instructor/
cake/
bin/
cake/
autoload/
providers.php
*/
$autoload->path('vendor/*/*/autoload', ['providers', 'routes'], ['php']);
/*
============================================
Below example match this files:
============================================
vendor/00f100/fcphp-di/autoload/providers.php
vendor/00f100/fcphp-provider/autoload/routes.php
vendor/cake/cake/autoload/providers.php
*/
/*
============================================
Get the content using 'get' method
============================================
[
'path/to/route' => [
'post' => 'SiteController@method'
]
]
$arrayProviders = $autoload->get('providers');
[
\path\to\SomeClass,
\path\to\package\Cool
]
$arrayRoutes = $autoload->get('routes');
*/
/**
* Method to return autoloaded files
*
* @param string $key Filename
* @return array
*/
$autoload->get(string $fileName);
This clousure run before match run
$instance->beforeMatch(function(string $pathExpression, array $fileNameMatch, array $extensionMatch) {
// your code here
});
This clousure run before match some dir again
$instance->beforeMatchAgain(function(array $paths, array $files, array $extensions, string $path, string $now) {
// your code here
});
This clousure run before storage file content
$instance->beforeStorage(function(string $file, string $filePath) {
// your code here
});
FAQs
Autoload providers and routes into composer vendor package
We found that 00f100/fcphp-autoload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.