GithubHelp home page GithubHelp logo

Comments (6)

BrianHenryIE avatar BrianHenryIE commented on July 21, 2024

Weird, that should be fixed already #37 35d0043. I'll take another look soon.

I think as a workaround this might work:

  "extra": {
        "strauss": {
            "override_autoload": {
                "monolog/monolog": {
                    "classmap": ["src/", "lib/"]
                }
            },

from strauss.

TheTBO avatar TheTBO commented on July 21, 2024

Thank you for the workaround.
Sorry but I'm a bit confused, the commit is about the FileEnumerator class which is not being used in StraussConfig constructor where the error happen

            // Check each autoloader.
            foreach ($composer->getPackage()->getAutoload() as $autoload) {
                // To see if one of its paths.
                foreach ($autoload as $path) {
                    // Matches the target directory.
                    if (trim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR === $this->getTargetDirectory()) {
                        $this->classmapOutput = false;
                        break 2;
                    }
                }
            }

Furthermore, the test case doesn't seem to include PSR-0/PSR-4 config at all.

EDIT: using the workaround still result in the same error.
EDIT2: my bad I misunderstood how the workaround should work, I guess you set the array only in extra.strauss not autoload.PSR-#

from strauss.

BrianHenryIE avatar BrianHenryIE commented on July 21, 2024

Can you give me an actual broken composer.json. I've tried writing tests with the example you gave me and they're passing. I can see that it should fail in the code you highlighted, but I want a test!

from strauss.

TheTBO avatar TheTBO commented on July 21, 2024

Sure, here composer.json
it's a modified version from fakerpress

from strauss.

BrianHenryIE avatar BrianHenryIE commented on July 21, 2024

This should be fixed in master now. See: b32fe49

from strauss.

TheTBO avatar TheTBO commented on July 21, 2024

Great, It works flawlessly now.
Thank you very much.

from strauss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.