GithubHelp home page GithubHelp logo

Comments (4)

rennokki avatar rennokki commented on May 26, 2024 2

I don't see any problem with a PR for this 😁

from laravel-aws-webhooks.

rennokki avatar rennokki commented on May 26, 2024

It was placed under the test folder because it is used for development only, as it shouldn't be used in production packages. Usually when you composer install package, the dev autoload still loads it since it wasnt installed with --no-dev

Do you need this in production, like when running composer install --no-dev?

from laravel-aws-webhooks.

stefanzweifel avatar stefanzweifel commented on May 26, 2024

Do you need this in production, like when running composer install --no-dev?

No, we don't need this in production. I'm using the copy of the GeneratesSnsMessages-trait in the apps test suite. Tests are not run in production. Only on local machines and in the CI environment.

Locally I don't use composer install --no-dev, as I want my dev-dependencies installed. Theoretically composer install (without --no-dev) should add the dev paths of dependencies to the autoloader. But this doesn't seem to work on my machine with the latest composer version. A subsequent composer dump-autoload doesn't help either. πŸ€”

PHP Fatal error:  Trait 'Rennokki\LaravelSnsEvents\Tests\Concerns\GeneratesSnsMessages' 
not found in /tests/Features/AwsSnsSesWebhookControllerTest.php on line 11

I thought it would be great, if the package could also provide some sort of helper, to make testing ones own Controller easier. But I also totally understand the point of not wanting to add "dev only" code to the published package.
My copy of the trait works fine for me. ☺️

from laravel-aws-webhooks.

stefanzweifel avatar stefanzweifel commented on May 26, 2024

Thanks for the merge and release!

from laravel-aws-webhooks.

Related Issues (3)

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.