
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.
Package to manage dependencies of project.
Composer:
$ composer require 00f100/fcphp-di
or add in composer.json
{
"require": {
"00f100/fcphp-di": "*"
}
}
<?php
use FcPHP\Di\Facades\DiFacade;
$di = DiFacade::getInstance();
/**
* Method to set new class
*
* @param string $id Identify of instance
* @param string $namespace Namespace of class
* @param array $args Args to construct class
* @return void
*/
$di->set(string $id, string $namespace, array $args = [], array $setters = [], bool $singleton = true);
/**
* Method to overwrite instance before make
*
* @param string $id Identify instance
* @param string $namespace Namespace of class
* @param array $args Args to construct class
* @param array $setters Setters to class
* @return FcPhp\Di\Interfaces\IDi
*/
$di->overwrite(string $id, string $namespace, array $args = [], array $setters = []) ;
/**
* Method to get instance of Container
*
* @param string $id Identify of instance
* @param array $args Args to construct instance
* @return FcPhp\Di\Interfaces\IContainer
*/
$di->get(string $id, array $args = [], array $setters = []);
/**
* Method to configure setters to class
*
* @param string $id Identify instance
* @param array $setters Setters to class
* @return FcPhp\Di\Interfaces\IDi
*/
$di->setter(string $id, array $setters);
/**
* Method instance of class
*
* @param string $id Identify of instance
* @param array $args Args to construct instance
* @return mixed
*/
$di->make(string $id, array $args = [], array $setters = []);
<?php
use FcPHP\Di\Facades\DiFacade;
$di = DiFacade::getInstance();
/*
namespace Namespace\To {
class Example {
public $foo;
private $anotherFoo;
public function __construct(string $foo) {
$this->foo = $foo;
}
public function setAnotherFoo($foo) {
$this->anotherFoo = $foo;
}
public functio getAnotherFoo() {
return $this->anotherFoo;
}
}
class ExampleBar {
public $example;
__construct(Example $example) {
$this->example = $example;
}
}
}
*/
$di->set('Example', 'Namespace\To\Example', ['foo' => 'bar'], ['setAnotherFoo', 'AnotherBar']);
$di->set('ExampleBar', 'Namespace\To\ExampleBar', ['example' => $di->get('Example')]);
// Print "bar"
echo $di->make('ExampleBar')->example->foo
// Print "AnotherBar"
echo $di->make('ExampleBar')->example->getAnotherFoo();
<?php
use FcPHP\Di\Facades\DiFacade;
use FcPhp\Di\Interfaces\IInstance;
use FcPhp\Di\Interfaces\IContainer;
$di = DiFacade::getInstance();
$di->event([
'beforeSet' => function(string $id, string $namespace, array $args, array $setters, bool $singleton) {
},
'afterSet' => function(string $id, string $namespace, array $args, array $setters, bool $singleton, IInstance $instance) {
},
'beforeGet' => function(string $id, array $args, array $setters) {
},
'afterGet' => function(string $id, array $args, array $setters, IInstance $instance, IContainer $container) {
},
'beforeMake' => function(string $id, array $args, array $setters) {
},
'afterMake' => function(string $id, array $args, array $setters, IInstance $instance, IContainer $container, $class) {
}
]);
FAQs
Dependency Injection for FcPHP
We found that 00f100/fcphp-di 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.