Giter VIP home page Giter VIP logo

Comments (15)

Ocramius avatar Ocramius commented on June 18, 2024 1

from composerrequirechecker.

mpdude avatar mpdude commented on June 18, 2024

I know that Symfony best practices are outside the scope of this project. However, for a long time there has been a practice of keeping tests inside src/Some/Bundle/Tests/*, and so it would be valuable if we could exclude these directories from checks.

from composerrequirechecker.

Ocramius avatar Ocramius commented on June 18, 2024

I think this is fixed by symfony/symfony#33579

from composerrequirechecker.

mpdude avatar mpdude commented on June 18, 2024

Not sure why... does it?

from composerrequirechecker.

Ocramius avatar Ocramius commented on June 18, 2024

It basically drops rhose tests from the (confusing) source tree of symfony components.

In practice, symfony could split the sources from the tests, which would be a better fix, but the above suffices.

from composerrequirechecker.

mpdude avatar mpdude commented on June 18, 2024

Sorry for the noise... What I meant was that in many Symfony projects that I know, there is src/App/whatever/Tests, because this has been the place suggested for (project-specific) tests in the past.

I think Symfony best practices nowadays suggest something else 🙏🏻. But that makes it hard to convince people to use this tool here if there is no simple way to make it pass on CI as well.

If we could exclude src/App/whatever/**/Tests, things might be easily fixable (just add the dependencies that were really missing).

from composerrequirechecker.

Ocramius avatar Ocramius commented on June 18, 2024

@mpdude well, they'd need to be declared as "shadowed" in composer.json somehow.

We should most certainly not add more conventions/configs than what is already very clear from composer.json: moving files is trivial and takes minutes anyway.

from composerrequirechecker.

VincentLanglet avatar VincentLanglet commented on June 18, 2024

In my case, the .phpstorm.meta.php are checked by this library and returning multiple unknown symbol. I would prefer to remove these files from the check.

from composerrequirechecker.

Ocramius avatar Ocramius commented on June 18, 2024

That depends on your autoloader configuration

from composerrequirechecker.

VincentLanglet avatar VincentLanglet commented on June 18, 2024

I have

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

You mean I can easily exclude the phpstorm meta from the composer autoload and still having in the src folder ?

from composerrequirechecker.

Ocramius avatar Ocramius commented on June 18, 2024

from composerrequirechecker.

VincentLanglet avatar VincentLanglet commented on June 18, 2024

That file doesn't need to be in src in first place

I agree, it doesn't need to. But I have multiple .phpstorm.meta.php configuring different functions, different classes, ... So it's more convenient to have the meta file next to the file it configures.
I never said I had no solution, I just prefer to have a way to exclude the file.

from composerrequirechecker.

VincentLanglet avatar VincentLanglet commented on June 18, 2024

Thanks ! It works perfectly.

from composerrequirechecker.

Jean85 avatar Jean85 commented on June 18, 2024

Sorry for recovering an old issue, but I stumbled on another use case for this option: schmittjoh/serializer#1381

The class is valid up to PHP 8.0, and the library wont drop the class due to BC. In the meantime my hack would be the same as schmittjoh/serializer#1381 (comment) (rming the file on the fly), but an exclusion on this side would be highly appreciated.

from composerrequirechecker.

maglnet avatar maglnet commented on June 18, 2024

Hi @Jean85

maybe you can add the PHP 8.1 incompatible file to your composer.json - autoload.exclude-from-classmap config section?

$blacklist = $composerData['autoload']['exclude-from-classmap'] ?? null;

from composerrequirechecker.

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.