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

Overview

Imposter

Packagist Version Packagist Downloads PHP from Packagist CircleCI Codecov License Twitter Follow @TangRufus Hire Typist Tech

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


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/.

composer require typisttech/imposter

Config

In your composer.json:

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

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:



use TypistTech\Imposter\ImposterFactory;

$imposter = ImposterFactory::forProject('/path/to/project/root');
$imposter->run();

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:



namespace Dummy\File;

use AnotherDummy\{
    SubAnotherDummy, SubOtherDummy
};
use Composer;
use Composer\Plugin\PluginInterface;
use Dummy\SubOtherDummy;
use OtherDummy\SubOtherDummy;
use RuntimeException;
use \UnexpectedValueException;
use function OtherVendor\myFunc;
use const OtherVendor\MY_MAGIC_NUMBER;

$closure = function () use ($aaa) {
    // Just testing.
};

class DummyClass
{
    public function useClosure()
    {
        array_map(function () use ($xxx) {
            // Just testing.
        }, []);
    }
}

function dummyFunction(string $namespace = null, string $use = null): array
{
    if (! is_null($namespace) && $namespace === 'dummy string' && $use === 'dummy string') {
        // Just testing.
    }

    return [];
}

foreach ([] as $namespace => $prefix) {
    $aaaa = '{' . $namespace . '}' . $prefix;
}

/** Just a comment for testing $namespace transformation */

After:



namespace MyPlugin\Vendor\Dummy\File;

use MyPlugin\Vendor\AnotherDummy\{
    SubAnotherDummy, SubOtherDummy
};
use Composer;
use Composer\Plugin\PluginInterface;
use MyPlugin\Vendor\Dummy\SubOtherDummy;
use MyPlugin\Vendor\OtherDummy\SubOtherDummy;
use RuntimeException;
use \UnexpectedValueException;
use function MyPlugin\Vendor\OtherVendor\myFunc;
use const MyPlugin\Vendor\OtherVendor\MY_MAGIC_NUMBER;

$closure = function () use ($aaa) {
    // Just testing.
};

class DummyClass
{
    public function useClosure()
    {
        array_map(function () use ($xxx) {
            // Just testing.
        }, []);
    }
}

function dummyFunction(string $namespace = null, string $use = null): array
{
    if (! is_null($namespace) && $namespace === 'dummy string' && $use === 'dummy string') {
        // Just testing.
    }

    return [];
}

foreach ([] as $namespace => $prefix) {
    $aaaa = '{' . $namespace . '}' . $prefix;
}

/** Just a comment for testing $namespace transformation */

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

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 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.

