Releases: dmgctrlr/lara-osrm
Added PHP 8 Support
v2.1 adding sendChunk
This small release introduces a new experimental feature. There are no plans to expand the feature further than the scope it's required for one particular project, but we welcome pull requests or issues requesting particular feature support.
SendChunk - sending huge RouteServiceRequests
Note: This is an experimental feature, your contributions are welcome
If you want to a route request with more than a few hundred waypoints you'll run
into URI length limits when the library sends a GET request to OSRM.
To workaround that you can use sendChunk()
- which is an experimental and incomplete
attempt at breaking your huge request into smaller requests and combining them.
To use sendChunk()
:
- Read the SendChunk inline documentation (
src/BaseServiceRequest.php
) - Confirm that sendChunk processes and returns the information you want (it doesn't process everything)
- Simply swap
send()
withsendChunk()
on your RouteRequest object. - Test to check that the return from
sendChunk()
is accurate enough for you.
Known Limitations of sendChunk()
(and how to help out)
This is actually a list of things known to (probably) work. The crux of the complexity of
sendChunk is in re-combining and stitching together the multiple requests we make.
Ultimately we want to be able to perform a send()
and a sendChunk()
and get exactly
the same result. We can do this by using a test list of Waypoints which is small enough
for send()
and use really small (e.g. 10 instead of 100) chunk sizes.
The tests are currently all in: RouteServiceTest::testSendChunkReturnsSameAsSend
and
towards the bottom there are a bunch of commented out asserts. The next step
is to make those asserts work, and then declare another bit of the result OK!.
- sendChunk only works with RouteServiceRequests
- sendChunk only works when 'geometries' is set to 'geojson'
- sendChunk only works for the 'waypoints' return value
- any other returned data shouldn't be trusted (it's probably only partial).
- sendChunk may not throw an error if you try and mis-use it. Please add error reporting.
v2.0
Version 2 brings the library up to date with the latest dependencies, adds a few minor features,
fixes a couple of bugs and adds a couple of tests.
It's not backwards compatible because of the changes in composer dependencies and tested PHP versions. It's not yet tested for PHP 8.
I've merged in a couple of previous "releases" (1.1 and 1.2) into this version 2 because I didn't release them properly and they weren't fully backwards compatible with v1.
So the file history of CHANGELOG.md may look a bit odd - but just ignore any versions >1 and <2.
- Dropped support for PHP < 7.3
- Removed no-longer-working CodeCoverage scripts from travis.yml
- Reintroduced $options array on requests (fixing the setOptions() method)
- Defaulted options to null - so the server default will be used rather than this package versions.
- Removed 'timestamps' from MatchServiecRequest (doesn't appear to be supported as an option on OSRM)
- Added 'annotations' option to MatchServiceRequest
- Added tests for URL Generation
- Added MatchServiceRequest to enable Match Requests.
- Added Laravel 7 and 8 compatibility
- Update Illuminate/Support, Guzzle, TestBench and PHP Unit to the latest versions.
0.1.0
testing
Initial release
Very much a work in progress.