Download the PHP package typisttech/imposter without Composer

On this page you can find all versions of the php package typisttech/imposter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package imposter

# Imposter
[![Packagist Version](https://img.shields.io/packagist/v/typisttech/imposter.svg?style=flat-square)](https://packagist.org/packages/typisttech/imposter) [![Packagist Downloads](https://img.shields.io/packagist/dt/typisttech/imposter.svg?style=flat-square)](https://packagist.org/packages/typisttech/imposter) [![PHP from Packagist](https://img.shields.io/packagist/php-v/TypistTech/imposter?style=flat-square)](https://packagist.org/packages/typisttech/imposter) [![CircleCI](https://img.shields.io/circleci/build/gh/TypistTech/imposter?style=flat-square)](https://circleci.com/gh/TypistTech/imposter) [![Codecov](https://img.shields.io/codecov/c/gh/typisttech/imposter?style=flat-square)](https://codecov.io/gh/TypistTech/imposter) [![License](https://img.shields.io/github/license/TypistTech/imposter.svg?style=flat-square)](https://github.com/TypistTech/imposter/blob/master/LICENSE) [![Twitter Follow @TangRufus](https://img.shields.io/twitter/follow/TangRufus?style=flat-square&color=1da1f2&logo=twitter)](https://twitter.com/tangrufus) [![Hire Typist Tech](https://img.shields.io/badge/Hire-Typist%20Tech-ff69b4.svg?style=flat-square)](https://www.typist.tech/contact/)

Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Built with ♥ by Typist Tech


Imposter is an open source project and completely free to use.

However, the amount of effort needed to maintain and develop new features is not sustainable without proper financial backing. If you have the capability, please consider donating using the links below:

[![GitHub via Sponsor](https://img.shields.io/badge/Sponsor-GitHub-ea4aaa?style=flat-square&logo=github)](https://github.com/sponsors/TangRufus) [![Sponsor via PayPal](https://img.shields.io/badge/Sponsor-PayPal-blue.svg?style=flat-square&logo=paypal)](https://typist.tech/go/paypal-donate/) [![More Sponsorship Information](https://img.shields.io/badge/Sponsor-More%20Details-ff69b4?style=flat-square)](https://typist.tech/donate/imposter/)

Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Why?

Because of the lack of dependency management in WordPress, if two plugins bundled conflicting versions of the same package, hard-to-reproduce bugs arise. Monkey patching composer vendor packages, wrapping them inside your own namespace is a less-than-ideal solution to avoid such conflicts.

See:

Install

If you want to hook Imposter into composer command events, install Imposter Plugin instead. See: How can I integrate Imposter with composer?

Installation should be done via composer, details of how to install composer can be found at https://getcomposer.org/.

Config

In your composer.json:

extra.imposter.namespace

Required String

This is the namespace prefix to be added to vendor packages.

extra.imposter.excludes

Optional Array of strings

Vendor packages which needs to be excluded from namespace prefixing. All composer-made packages are excluded by default. Besides, anything under the Composer namespace will be excluded.

Usage

After every $ composer install and $ composer update:

The above snippet:

  1. Look for /path/to/project/root/composer.json
  2. Find out vendor-dir
  3. Find out all required packages, including those required by dependencies
  4. Find out all autoload paths for all required packages
  5. Prefix all namespaces with the imposter namespace defined in your composer.json

Before:

After:


Typist Tech is ready to build your next awesome WordPress site. Hire us!


Known Issues

Help Wanted. Pull requests are welcomed.

  1. Traits are not transformed
  2. Virtual packages are not supported

Frequently Asked Questions

How can I integrate imposter with composer?

Use Imposter Plugin instead. It hooks imposter into composer command events.

Does imposter support PSR4, PSR0, Classmap and Files?

Yes for all. PSR-4 and PSR-0 autoloading, classmap generation and files includes are supported.

Can I exclude some of the packages from imposter?

Yes, see extra.imposter.excludes. All composer made packages are excluded by default.

How about require-dev packages?

Imposter do nothing on require-dev packages because imposter is intended for avoiding production environment., not for development environment.

How about PHP built-in classes?

Imposter skips classes that on global namespace, for example: \ArrayObject, \RuntimeException

How about packages that don't use namespaces?

Not for now. Tell me your idea by opening an issue.

How about packages that use fully qualified name?

Not for now. We need a better regex(or something better than regex) in the Transformer class. Tell me your idea by opening an issue

The whole imposter situation is horrible. What can we do about it?

Until WordPress core comes up with a solution on dependency managment, keep clam and carry on.

In the meantime, checkout these tools to make WordPress suck less modernizing WordPress development:

Which composer versions are supported?

Both v1 and v2.

Will you add support for older PHP versions?

Never! This plugin will only work on actively supported PHP versions.

Don't use it on end of life or security fixes only PHP versions.

It looks awesome. Where can I find some more goodies like this

Where can I give 5-star reviews?

Thanks! Glad you like it. It's important to let me knows somebody is using this project. Please consider:

Testing

Alternatives

Here is a list of alternatives that I found. However, none of these satisfied my requirements.

If you know other similar projects, feel free to edit this section!

Feedback

Please provide feedback! We want to make this project as useful as possible. Please submit an issue and point out what you do and don't like, or fork the project and send pull requests. No issue is too small.

Security Vulnerabilities

If you discover a security vulnerability within this project, please email us at [email protected]. All security vulnerabilities will be promptly addressed.

Credits

Imposter is a Typist Tech project and maintained by Tang Rufus, freelance developer for hire.

Full list of contributors can be found here.

License

Imposter is released under the MIT License.


All versions of imposter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package typisttech/imposter contains the following files

Loading the files please wait ....