PHPackages                             geniv/nette-autowired - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. geniv/nette-autowired

ActiveLibrary[Framework](/categories/framework)

geniv/nette-autowired
=====================

Autowired trait for Nette Framework

v1.6.3(7y ago)11.1kMITPHPPHP &gt;=7.0

Since Aug 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/geniv/nette-autowired)[ Packagist](https://packagist.org/packages/geniv/nette-autowired)[ RSS](/packages/geniv-nette-autowired/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Autowired for component
=======================

[](#autowired-for-component)

This trait allows self class use in parameters for `createComponent*`

inspired by:

Installation
------------

[](#installation)

```
$ composer require geniv/nette-autowired
```

or

```
"geniv/nette-autowired": "^1.6"
```

require:

```
"php": ">=7.0",
"nette/component-model": ">=2.3",
"nette/di": ">=2.4",
"nette/reflection": ">=2.4"
```

Include in application
----------------------

[](#include-in-application)

base presenters:

```
class BasePresenter extends Presenter
{
    use AutowiredComponent;
```

usage:

```
protected function createComponentDatagrid(string $name, IDatagridFactory $factory): DatagridFactory
{
    return $factory->create();
}
```

or

```
protected function createComponentSomeone(Someone $someone): Someone
{
    return $someone;
}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~182 days

Total

4

Last Release

2697d ago

PHP version history (2 changes)v1.6.0PHP &gt;=5.6.0

v1.6.2PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc7e200eb4e96d99020297684063209160ea1347d8a2a8b4cd769d532204867e?d=identicon)[geniv](/maintainers/geniv)

---

Top Contributors

[![geniv](https://avatars.githubusercontent.com/u/563659?v=4)](https://github.com/geniv "geniv (20 commits)")

---

Tags

nettetraitgenivautowired

### Embed Badge

![Health badge](/badges/geniv-nette-autowired/health.svg)

```
[![Health](https://phpackages.com/badges/geniv-nette-autowired/health.svg)](https://phpackages.com/packages/geniv-nette-autowired)
```

###  Alternatives

[nette/bootstrap

🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.

68537.1M634](/packages/nette-bootstrap)[kdyby/autowired

Syntax sugar for working with services in Nette Framework

30910.1k13](/packages/kdyby-autowired)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
