Integrates Composer into monolithic repositories with many packages.

Overview

Composer Monorepo Plugin

Note: this project is still experimental. Please provide feedback!

This plugin adds support for Monorepos when using Composer package manager. It introduces a maintainable approach to managing dependencies for multiple packages in a single repository, without losing the benefits of having explicit dependencies for each separate package.

Repositories managed with this plugin contain two kinds of packages:

  1. Composer packages defined by a single global composer.json with all external dependencies at the root of the repository.
  2. Many monorepo packages in sub-folders of the project, each with its own monorepo.json, a simplified composer.json file.

Dependencies in monorepos can be either a third party Composer package that is listed in the composer.json or a monorepo package contained in the project.

This plugins build step generates autoloaders with vendor/autoload.php files for each package with access to the explicitly specified dependencies only.

The following steps are performed by this plugin when building the autoloads:

  1. It detects monorepo.json files in subdirectories excluding vendor/ and marks them as roots of packages.
  2. It then fetches all composer packages from the locally installed packages.
  3. Finally for each package with monorepo.json it generates a vendor/autoload.php file using all the dependencies defined in that package from either other monorepo packages or regular Composer packages.

This plugin draws inspiration from Google Blaze/Bazel and Facebook Buck implementing a single monolithic repository for whole projects/company. It's the missing piece for the monolithic repository workflow using PHP and Composer.

More details about reasoning on Gregory Szorc's blog:

Backwards Incompatible Changes in v0.12

In v0.12 we removed the fiddler script and the possibility to build a PHAR archive. This project is now a first-class composer plugin only and requires Composer v1.1+ for the composer monorepo: commands to be available.

The fiddler.json files must be renamed to monorepo.json.

Use v0.11.6 or lower if you don't want to break this in your project yet.

Installation

Add the composer monorepo plugin to your root composer.json with:

$ composer require beberlei/composer-monorepo-plugin

It will be automatically added as a Composer plugin.

Usage

Whenever Composer generates autoload files (during install, update or dump-autoload) it will find all sub-directories with monorepo.json files and generate sub-package autoloaders for them.

You can execute the autoload generation step for just the subpackages by calling:

$ composer monorepo:build

You create a composer.json file in the root of your project and use this single source of vendor libraries across all of your own packages.

This sounds counter-intuitive to the Composer approach at first, but it simplifies dependency management for a big project massively. Usually if you are using a composer.json per package, you have mass update sprees where you upate some basic library like "symfony/dependency-injection" in 10-20 packages or worse, have massively out of date packages and many different versions everywhere.

Then, each of your own package contains a monorepo.json using almost the same syntax as Composer:

{
    "deps": [
        "components/Foo",
        "vendor/symfony/symfony"
    ],
    "autoload": {
        "psr-0": {"Foo\\": "src/"}
    }
}

You can then run composer dump-autoload in the root directory next to composer.json and this plugin will detect all packages, generate a custom autoloader for each one by simulating composer dump-autoload as if a composer.json were present in the subdirectory.

This plugin will resolve all dependencies (without version constraints, because it is assumed the code is present in the correct versions in a monolithic repository).

Package names in deps are the relative directory names from the project root, not Composer package names.

You can just require "vendor/autoload.php; in every package as if you were using Composer. Only autoloads from the monorepo.json are included, which means all dependencies must be explicitly specified.

Configuration Schema monorepo.json

For each package in your monolithic repository you have to add monorepo.json that borrows from composer.json format. The following keys are usable:

  • autoload - configures the autoload settings for the current package classes and files.
  • autoload-dev - configures dev autoload requirements. Currently always evalauted.
  • deps - configures the required dependencies in an array (no key-value pairs with versions) using the relative path to the project root directory as a package name.
  • deps-dev - configures the required dev dependencies
  • replace - configures the packages's replacements.

Git Integration for Builds

In a monorepo, for every git commit range you want to know which components changed. You can test with the git-changed? command:

