PHPackages                             smpita/makeas - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. smpita/makeas

Abandoned → [smpita/typeas](/?search=smpita%2Ftypeas)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

smpita/makeas
=============

Typed Container Resolver for Laravel

1.2.0(5mo ago)58.5k1MITPHPPHP ^8.1CI passing

Since Aug 17Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/smpita/makeas)[ Packagist](https://packagist.org/packages/smpita/makeas)[ Docs](https://github.com/smpita/makeas)[ RSS](/packages/smpita-makeas/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (11)Versions (9)Used By (0)

WARNING - PROJECT ABANDONED
===========================

[](#warning---project-abandoned)

- This feature has been baked into `app()->make()` as of Laravel 11.
- This [repository](https://github.com/smpita/makeas) has been archived/abandoned.
- See [smpita/typeas](https://github.com/smpita/typeas) for your typing needs.

Typed Container Resolver for Laravel
====================================

[](#typed-container-resolver-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5d0bc4054e5abd801ce351f8615794d76c0e63e1d7e1c50b7cd0253304a0a25f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d706974612f6d616b6561732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smpita/makeas)[![GitHub Tests Action Status](https://camo.githubusercontent.com/076db60f71efb45dd7dd5c437854c4f945300c2320a121fcdff064f0eecaf6f6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736d706974612f6d616b6561732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/smpita/makeas/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/fa921583fd05e247b10e520013de3b560ce4b32ad70535e9d0633e55d7010ad2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736d706974612f6d616b6561732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/smpita/makeas/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![FOSSA Status](https://camo.githubusercontent.com/2d2655e0dcbb9dd6cdb5cd700f99bbf65fb829093e37175a176870daa810d4ef/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246736d706974612532466d616b6561732e7376673f747970653d736869656c64)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsmpita%2Fmakeas?ref=badge_shield)[![Total Downloads](https://camo.githubusercontent.com/65d09064a832004acd5cfaa2b6fb49e5e93ac6dca1cc5be0bbde2562c34c9942/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736d706974612f6d616b6561732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smpita/makeas)

- Do you fight the `mixed` signature of `app()->make()` when resolving objects?
- Do you want to effortlessly guarantee the resolved object is the expected object?
- Do you use static analysis on your [Laravel](https://laravel.com/) app?

[MakeAs](https://github.com/smpita/makeas) will make sure you make the object you expect, and nicely type the return for static analysis.

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

[](#installation)

You can install the package via composer:

```
composer require smpita/makeas
```

Usage
-----

[](#usage)

If you bound an object to its class-string

```
$typed = app()->makeAs(Bound::class);
```

Of course, you can pass in parameters

```
$typed = app()->makeAs(Bound::class, []);
```

If you bound an object with a magic string

```
$typed = app()->makeAs('magic-string', [], Bound::class);
```

Signature
---------

[](#signature)

```
makeAs(string $abstract, array $parameters = [], string $expected = null): mixed
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Sean Pearce](https://github.com/smpita)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[![FOSSA Status](https://camo.githubusercontent.com/88c88f86bac8d09c9f3e19e0baf3e1a10a478589acc4d4ec8d1c06ad31e0ed62/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246736d706974612532466d616b6561732e7376673f747970653d6c61726765)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsmpita%2Fmakeas?ref=badge_large)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance70

Regular maintenance activity

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.7% 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 ~118 days

Recently: every ~206 days

Total

8

Last Release

175d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82da7b23480d977f3d1715a262aa994457f4ebb577923c8cc2bf7cb598168b34?d=identicon)[smpita](/maintainers/smpita)

---

Top Contributors

[![smpita](https://avatars.githubusercontent.com/u/14220530?v=4)](https://github.com/smpita "smpita (33 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelsmpitamakeas

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/smpita-makeas/health.svg)

```
[![Health](https://phpackages.com/badges/smpita-makeas/health.svg)](https://phpackages.com/packages/smpita-makeas)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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