by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ben Johnson
    @cbj4074
    @JonasWijne I think you'd need to use an inline version alias, e.g., as described in https://stackoverflow.com/questions/21052831/how-to-solve-two-packages-requirements-conflicts-when-running-composer-install
    JonasWijne
    @JonasWijne
    @cbj4074 thanks for your advice
    Ben Johnson
    @cbj4074
    @JonasWijne You're welcome, hopefully you can solve the conflict. Let us know if you do!
    sdxv
    @sdxv
    Hello,
    I have two projects. I would like to utilize the functionality of one of them (imgsvc) in the other (cartwheel), so I have set up my composer.json files with a path repository like so: https://hastebin.com/raw/ulokohedum
    This works well, except I now have two definitions of any dependencies that both projects (the slim framework for example) require https://i.imgur.com/WoU8RtK.png
    Is there a way to tell composer to not look at transitive dependencies?
    Doqnach
    @Doqnach
    anyone any idea why composer require psr/log-implementation is not working?
    composer/composer#7603
    bash-5.0# composer require psr/log-implementation
    
      [InvalidArgumentException]                      
      Could not find package psr/log-implementation.  
    
      Did you mean one of these?                      
          psr/log-implementation                      
          xxnoobmanxx/psrlogger
    sdxv
    @sdxv
    Hi again. I am still hoping to find a solution to my issue mentioned just above (on Nov 24th) If anyone is able to take a look it would be greatly appreciated. Thanks.
    FlexICE
    @fl3xice
    guys do you know what that is https://packagist.com/ ?
    FlexICE
    @fl3xice
    for what ?
    Ben Johnson
    @cbj4074
    @fl3xice It's just what it sounds like: Packagist but for private (as opposed to public) access.
    FlexICE
    @fl3xice
    @cbj4074 thanks
    Ben Johnson
    @cbj4074

    @fl3xice :thumbsup:

    I think the goal is to provide for businesses and organizations whose source code cannot be made public for whatever reason the same powerful features that packagist.org offers for public, FOSS repositories.

    FlexICE
    @fl3xice
    I thought about it at first
    but then for some reason he said to himself no
    Ben Johnson
    @cbj4074
    Hehe. To be clear, it is operated by the same author(s) as https://packagist.org , it's simply a "commercial" offering, if that makes sense.
    FlexICE
    @fl3xice
    there is a trial subscription
    @cbj4074 you do not know how to use php-ai / php-ml
    Ben Johnson
    @cbj4074
    @fl3xice No, I have not looked at them yet
    Michael Weichert
    @mweichert

    Hey all. I keep getting "class not found" errors when trying to autoload my classes. In my composer.json file I have:

    "autoload": {
            "psr-4": {
                "Foo\\Bar\\" : "src/"
            }
        }

    And other than composer.json, I have src/Foobar.php which contains:

    <?php
    namespace Foo\Bar;
    class Foobar {}
    In the program that uses my dependency, I have:
    require_once('vendor/autoload.php');
    new \Foo\Bar\Foobar;
    But I always get "Class \Foo\Bar\Foobar not found"
    Ben Johnson
    @cbj4074
    @mweichert Sorry, I was wrong; taking a closer look :D
    Did you composer dump autoload after modifying the composer.json to include that psr-4 definition?
    Rob
    @alcohol
    @Doqnach because that is not a package, it is a requirement only. other packages can provide an implementation for it, but you cannot install it in itself. see https://packagist.org/providers/psr/log-implementation for a list of all packages that "provide" said requirement
    @mweichert it would help if you had a public repository which showcases your issue so we can easily reproduce it. but most likely it is a pebkac error and you misconfigured something :p
    Shubham Mehrotra
    @shubhwebkul

    Hello team,
    how could I make my requirements resolvable while my one dependency wants a package for the specific version (3.1.18) but I've already installed that package with different version (3.1.11).

    Any help would be very appreciable.
    Thanks!

    Ben Johnson
    @cbj4074
    I had to look-up "pebkac" :D
    Badr-essa
    @Badr-essa
    laraprblm.png

    #123

    hello guys .I want to install laravel but there is some problem in packagist

    Ben Johnson
    @cbj4074
    @Badr-essa Hmm, is that still happening?
    aayush300
    @aayush300
    can anyone resolve this issue------------------------------>

    /home/eagle/.nvm/versions/node/v8.9.4/lib/node_modules/composer-rest-server/node_modules/formdata-node/lib/FormData.js:239
    async *__getField() {
    ^

    SyntaxError: Unexpected token *
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/eagle/.nvm/versions/node/v8.9.4/lib/node_modules/composer-rest-server/node_modules/@tim-lai/isomorphic-form-data/lib/index.js:2:18)

    Badr-essa
    @Badr-essa
    @cbj4074 no problem is resolved for me .
    Adrian
    @adrian-enspired

    i have an application with an "api" module. i want to separate the api out into its own repo.

    however, I have a problem with the relationship with the app package:

    • in terms of installation, the app is the parent package, and the api provides an api implementation.
    • in terms of logical dependency, the api uses all of the business logic from the app - the api is the parent package, and the app is a dependency.

    how can composer organize/express this?

    Ben Johnson
    @cbj4074

    @adrian-enspired I'm not sure what you mean, exactly, by "how can composer organize/express this?"

    If I understand the essence of your question, though, you're asking how to define the relationship between the packages.

    On its face, it seems as simple as making the app package a dependency of the api package.

    In the api package's composer.json:

    "require": {
        "app": "dev-master",
    }
    Adrian
    @adrian-enspired
    yes; this would be the correct relationship code-wise. the issue is that "api" is not the package that is installed - "app" is. that is, it's composer install app, not composer install api. api cannot be the parent/installable package, as "app" must exist on its own. there are other frontends that use it.
    the other frontends would have this same issue, save for the fact they're not written in php (and so don't use composer)
    the only composer solution i can imagine is a dummy package of some sort, which would be extremely difficult (and likely unreliable) to produce/maintain
    re: "installed app": i can't simply make "app" a dependency of "api" and then install "api" instead. it makes no sense perform app updates as a side-effect of updating the api.
    Adrian
    @adrian-enspired
    trying to explain things more clearly - logically, they should be separate installs. but doing so would leave api's dependency on app unclear/unexpressed.
    Tim Nolte
    @timnolte
    @adrian-enspired to me it sounds like you haven't really separated out the code well enough to make clear package dependencies. Does your app use the API or serve the API? If your app uses the API then the business logic should be in the API and the API should be a standalone service. If the app doesn't use the API then I would say your business logic should be it's own package as a dependency library. The API should still be a service and then can also have the business logic as a dependency.
    Adrian
    @adrian-enspired

    the app is the business logic. the api serves it (but is not the only code that does so - e.g., we have a cli frontend, legacy web controllers, and so forth). so in dependency terms, the app is a dependency of the api.

    logically, however, the app is not a component of the api. the goal is to make them into two separate packages. the api depends on the app existing, but cannot require and install it as composer would a normal dependency.

    Carine93
    @Carine933_twitter

    Hi there.

    I have composer upgrade and it tells me this:
    Remove clarkwinkelmann/flarum-ext-group-invitation (0.1.1) In Filesystem.php line 217: Could not deleted /vendor/clarkwinkelmann/flarum-ext-group-invitation/src/Access/InvitationPolicy.php

    and I have composer require fof/socialprofile and it tells me this ./composer.json is not writable

    I have ofcourse VPS, 755, user/group=www-data/www-data
    What happens ? :S

    Ben Johnson
    @cbj4074
    @Carine933_twitter As which user are you executing the composer ... command?
    (i.e., what is the output of the whoami command)
    Phx
    @phoenixg
    Does any one knows, if I upgrade illuminate/database dependency from 5.2.45 to the latest 8.x, what should I do? Is there an upgrade guide there?
    Ben Johnson
    @cbj4074
    @Carine933_twitter My best guess is that PHP is running as a user in the www-data group, but not the www-data user, in which case, 755 is, in effect, read-only. You should try to determine as whom PHP is executing.
    @phoenixg I'm not sure that's possible without upgrading laravel/framework altogether.