composer monorepo:git-changed? components/foo $TRAVIS_COMMIT_RANGE
if [ $? -eq 0 ]; then ant build fi
Comments
  • May be some improvements in documentation

    May be some improvements in documentation

    Hi @beberlei ,

    I downloaded the fiddler.phar file . And tried with what I understood.

    I created the fiddler.json like

    {
        "deps": [
            "vendor/cakephp/"
        ],
        "autoload": {
            "psr-0": {
                "Foo\\":"src/"
            }
        }
    }
    

    I have a dependency on cakephp/orm on the composer.json . Is there anything I missed for the fiddler seems not changing anything. Is that due to the bug you mentioned on the commit ?

    Or may be I am missing the whole point on the docs :-/ .

    opened by harikt 14
  • The plugin is not compatible with the last release of composer

    The plugin is not compatible with the last release of composer

    Composer 2.3.4 & PHP 8.1.4

    There are some incompatibilities with method signatures.

    Fatal error: Declaration of 
           Monorepo\Composer\EventDispatcher::dispatch($eventName, ?Composer\EventDispatcher\Event $event = null) must be compatible with 
    Composer\EventDispatcher\EventDispatcher::dispatch(?string $eventName, ?Composer\EventDispatcher\Event $event = null): int
    in vendor/beberlei/composer-monorepo-plugin/src/main/Monorepo/Composer/EventDispatcher.php on line 9
    

    Some abstract method are not implemented too:

    Composer\Repository\InstalledRepositoryInterface::getDevMode()

    opened by sukei 7
  • Adding support for binaries (address #1)

    Adding support for binaries (address #1)

    This is a hacked solution, but works :)

    Just wanted to open the PR to discuss options.

    Our use case is the following: We use phpunit as a dev-dependency and use the executable provided to run it. At first I just ran the phpunit binary that gets installed by the root composer. That didn't work, as it then loads 2 autoloaders: the one from the root and the one from the component because we tell in phpunit.dist.xml to load the bootstrap, which loads the autoloader from the component.

    Undecided

    • [x] The target dir for the binaries (probably implement bin-dir like composer has?), as it now hardcodes to <componentDir>/bin
    opened by wjzijderveld 4
  • composer monorepo:build breaks with composer version 2.2.6

    composer monorepo:build breaks with composer version 2.2.6

    I'm getting this error Fatal error: Class Monorepo\Composer\MonorepoInstalledRepository contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Composer\Repository\InstalledRepositoryInterface::getDevMode) in /var/www/html/vendor/beberlei/composer-monorepo-plugin/src/main/Monorepo/Composer/MonorepoInstalledRepository.php on line 9 when running composer monorepo:build Composer version 2.2.6 2022-02-04 17:00:38

    opened by calinblaga 3
  • Composer --classmap-authoritative

    Composer --classmap-authoritative

    Thanks for a great project.

    Allow adding the --classmap-authoritative flag. We currently only use this flag, as opposed to --optimize.

    I'm happy to accommodate any comments.

    opened by Ekman 3
  • External dependencies in fiddler.json

    External dependencies in fiddler.json

    Currently you have to list all external dependencies together in the shared composer.json, however this does not make it clear what the needs are for any individual module (subfolder), and may cause the inclusion of unnecessary dependencies when only certain modules are desired.

    Phase 1: Configuration

    • All composer-dependencies (and their versions) will continue to be listed in composer.json.
    • Each module's fiddler.json file shall support two new sections, require and require-dev. These sections contain an array of strings, where each string is the name of a composer-dependency that it relies upon.
    • Every require dependency in a fiddler.json must have a direct corresponding entry in the require section of composer.json.
    • Every require-dev dependency in a fiddler.json must have a corresponding entry in the require-dev or require sections of composer.json.
    • Every require or require-dev entry in composer.json that does not have any corresponding entry somewhere in at least one fiddler.json file should cause a warning message, since it may indicate an unnecessary or unclear dependency.

    The benefit of this feature is that it documents how/why certain dependencies are necessary, by associating them with the particular modules that use them.

    Phase 2: Affect on runtime behavior

    This second part involves more tinkering with composer-internals and may not be feasible, but I'm writing it out as a "cool to have".

    • Each module's vendor/autoload.php file shall only try to load assets that are referenced (directly or transitively) via its deps, require, or require-dev sections.
    • This behavior should extend to composer archive with issue #18 , and affect what assets are present in the vendor folder.
    opened by DHager 3
  • Implement as composer plugin?

    Implement as composer plugin?

    I know this is only used for internal proprietary stuff at the moment, but would it be theoretically-possible to implement it as a composer plugin, hooking it up to composer's update/autoload/install events?

    I'm having a similar problem at my workplace, where we have some projects that I want to keep separate from a test-suite/reuse perspective, but where people are having problems with the multi-repository approach.

    opened by DHager 3
  • How do you install it ?

    How do you install it ?

    Hello there,

    Your tool seems to be responding to my needs. But actually, there is no indications about how installing it.

    Is there an easy way to do it ? Like the same way you install composer, or event like https://github.com/mybuilder/conductor/tree/master/examples/todo ?

    opened by gelhaimer 3
  • Fix PackageInterface

    Fix PackageInterface

    Hello, @beberlei! I encountered an interface incompatibility when building on Composer 2 and PHP 7.4. I Suggest this fix (the screenshots show the output before and after the fix). To #57 issue collection

    opened by Subb98 2
  • Use the correct file package key so composer requires cache works

    Use the correct file package key so composer requires cache works

    Autoloading files is broken because composer requires the same file in the sub-package and root autoloaders. It does this because the fileIdentifier key is different due to the vendor path being included in the package name.

    This PR normalises the package name so a consistent key can be generated, and the composer cache used when autoloading files.

    Fixes https://github.com/beberlei/composer-monorepo-plugin/issues/38

    opened by andythorne 2
  • Duplicates composer behavior when conflicting binary files are found.

    Duplicates composer behavior when conflicting binary files are found.

    Currently when two dependencies of a monorepo package have a binary with the same name, the composer-monorepo-plugin will crash with:

    18:30 $ composer install --verbose
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Dependency resolution completed in 0.006 seconds
    Analyzed 449 packages to resolve dependencies
    Analyzed 1935 rules to resolve dependencies
    Nothing to install or update
    Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.
    Package herrera-io/json is abandoned, you should avoid using it. Use kherge/json instead.
    Package herrera-io/phar-update is abandoned, you should avoid using it. No replacement was suggested.
    Package kherge/version is abandoned, you should avoid using it. No replacement was suggested.
    Generating autoload files
    Generating autoload files for monorepo sub-packages with dev-dependencies.
     [Subpackage] usere/webservices/api
    
                              
      [ErrorException]        
      symlink(): File exists  
                              
    
    Exception trace:
     () at /Users/robert/fda/fda-development/FDA/vendor/beberlei/composer-monorepo-plugin/src/main/Monorepo/Build.php:100
     Composer\Util\ErrorHandler::handle() at n/a:n/a
     symlink() at /Users/robert/fda/fda-development/FDA/vendor/beberlei/composer-monorepo-plugin/src/main/Monorepo/Build.php:100
     Monorepo\Build->build() at /Users/robert/fda/fda-development/FDA/vendor/beberlei/composer-monorepo-plugin/src/main/Monorepo/Composer/Plugin.php:46
     Monorepo\Composer\Plugin->generateMonorepoAutoloads() at n/a:n/a
     call_user_func() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:171
     Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:96
     Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/src/Composer/Autoload/AutoloadGenerator.php:312
     Composer\Autoload\AutoloadGenerator->dump() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/src/Composer/Installer.php:302
     Composer\Installer->run() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/src/Composer/Command/InstallCommand.php:119
     Composer\Command\InstallCommand->execute() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/vendor/symfony/console/Command/Command.php:242
     Symfony\Component\Console\Command\Command->run() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/vendor/symfony/console/Application.php:842
     Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/vendor/symfony/console/Application.php:193
     Symfony\Component\Console\Application->doRun() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/src/Composer/Console/Application.php:251
     Composer\Console\Application->doRun() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/vendor/symfony/console/Application.php:117
     Symfony\Component\Console\Application->run() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/src/Composer/Console/Application.php:100
     Composer\Console\Application->run() at phar:///usr/local/Cellar/composer/1.6.3/libexec/composer.phar/bin/composer:58
     require() at /usr/local/Cellar/composer/1.6.3/libexec/composer.phar:24
    

    This PR duplicates the behavior that composer itself has to handle this type of conflict: To just print a warning and skip the binary file if a conflicting one already has been symlinked.

    opened by robotoer 2
  • Recognize symlinked components

    Recognize symlinked components

    I have a multi language repo which looks like this:

    - /foo
      - monorepo.json
    - /php
      - composer.json
      - lib1
        - monorepo.json 
      - app1
        - monorepo.json
      - app2
         - monorepo.json
       - symlink-foo
    

    I'm currently migrating project /foo to PHP, but it's placement in tree may not be changed, so I need to symlink it to the PHP directory. The composer-monorepo-plugin root needs to be /php.

    opened by kalkin 0
  • [Feedback] try setup multi api-platform in monorepo

    [Feedback] try setup multi api-platform in monorepo

    Hey,

    I would like to share my feedback on this promising tool to manage multiple PHP project in the same repository.

    Here is what I want to achieve

    • Setup a monorepo of multiple PHP/Symfony/API-platform projects & some shared lib or shared components (api-1, api-2, api-3, ... shared-lib)
    • Easily manage my dependencies (sync between all my projects)
    • Easily use shared components/libs into API projects

    I look at

    • This repo (older fiddler)
    • https://github.com/Symplify/MonorepoBuilder // https://gomonorepo.org/

    Walk-through my exploration with this tool

    Scaffolding

    • root (backend)
      • composer.json
      • composer.lock
      • .gitignore
      • vendor
      • api-1
      • api-2
      • shared-lib

    Migration Multiple API projects to Monorepo

    First, I had to change symfony/flex for symfony/symfony. Symfony Flex will install all recipe at the monorepo root which is really annoying.

    Create the root composer.json

    {
      "name": "plop/backend",
      "require": {
        "beberlei/composer-monorepo-plugin": "~0.13",
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "api-platform/api-pack": "^1.2",
        "auth0/jwt-auth-bundle": "^3.0",
        "doctrine/doctrine-migrations-bundle": "^2.0",
        "league/flysystem-aws-s3-v3": "^1.0",
        "oneup/flysystem-bundle": "^3.1",
        "ramsey/uuid-doctrine": "^1.5",
        "sensio/framework-extra-bundle": "^5.4",
        "sentry/sentry-symfony": "^3.1",
        "stof/doctrine-extensions-bundle": "^1.3",
        "symfony-bundles/redis-bundle": "^2.2",
        "symfony/console": "4.3.*",
        "symfony/form": "4.3.*",
        "symfony/framework-bundle": "4.3.*",
        "symfony/http-client": "4.3.*",
        "symfony/workflow": "4.3.*",
        "symfony/yaml": "4.3.*",
        "symfony/symfony": "4.3.*"
      },
      "require-dev": {
        "behat/behat": "^3.5",
        "behat/mink": "dev-master",
        "behat/mink-browserkit-driver": "dev-master",
        "behat/mink-extension": "dev-master",
        "behat/symfony2-extension": "^2.1",
        "behatch/contexts": "^3.0",
        "doctrine/doctrine-fixtures-bundle": "^3.2",
        "friendsofphp/php-cs-fixer": "^2.15",
        "hautelook/alice-bundle": "^2.5",
        "phpstan/phpstan": "^0.11.15",
        "phpstan/phpstan-symfony": "^0.11.6",
        "symfony/debug-pack": "^1.0",
        "symfony/dotenv": "^4.3"
      }
    }
    

    And configure monorepo.json into api-* folders

    {
      "deps": [
        "vendor/api-platform/api-pack",
        "vendor/auth0/jwt-auth-bundle",
        "vendor/doctrine/doctrine-migrations-bundle",
        "vendor/league/flysystem-aws-s3-v3",
        "vendor/oneup/flysystem-bundle",
        "vendor/ramsey/uuid-doctrine",
        "vendor/sensio/framework-extra-bundle",
        "vendor/sentry/sentry-symfony",
        "vendor/stof/doctrine-extensions-bundle",
        "vendor/symfony-bundles/redis-bundle",
        "vendor/symfony/console",
        "vendor/symfony/dotenv",
        "vendor/symfony/form",
        "vendor/symfony/framework-bundle",
        "vendor/symfony/http-client",
        "vendor/symfony/workflow",
        "vendor/symfony/yaml",
        "vendor/symfony/symfony"
      ],
      "deps-dev": [
        "vendor/behat/behat",
        "vendor/behat/mink",
        "vendor/behat/mink-browserkit-driver",
        "vendor/behat/mink-extension",
        "vendor/behat/symfony2-extension",
        "vendor/behatch/contexts",
        "vendor/doctrine/doctrine-fixtures-bundle",
        "vendor/friendsofphp/php-cs-fixer",
        "vendor/hautelook/alice-bundle",
        "vendor/phpstan/phpstan",
        "vendor/phpstan/phpstan-symfony",
        "vendor/symfony/debug-pack"
      ],
      "autoload": {
        "psr-4": {
          "App\\": "src/",
          "Fixtures\\": "fixtures/"
        }
      },
      "autoload-dev": {
        "psr-4": {
          "App\\Tests\\": "tests/"
        }
      }
    }
    

    Composer install :rocket:

    run composer install, it detects & generates the subpackage autoload :tada:

    Trying APIs

    • [x] Use API throught REST client

    Directly through REST client, everything seems to work :ok_hand:

    • [ ] API Docs

    image

    I can resolve asset, when I search in autoloader, there is no asset Class loaded. Even if I try to add in monorepo.json : "vendor/symfony/asset", it is not resolved. I tried to install it, reference it, ... It is required by api-platform/api-pack.

    • [ ] Running all tests (behat)

    Some tests failed. Seems there is some problem with autoload providers for faker in Fixtures, error are not clear on this.

    Add to that, I have this when I run any console command:

    PHP Warning:  Class 'Nette\DI\Config\Adapter' not found in /var/www/vendor/nette/di/src/compatibility.php on line 10
    PHP Stack trace:
    PHP   1. {main}() /var/www/vendor/behat/behat/bin/behat:0
    PHP   2. require() /var/www/vendor/behat/behat/bin/behat:15
    PHP   3. require_once() /var/www/api/vendor/autoload.php:5
    PHP   4. composerRequireOnce8cfb30f5c45c15f7ff26872515d65e35() /var/www/api/vendor/composer/autoload_real.php:56
    PHP   5. require_once() /var/www/api/vendor/composer/autoload_real.php:61
    PHP   6. class_alias() /var/www/vendor/nette/di/src/compatibility.php:10
    PHP Warning:  Class 'Nette\DI\Definitions\Statement' not found in /var/www/vendor/nette/di/src/compatibility.php on line 11
    PHP Stack trace:
    PHP   1. {main}() /var/www/vendor/behat/behat/bin/behat:0
    PHP   2. require() /var/www/vendor/behat/behat/bin/behat:15
    PHP   3. require_once() /var/www/api/vendor/autoload.php:5
    PHP   4. composerRequireOnce8cfb30f5c45c15f7ff26872515d65e35() /var/www/api/vendor/composer/autoload_real.php:56
    PHP   5. require_once() /var/www/api/vendor/composer/autoload_real.php:61
    PHP   6. class_alias() /var/www/vendor/nette/di/src/compatibility.php:11
    PHP Warning:  Class 'Nette\DI\Definitions\ServiceDefinition' not found in /var/www/vendor/nette/di/src/compatibility.php on line 12
    PHP Stack trace:
    PHP   1. {main}() /var/www/vendor/behat/behat/bin/behat:0
    PHP   2. require() /var/www/vendor/behat/behat/bin/behat:15
    PHP   3. require_once() /var/www/api/vendor/autoload.php:5
    PHP   4. composerRequireOnce8cfb30f5c45c15f7ff26872515d65e35() /var/www/api/vendor/composer/autoload_real.php:56
    PHP   5. require_once() /var/www/api/vendor/composer/autoload_real.php:61
    PHP   6. class_alias() /var/www/vendor/nette/di/src/compatibility.php:12
    
    • [ ] PHPStan, not working at all

    Same problem with Nette\DI\Config\Adapter, seems it has not been included into the autoloader.

    $ vendor/bin/phpstan analyse -c phpstan.neon src/ --level=7 --memory-limit=512M
    PHP Warning:  Class 'Nette\DI\Config\Adapter' not found in /var/www/vendor/nette/di/src/compatibility.php on line 10
    PHP Stack trace:
    PHP   1. {main}() /var/www/vendor/phpstan/phpstan/bin/phpstan:0
    PHP   2. require_once() /var/www/vendor/phpstan/phpstan/bin/phpstan:14
    PHP   3. require_once() /var/www/api/vendor/autoload.php:5
    PHP   4. composerRequireOnce8cfb30f5c45c15f7ff26872515d65e35() /var/www/api/vendor/composer/autoload_real.php:56
    PHP   5. require_once() /var/www/api/vendor/composer/autoload_real.php:61
    PHP   6. class_alias() /var/www/vendor/nette/di/src/compatibility.php:10
    PHP Warning:  Class 'Nette\DI\Definitions\Statement' not found in /var/www/vendor/nette/di/src/compatibility.php on line 11
    PHP Stack trace:
    PHP   1. {main}() /var/www/vendor/phpstan/phpstan/bin/phpstan:0
    PHP   2. require_once() /var/www/vendor/phpstan/phpstan/bin/phpstan:14
    PHP   3. require_once() /var/www/api/vendor/autoload.php:5
    PHP   4. composerRequireOnce8cfb30f5c45c15f7ff26872515d65e35() /var/www/api/vendor/composer/autoload_real.php:56
    PHP   5. require_once() /var/www/api/vendor/composer/autoload_real.php:61
    PHP   6. class_alias() /var/www/vendor/nette/di/src/compatibility.php:11
    PHP Warning:  Class 'Nette\DI\Definitions\ServiceDefinition' not found in /var/www/vendor/nette/di/src/compatibility.php on line 12
    PHP Stack trace:
    PHP   1. {main}() /var/www/vendor/phpstan/phpstan/bin/phpstan:0
    PHP   2. require_once() /var/www/vendor/phpstan/phpstan/bin/phpstan:14
    PHP   3. require_once() /var/www/api/vendor/autoload.php:5
    PHP   4. composerRequireOnce8cfb30f5c45c15f7ff26872515d65e35() /var/www/api/vendor/composer/autoload_real.php:56
    PHP   5. require_once() /var/www/api/vendor/composer/autoload_real.php:61
    PHP   6. class_alias() /var/www/vendor/nette/di/src/compatibility.php:12
    PHP Fatal error:  Cannot redeclare Zend\Diactoros\createUploadedFile() (previously declared in /var/www/vendor/zendframework/zend-diactoros/src/functions/create_uploaded_file.php:19) in /var/www/vendor/zendframework/zend-diactoros/src/functions/create_uploaded_file.php on line 39
    PHP Stack trace:
    PHP   1. {main}() /var/www/vendor/phpstan/phpstan/bin/phpstan:0
    PHP   2. {closure:/var/www/vendor/phpstan/phpstan/bin/phpstan:17-36}() /var/www/vendor/phpstan/phpstan/bin/phpstan:38
    PHP   3. require_once() /var/www/vendor/phpstan/phpstan/bin/phpstan:27
    PHP   4. ComposerAutoloaderInit43c17f21039003d818a50fbd4ff86312::getLoader() /var/www/vendor/autoload.php:7
    PHP   5. composerRequire43c17f21039003d818a50fbd4ff86312() /var/www/vendor/composer/autoload_real.php:56
    

    Going further

    I think this composer plugin works pretty well but I am stuck with weird cases I need to resolved.

    Add to that, I build Docker image to ship my API, is there a command to hard copy dependencies of a specific project into it's vendor folder such as composer monorepo:package-vendor (to avoid copy all root vendor folder into Docker image).

    Let me know if you want another insight!

    If you have any tips to fix some issues thanks in advance!

    opened by Nightbr 2
  • Add support for package type

    Add support for package type

    This plugin currently does not support specifying a package type:

    {
        "type": "composer-installer"
    }
    

    @beberlei would you consider accepting a PR that add supports for such feature?

    opened by marcospassos 1
  • Add support for package binaries

    Add support for package binaries

    This plugin currently does not support specifying binaries:

    {
        "bin": ["bin/my-script", "bin/my-other-script"]
    }
    

    @beberlei would you consider accepting a PR that add supports for such feature?

    opened by marcospassos 1
  • Relative symlinks

    Relative symlinks

    When building vendor/bin in a sub repo use relative symlinks

    I also updated the code to always use the full path when creating/deleting files, its dangerous otherwise

    opened by jeichorn 0
Releases(v0.17.5)
Owner
Benjamin Eberlei
Founder of @tideways, PHP performance monitoring, profiling and exception tracking software. @doctrine core member and occasional @php contributor
Benjamin Eberlei
Curated list that contain code, snippets or examples without libraries or external packages for developers.

Awesome WordPress Developer Tips Curated list that contain very awesome and ready code, snippets or examples without libraries or external packages ma

Daniele Scasciafratte 110 Nov 13, 2022
Wordpress integrated with Laravel via Composer. Together, but independents.

Wordpress integrated with Laravel via Composer. Atention! The branch master is no longer manteined. Now I'm working on branch light. Not booting Larav

Bruno Barros 20 Nov 29, 2022
A simple scaffold used for what's needed to spin up a Composer-based WordPress plugin.

A simple scaffold used for what's needed to spin up a Composer-based WordPress plugin.

Tom McFarlin 29 Dec 29, 2022
Automattic 10.7k Jan 2, 2023
Integrating Laravel into WordPress

WordPress Laravel Bootstrap A WordPress plugin helps you use functions, methods, libraries of Laravel in any WordPress projects Requiments Laravel >=

Duc Le 54 Feb 15, 2022
A tool box of integrations for Cardano & WordPress all packaged into a neat plugin.

CardanoPress A tool box of integrations for Cardano & WordPress all packaged into a neat plugin. This plugin allows you to integrate various Cardano b

Peter Bui 38 Oct 4, 2022
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.

composer-custom-directory-installer A composer plugin, to install differenty types of composer packages in custom directories outside the default comp

Mina Nabil Sami 136 Dec 30, 2022
This plugin allows you to create many-to-many relationships between pages in Kirby and synchronizes them on both sides.

Kirby 3 Many To Many Field This plugin allows you to create many-to-many relationships between pages in Kirby.

Jonas Holfeld 41 Nov 19, 2022
This is a lightweight package that allows you assign roles and permissions to any Laravel model, or on a pivot table (many to many relationship).

Simple Laravel roles and permissions Introduction This package allows you to assign roles and permissions to any laravel model, or on a pivot table (m

null 52 Nov 10, 2022
Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Imposter Plugin Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins. Built with ♥ by Typ

Typist Tech 127 Dec 17, 2022
Composer Repository Manager for selling Magento 2 extension and offering composer installation for ordered packages.

Magento 2 Composer Repository Credits We got inspired by https://github.com/Genmato. Composer Repository for Magento 2 This extension works as a Magen

EAdesign 18 Dec 16, 2021
Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Imposter Plugin Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins. Built with ♥ by Typ

Typist Tech 127 Dec 17, 2022
Prevents development packages from being added into require and getting into production environment.

production-dependencies-guard Prevents development packages from being added into require and getting into production environment. In practical field

Vladimir Reznichenko 88 Oct 21, 2022
BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.

BraincraftedBootstrapBundle BraincraftedBootstrapBundle helps you integrate Bootstrap in your Symfony2 project. BootstrapBundle also supports the offi

Braincrafted 403 Aug 13, 2022
This Magento 2 extension integrates EasyTranslate into Magento 2.

EasyTranslate Magento 2 Connector This Magento 2 extension integrates EasyTranslate into Magento 2. Mind that you need to have an account with EasyTra

Easytranslate ApS 0 Oct 7, 2022
The MX_PhinxMigrations module integrates Phinx database migrations into Magento 2

MX Phinx Migrations About The MX_PhinxMigrations module integrates Phinx database migrations into Magento 2 as a replacement for the built-in setup:up

Inviqa 34 Jul 30, 2021
PHPAuth is a secure PHP Authentication class that easily integrates into any site.

PHPAuth is under going a complete rewrite to bring the code up to date, the project has been on hold for way to long time now and I decided to work on it again making sure EVERYONE can use it and not just advanced programmers.

PHPAuth 855 Jan 3, 2023
This plugin integrates cache functionality into Guzzle Bundle, a bundle for building RESTful web service clients.

Guzzle Bundle Cache Plugin This plugin integrates cache functionality into Guzzle Bundle, a bundle for building RESTful web service clients. Requireme

Vlad Gregurco 11 Sep 17, 2022
Integrates libphonenumber into your Symfony application

PhoneNumberBundle This bundle is a fork of misd-service-development/phone-number-bundle. As this project doesn't look maintained anymore, we decided t

Olivier Dolbeau 161 Dec 23, 2022
This plugin integrates OAuth2 functionality into Guzzle Bundle

Guzzle Bundle OAuth2 Plugin This plugin integrates OAuth2 functionality into Guzzle Bundle, a bundle for building RESTful web service clients. Prerequ

Vlad Gregurco 12 Oct 30, 2022