spatie / laravel-ray

Debug with Ray to fix problems faster in Laravel apps
https://myray.app
MIT License
291 stars 64 forks source link

Bug on ray dependency #339

Closed allanmcarvalho closed 7 months ago

allanmcarvalho commented 7 months ago

Describe the bug A dependency from laravel ray is crashing the feature tests. Is expected that ./vendor comes on 0 index from method ClassLoader::getRegisteredLoaders(), but came /vendor/rector/rector/vendor instead. ./vendor came on index 1, but laravel use index 0 to start application.

Versions Ray version: 1.36.0

PHP version: Laravel version: 8.3.4

To Reproduce Steps to reproduce the behavior: 1 Running Laravel Feature Tests (Require application start) using pest

Expected behavior No fail Feature tests

Screenshots Captura de Tela 2024-04-06 às 11 34 03

Desktop (please complete the following information):

timvandijck commented 7 months ago

@allanmcarvalho I asume 8.3.4 is the PHP version and not the Laravel version? Could you share your Laravel version too?

allanmcarvalho commented 7 months ago

Hi, I really missed some contexts.

On tests fail on PHP 8.3.4 Captura de Tela 2024-04-08 às 10 46 02

On local machine fails on Herd PHP 8.3.3 Captura de Tela 2024-04-08 às 10 49 22

allanmcarvalho commented 7 months ago

If I remove all spatie dependencies that need rector/rector tests will pass.

I tried remove and works

        "spatie/laravel-data": "^4.5.0",
        "spatie/laravel-ray": "^1.36.0",
timvandijck commented 7 months ago

@allanmcarvalho I tried to replicate your problem but I was not succesfull. I'm also not quite sure how we could cause this issue.

If are able to create an example project on git that has the problem I would be happy to dig further into it.

allanmcarvalho commented 7 months ago

The problems stopped for me. I don't know what the reason. I only updated my composer dependencies and updated Herd PHP from 8.3.3 to 8.3.4.

I made the same previous steps that was failed (delete vendor folder and install again) and now its working.

I appreciate your time, now appears to be solved

timvandijck commented 7 months ago

@allanmcarvalho good to hear!