Giter Site home page Giter Site logo

Comments (11)

arkaitzgarro avatar arkaitzgarro commented on July 2, 2024 1

If we are dropping support for 5.5, I would prefer to jump directly into 6. As you mentioned, none of the 5.x versions are supported anymore, I think it makes sense to have the 1.x version of this package compatible with Laravel >=5.5, and the next 2.x version compatible with Laravel >=6.X versions.

from elastic-apm-laravel.

dstepe avatar dstepe commented on July 2, 2024

After some more digging, I believe this change occurred in the 5.6 release (I forgot that Laravel did not start using semantic versioning until 6.x, so the 5.5 to 5.6 is a "major" release). The 5.6 release included a major change to the Monolog implementation.

Given that no versions of 5.x are supported for security releases any longer, I am willing to reconsider the minimum supported version for this package. The previous potential breaking change was easy to avoid. This one is not. I suggest that the minimum Laravel version for this package be bumped to 5.6.

from elastic-apm-laravel.

dstepe avatar dstepe commented on July 2, 2024

I agree. I noticed that the ScheduledTask events will required 6.x as well.

Will you create a release of the 1.x version that will include the new features that are compatible, but limited to Laravel >=5.5 <6.0? I'm going to push to get APM into our apps faster than my dev teams will be able to update (though I'm about to have the conversation regarding just how bad a support situation we are in). I'll need to maintain a compatible fork if there isn't an official release.

from elastic-apm-laravel.

arkaitzgarro avatar arkaitzgarro commented on July 2, 2024

@dstepe your idea will be to support Laravel >=5.5 but using the previous APM agent from philkra right? If that's the case, I can create a branch from the latest 1.X tag, an we can start migrating functionality. I'm afraid it will be an intense manual labour job, non of the latest changes is compatible with the previous version of the agent.

from elastic-apm-laravel.

dstepe avatar dstepe commented on July 2, 2024

I was actually thinking of branching what we have now, before merging in the change to bump to Laravel 6 minimum. The master branch is working well for me in 5.5+ Laravel apps. I'm not at HEAD with the latest changes, but I think we can get to a working release without too much effort. And leaving that on a branch will allow continued minor releases on the 1.x line. I don't mind putting in the work for that. I'm in a situation in which I want APM for a number of apps sooner than I expect them to be updated to Laravel 6+.

from elastic-apm-laravel.

arkaitzgarro avatar arkaitzgarro commented on July 2, 2024

I created a 2.x branch from latest changes, and restored the compatibility with Laravel 5.5. I also removed the incompatible collector. Unit tests are passing, the only missing update will be the getLogger/getMonolog breaking change in the Service Provider.

Unfortunately, GH actions declines to work when add Laravel 5.5 to the matrix, it does not install the dependencies...

from elastic-apm-laravel.

countless-integers avatar countless-integers commented on July 2, 2024

Just mind that scheduled task collector is only included if one of the event class it uses is present and as such should not break for 5.5 users (haven't exactly tested that, but that's what I expect). So for 5.5 users this feature will not work, but also shouldn't break.

from elastic-apm-laravel.

arkaitzgarro avatar arkaitzgarro commented on July 2, 2024

Just mind that scheduled task collector is only included if one of the event class it uses is present and as such should not break for 5.5 users (haven't exactly tested that, but that's what I expect). So for 5.5 users this feature will not work, but also shouldn't break.

I had to remove it because L5.5 test were failing. We were importing the class, but since it didn't exist, PHP throws an error. I guess the proper solution is not import the class and use the fully qualified name if the class exists.

if (class_exists('Illuminate\Console\Events\ScheduledTaskStarting')) {
  $this->app->tag(\Illuminate\Console\Events\ScheduledTaskCollector::class, self::COLLECTOR_TAG);
}

from elastic-apm-laravel.

countless-integers avatar countless-integers commented on July 2, 2024

🤦 yep, strong habit.

from elastic-apm-laravel.

dstepe avatar dstepe commented on July 2, 2024

I removed the Collectors which I understood to not be supported prior to Laravel 6. Added a version check to get the Monolog instances with the appropriate method for 5.5 and 5.6+, so the 2.x branch should support 5.5 - 5.8.PR #112 should be ready for review.

from elastic-apm-laravel.

arkaitzgarro avatar arkaitzgarro commented on July 2, 2024

Closed via #112

from elastic-apm-laravel.

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.