Comments
  • Bug: Imposter transforms variables with `namespace` keyword

    Bug: Imposter transforms variables with `namespace` keyword

    Hi,

    While working with sabre/xml package I found that Imposter transforms variables with namespace keyword, used as a function argument or just in code.

    For example,

    function dummyFunction(string $namespace = null) : array {
      // code
    }
    

    becomes:

    function dummyFunction(string $namespace MyPlugin\Vendor\= null) : array {
      // code
    }
    

    which caused PHP Fatal error (syntax error).

    screenshot

    bug 
    opened by dmytro-kovalov 5
  • Namespace change not applied to functions

    Namespace change not applied to functions

    What would need to be done to address this? THX

    Example: https://drone.owncloud.com/owncloud/files_primary_s3/589/42

    Error: Call to undefined function Aws\manifest() in /drone/server/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/Api/ApiProvider.php:97
    Stack trace:
    #0 /drone/server/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/ClientResolver.php(260): OCA\Files_Primary_S3\Vendor\Aws\Api\ApiProvider::defaultProvider(Array)
    #1 /drone/server/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/AwsClient.php(161): OCA\Files_Primary_S3\Vendor\Aws\ClientResolver->resolve(Array, Object(OCA\Files_Primary_S3\Vendor\Aws\HandlerList))
    #2 /drone/server/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/S3/S3Client.php(263): OCA\Files_Primary_S3\Vendor\Aws\AwsClient->__construct(Array)
    #3 /drone/server/apps/files_primary_s3/lib/command/createbucket.php(109): OCA\Files_Primary_S3\Vendor\Aws\S3\S3Client->__construct(Array)
    #4 /drone/server/apps/files_primary_s3/lib/command/createbucket.php(72): OCA\Files_Primary_S3\Command\createBucket->getClient()
    #5 /drone/server/lib/composer/symfony/console/Command/Command.php(255): OCA\Files_Primary_S3\Command\createBucket->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #6 /drone/server/lib/composer/symfony/console/Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #7 /drone/server/lib/composer/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files_Primary_S3\Command\createBucket), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #8 /drone/server/lib/composer/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #9 /drone/server/lib/private/Console/Application.php(161): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #10 /drone/server/console.php(106): OC\Console\Application->run()
    #11 /drone/server/occ(11): require_once('/drone/server/c...')
    #12 {main}
    opened by DeepDiver1975 5
  • Namespace not added to non-aliased namespaces

    Namespace not added to non-aliased namespaces

    Hello. I have found error with prefixing non-aliased namespaces. Let's take GuzzleHttp/Client as an example:

    obraz

    And this is how this class looks after running Imposter:

    obraz

    As you can see, \Psr\Http\Client\ClientInterface is not prefixed with given namespace, so it throws fatal error about missing class.

    opened by Dartui 4
  • Ignore

    Ignore "exclude-from-classmap" entries

    "exclude-from-classmap" autoload key is used to exclude dev classes that live in a namespace contained in one the prod namespaces.

    Considering that dev stuff of required packages is not useful or available to the root package, I think that we can safely ignore the "exclude-from-classmap" entries, neatly solving the problem with Symfony packages that do not contain the "Tests" directory.

    opened by alessandromorelli 4
  • Skip non-existing paths when enumerating

    Skip non-existing paths when enumerating

    Non existing paths should be skipped, to avoid failures when the one of the autoload paths is generated late.

    This patch provides the machinery required to display a warning when imposter is run from imposter-plugin.

    opened by alessandromorelli 3
  • Bump sebastian/comparator from 3.0.2 to 3.0.3

    Bump sebastian/comparator from 3.0.2 to 3.0.3

    Bumps sebastian/comparator from 3.0.2 to 3.0.3.

    Changelog

    Sourced from sebastian/comparator's changelog.

    [3.0.3] - 2020-11-30

    Changed

    • Changed PHP version constraint in composer.json from ^7.1 to >=7.1
    Commits
    • 1071dfc Use >= operator instead of ^ operator for PHP version constraint
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump sebastian/exporter from 3.1.2 to 3.1.3

    Bump sebastian/exporter from 3.1.2 to 3.1.3

    Bumps sebastian/exporter from 3.1.2 to 3.1.3.

    Changelog

    Sourced from sebastian/exporter's changelog.

    [3.1.3] - 2020-11-30

    Changed

    • Changed PHP version constraint in composer.json from ^7.0 to >=7.0
    Commits
    • 6b85314 Use >= operator instead of ^ operator for PHP version constraint
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump sebastian/type from 1.1.3 to 1.1.4

    Bump sebastian/type from 1.1.3 to 1.1.4

    Bumps sebastian/type from 1.1.3 to 1.1.4.

    Changelog

    Sourced from sebastian/type's changelog.

    [1.1.4] - 2020-11-30

    Changed

    • Changed PHP version constraint in composer.json from ^7.2 to >=7.2
    Commits
    • 0150cfb Use >= operator instead of ^ operator for PHP version constraint
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump sebastian/global-state from 3.0.0 to 3.0.1

    Bump sebastian/global-state from 3.0.0 to 3.0.1

    Bumps sebastian/global-state from 3.0.0 to 3.0.1.

    Changelog

    Sourced from sebastian/global-state's changelog.

    [3.0.1] - 2020-11-30

    Changed

    • Changed PHP version constraint in composer.json from ^7.2 to >=7.2
    Commits
    • 474fb9e Use >= operator instead of ^ operator for PHP version constraint
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump sebastian/resource-operations from 2.0.1 to 2.0.2

    Bump sebastian/resource-operations from 2.0.1 to 2.0.2

    Bumps sebastian/resource-operations from 2.0.1 to 2.0.2.

    Changelog

    Sourced from sebastian/resource-operations's changelog.

    [2.0.2] - 2020-11-30

    Changed

    • Changed PHP version constraint in composer.json from ^7.1 to >=7.1
    Commits
    • 31d35ca Use >= operator instead of ^ operator for PHP version constraint
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump sebastian/object-enumerator from 3.0.3 to 3.0.4

    Bump sebastian/object-enumerator from 3.0.3 to 3.0.4

    Bumps sebastian/object-enumerator from 3.0.3 to 3.0.4.

    Changelog

    Sourced from sebastian/object-enumerator's changelog.

    [3.0.4] - 2020-11-30

    Changed

    • Changed PHP version constraint in composer.json from ^7.0 to >=7.0
    Commits
    • e67f6d3 Use >= operator instead of ^ operator for PHP version constraint
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Random permission errors on some Composer installs

    Random permission errors on some Composer installs

    I seem to get almost random permission errors about Imposter trying to write to files within the .git directory on dependencies,

    For example:

      file_put_contents(/builds/invisibledragon/bookings/id-bookings/vendor/symfony/polyfill-php81/.git/objects/pack/pack-021b938e07a189845db79ec8f6de13e2d4a8b3f6.pack): failed to open stream: Permission denied 
    

    Would it be wise to ignore the .git folders when finding files to replace?

    opened by kennydude 1
  • Bump codeception/codeception from 4.1.20 to 4.2.2

    Bump codeception/codeception from 4.1.20 to 4.2.2

    Bumps codeception/codeception from 4.1.20 to 4.2.2.

    Release notes

    Sourced from codeception/codeception's releases.

    4.2.2

    • Propagate --ext and --override parameters to included test suites (#6536)
    • Fixed false negative message about stecman/symfony-console-completion package (#6541)

    4.2.1

    • Execute setupBeforeClass/tearDownAfterClass only once (#6481)
    • Handle action with intersection return type correctly in dry-run command

    4.2.0

    • Improved multi-application experience, allow filtering suites by name (#6435) by @​calvinalkan
    • Configuration override is passed to included suites (#5978) by @​calvinalkan
    • Made dry-run command work with module methods having return types (#6470)
    • Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+)
    • Implemented new setting convert_deprecations_to_exceptions (#6469)
    • Action file generator: Do not return when return type is never (#6462)
    • Backported test.useless event from Codeception 5.0 (#6459)

    4.1.31

    • RunBefore extension prints error output and stops execution if command failed
    • Action file generator: Fixed handling of intersection types
    • Action file generator: Fixed handling of self and parent types

    4.1.30

    • Fix handling of previous exception in ExtensionException
    • Improved parser fix for PHP keywords as named parameters
    • Add link to https://helpukrainewin.org

    4.1.29

    • Fixed duplicate test runs when codeception.yml and codeception.dist.yml are present in multi-app setup by @​calvinalkan
    • Action generator handles mixed type correctly
    • Parser fix to allow named parameters named class and namespace

    4.1.28

    4.1.27

    • Renamed editorUrl setting to editor_url for consistency
    • Fixed wildcard matching of group files (#6302) by @​DavertMik

    4.1.26

    • Added editorUrl setting to codeception.yml (#6261) by @​ThomasLandauer
    • Reverted optional value to fail-fast option because it was breaking change (#6290)
    • Fixed E_DEPRECATED warnings in Example class on PHP 8.1 (#6298) by @​fabacino

    4.1.25

    4.1.24

    ... (truncated)

    Changelog

    Sourced from codeception/codeception's changelog.

    4.2.2

    • Propagate --ext and --override parameters to included test suites (#6536)
    • Fixed false negative message about stecman/symfony-console-completion package (#6541)

    4.2.1

    • Execute setupBeforeClass/tearDownAfterClass only once (#6481)
    • Handle action with intersection return type correctly in dry-run command

    4.2.0

    • Improved multi-application experience, allow filtering suites by name (#6435) by @​calvinalkan
    • Configuration override is passed to included suites (#5978) by @​calvinalkan
    • Made dry-run command work with module methods having return types (#6470)
    • Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+)
    • Implemented new setting convert_deprecations_to_exceptions (#6469)
    • Action file generator: Do not return when return type is never (#6462)
    • Backported test.useless event from Codeception 5.0 (#6459)

    4.1.31

    • RunBefore extension prints error output and stops execution if command failed
    • Action file generator: Fixed handling of intersection types
    • Action file generator: Fixed handling of self and parent types

    4.1.30

    • Fix handling of previous exception in ExtensionException
    • Improved parser fix for PHP keywords as named parameters
    • Add link to https://helpukrainewin.org

    4.1.29

    • Fixed duplicate test runs when codeception.yml and codeception.dist.yml are present in multi-app setup by @​calvinalkan
    • Action generator handles mixed type correctly
    • Parser fix to allow named parameters named class and namespace

    4.1.28

    4.1.27

    • Renamed editorUrl setting to editor_url for consistency
    • Fixed wildcard matching of group files (#6302) by @​DavertMik

    4.1.26

    ... (truncated)

    Commits
    • b88014f 4.2.2
    • c53401d Propagate --ext and --override parameters to included test suites (#6536)
    • 83f6f7b Fixed false negative message about stecman/symfony-console-completion packege
    • 0ce6194 update links (#6544)
    • 30c5ed8 CI: Bump COMPOSER_ROOT_VERSION in 4.2 branch
    • 77b3e20 4.2.1
    • 2bc7b3d Merge pull request #6481 from Codeception/4.2-execute-before-after-class-hook...
    • a9a4c27 Execute before/after class hooks only once
    • 0f93270 RunCest: Improve data provider output of html report tests
    • 71ab0a1 Handle intersection return type correctly in dry-run
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump squizlabs/php_codesniffer from 3.6.0 to 3.7.1

    Bump squizlabs/php_codesniffer from 3.6.0 to 3.7.1

    Bumps squizlabs/php_codesniffer from 3.6.0 to 3.7.1.

    Release notes

    Sourced from squizlabs/php_codesniffer's releases.

    3.7.1

    • Fixed bug #3609: Methods/constants with name empty/isset/unset are always reported as error
      • Thanks to Juliette Reinders Folmer (@​jrfnl) for the patch

    3.7.0

    PHP 8.1 Language Feature Support

    PHP_CodeSniffer has run correctly under PHP 8.1 since PHP 8 support was added, but it has not supported new 8.1 language features until this release. Version 3.7.0 adds support for the following PHP 8.1 language features:

    • Enums
    • Explicit octal notation
    • Readonly properties
    • Intersection types
    • The never type

    Note: Standards and sniffs included with PHP_CodeSniffer have been updated to support these language features, but external standards and sniffs may need updating before they are able to detect them correctly.

    Changelog

    • Added support for PHP 8.1 explicit octal notation
      • This new syntax has been backfilled for PHP versions less than 8.1
      • Thanks to Mark Baker (@​MarkBaker) for the patch
      • Thanks to Juliette Reinders Folmer (@​jrfnl) for additional fixes
    • Added support for PHP 8.1 enums
      • This new syntax has been backfilled for PHP versions less than 8.1
      • Includes a new T_ENUM_CASE token to represent the case statements inside an enum
      • Thanks to Jaroslav Hanslík (@​kukulich) for the patch
      • Thanks to Juliette Reinders Folmer (@​jrfnl) for additional core and sniff support
    • Added support for the PHP 8.1 readonly token
      • Tokenzing of the readonly keyword has been backfilled for PHP versions less than 8.1
      • Thanks to Jaroslav Hanslík (@​kukulich) for the patch
    • Added support for PHP 8.1 intersection types
      • Includes a new T_TYPE_INTERSECTION token to represent the ampersand character inside intersection types
      • Thanks to Jaroslav Hanslík (@​kukulich) for the patch
    • File::getMethodParameters now supports the new PHP 8.1 readonly token
      • When constructor property promotion is used, a new property_readonly array index is included in the return value
        • This is a boolean value indicating if the property is readonly
      • If the readonly token is detected, a new readonly_token array index is included in the return value
        • This contains the token index of the readonly keyword
      • Thanks to Juliette Reinders Folmer (@​jrfnl) for the patch
    • Support for new PHP 8.1 readonly keyword has been added to the following sniffs:
      • Generic.PHP.LowerCaseKeyword
      • PSR2.Classes.PropertyDeclaration
      • Squiz.Commenting.BlockComment
      • Squiz.Commenting.DocCommentAlignment
      • Squiz.Commenting.VariableComment
      • Squiz.WhiteSpace.ScopeKeywordSpacing
      • Thanks to Juliette Reinders Folmer (@​jrfnl) for the patches
    • The parallel feature is now more efficient and runs faster in some situations due to improved process management
    • The list of installed coding standards now has consistent ordering across all platforms

    ... (truncated)

    Commits
    • 1359e17 Prepare for 3.7.1 release
    • 0f02e3e Updated changelog message for #3609
    • f035ed3 Changelog for #3609 (ref #3610)
    • 3726154 Merge branch 'feature/3609-bugfix-context-sensitive-keyword-empty' of https:/...
    • 5f78900 Tokenizer/PHP: bug fix in improved context sensitive keyword support
    • a2cd51b Prepare for 3.7.0 release
    • d8313c6 Changelog for #3604
    • fe4dde5 Merge branch 'feature/tokenizer-php-bugfix-double-quoted-strings' of https://...
    • 7f5c55d Merge branch 'php-8.1/tokenizer-php-bugfix-octal-explicit-notation' of https:...
    • e9f6c43 Changelog for #3575
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump guzzlehttp/psr7 from 1.8.2 to 1.8.5

    Bump guzzlehttp/psr7 from 1.8.2 to 1.8.5

    Bumps guzzlehttp/psr7 from 1.8.2 to 1.8.5.

    Release notes

    Sourced from guzzlehttp/psr7's releases.

    1.8.5

    See change log for changes.

    1.8.4

    See change log for changes.

    1.8.3

    See change log for changes.

    Changelog

    Sourced from guzzlehttp/psr7's changelog.

    1.8.5 - 2022-03-20

    Fixed

    • Correct header value validation

    1.8.4 - 2022-03-20

    Fixed

    • Validate header values properly

    1.8.3 - 2021-10-05

    Fixed

    • Return null in caching stream size if remote size is null
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Feature Request: support class_alias

    Feature Request: support class_alias

    Currently class_alias is not supported.

    I need this because I would like to use imposter for Twig, but they make use of class_alias, for example here: https://github.com/twigphp/Twig/blob/2.x/src/Environment.php#L995

    I think the prefix should be applied to both the alias $origin and $alias.

    # from the PHP docs:
    class_alias ( string $original , string $alias [, bool $autoload = TRUE ] ) : bool
    
    opened by eteubert 1
  • Class not found

    Class not found

    PHP Fatal error: Uncaught Error: Class 'AZGFDRIVE\Vendor\Monolog\Logger' not found

    All seemed to go well. My prefix was added everywhere in vendor directory as expected. But when Logger is called, the class is not found. What step(s) am I missing to get the Monolog files included? There are no other errors. Composer autoload files look suspect as they do not contain the prefix where I would expect it. I tried composer dump-autoload but that doesn't do anything. Thanks!

    opened by anvilzephyr 1
Manage your photos with Piwigo, a full featured open source photo gallery application for the web. Star us on Github! More than 200 plugins and themes available. Join us and contribute!

Manage your photo library. Piwigo is open source photo gallery software for the web. Designed for organisations, teams and individuals. The piwigo.org

Piwigo 2.3k Jan 1, 2023
Plugin Vite is the conduit between Craft CMS plugins and Vite, with manifest.json & HMR support

Plugin Vite Related Articles: Vite.js Next Generation Frontend Tooling + Craft CMS A Vite Buildchain for Craft CMS Plugins Requirements Craft CMS 3.0.

nystudio107 8 Dec 30, 2022
Provides autocompletion for Craft CMS and plugins in Twig templates.

Autocomplete for Craft CMS Provides autocompletion for Craft CMS and plugins in Twig templates. Currently works with PhpStorm only, as VSCode does not

PutYourLightsOn 12 Nov 23, 2021
(Hard) Fork of WordPress Plugin Boilerplate, actively taking PRs and actively maintained. Following WordPress Coding Standards. With more features than the original.

Better WordPress Plugin Boilerplate This is a Hard Fork of the original WordPress Plugin Boilerplate. The Better WordPress Plugin Boilerplate actively

Beda Schmid 46 Dec 7, 2022
A PHP 5.3 CMS built on top of Laravel 4 and other composer components.

Anvil Forge your website! A PHP 5.3 CMS built on top of Laravel 4 and other composer components. Installation Installing Anvil is easy. Run the follow

Loïc Sharma 17 May 3, 2022
Zero-Config plugin to disable FLoC in your WordPress Website.

Disable FLoC by WP Munich A simple zero-config plugin to opt-out of Google FLoC. This plugin is made with love and brought to you by the folks of WP M

Luehrsen // Heinrich 9 Jun 1, 2022
Divide / Split your WordPress Blog visitors into 4 links by using Re-skinning URL splitter

Re-skinning URL splitter Tool Divide / Split your Wordpress Blog visitors into 4 links by using Re-skinning URL splitter Re-skinning URL Splitter Feat

Mohammed cha 72 Nov 30, 2022
Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.

Jetpack Monorepo This is the Jetpack Monorepo. It contains source code for the Jetpack plugin, the Jetpack composer packages, and other things. How to

Automattic 1.4k Jan 7, 2023
Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required.

Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required. Simply activate Subtitles and you're ready to go.

We Cobble 117 Dec 31, 2022
Wordpress plugin to allow websites to sell and distribute NFTs through the Enjin platform

MyMeta Basket is the world's first plug-and-play Wordpress/Enjin/Ethereum integration that allows you to start selling blockchain assets through your website within minutes. All you need is Wordpress, MyMeta Basket, and an Enjin subscription.

MyMetaverse 6 Oct 3, 2022
b5st – A Bootstrap 5 Starter Theme, for WordPress

b5st – A Bootstrap 5 Starter Theme, for WordPress Version 1.1 https://github.com/SimonPadbury/b5st b5st is a simple, Gutenberg-compatible WordPress st

Simon Padbury 29 Dec 20, 2022
酱茄企业官网小程序,酱茄专为中小企业开发的轻量级企业建站小程序(基于uni-app+wordpress),后台操作简单,维护方便,无需过多配置就能搭建一个企业小程序。

一、小程序介绍 酱茄企业官网小程序,酱茄专为中小企业开发的轻量级企业建站小程序(基于uni-app + wordpress),后台操作简单,维护方便,无需过多配置就能搭建一个企业小程序。

杨江河 34 Dec 27, 2022
Create WordPress themes with beautiful OOP code and the Twig Template Engine

Timber helps you create fully-customized WordPress themes faster with more sustainable code. With Timber, you write your HTML using the Twig Template Engine separate from your PHP files.

Timber 5.2k Dec 31, 2022
Sage is a productivity-driven WordPress starter theme with a modern development workflow.

WordPress starter theme with a modern development workflow

Roots 12k Jan 5, 2023
Bedrock is a modern WordPress stack that helps you get started with the best development tools and project structure.

WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure

Roots 5.7k Jan 9, 2023
A minimal boilerplate theme for WordPress using TailwindCSS, with PostCSS and Laravel Mix.

A minimal boilerplate theme for WordPress using TailwindCSS, with PostCSS and Laravel Mix.

Pixel Devs 74 Nov 25, 2022
Sensei LMS WordPress Plugin

Sensei LMS A learning management plugin for WordPress, which provides the smoothest platform for helping you teach anything. Sensei LMS is a commercia

Automattic 449 Jan 4, 2023
Intuitive Website Styling integrated into WordPress' Customizer

Customify - Intuitive Website Styling for WordPress With Customify, developers can easily create advanced theme-specific options inside the WordPress

Pixelgrade 28 Oct 6, 2022
This is a white minimal wordpress theme

_s Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turnin

Mahmud Hasan Imran 3 Oct 7, 2021