All Projects → TypistTech → Imposter Plugin

TypistTech / Imposter Plugin

Licence: mit
Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Projects that are alternatives of or similar to Imposter Plugin

Acf Pro Installer
A composer install helper for Advanced Custom Fields PRO
Stars: ✭ 265 (+194.44%)
Mutual labels:  wordpress, wordpress-development, composer-plugin
Raccoon Plugin
With Raccoon, use a JSON or YAML file to manage WordPress theme features
Stars: ✭ 18 (-80%)
Mutual labels:  wordpress, wordpress-development
Intervention
WordPress plugin to configure wp-admin and application state using a single config file.
Stars: ✭ 481 (+434.44%)
Mutual labels:  wordpress, wordpress-development
Tj
Create local WordPress dev sites, manage existing sites, and deploy them, all from the command line.
Stars: ✭ 88 (-2.22%)
Mutual labels:  wordpress, wordpress-development
Instantwp
InstantWP is a complete standalone, portable WordPress development environment.
Stars: ✭ 83 (-7.78%)
Mutual labels:  wordpress, wordpress-development
Headless Wp Starter
🔪 WordPress + React Starter Kit: Spin up a WordPress-powered React app in one step
Stars: ✭ 4,144 (+4504.44%)
Mutual labels:  wordpress, wordpress-development
Composify
Turn WordPress plugin zip files into git repositories, so that composer version constraints work properly.
Stars: ✭ 36 (-60%)
Mutual labels:  wordpress, wordpress-development
Typerocket
TypeRocket is a highly integrated MVC WordPress framework with beautiful UI components for the modern developer.
Stars: ✭ 378 (+320%)
Mutual labels:  wordpress, wordpress-development
Wp Functions
A compilation of function snippets for WordPress developers who create their own themes.
Stars: ✭ 1,055 (+1072.22%)
Mutual labels:  wordpress, wordpress-development
Framework
Assely is a PHP framework which brings a little joy to the WordPress development. Develop structured, easily scalable and complex WordPress websites and web applications with true pleasure.
Stars: ✭ 53 (-41.11%)
Mutual labels:  wordpress, wordpress-development
Wp Functions List
This is a list of all WordPress functions from version 0 to version 4.8.1 along with the data of when they were first introduced and if they are deprecated or not
Stars: ✭ 88 (-2.22%)
Mutual labels:  wordpress, wordpress-development
Docker Wordpress
Wordpress Docker container using SSL Certificates with LetsEncrypt
Stars: ✭ 391 (+334.44%)
Mutual labels:  wordpress, wordpress-development
Awesome Wp Developer Tools
A collection of plugins, starter themes and tools to make WordPress development easier.
Stars: ✭ 388 (+331.11%)
Mutual labels:  wordpress, wordpress-development
Wordpress Gear
A bunch of gear for WP developers
Stars: ✭ 438 (+386.67%)
Mutual labels:  wordpress, wordpress-development
Action Scheduler
A scalable, traceable job queue for background processing large queues of tasks in WordPress. Specifically designed for distribution in WordPress plugins (and themes) - no server access required.
Stars: ✭ 386 (+328.89%)
Mutual labels:  wordpress, wordpress-development
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (-71.11%)
Mutual labels:  wordpress, wordpress-development
Wpintel
Chrome extension designed for WordPress Vulnerability Scanning and information gathering!
Stars: ✭ 70 (-22.22%)
Mutual labels:  wordpress, wordpress-development
Super Progressive Web Apps
SuperPWA helps to convert your WordPress website into Progressive Web Apps instantly. PWA (Progressive Web Apps) demo at : https://superpwa.com and Plugin :
Stars: ✭ 304 (+237.78%)
Mutual labels:  wordpress, wordpress-development
Wp Webpack Script
💥🔥📦👩‍💻 An easy to use, pre configured, hackable webpack setup & development server for WordPress themes and plugins.
Stars: ✭ 314 (+248.89%)
Mutual labels:  wordpress, wordpress-development
Meta Box
The best plugin for WordPress custom fields and custom meta boxes
Stars: ✭ 1,039 (+1054.44%)
Mutual labels:  wordpress, wordpress-development

Imposter Plugin

Packagist Packagist PHP from Packagist CircleCI license Twitter Follow @TangRufus Hire Typist Tech

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Built with ♥ by Typist Tech


Imposter Plugin 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 Sponsor via PayPal More Sponsorship Information


Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins. Imposter Plugin is a composer plugin wrapper for Imposter.

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

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

First, add Imposter configuration in your composer.json

"extra": {
    "imposter": {
        "namespace": "My\\App\\Vendor",
        "excludes": [
            "dummy/dummy-excluded"
        ]
    }
}

Then, install via composer cli

composer require typisttech/imposter-plugin

See: Imposter readme for details.


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


Usage

Sit Back and Relax

Once installed, this plugin hooks into composer install, composer update and composer dump-autoload, automatically run imposter for you. Besides, imposter plugin autoloads all modified files as classmap.

When those events triggered, this plugin:

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

Learn more on imposter's readme.

Known Issues

Help wanted. Pull requests are welcomed.

  1. Imposter run twice when composer install and composer update
  2. Traits are not transformed
  3. Virtual packages are not supported

Frequently Asked Questions

What can I find more information?

Learn more on imposter's readme for more details.

How about not hooking into composer commands?

Use imposter directly.

How to distrube impostified plugins?

  1. Switch to the lowest PHP version you support
  2. Install dependencies
    • $ composer install --no-dev --classmap-authoritative --prefer-dist
  3. Clean up the source code, e.g: remove test files
  4. Zip the source code. Tips: Use $ composer archive
  5. Send the zip to others / Commit to wp.org SVN. Tips:

How to install impostified plugins via composer?

Impostified plugins are meant to be commited to wp.org svn.

Using imposter means you forgo the ability to install the plugins with composer directly via packagist.org or VCS (even with type: wordpress-plugin in composer.json).

To composer require impostified plugins, use wpackagist.org.

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:

Do you have real life examples that use this composer plugin?

Here you go:

Add your own here

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

composer test
composer style:check

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!

  • Mozart by Coen Jacobs

    • Works with PSR0 and PSR4
    • Dependency packages store in a different directory
  • PHP Scoper

    • Prefixes all PHP namespaces in a file/directory to isolate the code bundled in PHARs

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 Plugin is a Typist Tech project and maintained by Tang Rufus, freelance developer for hire.

Full list of contributors can be found here.

License

Imposter Plugin is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].